-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- All the classes in the SymbolTable.ts file have been split into separate files. - The main Symbol class has been renamed to `BaseSymbol` to avoid confusion and trouble with the Javascript `Symbol` class. - The package works now with Typescript 5.0 and above. - The tests have been organized into a separate sub project, which is no longer built with the main project. Instead tests files are transpiled on-the-fly (using `ts-jest`) when running the tests. These transpiled files are never written to disk. - Symbol creation functions (like `SymbolTable.addNewSymbolOfType`) now allow Typescript to check the given parameters for the class type. You will now have to provide the correct parameter list for the symbol type you want to create. This is a breaking change, because the old version allowed you to pass any parameter list to any symbol creation function.
- Loading branch information
1 parent
98730d2
commit b18cf7c
Showing
32 changed files
with
2,044 additions
and
1,648 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* This file is released under the MIT license. | ||
* Copyright (c) 2023, Mike Lischke | ||
* | ||
* See LICENSE file for more info. | ||
*/ | ||
|
||
import { Type, ReferenceKind, TypeKind } from "./types"; | ||
|
||
import { BaseSymbol } from "./BaseSymbol"; | ||
|
||
export class ArrayType extends BaseSymbol implements Type { | ||
|
||
public readonly elementType: Type; | ||
public readonly size: number; // > 0 if fixed length. | ||
|
||
private referenceKind: ReferenceKind; | ||
|
||
public constructor(name: string, referenceKind: ReferenceKind, elemType: Type, size = 0) { | ||
super(name); | ||
this.referenceKind = referenceKind; | ||
this.elementType = elemType; | ||
this.size = size; | ||
} | ||
|
||
public get baseTypes(): Type[] { return []; } | ||
public get kind(): TypeKind { return TypeKind.Array; } | ||
public get reference(): ReferenceKind { return this.referenceKind; } | ||
} |
Oops, something went wrong.