Skip to content

Commit

Permalink
Initial model layer to simplify code generation (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
pkedy committed Jun 10, 2022
1 parent bde3f32 commit 6800744
Show file tree
Hide file tree
Showing 7 changed files with 1,917 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ interface {
const doc = parse(source, undefined, { noLocation: true });
const errors = validate(doc, ...CommonRules);

if (errors.length > 0) {
if (errors.length > 0) {
errors.map(e => console.log(e.message));
} else {
const context = new Context({});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@apexlang/core",
"version": "0.0.16",
"version": "0.0.17",
"description": "Apex language JavaScript support",
"keywords": [
"apex",
Expand Down
3 changes: 3 additions & 0 deletions src/model/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export * from "./model.js";
export * from "./kinds.js";
export * from "./visitor.js";
25 changes: 25 additions & 0 deletions src/model/kinds.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
export enum Kind {
// Models
Namespace = "Namespace",
Import = "Import",
Alias = "Alias",
Interface = "Interface",
Role = "Role",
Operation = "Operation",
Parameter = "Parameter",
Type = "Type",
Field = "Field",
Union = "Union",
Enum = "Enum",
EnumValue = "EnumValue",
Directive = "Directive",
Require = "Require",
Annotation = "Annotation",
Argument = "Argument",
Void = "Void",
Primitive = "Primitive",
List = "List",
Map = "Map",
Optional = "Optional",
Stream = "Stream",
}
Loading

0 comments on commit 6800744

Please sign in to comment.