Skip to content

Commit dfc8bbe

Browse files
authored
1.9.2 - just fix
1 parent 1a05484 commit dfc8bbe

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

SourceCode/Parser/Parser.cs

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using OwnLang.ast.lib;
1+
using OwnLang.ast.lib;
22
using System;
33
using System.Collections.Generic;
44
using System.Linq;
@@ -188,7 +188,8 @@ private Statement enums()
188188
match(TokenType.COMMA);
189189
enums.Add(en, new StringValue(en));
190190
}
191-
Variables.set(name, new EnumValue(enums));
191+
//Variables.set(name, new EnumValue(enums));
192+
//return new NanStatement();
192193
return new AssignmentStatement(name, new ValueExpression(new EnumValue(enums)));
193194
}
194195

@@ -763,7 +764,7 @@ private Expression primary()
763764
{
764765
return ldef();
765766
}
766-
if(lookMatch(0, TokenType.WORD) && lookMatch(1, TokenType.DDOT))
767+
if(lookMatch(0, TokenType.WORD) && lookMatch(1, TokenType.DDOT))
767768
{
768769
return ddot();
769770
}
@@ -893,10 +894,15 @@ private LambdaExpression lambda()
893894

894895
private DdotExpression ddot()
895896
{
896-
string name = consume(TokenType.WORD).getText();
897+
//new ValueExpression();
898+
899+
string value = consume(TokenType.WORD).getText();
897900
consume(TokenType.DDOT);
898-
StringValue value = new StringValue(consume(TokenType.WORD).getText());
899-
DdotExpression ddot = new DdotExpression(name, value);
901+
//string name = consume(TokenType.WORD).getText();
902+
//StringValue name = new StringValue(consume(TokenType.WORD).getText());string value = consume(TokenType.WORD).getText();
903+
string name = consume(TokenType.WORD).getText();
904+
905+
DdotExpression ddot = new DdotExpression(value, name);
900906
return ddot;
901907
}
902908

@@ -931,6 +937,7 @@ private FunctionalExpression function()
931937
}
932938
return efunction;
933939
}
940+
934941
consume(TokenType.LPAREN);
935942
FunctionalExpression function = new FunctionalExpression(name);
936943
while (!match(TokenType.RPAREN))

0 commit comments

Comments
 (0)