summaryrefslogtreecommitdiffstats
path: root/lexer.l
diff options
context:
space:
mode:
authorStephen Dolan <mu@netsoc.tcd.ie>2012-10-22 19:16:27 +0100
committerStephen Dolan <mu@netsoc.tcd.ie>2012-10-22 19:18:30 +0100
commit48fb7c61b319ed451280c9c307009dd7195092d8 (patch)
tree1009d362c57306f864b1b82b02fb020538ea67c5 /lexer.l
parentf2601ab4f07e8237ab56b00fdf0def899def46c2 (diff)
Support a -f option to load from a file, and # comments
This means '#!/usr/local/bin/jq -f' is now a sensible way to start a file. Closes #13
Diffstat (limited to 'lexer.l')
-rw-r--r--lexer.l2
1 files changed, 2 insertions, 0 deletions
diff --git a/lexer.l b/lexer.l
index 1921f380..cac08ec7 100644
--- a/lexer.l
+++ b/lexer.l
@@ -31,6 +31,8 @@
%%
+"#"[^\r\n]* { /* comments */ }
+
"==" { return EQ; }
"as" { return AS; }
"def" { return DEF; }