Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for isExprSwitch (0.11 sec)

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

    		p.expect(token.DEFAULT)
    	}
    
    	colon := p.expect(token.COLON)
    	p.openScope()
    	body := p.parseStmtList()
    	p.closeScope()
    
    	return &ast.CaseClause{pos, list, colon, body}
    }
    
    func isExprSwitch(s ast.Stmt) bool {
    	if s == nil {
    		return true
    	}
    	if e, ok := s.(*ast.ExprStmt); ok {
    		if a, ok := e.X.(*ast.TypeAssertExpr); ok {
    			return a.Type != nil // regular type assertion
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 20 20:19:51 UTC 2023
    - 50.5K bytes
    - Viewed (0)
Back to top