PageRenderTime 21ms CodeModel.GetById 8ms app.highlight 9ms RepoModel.GetById 1ms app.codeStats 0ms

/parsing/d/continuestmtunit.d

http://github.com/wilkie/djehuty
D | 48 lines | 29 code | 8 blank | 11 comment | 3 complexity | 586e252e9410da3d1b7e081d5dec7ea8 MD5 | raw file
 1/*
 2 * expressionunit.d
 3 *
 4 * This module parses expressions.
 5 *
 6 */
 7
 8module parsing.d.continuestmtunit;
 9
10import parsing.parseunit;
11import parsing.token;
12
13import parsing.d.tokens;
14import parsing.d.nodes;
15
16import io.console;
17
18import djehuty;
19
20class ContinueStmtUnit : ParseUnit {
21	override bool tokenFound(Token current) {
22		switch (current.type) {
23			case DToken.Semicolon:
24				// Done.
25				putln("Continue: ", cur_string);
26				return false;
27			case DToken.Identifier:
28				if (this.state == 1) {
29					// Error: More than one identifier?!?!
30					// TODO:
31				}
32				this.state = 1;
33				cur_string = current.value.toString();
34				break;
35			default:
36				// Error:
37				// TODO:
38				break;
39		}
40		return true;
41	}
42
43protected:
44	string cur_string = "";
45
46	static const string _common_error_msg = "";
47	static const string[] _common_error_usages = null;
48}