We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 48e6b43 commit 6fc1b6cCopy full SHA for 6fc1b6c
crates/rowan/build.rs
@@ -5,6 +5,12 @@ fn main() {
5
6
let ungram = std::fs::read_to_string("src/ast/rhai.ungram").unwrap();
7
8
+ let ungram = if cfg!(windows) {
9
+ ungram.replace("\r\n", "\n")
10
+ } else {
11
+ ungram
12
+ };
13
+
14
let generated = rhai_sourcegen::syntax::generate_syntax(&ungram).unwrap();
15
16
let syntax_file = std::fs::read_to_string("src/syntax.rs").unwrap();
crates/rowan/src/syntax.rs
@@ -329,7 +329,7 @@ pub enum SyntaxKind {
329
#[token("/**", lex_multi_line_comment)]
330
COMMENT_BLOCK_DOC,
331
332
- #[regex(r"[ \t\n\f]+")]
+ #[regex(r"[ \t\r\n\f]+")]
333
WHITESPACE,
334
#[error]
335
ERROR,
0 commit comments