Skip to main content

LSP.pmod/Roxen.pmod/Roxen.pike

Overview

Roxen.pike - Roxen module analysis for LSP

Per ADR-001: Uses Parser.Pike.split() for all code parsing

Per ADR-002: Uses String.trim_all_whites() for whitespace handling

Build newline offset array for O(1) line/column lookup

@param code Source code

@returns Array of character offsets where each line starts

Convert byte offset to line/column position

@param offset Byte offset in code

@param offsets Newline offset array from build_newline_offsets()

@returns Mapping with "line" and "column" (1-indexed)

Find position of a token in the original code string

@param code Source code

@param token_str Token string to search for

@param start_offset Starting offset (default: 0)

@returns Mapping with "line" and "column", or 0 if not found

Detect module types (MODULE_*), inherits, and module name

Per ADR-001: Uses Parser.Pike.split() instead of Tools.AutoDoc.PikeParser

@param code Source code to parse

@param filename Filename for error reporting

@returns Array with: ({module_types, inherits, module_name})

Parse tag definitions (simpletag_, container_, and RXML.Tag classes)

Per ADR-001: Uses Parser.Pike.split() instead of Tools.AutoDoc.PikeParser

@param code Source code to parse

@param filename Filename for error reporting

@returns Array of tag mappings

Parse defvar() calls using Parser.Pike.split()

Per ADR-001: Uses Parser.Pike.split() instead of Tools.AutoDoc.PikeParser

@param code Source code to parse

@param filename Filename for error reporting

@returns Array of variable mappings from defvar calls

Check if a specific callback function is defined in the code

@param code The source code to search

@param func_name The function name to look for

@returns 1 if the function is found, 0 otherwise

Symbols

SymbolTypeLine
MAX_PARSER_ITERATIONSconstant5
ROXEN_MODULE_TYPESconstant7
REQUIRED_CALLBACKSconstant13
has_fast_path_markersfunction72
detect_modulefunction81
parse_tagsfunction304
parse_varsfunction479
iffunction577
whilefunction660
get_callbacksfunction733
next_non_wsfunction761
validate_apifunction784
has_callback_functionfunction832
next_non_wsfunction835
find_filefunction845
filterfunction845
has_simpletag_functionsfunction872
has_find_filefunction876