mirror of
https://github.com/vlang/v.git
synced 2025-09-14 15:02:33 +03:00
fmt: keep char literal, '
(#11060)
This commit is contained in:
parent
b95224aa20
commit
490dec222f
11 changed files with 18 additions and 14 deletions
|
@ -111,10 +111,10 @@ pub fn (mut parser Parser) split_parse(data string) {
|
|||
parser.init()
|
||||
for chr in data {
|
||||
// returns true if byte is a " or '
|
||||
is_quote := chr == `"` || chr == `\'`
|
||||
is_quote := chr == `"` || chr == `'`
|
||||
string_code := match chr {
|
||||
`"` { 1 } // "
|
||||
`\'` { 2 } // '
|
||||
`'` { 2 } // '
|
||||
else { 0 }
|
||||
}
|
||||
if parser.lexical_attributes.open_code { // here will verify all needed to know if open_code finishes and string in code
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue