aboutsummaryrefslogtreecommitdiff
path: root/_mint/parser/conditions.js
diff options
context:
space:
mode:
Diffstat (limited to '_mint/parser/conditions.js')
-rw-r--r--_mint/parser/conditions.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/_mint/parser/conditions.js b/_mint/parser/conditions.js
new file mode 100644
index 0000000..88e6366
--- /dev/null
+++ b/_mint/parser/conditions.js
@@ -0,0 +1,7 @@
+const MintParser = require('./base');
+
+module.exports = class MintParserConditions extends MintParser {
+ parse(file) {
+ return file.replace(/^( *|)if (.[^{]*)( |){/gm, "if ($2) {").replace(/^( *|)(}|} |)elif (.[^{]*)( |){/gm, "} else if $3 {")
+ }
+} \ No newline at end of file