- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for NewSlice (0.04 sec)
-
src/cmd/asm/internal/lex/slice.go
package lex import ( "text/scanner" "cmd/internal/src" ) // A Slice reads from a slice of Tokens. type Slice struct { tokens []Token base *src.PosBase line int pos int } func NewSlice(base *src.PosBase, line int, tokens []Token) *Slice { return &Slice{ tokens: tokens, base: base, line: line, pos: -1, // Next will advance to zero. } } func (s *Slice) Next() ScanToken {
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
if macro.args == nil { in.Push(NewSlice(in.Base(), in.Line(), macro.tokens)) return } tok := in.Stack.Next() if tok != '(' { // If the macro has arguments but is invoked without them, all we push is the macro name. // First, put back the token. in.peekToken = tok in.peekText = in.text in.peek = true in.Push(NewSlice(in.Base(), in.Line(), []Token{Make(macroName, macro.name)}))
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Sep 06 13:17:27 UTC 2024 - 12.5K bytes - Viewed (0)