Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 436 for SYNTAX (0.17 sec)

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

    // Parse parses a single Go source file from src and returns the corresponding
    // syntax tree. If there are errors, Parse will return the first error found,
    // and a possibly partially constructed syntax tree, or nil.
    //
    // If errh != nil, it is called with each error encountered, and Parse will
    // process as much source as possible. In this case, the returned syntax tree
    // is only nil if no correct package clause was found.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 01 18:18:07 UTC 2022
    - 3.1K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/types2/return.go

    // closest outer breakable statement.
    func hasBreak(s syntax.Stmt, label string, implicit bool) bool {
    	switch s := s.(type) {
    	default:
    		panic("unreachable")
    
    	case *syntax.DeclStmt, *syntax.EmptyStmt, *syntax.ExprStmt,
    		*syntax.SendStmt, *syntax.AssignStmt, *syntax.CallStmt,
    		*syntax.ReturnStmt:
    		// no chance
    
    	case *syntax.LabeledStmt:
    		return hasBreak(s.Stmt, label, implicit)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 22 19:32:17 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/types2/util.go

    func endPos(n syntax.Node) syntax.Pos { return syntax.EndPos(n) }
    
    // makeFromLiteral returns the constant value for the given literal string and kind.
    func makeFromLiteral(lit string, kind syntax.LitKind) constant.Value {
    	return constant.MakeFromLiteral(lit, kind2tok[kind], 0)
    }
    
    var kind2tok = [...]token.Token{
    	syntax.IntLit:    token.INT,
    	syntax.FloatLit:  token.FLOAT,
    	syntax.ImagLit:   token.IMAG,
    	syntax.RuneLit:   token.CHAR,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/types2/errorcalls_test.go

    func TestErrorCalls(t *testing.T) {
    	files, err := pkgFiles(".")
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	for _, file := range files {
    		syntax.Inspect(file, func(n syntax.Node) bool {
    			call, _ := n.(*syntax.CallExpr)
    			if call == nil {
    				return true
    			}
    			selx, _ := call.Fun.(*syntax.SelectorExpr)
    			if selx == nil {
    				return true
    			}
    			if !(isName(selx.X, "check") && isName(selx.Sel, "errorf")) {
    				return true
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Dec 15 21:57:36 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/noder/stmt.go

    import (
    	"cmd/compile/internal/ir"
    	"cmd/compile/internal/syntax"
    )
    
    // TODO(mdempsky): Investigate replacing with switch statements or dense arrays.
    
    var branchOps = [...]ir.Op{
    	syntax.Break:       ir.OBREAK,
    	syntax.Continue:    ir.OCONTINUE,
    	syntax.Fallthrough: ir.OFALL,
    	syntax.Goto:        ir.OGOTO,
    }
    
    var callOps = [...]ir.Op{
    	syntax.Defer: ir.ODEFER,
    	syntax.Go:    ir.OGO,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jul 21 02:39:32 UTC 2023
    - 564 bytes
    - Viewed (0)
  6. src/cmd/vendor/golang.org/x/mod/modfile/work.go

    		i := 0
    		for i = 0; i < len(f.Syntax.Stmt); i++ {
    			if _, ok := f.Syntax.Stmt[i].(*CommentBlock); !ok {
    				break
    			}
    		}
    		f.Syntax.Stmt = append(append(f.Syntax.Stmt[:i:i], stmt), f.Syntax.Stmt[i:]...)
    	} else {
    		f.Go.Version = version
    		f.Syntax.updateLine(f.Go.Syntax, "go", version)
    	}
    	return nil
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 18:34:56 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/types2/struct.go

    	styp.markComplete()
    }
    
    func embeddedFieldIdent(e syntax.Expr) *syntax.Name {
    	switch e := e.(type) {
    	case *syntax.Name:
    		return e
    	case *syntax.Operation:
    		if base := ptrBase(e); base != nil {
    			// *T is valid, but **T is not
    			if op, _ := base.(*syntax.Operation); op == nil || ptrBase(op) == nil {
    				return embeddedFieldIdent(e.X)
    			}
    		}
    	case *syntax.SelectorExpr:
    		return e.Sel
    	case *syntax.IndexExpr:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 29 22:06:18 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  8. src/cmd/go/internal/imports/read_test.go

    		"syntax error",
    	},
    	{
    		`package p; import _ "`,
    		"syntax error",
    	},
    	{
    		`package p; import _ "x`,
    		"syntax error",
    	},
    	{
    		`package p; import .`,
    		"syntax error",
    	},
    	{
    		`package p; import . "`,
    		"syntax error",
    	},
    	{
    		`package p; import . "x`,
    		"syntax error",
    	},
    	{
    		`package p; import (`,
    		"syntax error",
    	},
    	{
    		`package p; import ("`,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 15 18:42:11 UTC 2021
    - 4.2K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/types2/resolver_test.go

    	// from the uses and defs maps) because syntax.Walk traverses shared nodes multiple
    	// times (e.g. types in field lists such as "a, b, c int").
    	foundUses := make(map[*syntax.Name]bool)
    	foundDefs := make(map[*syntax.Name]bool)
    	var both []string
    	for _, f := range files {
    		syntax.Inspect(f, func(n syntax.Node) bool {
    			if x, ok := n.(*syntax.Name); ok {
    				var objects int
    				if _, found := uses[x]; found {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 10 12:59:20 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  10. src/regexp/backtrack.go

    			} else {
    				b.push(re, pc, pos, true)
    				pc = inst.Out
    				goto CheckAndLoop
    			}
    
    		case syntax.InstAltMatch:
    			// One opcode consumes runes; the other leads to match.
    			switch re.prog.Inst[inst.Out].Op {
    			case syntax.InstRune, syntax.InstRune1, syntax.InstRuneAny, syntax.InstRuneAnyNotNL:
    				// inst.Arg is the match.
    				b.push(re, inst.Arg, pos, false)
    				pc = inst.Arg
    				pos = b.end
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 14 17:25:39 UTC 2023
    - 8.8K bytes
    - Viewed (0)
Back to top