Skip to content

Commit

Permalink
Fixed tests affected by the method changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
BenediktMagnus committed Dec 22, 2023
1 parent 44a0605 commit 2b5d6af
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
7 changes: 4 additions & 3 deletions tests/utility/semanticCreator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export abstract class SemanticCreator
qualifiedName = prefix + ':' + pathName;
}

return new SemanticSymbols.Module(name, pathName, qualifiedName, new Map(), isEntryPoint);
return new SemanticSymbols.Module(name, pathName, qualifiedName, null, new Map(), isEntryPoint);
}

public static newFunctionDeclaration (
Expand All @@ -66,9 +66,10 @@ export abstract class SemanticCreator
returnType = BuildInTypes.noType,
name = Defaults.identifier,
isExternal = false,
isMethod = false, // TODO: Swap with isExternal.
): SemanticSymbols.Function
{
return new SemanticSymbols.Function(name, returnType, parameters, isExternal);
return new SemanticSymbols.Function(name, returnType, parameters, isMethod, isExternal);
}

public static newFunctionParameter (type = BuildInTypes.int, name = Defaults.variableName): SemanticSymbols.FunctionParameter
Expand All @@ -82,7 +83,7 @@ export abstract class SemanticCreator
ownerModule = SemanticCreator.newModule()
): SemanticNodes.CallExpression
{
return new SemanticNodes.CallExpression(symbol, ownerModule, callArguments);
return new SemanticNodes.CallExpression(symbol, ownerModule, callArguments, null);
}

public static newVariableDeclaration (
Expand Down
6 changes: 5 additions & 1 deletion tests/utility/syntaxCreator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@ export abstract class SyntaxCreator

public static newModule (
namespace = SyntaxCreator.newNamespace(),
isClass = false
): SyntaxNodes.Module
{
return new SyntaxNodes.Module(
TokenCreator.newModuleKeyword(),
namespace
namespace,
isClass
);
}

Expand All @@ -42,6 +44,7 @@ export abstract class SyntaxCreator
type: SyntaxNodes.TypeClause|null = null,
identifier = TokenCreator.newIdentifier(),
isExternal = false,
isMethod = false // TODO: Swap with isExternal.
): SyntaxNodes.FunctionDeclaration
{
return new SyntaxNodes.FunctionDeclaration(
Expand All @@ -52,6 +55,7 @@ export abstract class SyntaxCreator
TokenCreator.newClosingRoundBrackets(),
type,
section,
isMethod,
isExternal
);
}
Expand Down

0 comments on commit 2b5d6af

Please sign in to comment.