Skip to content

Commit

Permalink
fix #230 - version 2.6.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
b3b00 committed Apr 15, 2021
1 parent 84b0385 commit 0f3bc40
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions ParserTests/ExpressionGeneratorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ public void TestAssociativityFactor()
Assert.False(r.IsError);
Assert.Equal(1.0 / 2.0 / 3.0, r.Result);

r = Parser.Result.Parse("(1 / 2 / 3)", StartingRule);
Assert.False(r.IsError);
Assert.Equal(1.0 / 2.0 / 3.0, r.Result);


r = Parser.Result.Parse("1 / 2 / 3 / 4", StartingRule);
Assert.False(r.IsError);
Expand Down
3 changes: 2 additions & 1 deletion sly/parser/parser/SyntaxTreeCleaner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ private bool NeedAssociativityProcessing(ISyntaxNode<IN> tree)
}
else if (tree is SyntaxLeaf<IN> leaf)
need = false;
else if (tree is SyntaxNode<IN> node) need = node.IsExpressionNode;
else if (tree is SyntaxNode<IN> node) need = true;


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

0 comments on commit 0f3bc40

Please sign in to comment.