summaryrefslogtreecommitdiff
path: root/clformat/src/main/java/bjc/utils/ioutils/format/directives/CompileContext.java
blob: 77c84022c1773551cb5e1e577ba61b7063729155 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package bjc.utils.ioutils.format.directives;

import bjc.utils.ioutils.format.*;

/**
 * Encapsulates the state necessary for compiling Directives into Edicts.
 *
 * @author Ben Culkin
 */
public class CompileContext {
	/**
	 * The stream of parsed directives.
	 */
	public CLTokenizer directives;

	/**
	 * The configured formatter instance we are using.
	 */
	public CLFormatter formatter;

	/**
	 * The decree that is currently being parsed.
	 */
	public SimpleDecree decr;

	/**
	 * Create a new compilation context.
	 *
	 * @param dirs
	 *             The directives to compile from.
	 *
	 * @param fmt
	 *             The formatter being used to compile.
	 *
	 * @param dcr
	 *             The decree currently being compiled.
	 */
	public CompileContext(CLTokenizer dirs, CLFormatter fmt, SimpleDecree dcr) {
		directives = dirs;
		formatter = fmt;

		decr = dcr;
	}
}