Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for BlockStmt (0.08 sec)

  1. src/go/printer/testdata/parser.go

    	if p.trace {
    		defer un(trace(p, "BlockStmt"))
    	}
    
    	lbrace := p.expect(token.LBRACE)
    	p.openScope()
    	list := p.parseStmtList()
    	p.closeScope()
    	rbrace := p.expect(token.RBRACE)
    
    	return &ast.BlockStmt{lbrace, list, rbrace}
    }
    
    // ----------------------------------------------------------------------------
    // Expressions
    
    func (p *parser) parseFuncTypeOrLit() ast.Expr {
    	if p.trace {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 20 20:19:51 UTC 2023
    - 50.5K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/syntax/parser.go

    }
    
    // context must be a non-empty string unless we know that p.tok == _Lbrace.
    func (p *parser) blockStmt(context string) *BlockStmt {
    	if trace {
    		defer p.trace("blockStmt")()
    	}
    
    	s := new(BlockStmt)
    	s.pos = p.pos()
    
    	// people coming from C may forget that braces are mandatory in Go
    	if !p.got(_Lbrace) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 62.9K bytes
    - Viewed (0)
  3. src/go/parser/parser.go

    	return
    }
    
    func (p *parser) parseBody() *ast.BlockStmt {
    	if p.trace {
    		defer un(trace(p, "Body"))
    	}
    
    	lbrace := p.expect(token.LBRACE)
    	list := p.parseStmtList()
    	rbrace := p.expect2(token.RBRACE)
    
    	return &ast.BlockStmt{Lbrace: lbrace, List: list, Rbrace: rbrace}
    }
    
    func (p *parser) parseBlockStmt() *ast.BlockStmt {
    	if p.trace {
    		defer un(trace(p, "BlockStmt"))
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Dec 08 20:07:50 UTC 2023
    - 72.2K bytes
    - Viewed (0)
  4. src/go/printer/nodes.go

    				}
    				line++
    				t = lt.Stmt
    			}
    			i++
    		}
    	}
    	if nindent > 0 {
    		p.print(unindent)
    	}
    }
    
    // block prints an *ast.BlockStmt; it always spans at least two lines.
    func (p *printer) block(b *ast.BlockStmt, nindent int) {
    	p.setPos(b.Lbrace)
    	p.print(token.LBRACE)
    	p.stmtList(b.List, nindent, true)
    	p.linebreak(p.lineFor(b.Rbrace), 1, ignore, true)
    	p.setPos(b.Rbrace)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 17 18:53:17 UTC 2023
    - 52.6K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/types2/api_test.go

    		for node, scope := range info.Scopes {
    			var kind string
    			switch node.(type) {
    			case *syntax.File:
    				kind = "file"
    			case *syntax.FuncType:
    				kind = "func"
    			case *syntax.BlockStmt:
    				kind = "block"
    			case *syntax.IfStmt:
    				kind = "if"
    			case *syntax.SwitchStmt:
    				kind = "switch"
    			case *syntax.SelectStmt:
    				kind = "select"
    			case *syntax.CaseClause:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 20:08:23 UTC 2024
    - 93.3K bytes
    - Viewed (0)
  6. src/go/types/api_test.go

    		for node, scope := range info.Scopes {
    			kind := "<unknown node kind>"
    			switch node.(type) {
    			case *ast.File:
    				kind = "file"
    			case *ast.FuncType:
    				kind = "func"
    			case *ast.BlockStmt:
    				kind = "block"
    			case *ast.IfStmt:
    				kind = "if"
    			case *ast.SwitchStmt:
    				kind = "switch"
    			case *ast.TypeSwitchStmt:
    				kind = "type switch"
    			case *ast.CaseClause:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 94.2K bytes
    - Viewed (0)
Back to top