npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

abl-tmlanguage

v1.3.7

Published

Textmate grammar for Progress OpenEdge ABL Language

Downloads

122

Readme

OpenEdge ABL language definition

This is a TextMate grammar for the Progress OpenEdge ABL Language (formerly known as 4GL).

It's used in the OpenEdge ABL for Visual Studio Code extension.

Contributing

The main file is abl.tmLanguage.json so contributors should hand-modify this file.

Tests

Tests are run from the root folder

npm install
npm test

If you noticed a syntax highlight issue in the VSCode extension, please try to create a failing test case first, and then modify the grammar accordingly.

Debugging

Clone the https://github.com/microsoft/vscode-textmate repo locally (represented by /path/to/vscode-textmate).

Debug ABL statement(s) using the command below.

cd path/to/vscode-textmate
node out/tests/inspect.js /path/to/abl-tmlanguage/abl.tmLanguage.json /path/to/abl-tmlanguage/debug-in.txt > /path/to/abl-tmlanguage/debug-out.txt

The /path/to/abl-tmlanguage/debug-out.txt file contains the line-by-line resolution of the code using rules defined in the abl-tmlanguage.json file.

Notes

VSCode extension

You can test this grammar locally with the associated VSCode extension:

git clone [email protected]:chriscamicas/abl-tmlanguage.git
cd abl-tmlanguage
npm link
cd ..
git clone [email protected]:chriscamicas/vscode-abl.git
cd vscode-abl
npm link abl-tmlanguage

You can now run and debug the extension from the vscode-abl directory (with the Launch Extension task). Every modification to the abl-tmlanguage project should be reflected in the vscode-abl directory immediately.

See npm link.

JSON vs plist

This project uses the JSON format over the plist one, mainly because I find it much more readable.

If you prefer the plist format, or the YAML one, there is an extension for VSCode that can convert them: TextMate Languages.

Note: I plan on using the YAML syntax (even more compact and readable) but it needs a build step as VSCode does not handle YAML natively.

Tokenize

This project uses the vscode-textmate package to tokenize and test the grammar.

Keywords

Part of this grammar is generated from a keyword list file. See [index.js] for information on how to generate that file, as well as the others required for the generation.

When npm run build is executed, a file called grammer.json is created, which contains properties for keywords (all the keywords), abl-functions and handle-attributes (attributes and method calls on ABL handles). The contents of this file should be copied into the abl.tmLanguage.json file, replacing the existing contents.

Scopes

The ABL-specific scopes produced by the ABL grammer listed in the table below. The scope names are largely based on the naming conventions at https://macromates.com/manual/en/language_grammars#language_rules .

| Scope Name | Used for/by | | ------------- | ------------- | |comment.block.source.abl | Everything between /* and */ | |comment.line.double-slash.abl | Everything in a // comment, incl slashes | |comment.preprocessor.analyze-suspend.abl | &analyze-suspend, &analyze-resume | |constant.character.escape.abl | ~ and the next char | |constant.language.abl | today, now, true, false, yes, no, ? (unknown value) | |constant.language.source.abl | 99/99/9999 (or similar) when used as a format clause | |constant.numeric.source.abl | 0x00-0xFF, 0-9 | |entity.name.function.abl | Method call, property call, method name, property name, handle attributes, handle methods, event names | |entity.name.function.preprocessor.abl | &scoped-define, &global-define | |entity.name.include.abl | Include file names | |entity.name.package.abl | Package names for USING | |entity.name.procedure.abl | Internal and external procedure names | |entity.name.tag.abl | Annotation names | |entity.name.type.abl | Class/interface/enum names | |entity.name.type.generic.abl | Generic type names | |entity.other.attribute-name.abl | Annotation attribute names | |keyword.operator.source.abl | contains, begins, matches, eq, le, lt, ge, gt, ne, <=, <>, >=, =, +, -, /, <, >, *, +=, -=, /=, *= | |keyword.other.abl | Any ABL keyword (incl those covered by other scopes like support.function.abl and entity.name.function.abl) | |punctuation.definition.string.begin.abl | Start of a quoted string | |punctuation.definition.string.end.abl | End of a quoted string | |punctuation.section.abl | { and } | |punctuation.separator.comma.abl | , | |punctuation.separator.period.abl | . | |punctuation.separator.colon.abl | : | |punctuation.terminator.abl | . and : | |storage.data.dataset.abl | Statically-defined dataset names, data-relation names | |storage.data.table.abl | (Temp-)Table names, field names, index names | |storage.type.abl | Primitive datatypes | |storage.type.function.abl | ABL preprocessors, defined keyword | |string.double.complex.abl | String in " quotes | |string.single.complex.abl | String in ' quotes | |support.function.abl | opsys, proversion, ABL functions (eg BASE64-ENCODE) | |support.other.abl | Translation attributes :L, :R, :T, :C, :U | |support.other.argument.abl | &<name\|number> arguments in includes, preprocessor values | |variable.language.abl | ABL system handles (eg session or this-object) | |variable.other.abl | Variable names | |variable.parameter.abl | Parameter names in method, function, procedure definition |

License

MIT