mirror of
https://github.com/microsoft/regorus.git
synced 2026-08-05 02:16:11 +00:00
OPA Conformance: Do not interpret # within regular string (#216)
fixes #213 Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
This commit is contained in:
committed by
GitHub
parent
7fde3382f6
commit
744dad6126
@@ -455,7 +455,7 @@ impl<'source> Lexer<'source> {
|
||||
let (offset, ch) = self.peek();
|
||||
let col = self.col + (offset - start) as u16;
|
||||
match ch {
|
||||
'"' | '#' | '\x00' => {
|
||||
'"' | '\x00' => {
|
||||
break;
|
||||
}
|
||||
'\\' => {
|
||||
|
||||
@@ -56,11 +56,9 @@ cases:
|
||||
|
||||
- note: comments-within-rstring
|
||||
rego: |
|
||||
#Comments aren't allowed within strings,
|
||||
"#This is not a comment
|
||||
"#c
|
||||
tokens:
|
||||
error: unmatched "
|
||||
#Comments aren't lexed within raw strings.
|
||||
"#This is not a comment"#c
|
||||
tokens: ["#This is not a comment", ""]
|
||||
|
||||
- note: comment-integer-break
|
||||
rego: |
|
||||
|
||||
Reference in New Issue
Block a user