mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
expression: add a check for raw strings
This commit is contained in:
parent
8d1eb759f7
commit
5d5268a53d
@ -1,2 +1 @@
|
||||
println('Hello, World!')
|
||||
|
||||
|
@ -161,7 +161,7 @@ fn (p mut Parser) name_expr() string {
|
||||
|
||||
mut name := p.lit
|
||||
// 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()
|
||||
return 'string'
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user