forked from Florian-Merle/lang-el
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
151 additions
and
16 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
|
||
## Enum | ||
|
||
- [ELScalar](#elscalar) | ||
|
||
### ELScalar | ||
|
||
|
||
|
||
| Property | Type | Description | | ||
| ---------- | ---------- | ---------- | | ||
| `Bool` | `'bool'` | Equivalent to PHP `bool` | | ||
| `Number` | `'number'` | Equivalent to PHP `int` or `float` | | ||
| `String` | `'string'` | Equivalent to PHP `string` | | ||
| `Null` | `'null'` | Equivalent to PHP `null` | | ||
| `Any` | `'any'` | Equivalent to PHP `mixed` | | ||
|
||
|
||
## Interfaces | ||
|
||
- [ExpressionLanguageConfig](#expressionlanguageconfig) | ||
- [ELType](#eltype) | ||
- [ELIdentifier](#elidentifier) | ||
- [ELFunction](#elfunction) | ||
- [ELParameter](#elparameter) | ||
- [ELKeyword](#elkeyword) | ||
|
||
### ExpressionLanguageConfig | ||
|
||
The configuration object that is passed to `expressionlanguage` function | ||
|
||
| Property | Type | Description | | ||
| ---------- | ---------- | ---------- | | ||
| `types` | `{ [key: string]: ELType; } or undefined` | Type definitions used in `identifiers` and `functions` | | ||
| `identifiers` | `ELIdentifier[] or undefined` | Top-level variables | | ||
| `functions` | `ELFunction[] or undefined` | Top-level functions | | ||
|
||
|
||
### ELType | ||
|
||
|
||
|
||
| Property | Type | Description | | ||
| ---------- | ---------- | ---------- | | ||
| `identifiers` | `ELIdentifier[] or undefined` | Properties of the object | | ||
| `functions` | `ELFunction[] or undefined` | Methods of the object | | ||
| `info` | `string or undefined` | | | ||
|
||
|
||
### ELIdentifier | ||
|
||
Represents a variable or a property of an object | ||
|
||
| Property | Type | Description | | ||
| ---------- | ---------- | ---------- | | ||
| `name` | `string` | | | ||
| `detail` | `string or undefined` | If set, this is shown instead of `type` | | ||
| `info` | `string or undefined` | Text to show in hover tooltip, autocomplete etc. | | ||
| `type` | `string[] or undefined` | All possible types for this identifier | | ||
|
||
|
||
### ELFunction | ||
|
||
Represents a function or a method of an object | ||
|
||
| Property | Type | Description | | ||
| ---------- | ---------- | ---------- | | ||
| `name` | `string` | | | ||
| `args` | `ELParameter[] or undefined` | | | ||
| `info` | `string or undefined` | | | ||
| `returnType` | `string[] or undefined` | | | ||
|
||
|
||
### ELParameter | ||
|
||
|
||
|
||
| Property | Type | Description | | ||
| ---------- | ---------- | ---------- | | ||
| `name` | `string` | | | ||
| `type` | `string[] or undefined` | | | ||
| `info` | `string or undefined` | | | ||
| `optional` | `boolean or undefined` | | | ||
|
||
|
||
### ELKeyword | ||
|
||
|
||
|
||
| Property | Type | Description | | ||
| ---------- | ---------- | ---------- | | ||
| `name` | `string` | | | ||
| `detail` | `string or undefined` | | | ||
| `info` | `string or undefined` | | | ||
|
||
|
||
## Types | ||
|
||
- [ELTypeName](#eltypename) | ||
|
||
### ELTypeName | ||
|
||
One of predefined types ({@link ELScalar}) or a custom type from {@link ExpressionLanguageConfig.types} | ||
|
||
| Type | Type | | ||
| ---------- | ---------- | | ||
| `ELTypeName` | `ELScalar or string` | | ||
|
This file contains 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
This file contains 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