src/vs/editor/contrib/snippet/browser/snippetParser.ts/TextmateSnippet/offset
class TextmateSnippet:	offset(marker: Marker): number {
		let pos = 0;
		let found = false;
		this.walk(candidate => {
			if (candidate === marker) {
				found = true;
				return false;
			}
			pos += candidate.len();
			return true;
		});

		if (!found) {
			return -1;
		}
		return pos;
	}