Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

garyhuntddn
Copy link

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

…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.
@garyhuntddn
Copy link
Author

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)">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
IncludeDebuggerNonUserCodeAttribute="$(IncludeDebuggerNonUserCodeAttribute)">
IncludeDebuggerNonUserCodeAttribute="%(Antlr4.IncludeDebuggerNonUserCodeAttribute)">

if (UseCSharpGenerator)
{
if (IncludeDebuggerNonUserCodeAttribute)
arguments.Add("-DincludeDebuggerNonUserCodeAttribute");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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. |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| `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. |

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add DebuggerNonUserCode to generated classes
2 participants