- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for Tok (0.02 sec)
-
src/go/parser/parser.go
if p.trace && p.pos.IsValid() { s := p.tok.String() switch { case p.tok.IsLiteral(): p.printTrace(s, p.lit) case p.tok.IsOperator(), p.tok.IsKeyword(): p.printTrace("\"" + s + "\"") default: p.printTrace(s) } } for { p.pos, p.tok, p.lit = p.scanner.Scan() if p.tok == token.COMMENT { if p.top && strings.HasPrefix(p.lit, "//go:build") {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Dec 08 20:07:50 UTC 2023 - 72.2K bytes - Viewed (0) -
src/go/printer/testdata/parser.go
// make the error message more specific if p.tok == token.SEMICOLON && p.lit[0] == '\n' { msg += ", found newline" } else { msg += ", found '" + p.tok.String() + "'" if p.tok.IsLiteral() { msg += " " + p.lit } } } p.error(pos, msg) } func (p *parser) expect(tok token.Token) token.Pos { pos := p.pos if p.tok != tok { p.errorExpected(pos, "'"+tok.String()+"'") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jul 20 20:19:51 UTC 2023 - 50.5K bytes - Viewed (0) -
src/cmd/compile/internal/syntax/parser.go
} // determine token string var tok string switch p.tok { case _Name: tok = "name " + p.lit case _Semi: tok = p.lit case _Literal: tok = "literal " + p.lit case _Operator: tok = p.op.String() case _AssignOp: tok = p.op.String() + "=" case _IncOp: tok = p.op.String() tok += tok default: tok = tokstring(p.tok) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 62.9K bytes - Viewed (0) -
src/go/printer/nodes.go
// Files func declToken(decl ast.Decl) (tok token.Token) { tok = token.ILLEGAL switch d := decl.(type) { case *ast.GenDecl: tok = d.Tok case *ast.FuncDecl: tok = token.FUNC } return } func (p *printer) declList(list []ast.Decl) { tok := token.ILLEGAL for _, d := range list { prev := tok tok = declToken(d)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 17 18:53:17 UTC 2023 - 52.6K bytes - Viewed (0) -
src/encoding/xml/marshal_test.go
<?Target Instruction?> <root> </root> `) dec := NewDecoder(&in) enc := NewEncoder(&out) for tok, err := dec.Token(); err == nil; tok, err = dec.Token() { err = enc.EncodeToken(tok) if err != nil { t.Fatalf("enc.EncodeToken: Unable to encode token (%#v), %v", tok, err) } } } // Issue 9796. Used to fail with GORACE="halt_on_error=1" -race. func TestRace9796(t *testing.T) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 08 18:46:41 UTC 2024 - 66K bytes - Viewed (0) -
pkg/apis/flowcontrol/validation/validation_test.go
ResourceRules: []flowcontrol.ResourcePolicyRule{{ Verbs: []string{flowcontrol.VerbAll, "create"}, APIGroups: []string{flowcontrol.APIGroupAll, "tak"}, Resources: []string{flowcontrol.ResourceAll, "tok"}, Namespaces: []string{flowcontrol.NamespaceEvery}, }}, }}, }, }, expectedErrors: field.ErrorList{
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Oct 30 22:22:51 UTC 2023 - 54.7K bytes - Viewed (0) -
src/cmd/compile/internal/types2/expr.go
x.val = constant.MakeUnknown() // x.typ is unchanged return } // force integer division for integer operands tok := op2tok[op] if op == syntax.Div && isInteger(x.typ) { tok = token.QUO_ASSIGN } x.val = constant.BinaryOp(x.val, tok, y.val) x.expr = e check.overflow(x, opPos(x.expr)) return } x.mode = value // x.typ is unchanged }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 02:09:54 UTC 2024 - 51.7K bytes - Viewed (0) -
src/cmd/cgo/out.go
} return r } // Look up the type in the top level declarations. // TODO: Handle types defined within a function. for _, d := range p.Decl { gd, ok := d.(*ast.GenDecl) if !ok || gd.Tok != token.TYPE { continue } for _, spec := range gd.Specs { ts, ok := spec.(*ast.TypeSpec) if !ok { continue } if ts.Name.Name == t.Name {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 29 16:41:10 UTC 2024 - 59.6K bytes - Viewed (0) -
src/cmd/cgo/gcc.go
return true case *ast.Ident: // TODO: Handle types defined within function. for _, d := range p.Decl { gd, ok := d.(*ast.GenDecl) if !ok || gd.Tok != token.TYPE { continue } for _, spec := range gd.Specs { ts, ok := spec.(*ast.TypeSpec) if !ok { continue } if ts.Name.Name == t.Name {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 20 15:50:06 UTC 2024 - 97K bytes - Viewed (0)