diff --git a/tools/mujs/lib/ast/definitions.ts b/tools/mujs/lib/ast/definitions.ts index ec01bf506..84d738448 100644 --- a/tools/mujs/lib/ast/definitions.ts +++ b/tools/mujs/lib/ast/definitions.ts @@ -1,8 +1,8 @@ // Copyright 2016 Marapongo, Inc. All rights reserved. -import {Node, Identifier} from "./nodes"; -import * as statements from "./statements"; import * as symbols from "../symbols"; +import {Identifier, Node} from "./nodes"; +import * as statements from "./statements"; // TODO(joe): consider refactoring modifiers from booleans to enums. @@ -14,21 +14,6 @@ export interface Definition extends Node { description?: string; // an optional informative description. } -export function isDefinition(node: Node): boolean { - switch (node.kind) { - case moduleKind: - case classKind: - case localVariableKind: - case modulePropertyKind: - case classPropertyKind: - case moduleMethodKind: - case classMethodKind: - return true; - default: - return false; - } -} - /* Modules */ // A module contains members, including variables, functions, and/or classes. @@ -125,3 +110,20 @@ export interface ClassMethod extends Function, ClassMember { export const classMethodKind = "ClassMethod"; export type ClassMethodKind = "ClassMethod"; +/** Helper functions **/ + +export function isDefinition(node: Node): boolean { + switch (node.kind) { + case moduleKind: + case classKind: + case localVariableKind: + case modulePropertyKind: + case classPropertyKind: + case moduleMethodKind: + case classMethodKind: + return true; + default: + return false; + } +} +