UNPKG

@foxglove/omgidl-parser

Version:

Parse OMG IDL to flattened definitions for serialization

22 lines 1.32 kB
import { ConstantValue } from "@foxglove/message-definition"; import { IDLNode } from "./IDLNode"; import { AnyIDLNode, IConstantIDLNode } from "./interfaces"; import { ConstantASTNode } from "../astTypes"; import { IDLMessageDefinitionField } from "../types"; /** Wraps constant node so that its type and value can be resolved and written to a message definition */ export declare class ConstantIDLNode extends IDLNode<ConstantASTNode> implements IConstantIDLNode { /** If the type needs resolution (not simple primitive) this will be set to true. Should only ever mean that it's referencing an enum */ private typeNeedsResolution; constructor(scopePath: string[], astNode: ConstantASTNode, idlMap: Map<string, AnyIDLNode>); get type(): string; /** Holds reference so that it doesn't need to be searched for again */ private referencedEnumNode?; /** Gets enum node referenced by type. Fails otherwise. */ private getReferencedEnumNode; get isConstant(): true; /** Return Literal value on astNode or if the constant references another constant, then it gets the value that constant uses */ get value(): ConstantValue; /** Writes resolved IDLMessageDefinition */ toIDLMessageDefinitionField(): IDLMessageDefinitionField; } //# sourceMappingURL=ConstantIDLNode.d.ts.map