Skip to content

Introduce a set of tool to improve FAST importer development#46

Open
jecisc wants to merge 63 commits intoEvref-BL:mainfrom
jecisc:customizableimporter
Open

Introduce a set of tool to improve FAST importer development#46
jecisc wants to merge 63 commits intoEvref-BL:mainfrom
jecisc:customizableimporter

Conversation

@jecisc
Copy link
Copy Markdown
Contributor

@jecisc jecisc commented Mar 26, 2026

This PR adds a bunch of tools to simplify the creation of FAST importers such has:

Because having two classes of the same name would produce an error

I also added two pages of documentation. One about utilities and one about FAST model importer.

I might do some more cleaning, but this PR should be mergeable

A bug was fixed in SingularizePluralize and #addGenericChildren: got renamed automatically into #addGenericChild:.
…elds

In the TSSymbolExplorerPresenter, next to the field name, I now dispaly the min and max number of children I found in the node. This allows to know easily multiple things:
- If the node is optional
- If the node always has the same value
- If the node has un undefined number of values
This visitor allows one to look for a node matching a pattern and inspect it displaying its source code and its source code highlighted in the full source of the file.

Example of usage:

I wanted to find in python an except clause with multiple elements in the value field:

```st

folder := '/Users/cyril/testPython/cpython-main/' asFileReference.

TSNodeFinderVisitor
	language: TSLanguage python
	extensions: #( 'py' )
	selection: [ :node |
			node type = #except_clause and: [
					node collectFieldNameOfNamedChild at: #value ifPresent: [ :nodes | nodes isCollection ] ifAbsent: [ false ] ] ]
	buildOn: folder.
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant