open-index/open-npm huggingface dataset:
npm package: @idyllic/compiler
Description: Compiler source for the Idyllic API engine
Author: Rishi Kothari
Latest version: 0.1.12

# `@idyllic/server`

Complete Typescript implementation of a compiler for the Idyllic Language.

## Usage

```typescript
import { IdyllicCompiler } from '@idyllic/compiler'
import * as util from 'util'
;(async () => {
	const compiled = await (await IdyllicCompiler.fromFile('spec.idl')).compile()

	console.log(util.inspect(compiled, false, null, true))
})()
```

## Structure

All source lives in the `src/` directory, as is the Typescript norm.

You can find the first stage of compilation (tokenization/lexing) & all associated models in the `lexer/` directory,
which holds the
`Lexer` class. Tokens & their types are also held here.

The next stage of the compilation pipeline is held in the `parser/` directory, along with all AST models.

The last three stages are held in the `compiler/` directory, and branch off from a single `Compiler` class, as
opposed to having individual classes for each. These last three stages can be fully chained with each other.
npm package: @idyllic/server
Description: The complementary web server for Idyllic.
Author: Rishi Kothari
Latest version: 0.1.12

# `@idyllic/server`

Web server module that complements the compiler for hosting.

## Usage

```typescript
import { IdyllicCompiler } from '@idyllic/compiler'
import { IdyllicServer } from '@idyllic/server'
;(async () => {
	const compiled = await (await IdyllicCompiler.fromFile('spec.idl')).compile()
	const server = new IdyllicServer(compiled)

	server.start(3000, () => {
		console.log('Idyllic server started!')
	})
})()
```

## Structure

`index.ts` is where the entire implementation lives; the code behind it isn't too difficult to understand, but as we
continue down the roadmap, it'll steadily become more and more complex.