double quote
							parent
							
								
									ecc8728643
								
							
						
					
					
						commit
						6ebd62020a
					
				| 
						 | 
					@ -4,8 +4,15 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
module main
 | 
					module main
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import os
 | 
					import (
 | 
				
			||||||
import strings
 | 
						os
 | 
				
			||||||
 | 
						strings
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const (
 | 
				
			||||||
 | 
						single_quote = `\'`
 | 
				
			||||||
 | 
						double_quote = `"`
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct Scanner {
 | 
					struct Scanner {
 | 
				
			||||||
mut:
 | 
					mut:
 | 
				
			||||||
| 
						 | 
					@ -352,11 +359,10 @@ fn (s mut Scanner) scan() ScanRes {
 | 
				
			||||||
		return scan_res(.mod, '')
 | 
							return scan_res(.mod, '')
 | 
				
			||||||
	case `?`:
 | 
						case `?`:
 | 
				
			||||||
		return scan_res(.question, '')
 | 
							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())
 | 
							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
 | 
						case `\``: // ` // apostrophe balance comment. do not remove
 | 
				
			||||||
		return scan_res(.chartoken, s.ident_char())
 | 
							return scan_res(.chartoken, s.ident_char())
 | 
				
			||||||
	case `(`:
 | 
						case `(`:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue