forked from AbleOS/holey-bytes
adding better api
This commit is contained in:
parent
dc0562553d
commit
9fe734c68c
|
@ -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",
|
||||
|
|
|
@ -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('"');
|
||||
|
||||
|
|
Loading…
Reference in a new issue