]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/parsing/Token.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / internal / parsing / Token.java
1 package org.simantics.scl.compiler.internal.parsing;
2
3 import org.simantics.scl.compiler.errors.Locations;
4
5
6 public class Token extends Symbol {
7     public static final Token[] EMPTY_ARRAY = new Token[0];
8     
9     public final String text;
10     public final int id;
11     
12     public Token(int type, long location, String text) {
13         this.id = type;
14         this.location = location;
15         this.text = text;
16     }
17     
18     public Token(int type, int begin, int end, String text) {
19         this(type, Locations.location(begin, end), text);
20     }
21
22     @Override
23     public String toString() {
24         return text;
25     }
26 }