small fixes
This commit is contained in:
@@ -72,7 +72,7 @@ public class SymbolTable
|
||||
|
||||
public Func LookupFunc(string @namespace, string name)
|
||||
{
|
||||
return _functions.Single(x => x.Name == name);
|
||||
return _functions.Single(x => x.Name == name && x.Namespace == @namespace);
|
||||
}
|
||||
|
||||
public Variable LookupVariable(string name)
|
||||
@@ -100,4 +100,10 @@ public class SymbolTable
|
||||
public string Namespace { get; } = @namespace;
|
||||
public string GeneratedName { get; } = generatedName;
|
||||
}
|
||||
|
||||
public class Struct(string @namespace, string name) : Symbol(name)
|
||||
{
|
||||
public string Namespace { get; } = @namespace;
|
||||
public string GeneratedName => $"{Namespace}_{Name}";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user