@@ -590,7 +590,7 @@ public Label visit(Literal nd, Context c) {
590590 trapwriter .addTuple ("literals" , valueString , source , key );
591591 Position start = nd .getLoc ().getStart ();
592592 com .semmle .util .locations .Position startPos = new com .semmle .util .locations .Position (start .getLine (), start .getColumn () + 1 /* Convert from 0-based to 1-based. */ , start .getOffset ());
593-
593+
594594 if (nd .isRegExp ()) {
595595 OffsetTranslation offsets = new OffsetTranslation ();
596596 offsets .set (0 , 1 ); // skip the initial '/'
@@ -622,7 +622,7 @@ private boolean isOctalDigit(char ch) {
622622 /**
623623 * Constant-folds simple string concatenations in `exp` while keeping an offset translation
624624 * that tracks back to the original source.
625- */
625+ */
626626 private Pair <String , OffsetTranslation > getStringConcatResult (Expression exp ) {
627627 if (exp instanceof BinaryExpression ) {
628628 BinaryExpression be = (BinaryExpression ) exp ;
@@ -636,7 +636,7 @@ private Pair<String, OffsetTranslation> getStringConcatResult(Expression exp) {
636636 if (str .length () > 1000 ) {
637637 return null ;
638638 }
639-
639+
640640 int delta = be .getRight ().getLoc ().getStart ().getOffset () - be .getLeft ().getLoc ().getStart ().getOffset ();
641641 int offset = left .fst ().length ();
642642 return Pair .make (str , left .snd ().append (right .snd (), offset , delta ));
@@ -848,14 +848,14 @@ public Label visit(AssignmentExpression nd, Context c) {
848848 public Label visit (BinaryExpression nd , Context c ) {
849849 Label key = super .visit (nd , c );
850850 if (nd .getOperator ().equals ("in" ) && nd .getLeft () instanceof Identifier && ((Identifier )nd .getLeft ()).getName ().startsWith ("#" )) {
851- // this happens with Ergonomic brand checks for Private Fields (see https://github.com/tc39/proposal-private-fields-in-in).
851+ // this happens with Ergonomic brand checks for Private Fields (see https://github.com/tc39/proposal-private-fields-in-in).
852852 // it's the only case where private field identifiers are used not as a field.
853853 visit (nd .getLeft (), key , 0 , IdContext .LABEL , true );
854854 } else {
855855 visit (nd .getLeft (), key , 0 , true );
856856 }
857857 visit (nd .getRight (), key , 1 , true );
858-
858+
859859 extractRegxpFromBinop (nd , c );
860860 return key ;
861861 }
@@ -1815,7 +1815,7 @@ public Label visit(ImportSpecifier nd, Context c) {
18151815 visit (nd .getLocal (), lbl , 1 , nd .hasTypeKeyword () ? IdContext .TYPE_ONLY_IMPORT : c .idcontext );
18161816 if (nd .hasTypeKeyword ()) {
18171817 trapwriter .addTuple ("has_type_keyword" , lbl );
1818- }
1818+ }
18191819 return lbl ;
18201820 }
18211821
0 commit comments