Accept the use of "structure" as an alternative to the "class" keyword
This commit is contained in:
		
							parent
							
								
									471a588d37
								
							
						
					
					
						commit
						c6ee98e76b
					
				| @ -31,7 +31,7 @@ namespace Parser { | ||||
|             switch (current.toktype) { | ||||
|                 case STRING: parseTree << types::String(current.toktext.data()); break; | ||||
|                 case IDENTIFIER: { | ||||
|                     if (current.toktext == "class") { | ||||
|                     if (current.toktext == "class" || current.toktext == "structure") { | ||||
|                         if (next.toktype == IDENTIFIER) { | ||||
|                             parseTree << Class(next.toktext); ++i; | ||||
|                         } else throw ParsingException((not (next.toktext.empty() or next.toktype == tok::EOF_)) ? '"' + next.toktext + "\" is not a valid class identifier" : "A class identifier is required", next.line); | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user