summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2021-01-13 15:56:42 -0500
committerJune McEnroe <june@causal.agency>2021-01-13 15:56:42 -0500
commit85e2488ae23a478b2a1d7d025063535f5b770796 (patch)
tree02fd64bc8e057ca47d2292775b178d598681d471
parentFix C lexer to require a digit in a float literal (diff)
downloadsrc-85e2488ae23a478b2a1d7d025063535f5b770796.tar.gz
src-85e2488ae23a478b2a1d7d025063535f5b770796.zip
Match [] as Operator in C lexer
-rw-r--r--bin/c11.l2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/c11.l b/bin/c11.l
index dec4cce5..3c951028 100644
--- a/bin/c11.l
+++ b/bin/c11.l
@@ -38,7 +38,7 @@ width "*"|[0-9]+
 }
 
 ([-+*/%&|^=!<>]|"<<"|">>")"="? |
-[=~.?:]|"++"|"--"|"&&"|"||"|"->" |
+[=~.?:]|"["|"]"|"++"|"--"|"&&"|"||"|"->" |
 sizeof|(_A|alignof) {
 	return Operator;
 }