- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for ScanToken (0.06 sec)
-
src/cmd/asm/internal/lex/lex.go
"strings" "text/scanner" "cmd/internal/src" ) // A ScanToken represents an input item. It is a simple wrapping of rune, as // returned by text/scanner.Scanner, plus a couple of extra values. type ScanToken rune const ( // Asm defines some two-character lexemes. We make up // a rune/ScanToken value for them - ugly but simple. LSH ScanToken = -1000 - iota // << Left shift.
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Aug 29 18:31:05 UTC 2023 - 4.1K bytes - Viewed (0) -
src/cmd/asm/internal/asm/parse.go
} tok = p.next() if tok.ScanToken == '+' { if p.next().ScanToken != scanner.Int { return "", obj.ABI0, false } tok = p.next() } if tok.ScanToken != '(' { return "", obj.ABI0, false } if reg := p.next(); reg.ScanToken != scanner.Ident || reg.String() != "SB" { return "", obj.ABI0, false } if p.next().ScanToken != ')' || p.peek() != scanner.EOF {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Sep 04 18:16:59 UTC 2024 - 36.9K bytes - Viewed (0) -
src/cmd/asm/internal/lex/slice.go
return &Slice{ tokens: tokens, base: base, line: line, pos: -1, // Next will advance to zero. } } func (s *Slice) Next() ScanToken { s.pos++ if s.pos >= len(s.tokens) { return scanner.EOF } return s.tokens[s.pos].ScanToken } func (s *Slice) Text() string { return s.tokens[s.pos].text } func (s *Slice) File() string { return s.base.Filename() }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Jun 29 22:49:50 UTC 2023 - 1.6K bytes - Viewed (0) -
src/cmd/asm/internal/lex/input.go
Stack includes []string beginningOfLine bool ifdefStack []bool macros map[string]*Macro text string // Text of last token returned by Next. peek bool peekToken ScanToken peekText string } // NewInput returns an Input from the given path. func NewInput(name string) *Input { return &Input{ // include directories: look in source dir, then -I directories.
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Sep 06 13:17:27 UTC 2024 - 12.5K bytes - Viewed (0) -
src/cmd/asm/internal/asm/expr_test.go
if result != test.output { t.Errorf("%d: %q evaluated to %d; expected %d", i, test.input, result, test.output) } tok := p.next() if test.atEOF && tok.ScanToken != scanner.EOF { t.Errorf("%d: %q: at EOF got %s", i, test.input, tok) } else if !test.atEOF && tok.ScanToken == scanner.EOF { t.Errorf("%d: %q: expected not EOF but at EOF", i, test.input) } } } type badExprTest struct { input string
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Aug 29 07:48:38 UTC 2023 - 3.2K bytes - Viewed (0) -
src/cmd/asm/internal/asm/asm.go
// Parse left to right. op := operands[next] if len(op) < 2 || op[0].ScanToken != '$' { p.errorf("TEXT %s: frame size must be an immediate constant", name) return } op = op[1:] negative := false if op[0].ScanToken == '-' { negative = true op = op[1:] } if len(op) == 0 || op[0].ScanToken != scanner.Int { p.errorf("TEXT %s: frame size must be an immediate constant", name) return
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Mon Oct 21 14:11:44 UTC 2024 - 25.5K bytes - Viewed (0)