psl-parser
TypeScript implementation of a PSL parser, from scratch.
Usage
import { parseText } from 'psl-parser';
const parsedPsl = parseText(/* PSL source text */);
parsedPsl.methods.forEach(method => {
console.log(method.id.value);
})
A parser for the Profile Scripting Language
TypeScript implementation of a PSL parser, from scratch.
import { parseText } from 'psl-parser';
const parsedPsl = parseText(/* PSL source text */);
parsedPsl.methods.forEach(method => {
console.log(method.id.value);
})
All notable changes to the "vscode-psl" extension will be documented in this file.
Buffer
was not decoded to a string
.#PROPERTYDEF
directives.Dependency updates
psl.trailingNewline
to resourceAllow sources to be split across multiple projects with a profile-project.json
. Current functionality is unstable and is
subject to change (versioned 0.0.1
).
{
"version": "0.0.1",
"parentProjects": [
"profile-application",
"profile-framework"
],
"pslSources": [
"dataqwik/procedure/",
"psl/"
],
"fileDefinitionSources": [
"dataqwik/table/"
]
}
This file can be used to configure sources, not only for the current project, but across multiple projects in a vscode workspace.
All fields are optional. In the example above, pslSources
and fileDefinitionSources
are populated with their default
values. The names in the parentProjects
array refer to the names of the vscode workspace themselves. For more about
workspace visit the official documentation for more information.
Other changes include:
Adds two new custom menu items "Run Test" and "Run Test (with Coverage)". The custom logic must be implemented in your Profile instance. Then it can be called by adding this configuration to your settings.json
:
"psl.customTasks": [
{
"command": "runCoverage",
"mrpcID": "^ZMRPC121",
"request": "PSLRUNTESTC"
},
{
"command": "runTest",
"mrpcID": "^ZMRPC121",
"request": "PSLRUNTEST"
}
]
The command
names are fixed, but the mrpcID
and request
fields can match your implementation.
Other changes include:
serverType
and encoding
to environments.json (thanks @joelgomes85 for opening the issue)Added new rule RuntimeStart
that checks if variables declared outside of a TP Fence are referenced from within.
Linting in PSL now uses a configuration file. By default the setting "psl.lint"
is now "config"
. Other options are "all"
or "none"
.
A file must be included in order to be checked. If it is then excluded, it will not be checked. Here is an example layout:
{
"version": 1,
"include": {
"Z*": ["*"],
"*.psl": ["*"],
"*": ["TodoInfo"]
},
"exclude": {}
}
This will lint files starting with a Z and all .psl files. All rules will be applied to these files. All files will have the TodoInfo rule applied to them.
These are the current rules:
Additionally, this version also introduces Completion Items with Suggestions as another preview feature for the PSL language.
Introduced toggle to enable preview features ("psl.previewFeatures" : true
). Restart after configuring to enable.
Preview features include:
Implementation of the psl-lint code quality checker. Enable it by adding the setting "psl.lint" : true
to your settings.json.
Fix a small bug where the Configure Environments button does not update properly.
Promote to 1.0.0 stable. Introduces language support.
Initial publication.