Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
Signed-off-by: Efe Barlas <ebarlas@purdue.edu>
  • Loading branch information
efebarlas committed Jul 9, 2021
1 parent 9791cce commit 8f7ca34
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/vocabularies/code.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,10 @@ export function usePattern({gen, it: {self, opts}}: KeywordCxt, pattern: string)
const useRe2 = opts.useRe2
if (u === "u" && useRe2) {
try {
const s = new Re2(pattern)
self.logger.log(s)
const engine = new Re2(pattern)
return gen.scopeValue("pattern", {
key: pattern,
ref: new Re2(pattern),
ref: engine,
code: _`new ${useFunc(gen, re2)}(${pattern})`,
})
} catch (e) {
Expand Down

0 comments on commit 8f7ca34

Please sign in to comment.