double quote

pull/2056/head
Alexander Medvednikov 2019-09-21 01:23:53 +03:00
parent ecc8728643
commit 6ebd62020a
1 changed files with 14 additions and 8 deletions

View File

@ -4,8 +4,15 @@
module main
import os
import strings
import (
os
strings
)
const (
single_quote = `\'`
double_quote = `"`
)
struct Scanner {
mut:
@ -352,11 +359,10 @@ fn (s mut Scanner) scan() ScanRes {
return scan_res(.mod, '')
case `?`:
return scan_res(.question, '')
case `\'`:
case single_quote:
return scan_res(.str, s.ident_string())
case double_quote:
return scan_res(.str, s.ident_string())
// TODO allow double quotes
// case QUOTE:
// return scan_res(.str, s.ident_string())
case `\``: // ` // apostrophe balance comment. do not remove
return scan_res(.chartoken, s.ident_char())
case `(`: