Add comments (to the language)
This commit is contained in:
parent
efbe872f1e
commit
89c5a6985b
|
@ -1,9 +1,14 @@
|
||||||
|
// Comment!
|
||||||
|
|
||||||
type SimpleType
|
type SimpleType
|
||||||
= MyVariant1
|
= MyVariant1
|
||||||
| MyVariant2 Integer[u32]
|
| MyVariant2 Integer[u32]
|
||||||
| MyVariant3 Integer[1..20]
|
| MyVariant3 Integer[1..20]
|
||||||
| MyVariant4 Integer String
|
| MyVariant4 Integer String
|
||||||
|
|
||||||
|
/* Multiline
|
||||||
|
Comment! */
|
||||||
|
|
||||||
type Option val
|
type Option val
|
||||||
= Some val
|
= Some val
|
||||||
| None
|
| None
|
||||||
|
|
|
@ -21,6 +21,8 @@ pub enum Token {
|
||||||
#[error]
|
#[error]
|
||||||
#[regex(r"[ \t]+", logos::skip)]
|
#[regex(r"[ \t]+", logos::skip)]
|
||||||
#[regex(r"\n[ \t]+", logos::skip)]
|
#[regex(r"\n[ \t]+", logos::skip)]
|
||||||
|
#[regex(r"//.+", logos::skip)]
|
||||||
|
#[regex(r"/\*[.\n]+\*/", logos::skip)]
|
||||||
Error,
|
Error,
|
||||||
|
|
||||||
/// The `type` keyword
|
/// The `type` keyword
|
||||||
|
|
Loading…
Reference in a new issue