Script tokens have a region that they take up in the source code. This region is specified by an offset and length.
Script tokens have a type which can be used to handle them differently with its enclosing model. E.g. syntax highlighting. If two tokens have the same type, they should be displayed the same way in an IDE. Token types are arbitrary strings defined by their enclosing model.
Token regions should not overlap in a given script model.
The returned value is and exclusive offset.
The default implementation returns
getOffset() + getLength()
The length defines how many characters a token take up in the source code.
A token length may be zero.
The offset is zero based and inclusive.
The type can be an arbitrary string, in relation with the enclosing script model.
The default implementation simply checks if getLength() is zero.