tree-sitter-lotus


Nametree-sitter-lotus JSON
Version 0.1.0 PyPI version JSON
download
home_pageNone
SummaryTree-sitter grammar for LotusScript
upload_time2025-07-18 19:17:17
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseNone
keywords incremental parsing tree-sitter lotus
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # tree-sitter-lotus

Tree-sitter grammar for LotusScript, the programming language used in IBM Lotus Notes and Domino.

## Features

This grammar supports the core LotusScript syntax including:

- **Option statements**: `Option Public`, `Option Private`, `Option Declare`, `Option Explicit`
- **Subroutines and Functions**: `Sub` and `Function` declarations with parameters
- **Classes**: `Class` declarations with methods and properties
- **Control structures**: `If...Then...Else`, `For...Next`, `Do...Loop`, `While...Wend`, `Select Case`
- **Variable declarations**: `Dim`, `Set`, `Let` statements
- **Expressions**: Arithmetic, comparison, and logical expressions
- **Comments**: Single quote (`'`) and `Rem` comments
- **Function calls**: Method calls and member expressions

## Installation

```bash
npm install tree-sitter-lotus
```

## Usage

### In Node.js

```javascript
const Parser = require('tree-sitter');
const LotusScript = require('tree-sitter-lotus');

const parser = new Parser();
parser.setLanguage(LotusScript);

const sourceCode = `
Option Public

Sub HelloWorld(name As String)
  Dim message As String
  message = "Hello, " & name & "!"
  Call PrintMessage(message)
End Sub

Function AddNumbers(a As Integer, b As Integer) As Integer
  AddNumbers = a + b
End Function
`;

const tree = parser.parse(sourceCode);
console.log(tree.rootNode.toString());
```

### In VS Code

1. Install the grammar package
2. VS Code will automatically use it for `.lss` and `.ls` files
3. You'll get syntax highlighting and parsing for LotusScript files

## Development

### Building the grammar

```bash
npm run generate
```

### Running tests

```bash
npm test
```

### Parsing a file

```bash
npm run parse path/to/your/file.lss
```

## Grammar Structure

The grammar recognizes the following main constructs:

- `source_file`: Top-level container for all statements
- `option_stmt`: Option declarations
- `class_decl`: Class definitions
- `sub_decl`: Subroutine definitions
- `function_decl`: Function definitions
- `statement`: Various statement types
- `expression`: Expression parsing with operator precedence

## Contributing

1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Add tests for new features
5. Submit a pull request

## License

MIT License - see LICENSE file for details.

## Related

- [Tree-sitter](https://tree-sitter.github.io/tree-sitter/)
- [LotusScript Language Reference](https://help.hcltechsw.com/domino/11.0.1/programming/programming.html) 

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "tree-sitter-lotus",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "incremental, parsing, tree-sitter, lotus",
    "author": null,
    "author_email": "adapts <sheel@adapts.ai>",
    "download_url": "https://files.pythonhosted.org/packages/1f/a0/458c857f2fa8eb2271e1155a7f72e0cbfbdf926650b55f58b6883933358c/tree_sitter_lotus-0.1.0.tar.gz",
    "platform": null,
    "description": "# tree-sitter-lotus\n\nTree-sitter grammar for LotusScript, the programming language used in IBM Lotus Notes and Domino.\n\n## Features\n\nThis grammar supports the core LotusScript syntax including:\n\n- **Option statements**: `Option Public`, `Option Private`, `Option Declare`, `Option Explicit`\n- **Subroutines and Functions**: `Sub` and `Function` declarations with parameters\n- **Classes**: `Class` declarations with methods and properties\n- **Control structures**: `If...Then...Else`, `For...Next`, `Do...Loop`, `While...Wend`, `Select Case`\n- **Variable declarations**: `Dim`, `Set`, `Let` statements\n- **Expressions**: Arithmetic, comparison, and logical expressions\n- **Comments**: Single quote (`'`) and `Rem` comments\n- **Function calls**: Method calls and member expressions\n\n## Installation\n\n```bash\nnpm install tree-sitter-lotus\n```\n\n## Usage\n\n### In Node.js\n\n```javascript\nconst Parser = require('tree-sitter');\nconst LotusScript = require('tree-sitter-lotus');\n\nconst parser = new Parser();\nparser.setLanguage(LotusScript);\n\nconst sourceCode = `\nOption Public\n\nSub HelloWorld(name As String)\n  Dim message As String\n  message = \"Hello, \" & name & \"!\"\n  Call PrintMessage(message)\nEnd Sub\n\nFunction AddNumbers(a As Integer, b As Integer) As Integer\n  AddNumbers = a + b\nEnd Function\n`;\n\nconst tree = parser.parse(sourceCode);\nconsole.log(tree.rootNode.toString());\n```\n\n### In VS Code\n\n1. Install the grammar package\n2. VS Code will automatically use it for `.lss` and `.ls` files\n3. You'll get syntax highlighting and parsing for LotusScript files\n\n## Development\n\n### Building the grammar\n\n```bash\nnpm run generate\n```\n\n### Running tests\n\n```bash\nnpm test\n```\n\n### Parsing a file\n\n```bash\nnpm run parse path/to/your/file.lss\n```\n\n## Grammar Structure\n\nThe grammar recognizes the following main constructs:\n\n- `source_file`: Top-level container for all statements\n- `option_stmt`: Option declarations\n- `class_decl`: Class definitions\n- `sub_decl`: Subroutine definitions\n- `function_decl`: Function definitions\n- `statement`: Various statement types\n- `expression`: Expression parsing with operator precedence\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Add tests for new features\n5. Submit a pull request\n\n## License\n\nMIT License - see LICENSE file for details.\n\n## Related\n\n- [Tree-sitter](https://tree-sitter.github.io/tree-sitter/)\n- [LotusScript Language Reference](https://help.hcltechsw.com/domino/11.0.1/programming/programming.html) \n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Tree-sitter grammar for LotusScript",
    "version": "0.1.0",
    "project_urls": {
        "Homepage": "https://github.com/adaptsai/tree-sitter-lotus.git"
    },
    "split_keywords": [
        "incremental",
        " parsing",
        " tree-sitter",
        " lotus"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "1fa0458c857f2fa8eb2271e1155a7f72e0cbfbdf926650b55f58b6883933358c",
                "md5": "309996770e6ed579440aa66e7008f955",
                "sha256": "ac2879f42a20de7bae80a3c7b907fd9d81cde8ad587037b72a8302eec11d0313"
            },
            "downloads": -1,
            "filename": "tree_sitter_lotus-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "309996770e6ed579440aa66e7008f955",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 61309,
            "upload_time": "2025-07-18T19:17:17",
            "upload_time_iso_8601": "2025-07-18T19:17:17.024150Z",
            "url": "https://files.pythonhosted.org/packages/1f/a0/458c857f2fa8eb2271e1155a7f72e0cbfbdf926650b55f58b6883933358c/tree_sitter_lotus-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-18 19:17:17",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "adaptsai",
    "github_project": "tree-sitter-lotus",
    "github_not_found": true,
    "lcname": "tree-sitter-lotus"
}
        
Elapsed time: 1.48212s