]> gitweb.factorcode.org Git - factor.git/commitdiff
Fixing regexp parser bug: now R/ foo/5 makes an error
authorDaniel Ehrenberg <littledan@Macintosh-122.local>
Sun, 12 Apr 2009 18:57:49 +0000 (13:57 -0500)
committerDaniel Ehrenberg <littledan@Macintosh-122.local>
Sun, 12 Apr 2009 18:57:49 +0000 (13:57 -0500)
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 ;