Skip to content

Commit

Permalink
Check
Browse files Browse the repository at this point in the history
- Added forward and reverse mapping for new `SymbolType.IMPORT `symbol
  • Loading branch information
deavmi committed Aug 27, 2023
1 parent 2cb02d3 commit 0fd9d8d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions source/tlang/compiler/symbols/check.d
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,11 @@ public enum SymbolType
*/
GENERIC_TYPE_DECLARE,

/**
* `import` keyword
*/
IMPORT,

/**
* Unknown symbol
*/
Expand Down Expand Up @@ -695,6 +700,11 @@ public SymbolType getSymbolType(Token tokenIn)
{
return SymbolType.GENERIC_TYPE_DECLARE;
}
/* import keyword */
else if(cmp(token, "import") == 0)
{
return SymbolType.IMPORT;
}
/* An identifier/type (of some sorts) - further inspection in parser is needed */
else if(isPathIdentifier(token) || isIdentifier(token))
{
Expand Down

0 comments on commit 0fd9d8d

Please sign in to comment.