Skip to content

Commit

Permalink
Update flatc.js
Browse files Browse the repository at this point in the history
  • Loading branch information
lutzroeder committed May 7, 2023
1 parent c5f2d89 commit afe60e1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tools/flatc.js
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ flatc.Parser = class {

constructor(text, file, root) {
// https://google.github.io/flatbuffers/flatbuffers_grammar.html
this._tokenizer = new flatc.Parser.Tokenizer(text, file);
this._tokenizer = new flatc.Tokenizer(text, file);
this._root = root;
this._context = root.defineNamespace('');
}
Expand Down Expand Up @@ -524,7 +524,7 @@ flatc.Parser = class {
}
};

flatc.Parser.Tokenizer = class {
flatc.Tokenizer = class {

constructor(text, file) {
this._text = text;
Expand All @@ -549,7 +549,7 @@ flatc.Parser.Tokenizer = class {
}
const next = this._position + this._token.token.length;
while (this._position < next) {
if (flatc.Parser.Tokenizer._isNewline(this._get(this._position))) {
if (flatc.Tokenizer._isNewline(this._get(this._position))) {
this._position = this._newLine(this._position);
this._lineStart = this._position;
this._line++;
Expand Down Expand Up @@ -690,7 +690,7 @@ flatc.Parser.Tokenizer = class {

_skipLine() {
while (this._position < this._text.length) {
if (flatc.Parser.Tokenizer._isNewline(this._get(this._position))) {
if (flatc.Tokenizer._isNewline(this._get(this._position))) {
break;
}
this._position++;
Expand All @@ -700,11 +700,11 @@ flatc.Parser.Tokenizer = class {
_skipWhitespace() {
while (this._position < this._text.length) {
const c = this._get(this._position);
if (flatc.Parser.Tokenizer._isSpace(c)) {
if (flatc.Tokenizer._isSpace(c)) {
this._position++;
continue;
}
if (flatc.Parser.Tokenizer._isNewline(c)) {
if (flatc.Tokenizer._isNewline(c)) {
// Implicit Line Continuation
this._position = this._newLine(this._position);
this._lineStart = this._position;
Expand Down

0 comments on commit afe60e1

Please sign in to comment.