Skip to content

Commit

Permalink
Added Parameter Key and Removed win-arm
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidBakerEffendi committed Feb 28, 2024
1 parent 70c4c2e commit 1c23862
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 10 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,12 @@ jobs:
./publish-release.sh linux arm
./publish-release.sh osx x64
./publish-release.sh win x64
./publish-release.sh win arm
- name: Rename
run: |
mv ./release/linux/DotNetAstGen dotnetastgen-linux
mv ./release/linux-arm/DotNetAstGen dotnetastgen-linux-arm
mv ./release/macos/DotNetAstGen dotnetastgen-macos
mv ./release/win/DotNetAstGen.exe dotnetastgen-win.exe
mv ./release/win-arm/DotNetAstGen.exe dotnetastgen-win-arm.exe
- name: Make executable
run: |
chmod +x dotnetastgen-linux
Expand All @@ -71,5 +69,4 @@ jobs:
dotnetastgen-linux
dotnetastgen-linux-arm
dotnetastgen-macos
dotnetastgen-win.exe
dotnetastgen-win-arm.exe
dotnetastgen-win.exe
4 changes: 2 additions & 2 deletions DotNetAstGen/SyntaxNodePropertiesResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ internal class SyntaxNodePropertiesResolver : DefaultContractResolver
"Value", "Usings", "Name", "Identifier", "Left", "Right", "Members", "ConstraintClauses",
"Alias", "NamespaceOrType", "Arguments", "Expression", "Declaration", "ElementType", "Initializer", "Else",
"Condition", "Statement", "Statements", "Variables", "WhenNotNull", "AllowsAnyExpression", "Expressions",
"Modifiers", "ReturnType", "IsUnboundGenericName", "Default", "IsConst", "Parameters", "Types",
"Modifiers", "ReturnType", "IsUnboundGenericName", "Default", "IsConst", "Types",
"ExplicitInterfaceSpecifier", "MetaData", "Kind", "AstRoot", "FileName", "Code", "Operand", "Block",
"Catches", "Finally", "Keyword", "Incrementors", "Sections", "Pattern", "Labels"
});

private readonly List<string> _regexToAllow = new(new[]
{
".*Token$", ".*Lists?$", ".*Body$", "(Line|Column)(Start|End)", ".*Type$",
".*Token$", ".*Lists?$", ".*Body$", "(Line|Column)(Start|End)", ".*Type$", "Parameters?",
});

private readonly List<string> _regexToIgnore = new(new[]
Expand Down
12 changes: 12 additions & 0 deletions Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
namespace Foo {

class ImplementationClass
{
// Explicit interface member implementation:
static void Main()
{
int[] numbers = { 2, 3, 4, 5 };
var squaredNumbers = numbers.Select(x => x * x);
}
}
}
18 changes: 14 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,23 @@ This script creates an Abstract Syntax Tree (AST) of all `.cs` files in JSON for
| ----------- | --------------------------- | ------------------------------- |
| .NET | Roslyn | WIP |

## Building
## Getting Started

* Use `dotnet run` to compile and run the project.
Use `dotnet run --project DotNetAstGen -i <target_source> -o <target_output>` to compile and run the
project. This will generate JSON AST files from the given source code.

## Testing
## Releasing

TODO
To build a single all-in-one executable, make use of `./publish-release.sh <os> <arch>`, e.g.

```Bash
./publish-release.sh linux x64
./publish-release.sh linux arm
./publish-release.sh osx x64
./publish-release.sh win x64
```

This will create an executable, e.g., `./release/linux/DotNetAstGen`.

## Getting Help

Expand Down

0 comments on commit 1c23862

Please sign in to comment.