Skip to content

Commit

Permalink
Merge pull request #561 from nevalang/fix_selectors
Browse files Browse the repository at this point in the history
Fix selectors
  • Loading branch information
emil14 authored Apr 28, 2024
2 parents 1e289b5 + 2a0a780 commit d55e088
Show file tree
Hide file tree
Showing 16 changed files with 374 additions and 453 deletions.
263 changes: 4 additions & 259 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,24 @@
{
"version": "0.2.0",
"configurations": [
// CLI
// get
{
"name": "neva get github.com/nevalang/x",
"name": "GET",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/cmd/neva",
"cwd": "${workspaceFolder}/examples",
"args": ["get", "github.com/nevalang/x"]
},
// run (examples)
{
"name": "RUN",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/cmd/neva",
"cwd": "${workspaceFolder}/e2e/run_cli_not_from_module_root/foo",
"args": ["run", "bar"]
"cwd": "${workspaceFolder}",
"args": ["run", "examples/struct_selector"]
},
// === LSP ===
{
"name": "LSP",
"type": "go",
Expand All @@ -32,259 +28,8 @@
"cwd": "${workspaceFolder}",
"args": ["-debug"]
},
// === ANTLR ===
{
"name": "antlr_000_empty.neva",
"type": "antlr-debug",
"request": "launch",
"input": "${workspaceFolder}/internal/compiler/parser/tests/happypath/000_empty.neva",
"grammar": "${workspaceFolder}/internal/compiler/parser/neva.g4",
"startRule": "prog",
"printParseTree": true,
"visualParseTree": true
},
{
"name": "antlr_001_newline.neva",
"type": "antlr-debug",
"request": "launch",
"input": "${workspaceFolder}/internal/compiler/parser/tests/happypath/001_newline.neva",
"grammar": "${workspaceFolder}/internal/compiler/parser/neva.g4",
"startRule": "prog",
"printParseTree": true,
"visualParseTree": true
},
{
"name": "antlr_002_comments.neva",
"type": "antlr-debug",
"request": "launch",
"input": "${workspaceFolder}/internal/compiler/parser/tests/happypath/002_comments.neva",
"grammar": "${workspaceFolder}/internal/compiler/parser/neva.g4",
"startRule": "prog",
"printParseTree": true,
"visualParseTree": true
},
{
"name": "antlr_003_use.neva",
"type": "antlr-debug",
"request": "launch",
"input": "${workspaceFolder}/internal/compiler/parser/tests/happypath/003_use.neva",
"grammar": "${workspaceFolder}/internal/compiler/parser/neva.g4",
"startRule": "prog",
"printParseTree": true,
"visualParseTree": true
},
{
"name": "antlr_004_type.simple.neva",
"type": "antlr-debug",
"request": "launch",
"input": "${workspaceFolder}/internal/compiler/parser/tests/happypath/004_type.simple.neva",
"grammar": "${workspaceFolder}/internal/compiler/parser/neva.g4",
"startRule": "prog",
"printParseTree": true,
"visualParseTree": true
},
{
"name": "antlr_005_type.args.neva",
"type": "antlr-debug",
"request": "launch",
"input": "${workspaceFolder}/internal/compiler/parser/tests/happypath/005_type.args.neva",
"grammar": "${workspaceFolder}/internal/compiler/parser/neva.g4",
"startRule": "prog",
"printParseTree": true,
"visualParseTree": true
},
{
"name": "antlr_006_type.enum.neva",
"type": "antlr-debug",
"request": "launch",
"input": "${workspaceFolder}/internal/compiler/parser/tests/happypath/006_type.enum.neva",
"grammar": "${workspaceFolder}/internal/compiler/parser/neva.g4",
"startRule": "prog",
"printParseTree": true,
"visualParseTree": true
},
{
"name": "antlr_007_type.rec.simple.neva",
"type": "antlr-debug",
"request": "launch",
"input": "${workspaceFolder}/internal/compiler/parser/tests/happypath/007_type.rec.simple.neva",
"grammar": "${workspaceFolder}/internal/compiler/parser/neva.g4",
"startRule": "prog",
"printParseTree": true,
"visualParseTree": true
},
{
"name": "antlr_008_type.rec.args.neva",
"type": "antlr-debug",
"request": "launch",
"input": "${workspaceFolder}/internal/compiler/parser/tests/happypath/008_type.rec.args.neva",
"grammar": "${workspaceFolder}/internal/compiler/parser/neva.g4",
"startRule": "prog",
"printParseTree": true,
"visualParseTree": true
},
{
"name": "antlr_009_type.rec.nested.empty.neva",
"type": "antlr-debug",
"request": "launch",
"input": "${workspaceFolder}/internal/compiler/parser/tests/happypath/009_type.rec.nested.empty.neva",
"grammar": "${workspaceFolder}/internal/compiler/parser/neva.g4",
"startRule": "prog",
"printParseTree": true,
"visualParseTree": true
},
{
"name": "antlr_010_type.rec.nested.neva",
"type": "antlr-debug",
"request": "launch",
"input": "${workspaceFolder}/internal/compiler/parser/tests/happypath/010_type.rec.nested.neva",
"grammar": "${workspaceFolder}/internal/compiler/parser/neva.g4",
"startRule": "prog",
"printParseTree": true,
"visualParseTree": true
},
{
"name": "antlr_012_type.union.simple.neva",
"type": "antlr-debug",
"request": "launch",
"input": "${workspaceFolder}/internal/compiler/parser/tests/happypath/012_type.union.simple.neva",
"grammar": "${workspaceFolder}/internal/compiler/parser/neva.g4",
"startRule": "prog",
"printParseTree": true,
"visualParseTree": true
},
{
"name": "antlr_013_type.union.args.neva",
"type": "antlr-debug",
"request": "launch",
"input": "${workspaceFolder}/internal/compiler/parser/tests/happypath/013_type.union.args.neva",
"grammar": "${workspaceFolder}/internal/compiler/parser/neva.g4",
"startRule": "prog",
"printParseTree": true,
"visualParseTree": true
},
{
"name": "antlr_014_type.complex.neva",
"type": "antlr-debug",
"request": "launch",
"input": "${workspaceFolder}/internal/compiler/parser/tests/happypath/014_type.complex.neva",
"grammar": "${workspaceFolder}/internal/compiler/parser/neva.g4",
"startRule": "prog",
"printParseTree": true,
"visualParseTree": true
},
{
"name": "antlr_015_interface.simple.neva",
"type": "antlr-debug",
"request": "launch",
"input": "${workspaceFolder}/internal/compiler/parser/tests/happypath/015_interface.simple.neva",
"grammar": "${workspaceFolder}/internal/compiler/parser/neva.g4",
"startRule": "prog",
"printParseTree": true,
"visualParseTree": true
},
{
"name": "antlr_016_interface.enums.neva",
"type": "antlr-debug",
"request": "launch",
"input": "${workspaceFolder}/internal/compiler/parser/tests/happypath/016_interface.enums.neva",
"grammar": "${workspaceFolder}/internal/compiler/parser/neva.g4",
"startRule": "prog",
"printParseTree": true,
"visualParseTree": true
},
{
"name": "antlr_018_interface.struct_simple.neva",
"type": "antlr-debug",
"request": "launch",
"input": "${workspaceFolder}/internal/compiler/parser/tests/happypath/018_interface.struct_simple.neva",
"grammar": "${workspaceFolder}/internal/compiler/parser/neva.g4",
"startRule": "prog",
"printParseTree": true,
"visualParseTree": true
},
{
"name": "antlr_019_interface.struct_nested.neva",
"type": "antlr-debug",
"request": "launch",
"input": "${workspaceFolder}/internal/compiler/parser/tests/happypath/019_interface.struct_nested.neva",
"grammar": "${workspaceFolder}/internal/compiler/parser/neva.g4",
"startRule": "prog",
"printParseTree": true,
"visualParseTree": true
},
{
"name": "antlr_020_interface.union.neva",
"type": "antlr-debug",
"request": "launch",
"input": "${workspaceFolder}/internal/compiler/parser/tests/happypath/020_interface.union.neva",
"grammar": "${workspaceFolder}/internal/compiler/parser/neva.g4",
"startRule": "prog",
"printParseTree": true,
"visualParseTree": true
},
{
"name": "antlr_021_interface.mixed.neva",
"type": "antlr-debug",
"request": "launch",
"input": "${workspaceFolder}/internal/compiler/parser/tests/happypath/021_interface.mixed.neva",
"grammar": "${workspaceFolder}/internal/compiler/parser/neva.g4",
"startRule": "prog",
"printParseTree": true,
"visualParseTree": true
},
{
"name": "antlr_022_interface.typeargs.neva",
"type": "antlr-debug",
"request": "launch",
"input": "${workspaceFolder}/internal/compiler/parser/tests/happypath/022_interface.typeargs.neva",
"grammar": "${workspaceFolder}/internal/compiler/parser/neva.g4",
"startRule": "prog",
"printParseTree": true,
"visualParseTree": true
},
{
"name": "antlr_023_const.simple.neva",
"type": "antlr-debug",
"request": "launch",
"input": "${workspaceFolder}/internal/compiler/parser/tests/happypath/023_const.simple.neva",
"grammar": "${workspaceFolder}/internal/compiler/parser/neva.g4",
"startRule": "prog",
"printParseTree": true,
"visualParseTree": true
},
{
"name": "antlr_024_const.mixed.neva",
"type": "antlr-debug",
"request": "launch",
"input": "${workspaceFolder}/internal/compiler/parser/tests/happypath/024_const.mixed.neva",
"grammar": "${workspaceFolder}/internal/compiler/parser/neva.g4",
"startRule": "prog",
"printParseTree": true,
"visualParseTree": true
},
{
"name": "antlr_025_component.neva",
"type": "antlr-debug",
"request": "launch",
"input": "${workspaceFolder}/internal/compiler/parser/tests/happypath/025_component.neva",
"grammar": "${workspaceFolder}/internal/compiler/parser/neva.g4",
"startRule": "prog",
"printParseTree": true,
"visualParseTree": true
},
{
"name": "antlr_026_mixed.neva",
"type": "antlr-debug",
"request": "launch",
"input": "${workspaceFolder}/internal/compiler/parser/tests/happypath/026_mixed.neva",
"grammar": "${workspaceFolder}/internal/compiler/parser/neva.g4",
"startRule": "prog",
"printParseTree": true,
"visualParseTree": true
},
{
"name": "antlr_027_compiler_directives.neva",
"name": "ANTLR",
"type": "antlr-debug",
"request": "launch",
"input": "${workspaceFolder}/internal/compiler/parser/tests/happypath/027_compiler_directives.neva",
Expand Down
59 changes: 37 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,21 @@ A general-purpose flow-based programming language with static types and implicit

Website: https://nevalang.org/

## Features 🚀

- **Flow-Based Programming**
- **Strong Static Typing**
- **Implicit Parallelism**
- **Compiles to Machine Code, Go and More**
- **Clean C-like Syntax**
- **Interpreter Mode**
- **First-Class Dependency Injection**
- **Builtin Observability**
- **Package Management**
- **Garbage Collection**

Please note that even though these features are technically implemented, _developer-experience may be bad_ due to current project state. _No backward-compatibility_ guarantees at the time.

## Quick Start

### Download Neva CLI
Expand Down Expand Up @@ -40,7 +55,23 @@ curl -o installer.bat -sSL https://raw.githubusercontent.com/nevalang/neva/main/
neva new test
```

Replace the code in `src/main.neva` with the following:
Replace the code in `cat test/src/main.neva` with the following:

### Execute

```bash
neva run test/src
```

You should see the following output:

```bash
Hello, World!
```

### What's inside?

If you open `test/src/main.neva` with your favorite IDE you'll see this

```neva
component Main(start) (stop) {
Expand Down Expand Up @@ -69,24 +100,8 @@ Hello, World!

### What's Next?

- [See more examples](./examples/)
- [Learn how to generate native code, Go or other targets](https://nevalang.org/docs/quick-start)
- [Learn more about the language](https://nevalang.org/docs/about)

## Features 🚀

- Flow-Based Programming
- Implicit Parallelism
- Strong Static Typing
- Multi-Target Compilation
- Clean C-like Syntax
- Interpreter Mode
- Builtin Dependency Injection
- Builtin Observability
- Package Management
- Garbage Collection

Please note that even though these features are technically implemented, **developer-experience may be bad** due to current project state. **No backward-compatibility** guarantees at the time.
- [Learn more about the language](https://nevalang.org/)
- [See more examples](./examples/) (`git clone` this repo and `neva run` them!)

## Roadmap (🚧 WIP)

Expand All @@ -95,15 +110,15 @@ Nevalang is at an extremely early stage but with the help of community it can be
- Building a Community
- Core Standard Library
- Feature-Rich LSP-compatible Language Server
- Go Interop (import go from neva and neva from go)
- **Go Interop** (import go from neva and neva from go)
- DAP-compatible Debugger
- Testing Framework
- No Runtime Exceptions (If it runs then it works)
- Visual Programming in VSCode (Nevalang becomes hybrid langauge)
- **Visual Programming** in VSCode (Nevalang becomes hybrid langauge)

[See backlog for more details](https://github.com/orgs/nevalang/projects)

Nevalang needs your help - it currently just a few maintainers.
Nevalang needs _your_ help - it currently just a few maintainers.

## Community

Expand Down
Loading

0 comments on commit d55e088

Please sign in to comment.