Skip to content

Commit

Permalink
[dndxc] Add option when dump ast. (microsoft#5266)
Browse files Browse the repository at this point in the history
* [dndxc] Add option when dump ast.

This will allow dump ast to add option like -HV 2021.
  • Loading branch information
python3kgae authored Jun 2, 2023
1 parent 451cd8b commit 58d3053
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tools/clang/tools/dotnetc/EditorForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,12 @@ private void CompileDocument()
{
try
{
var result = compiler.Compile(source, fileName, fileVars.Entry, fileVars.Target, new string[] { "-ast-dump" }, 1, null, 0, library.CreateIncludeHandler());
List<string> args = new List<string>();
args.Add("-ast-dump");
args.AddRange(tbOptions.Text.Split());
var result = compiler.Compile(source, fileName, fileVars.Entry,
fileVars.Target, args.ToArray(), args.Count,
null, 0, library.CreateIncludeHandler());
if (result.GetStatus() == 0)
{
this.ASTDumpBox.Text = GetStringFromBlob(result.GetResult());
Expand Down

0 comments on commit 58d3053

Please sign in to comment.