feat: tokenizer accepts braces, line terminator, and equal sign
This commit is contained in:
@@ -20,9 +20,15 @@ type Atom struct {
|
||||
Name string
|
||||
}
|
||||
|
||||
type Clause struct {
|
||||
Statements []Statement
|
||||
Returns Expression
|
||||
}
|
||||
|
||||
func (Abstraction) IsExpression() {}
|
||||
func (Application) IsExpression() {}
|
||||
func (Atom) IsExpression() {}
|
||||
func (Clause) IsExpression() {}
|
||||
|
||||
/** ------------------------------------------------------------------------- */
|
||||
|
||||
@@ -37,3 +43,7 @@ func NewApplication(abstraction Expression, arguments []Expression) *Application
|
||||
func NewAtom(name string) *Atom {
|
||||
return &Atom{Name: name}
|
||||
}
|
||||
|
||||
func NewClause(statements []Statement, returns Expression) *Clause {
|
||||
return &Clause{Statements: statements, Returns: returns}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user