...
This commit is contained in:
@@ -117,7 +117,7 @@ public class Parser
|
||||
}
|
||||
|
||||
var body = ParseBlock();
|
||||
var isGlobal = modifiers.RemoveAll(x => x.Modifier == Modifier.Global) > 0;
|
||||
var exported = modifiers.RemoveAll(x => x.Modifier == Modifier.Export) > 0;
|
||||
|
||||
if (modifiers.Count != 0)
|
||||
{
|
||||
@@ -128,7 +128,7 @@ public class Parser
|
||||
.Build());
|
||||
}
|
||||
|
||||
return new LocalFuncDefinitionNode(GetTokensForNode(startIndex), documentation, name.Value, parameters, body, returnType, isGlobal);
|
||||
return new LocalFuncDefinitionNode(GetTokensForNode(startIndex), documentation, name.Value, parameters, body, returnType, exported);
|
||||
}
|
||||
|
||||
private StructDefinitionNode ParseStruct(int startIndex, List<ModifierToken> _, Optional<string> documentation)
|
||||
@@ -414,6 +414,7 @@ public class Parser
|
||||
{
|
||||
case SymbolToken { Symbol: Symbol.DoubleColon }:
|
||||
{
|
||||
Next();
|
||||
var name = ExpectIdentifier();
|
||||
ExpectSymbol(Symbol.OpenParen);
|
||||
var parameters = new List<ExpressionNode>();
|
||||
@@ -435,6 +436,7 @@ public class Parser
|
||||
}
|
||||
case SymbolToken { Symbol: Symbol.OpenParen }:
|
||||
{
|
||||
Next();
|
||||
var parameters = new List<ExpressionNode>();
|
||||
while (!TryExpectSymbol(Symbol.CloseParen))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user