- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for ScanToken (0.08 sec)
-
src/cmd/asm/internal/lex/tokenizer.go
t.base = base } func (t *Tokenizer) Line() int { return t.line } func (t *Tokenizer) Col() int { return t.s.Pos().Column } func (t *Tokenizer) Next() ScanToken { s := t.s for { t.tok = ScanToken(s.Scan()) if t.tok != scanner.Comment { break } text := s.TokenText() t.line += strings.Count(text, "\n") if constraint.IsGoBuild(text) { t.tok = BuildComment
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Aug 04 20:35:21 UTC 2022 - 3K bytes - Viewed (0) -
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/lex/stack.go
tr []TokenReader } // Push adds tr to the top (end) of the input stack. (Popping happens automatically.) func (s *Stack) Push(tr TokenReader) { s.tr = append(s.tr, tr) } func (s *Stack) Next() ScanToken { tos := s.tr[len(s.tr)-1] tok := tos.Next() for tok == scanner.EOF && len(s.tr) > 1 { tos.Close() // Pop the topmost item from the stack and resume with the next one down. s.tr = s.tr[:len(s.tr)-1]
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Mon Jan 09 22:33:23 UTC 2017 - 1.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)