Skip to content
Snippets Groups Projects
Commit cf0f274a authored by Anton Sattarov's avatar Anton Sattarov
Browse files

fix

parent 546252cc
No related branches found
No related tags found
No related merge requests found
......@@ -107,6 +107,8 @@ func (c *compiler) compile(node ast.Node) interface{} {
return c.UnaryNode(n)
case *ast.BinaryNode:
return c.BinaryNode(n)
case *ast.ChainNode:
return c.ChainNode(n)
case *ast.SliceNode:
return c.SliceNode(n)
case *ast.CallNode:
......@@ -119,6 +121,8 @@ func (c *compiler) compile(node ast.Node) interface{} {
return c.PointerNode(n)
case *ast.ConditionalNode:
return c.ConditionalNode(n)
case *ast.VariableDeclaratorNode:
return c.VariableDeclaratorNode(n)
case *ast.ArrayNode:
return c.ArrayNode(n)
case *ast.MapNode:
......@@ -316,6 +320,10 @@ func (c *compiler) BinaryNode(node *ast.BinaryNode) interface{} {
}
}
func (c *compiler) ChainNode(node *ast.ChainNode) string {
panic(fmt.Sprintf("unsupported chain node"))
}
func (c *compiler) MemberNode(node *ast.MemberNode) string {
v := c.compile(node.Node)
if val, ok := v.(string); ok {
......@@ -600,6 +608,10 @@ func (c *compiler) ConditionalNode(node *ast.ConditionalNode) interface{} {
//c.patchJump(end)
}
func (c *compiler) VariableDeclaratorNode(node *ast.VariableDeclaratorNode) int {
panic("unsupported variable declarator node ")
}
func (c *compiler) ArrayNode(node *ast.ArrayNode) interface{} {
panic("unsupported array node")
//for _, node := range node.Nodes {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment