expression: add a check for raw strings
parent
8d1eb759f7
commit
5d5268a53d
|
@ -1,2 +1 @@
|
||||||
println('Hello, World!')
|
println('Hello, World!')
|
||||||
|
|
||||||
|
|
|
@ -161,7 +161,7 @@ fn (p mut Parser) name_expr() string {
|
||||||
|
|
||||||
mut name := p.lit
|
mut name := p.lit
|
||||||
// Raw string (`s := r'hello \n ')
|
// Raw string (`s := r'hello \n ')
|
||||||
if (name == 'r' || name == 'c') && p.peek() == .str {
|
if (name == 'r' || name == 'c') && p.peek() == .str && p.prev_tok != .dollar {
|
||||||
p.string_expr()
|
p.string_expr()
|
||||||
return 'string'
|
return 'string'
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue