Namespace change
This commit is contained in:
@@ -36,7 +36,7 @@ Install-Package IronGo
|
||||
### Basic Parsing
|
||||
|
||||
```csharp
|
||||
using IronGo;
|
||||
using MarketAlly.IronGo;
|
||||
|
||||
// Parse Go source code
|
||||
var source = @"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using IronGo;
|
||||
using IronGo.AST;
|
||||
using IronGo.Serialization;
|
||||
using IronGo.Utilities;
|
||||
using MarketAlly.IronGo;
|
||||
using MarketAlly.IronGo.AST;
|
||||
using MarketAlly.IronGo.Serialization;
|
||||
using MarketAlly.IronGo.Utilities;
|
||||
|
||||
// Example Go source code
|
||||
const string goSource = @"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using IronGo;
|
||||
using IronGo.AST;
|
||||
using IronGo.Serialization;
|
||||
using MarketAlly.IronGo;
|
||||
using MarketAlly.IronGo.AST;
|
||||
using MarketAlly.IronGo.Serialization;
|
||||
using System;
|
||||
|
||||
try
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using IronGo;
|
||||
using IronGo.AST;
|
||||
using IronGo.Utilities;
|
||||
using MarketAlly.IronGo;
|
||||
using MarketAlly.IronGo.AST;
|
||||
using MarketAlly.IronGo.Utilities;
|
||||
|
||||
namespace QuickStart;
|
||||
|
||||
@@ -96,7 +96,7 @@ func main() {
|
||||
// Export to JSON (compact)
|
||||
var json = System.Text.Json.JsonSerializer.Serialize(ast, new System.Text.Json.JsonSerializerOptions
|
||||
{
|
||||
Converters = { new IronGo.Serialization.AstJsonConverter() }
|
||||
Converters = { new MarketAlly.IronGo.Serialization.AstJsonConverter() }
|
||||
});
|
||||
Console.WriteLine($"JSON representation size: {json.Length:N0} characters");
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a comment in Go source code
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a const declaration block
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a function declaration
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents an import declaration
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a package declaration (e.g., "package main")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a type declaration (e.g., "type MyType int")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a variable declaration (var or const)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a binary expression
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a function call expression
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a composite literal (e.g., []int{1, 2, 3})
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a type conversion expression
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents an ellipsis expression (...)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a function literal (anonymous function)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents an identifier expression
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents an index expression (e.g., x[i])
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a keyed element in a composite literal (key: value)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a literal expression
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a parenthesized expression
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a selector expression (e.g., x.field)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a slice expression (e.g., x[low:high:max])
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a type assertion expression (e.g., x.(T))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a unary expression
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Base class for all Go AST nodes
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Base interface for all Go AST nodes
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Marker interface for all Go declarations
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Marker interface for all Go expressions
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Marker interface for all Go statements
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Marker interface for all Go types
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a complete Go source file
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents an assignment statement (=, :=, +=, etc.)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a block statement (e.g., { ... })
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a branch statement (break, continue, goto, fallthrough)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a declaration used as a statement
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a defer statement
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents an empty statement
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents an expression used as a statement
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a fallthrough statement in a switch case
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a for-range statement
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a for statement (traditional for loop)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a go statement (goroutine launch)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents an if statement
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents an increment or decrement statement (++ or --)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a labeled statement
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a range-based for statement
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a return statement
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a select statement
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a send statement (channel <- value)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a short variable declaration (x := expr)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a switch statement
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a type switch statement
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents an array type (e.g., "[10]int")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a channel type (e.g., "chan int", "<-chan int", "chan<- int")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a function type (e.g., "func(int, string) error")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a type referenced by identifier (e.g., "int", "string", "MyType")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents an interface type
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a map type (e.g., "map[string]int")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a pointer type (e.g., "*int")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a slice type (e.g., "[]int")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a struct type
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a type element in an interface (for type sets)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a generic type instantiation (e.g., List[int], Map[string, User])
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a union of types in constraints (e.g., int | string | float64)
|
||||
|
||||
@@ -3,9 +3,9 @@ using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using Antlr4.Runtime;
|
||||
using IronGo.AST;
|
||||
using MarketAlly.IronGo.AST;
|
||||
|
||||
namespace IronGo.Diagnostics;
|
||||
namespace MarketAlly.IronGo.Diagnostics;
|
||||
|
||||
/// <summary>
|
||||
/// Collects diagnostic information during parsing
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using IronGo.AST;
|
||||
using MarketAlly.IronGo.AST;
|
||||
|
||||
namespace IronGo.Diagnostics;
|
||||
namespace MarketAlly.IronGo.Diagnostics;
|
||||
|
||||
/// <summary>
|
||||
/// Represents diagnostic information about the parsed source
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<Antlr4 Include="Parser\*.g4">
|
||||
<Package>IronGo.Parser</Package>
|
||||
<Package>MarketAlly.IronGo.Parser</Package>
|
||||
</Antlr4>
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -2,12 +2,12 @@ using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using Antlr4.Runtime;
|
||||
using IronGo.AST;
|
||||
using IronGo.Parser;
|
||||
using IronGo.Performance;
|
||||
using IronGo.Diagnostics;
|
||||
using MarketAlly.IronGo.AST;
|
||||
using MarketAlly.IronGo.Parser;
|
||||
using MarketAlly.IronGo.Performance;
|
||||
using MarketAlly.IronGo.Diagnostics;
|
||||
|
||||
namespace IronGo;
|
||||
namespace MarketAlly.IronGo;
|
||||
|
||||
/// <summary>
|
||||
/// Main entry point for parsing Go source code
|
||||
|
||||
@@ -3,9 +3,9 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Antlr4.Runtime;
|
||||
using Antlr4.Runtime.Tree;
|
||||
using IronGo.AST;
|
||||
using MarketAlly.IronGo.AST;
|
||||
|
||||
namespace IronGo.Parser;
|
||||
namespace MarketAlly.IronGo.Parser;
|
||||
|
||||
/// <summary>
|
||||
/// Builds an IronGo AST from an ANTLR parse tree
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using Antlr4.Runtime;
|
||||
using Antlr4.Runtime.Misc;
|
||||
|
||||
namespace IronGo.Parser;
|
||||
namespace MarketAlly.IronGo.Parser;
|
||||
|
||||
public abstract class GoParserBase : Antlr4.Runtime.Parser
|
||||
{
|
||||
|
||||
@@ -3,9 +3,9 @@ using System.Collections.Concurrent;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using IronGo.AST;
|
||||
using MarketAlly.IronGo.AST;
|
||||
|
||||
namespace IronGo.Performance;
|
||||
namespace MarketAlly.IronGo.Performance;
|
||||
|
||||
/// <summary>
|
||||
/// Caches parsed AST results to improve performance for repeated parsing
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using System;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using IronGo.AST;
|
||||
using MarketAlly.IronGo.AST;
|
||||
|
||||
namespace IronGo.Serialization;
|
||||
namespace MarketAlly.IronGo.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Custom JSON converter for Go AST nodes
|
||||
|
||||
@@ -2,9 +2,9 @@ using System.IO;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
using IronGo.AST;
|
||||
using MarketAlly.IronGo.AST;
|
||||
|
||||
namespace IronGo.Serialization;
|
||||
namespace MarketAlly.IronGo.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Extension methods for JSON serialization of AST nodes
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using IronGo.AST;
|
||||
using MarketAlly.IronGo.AST;
|
||||
|
||||
namespace IronGo.Utilities;
|
||||
namespace MarketAlly.IronGo.Utilities;
|
||||
|
||||
/// <summary>
|
||||
/// Provides deep cloning functionality for AST nodes
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using IronGo.AST;
|
||||
using MarketAlly.IronGo.AST;
|
||||
|
||||
namespace IronGo.Utilities;
|
||||
namespace MarketAlly.IronGo.Utilities;
|
||||
|
||||
/// <summary>
|
||||
/// Utility methods for working with Go AST
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using IronGo.AST;
|
||||
using MarketAlly.IronGo.AST;
|
||||
|
||||
namespace IronGo.Utilities;
|
||||
namespace MarketAlly.IronGo.Utilities;
|
||||
|
||||
/// <summary>
|
||||
/// Base class that provides a universal node checking mechanism for all visitor methods
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Base implementation of visitor pattern that does nothing by default
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// A visitor that walks the entire AST tree, visiting all nodes
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace IronGo.AST;
|
||||
namespace MarketAlly.IronGo.AST;
|
||||
|
||||
/// <summary>
|
||||
/// Visitor interface for traversing Go AST nodes without returning a value
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using IronGo;
|
||||
using IronGo.AST;
|
||||
using IronGo.Serialization;
|
||||
using IronGo.Utilities;
|
||||
using MarketAlly.IronGo;
|
||||
using MarketAlly.IronGo.AST;
|
||||
using MarketAlly.IronGo.Serialization;
|
||||
using MarketAlly.IronGo.Utilities;
|
||||
using System.Text.Json;
|
||||
|
||||
const string goCode = @"
|
||||
@@ -88,7 +88,7 @@ try
|
||||
Console.WriteLine($" Second parse: {secondTime:F2}ms (cache hit)");
|
||||
Console.WriteLine($" Speedup: {firstTime/secondTime:F1}x");
|
||||
|
||||
var cacheStats = IronGo.Performance.ParserCache.Default.GetStatistics();
|
||||
var cacheStats = MarketAlly.IronGo.Performance.ParserCache.Default.GetStatistics();
|
||||
Console.WriteLine($" Cache entries: {cacheStats.EntryCount}");
|
||||
Console.WriteLine($" Cache hit rate: {cacheStats.HitRate:F2}");
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
using FluentAssertions;
|
||||
using IronGo;
|
||||
using IronGo.AST;
|
||||
using IronGo.Diagnostics;
|
||||
using MarketAlly.IronGo;
|
||||
using MarketAlly.IronGo.AST;
|
||||
using MarketAlly.IronGo.Diagnostics;
|
||||
using Xunit;
|
||||
|
||||
namespace IronGo.Tests.DiagnosticsTests;
|
||||
namespace MarketAlly.IronGo.Tests.DiagnosticsTests;
|
||||
|
||||
public class DiagnosticsTests
|
||||
{
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
using FluentAssertions;
|
||||
using IronGo;
|
||||
using IronGo.AST;
|
||||
using IronGo.Serialization;
|
||||
using IronGo.Utilities;
|
||||
using MarketAlly.IronGo;
|
||||
using MarketAlly.IronGo.AST;
|
||||
using MarketAlly.IronGo.Serialization;
|
||||
using MarketAlly.IronGo.Utilities;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using Xunit;
|
||||
|
||||
namespace IronGo.Tests.IntegrationTests;
|
||||
namespace MarketAlly.IronGo.Tests.IntegrationTests;
|
||||
|
||||
public class RealGoCodeTests
|
||||
{
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using FluentAssertions;
|
||||
using IronGo;
|
||||
using IronGo.AST;
|
||||
using MarketAlly.IronGo;
|
||||
using MarketAlly.IronGo.AST;
|
||||
using Xunit;
|
||||
|
||||
namespace IronGo.Tests.ParserTests;
|
||||
namespace MarketAlly.IronGo.Tests.ParserTests;
|
||||
|
||||
public class BasicParsingTests
|
||||
{
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using FluentAssertions;
|
||||
using IronGo;
|
||||
using IronGo.AST;
|
||||
using MarketAlly.IronGo;
|
||||
using MarketAlly.IronGo.AST;
|
||||
using Xunit;
|
||||
|
||||
namespace IronGo.Tests.ParserTests;
|
||||
namespace MarketAlly.IronGo.Tests.ParserTests;
|
||||
|
||||
public class ExpressionParsingTests
|
||||
{
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using FluentAssertions;
|
||||
using IronGo;
|
||||
using IronGo.AST;
|
||||
using MarketAlly.IronGo;
|
||||
using MarketAlly.IronGo.AST;
|
||||
using Xunit;
|
||||
|
||||
namespace IronGo.Tests.ParserTests;
|
||||
namespace MarketAlly.IronGo.Tests.ParserTests;
|
||||
|
||||
public class StatementParsingTests
|
||||
{
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using FluentAssertions;
|
||||
using IronGo;
|
||||
using IronGo.AST;
|
||||
using MarketAlly.IronGo;
|
||||
using MarketAlly.IronGo.AST;
|
||||
using Xunit;
|
||||
|
||||
namespace IronGo.Tests.ParserTests;
|
||||
namespace MarketAlly.IronGo.Tests.ParserTests;
|
||||
|
||||
public class TypeParsingTests
|
||||
{
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
using FluentAssertions;
|
||||
using IronGo;
|
||||
using IronGo.Performance;
|
||||
using MarketAlly.IronGo;
|
||||
using MarketAlly.IronGo.Performance;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Threading.Tasks;
|
||||
using Xunit;
|
||||
|
||||
namespace IronGo.Tests.PerformanceTests;
|
||||
namespace MarketAlly.IronGo.Tests.PerformanceTests;
|
||||
|
||||
public class CachingTests
|
||||
{
|
||||
@@ -116,8 +116,8 @@ func concurrent() {
|
||||
ast1.Should().NotBeSameAs(ast2);
|
||||
ast1.Should().BeSameAs(ast1Again);
|
||||
|
||||
ast1.Declarations[0].As<IronGo.AST.FunctionDeclaration>().Name.Should().Be("one");
|
||||
ast2.Declarations[0].As<IronGo.AST.FunctionDeclaration>().Name.Should().Be("two");
|
||||
ast1.Declarations[0].As<MarketAlly.IronGo.AST.FunctionDeclaration>().Name.Should().Be("one");
|
||||
ast2.Declarations[0].As<MarketAlly.IronGo.AST.FunctionDeclaration>().Name.Should().Be("two");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
using FluentAssertions;
|
||||
using IronGo;
|
||||
using IronGo.AST;
|
||||
using IronGo.Serialization;
|
||||
using MarketAlly.IronGo;
|
||||
using MarketAlly.IronGo.AST;
|
||||
using MarketAlly.IronGo.Serialization;
|
||||
using System.Text.Json;
|
||||
using Xunit;
|
||||
|
||||
namespace IronGo.Tests.SerializationTests;
|
||||
namespace MarketAlly.IronGo.Tests.SerializationTests;
|
||||
|
||||
public class JsonSerializationTests
|
||||
{
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
using FluentAssertions;
|
||||
using IronGo;
|
||||
using IronGo.AST;
|
||||
using IronGo.Utilities;
|
||||
using MarketAlly.IronGo;
|
||||
using MarketAlly.IronGo.AST;
|
||||
using MarketAlly.IronGo.Utilities;
|
||||
using System.Linq;
|
||||
using Xunit;
|
||||
|
||||
namespace IronGo.Tests.UtilityTests;
|
||||
namespace MarketAlly.IronGo.Tests.UtilityTests;
|
||||
|
||||
public class AstUtilityTests
|
||||
{
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
using FluentAssertions;
|
||||
using IronGo;
|
||||
using IronGo.AST;
|
||||
using MarketAlly.IronGo;
|
||||
using MarketAlly.IronGo.AST;
|
||||
using System.Collections.Generic;
|
||||
using Xunit;
|
||||
|
||||
namespace IronGo.Tests.VisitorTests;
|
||||
namespace MarketAlly.IronGo.Tests.VisitorTests;
|
||||
|
||||
public class AstVisitorTests
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user