Skip to content

Commit

Permalink
Make EmptyLinkWithEmptySelfReferenceTest pass
Browse files Browse the repository at this point in the history
  • Loading branch information
Konard committed Jan 6, 2025
1 parent d597795 commit f11459a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions csharp/Platform.Protocols.Lino.Tests/ParserTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,11 @@ public static void EmptyLinkWithParenthesesTest()
Assert.Equal(target, formattedLinks);
}

[Fact(Skip = "Not implemented yet")]
[Fact]
public static void EmptyLinkWithEmptySelfReferenceTest()
{
var source = @"(:)";
var target = @"(:)";
var target = @"()";
var parser = new Parser();
var links = parser.Parse(source);
var formattedLinks = links.Format();
Expand Down
4 changes: 2 additions & 2 deletions csharp/Platform.Protocols.Lino/Parser.peg
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ multiLineValueAndWhitespace <Link<string>> = value:referenceOrLink _ { value }
multiLineValues <IList<Link<string>>> = _ list:multiLineValueAndWhitespace* { list }
singleLineValueAndWhitespace <Link<string>> = __ value:referenceOrLink { value }
singleLineValues <IList<Link<string>>> = list:singleLineValueAndWhitespace+ { list }
singleLineLink <Link<string>> = __ id:(reference) __ ":" v:singleLineValues { new Link<string>(id, v) }
multiLineLink <Link<string>> = "(" _ id:(reference) _ ":" v:multiLineValues _ ")" { new Link<string>(id, v) }
singleLineLink <Link<string>> = __ id:(reference) __ ":" v:singleLineValues { new Link<string>(id, v) } / __ ":" v:singleLineValues { new Link<string>(null, v) }
multiLineLink <Link<string>> = "(" _ id:(reference) _ ":" v:multiLineValues _ ")" { new Link<string>(id, v) } / "(" _ ":" v:multiLineValues _ ")" { new Link<string>(null, v) }
singleLineValueLink <Link<string>> = v:singleLineValues { new Link<string>(v) }
multiLineValueLink <Link<string>> = "(" v:multiLineValues _ ")" { new Link<string>(v) }
pointLink <Link<string>> = id:(reference) { new Link<string>(id) }
Expand Down

0 comments on commit f11459a

Please sign in to comment.