Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Actually use the Regex to store the contract, report on error.

  • Loading branch information...
commit 178b7e4eed33bd2825d07600dd3c3ced63c37869 1 parent acf0a84
Etienne Kneuss authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/insane/AST/CodeExtraction.scala
8 src/insane/AST/CodeExtraction.scala
View
@@ -118,7 +118,13 @@ trait CodeExtraction extends Extractors with Contracts {
val regex = l.value.stringValue
- reporter.debug("Found regex: "+RegexParser.parseString(regex))
+
+ RegexParser.parseString(regex) match {
+ case Some(r) =>
+ fun.contrEffects +:= AssertUntouched(r)
+ case _ =>
+ reporter.error("Unable to parse regex: "+regex, Some(annot.pos));
+ }
case _ =>
}
case _ =>
Please sign in to comment.
Something went wrong with that request. Please try again.