Skip to content

Commit

Permalink
feat(csharp): add support for conditional compilation
Browse files Browse the repository at this point in the history
Add support for conditional compilation in the CSharpAstListenerTest class. This allows for different code blocks to be compiled based on the DEBUG flag.
  • Loading branch information
phodal committed Feb 1, 2024
1 parent 0975824 commit 262dd0e
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -342,15 +342,14 @@ namespace Chapi {
val code = """
using System.Text;
namespace testns {
public class testcls {
#if DEBUG
public class testcls {
public static void Main(string []args) {
#if DEBUG
int x = 2;
#else
int y = 10;
#endif
}
}
#endif
}"""
val codeContainer = CSharpAnalyser().analysis(code, "test.cs")
val structs = codeContainer.Containers[0].DataStructures
Expand Down

0 comments on commit 262dd0e

Please # to comment.