aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bin/cli.rs20
-rw-r--r--src/parser/grammar/expressions.rs4
2 files changed, 4 insertions, 20 deletions
diff --git a/src/bin/cli.rs b/src/bin/cli.rs
deleted file mode 100644
index 9e513edb2..000000000
--- a/src/bin/cli.rs
+++ /dev/null
@@ -1,20 +0,0 @@
1extern crate libsyntax2;
2
3use std::io::Read;
4
5use libsyntax2::{
6 parse, utils::dump_tree
7};
8
9fn main() {
10 let text = read_input();
11 let file = parse(text);
12 let tree = dump_tree(&file);
13 println!("{}", tree);
14}
15
16fn read_input() -> String {
17 let mut buff = String::new();
18 ::std::io::stdin().read_to_string(&mut buff).unwrap();
19 buff
20}
diff --git a/src/parser/grammar/expressions.rs b/src/parser/grammar/expressions.rs
index 2145b8d8b..40f41535e 100644
--- a/src/parser/grammar/expressions.rs
+++ b/src/parser/grammar/expressions.rs
@@ -1,5 +1,9 @@
1use super::*; 1use super::*;
2 2
3// test expr_literals
4// fn foo() {
5// let _ = 92;
6// }
3pub(super) fn literal(p: &mut Parser) -> bool { 7pub(super) fn literal(p: &mut Parser) -> bool {
4 match p.current() { 8 match p.current() {
5 TRUE_KW | FALSE_KW | INT_NUMBER | FLOAT_NUMBER | BYTE | CHAR | STRING | RAW_STRING 9 TRUE_KW | FALSE_KW | INT_NUMBER | FLOAT_NUMBER | BYTE | CHAR | STRING | RAW_STRING