1
0
Fork 0
forked from koniifer/ableos

adding better api

This commit is contained in:
mlokr 2024-07-06 15:05:56 +02:00
parent fef0583e9c
commit aa276d88fa
2 changed files with 1 additions and 3 deletions

View file

@ -114,7 +114,6 @@ pub enum TokenKind {
Ident,
Number,
Eof,
String,
Return,
If,
@ -180,7 +179,6 @@ gen_token_kind! {
Number,
Eof,
Directive,
String,
#[keywords]
Return = b"return",
If = b"if",

View file

@ -239,7 +239,7 @@ impl<'a, 'b> Parser<'a, 'b> {
let mut expr = match token.kind {
T::Directive if self.lexer.slice(token.range()) == "use" => {
self.expect_advance(TokenKind::LParen);
let str = self.expect_advance(TokenKind::String);
let str = self.expect_advance(TokenKind::DQuote);
self.expect_advance(TokenKind::RParen);
let path = self.lexer.slice(str.range()).trim_matches('"');