Skip to content

Commit

Permalink
fix(compiler): type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
minenwerfer committed Jan 20, 2025
1 parent fcb7d42 commit 0a8ed68
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/compiler/src/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ export const parse = (tokens: (Token | undefined)[]) => {
}): AST.PropertyNode => {
let property: AST.PropertyNode['property']
let nestedProperties: Record<string, AST.PropertyNode> | undefined
let modifierToken: Token<TokenType.Identifier> | undefined
let modifierToken: Token<typeof TokenType.Identifier> | undefined

if( match(TokenType.LeftSquareBracket) ) {
consume(TokenType.LeftSquareBracket)
Expand Down
2 changes: 2 additions & 0 deletions packages/compiler/src/token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ export const TokenType = {
MacroName: 'MACRO_NAME',
} as const

export type TokenType = typeof TokenType[keyof typeof TokenType]

export type TypeMap = {
[TokenType.Number]: number
[TokenType.Boolean]: boolean
Expand Down

0 comments on commit 0a8ed68

Please sign in to comment.