Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for SendStmt (0.09 sec)

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

    	if p.tok == token.CASE {
    		p.next()
    		lhs := p.parseLhsList()
    		if p.tok == token.ARROW {
    			// SendStmt
    			if len(lhs) > 1 {
    				p.errorExpected(lhs[0].Pos(), "1 expression")
    				// continue with first expression
    			}
    			arrow := p.pos
    			p.next()
    			rhs := p.parseRhs()
    			comm = &ast.SendStmt{lhs[0], arrow, rhs}
    		} else {
    			// RecvStmt
    			pos := p.pos
    			tok := p.tok
    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/go/parser/parser.go

    	if p.tok == token.CASE {
    		p.next()
    		lhs := p.parseList(false)
    		if p.tok == token.ARROW {
    			// SendStmt
    			if len(lhs) > 1 {
    				p.errorExpected(lhs[0].Pos(), "1 expression")
    				// continue with first expression
    			}
    			arrow := p.pos
    			p.next()
    			rhs := p.parseRhs()
    			comm = &ast.SendStmt{Chan: lhs[0], Arrow: arrow, Value: rhs}
    		} else {
    			// RecvStmt
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Dec 08 20:07:50 UTC 2023
    - 72.2K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/syntax/parser.go

    	b := new(BadExpr)
    	b.pos = p.pos()
    	return b
    }
    
    // ----------------------------------------------------------------------------
    // Statements
    
    // SimpleStmt = EmptyStmt | ExpressionStmt | SendStmt | IncDecStmt | Assignment | ShortVarDecl .
    func (p *parser) simpleStmt(lhs Expr, keyword token) SimpleStmt {
    	if trace {
    		defer p.trace("simpleStmt")()
    	}
    
    	if keyword == _For && p.tok == _Range {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 62.9K bytes
    - Viewed (0)
  4. src/go/printer/nodes.go

    			}
    		} else {
    			p.linebreak(p.lineFor(s.Stmt.Pos()), 1, ignore, true)
    		}
    		p.stmt(s.Stmt, nextIsRBrace)
    
    	case *ast.ExprStmt:
    		const depth = 1
    		p.expr0(s.X, depth)
    
    	case *ast.SendStmt:
    		const depth = 1
    		p.expr0(s.Chan, depth)
    		p.print(blank)
    		p.setPos(s.Arrow)
    		p.print(token.ARROW, blank)
    		p.expr0(s.Value, depth)
    
    	case *ast.IncDecStmt:
    		const depth = 1
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 17 18:53:17 UTC 2023
    - 52.6K bytes
    - Viewed (0)
Back to top