generated from ElnuDev/rust-project
parent
359c46d776
commit
46acbce60e
@ -1,5 +1,11 @@
|
||||
{
|
||||
"rust-analyzer.linkedProjects": [
|
||||
"./demo/Cargo.toml"
|
||||
]
|
||||
],
|
||||
"files.exclude": {
|
||||
"**/*.rpyc": true,
|
||||
"**/*.rpa": true,
|
||||
"**/*.rpymc": true,
|
||||
"**/cache/": true
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
||||
show black amogus # this is a comment
|
||||
# this is a full line comment
|
||||
what the heck
|
||||
"this is a string with a # comment"
|
||||
"this is a string over
|
||||
multiple lines"
|
||||
this is cool # comment
|
||||
|
||||
huh
|
@ -1,5 +1,5 @@
|
||||
use renrs;
|
||||
|
||||
fn main() {
|
||||
renrs::parse("demo.csv");
|
||||
renrs::parse("demo.rpy");
|
||||
}
|
||||
|
@ -1,9 +0,0 @@
|
||||
// + indicates one or more times
|
||||
field = { (ASCII_DIGIT | "." | "-")+ }
|
||||
// ~ indicates directly followed by
|
||||
// * indicates zero or more times (optional)
|
||||
record = { field ~ ("," ~ field)* }
|
||||
// SOI - start of input
|
||||
// END - end of input
|
||||
// There may be trailing newlines at the end
|
||||
file = { SOI ~ (record ~ ("\r\n" | "\n"))* ~ "\n"* ~ EOI }
|
@ -0,0 +1,17 @@
|
||||
// underscores mark are silent rules, are ignored
|
||||
WHITESPACE = _{ " " }
|
||||
|
||||
// characters are anything but newlines
|
||||
char = { !NEWLINE ~ ANY }
|
||||
|
||||
// comments are a # followed by
|
||||
// any number of non-newline characters
|
||||
COMMENT = _{ "#" ~ char* }
|
||||
|
||||
// statements are comprised of at least one character
|
||||
statement = { char+ }
|
||||
|
||||
// lines are comprised of a statement
|
||||
line = { statement }
|
||||
|
||||
file = { SOI ~ (line ~ ("\r\n" | "\n")*)* ~ "\n"* ~ EOI }
|
Loading…
Reference in new issue