Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for _EOF (0.27 sec)

  1. src/cmd/compile/internal/syntax/scanner_test.go

    				continue
    			}
    			if got.lit != "newline" {
    				t.Errorf("%s: got %s; want newline", src, got.lit)
    			}
    		}
    
    		got.next()
    	}
    
    	if got.tok != _EOF {
    		t.Errorf("got %q; want _EOF", got.tok)
    	}
    }
    
    var sampleTokens = [...]struct {
    	tok  token
    	src  string
    	op   Operator
    	prec int
    }{
    	// name samples
    	{_Name, "x", 0, 0},
    	{_Name, "X123", 0, 0},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 14 16:11:21 UTC 2022
    - 21.9K bytes
    - Viewed (0)
  2. src/cmd/vendor/golang.org/x/mod/modfile/read.go

    type tokenKind int
    
    const (
    	_EOF tokenKind = -(iota + 1)
    	_EOLCOMMENT
    	_IDENT
    	_STRING
    	_COMMENT
    
    	// newlines and punctuation tokens are allowed as ASCII codes.
    )
    
    func (k tokenKind) isComment() bool {
    	return k == _COMMENT || k == _EOLCOMMENT
    }
    
    // isEOL returns whether a token terminates a line.
    func (k tokenKind) isEOL() bool {
    	return k == _EOF || k == _EOLCOMMENT || k == '\n'
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/syntax/printer.go

    		linebreaks: form == 0,
    	}
    
    	defer func() {
    		n = p.written
    		if e := recover(); e != nil {
    			err = e.(writeError).err // re-panics if it's not a writeError
    		}
    	}()
    
    	p.print(x)
    	p.flush(_EOF)
    
    	return
    }
    
    // String is a convenience function that prints n in ShortForm
    // and returns the printed string.
    func String(n Node) string {
    	var buf strings.Builder
    	_, err := Fprint(&buf, n, ShortForm)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 24 07:17:27 UTC 2023
    - 21.5K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/syntax/scanner.go

    		s.nextch()
    		s.ident()
    		return
    	}
    
    	switch s.ch {
    	case -1:
    		if nlsemi {
    			s.lit = "EOF"
    			s.tok = _Semi
    			break
    		}
    		s.tok = _EOF
    
    	case '\n':
    		s.nextch()
    		s.lit = "newline"
    		s.tok = _Semi
    
    	case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9':
    		s.number(false)
    
    	case '"':
    		s.stdString()
    
    	case '`':
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 28 18:17:41 UTC 2022
    - 17.1K bytes
    - Viewed (0)
Back to top