Parsing
Functions
- astFromPath()
Parses a CFML file and returns its Abstract Syntax Tree (AST) representation. The AST is a structured tree that represents the syntactic structure of the CFML code, making it useful for: - Code Analysis: Static analysis, complexity metrics, dependency tracking - IDE Tooling: Syntax highlighting, autocomplete, refactoring support - Transformation: Code generation, minification, transpilation - Documentation: Automatic API documentation generation - Quality Assurance: Linting, code style enforcement, security scanning The returned AST uses neutral, language-agnostic node types following ESTree conventions such as
BinaryExpression,IfStatement,FunctionDeclaration, and literal types - astFromString()
Parses CFML source code from a string and returns its Abstract Syntax Tree (AST) representation. The AST is a structured tree that represents the syntactic structure of the CFML code, making it useful for: - Code Analysis: Static analysis, complexity metrics, dependency tracking - IDE Tooling: Syntax highlighting, autocomplete, refactoring support - Transformation: Code generation, minification, transpilation - Documentation: Automatic API documentation generation - Quality Assurance: Linting, code style enforcement, security scanning The returned AST uses neutral, language-agnostic node types following ESTree conventions such as
BinaryExpression,IfStatement,FunctionDeclaration, and literal types - Canonicalize()
Canonicalization is simply the operation of reducing a possibly encoded string down to its simplest form. This is important, because attackers frequently use encoding to change their input in a way that will bypass validation filters, but still be interpreted properly by the target of the attack. Note that data encoded more than once is not something that a normal user would generate and should be regarded as an attack
- DeserializeJSON()
Converts a JSON (JavaScript Object Notation) or JSON5 string data representation into CFML data, such as a struct or array.
- HtmlParse()
parse the given html (not only xhtml) as xml Object, work similar to xmlParse, but this function is very forgiving with the syntax..
- LSParseCurrency()
Converts a locale-specific currency string into a formatted number. Attempts conversion by comparing the string with each the three supported currency formats (none, local, international) and using the first that matches.
- LSParseDateTime()
Converts a string that is a valid date/time representation in the current locale into a date/time object.
- LSParseEuroCurrency()
use function lsParseCurrency instead
- LSParseNumber()
Converts a string that is a valid numeric representation in the current locale into a formatted number.
- ParseDateTime()
Parses a date/time string according to the English (U.S.) locale conventions.
- ParseNumber()
Parses the string argument as a numeric value.
- Val()
Converts numeric characters that occur at the beginning of a string to an number.
- XmlParse()
Converts an XML document that is represented as a string variable into an XML document object.
Methods
- string.deserializeJSON()
Converts a JSON (JavaScript Object Notation) or JSON5 string data representation into CFML data, such as a struct or array.
- string.parseDateTime()
Parses a date/time string according to the English (U.S.) locale conventions.
Guides
- AST (Abstract Syntax Tree)
Generate Abstract Syntax Trees from CFML code for analysis, transformation, and tooling support