antlr4cs icon indicating copy to clipboard operation
antlr4cs copied to clipboard

[CS1658,CS1584] Wrong XML comments

Open viceice opened this issue 4 years ago • 4 comments

Hi, I'm seeing wrongly generated XML comments:

generated:

/// <summary>
/// Exit a parse tree produced by <see cref="EvalScriptParser.break"/>.
/// </summary>
/// <param name="context">The parse tree.</param>
void ExitBreak([NotNull] EvalScriptParser.BreakContext context);

expected:

/// <summary>
/// Exit a parse tree produced by <see cref="EvalScriptParser.@break"/>.
/// </summary>
/// <param name="context">The parse tree.</param>
void ExitBreak([NotNull] EvalScriptParser.BreakContext context);

So the special words need to be escaped by @

viceice avatar Nov 11 '21 10:11 viceice

https://github.com/tunnelvisionlabs/antlr4cs/blob/bc7fb74f3cf64f656cf2c9c1e05d71386e580a41/tool/resources/org/antlr/v4/tool/templates/codegen/CSharp/CSharp.stg#L56

It seems lname must be passed to csIdentifier helper function?

like here: https://github.com/tunnelvisionlabs/antlr4cs/blob/bc7fb74f3cf64f656cf2c9c1e05d71386e580a41/tool/resources/org/antlr/v4/tool/templates/codegen/CSharp/CSharp.stg#L37

viceice avatar Nov 11 '21 11:11 viceice

Those warnings can't easily suppressed 😕

  • https://github.com/dotnet/roslyn/issues/32672

viceice avatar Nov 11 '21 11:11 viceice

Since this is an upstream issue, you should report to https://github.com/antlr/antlr4/issues

Read #381 and see why you might migrate away to newer NuGet packages.

lextm avatar Sep 09 '23 23:09 lextm

I already migrated. 😉

viceice avatar Sep 10 '23 09:09 viceice