/**
 * HTML Language Plugin
 *
 * Provides HTML-specific AST handling for the web extraction preprocessor.
 * HTML is a preprocessor language — it does not produce full IR.
 * Instead, <script> blocks are extracted and delegated to the JS analyzer,
 * and attribute-level security checks are run directly on the HTML AST.
 */
import { BaseLanguagePlugin } from './base.js';
/**
 * HTML language plugin implementation.
 * Acts as a preprocessor — delegates script analysis to JS plugin.
 */
export class HtmlPlugin extends BaseLanguagePlugin {
    id = 'html';
    name = 'HTML';
    extensions = ['.html', '.htm', '.xhtml'];
    wasmPath = 'tree-sitter-html.wasm';
    nodeTypes = {
        // HTML has no OOP constructs
        classDeclaration: [],
        interfaceDeclaration: [],
        enumDeclaration: [],
        functionDeclaration: [],
        methodDeclaration: [],
        // No expressions in HTML
        methodCall: [],
        functionCall: [],
        assignment: [],
        variableDeclaration: [],
        // No parameters
        parameter: [],
        argument: [],
        // No annotations
        annotation: [],
        decorator: [],
        // No imports
        importStatement: [],
        // No control flow
        ifStatement: [],
        forStatement: [],
        whileStatement: [],
        tryStatement: [],
        returnStatement: [],
    };
    detectFramework(_context) {
        return undefined;
    }
    getBuiltinSources() {
        return [];
    }
    getBuiltinSinks() {
        return [];
    }
    getReceiverType(_node, _context) {
        return undefined;
    }
    isStringLiteral(node) {
        return node.type === 'attribute_value' || node.type === 'quoted_attribute_value';
    }
    getStringValue(node) {
        if (!this.isStringLiteral(node))
            return undefined;
        const text = node.text;
        if ((text.startsWith('"') && text.endsWith('"')) ||
            (text.startsWith("'") && text.endsWith("'"))) {
            return text.slice(1, -1);
        }
        return text;
    }
    extractTypes(_context) {
        return [];
    }
    extractCalls(_context) {
        return [];
    }
    extractImports(_context) {
        return [];
    }
    extractPackage(_context) {
        return undefined;
    }
}
//# sourceMappingURL=html.js.map