Updated jael_language_server

This commit is contained in:
thomashii 2021-12-20 00:28:51 +08:00
parent 1e7446af51
commit 6ffbdcf442
9 changed files with 42 additions and 49 deletions

View file

@ -1,21 +1,29 @@
MIT License (MIT) BSD 3-Clause License
Copyright (c) 2021 dukefirehawk.com Copyright (c) 2021, dukefirehawk.com
All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy Redistribution and use in source and binary forms, with or without
of this software and associated documentation files (the "Software"), to deal modification, are permitted provided that the following conditions are met:
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all 1. Redistributions of source code must retain the above copyright notice, this
copies or substantial portions of the Software. list of conditions and the following disclaimer.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 2. Redistributions in binary form must reproduce the above copyright notice,
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, this list of conditions and the following disclaimer in the documentation
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE and/or other materials provided with the distribution.
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 3. Neither the name of the copyright holder nor the names of its
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE contributors may be used to endorse or promote products derived from
SOFTWARE. this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View file

@ -1,4 +1 @@
include: package:pedantic/analysis_options.yaml include: package:lints/recommended.yaml
analyzer:
strong-mode:
implicit-casts: false

View file

@ -4,8 +4,8 @@ import 'package:args/args.dart';
import 'package:io/ansi.dart'; import 'package:io/ansi.dart';
import 'package:io/io.dart'; import 'package:io/io.dart';
//import 'package:dart_language_server/dart_language_server.dart'; //import 'package:dart_language_server/dart_language_server.dart';
import 'package:jael_language_server/jael_language_server.dart'; import 'package:jael3_language_server/jael3_language_server.dart';
import 'package:jael_language_server/src/protocol/language_server/server.dart'; import 'package:jael3_language_server/src/protocol/language_server/server.dart';
void main(List<String> args) async { void main(List<String> args) async {
var argParser = ArgParser() var argParser = ArgParser()

View file

@ -1,6 +1,6 @@
import 'package:jael/jael.dart'; import 'package:jael3/jael3.dart';
import 'package:logging/logging.dart'; import 'package:logging/logging.dart';
import 'package:symbol_table/symbol_table.dart'; import 'package:belatuk_symbol_table/belatuk_symbol_table.dart';
import 'object.dart'; import 'object.dart';
class Analyzer extends Parser { class Analyzer extends Parser {

View file

@ -4,13 +4,13 @@ import 'dart:async';
import 'package:file/file.dart'; import 'package:file/file.dart';
import 'package:file/local.dart'; import 'package:file/local.dart';
import 'package:file/memory.dart'; import 'package:file/memory.dart';
import 'package:jael/jael.dart'; import 'package:jael3/jael3.dart';
import 'package:json_rpc_2/json_rpc_2.dart' as json_rpc_2; import 'package:json_rpc_2/json_rpc_2.dart' as json_rpc_2;
import 'package:logging/logging.dart'; import 'package:logging/logging.dart';
import 'package:path/path.dart' as p; import 'package:path/path.dart' as p;
import 'package:source_span/source_span.dart'; import 'package:source_span/source_span.dart';
import 'package:string_scanner/string_scanner.dart'; import 'package:string_scanner/string_scanner.dart';
import 'package:symbol_table/symbol_table.dart'; import 'package:belatuk_symbol_table/belatuk_symbol_table.dart';
import 'analyzer.dart'; import 'analyzer.dart';
import 'object.dart'; import 'object.dart';
import 'protocol/language_server/interface.dart'; import 'protocol/language_server/interface.dart';

View file

@ -1,5 +1,5 @@
name: jael_language_server name: jael3_language_server
version: 0.0.0 version: 1.0.0
description: Language Server Protocol implementation for the Jael templating engine. description: Language Server Protocol implementation for the Jael templating engine.
homepage: https://github.com/angel-dart/vscode homepage: https://github.com/angel-dart/vscode
publish_to: none publish_to: none
@ -10,27 +10,15 @@ dependencies:
# dart_language_server: ^0.1.16 # dart_language_server: ^0.1.16
file: ^6.1.2 file: ^6.1.2
io: ^1.0.0 io: ^1.0.0
jael: jael3: ^4.2.0
git: jael3_preprocessor: ^4.2.0
url: https://github.com/dukefirehawk/angel.git
ref: sdk-2.12.x_nnbd
path: packages/jael/jael
jael_preprocessor:
git:
url: https://github.com/dukefirehawk/angel.git
ref: sdk-2.12.x_nnbd
path: packages/jael/jael_preprocessor
json_rpc_2: ^3.0.1 json_rpc_2: ^3.0.1
logging: ^1.0.1 logging: ^1.0.1
path: ^1.8.0 path: ^1.8.0
source_span: ^1.8.1 source_span: ^1.8.1
string_scanner: ^1.1.0 string_scanner: ^1.1.0
symbol_table: belatuk_symbol_table: ^3.0.0
git: lints: ^1.0.0
url: https://github.com/dukefirehawk/angel.git
ref: sdk-2.12.x_nnbd
path: packages/symbol_table
pedantic: ^1.11.0
executables: executables:
jael_language_server: jael_language_server jael3_language_server: jael3_language_server

View file

@ -1,10 +1,10 @@
builders: builders:
jael_web: jael_web:
import: "package:jael_web/builder.dart" import: "package:jael3_web/builder.dart"
builder_factories: builder_factories:
- jaelComponentBuilder - jaelComponentBuilder
build_extensions: build_extensions:
.dart: .dart:
- .jael_web_cmp.g.part - .jael3_web_cmp.g.part
auto_apply: root_package auto_apply: root_package
applies_builders: ["source_gen|combining_builder", "source_gen|part_cleanup"] applies_builders: ["source_gen|combining_builder", "source_gen|part_cleanup"]

View file

@ -12,7 +12,7 @@ import 'util.dart';
var _upper = RegExp(r'^[A-Z]'); var _upper = RegExp(r'^[A-Z]');
Builder jaelComponentBuilder(_) { Builder jaelComponentBuilder(_) {
return SharedPartBuilder([JaelComponentGenerator()], 'jael_web_cmp'); return SharedPartBuilder([JaelComponentGenerator()], 'jael3_web_cmp');
} }
class JaelComponentGenerator extends GeneratorForAnnotation<Jael> { class JaelComponentGenerator extends GeneratorForAnnotation<Jael> {