-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use debugger non user code attribute #350
base: master
Are you sure you want to change the base?
Use debugger non user code attribute #350
Conversation
…classes to dictate whether to include the DebuggerNonUserCode attribute in generated code. Add this to the build task and associated classes and to the documentation.
PS reason for the new PR is that I screwed up my fork with a bunch of merge commits that aren't relevant |
@@ -149,7 +150,8 @@ | |||
GenerateVisitor="%(Antlr4.Visitor)" | |||
ForceAtn="%(Antlr4.ForceAtn)" | |||
AbstractGrammar="%(Antlr4.Abstract)" | |||
UseCSharpGenerator="$(Antlr4UseCSharpGenerator)"> | |||
UseCSharpGenerator="$(Antlr4UseCSharpGenerator)" | |||
IncludeDebuggerNonUserCodeAttribute="$(IncludeDebuggerNonUserCodeAttribute)"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IncludeDebuggerNonUserCodeAttribute="$(IncludeDebuggerNonUserCodeAttribute)"> | |
IncludeDebuggerNonUserCodeAttribute="%(Antlr4.IncludeDebuggerNonUserCodeAttribute)"> |
if (UseCSharpGenerator) | ||
{ | ||
if (IncludeDebuggerNonUserCodeAttribute) | ||
arguments.Add("-DincludeDebuggerNonUserCodeAttribute"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
arguments.Add("-DincludeDebuggerNonUserCodeAttribute"); | |
arguments.Add("-DincludeDebuggerNonUserCodeAttribute=true"); |
@@ -149,7 +149,7 @@ The following table describes the properties available for customizing the code | |||
| `ForceAtn` | Force ATN | `True` or `False` | When `True`, the generated parser will use `AdaptivePredict` for all decisions, including LL(1) decisions. | | |||
| `Listener` | Generate Listener | `True` or `False` | When `True`, a parse tree listener interface and base class will be generated for the parLitser. | | |||
| `Visitor` | Generate Visitor | `True` or `False` | When `True`, a parse tree visitor interface and base class will be generated for the parser. | | |||
|
|||
| `IncludeDebuggerNonUserCodeAttribute` | `Include DebuggerNonUserCode attribute` | `True` or `False` | When `True`, each method will have the DebuggerNonUserCode attribute attribute added. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| `IncludeDebuggerNonUserCodeAttribute` | `Include DebuggerNonUserCode attribute` | `True` or `False` | When `True`, each method will have the DebuggerNonUserCode attribute attribute added. | | |
| `IncludeDebuggerNonUserCodeAttribute` | Include `DebuggerNonUserCode` attribute | `True` or `False` | When `True`, each method will have the DebuggerNonUserCode attribute attribute added. | |
Introduce new property that can be used in the OutputFile derived classes to dictate whether to include the DebuggerNonUserCode attribute in generated code.
Added this to the build task and associated classes and to the documentation.
I've not implemented it in the same way as abstract was implemented it as it would have meant introducing multiple properties (in Lexer and Parser) to do the same thing. Obviously happy to change this if that is the preferred option.
Closes #106