forked from facebook/hermes
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use AllowDiv when doing REPL paren matching.
Summary: If we use `AllowRegExp` as the grammar context, then paren matching breaks if we use `/` as division inside parens. Always use `AllowDiv` instead. Note that this is not perfect, because it doesn't work if there are unbalanced parens inside an actual RegExp. Reviewed By: tmikov Differential Revision: D21434307 fbshipit-source-id: c3258bbe73d815349985f97629b54d9dc14e007f
- Loading branch information
1 parent
d188b72
commit 6e1367c
Showing
2 changed files
with
17 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Remove this once the REPL can handle block comments. | ||
// @lint-ignore-every LICENSELINT | ||
|
||
// Copyright (c) Facebook, Inc. and its affiliates. | ||
// | ||
// This source code is licensed under the MIT license found in the | ||
// LICENSE file in the root directory of this source tree. | ||
|
||
// RUN: cat %s | %hermes -prompt="" -prompt2="" | %FileCheck --match-full-lines %s | ||
|
||
(1 / 2); | ||
// CHECK: 0.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters