@tracespace/parser
Version:
Gerber and NC drill file parser
12 lines (11 loc) • 569 B
TypeScript
import { Position } from 'unist';
import { Token } from '../lexer';
import { Coordinates, InterpolateModeType, GraphicType } from '../types';
export declare function tokensToCoordinates(tokens: Array<Token>): Coordinates;
export declare function tokensToMode(tokens: Token[]): InterpolateModeType;
export declare function tokensToGraphic(tokens: Array<Token>): GraphicType;
export declare function tokensToString(tokens: Token[]): string;
export declare function tokensToPosition(tokens: Token[], options?: Partial<{
head: Token;
length: number;
}>): Position;