Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for Col (0.14 sec)

  1. src/cmd/asm/internal/lex/tokenizer.go

    func (t *Tokenizer) Base() *src.PosBase {
    	return t.base
    }
    
    func (t *Tokenizer) SetBase(base *src.PosBase) {
    	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()
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Aug 04 20:35:21 GMT 2022
    - 3K bytes
    - Viewed (0)
  2. src/cmd/asm/internal/lex/input.go

    // The argument list is nil for no parens on the definition; otherwise a list of
    // formal argument names.
    func (in *Input) macroDefinition(name string) ([]string, []Token) {
    	prevCol := in.Stack.Col()
    	tok := in.Stack.Next()
    	if tok == '\n' || tok == scanner.EOF {
    		return nil, nil // No definition for macro
    	}
    	var args []string
    	// The C preprocessor treats
    	//	#define A(x)
    	// and
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Aug 29 07:48:38 GMT 2023
    - 12.6K bytes
    - Viewed (0)
  3. src/cmd/asm/internal/lex/stack.go

    }
    
    func (s *Stack) SetBase(base *src.PosBase) {
    	s.tr[len(s.tr)-1].SetBase(base)
    }
    
    func (s *Stack) Line() int {
    	return s.tr[len(s.tr)-1].Line()
    }
    
    func (s *Stack) Col() int {
    	return s.tr[len(s.tr)-1].Col()
    }
    
    func (s *Stack) Close() { // Unused.
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Jan 09 22:33:23 GMT 2017
    - 1.2K bytes
    - Viewed (0)
  4. src/cmd/asm/internal/lex/slice.go

    	// Cannot happen because we only have slices of already-scanned text,
    	// but be prepared.
    	s.base = base
    }
    
    func (s *Slice) Line() int {
    	return s.line
    }
    
    func (s *Slice) Col() int {
    	// TODO: Col is only called when defining a macro and all it cares about is increasing
    	// position to discover whether there is a blank before the parenthesis.
    	// We only get here if defining a macro inside a macro.
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Jun 29 22:49:50 GMT 2023
    - 1.6K bytes
    - Viewed (0)
  5. src/cmd/asm/internal/lex/lex.go

    	Base() *src.PosBase
    	// SetBase sets the position base.
    	SetBase(*src.PosBase)
    	// Line reports the source line number of the token.
    	Line() int
    	// Col reports the source column number of the token.
    	Col() int
    	// Close does any teardown required.
    	Close()
    }
    
    // A Token is a scan token plus its string value.
    // A macro is stored as a sequence of Tokens with spaces stripped.
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Aug 29 18:31:05 GMT 2023
    - 4.1K bytes
    - Viewed (0)
  6. src/cmd/asm/internal/lex/lex_test.go

    		),
    		"THIS.\n",
    	},
    	{
    		"nested #define with args",
    		lines(
    			"#define A #define B(x) x",
    			"A",
    			"B(THIS)",
    		),
    		"THIS.\n",
    	},
    	/* This one fails. See comment in Slice.Col.
    	{
    		"nested #define with args",
    		lines(
    			"#define A #define B (x) x",
    			"A",
    			"B(THIS)",
    		),
    		"x.\n",
    	},
    	*/
    }
    
    func TestLex(t *testing.T) {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Aug 29 07:48:38 GMT 2023
    - 5.8K bytes
    - Viewed (0)
Back to top