From 52c3d4f6af8bf714e607f15ab299e311105e273c Mon Sep 17 00:00:00 2001 From: kazuya kawaguchi Date: Thu, 23 Apr 2020 16:24:13 +0900 Subject: [PATCH 1/3] fix tokenizer --- spec/syntax.ebnf | 8 +- src/index.ts | 1 + src/message/tokenizer.ts | 194 +- .../__snapshots__/tokenizer.test.ts.snap | 4661 +++++++++++++++-- test/message/tokenizer.test.ts | 101 +- 5 files changed, 4563 insertions(+), 402 deletions(-) diff --git a/spec/syntax.ebnf b/spec/syntax.ebnf index 45c9675b0..8b5583f48 100644 --- a/spec/syntax.ebnf +++ b/spec/syntax.ebnf @@ -13,13 +13,15 @@ Message ::= (Text? (Placeholder | Linked)? Text?)+; (* primitives *) Text ::= TextChar+; Placeholder ::= Named | List; -Named ::= "%"? "{" Space? (Identifier) Space? "}"; +Modulo ::= "%"; +Named ::= Modulo? "{" Space? (Identifier) Space? "}"; List ::= "{" Space? (Digits) Space? "}"; -Linked ::= "@" (LinkedDot LinkedModifier)? ":" LinkedRefer; +Linked ::= "@" (LinkedModifier)? LinkedDelimiter LinkedRefer; LinkedRefer ::= "("? (LinkedKey | Placeholder) ")"?; LinkedKey ::= TextChar+; +LinkedModifier ::= LinkedDot Identifier; +LinkedDelimiter ::= ":"; LinkedDot ::= "."; -LinkedModifier ::= Identifier; (* characters *) AnyChar ::= [#x0-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]; (* Unicode character *) diff --git a/src/index.ts b/src/index.ts index 0899018aa..80e39a3da 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,5 @@ export { Path, PathValue } from './path' +export { createCompiler, Compiler, CompileOptions } from './message/compiler' export { PluralizationRule, LinkedModifiers } from './message/context' export { Locale, diff --git a/src/message/tokenizer.ts b/src/message/tokenizer.ts index bc0edc4d8..2b4f7e623 100644 --- a/src/message/tokenizer.ts +++ b/src/message/tokenizer.ts @@ -54,7 +54,7 @@ export type Token = { export type TokenizeContext = { currentType: TokenTypes - currentValue: string | undefined | null // TODO: if dont' use, should be removed + currentValue: string | undefined | null // TODO: if don't use, should be removed currentToken: Token | null offset: number startLoc: Position @@ -65,6 +65,8 @@ export type TokenizeContext = { lastStartLoc: Position lastEndLoc: Position braceNest: number + parenNest: number + inLinked: boolean } export type Tokenizer = Readonly<{ @@ -95,7 +97,9 @@ export function createTokenizer(source: string): Tokenizer { lastOffset: _initOffset, lastStartLoc: _initLoc, lastEndLoc: _initLoc, - braceNest: 0 + braceNest: 0, + parenNest: 0, + inLinked: false } const context = (): TokenizeContext => _context @@ -119,6 +123,17 @@ export function createTokenizer(source: string): Tokenizer { return token } + const peekNewLines = (scnr: Scanner): void => { + while (scnr.currentPeek() === NEW_LINE) { + scnr.peek() + } + } + + const skipNewLines = (scnr: Scanner): void => { + peekNewLines(scnr) + scnr.skipToPeek() + } + const peekSpaces = (scnr: Scanner): string => { let buf = '' while (scnr.currentPeek() === SPACE || scnr.currentPeek() === NEW_LINE) { @@ -182,7 +197,7 @@ export function createTokenizer(source: string): Tokenizer { return ret } - const isLinkedModifier = ( + const isLinkedModifierStart = ( scnr: Scanner, context: TokenizeContext ): boolean => { @@ -195,7 +210,7 @@ export function createTokenizer(source: string): Tokenizer { return ret } - const isLinkedIdentifier = ( + const isLinkedReferStart = ( scnr: Scanner, context: TokenizeContext ): boolean => { @@ -223,6 +238,7 @@ export function createTokenizer(source: string): Tokenizer { ) { return false } else if (ch === NEW_LINE) { + scnr.peek() return fn() } else { // other charactors @@ -245,9 +261,7 @@ export function createTokenizer(source: string): Tokenizer { const { currentType } = context if ( currentType === TokenTypes.BraceLeft || - currentType === TokenTypes.ParenLeft || - currentType === TokenTypes.LinkedDot || - currentType === TokenTypes.LinkedDelimiter + currentType === TokenTypes.ParenLeft ) { return false } @@ -378,14 +392,18 @@ export function createTokenizer(source: string): Tokenizer { skipSpaces(scnr) let ch: string | undefined | null = '' let identifiers = '' - const closure = (ch: string) => (ch !== TokenChars.BraceLeft && ch !== TokenChars.BraceRight) + const closure = (ch: string) => + ch !== TokenChars.BraceLeft && + ch !== TokenChars.BraceRight && + ch !== SPACE && + ch !== NEW_LINE while ((ch = takeChar(scnr, closure))) { identifiers += ch } return identifiers } - const readLinkedModifierArg = (scnr: Scanner): string => { + const readLinkedModifier = (scnr: Scanner): string => { let ch: string | undefined | null = '' let name = '' while ((ch = takeIdentifierChar(scnr))) { @@ -394,10 +412,7 @@ export function createTokenizer(source: string): Tokenizer { return name } - const readLinkedIdentifier = ( - scnr: Scanner, - context: TokenizeContext - ): string => { + const readLinkedRefer = (scnr: Scanner, context: TokenizeContext): string => { const fn = (detect = false, useParentLeft = false, buf: string): string => { const ch = scnr.currentChar() if ( @@ -438,8 +453,11 @@ export function createTokenizer(source: string): Tokenizer { return plural } - const readToken = (scnr: Scanner, context: TokenizeContext): Token => { - let token = { type: TokenTypes.EOF } + const readTokenInPlaceholder = ( + scnr: Scanner, + context: TokenizeContext + ): Token | null => { + let token = null const ch = scnr.currentChar() switch (ch) { case TokenChars.BraceLeft: @@ -453,7 +471,49 @@ export function createTokenizer(source: string): Tokenizer { token = getToken(context, TokenTypes.BraceRight, TokenChars.BraceRight) context.braceNest-- context.braceNest > 0 && skipSpaces(scnr) + if (context.inLinked && context.braceNest === 0) { + context.inLinked = false + } break + default: + let validNamedIdentifier = true + let validListIdentifier = true + if (isPluralStart(scnr)) { + token = getToken(context, TokenTypes.Pipe, readPlural(scnr)) + // reset + context.braceNest = 0 + context.parenNest = 0 + context.inLinked = false + } else if ( + (validNamedIdentifier = isNamedIdentifierStart(scnr, context)) + ) { + token = getToken(context, TokenTypes.Named, readNamedIdentifier(scnr)) + skipSpaces(scnr) + } else if ( + (validListIdentifier = isListIdentifierStart(scnr, context)) + ) { + token = getToken(context, TokenTypes.List, readListIdentifier(scnr)) + skipSpaces(scnr) + } else if (!validNamedIdentifier && !validListIdentifier) { + token = getToken( + context, + TokenTypes.InvalidPlace, + readInvalidIdentifier(scnr) + ) + skipSpaces(scnr) + } + break + } + return token + } + + const readTokenInLinked = ( + scnr: Scanner, + context: TokenizeContext + ): Token | null => { + let token = null + const ch = scnr.currentChar() + switch (ch) { case TokenChars.LinkedAlias: scnr.next() token = getToken( @@ -461,10 +521,13 @@ export function createTokenizer(source: string): Tokenizer { TokenTypes.LinkedAlias, TokenChars.LinkedAlias ) + context.inLinked = true + skipNewLines(scnr) break case TokenChars.LinkedDot: scnr.next() token = getToken(context, TokenTypes.LinkedDot, TokenChars.LinkedDot) + skipNewLines(scnr) break case TokenChars.LinkedDelimiter: scnr.next() @@ -473,65 +536,94 @@ export function createTokenizer(source: string): Tokenizer { TokenTypes.LinkedDelimiter, TokenChars.LinkedDelimiter ) + skipNewLines(scnr) break case TokenChars.ParenLeft: scnr.next() token = getToken(context, TokenTypes.ParenLeft, TokenChars.ParenLeft) + skipSpaces(scnr) + context.parenNest++ break case TokenChars.ParenRight: scnr.next() token = getToken(context, TokenTypes.ParenRight, TokenChars.ParenRight) - break - case TokenChars.Modulo: - scnr.next() - token = getToken(context, TokenTypes.Modulo, TokenChars.Modulo) + context.parenNest-- + context.parenNest > 0 && skipSpaces(scnr) + context.inLinked = false break default: - let validNamedIdentifier = true - let validListIdentifier = true if (isPluralStart(scnr)) { token = getToken(context, TokenTypes.Pipe, readPlural(scnr)) - context.braceNest = 0 // reset - } else if (isTextStart(scnr, context)) { - token = getToken(context, TokenTypes.Text, readText(scnr)) - } else if ( - (validNamedIdentifier = isNamedIdentifierStart(scnr, context)) - ) { - token = getToken(context, TokenTypes.Named, readNamedIdentifier(scnr)) - skipSpaces(scnr) - } else if ( - (validListIdentifier = isListIdentifierStart(scnr, context)) - ) { - token = getToken(context, TokenTypes.List, readListIdentifier(scnr)) - skipSpaces(scnr) - // } else if (!validNamedIdentifier && !validListIdentifier) { - // token = getToken( - // context, - // TokenTypes.InvalidPlace, - // readInvalidIdentifier(scnr) - // ) - // skipSpaces(scnr) - } else if (isLinkedModifier(scnr, context)) { + // reset + context.braceNest = 0 + context.parenNest = 0 + context.inLinked = false + } else if (isLinkedModifierStart(scnr, context)) { token = getToken( context, TokenTypes.LinkedModifier, - readLinkedModifierArg(scnr) + readLinkedModifier(scnr) ) - } else if (isLinkedIdentifier(scnr, context)) { + skipNewLines(scnr) + } else if (isLinkedReferStart(scnr, context)) { if (ch === TokenChars.BraceLeft) { - scnr.next() - token = getToken( - context, - TokenTypes.BraceLeft, - TokenChars.BraceLeft - ) + // scan the placeholder + token = readTokenInPlaceholder(scnr, context) || token } else { token = getToken( context, TokenTypes.LinkedKey, - readLinkedIdentifier(scnr, context) + readLinkedRefer(scnr, context) ) + if (context.parenNest === 0) { + context.inLinked = false + } } + } else { + context.braceNest = 0 + context.parenNest = 0 + context.inLinked = false + token = readToken(scnr, context) + } + break + } + return token + } + + const readToken = (scnr: Scanner, context: TokenizeContext): Token => { + let token = { type: TokenTypes.EOF } + const ch = scnr.currentChar() + + if (context.braceNest > 0) { + return readTokenInPlaceholder(scnr, context) || token + } + + switch (ch) { + case TokenChars.BraceLeft: + token = readTokenInPlaceholder(scnr, context) || token + break + case TokenChars.LinkedAlias: + token = readTokenInLinked(scnr, context) || token + break + case TokenChars.Modulo: + scnr.next() + token = getToken(context, TokenTypes.Modulo, TokenChars.Modulo) + break + default: + if (isPluralStart(scnr)) { + token = getToken(context, TokenTypes.Pipe, readPlural(scnr)) + // reset + context.braceNest = 0 + context.parenNest = 0 + context.inLinked = false + } else if (context.braceNest > 0) { + // scan the placeholder + token = readTokenInPlaceholder(scnr, context) || token + } else if (context.inLinked) { + // scan the linked + token = readTokenInLinked(scnr, context) || token + } else if (isTextStart(scnr, context)) { + token = getToken(context, TokenTypes.Text, readText(scnr)) } break } diff --git a/test/message/__snapshots__/tokenizer.test.ts.snap b/test/message/__snapshots__/tokenizer.test.ts.snap index 472259dce..bc207ff0b 100644 --- a/test/message/__snapshots__/tokenizer.test.ts.snap +++ b/test/message/__snapshots__/tokenizer.test.ts.snap @@ -56,6 +56,266 @@ Array [ ] `; +exports[`token analysis: "@.lower: (no apples) | {1 apple | @:{count apples" 1`] = ` +Array [ + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 1, + "offset": 1, + }, + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 7, + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + "offset": 2, + }, + "start": Object { + "column": 2, + "line": 1, + "offset": 1, + }, + }, + "type": 8, + "value": ".", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + "offset": 7, + }, + "start": Object { + "column": 3, + "line": 1, + "offset": 2, + }, + }, + "type": 11, + "value": "lower", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + "offset": 8, + }, + "start": Object { + "column": 8, + "line": 1, + "offset": 7, + }, + }, + "type": 9, + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + "offset": 20, + }, + "start": Object { + "column": 9, + "line": 1, + "offset": 8, + }, + }, + "type": 0, + "value": " (no apples)", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + "offset": 23, + }, + "start": Object { + "column": 21, + "line": 1, + "offset": 20, + }, + }, + "type": 1, + "value": "|", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + "offset": 24, + }, + "start": Object { + "column": 24, + "line": 1, + "offset": 23, + }, + }, + "type": 2, + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + "offset": 25, + }, + "start": Object { + "column": 25, + "line": 1, + "offset": 24, + }, + }, + "type": 6, + "value": "1", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + "offset": 31, + }, + "start": Object { + "column": 27, + "line": 1, + "offset": 26, + }, + }, + "type": 14, + "value": "apple", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + "offset": 34, + }, + "start": Object { + "column": 33, + "line": 1, + "offset": 32, + }, + }, + "type": 1, + "value": "|", + }, + Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + "offset": 35, + }, + "start": Object { + "column": 35, + "line": 1, + "offset": 34, + }, + }, + "type": 7, + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + "offset": 36, + }, + "start": Object { + "column": 36, + "line": 1, + "offset": 35, + }, + }, + "type": 9, + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + "offset": 37, + }, + "start": Object { + "column": 37, + "line": 1, + "offset": 36, + }, + }, + "type": 2, + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + "offset": 42, + }, + "start": Object { + "column": 38, + "line": 1, + "offset": 37, + }, + }, + "type": 5, + "value": "count", + }, + Object { + "loc": Object { + "end": Object { + "column": 50, + "line": 1, + "offset": 49, + }, + "start": Object { + "column": 43, + "line": 1, + "offset": 42, + }, + }, + "type": 14, + "value": " apples", + }, + Object { + "loc": Object { + "end": Object { + "column": 50, + "line": 1, + "offset": 49, + }, + "start": Object { + "column": 50, + "line": 1, + "offset": 49, + }, + }, + "type": 15, + }, +] +`; + exports[`token analysis: "@.lower:(no apples) | {1} apple | {count} apples" 1`] = ` Array [ Object { @@ -1136,14 +1396,14 @@ Array [ ] `; -exports[`token analysis: "hello world" 1`] = ` +exports[`token analysis: "foo@bar.com" 1`] = ` Array [ Object { "loc": Object { "end": Object { - "column": 12, + "column": 4, "line": 1, - "offset": 11, + "offset": 3, }, "start": Object { "column": 1, @@ -1152,27 +1412,131 @@ Array [ }, }, "type": 0, - "value": "hello world", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 5, "line": 1, - "offset": 11, + "offset": 4, }, "start": Object { - "column": 12, + "column": 4, "line": 1, - "offset": 11, + "offset": 3, }, }, - "type": 15, + "type": 7, + "value": "@", }, -] -`; - -exports[`token analysis: "hello\\nworld" 1`] = ` + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + "offset": 11, + }, + "start": Object { + "column": 5, + "line": 1, + "offset": 4, + }, + }, + "type": 0, + "value": "bar.com", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + "offset": 11, + }, + "start": Object { + "column": 12, + "line": 1, + "offset": 11, + }, + }, + "type": 15, + }, +] +`; + +exports[`token analysis: "hello world" 1`] = ` +Array [ + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + "offset": 11, + }, + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, + "value": "hello world", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + "offset": 11, + }, + "start": Object { + "column": 12, + "line": 1, + "offset": 11, + }, + }, + "type": 15, + }, +] +`; + +exports[`token analysis: "hello\\\\nworld" 1`] = ` +Array [ + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + "offset": 12, + }, + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, + "value": "hello\\\\nworld", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + "offset": 12, + }, + "start": Object { + "column": 13, + "line": 1, + "offset": 12, + }, + }, + "type": 15, + }, +] +`; + +exports[`token analysis: "hello\\nworld" 1`] = ` Array [ Object { "loc": Object { @@ -1209,7 +1573,7 @@ world", ] `; -exports[`token analysis: "hi @.upper:name !" 1`] = ` +exports[`token analysis: "hi @ .lower : {name} !" 1`] = ` Array [ Object { "loc": Object { @@ -1246,9 +1610,9 @@ Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 15, "line": 1, - "offset": 5, + "offset": 14, }, "start": Object { "column": 5, @@ -1256,68 +1620,68 @@ Array [ "offset": 4, }, }, - "type": 8, - "value": ".", + "type": 0, + "value": " .lower : ", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 16, "line": 1, - "offset": 10, + "offset": 15, }, "start": Object { - "column": 6, + "column": 15, "line": 1, - "offset": 5, + "offset": 14, }, }, - "type": 11, - "value": "upper", + "type": 2, + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 20, "line": 1, - "offset": 11, + "offset": 19, }, "start": Object { - "column": 11, + "column": 16, "line": 1, - "offset": 10, + "offset": 15, }, }, - "type": 9, - "value": ":", + "type": 5, + "value": "name", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 21, "line": 1, - "offset": 15, + "offset": 20, }, "start": Object { - "column": 12, + "column": 20, "line": 1, - "offset": 11, + "offset": 19, }, }, - "type": 10, - "value": "name", + "type": 3, + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 23, "line": 1, - "offset": 17, + "offset": 22, }, "start": Object { - "column": 16, + "column": 21, "line": 1, - "offset": 15, + "offset": 20, }, }, "type": 0, @@ -1326,14 +1690,3690 @@ Array [ Object { "loc": Object { "end": Object { - "column": 18, + "column": 23, "line": 1, - "offset": 17, + "offset": 22, + }, + "start": Object { + "column": 23, + "line": 1, + "offset": 22, + }, + }, + "type": 15, + }, +] +`; + +exports[`token analysis: "hi @ :name !" 1`] = ` +Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, + "value": "hi ", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + "offset": 4, + }, + "start": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + }, + "type": 7, + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + "offset": 12, + }, + "start": Object { + "column": 5, + "line": 1, + "offset": 4, + }, + }, + "type": 0, + "value": " :name !", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + "offset": 12, + }, + "start": Object { + "column": 13, + "line": 1, + "offset": 12, + }, + }, + "type": 15, + }, +] +`; + +exports[`token analysis: "hi @. {name} !" 1`] = ` +Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, + "value": "hi ", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + "offset": 4, + }, + "start": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + }, + "type": 7, + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + "offset": 5, + }, + "start": Object { + "column": 5, + "line": 1, + "offset": 4, + }, + }, + "type": 8, + "value": ".", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + "offset": 6, + }, + "start": Object { + "column": 6, + "line": 1, + "offset": 5, + }, + }, + "type": 0, + "value": " ", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + "offset": 7, + }, + "start": Object { + "column": 7, + "line": 1, + "offset": 6, + }, + }, + "type": 2, + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + "offset": 11, + }, + "start": Object { + "column": 8, + "line": 1, + "offset": 7, + }, + }, + "type": 5, + "value": "name", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + "offset": 12, + }, + "start": Object { + "column": 12, + "line": 1, + "offset": 11, + }, + }, + "type": 3, + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + "offset": 14, + }, + "start": Object { + "column": 13, + "line": 1, + "offset": 12, + }, + }, + "type": 0, + "value": " !", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + "offset": 14, + }, + "start": Object { + "column": 15, + "line": 1, + "offset": 14, + }, + }, + "type": 15, + }, +] +`; + +exports[`token analysis: "hi @.upper {name} !" 1`] = ` +Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, + "value": "hi ", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + "offset": 4, + }, + "start": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + }, + "type": 7, + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + "offset": 5, + }, + "start": Object { + "column": 5, + "line": 1, + "offset": 4, + }, + }, + "type": 8, + "value": ".", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + "start": Object { + "column": 6, + "line": 1, + "offset": 5, + }, + }, + "type": 11, + "value": "upper", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + "offset": 11, + }, + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "type": 0, + "value": " ", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + "offset": 12, + }, + "start": Object { + "column": 12, + "line": 1, + "offset": 11, + }, + }, + "type": 2, + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + "offset": 16, + }, + "start": Object { + "column": 13, + "line": 1, + "offset": 12, + }, + }, + "type": 5, + "value": "name", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + "offset": 17, + }, + "start": Object { + "column": 17, + "line": 1, + "offset": 16, + }, + }, + "type": 3, + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + "offset": 19, + }, + "start": Object { + "column": 18, + "line": 1, + "offset": 17, + }, + }, + "type": 0, + "value": " !", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + "offset": 19, + }, + "start": Object { + "column": 20, + "line": 1, + "offset": 19, + }, + }, + "type": 15, + }, +] +`; + +exports[`token analysis: "hi @.upper:name !" 1`] = ` +Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, + "value": "hi ", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + "offset": 4, + }, + "start": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + }, + "type": 7, + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + "offset": 5, + }, + "start": Object { + "column": 5, + "line": 1, + "offset": 4, + }, + }, + "type": 8, + "value": ".", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + "start": Object { + "column": 6, + "line": 1, + "offset": 5, + }, + }, + "type": 11, + "value": "upper", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + "offset": 11, + }, + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "type": 9, + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + "offset": 15, + }, + "start": Object { + "column": 12, + "line": 1, + "offset": 11, + }, + }, + "type": 10, + "value": "name", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + "offset": 17, + }, + "start": Object { + "column": 16, + "line": 1, + "offset": 15, + }, + }, + "type": 0, + "value": " !", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + "offset": 17, + }, + "start": Object { + "column": 18, + "line": 1, + "offset": 17, + }, + }, + "type": 15, + }, +] +`; + +exports[`token analysis: "hi @: (name) !" 1`] = ` +Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, + "value": "hi ", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + "offset": 4, + }, + "start": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + }, + "type": 7, + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + "offset": 5, + }, + "start": Object { + "column": 5, + "line": 1, + "offset": 4, + }, + }, + "type": 9, + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + "offset": 14, + }, + "start": Object { + "column": 6, + "line": 1, + "offset": 5, + }, + }, + "type": 0, + "value": " (name) !", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + "offset": 14, + }, + "start": Object { + "column": 15, + "line": 1, + "offset": 14, + }, + }, + "type": 15, + }, +] +`; + +exports[`token analysis: "hi @: {name} !" 1`] = ` +Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, + "value": "hi ", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + "offset": 4, + }, + "start": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + }, + "type": 7, + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + "offset": 5, + }, + "start": Object { + "column": 5, + "line": 1, + "offset": 4, + }, + }, + "type": 9, + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + "offset": 6, + }, + "start": Object { + "column": 6, + "line": 1, + "offset": 5, + }, + }, + "type": 0, + "value": " ", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + "offset": 7, + }, + "start": Object { + "column": 7, + "line": 1, + "offset": 6, + }, + }, + "type": 2, + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + "offset": 11, + }, + "start": Object { + "column": 8, + "line": 1, + "offset": 7, + }, + }, + "type": 5, + "value": "name", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + "offset": 12, + }, + "start": Object { + "column": 12, + "line": 1, + "offset": 11, + }, + }, + "type": 3, + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + "offset": 14, + }, + "start": Object { + "column": 13, + "line": 1, + "offset": 12, + }, + }, + "type": 0, + "value": " !", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + "offset": 14, + }, + "start": Object { + "column": 15, + "line": 1, + "offset": 14, + }, + }, + "type": 15, + }, +] +`; + +exports[`token analysis: "hi @:( name ) !" 1`] = ` +Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, + "value": "hi ", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + "offset": 4, + }, + "start": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + }, + "type": 7, + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + "offset": 5, + }, + "start": Object { + "column": 5, + "line": 1, + "offset": 4, + }, + }, + "type": 9, + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + "offset": 6, + }, + "start": Object { + "column": 6, + "line": 1, + "offset": 5, + }, + }, + "type": 12, + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + "offset": 12, + }, + "start": Object { + "column": 8, + "line": 1, + "offset": 7, + }, + }, + "type": 10, + "value": "name ", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + "offset": 13, + }, + "start": Object { + "column": 13, + "line": 1, + "offset": 12, + }, + }, + "type": 13, + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + "offset": 15, + }, + "start": Object { + "column": 14, + "line": 1, + "offset": 13, + }, + }, + "type": 0, + "value": " !", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + "offset": 15, + }, + "start": Object { + "column": 16, + "line": 1, + "offset": 15, + }, + }, + "type": 15, + }, +] +`; + +exports[`token analysis: "hi @:(hello world) !" 1`] = ` +Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, + "value": "hi ", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + "offset": 4, + }, + "start": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + }, + "type": 7, + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + "offset": 5, + }, + "start": Object { + "column": 5, + "line": 1, + "offset": 4, + }, + }, + "type": 9, + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + "offset": 6, + }, + "start": Object { + "column": 6, + "line": 1, + "offset": 5, + }, + }, + "type": 12, + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + "offset": 17, + }, + "start": Object { + "column": 7, + "line": 1, + "offset": 6, + }, + }, + "type": 10, + "value": "hello world", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + "offset": 18, + }, + "start": Object { + "column": 18, + "line": 1, + "offset": 17, + }, + }, + "type": 13, + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + "offset": 20, + }, + "start": Object { + "column": 19, + "line": 1, + "offset": 18, + }, + }, + "type": 0, + "value": " !", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + "offset": 20, + }, + "start": Object { + "column": 21, + "line": 1, + "offset": 20, + }, + }, + "type": 15, + }, +] +`; + +exports[`token analysis: "hi @:\\nname !" 1`] = ` +Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, + "value": "hi ", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + "offset": 4, + }, + "start": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + }, + "type": 7, + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + "offset": 5, + }, + "start": Object { + "column": 5, + "line": 1, + "offset": 4, + }, + }, + "type": 9, + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + "offset": 10, + }, + "start": Object { + "column": 1, + "line": 2, + "offset": 6, + }, + }, + "type": 10, + "value": "name", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + "offset": 12, + }, + "start": Object { + "column": 5, + "line": 2, + "offset": 10, + }, + }, + "type": 0, + "value": " !", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + "offset": 12, + }, + "start": Object { + "column": 7, + "line": 2, + "offset": 12, + }, + }, + "type": 15, + }, +] +`; + +exports[`token analysis: "hi @:{ {name} } !" 1`] = ` +Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, + "value": "hi ", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + "offset": 4, + }, + "start": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + }, + "type": 7, + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + "offset": 5, + }, + "start": Object { + "column": 5, + "line": 1, + "offset": 4, + }, + }, + "type": 9, + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + "offset": 6, + }, + "start": Object { + "column": 6, + "line": 1, + "offset": 5, + }, + }, + "type": 2, + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + "offset": 8, + }, + "start": Object { + "column": 8, + "line": 1, + "offset": 7, + }, + }, + "type": 2, + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + "offset": 12, + }, + "start": Object { + "column": 9, + "line": 1, + "offset": 8, + }, + }, + "type": 5, + "value": "name", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + "offset": 13, + }, + "start": Object { + "column": 13, + "line": 1, + "offset": 12, + }, + }, + "type": 3, + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + "offset": 15, + }, + "start": Object { + "column": 15, + "line": 1, + "offset": 14, + }, + }, + "type": 3, + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + "offset": 17, + }, + "start": Object { + "column": 16, + "line": 1, + "offset": 15, + }, + }, + "type": 0, + "value": " !", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + "offset": 17, + }, + "start": Object { + "column": 18, + "line": 1, + "offset": 17, + }, + }, + "type": 15, + }, +] +`; + +exports[`token analysis: "hi @:{ name } !" 1`] = ` +Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, + "value": "hi ", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + "offset": 4, + }, + "start": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + }, + "type": 7, + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + "offset": 5, + }, + "start": Object { + "column": 5, + "line": 1, + "offset": 4, + }, + }, + "type": 9, + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + "offset": 6, + }, + "start": Object { + "column": 6, + "line": 1, + "offset": 5, + }, + }, + "type": 2, + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + "offset": 11, + }, + "start": Object { + "column": 8, + "line": 1, + "offset": 7, + }, + }, + "type": 5, + "value": "name", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + "offset": 13, + }, + "start": Object { + "column": 13, + "line": 1, + "offset": 12, + }, + }, + "type": 3, + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + "offset": 15, + }, + "start": Object { + "column": 14, + "line": 1, + "offset": 13, + }, + }, + "type": 0, + "value": " !", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + "offset": 15, + }, + "start": Object { + "column": 16, + "line": 1, + "offset": 15, + }, + }, + "type": 15, + }, +] +`; + +exports[`token analysis: "hi @:{name} @:{0}!" 1`] = ` +Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, + "value": "hi ", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + "offset": 4, + }, + "start": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + }, + "type": 7, + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + "offset": 5, + }, + "start": Object { + "column": 5, + "line": 1, + "offset": 4, + }, + }, + "type": 9, + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + "offset": 6, + }, + "start": Object { + "column": 6, + "line": 1, + "offset": 5, + }, + }, + "type": 2, + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + "start": Object { + "column": 7, + "line": 1, + "offset": 6, + }, + }, + "type": 5, + "value": "name", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + "offset": 11, + }, + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "type": 3, + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + "offset": 12, + }, + "start": Object { + "column": 12, + "line": 1, + "offset": 11, + }, + }, + "type": 0, + "value": " ", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + "offset": 13, + }, + "start": Object { + "column": 13, + "line": 1, + "offset": 12, + }, + }, + "type": 7, + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + "offset": 14, + }, + "start": Object { + "column": 14, + "line": 1, + "offset": 13, + }, + }, + "type": 9, + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + "offset": 15, + }, + "start": Object { + "column": 15, + "line": 1, + "offset": 14, + }, + }, + "type": 2, + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + "offset": 16, + }, + "start": Object { + "column": 16, + "line": 1, + "offset": 15, + }, + }, + "type": 6, + "value": "0", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + "offset": 17, + }, + "start": Object { + "column": 17, + "line": 1, + "offset": 16, + }, + }, + "type": 3, + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + "offset": 18, + }, + "start": Object { + "column": 18, + "line": 1, + "offset": 17, + }, + }, + "type": 0, + "value": "!", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + "offset": 18, + }, + "start": Object { + "column": 19, + "line": 1, + "offset": 18, + }, + }, + "type": 15, + }, +] +`; + +exports[`token analysis: "hi @:{name}\\n !" 1`] = ` +Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, + "value": "hi ", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + "offset": 4, + }, + "start": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + }, + "type": 7, + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + "offset": 5, + }, + "start": Object { + "column": 5, + "line": 1, + "offset": 4, + }, + }, + "type": 9, + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + "offset": 6, + }, + "start": Object { + "column": 6, + "line": 1, + "offset": 5, + }, + }, + "type": 2, + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + "start": Object { + "column": 7, + "line": 1, + "offset": 6, + }, + }, + "type": 5, + "value": "name", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + "offset": 11, + }, + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "type": 3, + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 2, + "offset": 14, + }, + "start": Object { + "column": 12, + "line": 1, + "offset": 11, + }, + }, + "type": 0, + "value": " + !", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 2, + "offset": 14, + }, + "start": Object { + "column": 3, + "line": 2, + "offset": 14, + }, + }, + "type": 15, + }, +] +`; + +exports[`token analysis: "hi @:name !" 1`] = ` +Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, + "value": "hi ", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + "offset": 4, + }, + "start": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + }, + "type": 7, + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + "offset": 5, + }, + "start": Object { + "column": 5, + "line": 1, + "offset": 4, + }, + }, + "type": 9, + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + "offset": 9, + }, + "start": Object { + "column": 6, + "line": 1, + "offset": 5, + }, + }, + "type": 10, + "value": "name", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + "offset": 11, + }, + "start": Object { + "column": 10, + "line": 1, + "offset": 9, + }, + }, + "type": 0, + "value": " !", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + "offset": 11, + }, + "start": Object { + "column": 12, + "line": 1, + "offset": 11, + }, + }, + "type": 15, + }, +] +`; + +exports[`token analysis: "hi @\\n.\\nupper\\n:\\n(name)\\n !" 1`] = ` +Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, + "value": "hi ", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + "offset": 4, + }, + "start": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + }, + "type": 7, + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 2, + "offset": 6, + }, + "start": Object { + "column": 1, + "line": 2, + "offset": 5, + }, + }, + "type": 8, + "value": ".", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 3, + "offset": 12, + }, + "start": Object { + "column": 1, + "line": 3, + "offset": 7, + }, + }, + "type": 11, + "value": "upper", + }, + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 4, + "offset": 14, + }, + "start": Object { + "column": 1, + "line": 4, + "offset": 13, + }, + }, + "type": 9, + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 5, + "offset": 16, + }, + "start": Object { + "column": 1, + "line": 5, + "offset": 15, + }, + }, + "type": 12, + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 5, + "offset": 20, + }, + "start": Object { + "column": 2, + "line": 5, + "offset": 16, + }, + }, + "type": 10, + "value": "name", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 5, + "offset": 21, + }, + "start": Object { + "column": 6, + "line": 5, + "offset": 20, + }, + }, + "type": 13, + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 6, + "offset": 24, + }, + "start": Object { + "column": 7, + "line": 5, + "offset": 21, + }, + }, + "type": 0, + "value": " + !", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 6, + "offset": 24, + }, + "start": Object { + "column": 3, + "line": 6, + "offset": 24, + }, + }, + "type": 15, + }, +] +`; + +exports[`token analysis: "hi \\n@\\n.\\nupper\\n:\\n{ name }\\n !" 1`] = ` +Array [ + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 2, + "offset": 4, + }, + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, + "value": "hi +", + }, + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 2, + "offset": 5, + }, + "start": Object { + "column": 1, + "line": 2, + "offset": 4, + }, + }, + "type": 7, + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 3, + "offset": 7, + }, + "start": Object { + "column": 1, + "line": 3, + "offset": 6, + }, + }, + "type": 8, + "value": ".", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 4, + "offset": 13, + }, + "start": Object { + "column": 1, + "line": 4, + "offset": 8, + }, + }, + "type": 11, + "value": "upper", + }, + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 5, + "offset": 15, + }, + "start": Object { + "column": 1, + "line": 5, + "offset": 14, + }, + }, + "type": 9, + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 6, + "offset": 17, + }, + "start": Object { + "column": 1, + "line": 6, + "offset": 16, + }, + }, + "type": 2, + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 6, + "offset": 22, + }, + "start": Object { + "column": 3, + "line": 6, + "offset": 18, + }, + }, + "type": 5, + "value": "name", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 6, + "offset": 24, + }, + "start": Object { + "column": 8, + "line": 6, + "offset": 23, + }, + }, + "type": 3, + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 7, + "offset": 27, + }, + "start": Object { + "column": 9, + "line": 6, + "offset": 24, + }, + }, + "type": 0, + "value": " + !", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 7, + "offset": 27, + }, + "start": Object { + "column": 3, + "line": 7, + "offset": 27, + }, + }, + "type": 15, + }, +] +`; + +exports[`token analysis: "hi { | hello {name} !" 1`] = ` +Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, + "value": "hi ", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + "offset": 4, + }, + "start": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + }, + "type": 2, + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + "offset": 8, + }, + "start": Object { + "column": 7, + "line": 1, + "offset": 6, + }, + }, + "type": 1, + "value": "|", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + "offset": 14, + }, + "start": Object { + "column": 9, + "line": 1, + "offset": 8, + }, + }, + "type": 0, + "value": "hello ", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + "offset": 15, + }, + "start": Object { + "column": 15, + "line": 1, + "offset": 14, + }, + }, + "type": 2, + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + "offset": 19, + }, + "start": Object { + "column": 16, + "line": 1, + "offset": 15, + }, + }, + "type": 5, + "value": "name", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + "offset": 20, + }, + "start": Object { + "column": 20, + "line": 1, + "offset": 19, + }, + }, + "type": 3, + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + "offset": 22, + }, + "start": Object { + "column": 21, + "line": 1, + "offset": 20, + }, + }, + "type": 0, + "value": " !", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + "offset": 22, + }, + "start": Object { + "column": 23, + "line": 1, + "offset": 22, + }, + }, + "type": 15, + }, +] +`; + +exports[`token analysis: "hi { } !" 1`] = ` +Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, + "value": "hi ", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + "offset": 4, + }, + "start": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + }, + "type": 2, + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + "offset": 7, + }, + "start": Object { + "column": 7, + "line": 1, + "offset": 6, + }, + }, + "type": 3, + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + "offset": 9, + }, + "start": Object { + "column": 8, + "line": 1, + "offset": 7, + }, + }, + "type": 0, + "value": " !", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + "offset": 9, + }, + "start": Object { + "column": 10, + "line": 1, + "offset": 9, + }, + }, + "type": 15, + }, +] +`; + +exports[`token analysis: "hi { -1 } !" 1`] = ` +Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, + "value": "hi ", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + "offset": 4, + }, + "start": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + }, + "type": 2, + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + "offset": 8, + }, + "start": Object { + "column": 7, + "line": 1, + "offset": 6, + }, + }, + "type": 6, + "value": "-1", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + "start": Object { + "column": 10, + "line": 1, + "offset": 9, + }, + }, + "type": 3, + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + "offset": 12, + }, + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "type": 0, + "value": " !", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + "offset": 12, + }, + "start": Object { + "column": 13, + "line": 1, + "offset": 12, + }, + }, + "type": 15, + }, +] +`; + +exports[`token analysis: "hi { 0 !" 1`] = ` +Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, + "value": "hi ", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + "offset": 4, + }, + "start": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + }, + "type": 2, + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + "offset": 7, + }, + "start": Object { + "column": 7, + "line": 1, + "offset": 6, + }, + }, + "type": 6, + "value": "0", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + "offset": 9, + }, + "start": Object { + "column": 9, + "line": 1, + "offset": 8, + }, + }, + "type": 14, + "value": "!", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + "offset": 9, + }, + "start": Object { + "column": 10, + "line": 1, + "offset": 9, + }, + }, + "type": 15, + }, +] +`; + +exports[`token analysis: "hi { name !" 1`] = ` +Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, + "value": "hi ", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + "offset": 4, + }, + "start": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + }, + "type": 2, + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + "start": Object { + "column": 7, + "line": 1, + "offset": 6, + }, + }, + "type": 5, + "value": "name", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + "offset": 12, + }, + "start": Object { + "column": 12, + "line": 1, + "offset": 11, + }, + }, + "type": 14, + "value": "!", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + "offset": 12, + }, + "start": Object { + "column": 13, + "line": 1, + "offset": 12, + }, + }, + "type": 15, + }, +] +`; + +exports[`token analysis: "hi { name } !" 1`] = ` +Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, + "value": "hi ", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + "offset": 4, + }, + "start": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + }, + "type": 2, + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + "start": Object { + "column": 7, + "line": 1, + "offset": 6, + }, + }, + "type": 5, + "value": "name", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + "offset": 12, + }, + "start": Object { + "column": 12, + "line": 1, + "offset": 11, + }, + }, + "type": 3, + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + "offset": 14, + }, + "start": Object { + "column": 13, + "line": 1, + "offset": 12, + }, + }, + "type": 0, + "value": " !", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + "offset": 14, + }, + "start": Object { + "column": 15, + "line": 1, + "offset": 14, + }, + }, + "type": 15, + }, +] +`; + +exports[`token analysis: "hi { @:name | hello {name} !" 1`] = ` +Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, + "value": "hi ", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + "offset": 4, + }, + "start": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + }, + "type": 2, + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + "offset": 11, + }, + "start": Object { + "column": 6, + "line": 1, + "offset": 5, + }, + }, + "type": 14, + "value": "@:name", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + "offset": 15, + }, + "start": Object { + "column": 14, + "line": 1, + "offset": 13, + }, + }, + "type": 1, + "value": "|", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + "offset": 21, + }, + "start": Object { + "column": 16, + "line": 1, + "offset": 15, + }, + }, + "type": 0, + "value": "hello ", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + "offset": 22, + }, + "start": Object { + "column": 22, + "line": 1, + "offset": 21, + }, + }, + "type": 2, + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + "offset": 26, + }, + "start": Object { + "column": 23, + "line": 1, + "offset": 22, + }, + }, + "type": 5, + "value": "name", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + "offset": 27, + }, + "start": Object { + "column": 27, + "line": 1, + "offset": 26, + }, + }, + "type": 3, + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + "offset": 29, + }, + "start": Object { + "column": 28, + "line": 1, + "offset": 27, + }, + }, + "type": 0, + "value": " !", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + "offset": 29, + }, + "start": Object { + "column": 30, + "line": 1, + "offset": 29, + }, + }, + "type": 15, + }, +] +`; + +exports[`token analysis: "hi { @:name !" 1`] = ` +Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, + "value": "hi ", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + "offset": 4, + }, + "start": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + }, + "type": 2, + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + "offset": 11, + }, + "start": Object { + "column": 6, + "line": 1, + "offset": 5, + }, + }, + "type": 14, + "value": "@:name", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + "offset": 13, + }, + "start": Object { + "column": 13, + "line": 1, + "offset": 12, + }, + }, + "type": 14, + "value": "!", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + "offset": 13, + }, + "start": Object { + "column": 14, + "line": 1, + "offset": 13, + }, + }, + "type": 15, + }, +] +`; + +exports[`token analysis: "hi { { 0 } } !" 1`] = ` +Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, + "value": "hi ", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + "offset": 4, + }, + "start": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + }, + "type": 2, + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + "offset": 6, + }, + "start": Object { + "column": 6, + "line": 1, + "offset": 5, + }, + }, + "type": 2, + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + "offset": 8, + }, + "start": Object { + "column": 8, + "line": 1, + "offset": 7, + }, + }, + "type": 6, + "value": "0", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + "start": Object { + "column": 10, + "line": 1, + "offset": 9, + }, + }, + "type": 3, + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + "offset": 12, + }, + "start": Object { + "column": 12, + "line": 1, + "offset": 11, + }, + }, + "type": 3, + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + "offset": 14, + }, + "start": Object { + "column": 13, + "line": 1, + "offset": 12, + }, + }, + "type": 0, + "value": " !", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + "offset": 14, + }, + "start": Object { + "column": 15, + "line": 1, + "offset": 14, + }, + }, + "type": 15, + }, +] +`; + +exports[`token analysis: "hi { { name } } !" 1`] = ` +Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, + "value": "hi ", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + "offset": 4, + }, + "start": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + }, + "type": 2, + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + "offset": 6, + }, + "start": Object { + "column": 6, + "line": 1, + "offset": 5, + }, + }, + "type": 2, + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + "offset": 11, + }, + "start": Object { + "column": 8, + "line": 1, + "offset": 7, + }, + }, + "type": 5, + "value": "name", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + "offset": 13, + }, + "start": Object { + "column": 13, + "line": 1, + "offset": 12, + }, + }, + "type": 3, + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + "offset": 15, + }, + "start": Object { + "column": 15, + "line": 1, + "offset": 14, + }, + }, + "type": 3, + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + "offset": 17, + }, + "start": Object { + "column": 16, + "line": 1, + "offset": 15, + }, + }, + "type": 0, + "value": " !", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + "offset": 17, + }, + "start": Object { + "column": 18, + "line": 1, + "offset": 17, + }, + }, + "type": 15, + }, +] +`; + +exports[`token analysis: "hi { name !" 1`] = ` +Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, + "value": "hi ", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + "offset": 4, + }, + "start": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + }, + "type": 2, + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + "offset": 9, + }, + "start": Object { + "column": 6, + "line": 1, + "offset": 5, + }, + }, + "type": 5, + "value": "name", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + "offset": 11, + }, + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "type": 14, + "value": "!", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + "offset": 11, + }, + "start": Object { + "column": 12, + "line": 1, + "offset": 11, + }, + }, + "type": 15, + }, +] +`; + +exports[`token analysis: "hi {$} !" 1`] = ` +Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, + "value": "hi ", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + "offset": 4, + }, + "start": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + }, + "type": 2, + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + "offset": 5, + }, + "start": Object { + "column": 5, + "line": 1, + "offset": 4, + }, + }, + "type": 14, + "value": "$", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + "offset": 6, + }, + "start": Object { + "column": 6, + "line": 1, + "offset": 5, + }, + }, + "type": 3, + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + "offset": 8, + }, + "start": Object { + "column": 7, + "line": 1, + "offset": 6, + }, + }, + "type": 0, + "value": " !", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + "offset": 8, + }, + "start": Object { + "column": 9, + "line": 1, + "offset": 8, + }, + }, + "type": 15, + }, +] +`; + +exports[`token analysis: "hi {@.lower:name !" 1`] = ` +Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, + "value": "hi ", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + "offset": 4, + }, + "start": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + }, + "type": 2, + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + "offset": 16, + }, + "start": Object { + "column": 5, + "line": 1, + "offset": 4, + }, + }, + "type": 14, + "value": "@.lower:name", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + "offset": 18, + }, + "start": Object { + "column": 18, + "line": 1, + "offset": 17, + }, + }, + "type": 14, + "value": "!", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + "offset": 18, + }, + "start": Object { + "column": 19, + "line": 1, + "offset": 18, + }, + }, + "type": 15, + }, +] +`; + +exports[`token analysis: "hi {\\nname\\n} !" 1`] = ` +Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, + "value": "hi ", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + "offset": 4, + }, + "start": Object { + "column": 4, + "line": 1, + "offset": 3, + }, + }, + "type": 2, + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + "offset": 9, + }, + "start": Object { + "column": 1, + "line": 2, + "offset": 5, + }, + }, + "type": 5, + "value": "name", + }, + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 3, + "offset": 11, + }, + "start": Object { + "column": 1, + "line": 3, + "offset": 10, + }, + }, + "type": 3, + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 3, + "offset": 13, + }, + "start": Object { + "column": 2, + "line": 3, + "offset": 11, + }, + }, + "type": 0, + "value": " !", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 3, + "offset": 13, }, "start": Object { - "column": 18, - "line": 1, - "offset": 17, + "column": 4, + "line": 3, + "offset": 13, }, }, "type": 15, @@ -1341,7 +5381,7 @@ Array [ ] `; -exports[`token analysis: "hi @:(hello world) !" 1`] = ` +exports[`token analysis: "hi {{}} !" 1`] = ` Array [ Object { "loc": Object { @@ -1372,8 +5412,8 @@ Array [ "offset": 3, }, }, - "type": 7, - "value": "@", + "type": 2, + "value": "{", }, Object { "loc": Object { @@ -1388,8 +5428,8 @@ Array [ "offset": 4, }, }, - "type": 9, - "value": ":", + "type": 2, + "value": "{", }, Object { "loc": Object { @@ -1404,15 +5444,15 @@ Array [ "offset": 5, }, }, - "type": 12, - "value": "(", + "type": 3, + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 8, "line": 1, - "offset": 17, + "offset": 7, }, "start": Object { "column": 7, @@ -1420,36 +5460,20 @@ Array [ "offset": 6, }, }, - "type": 10, - "value": "hello world", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - "offset": 18, - }, - "start": Object { - "column": 18, - "line": 1, - "offset": 17, - }, - }, - "type": 13, - "value": ")", + "type": 3, + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 10, "line": 1, - "offset": 20, + "offset": 9, }, "start": Object { - "column": 19, + "column": 8, "line": 1, - "offset": 18, + "offset": 7, }, }, "type": 0, @@ -1458,14 +5482,14 @@ Array [ Object { "loc": Object { "end": Object { - "column": 21, + "column": 10, "line": 1, - "offset": 20, + "offset": 9, }, "start": Object { - "column": 21, + "column": 10, "line": 1, - "offset": 20, + "offset": 9, }, }, "type": 15, @@ -1473,7 +5497,7 @@ Array [ ] `; -exports[`token analysis: "hi @:{name} @:{0}!" 1`] = ` +exports[`token analysis: "hi {{0}} !" 1`] = ` Array [ Object { "loc": Object { @@ -1504,8 +5528,8 @@ Array [ "offset": 3, }, }, - "type": 7, - "value": "@", + "type": 2, + "value": "{", }, Object { "loc": Object { @@ -1520,8 +5544,8 @@ Array [ "offset": 4, }, }, - "type": 9, - "value": ":", + "type": 2, + "value": "{", }, Object { "loc": Object { @@ -1536,15 +5560,15 @@ Array [ "offset": 5, }, }, - "type": 2, - "value": "{", + "type": 6, + "value": "0", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 8, "line": 1, - "offset": 10, + "offset": 7, }, "start": Object { "column": 7, @@ -1552,20 +5576,20 @@ Array [ "offset": 6, }, }, - "type": 5, - "value": "name", + "type": 3, + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 9, "line": 1, - "offset": 11, + "offset": 8, }, "start": Object { - "column": 11, + "column": 8, "line": 1, - "offset": 10, + "offset": 7, }, }, "type": 3, @@ -1574,62 +5598,66 @@ Array [ Object { "loc": Object { "end": Object { - "column": 13, + "column": 11, "line": 1, - "offset": 12, + "offset": 10, }, "start": Object { - "column": 12, + "column": 9, "line": 1, - "offset": 11, + "offset": 8, }, }, "type": 0, - "value": " ", + "value": " !", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 11, "line": 1, - "offset": 13, + "offset": 10, }, "start": Object { - "column": 13, + "column": 11, "line": 1, - "offset": 12, + "offset": 10, }, }, - "type": 7, - "value": "@", + "type": 15, }, +] +`; + +exports[`token analysis: "hi {{name}} !" 1`] = ` +Array [ Object { "loc": Object { "end": Object { - "column": 15, + "column": 4, "line": 1, - "offset": 14, + "offset": 3, }, "start": Object { - "column": 14, + "column": 1, "line": 1, - "offset": 13, + "offset": 0, }, }, - "type": 9, - "value": ":", + "type": 0, + "value": "hi ", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 5, "line": 1, - "offset": 15, + "offset": 4, }, "start": Object { - "column": 15, + "column": 4, "line": 1, - "offset": 14, + "offset": 3, }, }, "type": 2, @@ -1638,130 +5666,130 @@ Array [ Object { "loc": Object { "end": Object { - "column": 17, + "column": 6, "line": 1, - "offset": 16, + "offset": 5, }, "start": Object { - "column": 16, + "column": 5, "line": 1, - "offset": 15, + "offset": 4, }, }, - "type": 6, - "value": "0", + "type": 2, + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 10, "line": 1, - "offset": 17, + "offset": 9, }, "start": Object { - "column": 17, + "column": 6, "line": 1, - "offset": 16, + "offset": 5, }, }, - "type": 3, - "value": "}", + "type": 5, + "value": "name", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 11, "line": 1, - "offset": 18, + "offset": 10, }, "start": Object { - "column": 18, + "column": 10, "line": 1, - "offset": 17, + "offset": 9, }, }, - "type": 0, - "value": "!", + "type": 3, + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 12, "line": 1, - "offset": 18, + "offset": 11, }, "start": Object { - "column": 19, + "column": 11, "line": 1, - "offset": 18, + "offset": 10, }, }, - "type": 15, + "type": 3, + "value": "}", }, -] -`; - -exports[`token analysis: "hi @:{name}\\n !" 1`] = ` -Array [ Object { "loc": Object { "end": Object { - "column": 4, + "column": 14, "line": 1, - "offset": 3, + "offset": 13, }, "start": Object { - "column": 1, + "column": 12, "line": 1, - "offset": 0, + "offset": 11, }, }, "type": 0, - "value": "hi ", + "value": " !", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 14, "line": 1, - "offset": 4, + "offset": 13, }, "start": Object { - "column": 4, + "column": 14, "line": 1, - "offset": 3, + "offset": 13, }, }, - "type": 7, - "value": "@", + "type": 15, }, +] +`; + +exports[`token analysis: "hi {} !" 1`] = ` +Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 4, "line": 1, - "offset": 5, + "offset": 3, }, "start": Object { - "column": 5, + "column": 1, "line": 1, - "offset": 4, + "offset": 0, }, }, - "type": 9, - "value": ":", + "type": 0, + "value": "hi ", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 5, "line": 1, - "offset": 6, + "offset": 4, }, "start": Object { - "column": 6, + "column": 4, "line": 1, - "offset": 5, + "offset": 3, }, }, "type": 2, @@ -1770,30 +5798,14 @@ Array [ Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, - "offset": 10, - }, - "start": Object { - "column": 7, - "line": 1, - "offset": 6, - }, - }, - "type": 5, - "value": "name", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, + "column": 6, "line": 1, - "offset": 11, + "offset": 5, }, "start": Object { - "column": 11, + "column": 5, "line": 1, - "offset": 10, + "offset": 4, }, }, "type": 3, @@ -1802,31 +5814,30 @@ Array [ Object { "loc": Object { "end": Object { - "column": 3, - "line": 2, - "offset": 14, + "column": 8, + "line": 1, + "offset": 7, }, "start": Object { - "column": 12, + "column": 6, "line": 1, - "offset": 11, + "offset": 5, }, }, "type": 0, - "value": " - !", + "value": " !", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 2, - "offset": 14, + "column": 8, + "line": 1, + "offset": 7, }, "start": Object { - "column": 3, - "line": 2, - "offset": 14, + "column": 8, + "line": 1, + "offset": 7, }, }, "type": 15, @@ -1834,7 +5845,7 @@ Array [ ] `; -exports[`token analysis: "hi @:name !" 1`] = ` +exports[`token analysis: "hi {-} !" 1`] = ` Array [ Object { "loc": Object { @@ -1865,8 +5876,8 @@ Array [ "offset": 3, }, }, - "type": 7, - "value": "@", + "type": 2, + "value": "{", }, Object { "loc": Object { @@ -1881,15 +5892,15 @@ Array [ "offset": 4, }, }, - "type": 9, - "value": ":", + "type": 14, + "value": "-", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 7, "line": 1, - "offset": 9, + "offset": 6, }, "start": Object { "column": 6, @@ -1897,20 +5908,20 @@ Array [ "offset": 5, }, }, - "type": 10, - "value": "name", + "type": 3, + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 9, "line": 1, - "offset": 11, + "offset": 8, }, "start": Object { - "column": 10, + "column": 7, "line": 1, - "offset": 9, + "offset": 6, }, }, "type": 0, @@ -1919,14 +5930,14 @@ Array [ Object { "loc": Object { "end": Object { - "column": 12, + "column": 9, "line": 1, - "offset": 11, + "offset": 8, }, "start": Object { - "column": 12, + "column": 9, "line": 1, - "offset": 11, + "offset": 8, }, }, "type": 15, @@ -1934,7 +5945,7 @@ Array [ ] `; -exports[`token analysis: "hi { -1 } !" 1`] = ` +exports[`token analysis: "hi {0 !" 1`] = ` Array [ Object { "loc": Object { @@ -1971,62 +5982,46 @@ Array [ Object { "loc": Object { "end": Object { - "column": 9, + "column": 6, "line": 1, - "offset": 8, + "offset": 5, }, "start": Object { - "column": 7, + "column": 5, "line": 1, - "offset": 6, + "offset": 4, }, }, "type": 6, - "value": "-1", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - "offset": 10, - }, - "start": Object { - "column": 10, - "line": 1, - "offset": 9, - }, - }, - "type": 3, - "value": "}", + "value": "0", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 8, "line": 1, - "offset": 12, + "offset": 7, }, "start": Object { - "column": 11, + "column": 7, "line": 1, - "offset": 10, + "offset": 6, }, }, - "type": 0, - "value": " !", + "type": 14, + "value": "!", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 8, "line": 1, - "offset": 12, + "offset": 7, }, "start": Object { - "column": 13, + "column": 8, "line": 1, - "offset": 12, + "offset": 7, }, }, "type": 15, @@ -2034,7 +6029,7 @@ Array [ ] `; -exports[`token analysis: "hi { name } !" 1`] = ` +exports[`token analysis: "hi {0} !" 1`] = ` Array [ Object { "loc": Object { @@ -2071,30 +6066,30 @@ Array [ Object { "loc": Object { "end": Object { - "column": 11, + "column": 6, "line": 1, - "offset": 10, + "offset": 5, }, "start": Object { - "column": 7, + "column": 5, "line": 1, - "offset": 6, + "offset": 4, }, }, - "type": 5, - "value": "name", + "type": 6, + "value": "0", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 7, "line": 1, - "offset": 12, + "offset": 6, }, "start": Object { - "column": 12, + "column": 6, "line": 1, - "offset": 11, + "offset": 5, }, }, "type": 3, @@ -2103,14 +6098,14 @@ Array [ Object { "loc": Object { "end": Object { - "column": 15, + "column": 9, "line": 1, - "offset": 14, + "offset": 8, }, "start": Object { - "column": 13, + "column": 7, "line": 1, - "offset": 12, + "offset": 6, }, }, "type": 0, @@ -2119,14 +6114,14 @@ Array [ Object { "loc": Object { "end": Object { - "column": 15, + "column": 9, "line": 1, - "offset": 14, + "offset": 8, }, "start": Object { - "column": 15, + "column": 9, "line": 1, - "offset": 14, + "offset": 8, }, }, "type": 15, @@ -2134,7 +6129,7 @@ Array [ ] `; -exports[`token analysis: "hi {0} !" 1`] = ` +exports[`token analysis: "hi {name !" 1`] = ` Array [ Object { "loc": Object { @@ -2171,9 +6166,9 @@ Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 9, "line": 1, - "offset": 5, + "offset": 8, }, "start": Object { "column": 5, @@ -2181,52 +6176,36 @@ Array [ "offset": 4, }, }, - "type": 6, - "value": "0", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - "offset": 6, - }, - "start": Object { - "column": 6, - "line": 1, - "offset": 5, - }, - }, - "type": 3, - "value": "}", + "type": 5, + "value": "name", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 11, "line": 1, - "offset": 8, + "offset": 10, }, "start": Object { - "column": 7, + "column": 10, "line": 1, - "offset": 6, + "offset": 9, }, }, - "type": 0, - "value": " !", + "type": 14, + "value": "!", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 11, "line": 1, - "offset": 8, + "offset": 10, }, "start": Object { - "column": 9, + "column": 11, "line": 1, - "offset": 8, + "offset": 10, }, }, "type": 15, @@ -2334,7 +6313,79 @@ Array [ ] `; -exports[`token analysis: "no apples | one apple | too much apples " 1`] = ` +exports[`token analysis: "hi, :-)" 1`] = ` +Array [ + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + "offset": 7, + }, + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, + "value": "hi, :-)", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + "offset": 7, + }, + "start": Object { + "column": 8, + "line": 1, + "offset": 7, + }, + }, + "type": 15, + }, +] +`; + +exports[`token analysis: "hi, :-}" 1`] = ` +Array [ + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + "offset": 7, + }, + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, + "value": "hi, :-}", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + "offset": 7, + }, + "start": Object { + "column": 8, + "line": 1, + "offset": 7, + }, + }, + "type": 15, + }, +] +`; + +exports[`token analysis: "no apples | one apple | too much apples " 1`] = ` Array [ Object { "loc": Object { @@ -2403,9 +6454,9 @@ Array [ Object { "loc": Object { "end": Object { - "column": 44, + "column": 43, "line": 1, - "offset": 43, + "offset": 42, }, "start": Object { "column": 27, @@ -2414,19 +6465,19 @@ Array [ }, }, "type": 0, - "value": "too much apples ", + "value": "too much apples ", }, Object { "loc": Object { "end": Object { - "column": 44, + "column": 43, "line": 1, - "offset": 43, + "offset": 42, }, "start": Object { - "column": 44, + "column": 43, "line": 1, - "offset": 43, + "offset": 42, }, }, "type": 15, diff --git a/test/message/tokenizer.test.ts b/test/message/tokenizer.test.ts index d95111abd..58cb001c3 100644 --- a/test/message/tokenizer.test.ts +++ b/test/message/tokenizer.test.ts @@ -2,49 +2,64 @@ import { parse } from '../../src/message/tokenizer' test('token analysis', () => { ;[ - 'hello world', - 'hello\nworld', - 'こんにちは、世界', - '😺', - '', - ' hello world ', - 'hi {name} !', - '{first} {middle} {last}', - 'hi { name } !', - '{first}\n{middle}\r\n{last}', - 'hi {0} !', - '{0} {1} {2}', - 'hi { -1 } !', - '{0}\n{1}\r\n{2}', - 'hi @:name !', - 'hi @:(hello world) !', - 'hi @:{name}\n !', - 'hi @.upper:name !', - 'hi @:{name} @:{0}!', - 'no apples | one apple | too much apples ', - 'no apples |\n one apple |\n too much apples ', - '@.lower:(no apples) | {1} apple | {count} apples', - // 'hello\\nworld', // text - // 'hi, :-}', // text - // `hi {} !`, // text - // `hi { } !`, // text - // `hi {$} !`, // text - // `hi {-} !` // text - // `hi {{name}} !`, - // `hi { { name } } !`, // named - // `hi { name !`, - // `hi {@:name !`, // text - // `hi { @:name !`, // text - // `hi { | hello {name} !`, // text - // `hi {{0}} !`, // list - // `hi {{}} !`, // text - // 'hi, :-)', // text - // `hi {name !`, // named - // `hi { name !`, // named - // `hi {0 !`, // list - // `hi { 0 !`, // list - // 'foo@bar.com', // text - // 'hi @:{ name', // linked + named + `hello world`, + `hello\nworld`, + `こんにちは、世界`, + `😺`, + ``, + ` hello world `, + `hi {name} !`, + `{first} {middle} {last}`, // eslint-disable-line no-irregular-whitespace + `hi { name } !`, + `{first}\n{middle}\r\n{last}`, + `hi {0} !`, + `{0} {1} {2}`, // eslint-disable-line no-irregular-whitespace + `hi { -1 } !`, + `{0}\n{1}\r\n{2}`, + `hi @:name !`, + `hi @:(hello world) !`, + `hi @:{name}\n !`, + `hi @.upper:name !`, + `hi @:{name} @:{0}!`, + `no apples | one apple | too much apples `, + `no apples |\n one apple |\n too much apples `, + `@.lower:(no apples) | {1} apple | {count} apples`, // eslint-disable-line no-irregular-whitespace + `hello\\nworld`, + `hi, :-}`, + `hi, :-)`, + `hi {} !`, + `hi {{}} !`, + `hi { } !`, + `hi {\nname\n} !`, + `hi {{name}} !`, + `hi { { name } } !`, + `hi {name !`, + `hi { name !`, + `hi { name !`, + `hi {{0}} !`, + `hi { { 0 } } !`, + `hi {0 !`, + `hi { 0 !`, + `hi {$} !`, + `hi {-} !`, + `hi {@.lower:name !`, + `hi { @:name !`, + `hi { | hello {name} !`, + `hi { @:name | hello {name} !`, + `foo@bar.com`, + `hi @:\nname !`, + `hi @ :name !`, + `hi @:{ name } !`, + `hi @:{ {name} } !`, + `hi @: {name} !`, + `hi @. {name} !`, + `hi @.upper {name} !`, + `hi \n@\n.\nupper\n:\n{ name }\n !`, + `hi @\n.\nupper\n:\n(name)\n !`, + `hi @ .lower : {name} !`, + `hi @:( name ) !`, // TODO: This is fixed!! + `hi @: (name) !`, + `@.lower: (no apples) | {1 apple | @:{count apples` // eslint-disable-line no-irregular-whitespace ].forEach(p => { expect(parse(p)).toMatchSnapshot(JSON.stringify(p)) }) From c6dc868d3aeb241464966aca1e2630add18ec8e2 Mon Sep 17 00:00:00 2001 From: kazuya kawaguchi Date: Thu, 23 Apr 2020 16:47:09 +0900 Subject: [PATCH 2/3] update yarn lock --- yarn.lock | 80 +++++++++++++++++++++++++++---------------------------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/yarn.lock b/yarn.lock index 671313266..8343ecc8a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -587,12 +587,12 @@ resolved "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-1.0.0.tgz#eef87a431300f6148c39a7f75f8cfeb218b2547e" integrity sha512-ywoxP68aOT3zHCLgWZgwUJatiENeHE7xJzYjfz8WI0goynp96wETBF+d95b8g/uL4QmS6owPVlaxiz3wyMAzcw== -"@octokit/plugin-rest-endpoint-methods@3.7.1": - version "3.7.1" - resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-3.7.1.tgz#51b39e49dac54f368a4a7606a5afcf604df773ca" - integrity sha512-YOlcE3bbk2ohaOVdRj9ww7AUYfmnS9hwJJGSj3/rFlNfMGOId4G8dLlhghXpdNSn05H0FRoI94UlFUKnn30Cyw== +"@octokit/plugin-rest-endpoint-methods@3.8.0": + version "3.8.0" + resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-3.8.0.tgz#649fa2f2e5104b015e1f60076958d69eba281a19" + integrity sha512-LUkTgZ53adPFC/Hw6mxvAtShUtGy3zbpcfCAJMWAN7SvsStV4p6TK7TocSv0Aak4TNmDLhbShTagGhpgz9mhYw== dependencies: - "@octokit/types" "^2.11.1" + "@octokit/types" "^2.12.1" deprecation "^2.3.1" "@octokit/request-error@^2.0.0": @@ -619,19 +619,19 @@ universal-user-agent "^5.0.0" "@octokit/rest@^17.0.0": - version "17.5.1" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-17.5.1.tgz#1e929460d43e8e62629044d71364bca2ff1a88e4" - integrity sha512-0rGY7eo0cw8FYX7jAtUgfy3j+05zhs9JvkPFegx00HAaayodM1ixlHhCOB5yirGbsVOxbRIWVkvKc2yY9367gg== + version "17.5.2" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-17.5.2.tgz#f072e4d22e1580908148c602914daba8bd50b5cb" + integrity sha512-ceTWIkTmZMOCeFbpWyZz0vMSnSxWFm/g2BF8bqe47RkTFDsE2t9FnHV6qQKOWDTOXKe5KybQcLXyJQhFIJLweg== dependencies: "@octokit/core" "^2.4.3" "@octokit/plugin-paginate-rest" "^2.1.0" "@octokit/plugin-request-log" "^1.0.0" - "@octokit/plugin-rest-endpoint-methods" "3.7.1" + "@octokit/plugin-rest-endpoint-methods" "3.8.0" -"@octokit/types@^2.0.0", "@octokit/types@^2.11.1", "@octokit/types@^2.9.0": - version "2.11.1" - resolved "https://registry.yarnpkg.com/@octokit/types/-/types-2.11.1.tgz#bd5b059596b42845be3f8e66065667aff8c8bf8b" - integrity sha512-QaLoLkmFdfoNbk3eOzPv7vKrUY0nRJIYmZDoz/pTer4ICpqu80aSQTVHnnUxEFuURCiidig76CcxUOYC/bY3RQ== +"@octokit/types@^2.0.0", "@octokit/types@^2.11.1", "@octokit/types@^2.12.1", "@octokit/types@^2.9.0": + version "2.12.1" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-2.12.1.tgz#4a26b4a85ec121043d3b0745b5798f9d8fd968ca" + integrity sha512-LRLR1tjbcCfAmUElvTmMvLEzstpx6Xt/aQVTg2xvd+kHA2Ekp1eWl5t+gU7bcwjXHYEAzh4hH4WH+kS3vh+wRw== dependencies: "@types/node" ">= 8" @@ -830,9 +830,9 @@ integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== "@types/node@*", "@types/node@>= 8", "@types/node@>=8.9.0": - version "13.13.1" - resolved "https://registry.yarnpkg.com/@types/node/-/node-13.13.1.tgz#1ba94c5a177a1692518bfc7b41aec0aa1a14354e" - integrity sha512-uysqysLJ+As9jqI5yqjwP3QJrhOcUwBjHUlUxPxjbplwKoILvXVsmYWEhfmAQlrPfbRZmhJB007o4L9sKqtHqQ== + version "13.13.2" + resolved "https://registry.yarnpkg.com/@types/node/-/node-13.13.2.tgz#160d82623610db590a64e8ca81784e11117e5a54" + integrity sha512-LB2R1Oyhpg8gu4SON/mfforE525+Hi/M1ineICEDftqNVTyFg1aRIeGuTvXAoWHc4nbrFncWtJgMmoyRvuGh7A== "@types/node@10.17.13": version "10.17.13" @@ -2269,9 +2269,9 @@ escodegen@^1.11.1: source-map "~0.6.1" eslint-config-prettier@^6.10.1: - version "6.10.1" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.10.1.tgz#129ef9ec575d5ddc0e269667bf09defcd898642a" - integrity sha512-svTy6zh1ecQojvpbJSgH3aei/Rt7C6i090l5f2WQ4aB05lYHeZIR1qL4wZyyILTbtmnbHP5Yn8MrsOJMGa8RkQ== + version "6.11.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.11.0.tgz#f6d2238c1290d01c859a8b5c1f7d352a0b0da8b1" + integrity sha512-oB8cpLWSAjOVFEJhhyMZh6NOEOtBVziaqdDQ86+qhDHFbZXoRTM7pNSvFRfW/W/L/LrQ38C99J5CGuRBBzBsdA== dependencies: get-stdin "^6.0.0" @@ -2298,9 +2298,9 @@ eslint-plugin-vue@^5.1.0: vue-eslint-parser "^5.0.0" eslint-plugin-vue@^7.0.0-alpha.0: - version "7.0.0-alpha.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-vue/-/eslint-plugin-vue-7.0.0-alpha.0.tgz#52ea8e89a7f3a1af2308a8829ea30ed137897a0b" - integrity sha512-ZN1BBBBVSOql81bd4VmhI7VaTEUNWp1uLiOg+FaVpfDyWfKeIH2eY/znoYIdxHeO6M+uCCUFXE1cRGd35T24gQ== + version "7.0.0-alpha.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-vue/-/eslint-plugin-vue-7.0.0-alpha.1.tgz#740b4282390898d93e45680d49c56634f2267289" + integrity sha512-xSqVAqV0qxeQjVf3vNbTcoy7fCEoo0BDLwMvrCL51NObmpuwHo8aDOZBU1pA9UkRwxP6il+GX228n1yGkq465w== dependencies: eslint-utils "^2.0.0" natural-compare "^1.4.0" @@ -2890,9 +2890,9 @@ fs.realpath@^1.0.0: integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= fsevents@^2.1.2, fsevents@~2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.2.tgz#4c0a1fb34bc68e543b4b82a9ec392bfbda840805" - integrity sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA== + version "2.1.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" + integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== full-icu@^1.3.1: version "1.3.1" @@ -4391,9 +4391,9 @@ magic-string@^0.25.2, magic-string@^0.25.5: sourcemap-codec "^1.4.4" make-dir@^3.0.0, make-dir@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.0.2.tgz#04a1acbf22221e1d6ef43559f43e05a90dbb4392" - integrity sha512-rYKABKutXa6vXTXhoV18cBE7PaewPXHe/Bdq4v+ZLMhxbWApkFFplT0LcbMW+6BbjnQXzZ/sAvSE/JdguApG5w== + version "3.1.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" + integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== dependencies: semver "^6.0.0" @@ -5236,9 +5236,9 @@ prettier-linter-helpers@^1.0.0: fast-diff "^1.1.2" prettier@^2.0.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.4.tgz#2d1bae173e355996ee355ec9830a7a1ee05457ef" - integrity sha512-SVJIQ51spzFDvh4fIbCLvciiDMCrRhlN3mbZvv/+ycjvmF5E73bKdGfU8QDLNmjYJf+lsGnDBC4UUnvTe5OO0w== + version "2.0.5" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.5.tgz#d6d56282455243f2f92cc1716692c08aa31522d4" + integrity sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg== pretty-format@^25.2.1, pretty-format@^25.4.0: version "25.4.0" @@ -5600,9 +5600,9 @@ resolve@1.8.1: path-parse "^1.0.5" resolve@1.x, resolve@^1.1.6, resolve@^1.10.0, resolve@^1.11.0, resolve@^1.12.0, resolve@^1.14.2, resolve@^1.15.1, resolve@^1.3.2: - version "1.16.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.16.1.tgz#49fac5d8bacf1fd53f200fa51247ae736175832c" - integrity sha512-rmAglCSqWWMrrBv/XM6sW0NuRFiKViw/W4d9EbC4pt+49H8JwHy+mcGmALTEg504AUDcLTvb1T2q3E9AnmY+ig== + version "1.17.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" + integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== dependencies: path-parse "^1.0.6" @@ -5680,9 +5680,9 @@ rollup-pluginutils@^2.8.2: estree-walker "^0.6.1" rollup@^2.3.0: - version "2.6.1" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.6.1.tgz#8354e67caa7b8bf24c2488d9e2f64da2be62eebe" - integrity sha512-1RhFDRJeg027YjBO6+JxmVWkEZY0ASztHhoEUEWxOwkh4mjO58TFD6Uo7T7Y3FbmDpRTfKhM5NVxJyimCn0Elg== + version "2.7.2" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.7.2.tgz#0f8ee6216d33e83c0750116312c2c92b94cc7f72" + integrity sha512-SdtTZVMMVSPe7SNv4exUyPXARe5v/p3TeeG3LRA5WabLPJt4Usi3wVrvVlyAUTG40JJmqS6zbIHt2vWTss2prw== optionalDependencies: fsevents "~2.1.2" @@ -6014,9 +6014,9 @@ source-map-resolve@^0.5.0: urix "^0.1.0" source-map-support@^0.5.6, source-map-support@~0.5.12: - version "0.5.17" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.17.tgz#29fe1b3c98b9dbd5064ada89052ee8ff070cb46c" - integrity sha512-bwdKOBZ5L0gFRh4KOxNap/J/MpvX9Yxsq9lFDx65s3o7F/NiHy7JRaGIS8MwW6tZPAq9UXE207Il0cfcb5yu/Q== + version "0.5.18" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.18.tgz#f5f33489e270bd7f7d7e7b8debf283f3a4066960" + integrity sha512-9luZr/BZ2QeU6tO2uG8N2aZpVSli4TSAOAqFOyTO51AJcD9P99c0K1h6dD6r6qo5dyT44BR5exweOaLLeldTkQ== dependencies: buffer-from "^1.0.0" source-map "^0.6.0" From 9ee5d54e9cb215b38474f3266a2f3cd7c5a14558 Mon Sep 17 00:00:00 2001 From: kazuya kawaguchi Date: Thu, 23 Apr 2020 16:47:44 +0900 Subject: [PATCH 3/3] update node.js --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 36642ed38..831ab2a4c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest, macos-latest] - node: [10, 12, 13] + node: [10, 12, 14] steps: - name: Checkout uses: actions/checkout@v2