aboutsummaryrefslogtreecommitdiffstats
path: root/modelica-parser-lalrpop/src/parser.lalrpop
diff options
context:
space:
mode:
authorbnewbold <bnewbold@robocracy.org>2016-12-26 05:02:38 -0800
committerbnewbold <bnewbold@robocracy.org>2016-12-26 05:02:38 -0800
commitf97396ea89704ff2ccab28d7b27ceeeb3201ddd0 (patch)
tree366af1d133cdca89cfe1329194f2e9081f253272 /modelica-parser-lalrpop/src/parser.lalrpop
parent3983ac71d8911234342386aed897d6d2f9fef13f (diff)
downloadmodelthing-f97396ea89704ff2ccab28d7b27ceeeb3201ddd0.tar.gz
modelthing-f97396ea89704ff2ccab28d7b27ceeeb3201ddd0.zip
parser: fix string_literals
Diffstat (limited to 'modelica-parser-lalrpop/src/parser.lalrpop')
-rw-r--r--modelica-parser-lalrpop/src/parser.lalrpop3
1 files changed, 2 insertions, 1 deletions
diff --git a/modelica-parser-lalrpop/src/parser.lalrpop b/modelica-parser-lalrpop/src/parser.lalrpop
index 94795c6..cb59a82 100644
--- a/modelica-parser-lalrpop/src/parser.lalrpop
+++ b/modelica-parser-lalrpop/src/parser.lalrpop
@@ -21,7 +21,8 @@ pub identifier: String = {
};
string_literal: String = {
- r#""[^"\\]*""# => <>.to_string(),
+ // Strip quotes from string literals
+ <s:r#""[^"\\]*""#> => s[1..s.len()-1].to_string(),
};
pub integer: i64 = {