]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/regexp/parser/parser.factor
Fixing regexp parser bug: now R/ foo/5 makes an error
[factor.git] / basis / regexp / parser / parser.factor
index 9fcadc40084f78d7e3924d2b5264afcee144cab4..70281aa798d38708f2d234265634cbe65d62c6fc 100644 (file)
@@ -102,8 +102,10 @@ MEMO: simple-category-table ( -- table )
         { CHAR: s dotall }
     } ;
 
+ERROR: nonexistent-option name ;
+
 : ch>option ( ch -- singleton )
-    options-assoc at ;
+    dup options-assoc at [ ] [ nonexistent-option ] ?if ;
 
 : option>ch ( option -- string )
     options-assoc value-at ;