Skip to content

Commit

Permalink
Do not use any keywords as identificator.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Potanin committed May 28, 2018
1 parent e200499 commit 00025de
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.wavesplatform.lang.v1.testing

import com.wavesplatform.lang.v1.parser.Parser.keywords
import com.wavesplatform.lang.v1.parser.BinaryOperation
import com.wavesplatform.lang.v1.parser.BinaryOperation._
import com.wavesplatform.lang.v1.parser.Expressions._
Expand Down Expand Up @@ -104,7 +105,7 @@ trait ScriptGen {
} yield LET(0, 0, PART.VALID(0, 0, name), value, Seq.empty)

def REFgen: Gen[EXPR] =
Gen.identifier.map(PART.VALID[String](0, 0, _)).map(REF(0, 0, _))
Gen.identifier.filter(!keywords(_)).map(PART.VALID[String](0, 0, _)).map(REF(0, 0, _))

def BLOCKgen(gas: Int): Gen[EXPR] =
for {
Expand Down

0 comments on commit 00025de

Please sign in to comment.