Cfml language support#1118
Open
ghedwards wants to merge 2 commits into
Open
Conversation
Adds CodeGraph extraction for ColdFusion Markup Language using
tree-sitter-cfml's cfml and cfscript grammars. Handles both the legacy
tag-based style (<cfcomponent>/<cffunction>) and modern bare-script
style (component { ... }), delegating embedded <cfscript> tag bodies
to the cfscript grammar. .cfs files are routed through the same
extractor so anonymous component names fall back to the filename
consistently across both extensions, since CFML never declares a
component's name in source.
Includes extraction tests covering both dialects, extends/implements,
visibility, and regression coverage for the implicit-end-tag walk and
file-node containment.
… cfquery SQL bodies A <cfscript> block nested inside control-flow tags (<cfif>/<cfloop>/<cftry>) inside a <cffunction> or at top-level component scope was silently skipped: the implicit-end-tag walk only checked direct children/siblings for cf_script_tag, missing it when wrapped a level deeper. A new recursive delegateNestedTags helper finds <cfscript>/<cfquery> at any depth without descending into nested <cffunction> scopes. <cfquery> SQL bodies were also entirely unhandled - the cf_query_content node's text was opaque raw SQL, so any #hash# expression inside it (e.g. a call like #getCurrentUser().getId()# in a WHERE clause) was dropped. Wires the tree-sitter-cfml cfquery grammar in as a new minimal Language/extractor (call expressions only - the grammar models no other CodeGraph symbols) and delegates <cfquery> bodies to it the same way <cfscript> bodies are delegated to the cfscript grammar.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.