Started working on JS docs.

This commit is contained in:
Joshua Bemenderfer
2023-02-14 22:24:59 -05:00
parent 91ca89f158
commit 4156e3bf91
24 changed files with 364 additions and 69 deletions

View File

@@ -1,5 +1,5 @@
{
"name": "@terrace/c",
"name": "@terrace-lang/c",
"version": "0.0.1",
"license": "MIT",
"scripts": {

View File

@@ -1,5 +1,5 @@
{
"name": "@terrace/js",
"name": "@terrace-lang/js",
"version": "0.0.1",
"license": "MIT",
"type": "module",

View File

@@ -7,7 +7,7 @@ export type Document = {
line: (startOffset?: number) => string,
head: () => string,
tail: () => string,
match: (matchHead: string) => boolean
match: (matchValue: string) => boolean
}
export function useDocument (reader: Reader, indent: string = ' '): Document {
@@ -43,7 +43,7 @@ export function useDocument (reader: Reader, indent: string = ' '): Document {
const line = (startOffset: number = lineData.offsetHead) => lineData.line.slice(startOffset)
const head = () => lineData.line.slice(lineData.offsetHead, lineData.offsetTail)
const tail = () => lineData.line.slice(lineData.offsetTail + 1) // Skip the space
const match = (matchHead: string): boolean => matchHead === head()
const match = (matchValue: string): boolean => matchValue === head()
return {
next,

View File

@@ -1,5 +1,5 @@
import { createLineData, parseLine, useDocument } from '@terrace/js'
import { createStdinReader } from '@terrace/js/readers/node-readline'
import { createLineData, parseLine, useDocument } from '@terrace-lang/js'
import { createStdinReader } from '@terrace-lang/js/readers/node-readline'
const testName = process.argv[2]

View File

@@ -1,5 +1,5 @@
{
"name": "@terrace/python",
"name": "@terrace-lang/python",
"version": "0.0.1",
"license": "MIT",
"scripts": {