Skip to content

Commit

Permalink
feat(compiler): wip (lint fix)
Browse files Browse the repository at this point in the history
  • Loading branch information
minenwerfer committed Jan 15, 2025
1 parent d9dbbd8 commit 09c2f74
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/compiler/src/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export const parse = (tokens: (Token | undefined)[]) => {

const recover = (keywords: readonly lexer.Keyword[]) => {
let token: Token | undefined
while ( token = tokens[++index] as Token | undefined ) {
while ( token = tokens[++index] ) {
if( token.type === TokenType.Keyword && keywords.includes(token.value as lexer.Keyword) ) {
break
}
Expand Down Expand Up @@ -479,7 +479,7 @@ export const parse = (tokens: (Token | undefined)[]) => {
} catch( err ) {
if( err instanceof Diagnostic ) {
errors.push(err)
recoverLoop: while( true ) {
recoverLoop: for( ;; ) {
switch( current().type ) {
case TokenType.RightBracket:
case TokenType.Identifier: {
Expand Down Expand Up @@ -560,7 +560,7 @@ export const parse = (tokens: (Token | undefined)[]) => {
consume(TokenType.LeftBracket)

while( !match(TokenType.RightBracket) ) {
const { value: keyword, location } = consume(TokenType.Keyword, lexer.COLLECTION_KEYWORDS)
const { value: keyword } = consume(TokenType.Keyword, lexer.COLLECTION_KEYWORDS)
try {
switch( keyword ) {
case 'owned': {
Expand Down

0 comments on commit 09c2f74

Please sign in to comment.