Compare commits
No commits in common. "859ed7402ab43a3f26f05a6b735f68788038b1bf" and "c81922fc97162d2672a260c7ae145f052396af4e" have entirely different histories.
859ed7402a
...
c81922fc97
|
|
@ -12,7 +12,7 @@ Go to http://localhost:3000 to try out the playground.
|
|||
tail log.txt lines=50
|
||||
|
||||
name = "Shrimp"
|
||||
greet = do person: echo "Hello" person
|
||||
greet = fn person: echo "Hello" person
|
||||
|
||||
result = tail log.txt lines=10
|
||||
|
||||
|
|
@ -33,7 +33,7 @@ Go to http://localhost:3000 to try out the playground.
|
|||
## Architecture
|
||||
|
||||
**parser/** - Lezer grammar and tokenizers that parse Shrimp code into syntax trees
|
||||
**editor/** - CodeMirror integration with syntax highlighting and language support
|
||||
**editor/** - CodeMirror integration with syntax highlighting and language support
|
||||
**compiler/** - Transforms syntax trees into ReefVM bytecode for execution
|
||||
|
||||
The flow: Shrimp source → parser (CST) → compiler (bytecode) → ReefVM (execution)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { expect, describe, test, beforeEach } from 'bun:test'
|
||||
import { type Value } from 'reefvm'
|
||||
|
||||
const buffer: string[] = []
|
||||
|
||||
|
|
@ -7,8 +8,8 @@ const ribbitGlobals = {
|
|||
await cb()
|
||||
return buffer.join("\n")
|
||||
},
|
||||
tag: async (tagFn: Function, atDefaults = {}) => {
|
||||
return (atNamed = {}, ...args: any[]) => tagFn(Object.assign({}, atDefaults, atNamed), ...args)
|
||||
tag: (tagName: string, atDefaults = {}) => {
|
||||
return (atNamed = {}, ...args: any[]) => tag(tagName, Object.assign({}, atDefaults, atNamed), ...args)
|
||||
},
|
||||
head: (atNamed: {}, ...args: any[]) => tag('head', atNamed, ...args),
|
||||
title: (atNamed: {}, ...args: any[]) => tag('title', atNamed, ...args),
|
||||
|
|
@ -80,7 +81,7 @@ end
|
|||
|
||||
test('custom tags', () => {
|
||||
expect(`
|
||||
list = tag ul class=list
|
||||
list = tag 'ul' class=list
|
||||
ribbit:
|
||||
list:
|
||||
li border-bottom='1px solid black' one
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user