1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

toml: add quote details to ast.Quoted (#11997)

This commit is contained in:
Larpon
2021-09-28 16:40:03 +02:00
committed by GitHub
parent a03693e881
commit bc4aad5fb4
3 changed files with 28 additions and 14 deletions

View File

@ -140,8 +140,10 @@ pub fn (n Null) str() string {
// Quoted types can appear both as keys and values in TOML documents.
pub struct Quoted {
pub:
text string
pos token.Position
text string
pos token.Position
is_multiline bool
quote byte
}
// str returns the `string` representation of the `Quoted` type.
@ -149,6 +151,8 @@ pub fn (q Quoted) str() string {
mut str := typeof(q).name + '{\n'
str += ' text: \'$q.text\'\n'
str += ' pos: $q.pos\n'
str += ' is_multiline: $q.is_multiline\n'
str += ' quote: \'$q.quote\'\n'
str += '}'
return str
}