gajus/liqe

Incorrect definition of TagToken in types.ts

Open

#29 aperta il 17 feb 2023

Vedi su GitHub
 (1 commento) (0 reazioni) (0 assegnatari)TypeScript (27 fork)github user discovery
help wanted

Metriche repository

Star
 (675 star)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

Problem

  • Parsing of "a" generates AST that is not consistent with definition in types.ts
  • Based on types.ts, "operation" property is NOT optional
  • Parsing of "a" generates TagToken w/o "operation" property - example here

Proposed solution

  • Fix types.ts or parser

Versions

Generated AST

{
	"location": {
		"start": 0,
		"end": 1
	},
	"field": {
		"type": "ImplicitField"
	},
	"type": "Tag",
	"expression": {
		"location": {
			"start": 0,
			"end": 1
		},
		"type": "LiteralExpression",
		"quoted": false,
		"value": "a"
	}
}

Guida contributor