Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 526 for SYNTAX (0.15 sec)

  1. 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)
  2. 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)
  3. src/regexp/onepass.go

    func cleanupOnePass(prog *onePassProg, original *syntax.Prog) {
    	for ix, instOriginal := range original.Inst {
    		switch instOriginal.Op {
    		case syntax.InstAlt, syntax.InstAltMatch, syntax.InstRune:
    		case syntax.InstCapture, syntax.InstEmptyWidth, syntax.InstNop, syntax.InstMatch, syntax.InstFail:
    			prog.Inst[ix].Next = nil
    		case syntax.InstRune1, syntax.InstRuneAny, syntax.InstRuneAnyNotNL:
    			prog.Inst[ix].Next = nil
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:36:03 UTC 2024
    - 13.7K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. src/cmd/compile/internal/types2/api.go

    	// function's syntax ([*ast.FuncDecl] or [*ast.FuncLit]).
    	// The Scopes mapping does not contain an entry for the
    	// function body ([*ast.BlockStmt]); the function's scope is
    	// associated with the [*ast.FuncType].
    	//
    	// The following node types may appear in Scopes:
    	//
    	//     *syntax.File
    	//     *syntax.FuncType
    	//     *syntax.TypeDecl
    	//     *syntax.BlockStmt
    	//     *syntax.IfStmt
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 13:48:53 UTC 2024
    - 17.4K bytes
    - Viewed (0)
  7. src/cmd/vendor/golang.org/x/mod/modfile/rule.go

    }
    
    func (f *File) AddModuleStmt(path string) error {
    	if f.Syntax == nil {
    		f.Syntax = new(FileSyntax)
    	}
    	if f.Module == nil {
    		f.Module = &Module{
    			Mod:    module.Version{Path: path},
    			Syntax: f.Syntax.addLine(nil, "module", AutoQuote(path)),
    		}
    	} else {
    		f.Module.Mod.Path = path
    		f.Syntax.updateLine(f.Module.Syntax, "module", AutoQuote(path))
    	}
    	return nil
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 18:34:56 UTC 2024
    - 46.5K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/types2/expr.go

    		*syntax.IndexExpr,
    		*syntax.SliceExpr,
    		*syntax.AssertExpr,
    		*syntax.ListExpr,
    		//*syntax.StarExpr,
    		*syntax.KeyValueExpr,
    		*syntax.ArrayType,
    		*syntax.StructType,
    		*syntax.FuncType,
    		*syntax.InterfaceType,
    		*syntax.MapType,
    		*syntax.ChanType:
    		// These expression are never untyped - nothing to do.
    		// The respective sub-expressions got their final types
    		// upon assignment or use.
    		if debug {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 02:09:54 UTC 2024
    - 51.7K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/types2/stmt.go

    				valid = true
    			case *syntax.AssignStmt:
    				if _, ok := s.Rhs.(*syntax.ListExpr); !ok {
    					rhs = s.Rhs
    				}
    			case *syntax.ExprStmt:
    				rhs = s.X
    			}
    
    			// if present, rhs must be a receive operation
    			if rhs != nil {
    				if x, _ := syntax.Unparen(rhs).(*syntax.Operation); x != nil && x.Y == nil && x.Op == syntax.Recv {
    					valid = true
    				}
    			}
    
    			if !valid {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 30.7K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/rangefunc/rewrite.go

    func (r *rewriter) assertReady(start syntax.Pos, loop *forLoop) syntax.Stmt {
    	nif := &syntax.IfStmt{
    		Cond: r.cond(syntax.Neq, r.useObj(loop.stateVar), r.stateConst(abi.RF_READY)),
    		Then: &syntax.BlockStmt{
    			List: []syntax.Stmt{r.callPanic(start, r.useObj(loop.stateVar))},
    		},
    	}
    	setPos(nif, start)
    	return nif
    }
    
    func (r *rewriter) callPanic(start syntax.Pos, arg syntax.Expr) syntax.Stmt {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:05:44 UTC 2024
    - 41.6K bytes
    - Viewed (0)
Back to top