Skip to content

Commit 01c59d4

Browse files
Merge pull request #116 from NLnetLabs/lib-to-dep
Change `lib` keyword to `dep`
2 parents 0edcec3 + b7db5a1 commit 01c59d4

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/parser/expr.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ impl Parser<'_, '_> {
394394
Token::Ident(_)
395395
| Token::Super
396396
| Token::Pkg
397-
| Token::Lib
397+
| Token::Dep
398398
| Token::Std
399399
)
400400
) {
@@ -683,12 +683,12 @@ impl Parser<'_, '_> {
683683
let (tok, span) = self.next()?;
684684
let ident: Identifier = match tok {
685685
Token::Pkg => "pkg".into(),
686-
Token::Lib => "lib".into(),
686+
Token::Dep => "dep".into(),
687687
Token::Super => "super".into(),
688688
Token::Ident(s) => s.into(),
689689
_ => {
690690
return Err(ParseError::expected(
691-
"identifier, `super`, `pkg` or `lib`",
691+
"identifier, `super`, `pkg` or `dep`",
692692
tok,
693693
span,
694694
))

src/parser/token.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ pub enum Token<'s> {
3939

4040
// === Keywords ===
4141
Accept,
42+
Dep,
4243
Else,
4344
Filter,
4445
FilterMap,
@@ -47,7 +48,6 @@ pub enum Token<'s> {
4748
Import,
4849
In,
4950
Let,
50-
Lib,
5151
Match,
5252
Not,
5353
Pkg,
@@ -353,7 +353,7 @@ impl<'s> Lexer<'s> {
353353
"import" => Token::Import,
354354
"in" => Token::In,
355355
"let" => Token::Let,
356-
"lib" => Token::Lib,
356+
"dep" => Token::Dep,
357357
"match" => Token::Match,
358358
"not" => Token::Not,
359359
"pkg" => Token::Pkg,
@@ -415,7 +415,7 @@ impl Display for Token<'_> {
415415
Token::Import => "import",
416416
Token::In => "in",
417417
Token::Let => "let",
418-
Token::Lib => "lib",
418+
Token::Dep => "dep",
419419
Token::Match => "match",
420420
Token::Not => "not",
421421
Token::Pkg => "pkg",

0 commit comments

Comments
 (0)