dockerfile-ast
Version:
Parse a Dockerfile into an array of instructions and comments.
19 lines (18 loc) • 729 B
TypeScript
import { TextDocument } from 'vscode-languageserver-textdocument';
import { Range } from 'vscode-languageserver-types';
import { Instruction } from './instruction';
import { Dockerfile } from './dockerfile';
export declare class Parser {
private escapeChar;
static createInstruction(document: TextDocument, dockerfile: Dockerfile, escapeChar: string, lineRange: Range, instruction: string, instructionRange: Range): Instruction;
private getParserDirectives;
private document;
private buffer;
parse(buffer: string): Dockerfile;
private processInstruction;
private processHeredocs;
private processArguments;
private processComment;
private parseHeredoc;
private createInstruction;
}