27 lines
461 B
Go
27 lines
461 B
Go
|
package actions
|
||
|
|
||
|
import (
|
||
|
// "fmt"
|
||
|
engine "github.com/tgckpg/mmqlengine/mmql/engine"
|
||
|
stmtd "github.com/tgckpg/mmqlengine/mmql/statements"
|
||
|
)
|
||
|
|
||
|
/*
|
||
|
EXPECT: [NAME]
|
||
|
OR
|
||
|
EXPECT: [FUNCTION]( ...params )
|
||
|
*/
|
||
|
|
||
|
func ProductStatement( lexer *engine.Lexer ) ( istmt stmtd.IStatement, err error ) {
|
||
|
stmt := stmtd.ProductStatement{}
|
||
|
|
||
|
name, err := lexer.ReadAlpha()
|
||
|
if err != nil {
|
||
|
return
|
||
|
}
|
||
|
stmt.Name = name
|
||
|
|
||
|
istmt = stmt
|
||
|
return
|
||
|
}
|