Skip to content

Commit

Permalink
Add missing license headers
Browse files Browse the repository at this point in the history
  • Loading branch information
msujew committed Sep 4, 2024
1 parent 2a9efa0 commit 9b0ecae
Show file tree
Hide file tree
Showing 19 changed files with 2,435 additions and 98 deletions.
2,337 changes: 2,276 additions & 61 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"scripts": {
"clean": "npm run clean --workspaces",
"watch": "tsc -b tsconfig.build.json --watch",
"build": "tsc -b tsconfig.build.json && npm run build --workspaces && node ./scripts/merge-tmlanguage.mjs",
"build": "npm run langium:generate && tsc -b tsconfig.build.json && npm run build --workspaces && node ./scripts/merge-tmlanguage.mjs",
"build:clean": "npm run clean && npm run build",
"lint": "eslint src --ext ts",
"langium:generate": "npm run --workspace packages/language langium:generate",
Expand Down
4 changes: 3 additions & 1 deletion packages/extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"main": "./out/extension/main.cjs",
"scripts": {
"clean": "shx rm -fr *.tsbuildinfo out",
"vscode:prepublish": "npm run build",
"vscode:prepublish": "npm run build && node esbuild.mjs --minify",
"package": "vsce package --no-dependencies",
"build": "tsc -b tsconfig.json && node esbuild.mjs",
"build:clean": "npm run clean && npm run build",
"watch": "concurrently -n tsc,esbuild -c blue,yellow \"tsc -b tsconfig.json --watch\" \"node esbuild.mjs --watch\""
Expand All @@ -38,6 +39,7 @@
},
"devDependencies": {
"@types/vscode": "~1.67.0",
"@vscode/vsce": "^3.0.0",
"concurrently": "~8.2.1",
"esbuild": "~0.21.5"
}
Expand Down
11 changes: 11 additions & 0 deletions packages/extension/src/extension/builtin-files.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/**
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Copyright Contributors to the Zowe Project.
*
*/

import * as vscode from 'vscode';
// @ts-ignore
import builtin from '../../../language/builtin/builtin-functions.pli';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/**
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Copyright Contributors to the Zowe Project.
*
*/

import { AstNode, JSDocDocumentationProvider } from 'langium';
import { isDeclaredVariable, isDoType3Variable, isLabelPrefix, isProcedureStatement, ProcedureStatement } from '../generated/ast';

Expand Down
11 changes: 11 additions & 0 deletions packages/language/src/lsp/pli-completion-provider.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/**
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Copyright Contributors to the Zowe Project.
*
*/

import { AstNodeDescription } from "langium";
import { CompletionValueItem, DefaultCompletionProvider } from "langium/lsp";

Expand Down
11 changes: 11 additions & 0 deletions packages/language/src/lsp/pli-node-kind-provider.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/**
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Copyright Contributors to the Zowe Project.
*
*/

import { AstNode, AstNodeDescription, isAstNodeDescription } from "langium";
import { DefaultNodeKindProvider } from "langium/lsp";
import { CompletionItemKind, SymbolKind } from "vscode-languageserver-types";
Expand Down
11 changes: 11 additions & 0 deletions packages/language/src/lsp/pli-semantic-highlighting.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/**
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Copyright Contributors to the Zowe Project.
*
*/

import { AstNode } from 'langium';
import { AbstractSemanticTokenProvider, SemanticTokenAcceptor } from 'langium/lsp';
import { isDeclaredVariable, isDefineAliasStatement, isDoType3Variable, isEndStatement, isLabelPrefix, isLabelReference, isLiteral, isNumberLiteral, isProcedureCall, isProcedureParameter, isProcedureStatement, isReferenceItem, isStringLiteral } from '../generated/ast';
Expand Down
31 changes: 0 additions & 31 deletions packages/language/src/parser/pli-grammar.ts

This file was deleted.

11 changes: 11 additions & 0 deletions packages/language/src/parser/pli-token-builder.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/**
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Copyright Contributors to the Zowe Project.
*
*/

import { TokenType, TokenVocabulary } from "chevrotain";
import { DefaultTokenBuilder, Grammar, GrammarUtils, RegExpUtils, stream, TokenBuilderOptions } from "langium";

Expand Down
2 changes: 0 additions & 2 deletions packages/language/src/pli-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import { createDefaultModule, createDefaultSharedModule, PartialLangiumSharedSer
import { Pl1GeneratedModule, Pl1GeneratedSharedModule } from './generated/module.js';
import { Pl1Validator, registerValidationChecks } from './pli-validator.js';
import { Pl1Lexer } from './parser/pli-lexer.js';
import { getPliGrammar } from './parser/pli-grammar.js';
import { PliTokenBuilder } from './parser/pli-token-builder.js';
import { PliScopeComputation } from './references/pli-scope-computation.js';
import { PliDocumentValidator } from './validation/pli-document-validator.js';
Expand Down Expand Up @@ -49,7 +48,6 @@ export type Pl1Services = LangiumServices & Pl1AddedServices
* selected services, while the custom services must be fully specified.
*/
export const PliModule: Module<Pl1Services, PartialLangiumServices & Pl1AddedServices> = {
Grammar: () => getPliGrammar(),
documentation: {
DocumentationProvider: services => new PliDocumentationProvider(services)
},
Expand Down
11 changes: 11 additions & 0 deletions packages/language/src/references/pli-name-provider.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/**
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Copyright Contributors to the Zowe Project.
*
*/

import { AstNode, CstNode, DefaultNameProvider } from "langium";
import { isProcedureStatement } from "../generated/ast";

Expand Down
11 changes: 11 additions & 0 deletions packages/language/src/references/pli-references.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/**
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Copyright Contributors to the Zowe Project.
*
*/

import { AstNode, DefaultReferences, FindReferencesOptions, ReferenceDescription, Stream } from "langium";
import { isLabelPrefix, isProcedureStatement } from "../generated/ast";

Expand Down
11 changes: 11 additions & 0 deletions packages/language/src/references/pli-scope-computation.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/**
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Copyright Contributors to the Zowe Project.
*
*/

import { AstNode, AstNodeDescription, AstUtils, DefaultScopeComputation, LangiumDocument, PrecomputedScopes } from "langium";
import { CancellationToken } from "vscode-jsonrpc";

Expand Down
11 changes: 11 additions & 0 deletions packages/language/src/references/pli-scope-provider.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/**
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Copyright Contributors to the Zowe Project.
*
*/

import { AstUtils, DefaultScopeProvider, EMPTY_SCOPE, ReferenceInfo, Scope } from "langium";
import { DeclaredVariable, isDeclaredVariable, isMemberCall } from "../generated/ast";

Expand Down
11 changes: 11 additions & 0 deletions packages/language/src/validation/pli-document-validator.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/**
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Copyright Contributors to the Zowe Project.
*
*/

import { AstNode, DefaultDocumentValidator, DiagnosticInfo, DocumentValidator, LangiumDocument, LinkingErrorData, ValidationOptions } from "langium";
import { Diagnostic } from "vscode-languageserver-types";

Expand Down
11 changes: 11 additions & 0 deletions packages/language/src/workspace/pli-index-manager.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/**
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Copyright Contributors to the Zowe Project.
*
*/

import { DefaultIndexManager, LangiumDocument } from "langium";

export class PliIndexManager extends DefaultIndexManager {
Expand Down
11 changes: 11 additions & 0 deletions packages/language/src/workspace/pli-workspace-manager.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/**
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Copyright Contributors to the Zowe Project.
*
*/

import { DefaultWorkspaceManager, LangiumDocument, LangiumDocumentFactory, URI, WorkspaceFolder } from "langium";
// @ts-ignore
import builtins from '../../builtin/builtin-functions.pli';
Expand Down
14 changes: 12 additions & 2 deletions scripts/merge-tmlanguage.mjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
import deepmerge from 'deepmerge';
/**
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Copyright Contributors to the Zowe Project.
*
*/

import * as fs from 'fs/promises';

import { createLangiumGrammarServices } from 'langium/grammar';
import { NodeFileSystem } from 'langium/node';
import { parseHelper } from 'langium/test';
import { AstUtils, GrammarAST, RegExpUtils } from 'langium';
import { readFileSync, writeFileSync } from 'fs';
import { readFileSync } from 'fs';

const services = createLangiumGrammarServices({
fileSystemProvider: NodeFileSystem.fileSystemProvider
Expand Down

0 comments on commit 9b0ecae

Please sign in to comment.