Skip to content

Commit

Permalink
Merge pull request #480 from nevalang/fix_imports
Browse files Browse the repository at this point in the history
Fix imports
  • Loading branch information
emil14 committed Feb 29, 2024
2 parents ba0982d + 158901d commit 9199587
Show file tree
Hide file tree
Showing 16 changed files with 1,725 additions and 1,329 deletions.
9 changes: 9 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,15 @@
"cwd": "${workspaceFolder}/examples",
"args": ["run", "2_hello_world/3_with_literal_sender"]
},
{
"name": "Neva CLI 24",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/cmd/cli",
"cwd": "${workspaceFolder}/examples",
"args": ["run", "2_hello_world/4_with_unnamed_node"]
},
{
"name": "Neva CLI 30",
"type": "go",
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Website: https://nevalang.org/

```neva
component Main(start any) (stop any) {
nodes { printer Printer<string> }
nodes { Printer<string> }
net {
:start -> ('Hello, World!' -> printer:data)
printer:sig -> :stop
Expand Down
14 changes: 14 additions & 0 deletions examples/2_hello_world/4_with_unnamed_node/main.neva
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Finally, the shortest "hello world" with "literal senders".
// Why have const senders then, one might ask?
// First of all, only primitive messages such as bool, int, float and string
// could be used as network senders. So no structs, lists or maps senders.
// Secondly, what if you wanna use your message in several places?
// Finally, you might wanna move your message to const just because it's big!

component Main(start any) (stop any) {
nodes { Printer<string> }
net {
:start -> ('Hello, World!' -> printer:data)
printer:sig -> :stop
}
}
4 changes: 2 additions & 2 deletions examples/3_interfaces/main.neva
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {
nevalang/main/x
github.com/nevalang/x:main
}

interface IPrinter<T>(data T) (sig T)
Expand All @@ -8,7 +8,7 @@ component {
Main(start any) (stop any) {
nodes {
subNode SecondComponent {
depNode x.Printer<any>
depNode main.Printer<any>
}
}
net {
Expand Down
4 changes: 2 additions & 2 deletions examples/neva.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
neva: 0.6.0
deps:
nevalang/x:
github.com/nevalang/x:
path: github.com/nevalang/x
version: 0.0.6
version: 0.0.7
8 changes: 5 additions & 3 deletions internal/compiler/parser/generated/neva.interp

Large diffs are not rendered by default.

34 changes: 17 additions & 17 deletions internal/compiler/parser/generated/neva.tokens
Original file line number Diff line number Diff line change
Expand Up @@ -44,24 +44,24 @@ WS=39
'import'=5
'{'=6
'}'=7
'/'=8
':'=8
'@'=9
'.'=10
'type'=11
'<'=12
'>'=13
'enum'=14
'struct'=15
'|'=16
'interface'=17
'['=18
']'=19
'const'=20
'='=21
'true'=22
'false'=23
'nil'=24
':'=25
'/'=10
'.'=11
'type'=12
'<'=13
'>'=14
'enum'=15
'struct'=16
'|'=17
'interface'=18
'['=19
']'=20
'const'=21
'='=22
'true'=23
'false'=24
'nil'=25
'component'=26
'nodes'=27
'net'=28
Expand Down
6 changes: 3 additions & 3 deletions internal/compiler/parser/generated/nevaLexer.interp

Large diffs are not rendered by default.

34 changes: 17 additions & 17 deletions internal/compiler/parser/generated/nevaLexer.tokens
Original file line number Diff line number Diff line change
Expand Up @@ -44,24 +44,24 @@ WS=39
'import'=5
'{'=6
'}'=7
'/'=8
':'=8
'@'=9
'.'=10
'type'=11
'<'=12
'>'=13
'enum'=14
'struct'=15
'|'=16
'interface'=17
'['=18
']'=19
'const'=20
'='=21
'true'=22
'false'=23
'nil'=24
':'=25
'/'=10
'.'=11
'type'=12
'<'=13
'>'=14
'enum'=15
'struct'=16
'|'=17
'interface'=18
'['=19
']'=20
'const'=21
'='=22
'true'=23
'false'=24
'nil'=25
'component'=26
'nodes'=27
'net'=28
Expand Down
12 changes: 12 additions & 0 deletions internal/compiler/parser/generated/neva_base_listener.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

74 changes: 37 additions & 37 deletions internal/compiler/parser/generated/neva_lexer.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions internal/compiler/parser/generated/neva_listener.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9199587

Please sign in to comment.