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