Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CxxDemangler/Parsers/UnscopedName.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,19 @@ public static IParsingResultExtended Parse(ParsingContext context)
return new Std(name);
}

if (context.Parser.VerifyString("L"))
{
IParsingResultExtended name = UnqualifiedName.Parse(context);

if (name == null)
{
context.Rewind(rewind);
return null;
}

return name;
}

return UnqualifiedName.Parse(context);
}

Expand Down
8 changes: 8 additions & 0 deletions Tests/Parsing/UnscopedName.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,20 @@ public void UnscopedNameUnqualified()
new Parsers.SourceName.Identifier("hello"));
}

[TestMethod]
public void UnscopedNameFixedLength()
{
Verify("L10helloworld...",
new Parsers.SourceName.Identifier("helloworld"));
}

[TestMethod]
public void UnscopedNameFailures()
{
Assert.IsNull(Parse("St..."));
Assert.IsNull(Parse("..."));
Assert.IsNull(Parse(""));
Assert.IsNull(Parse("L..."));
}

internal override IParsingResult Parse(ParsingContext context)
Expand Down