src/lexer_scanner.h

changeset 79
2425fa6a4f21
parent 75
bf8c57437231
child 80
2ed3430fdd08
--- a/src/lexer_scanner.h	Fri Jan 17 21:42:02 2014 +0200
+++ b/src/lexer_scanner.h	Fri Jan 17 22:55:13 2014 +0200
@@ -52,8 +52,11 @@
 		};
 
 	public:
-		static inline bool is_symbol_char (char c)
+		static inline bool is_symbol_char (char c, bool allow_numbers)
 		{
+			if (allow_numbers && (c >= '0' && c <= '9'))
+				return true;
+
 			return (c >= 'a' && c <= 'z') ||
 				   (c >= 'A' && c <= 'Z') ||
 				   (c == '_');
@@ -101,6 +104,12 @@
 
 		// Sets the current position based on given data.
 		void			set_position (const position_info& a);
+
+		// Skips one character
+		void			skip();
+
+		// Skips many characters
+		void			skip (int chars);
 };
 
 #endif // IRIS_SCANNER_H

mercurial