Skip to content

Commit

Permalink
fix duplicated lexer initialization errors v3.2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
b3b00 committed Jul 17, 2024
1 parent 9090473 commit 8911805
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/sly/parser/generator/ExpressionRulesGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ private string GetOperandNonTerminal(Type parserClass, ParserConfiguration<IN,OU
if (!operandMethods.Any<MethodInfo>())
{
result.AddError(new ParserInitializationError(ErrorLevel.FATAL, I18N.Instance.GetText(I18n,I18NMessage.MissingOperand),ErrorCodes.PARSER_MISSING_OPERAND));
return null;
}

string operandNonTerminalName = null;
Expand Down
6 changes: 1 addition & 5 deletions src/sly/parser/parser/Parser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,7 @@ public virtual BuildResult<ParserConfiguration<IN, OUT>> BuildExpressionParser(
Configuration.StartingRule = startingRule;
SyntaxParser.StartingNonTerminal = startingRule;
}

if (exprResult.IsError)
result.AddErrors(exprResult.Errors);
else
result.Result.Configuration = Configuration;

return exprResult;
}

Expand Down
4 changes: 2 additions & 2 deletions src/sly/sly.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
<Description>#LY is a parser generator halfway between parser combinators and parser generator like ANTLR</Description>
<Authors>b3b00</Authors>
<version>3.2.6</version>
<version>3.2.7</version>
<PackageProjectUrl>https://github.com/b3b00/sly</PackageProjectUrl>
<RepositoryUrl>https://github.com/b3b00/sly</RepositoryUrl>
<PackageVersion>3.2.6</PackageVersion>
<PackageVersion>3.2.7</PackageVersion>
<ApplicationIcon/>
<OutputType>Library</OutputType>
<StartupObject/>
Expand Down

0 comments on commit 8911805

Please sign in to comment.