SYNG JavaScript Reference
| selector | role | matching syntax |
|---|---|---|
| (arg) | argument and parameter positions | - |
| (arr) | array literals and array patterns (destructuring) |
|
| (attr) | JSX attributes on opening tags |
|
| (bin) | binary expressions like `a + b` or `a && b` |
|
| (bool) | boolean literals | - |
| (call) | function calls |
|
| (child) | JSX children selected by position or value |
|
| (comp) | computed property access and subscript expressions |
|
| (el) | array elements selected by position and/or value (used with `(arr ...)`) | - |
| (export) | export statements, including re-exports |
|
| (fun) | function definitions |
|
| (id) | identifiers |
|
| (id+) | static property names across member access and object property definitions (the `b` in `a.b`, `a["b"]`, or `{ b: ... }`) |
|
| (import) | ESM import statements, or imported identifiers when nested inside another selector |
|
| (is) | kind constraints for functions and variable declarations |
|
| (jsx) | JSX elements and fragments, matched by name, attributes, and children |
|
| (mem) | property access |
|
| (null) | null literal | - |
| (num) | numeric literals | - |
| (obj) | object literals and object-like patterns |
|
| (of) | constructor calls using `new` |
|
| (prop) | properties in objects and destructuring patterns |
|
| (regex) | regular expression literals | - |
| (regex+) | regular expression patterns across literals and RegExp constructor calls |
|
| (str) | string literals |
|
| (str*) | string-like binary expressions matched by their pseudo-evaluated value (e.g., `'foo' + bar`) |
|
| (str+) | string values across literals, template literals, concatenations, and string-valued property keys |
|
| (tpl) | template literals (`` `...` ``) and tagged template literals like `html`... or `sql`... |
|
| (tpl*) | template literals matched by a pseudo-evaluated value that includes interpolations |
|
| (var) | variable declarations (var/let/const), including destructuring patterns |
|