Replace Godeps with dep

This commit is contained in:
Leonel Quinteros
2017-09-01 17:05:40 -03:00
parent 4b94e83723
commit 1e28907f7a
13 changed files with 659 additions and 289 deletions

View File

@@ -11,12 +11,14 @@ import (
%type<stmts> stmts
%type<stmt> stmt
%type<expr> expr
%type<exprs> exprs
%union{
compstmt []ast.Stmt
stmts []ast.Stmt
stmt ast.Stmt
expr ast.Expr
exprs []ast.Expr
tok ast.Token
term ast.Token
terms ast.Token
@@ -169,6 +171,23 @@ expr :
{
$$ = &ast.BinOpExpr{Lhs: $1, Operator: "&&", Rhs: $3}
}
| IDENT '(' exprs ')'
{
$$ = &ast.CallExpr{Name: $1.Lit, SubExprs: $3}
}
exprs :
{
$$ = nil
}
| expr
{
$$ = []ast.Expr{$1}
}
| exprs ',' expr
{
$$ = append($1, $3)
}
opt_terms : /* none */
| terms