A bunch more stuffs
This commit is contained in:
@@ -17,6 +17,9 @@ namespace Solstice {
|
||||
{TT::Comparison_NotEqual, NodeType::NotEqual},
|
||||
{TT::Comparison_GreaterThan, NodeType::GreaterThan},
|
||||
{TT::Comparison_LesserThan, NodeType::LesserThan},
|
||||
{TT::Assign_Type, NodeType::SetType},
|
||||
{TT::Assign_Set, NodeType::Set},
|
||||
{TT::Assign_Bind, NodeType::Bind},
|
||||
};
|
||||
|
||||
std::optional<Literal> Node::getLiteral() const {
|
||||
@@ -52,6 +55,8 @@ namespace Solstice {
|
||||
return "Bind";
|
||||
case NodeType::Set:
|
||||
return "Set";
|
||||
case NodeType::SetType:
|
||||
return "SetType";
|
||||
case NodeType::Lambda:
|
||||
return "Lambda";
|
||||
case NodeType::FunctionCall:
|
||||
@@ -383,6 +388,11 @@ namespace Solstice {
|
||||
case TT::Math_Multiply:
|
||||
case TT::Math_Divide:
|
||||
return Precedence::Multiply;
|
||||
case TT::Comparison_Equal:
|
||||
case TT::Comparison_NotEqual:
|
||||
case TT::Comparison_GreaterThan:
|
||||
case TT::Comparison_LesserThan:
|
||||
return Precedence::Compare;
|
||||
case TT::Assign_Bind:
|
||||
case TT::Assign_Set:
|
||||
case TT::Assign_Type:
|
||||
@@ -417,6 +427,13 @@ namespace Solstice {
|
||||
case TT::Math_Subtract:
|
||||
case TT::Math_Multiply:
|
||||
case TT::Math_Divide:
|
||||
case TT::Comparison_Equal:
|
||||
case TT::Comparison_NotEqual:
|
||||
case TT::Comparison_GreaterThan:
|
||||
case TT::Comparison_LesserThan:
|
||||
case TT::Assign_Set:
|
||||
case TT::Assign_Bind:
|
||||
case TT::Assign_Type:
|
||||
return parseExpr(next->type);
|
||||
case TT::OpenParen:
|
||||
return parseOpenParen();
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace Solstice {
|
||||
enum class NodeType {
|
||||
Root, Literal, Identifier, Expression, Tuple,
|
||||
CodeBlock,
|
||||
FunctionBind, Bind, Set,
|
||||
FunctionBind, Bind, Set, SetType,
|
||||
Lambda, FunctionCall,
|
||||
Add, Subtract, Multiply, Divide,
|
||||
Equal, NotEqual, GreaterThan, LesserThan
|
||||
|
||||
Reference in New Issue
Block a user