From 24c431b36bc3ecedae3b0fc2a96a0dcca2aeed87 Mon Sep 17 00:00:00 2001 From: coolreader18 <33094578+coolreader18@users.noreply.github.com> Date: Fri, 19 Oct 2018 20:22:05 -0500 Subject: [PATCH 1/2] Change `lineBreaks` property of `Token` to number --- types/moo/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/moo/index.d.ts b/types/moo/index.d.ts index fa3a59d2ab..f36b6c05df 100644 --- a/types/moo/index.d.ts +++ b/types/moo/index.d.ts @@ -22,7 +22,7 @@ export interface Rule { * It will track line numbers, as long as you apply the `lineBreaks: true` * option to any tokens which might contain newlines. Moo will try to warn you if you forget to do this. */ - lineBreaks?: boolean; + lineBreaks?: number; /** * Moves the lexer to a new state, and pushes the old state onto the stack. */ From 91f933faa234b515c6c0e1d13a586d186b924f24 Mon Sep 17 00:00:00 2001 From: coolreader18 <33094578+coolreader18@users.noreply.github.com> Date: Fri, 19 Oct 2018 20:36:06 -0500 Subject: [PATCH 2/2] Whoops, changed `Rule` instead of `Token` --- types/moo/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/moo/index.d.ts b/types/moo/index.d.ts index f36b6c05df..fd53f98e0a 100644 --- a/types/moo/index.d.ts +++ b/types/moo/index.d.ts @@ -22,7 +22,7 @@ export interface Rule { * It will track line numbers, as long as you apply the `lineBreaks: true` * option to any tokens which might contain newlines. Moo will try to warn you if you forget to do this. */ - lineBreaks?: number; + lineBreaks?: boolean; /** * Moves the lexer to a new state, and pushes the old state onto the stack. */ @@ -104,7 +104,7 @@ export interface Token { /** * The number of line breaks found in the match. (Always zero if this rule has lineBreaks: false.) */ - lineBreaks: boolean; + lineBreaks: number; /** * The line number of the beginning of the match, starting from 1. */