aboutsummaryrefslogtreecommitdiff
path: root/src/yuescript/yue_parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/yuescript/yue_parser.cpp')
-rw-r--r--src/yuescript/yue_parser.cpp28
1 files changed, 16 insertions, 12 deletions
diff --git a/src/yuescript/yue_parser.cpp b/src/yuescript/yue_parser.cpp
index ceb1f7c..77c5901 100644
--- a/src/yuescript/yue_parser.cpp
+++ b/src/yuescript/yue_parser.cpp
@@ -67,24 +67,28 @@ YueParser::YueParser() {
67 num_char = range('0', '9') >> *(range('0', '9') | '_' >> and_(range('0', '9'))); 67 num_char = range('0', '9') >> *(range('0', '9') | '_' >> and_(range('0', '9')));
68 num_char_hex = range('0', '9') | range('a', 'f') | range('A', 'F'); 68 num_char_hex = range('0', '9') | range('a', 'f') | range('A', 'F');
69 num_lit = num_char_hex >> *(num_char_hex | '_' >> and_(num_char_hex)); 69 num_lit = num_char_hex >> *(num_char_hex | '_' >> and_(num_char_hex));
70 num_bin_lit = set("01") >> *(set("01") | '_' >> and_(set("01")));
70 Num = 71 Num =
71 "0x" >> ( 72 '0' >> (
72 +num_lit >> ( 73 set("xX") >> (
73 '.' >> +num_lit >> -num_expo_hex | 74 num_lit >> (
74 num_expo_hex | 75 '.' >> num_lit >> -num_expo_hex |
75 lj_num | 76 num_expo_hex |
76 true_() 77 lj_num |
77 ) | ( 78 true_()
78 '.' >> +num_lit >> -num_expo_hex 79 ) | (
79 ) 80 '.' >> num_lit >> -num_expo_hex
81 )
82 ) |
83 set("bB") >> num_bin_lit
80 ) | 84 ) |
81 +num_char >> ( 85 num_char >> (
82 '.' >> +num_char >> -num_expo | 86 '.' >> num_char >> -num_expo |
83 num_expo | 87 num_expo |
84 lj_num | 88 lj_num |
85 true_() 89 true_()
86 ) | 90 ) |
87 '.' >> +num_char >> -num_expo; 91 '.' >> num_char >> -num_expo;
88 92
89 cut = false_(); 93 cut = false_();
90 Seperator = true_(); 94 Seperator = true_();