File tree Expand file tree Collapse file tree 2 files changed +3
-13
lines changed
Expand file tree Collapse file tree 2 files changed +3
-13
lines changed Original file line number Diff line number Diff line change 11import SourceToken from 'coffee-lex/dist/SourceToken' ;
22import ParseContext from './util/ParseContext' ;
33
4- export interface RealNode {
5- type : string ;
6- line : number ;
7- column : number ;
8- range : [ number , number ] ;
9- raw : string ;
10- }
11-
124export abstract class Node {
135 readonly range : [ number , number ] ;
146
Original file line number Diff line number Diff line change 11import SourceTokenList from 'coffee-lex/dist/SourceTokenList' ;
22import { Base , Block , LocationData } from 'decaffeinate-coffeescript/lib/coffee-script/nodes' ;
33import LinesAndColumns from 'lines-and-columns' ;
4- import { ClassProtoAssignOp , Constructor , RealNode } from '../nodes' ;
4+ import { ClassProtoAssignOp , Constructor } from '../nodes' ;
55
66class ParseError extends Error {
77 syntaxError : SyntaxError ;
@@ -60,10 +60,8 @@ export default class ParseContext {
6060 readonly parseState : ParseState ) {
6161 }
6262
63- getRange ( locatable : RealNode | Base | LocationData ) : [ number , number ] | null {
64- if ( 'range' in locatable ) {
65- return ( locatable as RealNode ) . range ;
66- } else if ( locatable instanceof Base ) {
63+ getRange ( locatable : Base | LocationData ) : [ number , number ] | null {
64+ if ( locatable instanceof Base ) {
6765 return this . getRange ( locatable . locationData ) ;
6866 } else {
6967 let locationData = locatable as LocationData ;
You can’t perform that action at this time.
0 commit comments