/* ────────────────────────────────────────────────────────────────
   Script AST — Language-Agnostic Abstract Syntax Tree
   
   A common intermediate representation that can be generated from
   visual node graphs and exported to any target language.
──────────────────────────────────────────────────────────────── */
/* ── Helper Functions ─────────────────────────────────────────── */
function createLiteral(value, valueType = 'any') {
    return { kind: 'literal', valueType, value };
}
function createIdentifier(name, dataType) {
    return { kind: 'identifier', name, dataType };
}
function createBinaryOp(operator, left, right) {
    return { kind: 'binaryOp', operator, left, right };
}
function createCall(callee, args) {
    return { kind: 'call', callee, args };
}
function createMethodCall(object, method, args) {
    return { kind: 'methodCall', object, method, args };
}
function createPropertyAccess(object, property) {
    return { kind: 'propertyAccess', object, property };
}
function createAssignment(target, value, operator = '=') {
    return { kind: 'assignment', target, value, operator };
}
function createVarDecl(name, varType, initializer) {
    return { kind: 'varDecl', name, varType, initializer };
}
function createIf(condition, thenBranch, elseBranch) {
    return { kind: 'if', condition, thenBranch, elseBranch };
}
function createReturn(value) {
    return { kind: 'return', value };
}
function createExprStatement(expression) {
    return { kind: 'expressionStatement', expression };
}
function createType(type, nullable = false) {
    return { type, nullable };
}
function createArrayType(elementType) {
    return { type: 'array', genericArgs: [elementType] };
}
function createCustomType(name, nullable = false) {
    return { type: 'custom', customName: name, nullable };
}

export { createArrayType, createAssignment, createBinaryOp, createCall, createCustomType, createExprStatement, createIdentifier, createIf, createLiteral, createMethodCall, createPropertyAccess, createReturn, createType, createVarDecl };
//# sourceMappingURL=ScriptAST.js.map
