├── CONTRIBUTING.md
├── scie-core
├── .gitignore
├── src
│ ├── sima
│ │ ├── mod.rs
│ │ └── java_sima.rs
│ ├── analyser
│ │ └── mod.rs
│ └── lib.rs
└── Cargo.toml
├── src
└── main.rs
├── fixtures
├── finder
│ └── ignore-test
│ │ ├── hello2.cj
│ │ ├── .gitignore
│ │ └── hello.cj
├── projects
│ └── java
│ │ ├── simple
│ │ ├── build.gradle
│ │ ├── app
│ │ │ └── build.gradle
│ │ ├── .gitignore
│ │ └── settings.gradle
│ │ └── hello
│ │ └── HelloWorld.java
└── test-cases
│ ├── first-mate
│ ├── README.md
│ └── fixtures
│ │ ├── loops.json
│ │ ├── include-external-repository-rule.json
│ │ ├── forever.json
│ │ ├── imaginary.json
│ │ ├── objective-c-plus-plus.json
│ │ ├── content-name.json
│ │ ├── infinite-loop.json
│ │ ├── hello.json
│ │ ├── nested-captures.json
│ │ ├── multiline.json
│ │ ├── todo.json
│ │ ├── hyperlink.json
│ │ ├── apply-end-pattern-last.json
│ │ └── text.json
│ ├── e2e
│ ├── java
│ │ └── HelloWorld.java
│ ├── javascript
│ │ └── pairs.js
│ ├── makefile
│ │ └── Makefile
│ ├── json
│ │ └── simple-json.json
│ ├── rust
│ │ └── rust.rs.txt
│ └── csharp
│ │ └── test.cs
│ └── onigtests
│ └── fixtures
│ ├── onigasm-issue3.js
│ ├── php-onigasm-issue17.php
│ ├── test-issue11.ts
│ └── test.cs
├── scie-model
├── README.md
├── src
│ ├── artifact
│ │ ├── README.md
│ │ └── code_file.rs
│ ├── lib.rs
│ ├── contribute.rs
│ └── raw_language.rs
└── Cargo.toml
├── scie-cli
├── .gitignore
├── src
│ └── validate.rs
├── README.md
└── Cargo.toml
├── scie-grammar
├── .gitignore
├── src
│ ├── support
│ │ ├── mod.rs
│ │ └── matcher.rs
│ ├── registry
│ │ └── mod.rs
│ ├── inter
│ │ ├── injections.rs
│ │ ├── raw_captures.rs
│ │ └── location.rs
│ ├── grammar
│ │ ├── scope_metadata.rs
│ │ ├── local_stack_element.rs
│ │ └── grammar_reader.rs
│ ├── lib.rs
│ └── rule
│ │ ├── rule.rs
│ │ ├── compiled_rule.rs
│ │ └── empty_rule.rs
└── Cargo.toml
├── extensions
├── r
│ ├── .vscodeignore
│ ├── package.nls.json
│ ├── cgmanifest.json
│ ├── test
│ │ └── colorize-fixtures
│ │ │ └── test.r
│ ├── language-configuration.json
│ └── package.json
├── bat
│ ├── .vscodeignore
│ ├── package.nls.json
│ ├── snippets
│ │ └── batchfile.code-snippets
│ ├── cgmanifest.json
│ ├── test
│ │ └── colorize-fixtures
│ │ │ └── test.bat
│ ├── language-configuration.json
│ └── package.json
├── csharp
│ ├── .vscodeignore
│ ├── package.nls.json
│ ├── snippets
│ │ └── csharp.code-snippets
│ ├── cgmanifest.json
│ ├── test
│ │ └── colorize-fixtures
│ │ │ └── test.cs
│ └── language-configuration.json
├── fsharp
│ ├── .vscodeignore
│ ├── package.nls.json
│ ├── snippets
│ │ └── fsharp.code-snippets
│ ├── cgmanifest.json
│ ├── test
│ │ └── colorize-fixtures
│ │ │ └── test.fs
│ ├── language-configuration.json
│ └── package.json
├── go
│ ├── .vscodeignore
│ ├── test
│ │ └── colorize-fixtures
│ │ │ ├── test-13777.go
│ │ │ └── test.go
│ ├── package.nls.json
│ ├── cgmanifest.json
│ └── package.json
├── groovy
│ ├── .vscodeignore
│ ├── package.nls.json
│ ├── language-configuration.json
│ └── package.json
├── html
│ ├── .vscodeignore
│ ├── test
│ │ └── colorize-fixtures
│ │ │ ├── 13448.html
│ │ │ ├── 12750.html
│ │ │ ├── test-embedding.html
│ │ │ └── 25920.html
│ ├── package.nls.json
│ └── language-configuration.json
├── java
│ ├── .vscodeignore
│ ├── package.nls.json
│ ├── snippets
│ │ └── java.code-snippets
│ ├── cgmanifest.json
│ ├── language-configuration.json
│ ├── test
│ │ └── colorize-fixtures
│ │ │ └── basic.java
│ └── package.json
├── less
│ ├── .vscodeignore
│ ├── test
│ │ └── colorize-fixtures
│ │ │ ├── 14119.less
│ │ │ └── test-cssvariables.less
│ ├── package.nls.json
│ ├── cgmanifest.json
│ └── language-configuration.json
├── lua
│ ├── .vscodeignore
│ ├── package.nls.json
│ ├── test
│ │ └── colorize-fixtures
│ │ │ └── test.lua
│ ├── package.json
│ └── language-configuration.json
├── make
│ ├── .vscodeignore
│ ├── package.nls.json
│ └── language-configuration.json
├── perl
│ ├── .vscodeignore
│ ├── package.nls.json
│ ├── perl6.language-configuration.json
│ └── perl.language-configuration.json
├── ruby
│ ├── .vscodeignore
│ ├── package.nls.json
│ ├── package.json
│ └── language-configuration.json
├── rust
│ ├── .vscodeignore
│ ├── package.nls.json
│ ├── test
│ │ └── colorize-fixtures
│ │ │ ├── test.rs
│ │ │ └── test-6611.rs
│ ├── cgmanifest.json
│ ├── package.json
│ └── language-configuration.json
├── scss
│ ├── .vscodeignore
│ ├── package.nls.json
│ ├── test
│ │ └── colorize-fixtures
│ │ │ └── test-cssvariables.scss
│ ├── cgmanifest.json
│ └── language-configuration.json
├── sql
│ ├── .vscodeignore
│ ├── package.nls.json
│ ├── test
│ │ └── colorize-fixtures
│ │ │ └── test.sql
│ ├── cgmanifest.json
│ ├── package.json
│ └── language-configuration.json
├── swift
│ ├── .vscodeignore
│ ├── package.nls.json
│ ├── test
│ │ └── colorize-fixtures
│ │ │ └── test.swift
│ ├── language-configuration.json
│ └── package.json
├── typescript-language-features
│ ├── test-workspace
│ │ ├── foo.ts
│ │ ├── foojs.js
│ │ ├── index.ts
│ │ ├── bar.ts
│ │ └── tsconfig.json
│ ├── icon.png
│ ├── .vscodeignore
│ ├── schemas
│ │ ├── jsconfig.schema.json
│ │ ├── tsconfig.schema.json
│ │ └── package.schema.json
│ ├── src
│ │ ├── protocol.d.ts
│ │ ├── typings
│ │ │ ├── collections.d.ts
│ │ │ └── ref.d.ts
│ │ ├── utils
│ │ │ ├── regexp.ts
│ │ │ ├── modifiers.ts
│ │ │ ├── platform.ts
│ │ │ ├── cancellation.ts
│ │ │ ├── documentSelector.ts
│ │ │ └── fileSchemes.ts
│ │ ├── tsServer
│ │ │ └── logDirectoryProvider.ts
│ │ └── commands
│ │ │ ├── configurePlugin.ts
│ │ │ ├── restartTsServer.ts
│ │ │ ├── openTsServerLog.ts
│ │ │ └── selectTypeScriptVersion.ts
│ ├── tsconfig.json
│ ├── README.md
│ ├── extension.webpack.config.js
│ └── language-configuration.json
├── vb
│ ├── .vscodeignore
│ ├── package.nls.json
│ ├── language-configuration.json
│ ├── package.json
│ └── test
│ │ └── colorize-fixtures
│ │ └── test.vb
├── xml
│ ├── .vscodeignore
│ ├── package.nls.json
│ ├── test
│ │ └── colorize-fixtures
│ │ │ ├── test-7115.xml
│ │ │ └── test.xml
│ ├── xsl.language-configuration.json
│ └── cgmanifest.json
├── yaml
│ ├── .vscodeignore
│ ├── test
│ │ └── colorize-fixtures
│ │ │ ├── issue-1550.yaml
│ │ │ ├── issue-4008.yaml
│ │ │ ├── issue-6303.yaml
│ │ │ └── test.yaml
│ ├── package.nls.json
│ └── language-configuration.json
├── clojure
│ ├── .vscodeignore
│ ├── package.nls.json
│ ├── language-configuration.json
│ ├── cgmanifest.json
│ └── package.json
├── css
│ ├── .vscodeignore
│ ├── package.nls.json
│ ├── test
│ │ └── colorize-fixtures
│ │ │ └── test-variables.css
│ ├── cgmanifest.json
│ └── language-configuration.json
├── objective-c
│ ├── .vscodeignore
│ ├── package.nls.json
│ ├── language-configuration.json
│ ├── cgmanifest.json
│ └── build
│ │ └── update-grammars.js
├── powershell
│ ├── .vscodeignore
│ ├── test
│ │ └── colorize-fixtures
│ │ │ └── test-freeze-56476.ps1
│ ├── package.nls.json
│ ├── snippets
│ │ └── powershell.code-snippets
│ ├── cgmanifest.json
│ ├── language-configuration.json
│ └── package.json
├── shellscript
│ ├── .vscodeignore
│ ├── package.nls.json
│ ├── cgmanifest.json
│ ├── language-configuration.json
│ └── test
│ │ └── colorize-fixtures
│ │ └── test.sh
├── coffeescript
│ ├── .vscodeignore
│ ├── package.nls.json
│ ├── test
│ │ └── colorize-fixtures
│ │ │ ├── test-regex.coffee
│ │ │ └── test.coffee
│ ├── snippets
│ │ └── coffeescript.code-snippets
│ ├── cgmanifest.json
│ └── language-configuration.json
├── cpp
│ ├── .vscodeignore
│ ├── test
│ │ └── colorize-fixtures
│ │ │ ├── test-23630.cpp
│ │ │ ├── test-23850.cpp
│ │ │ ├── test-80644.cpp
│ │ │ ├── test-92369.cpp
│ │ │ ├── test.cc
│ │ │ ├── test.cpp
│ │ │ └── test.c
│ ├── package.nls.json
│ ├── snippets
│ │ ├── c.code-snippets
│ │ └── cpp.code-snippets
│ └── language-configuration.json
├── php
│ ├── test
│ │ └── colorize-fixtures
│ │ │ ├── issue-76997.php
│ │ │ └── issue-28354.php
│ ├── .vscodeignore
│ ├── package.nls.json
│ └── cgmanifest.json
├── css-language-features
│ ├── server
│ │ ├── test
│ │ │ ├── pathCompletionFixtures
│ │ │ │ ├── index.html
│ │ │ │ ├── about
│ │ │ │ │ ├── about.html
│ │ │ │ │ └── about.css
│ │ │ │ ├── .foo.js
│ │ │ │ ├── src
│ │ │ │ │ ├── test.js
│ │ │ │ │ ├── data
│ │ │ │ │ │ └── foo.asar
│ │ │ │ │ └── feature.js
│ │ │ │ └── scss
│ │ │ │ │ ├── _foo.scss
│ │ │ │ │ └── main.scss
│ │ │ └── linksTestFixtures
│ │ │ │ ├── .gitignore
│ │ │ │ └── node_modules
│ │ │ │ └── foo
│ │ │ │ └── package.json
│ │ ├── tsconfig.json
│ │ ├── extension.webpack.config.js
│ │ ├── src
│ │ │ └── browser
│ │ │ │ └── cssServerMain.ts
│ │ └── extension-browser.webpack.config.js
│ ├── test
│ │ └── mocha.opts
│ ├── icons
│ │ └── css.png
│ ├── client
│ │ ├── tsconfig.json
│ │ └── src
│ │ │ └── typings
│ │ │ └── ref.d.ts
│ ├── .vscodeignore
│ ├── README.md
│ ├── extension.webpack.config.js
│ ├── extension-browser.webpack.config.js
│ └── schemas
│ │ └── package.schema.json
├── json
│ ├── .vscodeignore
│ ├── package.nls.json
│ ├── test
│ │ └── colorize-fixtures
│ │ │ └── test.json
│ ├── cgmanifest.json
│ └── language-configuration.json
├── typescript-basics
│ ├── test
│ │ └── colorize-fixtures
│ │ │ ├── test-this.ts
│ │ │ ├── test-keywords.ts
│ │ │ ├── test-function-inv.ts
│ │ │ ├── test-issue5465.ts
│ │ │ ├── tsconfig_off.json
│ │ │ ├── test-object-literals.ts
│ │ │ ├── test-issue5566.ts
│ │ │ ├── test-members.ts
│ │ │ ├── test-issue5431.ts
│ │ │ ├── test-strings.ts
│ │ │ ├── test-brackets.tsx
│ │ │ ├── test-jsdoc-multiline-type.ts
│ │ │ └── test-issue11.ts
│ ├── .vscodeignore
│ ├── package.nls.json
│ ├── cgmanifest.json
│ └── language-configuration.json
├── javascript
│ ├── .vscodeignore
│ ├── test
│ │ └── colorize-fixtures
│ │ │ ├── test6916.js
│ │ │ └── test.jsx
│ ├── package.nls.json
│ ├── syntaxes
│ │ └── Readme.md
│ ├── tags-language-configuration.json
│ └── javascript-language-configuration.json
├── json-language-features
│ ├── server
│ │ ├── test
│ │ │ └── mocha.opts
│ │ ├── .npmignore
│ │ ├── tsconfig.json
│ │ ├── bin
│ │ │ └── vscode-json-languageserver
│ │ ├── src
│ │ │ ├── browser
│ │ │ │ └── jsonServerMain.ts
│ │ │ └── utils
│ │ │ │ └── strings.ts
│ │ └── extension-browser.webpack.config.js
│ ├── icons
│ │ └── json.png
│ ├── client
│ │ ├── tsconfig.json
│ │ └── src
│ │ │ └── typings
│ │ │ └── ref.d.ts
│ ├── README.md
│ ├── .vscodeignore
│ └── extension-browser.webpack.config.js
├── php-language-features
│ ├── .vscodeignore
│ ├── icons
│ │ └── logo.png
│ ├── tsconfig.json
│ ├── README.md
│ ├── src
│ │ ├── typings
│ │ │ ├── refs.d.ts
│ │ │ └── node.additions.d.ts
│ │ └── features
│ │ │ └── utils
│ │ │ └── markedTextUtil.ts
│ ├── yarn.lock
│ ├── extension.webpack.config.js
│ └── package.nls.json
└── python
│ ├── tsconfig.json
│ ├── .vscodeignore
│ ├── package.nls.json
│ ├── test
│ └── colorize-fixtures
│ │ └── test-freeze-56377.py
│ ├── cgmanifest.json
│ ├── src
│ ├── typings
│ │ └── ref.d.ts
│ └── pythonMain.ts
│ ├── extension.webpack.config.js
│ └── extension-browser.webpack.config.js
├── examples
├── c
│ ├── CMakeLists.txt
│ ├── hello.c
│ └── hello2.c
├── go
│ ├── go.mod
│ └── main.go
└── java
│ ├── build.gradle
│ └── HelloWorld.java
├── .adr.json
├── docs
├── design
│ ├── facet.md
│ └── grammar.md
├── compare
│ └── something.png
├── adr
│ ├── 0009-framework-detector.md
│ ├── 0001-base-language-choice.md
│ ├── 0007-use-bin-data-for-languages.md
│ ├── 0015-migration-to-tree-sitter.md
│ ├── 0005-switch-to-onig-sys-api.md
│ ├── 0013-virtual-file-system.md
│ ├── 0006-add-rust-onig-to-source-code.md
│ ├── 0011-gitignore-design.md
│ ├── README.md
│ └── 0010-align-extensions.md
├── issues
│ └── c.md
└── crash.md
├── scie-bingen
├── .gitignore
├── src
│ ├── lib.rs
│ └── ext_file.rs
└── Cargo.toml
├── scie-scanner
├── src
│ ├── scanner
│ │ └── mod.rs
│ └── lib.rs
├── justfile
└── Cargo.toml
├── scie-detector
├── src
│ ├── facet
│ │ ├── javascript
│ │ │ └── mod.rs
│ │ ├── rust_facet.rs
│ │ ├── go_facet.rs
│ │ ├── python_facet.rs
│ │ ├── java
│ │ │ ├── mod.rs
│ │ │ └── java_module_data.rs
│ │ ├── mod.rs
│ │ └── jvm_facet.rs
│ ├── dependency
│ │ ├── module_dependency.rs
│ │ ├── library_dependency.rs
│ │ ├── project_dependency.rs
│ │ ├── mod.rs
│ │ └── base_library.rs
│ ├── lib.rs
│ └── content_root.rs
├── Cargo.toml
└── docs
│ └── Command.md
├── scie-infra
├── src
│ ├── lib.rs
│ └── format_output.rs
└── Cargo.toml
├── scie-onig
├── src
│ ├── bindgened.rs
│ └── lib.rs
├── .gitignore
├── README.md
└── Cargo.toml
├── .gitattributes
├── .gitmodules
├── benchmark
└── Cargo.toml
├── .gitignore
├── justfile
└── .github
└── ISSUE_TEMPLATE
└── feature_request.md
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/scie-core/.gitignore:
--------------------------------------------------------------------------------
1 | foo.txt
--------------------------------------------------------------------------------
/src/main.rs:
--------------------------------------------------------------------------------
1 | fn main() {}
2 |
--------------------------------------------------------------------------------
/fixtures/finder/ignore-test/hello2.cj:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/scie-model/README.md:
--------------------------------------------------------------------------------
1 | # Scie Model
2 |
--------------------------------------------------------------------------------
/fixtures/projects/java/simple/build.gradle:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/scie-cli/.gitignore:
--------------------------------------------------------------------------------
1 | *.bin
2 | *.demo
3 |
--------------------------------------------------------------------------------
/scie-grammar/.gitignore:
--------------------------------------------------------------------------------
1 | program.json
2 |
--------------------------------------------------------------------------------
/fixtures/projects/java/simple/app/build.gradle:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/fixtures/finder/ignore-test/.gitignore:
--------------------------------------------------------------------------------
1 | hello.cj
2 |
--------------------------------------------------------------------------------
/extensions/r/.vscodeignore:
--------------------------------------------------------------------------------
1 | test/**
2 | cgmanifest.json
3 |
--------------------------------------------------------------------------------
/examples/c/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | add_executable(hello hello.c)
2 |
--------------------------------------------------------------------------------
/examples/go/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/phodal/scie-examples
2 |
--------------------------------------------------------------------------------
/extensions/bat/.vscodeignore:
--------------------------------------------------------------------------------
1 | test/**
2 | cgmanifest.json
3 |
--------------------------------------------------------------------------------
/extensions/csharp/.vscodeignore:
--------------------------------------------------------------------------------
1 | test/**
2 | cgmanifest.json
3 |
--------------------------------------------------------------------------------
/extensions/fsharp/.vscodeignore:
--------------------------------------------------------------------------------
1 | test/**
2 | cgmanifest.json
3 |
--------------------------------------------------------------------------------
/extensions/go/.vscodeignore:
--------------------------------------------------------------------------------
1 | test/**
2 | cgmanifest.json
3 |
--------------------------------------------------------------------------------
/extensions/groovy/.vscodeignore:
--------------------------------------------------------------------------------
1 | test/**
2 | cgmanifest.json
3 |
--------------------------------------------------------------------------------
/extensions/html/.vscodeignore:
--------------------------------------------------------------------------------
1 | test/**
2 | cgmanifest.json
3 |
--------------------------------------------------------------------------------
/extensions/java/.vscodeignore:
--------------------------------------------------------------------------------
1 | test/**
2 | cgmanifest.json
3 |
--------------------------------------------------------------------------------
/extensions/less/.vscodeignore:
--------------------------------------------------------------------------------
1 | test/**
2 | cgmanifest.json
3 |
--------------------------------------------------------------------------------
/extensions/lua/.vscodeignore:
--------------------------------------------------------------------------------
1 | test/**
2 | cgmanifest.json
3 |
--------------------------------------------------------------------------------
/extensions/make/.vscodeignore:
--------------------------------------------------------------------------------
1 | test/**
2 | cgmanifest.json
3 |
--------------------------------------------------------------------------------
/extensions/perl/.vscodeignore:
--------------------------------------------------------------------------------
1 | test/**
2 | cgmanifest.json
3 |
--------------------------------------------------------------------------------
/extensions/ruby/.vscodeignore:
--------------------------------------------------------------------------------
1 | test/**
2 | cgmanifest.json
3 |
--------------------------------------------------------------------------------
/extensions/rust/.vscodeignore:
--------------------------------------------------------------------------------
1 | test/**
2 | cgmanifest.json
3 |
--------------------------------------------------------------------------------
/extensions/scss/.vscodeignore:
--------------------------------------------------------------------------------
1 | test/**
2 | cgmanifest.json
3 |
--------------------------------------------------------------------------------
/extensions/sql/.vscodeignore:
--------------------------------------------------------------------------------
1 | test/**
2 | cgmanifest.json
3 |
--------------------------------------------------------------------------------
/extensions/swift/.vscodeignore:
--------------------------------------------------------------------------------
1 | test/**
2 | cgmanifest.json
3 |
--------------------------------------------------------------------------------
/extensions/typescript-language-features/test-workspace/foo.ts:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/extensions/typescript-language-features/test-workspace/foojs.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/extensions/typescript-language-features/test-workspace/index.ts:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/extensions/vb/.vscodeignore:
--------------------------------------------------------------------------------
1 | test/**
2 | cgmanifest.json
3 |
--------------------------------------------------------------------------------
/extensions/xml/.vscodeignore:
--------------------------------------------------------------------------------
1 | test/**
2 | cgmanifest.json
3 |
--------------------------------------------------------------------------------
/extensions/yaml/.vscodeignore:
--------------------------------------------------------------------------------
1 | test/**
2 | cgmanifest.json
3 |
--------------------------------------------------------------------------------
/fixtures/projects/java/simple/.gitignore:
--------------------------------------------------------------------------------
1 | .gradle
2 | .idea
3 |
--------------------------------------------------------------------------------
/fixtures/projects/java/simple/settings.gradle:
--------------------------------------------------------------------------------
1 | include ":app"
--------------------------------------------------------------------------------
/.adr.json:
--------------------------------------------------------------------------------
1 | {"language":"en","path":"docs/adr/","prefix":"","digits":4}
--------------------------------------------------------------------------------
/extensions/clojure/.vscodeignore:
--------------------------------------------------------------------------------
1 | test/**
2 | cgmanifest.json
3 |
--------------------------------------------------------------------------------
/extensions/css/.vscodeignore:
--------------------------------------------------------------------------------
1 | test/**
2 | cgmanifest.json
3 | .vscode
--------------------------------------------------------------------------------
/extensions/objective-c/.vscodeignore:
--------------------------------------------------------------------------------
1 | test/**
2 | cgmanifest.json
3 |
--------------------------------------------------------------------------------
/extensions/powershell/.vscodeignore:
--------------------------------------------------------------------------------
1 | test/**
2 | cgmanifest.json
3 |
--------------------------------------------------------------------------------
/extensions/shellscript/.vscodeignore:
--------------------------------------------------------------------------------
1 | test/**
2 | cgmanifest.json
3 |
--------------------------------------------------------------------------------
/docs/design/facet.md:
--------------------------------------------------------------------------------
1 | # Facet
2 |
3 | related to IDEA Facet.
4 |
5 |
--------------------------------------------------------------------------------
/docs/design/grammar.md:
--------------------------------------------------------------------------------
1 | # Grammar
2 |
3 | use VSCode Grammar.
4 |
5 |
--------------------------------------------------------------------------------
/extensions/coffeescript/.vscodeignore:
--------------------------------------------------------------------------------
1 | test/**
2 | cgmanifest.json
3 |
--------------------------------------------------------------------------------
/extensions/cpp/.vscodeignore:
--------------------------------------------------------------------------------
1 | build/**
2 | test/**
3 | cgmanifest.json
4 |
--------------------------------------------------------------------------------
/extensions/php/test/colorize-fixtures/issue-76997.php:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/examples/java/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'java-gradle-plugin'
3 | }
4 |
--------------------------------------------------------------------------------
/extensions/css-language-features/server/test/pathCompletionFixtures/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/extensions/json/.vscodeignore:
--------------------------------------------------------------------------------
1 | build/**
2 | test/**
3 | cgmanifest.json
4 |
--------------------------------------------------------------------------------
/scie-grammar/src/support/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod matcher;
2 | pub mod regex_source;
3 |
--------------------------------------------------------------------------------
/extensions/css-language-features/server/test/linksTestFixtures/.gitignore:
--------------------------------------------------------------------------------
1 | !/node_modules
--------------------------------------------------------------------------------
/extensions/css-language-features/server/test/pathCompletionFixtures/about/about.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/extensions/typescript-language-features/test-workspace/bar.ts:
--------------------------------------------------------------------------------
1 | // export const foo = 1;
--------------------------------------------------------------------------------
/extensions/typescript-basics/test/colorize-fixtures/test-this.ts:
--------------------------------------------------------------------------------
1 | {
2 | this.foo = 9;
3 | }
--------------------------------------------------------------------------------
/extensions/cpp/test/colorize-fixtures/test-23630.cpp:
--------------------------------------------------------------------------------
1 | #ifndef _UCRT
2 | #define _UCRT
3 | #endif
--------------------------------------------------------------------------------
/extensions/cpp/test/colorize-fixtures/test-23850.cpp:
--------------------------------------------------------------------------------
1 | #ifndef _UCRT
2 | #define _UCRT
3 | #endif
--------------------------------------------------------------------------------
/extensions/css-language-features/server/test/linksTestFixtures/node_modules/foo/package.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/scie-bingen/.gitignore:
--------------------------------------------------------------------------------
1 | *map.json
2 | *map.bin
3 | grammar.json
4 | grammar.bin
5 | demo.bin
6 |
--------------------------------------------------------------------------------
/docs/compare/something.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/datum-lang/scie/HEAD/docs/compare/something.png
--------------------------------------------------------------------------------
/extensions/javascript/.vscodeignore:
--------------------------------------------------------------------------------
1 | test/**
2 | src/**/*.ts
3 | tsconfig.json
4 | cgmanifest.json
5 |
--------------------------------------------------------------------------------
/extensions/css-language-features/test/mocha.opts:
--------------------------------------------------------------------------------
1 | --ui tdd
2 | --useColors true
3 | server/out/test/**.test.js
--------------------------------------------------------------------------------
/extensions/go/test/colorize-fixtures/test-13777.go:
--------------------------------------------------------------------------------
1 | var e [][]*aType // ( comments after var are now green )
--------------------------------------------------------------------------------
/extensions/html/test/colorize-fixtures/13448.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/extensions/powershell/test/colorize-fixtures/test-freeze-56476.ps1:
--------------------------------------------------------------------------------
1 | <#
2 | .
3 | #>
--------------------------------------------------------------------------------
/fixtures/finder/ignore-test/hello.cj:
--------------------------------------------------------------------------------
1 | pkg hello
2 |
3 | ABC$func(a: int, b: string) out a: int {
4 |
5 | }
--------------------------------------------------------------------------------
/scie-scanner/src/scanner/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod onig_string;
2 | pub mod scie_scanner;
3 | pub mod utf_string;
4 |
--------------------------------------------------------------------------------
/extensions/json-language-features/server/test/mocha.opts:
--------------------------------------------------------------------------------
1 | --ui tdd
2 | --useColors true
3 | ./out/test/**/*.test.js
--------------------------------------------------------------------------------
/extensions/typescript-basics/test/colorize-fixtures/test-keywords.ts:
--------------------------------------------------------------------------------
1 | export var foo = () => new RegExp('');
2 |
--------------------------------------------------------------------------------
/examples/c/hello.c:
--------------------------------------------------------------------------------
1 | #include
2 | int main(){
3 | printf("Hello, World!");
4 | return 0;
5 | }
6 |
--------------------------------------------------------------------------------
/extensions/javascript/test/colorize-fixtures/test6916.js:
--------------------------------------------------------------------------------
1 | for(var i=0;i<9;i++){for(var j;j ({ 'bar': 'baz' })
3 | }
--------------------------------------------------------------------------------
/extensions/yaml/test/colorize-fixtures/issue-4008.yaml:
--------------------------------------------------------------------------------
1 | - blue: a="brown,not_brown"
2 | - not_blue: foo
3 | - blue: foo="}"
4 | - not_blue: 1
--------------------------------------------------------------------------------
/scie-core/src/analyser/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod analyser;
2 | pub mod identify;
3 |
4 | pub use analyser::Analyser;
5 | pub use identify::Identify;
6 |
--------------------------------------------------------------------------------
/examples/c/hello2.c:
--------------------------------------------------------------------------------
1 | #include
2 | int main (int argc, const char * argv[]) {
3 | printf("Hello, World!");
4 | return 0;
5 | }
6 |
--------------------------------------------------------------------------------
/extensions/json-language-features/icons/json.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/datum-lang/scie/HEAD/extensions/json-language-features/icons/json.png
--------------------------------------------------------------------------------
/extensions/php-language-features/.vscodeignore:
--------------------------------------------------------------------------------
1 | .vscode/**
2 | src/**
3 | out/**
4 | tsconfig.json
5 | extension.webpack.config.js
6 | yarn.lock
7 |
--------------------------------------------------------------------------------
/extensions/php-language-features/icons/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/datum-lang/scie/HEAD/extensions/php-language-features/icons/logo.png
--------------------------------------------------------------------------------
/extensions/typescript-language-features/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/datum-lang/scie/HEAD/extensions/typescript-language-features/icon.png
--------------------------------------------------------------------------------
/scie-detector/src/dependency/module_dependency.rs:
--------------------------------------------------------------------------------
1 | #[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
2 | pub struct ModuleDependency {}
3 |
--------------------------------------------------------------------------------
/fixtures/test-cases/first-mate/README.md:
--------------------------------------------------------------------------------
1 | These testcases have been generated from the test cases of _first-mate at https://github.com/atom/_first-mate
--------------------------------------------------------------------------------
/scie-detector/src/dependency/library_dependency.rs:
--------------------------------------------------------------------------------
1 | #[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
2 | pub struct LibraryDependency {}
3 |
--------------------------------------------------------------------------------
/scie-detector/src/dependency/project_dependency.rs:
--------------------------------------------------------------------------------
1 | #[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
2 | pub struct ProjectDependency {}
3 |
--------------------------------------------------------------------------------
/scie-detector/src/dependency/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod base_library;
2 | pub mod library_dependency;
3 | pub mod module_dependency;
4 | pub mod project_dependency;
5 |
--------------------------------------------------------------------------------
/scie-detector/src/facet/go_facet.rs:
--------------------------------------------------------------------------------
1 | #[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
2 | pub struct GoFacet {
3 | pub has_mod: bool,
4 | }
5 |
--------------------------------------------------------------------------------
/extensions/r/package.nls.json:
--------------------------------------------------------------------------------
1 | {
2 | "displayName": "R Language Basics",
3 | "description": "Provides syntax highlighting and bracket matching in R files."
4 | }
--------------------------------------------------------------------------------
/extensions/typescript-language-features/test-workspace/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es2018",
4 | "noEmit": true
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/extensions/go/package.nls.json:
--------------------------------------------------------------------------------
1 | {
2 | "displayName": "Go Language Basics",
3 | "description": "Provides syntax highlighting and bracket matching in Go files."
4 | }
--------------------------------------------------------------------------------
/extensions/json/package.nls.json:
--------------------------------------------------------------------------------
1 | {
2 | "displayName": "JSON Language Basics",
3 | "description": "Provides syntax highlighting & bracket matching in JSON files."
4 | }
--------------------------------------------------------------------------------
/extensions/lua/package.nls.json:
--------------------------------------------------------------------------------
1 | {
2 | "displayName": "Lua Language Basics",
3 | "description": "Provides syntax highlighting and bracket matching in Lua files."
4 | }
--------------------------------------------------------------------------------
/extensions/php/package.nls.json:
--------------------------------------------------------------------------------
1 | {
2 | "displayName": "PHP Language Basics",
3 | "description": "Provides syntax highlighting and bracket matching for PHP files."
4 | }
--------------------------------------------------------------------------------
/extensions/sql/package.nls.json:
--------------------------------------------------------------------------------
1 | {
2 | "displayName": "SQL Language Basics",
3 | "description": "Provides syntax highlighting and bracket matching in SQL files."
4 | }
--------------------------------------------------------------------------------
/extensions/xml/package.nls.json:
--------------------------------------------------------------------------------
1 | {
2 | "displayName": "XML Language Basics",
3 | "description": "Provides syntax highlighting and bracket matching in XML files."
4 | }
--------------------------------------------------------------------------------
/extensions/make/package.nls.json:
--------------------------------------------------------------------------------
1 | {
2 | "displayName": "Make Language Basics",
3 | "description": "Provides syntax highlighting and bracket matching in Make files."
4 | }
--------------------------------------------------------------------------------
/extensions/perl/package.nls.json:
--------------------------------------------------------------------------------
1 | {
2 | "displayName": "Perl Language Basics",
3 | "description": "Provides syntax highlighting and bracket matching in Perl files."
4 | }
--------------------------------------------------------------------------------
/extensions/ruby/package.nls.json:
--------------------------------------------------------------------------------
1 | {
2 | "displayName": "Ruby Language Basics",
3 | "description": "Provides syntax highlighting and bracket matching in Ruby files."
4 | }
--------------------------------------------------------------------------------
/extensions/rust/package.nls.json:
--------------------------------------------------------------------------------
1 | {
2 | "displayName": "Rust Language Basics",
3 | "description": "Provides syntax highlighting and bracket matching in Rust files."
4 | }
--------------------------------------------------------------------------------
/extensions/yaml/package.nls.json:
--------------------------------------------------------------------------------
1 | {
2 | "displayName": "YAML Language Basics",
3 | "description": "Provides syntax highlighting and bracket matching in YAML files."
4 | }
--------------------------------------------------------------------------------
/scie-detector/src/facet/python_facet.rs:
--------------------------------------------------------------------------------
1 | #[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
2 | pub struct PythonFacet {
3 | pub has_requirements: bool,
4 | }
5 |
--------------------------------------------------------------------------------
/extensions/html/package.nls.json:
--------------------------------------------------------------------------------
1 | {
2 | "displayName": "HTML Language Basics",
3 | "description": "Provides syntax highlighting, bracket matching & snippets in HTML files."
4 | }
--------------------------------------------------------------------------------
/extensions/html/test/colorize-fixtures/12750.html:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/scie-detector/src/facet/java/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod java_facet;
2 | pub mod java_module_data;
3 |
4 | pub use java_facet::JavaFacet;
5 | pub use java_module_data::JavaModuleData;
6 |
--------------------------------------------------------------------------------
/extensions/clojure/package.nls.json:
--------------------------------------------------------------------------------
1 | {
2 | "displayName": "Clojure Language Basics",
3 | "description": "Provides syntax highlighting and bracket matching in Clojure files."
4 | }
--------------------------------------------------------------------------------
/extensions/css/package.nls.json:
--------------------------------------------------------------------------------
1 | {
2 | "displayName": "CSS Language Basics",
3 | "description": "Provides syntax highlighting and bracket matching for CSS, LESS and SCSS files."
4 | }
--------------------------------------------------------------------------------
/extensions/less/package.nls.json:
--------------------------------------------------------------------------------
1 | {
2 | "displayName": "Less Language Basics",
3 | "description": "Provides syntax highlighting, bracket matching and folding in Less files."
4 | }
--------------------------------------------------------------------------------
/extensions/python/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../shared.tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "./out"
5 | },
6 | "include": [
7 | "src/**/*"
8 | ]
9 | }
--------------------------------------------------------------------------------
/extensions/scss/package.nls.json:
--------------------------------------------------------------------------------
1 | {
2 | "displayName": "SCSS Language Basics",
3 | "description": "Provides syntax highlighting, bracket matching and folding in SCSS files."
4 | }
--------------------------------------------------------------------------------
/extensions/swift/package.nls.json:
--------------------------------------------------------------------------------
1 | {
2 | "displayName": "Swift Language Basics",
3 | "description": "Provides snippets, syntax highlighting and bracket matching in Swift files."
4 | }
--------------------------------------------------------------------------------
/extensions/typescript-basics/test/colorize-fixtures/test-members.ts:
--------------------------------------------------------------------------------
1 | class A2 extends B1 {
2 | public count: number = 9;
3 | public resolveNextGeneration(cell : A2) {
4 | }
5 | }
--------------------------------------------------------------------------------
/scie-core/src/lib.rs:
--------------------------------------------------------------------------------
1 | #![allow(dead_code)]
2 |
3 | #[macro_use]
4 | extern crate serde;
5 |
6 | extern crate serde_derive;
7 |
8 | pub mod analyser;
9 | pub mod sima;
10 |
--------------------------------------------------------------------------------
/scie-model/src/artifact/README.md:
--------------------------------------------------------------------------------
1 | More see in [构建的抽象](https://www.phodal.com/blog/abstract-build/)
2 |
3 | # Model
4 |
5 | - Project
6 | - Module
7 | - Package
8 | - File
9 |
--------------------------------------------------------------------------------
/extensions/csharp/package.nls.json:
--------------------------------------------------------------------------------
1 | {
2 | "displayName": "C# Language Basics",
3 | "description": "Provides snippets, syntax highlighting, bracket matching and folding in C# files."
4 | }
--------------------------------------------------------------------------------
/extensions/fsharp/package.nls.json:
--------------------------------------------------------------------------------
1 | {
2 | "displayName": "F# Language Basics",
3 | "description": "Provides snippets, syntax highlighting, bracket matching and folding in F# files."
4 | }
--------------------------------------------------------------------------------
/extensions/groovy/package.nls.json:
--------------------------------------------------------------------------------
1 | {
2 | "displayName": "Groovy Language Basics",
3 | "description": "Provides snippets, syntax highlighting and bracket matching in Groovy files."
4 | }
--------------------------------------------------------------------------------
/extensions/python/.vscodeignore:
--------------------------------------------------------------------------------
1 | test/**
2 | src/**
3 | out/**
4 | tsconfig.json
5 | extension.webpack.config.js
6 | extension-browser.webpack.config.js
7 | cgmanifest.json
8 | .vscode
9 |
--------------------------------------------------------------------------------
/extensions/python/package.nls.json:
--------------------------------------------------------------------------------
1 | {
2 | "displayName": "Python Language Basics",
3 | "description": "Provides syntax highlighting, bracket matching and folding in Python files."
4 | }
--------------------------------------------------------------------------------
/fixtures/test-cases/e2e/java/HelloWorld.java:
--------------------------------------------------------------------------------
1 | public class HelloWorld {
2 | public static void main(String []args) {
3 | System.out.println("Hello World");
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/examples/java/HelloWorld.java:
--------------------------------------------------------------------------------
1 | package main;
2 |
3 | public class HelloWorld {
4 | public static void main(String []args) {
5 | System.out.println("Hello World");
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/extensions/cpp/package.nls.json:
--------------------------------------------------------------------------------
1 | {
2 | "displayName": "C/C++ Language Basics",
3 | "description": "Provides snippets, syntax highlighting, bracket matching and folding in C/C++ files."
4 | }
--------------------------------------------------------------------------------
/extensions/java/package.nls.json:
--------------------------------------------------------------------------------
1 | {
2 | "displayName": "Java Language Basics",
3 | "description": "Provides snippets, syntax highlighting, bracket matching and folding in Java files."
4 | }
--------------------------------------------------------------------------------
/extensions/make/language-configuration.json:
--------------------------------------------------------------------------------
1 | {
2 | "comments": {
3 | "lineComment": "#"
4 | },
5 | "brackets": [
6 | ["{", "}"],
7 | ["[", "]"],
8 | ["(", ")"]
9 | ]
10 | }
--------------------------------------------------------------------------------
/extensions/objective-c/package.nls.json:
--------------------------------------------------------------------------------
1 | {
2 | "displayName": "Objective-C Language Basics",
3 | "description": "Provides syntax highlighting and bracket matching in Objective-C files."
4 | }
--------------------------------------------------------------------------------
/extensions/shellscript/package.nls.json:
--------------------------------------------------------------------------------
1 | {
2 | "displayName": "Shell Script Language Basics",
3 | "description": "Provides syntax highlighting and bracket matching in Shell Script files."
4 | }
--------------------------------------------------------------------------------
/extensions/sql/test/colorize-fixtures/test.sql:
--------------------------------------------------------------------------------
1 | CREATE VIEW METRIC_STATS (ID, MONTH, TEMP_C, RAIN_C) AS
2 | SELECT ID,
3 | MONTH,
4 | (TEMP_F - 32) * 5 /9,
5 | RAIN_I * 0.3937
6 | FROM STATS;
--------------------------------------------------------------------------------
/extensions/php-language-features/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../shared.tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "./out"
5 | },
6 | "include": [
7 | "src/**/*"
8 | ]
9 | }
--------------------------------------------------------------------------------
/extensions/typescript-basics/test/colorize-fixtures/test-issue5431.ts:
--------------------------------------------------------------------------------
1 | function foo(isAll, startTime, endTime) {
2 | const timeRange = isAll ? '所有时间' : `${startTime} - ${endTime}`;
3 | return true;
4 | }
--------------------------------------------------------------------------------
/extensions/typescript-basics/test/colorize-fixtures/test-strings.ts:
--------------------------------------------------------------------------------
1 | var x = `Hello ${foo}!`;
2 | console.log(`string text line 1
3 | string text line 2`);
4 | x = tag`Hello ${ a + b } world ${ a * b }`;
--------------------------------------------------------------------------------
/extensions/vb/package.nls.json:
--------------------------------------------------------------------------------
1 | {
2 | "displayName": "Visual Basic Language Basics",
3 | "description": "Provides snippets, syntax highlighting, bracket matching and folding in Visual Basic files."
4 | }
--------------------------------------------------------------------------------
/extensions/bat/package.nls.json:
--------------------------------------------------------------------------------
1 | {
2 | "displayName": "Windows Bat Language Basics",
3 | "description": "Provides snippets, syntax highlighting, bracket matching and folding in Windows batch files."
4 | }
--------------------------------------------------------------------------------
/extensions/css-language-features/client/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../shared.tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "./out"
5 | },
6 | "include": [
7 | "src/**/*"
8 | ]
9 | }
--------------------------------------------------------------------------------
/extensions/css-language-features/server/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../shared.tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "./out"
5 | },
6 | "include": [
7 | "src/**/*"
8 | ]
9 | }
--------------------------------------------------------------------------------
/extensions/javascript/package.nls.json:
--------------------------------------------------------------------------------
1 | {
2 | "displayName": "JavaScript Language Basics",
3 | "description": "Provides snippets, syntax highlighting, bracket matching and folding in JavaScript files."
4 | }
--------------------------------------------------------------------------------
/extensions/json-language-features/client/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../shared.tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "./out"
5 | },
6 | "include": [
7 | "src/**/*"
8 | ]
9 | }
--------------------------------------------------------------------------------
/extensions/powershell/package.nls.json:
--------------------------------------------------------------------------------
1 | {
2 | "displayName": "Powershell Language Basics",
3 | "description": "Provides snippets, syntax highlighting, bracket matching and folding in Powershell files."
4 | }
--------------------------------------------------------------------------------
/extensions/cpp/test/colorize-fixtures/test-80644.cpp:
--------------------------------------------------------------------------------
1 | struct Foo {
2 | Foo();
3 | int a;
4 | int b;
5 | int c;
6 | };
7 | Foo::Foo()
8 | : a(1),
9 | // b(2),
10 | c(3) {}
11 |
--------------------------------------------------------------------------------
/fixtures/projects/java/hello/HelloWorld.java:
--------------------------------------------------------------------------------
1 | package hello;
2 |
3 | public class HelloWorld {
4 | public static void main(String []args) {
5 | System.out.println("Hello World");
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/extensions/coffeescript/package.nls.json:
--------------------------------------------------------------------------------
1 | {
2 | "displayName": "CoffeeScript Language Basics",
3 | "description": "Provides snippets, syntax highlighting, bracket matching and folding in CoffeeScript files."
4 | }
5 |
--------------------------------------------------------------------------------
/extensions/typescript-basics/package.nls.json:
--------------------------------------------------------------------------------
1 | {
2 | "displayName": "TypeScript Language Basics",
3 | "description": "Provides snippets, syntax highlighting, bracket matching and folding in TypeScript files."
4 | }
--------------------------------------------------------------------------------
/scie-onig/src/bindgened.rs:
--------------------------------------------------------------------------------
1 | #![allow(non_upper_case_globals)]
2 | #![allow(non_camel_case_types)]
3 | #![allow(non_snake_case)]
4 | #![allow(clippy::all)]
5 |
6 | include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
7 |
--------------------------------------------------------------------------------
/extensions/css/test/colorize-fixtures/test-variables.css:
--------------------------------------------------------------------------------
1 | :root {
2 | --spacing-unit: 6px;
3 | --cell-padding: (4 * var(--spacing-unit));
4 | }
5 | body {
6 | padding-left: calc(4 * var(--spacing-unit, 5px));
7 | }
--------------------------------------------------------------------------------
/extensions/less/test/colorize-fixtures/test-cssvariables.less:
--------------------------------------------------------------------------------
1 | :root {
2 | --spacing-unit: 6px;
3 | --cell-padding: (4 * var(--spacing-unit));
4 | }
5 | body {
6 | padding-left: calc(4 * var(--spacing-unit, 5px));
7 | }
--------------------------------------------------------------------------------
/extensions/scss/test/colorize-fixtures/test-cssvariables.scss:
--------------------------------------------------------------------------------
1 | :root {
2 | --spacing-unit: 6px;
3 | --cell-padding: (4 * var(--spacing-unit));
4 | }
5 | body {
6 | padding-left: calc(4 * var(--spacing-unit, 5px));
7 | }
--------------------------------------------------------------------------------
/extensions/typescript-basics/test/colorize-fixtures/test-brackets.tsx:
--------------------------------------------------------------------------------
1 | let a = Array(); // Highlight ok here
2 |
3 | interface egGenericsInArray {
4 | a: Array;
5 | }
6 | let s = "nothing should fail here...";
--------------------------------------------------------------------------------
/scie-cli/src/validate.rs:
--------------------------------------------------------------------------------
1 | use std::path::Path;
2 |
3 | pub struct Validate {}
4 |
5 | impl Validate {
6 | pub fn is_valid_path(path: String) -> bool {
7 | return Path::new(&path).exists();
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/extensions/json-language-features/server/.npmignore:
--------------------------------------------------------------------------------
1 | .vscode/
2 | out/test/
3 | out/**/*.js.map
4 | src/
5 | test/
6 | tsconfig.json
7 | .gitignore
8 | yarn.lock
9 | extension.webpack.config.js
10 | vscode-json-languageserver-*.tgz
--------------------------------------------------------------------------------
/fixtures/test-cases/e2e/javascript/pairs.js:
--------------------------------------------------------------------------------
1 | const fromPairs = function(arr) {
2 | return arr.reduce(function(accumulator, value) {
3 | accumulator[value[0]] = value[1];
4 | return accumulator;
5 | }, {})
6 | }
7 |
--------------------------------------------------------------------------------
/fixtures/test-cases/first-mate/fixtures/loops.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "loops",
3 | "scopeName": "source.loops",
4 | "patterns": [
5 | {
6 | "match": "(.*)(?=test)",
7 | "name": "variable.language.test"
8 | }
9 | ]
10 | }
--------------------------------------------------------------------------------
/fixtures/test-cases/e2e/makefile/Makefile:
--------------------------------------------------------------------------------
1 | CC=gcc
2 | CFLAGS=-I.
3 | DEPS = hellomake.h
4 | OBJ = hellomake.o hellofunc.o
5 |
6 | %.o: %.c $(DEPS)
7 | $(CC) -c -o $@ $< $(CFLAGS)
8 |
9 | hellomake: $(OBJ)
10 | $(CC) -o $@ $^ $(CFLAGS)
11 |
--------------------------------------------------------------------------------
/extensions/php/test/colorize-fixtures/issue-28354.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/extensions/typescript-language-features/.vscodeignore:
--------------------------------------------------------------------------------
1 | build/**
2 | src/**
3 | test/**
4 | test-workspace/**
5 | out/**
6 | tsconfig.json
7 | extension.webpack.config.js
8 | extension-browser.webpack.config.js
9 | cgmanifest.json
10 | yarn.lock
11 |
--------------------------------------------------------------------------------
/scie-bingen/src/lib.rs:
--------------------------------------------------------------------------------
1 | #![allow(dead_code)]
2 |
3 | #[macro_use]
4 | extern crate serde_derive;
5 | extern crate serde;
6 |
7 | extern crate bincode;
8 |
9 | pub mod bin_gen;
10 | pub mod ext_file;
11 | pub mod grammar_gen;
12 | pub mod language_gen;
13 |
--------------------------------------------------------------------------------
/scie-grammar/src/support/matcher.rs:
--------------------------------------------------------------------------------
1 | pub enum MatchPriority {
2 | High,
3 | Medium,
4 | Low,
5 | }
6 |
7 | pub struct MatcherWithPriority {
8 | matcher: Matcher,
9 | priority: MatchPriority,
10 | }
11 |
12 | pub struct Matcher {}
13 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | extensions/* linguist-vendored=true
2 | scie-grammar/test-cases/* linguist-vendored=true
3 | vscode-tests/* linguist-vendored=true
4 | vscode-tests/** linguist-vendored=true
5 | benchmark/* linguist-vendored=true
6 | fixtures/* linguist-vendored=true
7 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "scie-onig/libonigvs/oniguruma"]
2 | path = scie-onig/libonigvs/oniguruma
3 | url = https://github.com/kkos/oniguruma.git
4 | [submodule "3rd-party/gitignores"]
5 | path = 3rd-party/gitignores
6 | url = https://github.com/github/gitignore
7 |
--------------------------------------------------------------------------------
/extensions/json-language-features/server/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../shared.tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "./out",
5 | "sourceMap": true,
6 | "sourceRoot": "../src"
7 | },
8 | "include": [
9 | "src/**/*"
10 | ]
11 | }
--------------------------------------------------------------------------------
/scie-onig/.gitignore:
--------------------------------------------------------------------------------
1 | cmake-build-debug
2 | CMakeFiles
3 | cmake_install.cmake
4 | CMakeCache.txt
5 | Makefile
6 | onigvs.cbp
7 | libonigvs.a
8 | libonig.dylib
9 | libonigvs/src
10 | libonigvs/libonigvs.dylib
11 | install_manifest.txt
12 | */build/
13 | rust-onig/
14 |
--------------------------------------------------------------------------------
/scie-grammar/src/inter/injections.rs:
--------------------------------------------------------------------------------
1 | use crate::inter::IRawRule;
2 | use std::collections::BTreeMap;
3 |
4 | #[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
5 | pub struct InjectionMap {
6 | #[serde(flatten)]
7 | pub map: BTreeMap,
8 | }
9 |
--------------------------------------------------------------------------------
/extensions/html/test/colorize-fixtures/test-embedding.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/extensions/typescript-language-features/schemas/jsconfig.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "allowTrailingCommas": true,
3 | "title": "JSON schema for the JavaScript configuration file",
4 | "type": "object",
5 | "default": {
6 | "compilerOptions": {
7 | "target": "es6"
8 | }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/fixtures/test-cases/e2e/json/simple-json.json:
--------------------------------------------------------------------------------
1 | {
2 | "patterns": [
3 | {
4 | "patterns": [
5 | {
6 | "patterns": [
7 | {
8 | "name": "excentric"
9 | }
10 | ]
11 | }
12 | ]
13 | }
14 | ]
15 | }
--------------------------------------------------------------------------------
/docs/adr/0009-framework-detector.md:
--------------------------------------------------------------------------------
1 | # 9. framework detector
2 |
3 | Date: 2020-10-12
4 |
5 | ## Status
6 |
7 | 2020-10-12 proposed
8 |
9 | ## Context
10 |
11 | Context here...
12 |
13 | ## Decision
14 |
15 | Decision here...
16 |
17 | ## Consequences
18 |
19 | Consequences here...
20 |
--------------------------------------------------------------------------------
/extensions/coffeescript/test/colorize-fixtures/test-regex.coffee:
--------------------------------------------------------------------------------
1 | regex = /Hello (\d+) #{user}/g
2 | 2 / 3
3 | 2/3
4 |
5 | a = b/c + d/g
6 | someOtherStuff
7 |
8 | name="hello"
9 | test=/// #{name}
10 |
11 | fancyRegExp = ///
12 | (\d+) # numbers
13 | (\w*) # letters
14 | $ # the end
15 | ///
--------------------------------------------------------------------------------
/extensions/xml/test/colorize-fixtures/test-7115.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/fixtures/test-cases/first-mate/fixtures/include-external-repository-rule.json:
--------------------------------------------------------------------------------
1 | {
2 | "scopeName": "test.include-external-repository-rule",
3 | "patterns": [
4 | {
5 | "include": "source.nogrammar#a_rule"
6 | },
7 | {
8 | "include": "source.python#builtin_functions"
9 | }
10 | ]
11 | }
--------------------------------------------------------------------------------
/fixtures/test-cases/onigtests/fixtures/onigasm-issue3.js:
--------------------------------------------------------------------------------
1 | a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a12345678912345678=1
--------------------------------------------------------------------------------
/extensions/html/test/colorize-fixtures/25920.html:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/scie-detector/src/lib.rs:
--------------------------------------------------------------------------------
1 | #![allow(dead_code)]
2 |
3 | #[macro_use]
4 | extern crate lazy_static;
5 |
6 | #[macro_use]
7 | extern crate serde_derive;
8 | extern crate regex;
9 | extern crate serde;
10 |
11 | pub mod framework_detector;
12 |
13 | pub mod content_root;
14 | pub mod dependency;
15 | pub mod facet;
16 |
--------------------------------------------------------------------------------
/extensions/json/test/colorize-fixtures/test.json:
--------------------------------------------------------------------------------
1 | {
2 | // a comment
3 | "options": {
4 | "myBool": true,
5 | "myInteger": 1,
6 | "myString": "String\u0056",
7 | "myNumber": 1.24,
8 | "myNull": null,
9 | "myArray": [ 1, "Hello", true, null, [], {}],
10 | "myObject" : {
11 | "foo": "bar"
12 | }
13 | }
14 | }
--------------------------------------------------------------------------------
/fixtures/test-cases/first-mate/fixtures/forever.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "forever",
3 | "scopeName": "source.forever",
4 | "patterns": [
5 | {
6 | "name": "text",
7 | "begin": "(?=forever)",
8 | "end": "whatevs",
9 | "patterns": [
10 | {
11 | "include": "$self"
12 | }
13 | ]
14 | }
15 | ]
16 | }
--------------------------------------------------------------------------------
/extensions/php-language-features/README.md:
--------------------------------------------------------------------------------
1 | # Language Features for PHP files
2 |
3 | **Notice:** This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled.
4 |
5 | ## Features
6 |
7 | See [PHP in Visual Studio Code](https://code.visualstudio.com/docs/languages/php) to learn about the features of this extension.
--------------------------------------------------------------------------------
/scie-onig/README.md:
--------------------------------------------------------------------------------
1 | ## Setup
2 |
3 | ### by Auto
4 |
5 | run test in `lib.rs` and copy ffi.rs from `target`
6 |
7 | ### by Manual
8 |
9 | ```
10 | cargo install bindgen
11 | ```
12 |
13 | then:
14 |
15 | ```
16 | bindgen libonigvs/onigvs.c --with-derive-eq --no-layout-tests --distrust-clang-mangling > src/ffi.rs
17 | ```
18 |
19 |
--------------------------------------------------------------------------------
/extensions/json-language-features/README.md:
--------------------------------------------------------------------------------
1 | # Language Features for JSON files
2 |
3 | **Notice:** This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled.
4 |
5 | ## Features
6 |
7 | See [JSON in Visual Studio Code](https://code.visualstudio.com/docs/languages/json) to learn about the features of this extension.
--------------------------------------------------------------------------------
/fixtures/test-cases/first-mate/fixtures/imaginary.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "test",
3 | "scopeName": "source.imaginaryLanguage",
4 | "patterns": [
5 | {
6 | "name": "comment-body",
7 | "begin": "//",
8 | "end": "\\n",
9 | "beginCaptures": {
10 | "0": {
11 | "name": "comment-start"
12 | }
13 | }
14 | }
15 | ]
16 | }
--------------------------------------------------------------------------------
/extensions/lua/test/colorize-fixtures/test.lua:
--------------------------------------------------------------------------------
1 | -- defines a factorial function
2 | function fact (n)
3 | if n == 0 then
4 | return 1
5 | else
6 | return n * fact(n-1)
7 | end
8 | end
9 |
10 | print("enter a number:")
11 | a = io.read("*number") -- read a number
12 | print(fact(a))
--------------------------------------------------------------------------------
/extensions/python/test/colorize-fixtures/test-freeze-56377.py:
--------------------------------------------------------------------------------
1 | record = {
2 | "headers": {k: str(v) for k, v in self.request.META.items() if k.startswith('HTTP_')}
3 | }
4 | cmd = "git-clang-format --style=\"{{BasedOnStyle: Google, ColumnLimit: 100, IndentWidth: 2, " \ "AlignConsecutiveAssignments: true}}\" {COMMIT_SHA} -- ./**/*.proto > {OUTPUT}".format(
--------------------------------------------------------------------------------
/extensions/csharp/snippets/csharp.code-snippets:
--------------------------------------------------------------------------------
1 | {
2 | "Region Start": {
3 | "prefix": "#region",
4 | "body": [
5 | "#region $0"
6 | ],
7 | "description": "Folding Region Start"
8 | },
9 | "Region End": {
10 | "prefix": "#endregion",
11 | "body": [
12 | "#endregion"
13 | ],
14 | "description": "Folding Region End"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/extensions/java/snippets/java.code-snippets:
--------------------------------------------------------------------------------
1 | {
2 | "Region Start": {
3 | "prefix": "#region",
4 | "body": [
5 | "//#region"
6 | ],
7 | "description": "Folding Region Start"
8 | },
9 | "Region End": {
10 | "prefix": "#endregion",
11 | "body": [
12 | "//#endregion"
13 | ],
14 | "description": "Folding Region End"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/extensions/typescript-language-features/schemas/tsconfig.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "allowTrailingCommas": true,
3 | "title": "JSON schema for the TypeScript compiler's configuration file",
4 | "type": "object",
5 | "default": {
6 | "compilerOptions": {
7 | "module": "commonjs"
8 | },
9 | "exclude": [
10 | "node_modules"
11 | ]
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/extensions/typescript-language-features/src/protocol.d.ts:
--------------------------------------------------------------------------------
1 | import * as Proto from 'typescript/lib/protocol';
2 | export = Proto;
3 |
4 | declare enum ServerType {
5 | Syntax = 'syntax',
6 | Semantic = 'semantic',
7 | }
8 | declare module 'typescript/lib/protocol' {
9 | interface Response {
10 | readonly _serverType?: ServerType;
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/fixtures/test-cases/first-mate/fixtures/objective-c-plus-plus.json:
--------------------------------------------------------------------------------
1 | {
2 | "fileTypes": [
3 | "mm",
4 | "M",
5 | "h"
6 | ],
7 | "keyEquivalent": "^~O",
8 | "name": "Objective-C++",
9 | "patterns": [
10 | {
11 | "include": "source.c++"
12 | },
13 | {
14 | "include": "source.objc"
15 | }
16 | ],
17 | "scopeName": "source.objc++"
18 | }
--------------------------------------------------------------------------------
/extensions/bat/snippets/batchfile.code-snippets:
--------------------------------------------------------------------------------
1 | {
2 | "Region Start": {
3 | "prefix": "#region",
4 | "body": [
5 | "::#region"
6 | ],
7 | "description": "Folding Region Start"
8 | },
9 | "Region End": {
10 | "prefix": "#endregion",
11 | "body": [
12 | "::#endregion"
13 | ],
14 | "description": "Folding Region End"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/extensions/fsharp/snippets/fsharp.code-snippets:
--------------------------------------------------------------------------------
1 | {
2 | "Region Start": {
3 | "prefix": "#region",
4 | "body": [
5 | "//#region $0"
6 | ],
7 | "description": "Folding Region Start"
8 | },
9 | "Region End": {
10 | "prefix": "#endregion",
11 | "body": [
12 | "//#endregion"
13 | ],
14 | "description": "Folding Region End"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/fixtures/test-cases/first-mate/fixtures/content-name.json:
--------------------------------------------------------------------------------
1 | {
2 | "scopeName": "source.test",
3 | "patterns": [
4 | {
5 | "begin": "#if",
6 | "end": "#endif",
7 | "name": "pre",
8 | "contentName": "nested"
9 | },
10 | {
11 | "begin": "\\s*",
12 | "end": "fin",
13 | "name": "all",
14 | "contentName": "middle"
15 | }
16 | ]
17 | }
--------------------------------------------------------------------------------
/extensions/coffeescript/snippets/coffeescript.code-snippets:
--------------------------------------------------------------------------------
1 | {
2 | "Region Start": {
3 | "prefix": "#region",
4 | "body": [
5 | "#region"
6 | ],
7 | "description": "Folding Region Start"
8 | },
9 | "Region End": {
10 | "prefix": "#endregion",
11 | "body": [
12 | "#endregion"
13 | ],
14 | "description": "Folding Region End"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/extensions/cpp/snippets/c.code-snippets:
--------------------------------------------------------------------------------
1 | {
2 | "Region Start": {
3 | "prefix": "#region",
4 | "body": [
5 | "#pragma region $0"
6 | ],
7 | "description": "Folding Region Start"
8 | },
9 | "Region End": {
10 | "prefix": "#endregion",
11 | "body": [
12 | "#pragma endregion"
13 | ],
14 | "description": "Folding Region End"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/extensions/cpp/snippets/cpp.code-snippets:
--------------------------------------------------------------------------------
1 | {
2 | "Region Start": {
3 | "prefix": "#region",
4 | "body": [
5 | "#pragma region $0"
6 | ],
7 | "description": "Folding Region Start"
8 | },
9 | "Region End": {
10 | "prefix": "#endregion",
11 | "body": [
12 | "#pragma endregion"
13 | ],
14 | "description": "Folding Region End"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/extensions/powershell/snippets/powershell.code-snippets:
--------------------------------------------------------------------------------
1 | {
2 | "Region Start": {
3 | "prefix": "#region",
4 | "body": [
5 | "#region $0"
6 | ],
7 | "description": "Folding Region Start"
8 | },
9 | "Region End": {
10 | "prefix": "#endregion",
11 | "body": [
12 | "#endregion"
13 | ],
14 | "description": "Folding Region End"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/scie-detector/src/facet/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod go_facet;
2 | pub mod python_facet;
3 |
4 | pub mod rust_facet;
5 |
6 | /// Java
7 | pub mod java;
8 | pub mod jvm_facet;
9 |
10 | pub use java::JavaFacet;
11 | pub use java::JavaModuleData;
12 | pub use jvm_facet::JvmFacet;
13 |
14 | // JavaScript
15 | pub mod javascript;
16 |
17 | pub use javascript::javascript_facet;
18 |
--------------------------------------------------------------------------------
/fixtures/test-cases/first-mate/fixtures/infinite-loop.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "infinite-loop-grammar",
3 | "scopeName": "source.infinite-loop",
4 | "patterns": [
5 | {
6 | "name": "start",
7 | "begin": "^",
8 | "end": "$",
9 | "patterns": [
10 | {
11 | "name": "negative-look-ahead",
12 | "match": "(?!a)"
13 | }
14 | ]
15 | }
16 | ]
17 | }
--------------------------------------------------------------------------------
/extensions/rust/test/colorize-fixtures/test.rs:
--------------------------------------------------------------------------------
1 | use std::io;
2 |
3 | fn main() {
4 | println!("Guess the number!");
5 |
6 | println!("Please input your guess.");
7 |
8 | let mut guess = String::new();
9 |
10 | io::stdin().read_line(&mut guess)
11 | .ok()
12 | .expect("Failed to read line");
13 |
14 | println!("You guessed: {}", guess);
15 | }
--------------------------------------------------------------------------------
/scie-grammar/src/grammar/scope_metadata.rs:
--------------------------------------------------------------------------------
1 | pub enum TemporaryStandardTokenType {
2 | Other,
3 | Comment,
4 | String,
5 | RegEx,
6 | MetaEmbedded,
7 | }
8 |
9 | pub struct ScopeMetadata {
10 | pub scope_name: i32,
11 | pub language_id: i32,
12 | pub token_type: TemporaryStandardTokenType,
13 | }
14 |
15 | pub struct ScopeMetadataProvider {}
16 |
--------------------------------------------------------------------------------
/extensions/swift/test/colorize-fixtures/test.swift:
--------------------------------------------------------------------------------
1 | var teamScore = 0
2 | var greeting = "Hello!"
3 | var multiLineString = """
4 | This is a multi-line string!
5 | """
6 | func hasAnyMatches(list: [Int], condition: (Int) -> Bool) -> Bool {
7 | for item in list {
8 | if condition(item) {
9 | return true
10 | }
11 | }
12 | return false
13 | }
14 |
--------------------------------------------------------------------------------
/docs/adr/0001-base-language-choice.md:
--------------------------------------------------------------------------------
1 | # 1. _base language choice
2 |
3 | Date: 2020-08-22
4 |
5 | ## Status
6 |
7 | 2020-08-22 proposed
8 |
9 | 2020-10-11 done
10 |
11 | ## Context
12 |
13 | SCIE is prepare for better [Coca](https://github.com/phodal/coca), need to compatible it.
14 |
15 | ## Decision
16 |
17 | Decision here...
18 |
19 | ## Consequences
20 |
21 | Consequences here...
22 |
--------------------------------------------------------------------------------
/scie-grammar/src/grammar/local_stack_element.rs:
--------------------------------------------------------------------------------
1 | use crate::grammar::ScopeListElement;
2 |
3 | #[derive(Debug, Clone)]
4 | pub struct LocalStackElement {
5 | pub scopes: ScopeListElement,
6 | pub end_pos: i32,
7 | }
8 |
9 | impl LocalStackElement {
10 | pub fn new(scopes: ScopeListElement, end_pos: i32) -> Self {
11 | LocalStackElement { scopes, end_pos }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/extensions/yaml/test/colorize-fixtures/issue-6303.yaml:
--------------------------------------------------------------------------------
1 | swagger: '2.0'
2 | info:
3 | description: 'The API Management Service API defines an updated and refined version
4 | of the concepts currently known as Developer, APP, and API Product in Edge. Of
5 | note is the introduction of the API concept, missing previously from Edge
6 |
7 | '
8 | title: API Management Service API
9 | version: initial
--------------------------------------------------------------------------------
/extensions/less/cgmanifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "registrations": [
3 | {
4 | "component": {
5 | "type": "git",
6 | "git": {
7 | "name": "language-less",
8 | "repositoryUrl": "https://github.com/atom/language-less",
9 | "commitHash": "87d4d59e8de6796b506b81a16e1dc1fafc99d30f"
10 | }
11 | },
12 | "license": "MIT",
13 | "version": "0.34.2"
14 | }
15 | ],
16 | "version": 1
17 | }
--------------------------------------------------------------------------------
/extensions/php/cgmanifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "registrations": [
3 | {
4 | "component": {
5 | "type": "git",
6 | "git": {
7 | "name": "language-php",
8 | "repositoryUrl": "https://github.com/atom/language-php",
9 | "commitHash": "11cdaf62a9d949d3aca550f1a58c9754de6b5ab0"
10 | }
11 | },
12 | "license": "MIT",
13 | "version": "0.44.5"
14 | }
15 | ],
16 | "version": 1
17 | }
--------------------------------------------------------------------------------
/extensions/r/cgmanifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "registrations": [
3 | {
4 | "component": {
5 | "type": "git",
6 | "git": {
7 | "name": "Ikuyadeu/vscode-R",
8 | "repositoryUrl": "https://github.com/Ikuyadeu/vscode-R",
9 | "commitHash": "e03ba9cb9b19412f48c73ea73deb6746d50bbf23"
10 | }
11 | },
12 | "license": "MIT",
13 | "version": "1.3.0"
14 | }
15 | ],
16 | "version": 1
17 | }
--------------------------------------------------------------------------------
/extensions/java/cgmanifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "registrations": [
3 | {
4 | "component": {
5 | "type": "git",
6 | "git": {
7 | "name": "atom/language-java",
8 | "repositoryUrl": "https://github.com/atom/language-java",
9 | "commitHash": "2e179ceac423403eb5bf0eff26884093c3edba6f"
10 | }
11 | },
12 | "license": "MIT",
13 | "version": "0.31.4"
14 | }
15 | ],
16 | "version": 1
17 | }
--------------------------------------------------------------------------------
/benchmark/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "benchmark"
3 | version = "0.1.0"
4 | authors = ["Phodal Huang "]
5 | edition = "2018"
6 |
7 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
8 |
9 | [dependencies]
10 |
11 |
12 | [dependencies.scie_grammar]
13 | path = "../scie-grammar"
14 |
15 | [dependencies.scie_scanner]
16 | path = "../scie-scanner"
17 |
--------------------------------------------------------------------------------
/extensions/sql/cgmanifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "registrations": [
3 | {
4 | "component": {
5 | "type": "git",
6 | "git": {
7 | "name": "Microsoft/vscode-mssql",
8 | "repositoryUrl": "https://github.com/Microsoft/vscode-mssql",
9 | "commitHash": "750d30dc48c4c0317b63bb5f1ed3e71487bb84a1"
10 | }
11 | },
12 | "license": "MIT",
13 | "version": "1.9.0"
14 | }
15 | ],
16 | "version": 1
17 | }
--------------------------------------------------------------------------------
/fixtures/test-cases/e2e/rust/rust.rs.txt:
--------------------------------------------------------------------------------
1 | impl Foo
2 | where A: B
3 | { }
4 |
5 | impl Foo for C
6 | where A: B
7 | { }
8 |
9 | impl Foo for C
10 | {
11 | fn foo -> C
12 | where A: B
13 | { }
14 | }
15 |
16 | fn foo -> C
17 | where A: B
18 | { }
19 |
20 | struct Foo
21 | where A: B
22 | { }
23 |
24 | trait Foo : C
25 | where A: B
26 | { }
27 |
--------------------------------------------------------------------------------
/scie-scanner/justfile:
--------------------------------------------------------------------------------
1 | true := "true"
2 |
3 | build:
4 | cargo build
5 |
6 | rebuild:
7 | cargo clean
8 | cargo build
9 |
10 | # tests-ci with rebuild? true|false, default is true
11 | tests-ci rebuild=true:
12 | #!/usr/bin/env sh
13 | if {{rebuild}}; then
14 | just rebuild
15 | fi
16 |
17 | cargo test -- --test-threads=1
18 |
19 | test TEST: rebuild
20 | cargo test {{TEST}}
--------------------------------------------------------------------------------
/extensions/bat/cgmanifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "registrations": [
3 | {
4 | "component": {
5 | "type": "git",
6 | "git": {
7 | "name": "mmims/language-batchfile",
8 | "repositoryUrl": "https://github.com/mmims/language-batchfile",
9 | "commitHash": "95ea8c699f7a8296b15767069868532d52631c46"
10 | }
11 | },
12 | "license": "MIT",
13 | "version": "0.7.5"
14 | }
15 | ],
16 | "version": 1
17 | }
--------------------------------------------------------------------------------
/extensions/css-language-features/server/test/pathCompletionFixtures/.foo.js:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Licensed under the MIT License. See License.txt in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
--------------------------------------------------------------------------------
/extensions/python/cgmanifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "registrations": [
3 | {
4 | "component": {
5 | "type": "git",
6 | "git": {
7 | "name": "MagicStack/MagicPython",
8 | "repositoryUrl": "https://github.com/MagicStack/MagicPython",
9 | "commitHash": "c9b3409deb69acec31bbf7913830e93a046b30cc"
10 | }
11 | },
12 | "license": "MIT",
13 | "version": "1.1.1"
14 | }
15 | ],
16 | "version": 1
17 | }
--------------------------------------------------------------------------------
/extensions/rust/test/colorize-fixtures/test-6611.rs:
--------------------------------------------------------------------------------
1 | impl Foo
2 | where A: B
3 | { }
4 |
5 | impl Foo for C
6 | where A: B
7 | { }
8 |
9 | impl Foo for C
10 | {
11 | fn foo -> C
12 | where A: B
13 | { }
14 | }
15 |
16 | fn foo -> C
17 | where A: B
18 | { }
19 |
20 | struct Foo
21 | where A: B
22 | { }
23 |
24 | trait Foo : C
25 | where A: B
26 | { }
--------------------------------------------------------------------------------
/extensions/css-language-features/server/test/pathCompletionFixtures/src/test.js:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Licensed under the MIT License. See License.txt in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
--------------------------------------------------------------------------------
/extensions/powershell/cgmanifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "registrations": [
3 | {
4 | "component": {
5 | "type": "git",
6 | "git": {
7 | "name": "PowerShell/EditorSyntax",
8 | "repositoryUrl": "https://github.com/PowerShell/EditorSyntax",
9 | "commitHash": "d10ae29c0d3ceb248172c383a159ae43b9ccfb4d"
10 | }
11 | },
12 | "license": "MIT",
13 | "version": "1.0.0"
14 | }
15 | ],
16 | "version": 1
17 | }
--------------------------------------------------------------------------------
/fixtures/test-cases/first-mate/fixtures/hello.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "hello",
3 | "scopeName": "source.hello",
4 | "fileTypes": [
5 | "world"
6 | ],
7 | "patterns": [
8 | {
9 | "match": "hello",
10 | "name": "prefix.hello"
11 | },
12 | {
13 | "match": "world(!?)",
14 | "captures": {
15 | "1": {
16 | "name": "emphasis.hello"
17 | }
18 | },
19 | "name": "suffix.hello"
20 | }
21 | ]
22 | }
--------------------------------------------------------------------------------
/fixtures/test-cases/first-mate/fixtures/nested-captures.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "test",
3 | "scopeName": "nested",
4 | "patterns": [
5 | {
6 | "name": "text",
7 | "match": "(a(b))",
8 | "captures": {
9 | "1": {
10 | "patterns": [
11 | {
12 | "match": "ab",
13 | "name": "a"
14 | }
15 | ]
16 | },
17 | "2": {
18 | "name": "b"
19 | }
20 | }
21 | }
22 | ]
23 | }
--------------------------------------------------------------------------------
/extensions/css-language-features/server/test/pathCompletionFixtures/about/about.css:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Licensed under the MIT License. See License.txt in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
--------------------------------------------------------------------------------
/extensions/css-language-features/server/test/pathCompletionFixtures/scss/_foo.scss:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Licensed under the MIT License. See License.txt in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
--------------------------------------------------------------------------------
/extensions/css-language-features/server/test/pathCompletionFixtures/scss/main.scss:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Licensed under the MIT License. See License.txt in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
--------------------------------------------------------------------------------
/extensions/css-language-features/server/test/pathCompletionFixtures/src/data/foo.asar:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Licensed under the MIT License. See License.txt in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
--------------------------------------------------------------------------------
/extensions/css-language-features/server/test/pathCompletionFixtures/src/feature.js:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Licensed under the MIT License. See License.txt in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
--------------------------------------------------------------------------------
/extensions/json/cgmanifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "registrations": [
3 | {
4 | "component": {
5 | "type": "git",
6 | "git": {
7 | "name": "Microsoft/vscode-JSON.tmLanguage",
8 | "repositoryUrl": "https://github.com/Microsoft/vscode-JSON.tmLanguage",
9 | "commitHash": "9bd83f1c252b375e957203f21793316203f61f70"
10 | }
11 | },
12 | "license": "MIT",
13 | "version": "0.0.0"
14 | }
15 | ],
16 | "version": 1
17 | }
--------------------------------------------------------------------------------
/extensions/python/src/typings/ref.d.ts:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Licensed under the MIT License. See License.txt in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | ///
--------------------------------------------------------------------------------
/extensions/typescript-language-features/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../shared.tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "./out",
5 | "experimentalDecorators": true,
6 | // https://github.com/microsoft/TypeScript/issues/31869#issuecomment-515167432
7 | "baseUrl": "src/\u0000",
8 | "paths": {
9 | "vscode": [
10 | "../../../../src/vs/vscode.d.ts"
11 | ]
12 | }
13 | },
14 | "include": [
15 | "src/**/*"
16 | ]
17 | }
18 |
--------------------------------------------------------------------------------
/scie-detector/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "scie_detector"
3 | version = "0.1.0"
4 | authors = ["Phodal Huang "]
5 | edition = "2018"
6 |
7 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
8 |
9 | [dependencies]
10 | serde = { version = "1.0", features = ["derive"] }
11 | serde_derive = "1.0.115"
12 | serde_json = "1.0"
13 |
14 | lazy_static = "1.2"
15 |
16 | walkdir = "2"
17 |
18 | regex = "1"
19 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Generated by Cargo
2 | # will have compiled files and executables
3 | debug/
4 | target/
5 |
6 | # Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
7 | # More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
8 | Cargo.lock
9 |
10 | # These are backup files generated by rustfmt
11 | **/*.rs.bk
12 | .idea
13 | default.profraw
14 | demo.json
15 |
16 | .vscode/
17 | scie.bin
18 | scie.json
19 |
--------------------------------------------------------------------------------
/extensions/typescript-language-features/README.md:
--------------------------------------------------------------------------------
1 | # Language Features for TypeScript and JavaScript files
2 |
3 | **Notice:** This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled.
4 |
5 | ## Features
6 |
7 | See [TypeScript in Visual Studio Code](https://code.visualstudio.com/docs/languages/typescript) and [JavaScript in Visual Studio Code](https://code.visualstudio.com/docs/languages/javascript) to learn about the features of this extension.
8 |
--------------------------------------------------------------------------------
/extensions/json-language-features/server/bin/vscode-json-languageserver:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 | /*---------------------------------------------------------------------------------------------
3 | * Copyright (c) Microsoft Corporation. All rights reserved.
4 | * Licensed under the MIT License. See License.txt in the project root for license information.
5 | *--------------------------------------------------------------------------------------------*/
6 | require("../out/jsonServerMain");
--------------------------------------------------------------------------------
/extensions/typescript-language-features/src/typings/collections.d.ts:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Licensed under the MIT License. See License.txt in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | interface ObjectMap {
7 | [key: string]: V;
8 | }
--------------------------------------------------------------------------------
/extensions/typescript-language-features/src/typings/ref.d.ts:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Licensed under the MIT License. See License.txt in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | ///
7 |
--------------------------------------------------------------------------------
/fixtures/test-cases/onigtests/fixtures/php-onigasm-issue17.php:
--------------------------------------------------------------------------------
1 | is the HTML equivalent to a new line.
4 | $string = 'Hello World!
';
5 |
6 | // You can echo the variable, similar to the way you would echo a string.
7 | echo $string;
8 |
9 | // You could also use print.
10 | print $string;
11 |
12 | // Or, if you are familiar with C, printf can be used too.
13 | printf('%s', $string);
14 | ?>
--------------------------------------------------------------------------------
/scie-detector/src/facet/java/java_module_data.rs:
--------------------------------------------------------------------------------
1 | use crate::content_root::ContentRoot;
2 |
3 | #[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
4 | pub struct JavaModuleData {
5 | pub module_name: String,
6 | pub content_roots: Vec,
7 | }
8 |
9 | impl Default for JavaModuleData {
10 | fn default() -> Self {
11 | JavaModuleData {
12 | module_name: "".to_string(),
13 | content_roots: vec![],
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/scie-scanner/src/lib.rs:
--------------------------------------------------------------------------------
1 | #[cfg(not(target_env = "msvc"))]
2 | use jemallocator::Jemalloc;
3 | #[cfg(not(target_env = "msvc"))]
4 | #[global_allocator]
5 | static GLOBAL: Jemalloc = Jemalloc;
6 |
7 | #[macro_use]
8 | extern crate serde_derive;
9 |
10 | extern crate libc;
11 | extern crate scie_onig;
12 |
13 | #[cfg(not(feature = "generate"))]
14 | #[allow(non_upper_case_globals)]
15 | #[allow(non_camel_case_types)]
16 | #[allow(non_snake_case)]
17 | #[allow(clippy::all)]
18 | pub mod scanner;
19 |
--------------------------------------------------------------------------------
/extensions/clojure/language-configuration.json:
--------------------------------------------------------------------------------
1 | {
2 | "comments": {
3 | "lineComment": ";"
4 | },
5 | "brackets": [
6 | ["{", "}"],
7 | ["[", "]"],
8 | ["(", ")"]
9 | ],
10 | "autoClosingPairs": [
11 | ["{", "}"],
12 | ["[", "]"],
13 | ["(", ")"],
14 | { "open": "\"", "close": "\"", "notIn": ["string"] }
15 | ],
16 | "surroundingPairs": [
17 | ["{", "}"],
18 | ["[", "]"],
19 | ["(", ")"],
20 | ["\"", "\""]
21 | ],
22 | "folding": {
23 | "offSide": true
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/scie-onig/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "scie-onig"
3 | version = "0.1.0"
4 | authors = ["Phodal Huang "]
5 | edition = "2018"
6 |
7 | build = "build.rs"
8 |
9 | [dependencies]
10 | libc = "0.2"
11 |
12 | [build-dependencies]
13 | cc = "1.0"
14 | cmake = "0.1.31"
15 | bindgen = { version = "0.55", optional = true, features = [ "runtime" ] }
16 | pkg-config = "^0.3.16"
17 |
18 | [features]
19 | default = ["generate"]
20 | print-debug = []
21 | posix-api = []
22 | generate = ["bindgen"]
23 |
--------------------------------------------------------------------------------
/extensions/php-language-features/src/typings/refs.d.ts:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Licensed under the MIT License. See License.txt in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | ///
7 | ///
8 |
--------------------------------------------------------------------------------
/extensions/r/test/colorize-fixtures/test.r:
--------------------------------------------------------------------------------
1 | # © Microsoft. All rights reserved.
2 |
3 | #' Add together two numbers.
4 | #'
5 | #' @param x A number.
6 | #' @param y A number.
7 | #' @return The sum of \code{x} and \code{y}.
8 | #' @examples
9 | #' add(1, 1)
10 | #' add(10, 1)
11 | add <- function(x, y) {
12 | x + y
13 | }
14 |
15 | add(1, -2, 2.0)
16 | add(1.0e10, 2.0e10)
17 |
18 | paste("one", NULL)
19 | paste(NA, 'two')
20 |
21 | paste("multi-
22 | line",
23 | 'multi-
24 | line')
25 |
--------------------------------------------------------------------------------
/extensions/bat/test/colorize-fixtures/test.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 | setlocal
3 |
4 | title VSCode Dev
5 |
6 | pushd %~dp0\..
7 |
8 | :: Node modules
9 | if not exist node_modules call .\scripts\npm.bat install
10 |
11 | :: Get electron
12 | node .\node_modules\gulp\bin\gulp.js electron
13 |
14 | :: Build
15 | if not exist out node .\node_modules\gulp\bin\gulp.js compile
16 |
17 | :: Configuration
18 | set NODE_ENV=development
19 |
20 | call echo %%LINE:rem +=%%
21 |
22 | popd
23 |
24 | endlocal
--------------------------------------------------------------------------------
/scie-grammar/src/lib.rs:
--------------------------------------------------------------------------------
1 | // todo: remove after finish
2 | #![allow(dead_code)]
3 |
4 | #[macro_use]
5 | extern crate lazy_static;
6 |
7 | #[macro_use]
8 | extern crate serde_derive;
9 |
10 | #[macro_use]
11 | extern crate erased_serde;
12 |
13 | extern crate regex;
14 |
15 | pub mod grammar;
16 | pub mod inter;
17 | pub mod registry;
18 | pub mod rule;
19 | pub mod support;
20 |
21 | use std::collections::BTreeMap as Map;
22 |
23 | pub struct IEmbeddedLanguagesMap {
24 | map: Map>,
25 | }
26 |
--------------------------------------------------------------------------------
/extensions/r/language-configuration.json:
--------------------------------------------------------------------------------
1 | {
2 | "comments": {
3 | "lineComment": "#"
4 | },
5 | "brackets": [
6 | ["{", "}"],
7 | ["[", "]"],
8 | ["(", ")"]
9 | ],
10 | "autoClosingPairs": [
11 | ["{", "}"],
12 | ["[", "]"],
13 | ["(", ")"],
14 | { "open": "\"", "close": "\"", "notIn": ["string"] },
15 | { "open": "'", "close": "'", "notIn": ["string"] }
16 | ],
17 | "surroundingPairs": [
18 | ["{", "}"],
19 | ["[", "]"],
20 | ["(", ")"],
21 | ["\"", "\""],
22 | ["'", "'"]
23 | ]
24 | }
25 |
--------------------------------------------------------------------------------
/extensions/json-language-features/.vscodeignore:
--------------------------------------------------------------------------------
1 | .vscode/**
2 | server/.vscode/**
3 | server/node_modules/**
4 | client/src/**
5 | server/src/**
6 | client/out/**
7 | server/out/**
8 | client/tsconfig.json
9 | server/tsconfig.json
10 | server/test/**
11 | server/bin/**
12 | server/build/**
13 | server/yarn.lock
14 | server/.npmignore
15 | yarn.lock
16 | CONTRIBUTING.md
17 | server/extension.webpack.config.js
18 | extension.webpack.config.js
19 | server/extension-browser.webpack.config.js
20 | extension-browser.webpack.config.js
21 |
--------------------------------------------------------------------------------
/extensions/typescript-language-features/src/utils/regexp.ts:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Licensed under the MIT License. See License.txt in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | export function escapeRegExp(text: string) {
7 | return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
8 | }
--------------------------------------------------------------------------------
/fixtures/test-cases/first-mate/fixtures/multiline.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "test",
3 | "scopeName": "source.multilineLanguage",
4 | "patterns": [
5 | {
6 | "name": "outside-x",
7 | "begin": "X",
8 | "beginCaptures": {
9 | "0": {
10 | "name": "start"
11 | }
12 | },
13 | "end": "(X|\\n)",
14 | "endCaptures": {
15 | "0": {
16 | "name": "end"
17 | }
18 | },
19 | "patterns": [
20 | {
21 | "match": "\\\\\\n",
22 | "name": "inside-x"
23 | }
24 | ]
25 | }
26 | ]
27 | }
--------------------------------------------------------------------------------
/scie-model/src/lib.rs:
--------------------------------------------------------------------------------
1 | #[macro_use]
2 | extern crate serde_derive;
3 |
4 | extern crate serde;
5 |
6 | pub mod artifact;
7 | pub mod contribute;
8 | pub mod json_package;
9 | pub mod language_config;
10 | pub mod raw_language;
11 | pub mod tm_grammar;
12 |
13 | pub use self::contribute::Contribute;
14 | pub use self::json_package::JsonPackage;
15 | pub use self::language_config::{CharacterPair, CommentRule, IndentationRules, LanguageConfig};
16 | pub use self::raw_language::RawLanguageExt;
17 | pub use self::tm_grammar::TMGrammar;
18 |
--------------------------------------------------------------------------------
/extensions/css-language-features/.vscodeignore:
--------------------------------------------------------------------------------
1 | test/**
2 | .vscode/**
3 | server/.vscode/**
4 | server/node_modules/**
5 | client/src/**
6 | server/src/**
7 | client/out/**
8 | server/out/**
9 | client/tsconfig.json
10 | server/tsconfig.json
11 | server/test/**
12 | server/bin/**
13 | server/build/**
14 | server/yarn.lock
15 | server/.npmignore
16 | yarn.lock
17 | server/extension.webpack.config.js
18 | extension.webpack.config.js
19 | server/extension-browser.webpack.config.js
20 | extension-browser.webpack.config.js
21 | CONTRIBUTING.md
22 |
--------------------------------------------------------------------------------
/extensions/css-language-features/README.md:
--------------------------------------------------------------------------------
1 | # Language Features for CSS, SCSS, and LESS files
2 |
3 | **Notice:** This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled.
4 |
5 | ## Features
6 |
7 | See [CSS, SCSS and Less in VS Code](https://code.visualstudio.com/docs/languages/css) to learn about the features of this extension.
8 |
9 | Please read the [CONTRIBUTING.md](https://github.com/Microsoft/vscode/blob/master/extensions/css-language-features/CONTRIBUTING.md) file to learn how to contribute to this extension.
--------------------------------------------------------------------------------
/extensions/go/cgmanifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "registrations": [
3 | {
4 | "component": {
5 | "type": "git",
6 | "git": {
7 | "name": "better-go-syntax",
8 | "repositoryUrl": "https://github.com/jeff-hykin/better-go-syntax/ ",
9 | "commitHash": "54ff898316f8647d77ffcf83880a9556445326f1"
10 | }
11 | },
12 | "license": "MIT",
13 | "description": "The file syntaxes/go.tmLanguage.json is from https://github.com/jeff-hykin/better-go-syntax/ .",
14 | "version": "1.0.0"
15 | }
16 | ],
17 | "version": 1
18 | }
--------------------------------------------------------------------------------
/fixtures/test-cases/first-mate/fixtures/todo.json:
--------------------------------------------------------------------------------
1 | {
2 | "fileTypes": [],
3 | "injectionSelector": "comment, text.plain",
4 | "name": "TODO",
5 | "patterns": [
6 | {
7 | "match": "\\b(TODO|FIXME|CHANGED)\\b",
8 | "name": "storage.type.class.${1:/downcase}"
9 | },
10 | {
11 | "captures": {
12 | "1": {
13 | "name": "markup.underline.link.radar"
14 | }
15 | },
16 | "match": "<(ra?dar:/(?:/problem|)/(?:[&0-9]+))>",
17 | "name": "storage.type.class.radar"
18 | }
19 | ],
20 | "scopeName": "text.todo"
21 | }
--------------------------------------------------------------------------------
/scie-cli/README.md:
--------------------------------------------------------------------------------
1 | # Scie CLI
2 |
3 | ```bash
4 | scie-cli 0.1
5 | Phodal HUANG
6 |
7 | USAGE:
8 | scie-cli [FLAGS] [OPTIONS]
9 |
10 | FLAGS:
11 | -h, --help Prints help information
12 | -v, --verbose
13 | -V, --version Prints version information
14 |
15 | OPTIONS:
16 | -c, --config [default: default.conf]
17 | -p, --path [default: .]
18 | ```
19 |
20 | ## config design
21 |
22 |
23 | ## development
24 |
25 | ```bash
26 | cargo run -- -p [path]
27 | ```
28 |
29 |
--------------------------------------------------------------------------------
/scie-infra/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "scie_infra"
3 | version = "0.1.0"
4 | authors = ["Phodal Huang "]
5 | edition = "2018"
6 |
7 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
8 |
9 | [dependencies]
10 | serde = { version = "1.0", features = ["derive"] }
11 | serde_json = "1.0"
12 |
13 | lazy_static = "1.4.0"
14 | walkdir = "2"
15 |
16 | # todo: compare and remove
17 | gitignore = "1.0.7"
18 |
19 | ignore = "0.4"
20 |
21 | regex = "1"
22 |
23 | tempfile = "3"
24 |
--------------------------------------------------------------------------------
/docs/adr/0007-use-bin-data-for-languages.md:
--------------------------------------------------------------------------------
1 | # 7. use bin data for languages
2 |
3 | Date: 2020-10-07
4 |
5 | ## Status
6 |
7 | 2020-10-07 proposed
8 |
9 | ## Context
10 |
11 | For share data in different languages, we need a better format to storage data for:
12 |
13 | 1. reduce size
14 | 2. speed. no serialize
15 | 3. data complete
16 |
17 | in those propose, we can try
18 |
19 | 1. TLV
20 |
21 | then compare in with JSON.
22 |
23 | ## Decision
24 |
25 | Decision here...
26 |
27 | ## Consequences
28 |
29 | Consequences here...
30 |
--------------------------------------------------------------------------------
/extensions/css-language-features/client/src/typings/ref.d.ts:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Licensed under the MIT License. See License.txt in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 | ///
6 | ///
7 |
--------------------------------------------------------------------------------
/justfile:
--------------------------------------------------------------------------------
1 | tests:
2 | cargo test --all
3 |
4 | tests-ci:
5 | cargo test
6 |
7 | build:
8 | cargo build
9 |
10 | @bench:
11 | cargo bench
12 |
13 | @lint:
14 | rustup component add clippy
15 | rustup component add rustfmt
16 | cargo clippy -- -D warnings
17 | cargo clippy --tests
18 | cargo fmt -- --check
19 |
20 | @fix:
21 | cargo fmt --all
22 |
23 | clean:
24 | cargo clean
25 | find . -type f -name "*.orig" -exec rm {} \;
26 | find . -type f -name "*.bk" -exec rm {} \;
27 | find . -type f -name ".*~" -exec rm {} \;
28 |
--------------------------------------------------------------------------------
/extensions/csharp/cgmanifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "registrations": [
3 | {
4 | "component": {
5 | "type": "git",
6 | "git": {
7 | "name": "dotnet/csharp-tmLanguage",
8 | "repositoryUrl": "https://github.com/dotnet/csharp-tmLanguage",
9 | "commitHash": "572697a2c2267430010b3534281f73337144e94f"
10 | }
11 | },
12 | "license": "MIT",
13 | "version": "0.1.0",
14 | "description": "The file syntaxes/csharp.tmLanguage.json was derived from https://github.com/dotnet/csharp-tmLanguage"
15 | }
16 | ],
17 | "version": 1
18 | }
--------------------------------------------------------------------------------
/extensions/json-language-features/client/src/typings/ref.d.ts:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Licensed under the MIT License. See License.txt in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | ///
7 | ///
8 |
--------------------------------------------------------------------------------
/docs/adr/0015-migration-to-tree-sitter.md:
--------------------------------------------------------------------------------
1 | # 15. migration to tree-sitter
2 |
3 | Date: 2020-12-21
4 |
5 | ## Status
6 |
7 | 2020-12-21 proposed
8 |
9 | ## Context
10 |
11 | Context here...
12 |
13 | [Tree-sitter](https://github.com/tree-sitter/tree-sitter) is a parser generator tool and an incremental parsing library. It can build a concrete syntax tree for a source file and efficiently update the syntax tree as the source file is edited.
14 |
15 | ## Decision
16 |
17 | Decision here...
18 |
19 | ## Consequences
20 |
21 | Consequences here...
22 |
--------------------------------------------------------------------------------
/docs/issues/c.md:
--------------------------------------------------------------------------------
1 | # C issues
2 |
3 | ## Lost begin_captures
4 |
5 | ```bash
6 | meta.preprocessor.c.include
7 | ```
8 |
9 | ### Correct
10 |
11 | ```json
12 | "beginCaptures": [
13 | null,
14 | {
15 | "id": 86,
16 | "_name": "keyword.control.import.include.c",
17 | "_nameIsCapturing": false,
18 | "_contentName": null,
19 | "_contentNameIsCapturing": false,
20 | "retokenizeCapturedWithRuleId": 0,
21 | "_type": "CaptureRule"
22 | }
23 | ],
24 | ```
25 |
26 | ### Error
27 |
28 | ```json
29 | "begin_captures": [],
30 | ```
--------------------------------------------------------------------------------
/extensions/cpp/test/colorize-fixtures/test-92369.cpp:
--------------------------------------------------------------------------------
1 | std::tuple_element<0, std::pair, pugi::xml_node, std::less >, std::allocator, pugi::xml_node> > > > >::type dnode
2 |
3 | std::_Rb_tree_iterator, pugi::xml_node, std::less >, std::allocator, pugi::xml_node> > > > > > dnode_it = dnodes_.find(uid.position)
4 |
--------------------------------------------------------------------------------
/extensions/rust/cgmanifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "registrations": [
3 | {
4 | "component": {
5 | "type": "git",
6 | "git": {
7 | "name": "language-rust",
8 | "repositoryUrl": "https://github.com/zargony/atom-language-rust",
9 | "commitHash": "7d59e2ad79fbe5925bd2fd3bd3857bf9f421ff6f"
10 | }
11 | },
12 | "license": "MIT",
13 | "description": "The files syntaxes/rust.tmLanguage.json was derived from the Atom package https://atom.io/packages/language-rust.",
14 | "version": "0.4.12"
15 | }
16 | ],
17 | "version": 1
18 | }
--------------------------------------------------------------------------------
/extensions/typescript-language-features/src/utils/modifiers.ts:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Licensed under the MIT License. See License.txt in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | export function parseKindModifier(kindModifiers: string): Set {
7 | return new Set(kindModifiers.split(/,|\s+/g));
8 | }
9 |
--------------------------------------------------------------------------------
/extensions/javascript/syntaxes/Readme.md:
--------------------------------------------------------------------------------
1 | The file `JavaScript.tmLanguage.json` is derived from [TypeScriptReact.tmLanguage](https://github.com/Microsoft/TypeScript-TmLanguage/blob/master/TypeScriptReact.tmLanguage).
2 |
3 | To update to the latest version:
4 | - `cd extensions/typescript` and run `npm run update-grammars`
5 | - don't forget to run the integration tests at `./scripts/test-integration.sh`
6 |
7 | The script does the following changes:
8 | - fileTypes .tsx -> .js & .jsx
9 | - scopeName scope.tsx -> scope.js
10 | - update all rule names .tsx -> .js
11 |
--------------------------------------------------------------------------------
/extensions/fsharp/cgmanifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "registrations": [
3 | {
4 | "component": {
5 | "type": "git",
6 | "git": {
7 | "name": "ionide/ionide-fsgrammar",
8 | "repositoryUrl": "https://github.com/ionide/ionide-fsgrammar",
9 | "commitHash": "af037b23ca4c61b02799957a61cbd05b44355caf"
10 | }
11 | },
12 | "license": "MIT",
13 | "description": "The file syntaxes/fsharp.json was included from https://github.com/ionide/ionide-fsgrammar/blob/master/grammar/fsharp.json.",
14 | "version": "0.0.0"
15 | }
16 | ],
17 | "version": 1
18 | }
--------------------------------------------------------------------------------
/extensions/groovy/language-configuration.json:
--------------------------------------------------------------------------------
1 | {
2 | "comments": {
3 | "lineComment": "//",
4 | "blockComment": [ "/*", "*/" ]
5 | },
6 | "brackets": [
7 | ["{", "}"],
8 | ["[", "]"],
9 | ["(", ")"]
10 | ],
11 | "autoClosingPairs": [
12 | ["{", "}"],
13 | ["[", "]"],
14 | ["(", ")"],
15 | { "open": "\"", "close": "\"", "notIn": ["string"] },
16 | { "open": "'", "close": "'", "notIn": ["string"] }
17 | ],
18 | "surroundingPairs": [
19 | ["{", "}"],
20 | ["[", "]"],
21 | ["(", ")"],
22 | ["\"", "\""],
23 | ["'", "'"]
24 | ]
25 | }
26 |
--------------------------------------------------------------------------------
/extensions/yaml/test/colorize-fixtures/test.yaml:
--------------------------------------------------------------------------------
1 | # sequencer protocols for Laser eye surgery
2 | ---
3 | - step: &id001 # defines anchor label &id001
4 | instrument: Lasik 2000
5 | pulseEnergy: 5.4
6 | spotSize: 1mm
7 |
8 | - step: *id001 # refers to the first step (with anchor &id001)
9 | - step: *id001
10 | spotSize: 2mm
11 | - step: *id002
12 | - {name: John Smith, age: 33}
13 | - name: Mary Smith
14 | age: 27
15 | men: [John Smith, Bill Jones]
16 | women:
17 | - Mary Smith
18 | - Susan Williams
--------------------------------------------------------------------------------
/extensions/objective-c/language-configuration.json:
--------------------------------------------------------------------------------
1 | {
2 | "comments": {
3 | "lineComment": "//",
4 | "blockComment": [ "/*", "*/" ]
5 | },
6 | "brackets": [
7 | ["{", "}"],
8 | ["[", "]"],
9 | ["(", ")"]
10 | ],
11 | "autoClosingPairs": [
12 | ["{", "}"],
13 | ["[", "]"],
14 | ["(", ")"],
15 | { "open": "\"", "close": "\"", "notIn": ["string"] },
16 | { "open": "'", "close": "'", "notIn": ["string"] }
17 | ],
18 | "surroundingPairs": [
19 | ["{", "}"],
20 | ["[", "]"],
21 | ["(", ")"],
22 | ["\"", "\""],
23 | ["'", "'"]
24 | ]
25 | }
26 |
--------------------------------------------------------------------------------
/extensions/typescript-basics/test/colorize-fixtures/test-jsdoc-multiline-type.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * @typedef {{
3 | * id: number,
4 | * fn: !Function,
5 | * context: (!Object|undefined)
6 | * }}
7 | * @private
8 | */
9 | goog.dom.animationFrame.Task_;
10 |
11 |
12 | /**
13 | * @typedef {{
14 | * measureTask: goog.dom.animationFrame.Task_,
15 | * mutateTask: goog.dom.animationFrame.Task_,
16 | * state: (!Object|undefined),
17 | * args: (!Array|undefined),
18 | * isScheduled: boolean
19 | * }}
20 | * @private
21 | */
22 | goog.dom.animationFrame.TaskSet_;
--------------------------------------------------------------------------------
/scie-detector/docs/Command.md:
--------------------------------------------------------------------------------
1 | # Command
2 |
3 |
4 | ```typescript
5 | private static WellKnowCommands: IStringDictionary = {
6 | 'ant': true,
7 | 'cmake': true,
8 | 'eslint': true,
9 | 'gradle': true,
10 | 'grunt': true,
11 | 'gulp': true,
12 | 'jake': true,
13 | 'jenkins': true,
14 | 'jshint': true,
15 | 'make': true,
16 | 'maven': true,
17 | 'msbuild': true,
18 | 'msc': true,
19 | 'nmake': true,
20 | 'npm': true,
21 | 'rake': true,
22 | 'tsc': true,
23 | 'xbuild': true
24 | };
25 | ```
26 |
--------------------------------------------------------------------------------
/scie-grammar/src/inter/raw_captures.rs:
--------------------------------------------------------------------------------
1 | use crate::inter::{ILocatable, IRawRule};
2 | use std::collections::BTreeMap;
3 |
4 | #[derive(Serialize, Deserialize, PartialEq, Eq, Debug, Clone)]
5 | pub struct IRawCapturesMap {
6 | #[serde(flatten)]
7 | pub capture_map: BTreeMap,
8 | }
9 |
10 | #[derive(Serialize, Deserialize, PartialEq, Eq, Debug, Clone)]
11 | pub struct IRawCaptures {
12 | #[serde(flatten)]
13 | pub map: IRawCapturesMap,
14 | #[serde(skip_serializing_if = "Option::is_none")]
15 | pub location: Option,
16 | }
17 |
--------------------------------------------------------------------------------
/fixtures/test-cases/e2e/csharp/test.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | namespace SampleNamespace
3 | {
4 | class TestClass
5 | {
6 | static void Main(string[] args)
7 | {
8 | int[] radii = { 15, 32, 108, 74, 9 };
9 | const double pi = 3.14159;
10 | foreach (int radius in radii) {
11 | double circumference = pi * (2 * radius);
12 | // Display the number of command line arguments:
13 | System.Console.WriteLine("Circumference = {0:N2}", circumference);
14 | }
15 | }
16 | }
17 | }
--------------------------------------------------------------------------------
/fixtures/test-cases/onigtests/fixtures/test-issue11.ts:
--------------------------------------------------------------------------------
1 | let keyCode = 0;
2 | if(!(keyCode === 8 || (keyCode>=48 && keyCode<=57))) {}
3 | for (let i=0; i<5; i++) {}
4 | for (var i=0; i<5; i++) {}
5 | for (let i=0; i<5; i++) {}
6 | for (; i<5;) {}
7 | for (let i=0; 1+( i<<5 ) < 5;i++) {}
8 | var p = 1?2:(3<4?5:6);
9 | class A { }
10 | class A1 string }> { }
11 | class B { }
12 | class C { }
13 | function foo() { return 1;}
14 | let x1: A<(param?: number) => void, B>;
15 | let x2: A;
16 | const t = 1 < (5 > 10 ? 1 : 2);
17 | var f6 = 1 < foo();
--------------------------------------------------------------------------------
/fixtures/test-cases/first-mate/fixtures/hyperlink.json:
--------------------------------------------------------------------------------
1 | {
2 | "fileTypes": [],
3 | "injectionSelector": "text, string, comment",
4 | "name": "Hyperlink",
5 | "patterns": [
6 | {
7 | "match": "(?x)\n\t\t\t\t( (https?|s?ftp|ftps|file|smb|afp|nfs|(x-)?man(-page)?|gopher|txmt|issue)://|mailto:)\n\t\t\t\t[-:@a-zA-Z0-9_.,~%+/?=]+(?
7 |
8 | drive: () =>
9 | alert "Drive #{@name}"
10 |
11 | class Car extends Vehicle
12 | drive: () =>
13 | alert "Driving #{@name}"
14 |
15 | c = new Car "Volvo"
16 |
17 | while onTheRoad()
18 | c.drive()
19 |
20 | vehicles = (new Car for i in [1..100])
21 |
22 | startRace = (vehicles) -> [vehicle.drive() for vehicle in vehicles]
23 |
24 | fancyRegExp = ///
25 | (\d+) # numbers
26 | (\w*) # letters
27 | $ # the end
28 | ///
29 |
--------------------------------------------------------------------------------
/extensions/csharp/test/colorize-fixtures/test.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | namespace SampleNamespace
3 | {
4 | class TestClass
5 | {
6 | static void Main(string[] args)
7 | {
8 | int[] radii = { 15, 32, 108, 74, 9 };
9 | const double pi = 3.14159;
10 | foreach (int radius in radii) {
11 | double circumference = pi * (2 * radius);
12 | // Display the number of command line arguments:
13 | System.Console.WriteLine("Circumference = {0:N2}", circumference);
14 | }
15 | }
16 | }
17 | }
--------------------------------------------------------------------------------
/fixtures/test-cases/onigtests/fixtures/test.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | namespace SampleNamespace
3 | {
4 | class TestClass
5 | {
6 | static void Main(string[] args)
7 | {
8 | int[] radii = { 15, 32, 108, 74, 9 };
9 | const double pi = 3.14159;
10 | foreach (int radius in radii) {
11 | double circumference = pi * (2 * radius);
12 | // Display the number of command line arguments:
13 | System.Console.WriteLine("Circumference = {0:N2}", circumference);
14 | }
15 | }
16 | }
17 | }
--------------------------------------------------------------------------------
/extensions/typescript-basics/test/colorize-fixtures/test-issue11.ts:
--------------------------------------------------------------------------------
1 | let keyCode = 0;
2 | if(!(keyCode === 8 || (keyCode>=48 && keyCode<=57))) {}
3 | for (let i=0; i<5; i++) {}
4 | for (var i=0; i<5; i++) {}
5 | for (let i=0; i<5; i++) {}
6 | for (; i<5;) {}
7 | for (let i=0; 1+( i<<5 ) < 5;i++) {}
8 | var p = 1?2:(3<4?5:6);
9 | class A { }
10 | class A1 string }> { }
11 | class B { }
12 | class C { }
13 | function foo() { return 1;}
14 | let x1: A<(param?: number) => void, B>;
15 | let x2: A;
16 | const t = 1 < (5 > 10 ? 1 : 2);
17 | var f6 = 1 < foo();
--------------------------------------------------------------------------------
/extensions/xml/xsl.language-configuration.json:
--------------------------------------------------------------------------------
1 | {
2 | "comments": {
3 | "lineComment": "",
4 | "blockComment": [""]
5 | },
6 | "brackets": [
7 | [""],
8 | ["<", ">"],
9 | ["{", "}"],
10 | ["(", ")"],
11 | ["[", "]"]
12 | ]
13 |
14 | // enhancedBrackets: [{
15 | // tokenType: 'tag.tag-$1.xml',
16 | // openTrigger: '>',
17 | // open: /<(\w[\w\d]*)([^\/>]*(?!\/)>)[^<>]*$/i,
18 | // closeComplete: '$1>',
19 | // closeTrigger: '>',
20 | // close: /<\/(\w[\w\d]*)\s*>$/i
21 | // }],
22 |
23 | // autoClosingPairs: [['\'', '\''], ['"', '"'] ]
24 | }
25 |
--------------------------------------------------------------------------------
/extensions/perl/perl6.language-configuration.json:
--------------------------------------------------------------------------------
1 | {
2 | "comments": {
3 | "lineComment": "#"
4 | },
5 | "brackets": [
6 | ["{", "}"],
7 | ["[", "]"],
8 | ["(", ")"]
9 | ],
10 | "autoClosingPairs": [
11 | ["{", "}"],
12 | ["[", "]"],
13 | ["(", ")"],
14 | { "open": "\"", "close": "\"", "notIn": ["string"] },
15 | { "open": "'", "close": "'", "notIn": ["string"] },
16 | { "open": "`", "close": "`", "notIn": ["string"] }
17 | ],
18 | "surroundingPairs": [
19 | ["{", "}"],
20 | ["[", "]"],
21 | ["(", ")"],
22 | ["\"", "\""],
23 | ["'", "'"],
24 | ["`", "`"]
25 | ]
26 | }
27 |
--------------------------------------------------------------------------------
/scie-model/src/artifact/code_file.rs:
--------------------------------------------------------------------------------
1 | use crate::artifact::TokenElement;
2 | use std::path::PathBuf;
3 |
4 | #[derive(Serialize, Deserialize, Clone, Debug)]
5 | pub struct CodeFile {
6 | pub path: String,
7 | pub name: String,
8 | pub elements: Vec,
9 | }
10 |
11 | impl CodeFile {
12 | pub fn new(path: PathBuf) -> CodeFile {
13 | let name = path.file_name().unwrap().to_str().unwrap();
14 | CodeFile {
15 | path: path.display().to_string(),
16 | name: String::from(name),
17 | elements: vec![],
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/extensions/json/language-configuration.json:
--------------------------------------------------------------------------------
1 | {
2 | "comments": {
3 | "lineComment": "//",
4 | "blockComment": [ "/*", "*/" ]
5 | },
6 | "brackets": [
7 | ["{", "}"],
8 | ["[", "]"]
9 | ],
10 | "autoClosingPairs": [
11 | { "open": "{", "close": "}", "notIn": ["string"] },
12 | { "open": "[", "close": "]", "notIn": ["string"] },
13 | { "open": "(", "close": ")", "notIn": ["string"] },
14 | { "open": "'", "close": "'", "notIn": ["string"] },
15 | { "open": "\"", "close": "\"", "notIn": ["string", "comment"] },
16 | { "open": "`", "close": "`", "notIn": ["string", "comment"] }
17 | ]
18 | }
19 |
--------------------------------------------------------------------------------
/extensions/vb/language-configuration.json:
--------------------------------------------------------------------------------
1 | {
2 | "comments": {
3 | "lineComment": "'"
4 | },
5 | "brackets": [
6 | ["{", "}"],
7 | ["[", "]"],
8 | ["(", ")"],
9 | ["<", ">"]
10 | ],
11 | "autoClosingPairs": [
12 | ["{", "}"],
13 | ["[", "]"],
14 | ["(", ")"],
15 | { "open": "\"", "close": "\"", "notIn": ["string"] }
16 | ],
17 | "surroundingPairs": [
18 | ["{", "}"],
19 | ["[", "]"],
20 | ["(", ")"],
21 | ["\"", "\""],
22 | ["<", ">"]
23 | ],
24 | "folding": {
25 | "markers": {
26 | "start": "^\\s*#Region\\b",
27 | "end": "^\\s*#End Region\\b"
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/extensions/bat/language-configuration.json:
--------------------------------------------------------------------------------
1 | {
2 | "comments": {
3 | "lineComment": "REM"
4 | },
5 | "brackets": [
6 | ["{", "}"],
7 | ["[", "]"],
8 | ["(", ")"]
9 | ],
10 | "autoClosingPairs": [
11 | ["{", "}"],
12 | ["[", "]"],
13 | ["(", ")"],
14 | { "open": "\"", "close": "\"", "notIn": ["string"] }
15 | ],
16 | "surroundingPairs": [
17 | ["{", "}"],
18 | ["[", "]"],
19 | ["(", ")"],
20 | ["%", "%"],
21 | ["\"", "\""]
22 | ],
23 | "folding": {
24 | "markers": {
25 | "start": "^\\s*(::\\s*|REM\\s+)#region",
26 | "end": "^\\s*(::\\s*|REM\\s+)#endregion"
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/extensions/typescript-language-features/src/utils/platform.ts:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Licensed under the MIT License. See License.txt in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | import * as vscode from 'vscode';
7 |
8 | export function isWeb(): boolean {
9 | // @ts-expect-error
10 | return typeof navigator !== 'undefined' && vscode.env.uiKind === vscode.UIKind.Web;
11 | }
12 |
--------------------------------------------------------------------------------
/scie-grammar/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "scie_grammar"
3 | version = "0.1.0"
4 | authors = ["Phodal Huang "]
5 | edition = "2018"
6 |
7 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
8 |
9 | [dependencies]
10 | serde = { version = "1.0", features = ["derive"] }
11 | serde_json = "1.0"
12 |
13 | serde_derive = "1.0.115"
14 | erased-serde = "0.3"
15 |
16 | dyn-clone = "1.0"
17 |
18 | regex = "1"
19 |
20 | lazy_static = "1.4.0"
21 |
22 | [dependencies.scie_scanner]
23 | path = "../scie-scanner"
24 |
25 | [dependencies.scie_infra]
26 | path = "../scie-infra"
27 |
--------------------------------------------------------------------------------
/extensions/scss/cgmanifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "registrations": [
3 | {
4 | "component": {
5 | "type": "git",
6 | "git": {
7 | "name": "atom/language-sass",
8 | "repositoryUrl": "https://github.com/atom/language-sass",
9 | "commitHash": "f52ab12f7f9346cc2568129d8c4419bd3d506b47"
10 | }
11 | },
12 | "license": "MIT",
13 | "description": "The file syntaxes/scss.json was derived from the Atom package https://github.com/atom/language-sass which was originally converted from the TextMate bundle https://github.com/alexsancho/SASS.tmbundle.",
14 | "version": "0.62.1"
15 | }
16 | ],
17 | "version": 1
18 | }
--------------------------------------------------------------------------------
/extensions/swift/language-configuration.json:
--------------------------------------------------------------------------------
1 | {
2 | "comments": {
3 | "lineComment": "//",
4 | "blockComment": [ "/*", "*/" ]
5 | },
6 | "brackets": [
7 | ["{", "}"],
8 | ["[", "]"],
9 | ["(", ")"]
10 | ],
11 | "autoClosingPairs": [
12 | ["{", "}"],
13 | ["[", "]"],
14 | ["(", ")"],
15 | { "open": "\"", "close": "\"", "notIn": ["string"] },
16 | { "open": "'", "close": "'", "notIn": ["string"] },
17 | { "open": "`", "close": "`", "notIn": ["string"] }
18 | ],
19 | "surroundingPairs": [
20 | ["{", "}"],
21 | ["[", "]"],
22 | ["(", ")"],
23 | ["\"", "\""],
24 | ["'", "'"],
25 | ["`", "`"]
26 | ]
27 | }
28 |
--------------------------------------------------------------------------------
/scie-detector/src/facet/jvm_facet.rs:
--------------------------------------------------------------------------------
1 | #[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
2 | pub struct JvmFacet {
3 | pub is_gradle: bool,
4 | pub is_maven: bool,
5 |
6 | pub has_java: bool,
7 | pub has_groovy: bool,
8 | pub has_kotlin: bool,
9 | pub has_scala: bool,
10 | }
11 |
12 | impl Default for JvmFacet {
13 | fn default() -> Self {
14 | JvmFacet {
15 | is_gradle: false,
16 | is_maven: false,
17 | has_java: false,
18 | has_groovy: false,
19 | has_kotlin: false,
20 | has_scala: false,
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/extensions/xml/cgmanifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "registrations": [
3 | {
4 | "component": {
5 | "type": "git",
6 | "git": {
7 | "name": "atom/language-xml",
8 | "repositoryUrl": "https://github.com/atom/language-xml",
9 | "commitHash": "7bc75dfe779ad5b35d9bf4013d9181864358cb49"
10 | }
11 | },
12 | "license": "MIT",
13 | "description": "The files syntaxes/xml.json and syntaxes/xsl.json were derived from the Atom package https://github.com/atom/language-xml which were originally converted from the TextMate bundle https://github.com/textmate/xml.tmbundle.",
14 | "version": "0.35.2"
15 | }
16 | ],
17 | "version": 1
18 | }
--------------------------------------------------------------------------------
/extensions/objective-c/cgmanifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "registrations": [
3 | {
4 | "component": {
5 | "type": "git",
6 | "git": {
7 | "name": "jeff-hykin/cpp-textmate-grammar",
8 | "repositoryUrl": "https://github.com/jeff-hykin/cpp-textmate-grammar",
9 | "commitHash": "bc7dedd28eebe52b374744d3fb34d77ff441569e"
10 | }
11 | },
12 | "license": "MIT",
13 | "version": "1.12.11",
14 | "description": "The files syntaxes/objective-c.tmLanguage.json and syntaxes/objective-c++.tmLanguage.json were derived from the language package https://github.com/jeff-hykin/cpp-textmate-grammar."
15 | }
16 | ],
17 | "version": 1
18 | }
19 |
--------------------------------------------------------------------------------
/extensions/python/extension.webpack.config.js:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Licensed under the MIT License. See License.txt in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | //@ts-check
7 |
8 | 'use strict';
9 |
10 | const withDefaults = require('../shared.webpack.config');
11 |
12 | module.exports = withDefaults({
13 | context: __dirname,
14 | entry: {
15 | pythonMain: './src/pythonMain.ts'
16 | }
17 | });
18 |
--------------------------------------------------------------------------------
/extensions/clojure/cgmanifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "registrations": [
3 | {
4 | "component": {
5 | "type": "git",
6 | "git": {
7 | "name": "atom/language-clojure",
8 | "repositoryUrl": "https://github.com/atom/language-clojure",
9 | "commitHash": "de877502aa4a77ccdc2c7f0c9180436aea3effff"
10 | }
11 | },
12 | "license": "MIT",
13 | "version": "0.22.7",
14 | "description": "The file syntaxes/clojure.tmLanguage.json was derived from the Atom package https://github.com/atom/language-clojure which was originally converted from the TextMate bundle https://github.com/mmcgrana/textmate-clojure."
15 | }
16 | ],
17 | "version": 1
18 | }
--------------------------------------------------------------------------------
/scie-bingen/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "scie_bingen"
3 | version = "0.1.0"
4 | authors = ["Phodal Huang "]
5 | edition = "2018"
6 |
7 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
8 |
9 | [dependencies]
10 | serde = { version = "1.0", features = ["derive"] }
11 | serde_derive = "1.0.115"
12 | serde_json = "1.0"
13 |
14 | bincode = "1.3.1" # https://github.com/servo/bincode
15 |
16 | walkdir = "2"
17 |
18 | [dependencies.scie_infra]
19 | path = "../scie-infra"
20 |
21 | [dependencies.scie_model]
22 | path = "../scie-model"
23 |
24 | [dependencies.scie_grammar]
25 | path = "../scie-grammar"
26 |
--------------------------------------------------------------------------------
/extensions/typescript-basics/cgmanifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "registrations": [
3 | {
4 | "component": {
5 | "type": "git",
6 | "git": {
7 | "name": "TypeScript-TmLanguage",
8 | "repositoryUrl": "https://github.com/Microsoft/TypeScript-TmLanguage",
9 | "commitHash": "fa4e0d3a918db0eab8e5c5be952f3bd649968456"
10 | }
11 | },
12 | "license": "MIT",
13 | "description": "The files syntaxes/TypeScript.tmLanguage.json and syntaxes/TypeScriptReact.tmLanguage.json were derived from TypeScript.tmLanguage and TypeScriptReact.tmLanguage in https://github.com/Microsoft/TypeScript-TmLanguage.",
14 | "version": "1.0.0"
15 | }
16 | ],
17 | "version": 1
18 | }
--------------------------------------------------------------------------------
/docs/adr/0005-switch-to-onig-sys-api.md:
--------------------------------------------------------------------------------
1 | # 5. switch to onig_sys api
2 |
3 | Date: 2020-09-10
4 |
5 | ## Status
6 |
7 | 2020-09-10 proposed
8 |
9 | 2020-09-14 done
10 |
11 | 2020-10-11 deprecated
12 |
13 | ## Context
14 |
15 | VCode-Oniguruma use different options for search, in order to match same results, we need to align API usage.
16 |
17 | for examples:
18 |
19 | - ONIG_REGSET_POSITION_LEAD (returns most left position)
20 | - ONIG_OPTION_CAPTURE_GROUP named and no-named group captured.
21 |
22 | use TypeScript VS Code Oniguruma Bindings for compile
23 |
24 | ## Decision
25 |
26 | Decision here...
27 |
28 | ## Consequences
29 |
30 | Consequences here...
31 |
--------------------------------------------------------------------------------
/extensions/typescript-language-features/src/utils/cancellation.ts:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Licensed under the MIT License. See License.txt in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | import * as vscode from 'vscode';
7 |
8 | const noopDisposable = vscode.Disposable.from();
9 |
10 | export const nulToken: vscode.CancellationToken = {
11 | isCancellationRequested: false,
12 | onCancellationRequested: () => noopDisposable
13 | };
14 |
--------------------------------------------------------------------------------
/extensions/shellscript/cgmanifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "registrations": [
3 | {
4 | "component": {
5 | "type": "git",
6 | "git": {
7 | "name": "atom/language-shellscript",
8 | "repositoryUrl": "https://github.com/atom/language-shellscript",
9 | "commitHash": "4c3711edbe8eac6f501976893976b1ac6a043d50"
10 | }
11 | },
12 | "license": "MIT",
13 | "description": "The file syntaxes/shell-unix-bash.tmLanguage.json was derived from the Atom package https://github.com/atom/language-shellscript which was originally converted from the TextMate bundle https://github.com/textmate/shellscript.tmbundle.",
14 | "version": "0.26.0"
15 | }
16 | ],
17 | "version": 1
18 | }
--------------------------------------------------------------------------------
/extensions/coffeescript/cgmanifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "registrations": [
3 | {
4 | "component": {
5 | "type": "git",
6 | "git": {
7 | "name": "atom/language-coffee-script",
8 | "repositoryUrl": "https://github.com/atom/language-coffee-script",
9 | "commitHash": "0f6db9143663e18b1ad00667820f46747dba495e"
10 | }
11 | },
12 | "license": "MIT",
13 | "description": "The file syntaxes/coffeescript.tmLanguage.json was derived from the Atom package https://github.com/atom/language-coffee-script which was originally converted from the TextMate bundle https://github.com/jashkenas/coffee-script-tmbundle.",
14 | "version": "0.49.3"
15 | }
16 | ],
17 | "version": 1
18 | }
--------------------------------------------------------------------------------
/scie-bingen/src/ext_file.rs:
--------------------------------------------------------------------------------
1 | use std::path::PathBuf;
2 | use walkdir::WalkDir;
3 |
4 | pub struct ExtFile {}
5 |
6 | impl ExtFile {
7 | pub(crate) fn walk_dir(path: String) -> Vec {
8 | let mut packages = vec![];
9 | let walk_dir = WalkDir::new(path);
10 |
11 | let filtered_entries = walk_dir.max_depth(2).into_iter();
12 | for entry in filtered_entries {
13 | let entry = entry.unwrap();
14 | let path = entry.path();
15 | if path.display().to_string().ends_with("package.json") {
16 | packages.push(path.to_path_buf());
17 | }
18 | }
19 |
20 | packages
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/extensions/php-language-features/yarn.lock:
--------------------------------------------------------------------------------
1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2 | # yarn lockfile v1
3 |
4 |
5 | "@types/node@^12.11.7":
6 | version "12.11.7"
7 | resolved "https://registry.yarnpkg.com/@types/node/-/node-12.11.7.tgz#57682a9771a3f7b09c2497f28129a0462966524a"
8 | integrity sha512-JNbGaHFCLwgHn/iCckiGSOZ1XYHsKFwREtzPwSGCVld1SGhOlmZw2D4ZI94HQCrBHbADzW9m4LER/8olJTRGHA==
9 |
10 | vscode-nls@^4.0.0:
11 | version "4.0.0"
12 | resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.0.0.tgz#4001c8a6caba5cedb23a9c5ce1090395c0e44002"
13 | integrity sha512-qCfdzcH+0LgQnBpZA53bA32kzp9rpq/f66Som577ObeuDlFIrtbEJ+A/+CCxjIh4G8dpJYNCKIsxpRAHIfsbNw==
14 |
--------------------------------------------------------------------------------
/extensions/css/cgmanifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "registrations": [
3 | {
4 | "component": {
5 | "type": "git",
6 | "git": {
7 | "name": "octref/language-css",
8 | "repositoryUrl": "https://github.com/octref/language-css",
9 | "commitHash": "dcdc1cb4403266f4ebdb1a4f526f8b6d09fd39d6"
10 | }
11 | },
12 | "license": "MIT",
13 | "description": "The file syntaxes/css.tmLanguage.json was derived from https://github.com/octref/language-css which was derived from the Atom package https://github.com/atom/language-css which was originally converted from the TextMate bundle https://github.com/textmate/css.tmbundle.",
14 | "version": "0.42.11"
15 | }
16 | ],
17 | "version": 1
18 | }
--------------------------------------------------------------------------------
/extensions/php-language-features/src/features/utils/markedTextUtil.ts:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Licensed under the MIT License. See License.txt in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | import { MarkedString } from 'vscode';
7 |
8 | export function textToMarkedString(text: string): MarkedString {
9 | return text.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&'); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash
10 | }
--------------------------------------------------------------------------------
/extensions/javascript/tags-language-configuration.json:
--------------------------------------------------------------------------------
1 | {
2 | "comments": {
3 | "blockComment": [ "{/*", "*/}" ]
4 | },
5 | "brackets": [
6 | ["{", "}"],
7 | ["[", "]"],
8 | ["(", ")"],
9 | ["<", ">"]
10 | ],
11 | "autoClosingPairs": [
12 | { "open": "{", "close": "}" },
13 | { "open": "[", "close": "]" },
14 | { "open": "(", "close": ")" },
15 | { "open": "'", "close": "'", "notIn": ["string", "comment"] },
16 | { "open": "\"", "close": "\"", "notIn": ["string"] },
17 | { "open": "/**", "close": " */", "notIn": ["string"] }
18 | ],
19 | "surroundingPairs": [
20 | ["{", "}"],
21 | ["[", "]"],
22 | ["(", ")"],
23 | ["<", ">"],
24 | ["'", "'"],
25 | ["\"", "\""]
26 | ]
27 | }
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest an idea for this project
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Is your feature request related to a problem? Please describe.**
11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12 |
13 | **Describe the solution you'd like**
14 | A clear and concise description of what you want to happen.
15 |
16 | **Describe alternatives you've considered**
17 | A clear and concise description of any alternative solutions or features you've considered.
18 |
19 | **Additional context**
20 | Add any other context or screenshots about the feature request here.
21 |
--------------------------------------------------------------------------------
/extensions/typescript-language-features/src/tsServer/logDirectoryProvider.ts:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Licensed under the MIT License. See License.txt in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | export interface ILogDirectoryProvider {
7 | getNewLogDirectory(): string | undefined;
8 | }
9 |
10 | export const noopLogDirectoryProvider = new class implements ILogDirectoryProvider {
11 | public getNewLogDirectory(): undefined {
12 | return undefined;
13 | }
14 | };
15 |
--------------------------------------------------------------------------------
/extensions/php-language-features/extension.webpack.config.js:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Licensed under the MIT License. See License.txt in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | //@ts-check
7 |
8 | 'use strict';
9 |
10 | const withDefaults = require('../shared.webpack.config');
11 |
12 | module.exports = withDefaults({
13 | context: __dirname,
14 | entry: {
15 | extension: './src/phpMain.ts',
16 | },
17 | output: {
18 | filename: 'phpMain.js'
19 | }
20 | });
21 |
--------------------------------------------------------------------------------
/extensions/csharp/language-configuration.json:
--------------------------------------------------------------------------------
1 | {
2 | "comments": {
3 | "lineComment": "//",
4 | "blockComment": ["/*", "*/"]
5 | },
6 | "brackets": [
7 | ["{", "}"],
8 | ["[", "]"],
9 | ["(", ")"]
10 | ],
11 | "autoClosingPairs": [
12 | ["{", "}"],
13 | ["[", "]"],
14 | ["(", ")"],
15 | { "open": "'", "close": "'", "notIn": ["string", "comment"] },
16 | { "open": "\"", "close": "\"", "notIn": ["string", "comment"] }
17 | ],
18 | "surroundingPairs": [
19 | ["{", "}"],
20 | ["[", "]"],
21 | ["(", ")"],
22 | ["<", ">"],
23 | ["'", "'"],
24 | ["\"", "\""]
25 | ],
26 | "folding": {
27 | "markers": {
28 | "start": "^\\s*#region\\b",
29 | "end": "^\\s*#endregion\\b"
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/extensions/go/test/colorize-fixtures/test.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "encoding/base64"
5 | "fmt"
6 | )
7 |
8 | func main() {
9 | dnsName := "test-vm-from-go"
10 | storageAccount := "mystorageaccount"
11 | c := make(chan int)
12 |
13 | client, err := management.ClientFromPublishSettingsFile("path/to/downloaded.publishsettings", "")
14 | if err != nil {
15 | panic(err)
16 | }
17 |
18 | // create virtual machine
19 | role := vmutils.NewVMConfiguration(dnsName, vmSize)
20 | vmutils.ConfigureDeploymentFromPlatformImage(
21 | &role,
22 | vmImage,
23 | fmt.Sprintf("http://%s.blob.core.windows.net/sdktest/%s.vhd", storageAccount, dnsName),
24 | "")
25 | }
--------------------------------------------------------------------------------
/extensions/coffeescript/language-configuration.json:
--------------------------------------------------------------------------------
1 | {
2 | "comments": {
3 | "lineComment": "#",
4 | "blockComment": [ "###", "###" ]
5 | },
6 | "brackets": [
7 | ["{", "}"],
8 | ["[", "]"],
9 | ["(", ")"]
10 | ],
11 | "autoClosingPairs": [
12 | ["{", "}"],
13 | ["[", "]"],
14 | ["(", ")"],
15 | { "open": "\"", "close": "\"", "notIn": ["string"] },
16 | { "open": "'", "close": "'", "notIn": ["string"] }
17 | ],
18 | "surroundingPairs": [
19 | ["{", "}"],
20 | ["[", "]"],
21 | ["(", ")"],
22 | ["\"", "\""],
23 | ["'", "'"],
24 | [" ", " "]
25 | ],
26 | "folding": {
27 | "offSide": true,
28 | "markers": {
29 | "start": "^\\s*#region\\b",
30 | "end": "^\\s*#endregion\\b"
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/extensions/fsharp/test/colorize-fixtures/test.fs:
--------------------------------------------------------------------------------
1 | // from https://msdn.microsoft.com/en-us/library/dd233160.aspx
2 |
3 | // The declaration creates a constructor that takes two values, name and age.
4 | type Person(name:string, age:int) =
5 | let mutable internalAge = age
6 |
7 | new(name:string) = Person(name, 0)
8 |
9 | member this.Name = name
10 | // A read/write property.
11 | member this.Age
12 | with get() = internalAge
13 | and set(value) = internalAge <- value
14 |
15 | member this.HasABirthday () = internalAge <- internalAge + 1
16 | member this.IsOfAge targetAge = internalAge >= targetAge
17 | override this.ToString () =
18 | "Name: " + name + "\n" + "Age: " + (string)internalAge
--------------------------------------------------------------------------------
/extensions/php-language-features/package.nls.json:
--------------------------------------------------------------------------------
1 | {
2 | "configuration.suggest.basic": "Controls whether the built-in PHP language suggestions are enabled. The support suggests PHP globals and variables.",
3 | "configuration.validate.enable": "Enable/disable built-in PHP validation.",
4 | "configuration.validate.executablePath": "Points to the PHP executable.",
5 | "configuration.validate.run": "Whether the linter is run on save or on type.",
6 | "configuration.title": "PHP",
7 | "commands.categroy.php": "PHP",
8 | "command.untrustValidationExecutable": "Disallow PHP validation executable (defined as workspace setting)",
9 | "displayName": "PHP Language Features",
10 | "description": "Provides rich language support for PHP files."
11 | }
--------------------------------------------------------------------------------
/extensions/python/extension-browser.webpack.config.js:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Licensed under the MIT License. See License.txt in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | //@ts-check
7 |
8 | 'use strict';
9 |
10 | const withBrowserDefaults = require('../shared.webpack.config').browser;
11 |
12 | module.exports = withBrowserDefaults({
13 | context: __dirname,
14 | entry: {
15 | extension: './src/pythonMain.ts'
16 | },
17 | output: {
18 | filename: 'pythonMain.js'
19 | }
20 | });
21 |
--------------------------------------------------------------------------------
/extensions/lua/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "lua",
3 | "displayName": "%displayName%",
4 | "description": "%description%",
5 | "version": "1.0.0",
6 | "publisher": "vscode",
7 | "license": "MIT",
8 | "engines": { "vscode": "*" },
9 | "scripts": {
10 | "update-grammar": "node ../../build/npm/update-grammar.js textmate/lua.tmbundle Syntaxes/Lua.plist ./syntaxes/lua.tmLanguage.json"
11 | },
12 | "contributes": {
13 | "languages": [{
14 | "id": "lua",
15 | "extensions": [ ".lua" ],
16 | "aliases": [ "Lua", "lua" ],
17 | "configuration": "./language-configuration.json"
18 | }],
19 | "grammars": [{
20 | "language": "lua",
21 | "scopeName": "source.lua",
22 | "path": "./syntaxes/lua.tmLanguage.json"
23 | }]
24 | }
25 | }
--------------------------------------------------------------------------------
/extensions/shellscript/language-configuration.json:
--------------------------------------------------------------------------------
1 | {
2 | "comments": {
3 | "lineComment": "#"
4 | },
5 | "brackets": [
6 | ["{", "}"],
7 | ["[", "]"],
8 | ["(", ")"]
9 | ],
10 | "autoClosingPairs": [
11 | ["{", "}"],
12 | ["[", "]"],
13 | ["(", ")"],
14 | { "open": "\"", "close": "\"", "notIn": ["string"] },
15 | { "open": "'", "close": "'", "notIn": ["string"] },
16 | { "open": "`", "close": "`", "notIn": ["string"] }
17 | ],
18 | "surroundingPairs": [
19 | ["{", "}"],
20 | ["[", "]"],
21 | ["(", ")"],
22 | ["\"", "\""],
23 | ["'", "'"],
24 | ["`", "`"]
25 | ],
26 | "folding": {
27 | "markers": {
28 | "start": "^\\s*#\\s*#?region\\b.*",
29 | "end": "^\\s*#\\s*#?endregion\\b.*"
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/extensions/sql/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "sql",
3 | "displayName": "%displayName%",
4 | "description": "%description%",
5 | "version": "1.0.0",
6 | "publisher": "vscode",
7 | "license": "MIT",
8 | "engines": { "vscode": "*" },
9 | "scripts": {
10 | "update-grammar": "node ../../build/npm/update-grammar.js Microsoft/vscode-mssql syntaxes/SQL.plist ./syntaxes/sql.tmLanguage.json"
11 | },
12 | "contributes": {
13 | "languages": [{
14 | "id": "sql",
15 | "extensions": [ ".sql", ".dsql" ],
16 | "aliases": [ "SQL" ],
17 | "configuration": "./language-configuration.json"
18 | }],
19 | "grammars": [{
20 | "language": "sql",
21 | "scopeName": "source.sql",
22 | "path": "./syntaxes/sql.tmLanguage.json"
23 | }]
24 | }
25 | }
--------------------------------------------------------------------------------
/extensions/r/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "r",
3 | "displayName": "%displayName%",
4 | "description": "%description%",
5 | "version": "1.0.0",
6 | "publisher": "vscode",
7 | "license": "MIT",
8 | "engines": { "vscode": "*" },
9 | "scripts": {
10 | "update-grammar": "node ../../build/npm/update-grammar.js Ikuyadeu/vscode-R syntax/r.json ./syntaxes/r.tmLanguage.json"
11 | },
12 | "contributes": {
13 | "languages": [{
14 | "id": "r",
15 | "extensions": [ ".r", ".rhistory", ".rprofile", ".rt" ],
16 | "aliases": [ "R", "r" ],
17 | "configuration": "./language-configuration.json"
18 | }],
19 | "grammars": [{
20 | "language": "r",
21 | "scopeName": "source.r",
22 | "path": "./syntaxes/r.tmLanguage.json"
23 | }]
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/extensions/rust/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "rust",
3 | "displayName": "%displayName%",
4 | "description": "%description%",
5 | "version": "1.0.0",
6 | "publisher": "vscode",
7 | "license": "MIT",
8 | "engines": { "vscode": "*" },
9 | "scripts": {
10 | "update-grammar": "node ../../build/npm/update-grammar.js zargony/atom-language-rust grammars/rust.cson ./syntaxes/rust.tmLanguage.json"
11 | },
12 | "contributes": {
13 | "languages": [{
14 | "id": "rust",
15 | "extensions": [".rs"],
16 | "aliases": ["Rust", "rust"],
17 | "configuration": "./language-configuration.json"
18 | }],
19 | "grammars": [{
20 | "language": "rust",
21 | "path": "./syntaxes/rust.tmLanguage.json",
22 | "scopeName":"source.rust"
23 | }]
24 | }
25 | }
--------------------------------------------------------------------------------
/scie-cli/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "scie-cli"
3 | version = "0.1.0"
4 | authors = ["Phodal Huang "]
5 | edition = "2018"
6 |
7 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
8 |
9 | [dependencies]
10 | clap = "3.0.0-beta.2"
11 |
12 | # https://github.com/crossterm-rs/crossterm
13 | crossterm = "0.18"
14 |
15 | [dependencies.scie_grammar]
16 | path = "../scie-grammar"
17 |
18 | [dependencies.scie_model]
19 | path = "../scie-model"
20 |
21 | [dependencies.scie_infra]
22 | path = "../scie-infra"
23 |
24 | [dependencies.scie_bingen]
25 | path = "../scie-bingen"
26 |
27 | [dependencies.scie_detector]
28 | path = "../scie-detector"
29 |
30 | [dependencies.scie_core]
31 | path = "../scie-core"
32 |
--------------------------------------------------------------------------------
/extensions/yaml/language-configuration.json:
--------------------------------------------------------------------------------
1 | {
2 | "comments": {
3 | "lineComment": "#"
4 | },
5 | "brackets": [
6 | ["{", "}"],
7 | ["[", "]"],
8 | ["(", ")"]
9 | ],
10 | "autoClosingPairs": [
11 | ["{", "}"],
12 | ["[", "]"],
13 | ["(", ")"],
14 | ["\"", "\""],
15 | ["'", "'"]
16 | ],
17 | "surroundingPairs": [
18 | ["{", "}"],
19 | ["[", "]"],
20 | ["(", ")"],
21 | ["\"", "\""],
22 | ["'", "'"]
23 | ],
24 | "folding": {
25 | "offSide": true,
26 | "markers": {
27 | "start": "^\\s*#\\s*region\\b",
28 | "end": "^\\s*#\\s*endregion\\b"
29 | }
30 | },
31 | "indentationRules": {
32 | "increaseIndentPattern": "^\\s*.*(:|-) ?(&\\w+)?(\\{[^}\"']*|\\([^)\"']*)?$",
33 | "decreaseIndentPattern": "^\\s+\\}$"
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/extensions/perl/perl.language-configuration.json:
--------------------------------------------------------------------------------
1 | {
2 | "comments": {
3 | "lineComment": "#"
4 | },
5 | "brackets": [
6 | ["{", "}"],
7 | ["[", "]"],
8 | ["(", ")"]
9 | ],
10 | "autoClosingPairs": [
11 | ["{", "}"],
12 | ["[", "]"],
13 | ["(", ")"],
14 | { "open": "\"", "close": "\"", "notIn": ["string"] },
15 | { "open": "'", "close": "'", "notIn": ["string"] },
16 | { "open": "`", "close": "`", "notIn": ["string"] }
17 | ],
18 | "surroundingPairs": [
19 | ["{", "}"],
20 | ["[", "]"],
21 | ["(", ")"],
22 | ["\"", "\""],
23 | ["'", "'"],
24 | ["`", "`"]
25 | ],
26 | "folding": {
27 | "markers": {
28 | "start": "^(?:(?:=pod\\s*$)|(?:\\s*#region\\b))",
29 | "end": "^(?:(?:=cut\\s*$)|(?:\\s*#endregion\\b))"
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/scie-core/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "scie_core"
3 | version = "0.1.0"
4 | authors = ["Phodal Huang "]
5 | edition = "2018"
6 |
7 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
8 |
9 | [dependencies]
10 | serde = { version = "1.0", features = ["derive"] }
11 | serde_derive = "1.0.115"
12 | serde_json = "1.0"
13 |
14 | [dependencies.scie_grammar]
15 | path = "../scie-grammar"
16 |
17 | [dependencies.scie_scanner]
18 | path = "../scie-scanner"
19 |
20 | [dependencies.scie_model]
21 | path = "../scie-model"
22 |
23 | [dependencies.scie_infra]
24 | path = "../scie-infra"
25 |
26 | [dependencies.scie_bingen]
27 | path = "../scie-bingen"
28 |
29 | [dependencies.scie_detector]
30 | path = "../scie-detector"
31 |
--------------------------------------------------------------------------------
/scie-scanner/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "scie_scanner"
3 | version = "0.1.0"
4 | authors = ["Phodal Huang "]
5 | edition = "2018"
6 |
7 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
8 |
9 | [dependencies]
10 | lazy_static = "1.2"
11 | bitflags = "1.0"
12 |
13 | # libc = "0.2"
14 | # unicode support for chart splice
15 | unicode-segmentation = "1.6.0"
16 |
17 | serde = { version = "1.0", features = ["derive"] }
18 | serde_json = "1.0"
19 | serde_derive = "1.0.115"
20 | libc = "0.2"
21 |
22 |
23 | [target.'cfg(not(target_env = "msvc"))'.dependencies]
24 | jemallocator = "0.3.2"
25 |
26 | [dependencies.scie-onig]
27 | path = "../scie-onig"
28 | default-features = false
29 |
30 | [features]
31 | alloc = []
32 |
--------------------------------------------------------------------------------
/docs/adr/0013-virtual-file-system.md:
--------------------------------------------------------------------------------
1 | # 13. virtual file system
2 |
3 | Date: 2020-10-18
4 |
5 | ## Status
6 |
7 | 2020-10-18 proposed
8 |
9 | ## Context
10 |
11 | As a language-independent's framework, we need a new mechanism for save file. For a research, we can build a file system.
12 |
13 | In this case, we can just build a file as a container to contains a virtual file system.
14 |
15 | related projects:
16 |
17 | 1. [https://github.com/manuel-woelker/rust-vfs](https://github.com/manuel-woelker/rust-vfs)
18 | 2. [https://github.com/SergioBenitez/RustFS](https://github.com/SergioBenitez/RustFS)
19 | 3. [https://github.com/zboxfs/zbox](https://github.com/zboxfs/zbox)
20 |
21 | ## Decision
22 |
23 | Decision here...
24 |
25 | ## Consequences
26 |
27 | Consequences here...
28 |
--------------------------------------------------------------------------------
/extensions/cpp/test/colorize-fixtures/test.cc:
--------------------------------------------------------------------------------
1 | #if B4G_DEBUG_CHECK
2 | fprintf(stderr,"num_candidate_ret=%d:", num_candidate);
3 | for(int i=0;i o(new O);
14 | // sadness.
15 |
16 | sprintf(options, "STYLE=Keramik;TITLE=%s;THEME=%s", ...);
17 | }
18 |
19 |
20 | int main2() {
21 | printf(";");
22 | // the rest of
23 | asm("movw $0x38, %ax; ltr %ax");
24 | fn("{};");
25 |
26 | // the rest of
27 | }
--------------------------------------------------------------------------------
/scie-model/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "scie_model"
3 | version = "0.1.0"
4 | authors = ["Phodal Huang "]
5 | edition = "2018"
6 | license = "MIT"
7 | readme = "README.md"
8 | repository = "https://github.com/phodal/scie"
9 | documentation = "https://github.com/phodal/scie"
10 | homepage = "https://github.com/phodal/scie"
11 | description = """
12 | Scie is a research about how to build simple code identify engine for different languages.
13 | """
14 | categories = ["text-processing", "command-line-interface", "development-tools", "parser-implementations", "parsing"]
15 |
16 | [dependencies]
17 | serde = { version = "1.0", features = ["derive"] }
18 | serde_derive = "1.0.115"
19 | serde_json = "1.0"
20 |
21 | [dev-dependencies.scie_infra]
22 | path = "../scie-infra"
23 |
--------------------------------------------------------------------------------
/extensions/cpp/language-configuration.json:
--------------------------------------------------------------------------------
1 | {
2 | "comments": {
3 | "lineComment": "//",
4 | "blockComment": ["/*", "*/"]
5 | },
6 | "brackets": [
7 | ["{", "}"],
8 | ["[", "]"],
9 | ["(", ")"]
10 | ],
11 | "autoClosingPairs": [
12 | { "open": "[", "close": "]" },
13 | { "open": "{", "close": "}" },
14 | { "open": "(", "close": ")" },
15 | { "open": "'", "close": "'", "notIn": ["string", "comment"] },
16 | { "open": "\"", "close": "\"", "notIn": ["string"] }
17 | ],
18 | "surroundingPairs": [
19 | ["{", "}"],
20 | ["[", "]"],
21 | ["(", ")"],
22 | ["\"", "\""],
23 | ["'", "'"],
24 | ["<", ">"]
25 | ],
26 | "folding": {
27 | "markers": {
28 | "start": "^\\s*#pragma\\s+region\\b",
29 | "end": "^\\s*#pragma\\s+endregion\\b"
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/extensions/fsharp/language-configuration.json:
--------------------------------------------------------------------------------
1 | {
2 | "comments": {
3 | "lineComment": "//",
4 | "blockComment": [ "(*", "*)" ]
5 | },
6 | "brackets": [
7 | ["{", "}"],
8 | ["[", "]"],
9 | ["(", ")"]
10 | ],
11 | "autoClosingPairs": [
12 | { "open": "{", "close": "}" },
13 | { "open": "[", "close": "]" },
14 | { "open": "(", "close": ")" },
15 | { "open": "\"", "close": "\"", "notIn": ["string"] }
16 | ],
17 | "surroundingPairs": [
18 | ["{", "}"],
19 | ["[", "]"],
20 | ["(", ")"],
21 | ["\"", "\""],
22 | ["'", "'"]
23 | ],
24 | "folding": {
25 | "offSide": true,
26 | "markers": {
27 | "start": "^\\s*//\\s*#region\\b|^\\s*\\(\\*\\s*#region(.*)\\*\\)",
28 | "end": "^\\s*//\\s*#endregion\\b|^\\s*\\(\\*\\s*#endregion\\s*\\*\\)"
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/scie-core/src/sima/java_sima.rs:
--------------------------------------------------------------------------------
1 | pub struct JavaSima {}
2 |
3 | impl JavaSima {}
4 |
5 | #[cfg(test)]
6 | mod tests {
7 | use crate::analyser::Analyser;
8 | use std::path::PathBuf;
9 |
10 | #[test]
11 | fn should_identify_java_hello_world() {
12 | let root_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR")).to_path_buf();
13 | let lang = root_dir
14 | .clone()
15 | .parent()
16 | .unwrap()
17 | .join("fixtures")
18 | .join("projects")
19 | .join("java")
20 | .join("hello")
21 | .join("HelloWorld.java");
22 |
23 | let files = Analyser::ident_by_dir(&lang, false, false);
24 | let file = &files[0];
25 | println!("{:?}", file);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/extensions/rust/language-configuration.json:
--------------------------------------------------------------------------------
1 | {
2 | "comments": {
3 | "lineComment": "//",
4 | "blockComment": [ "/*", "*/" ]
5 | },
6 | "brackets": [
7 | ["{", "}"],
8 | ["[", "]"],
9 | ["(", ")"]
10 | ],
11 | "autoClosingPairs": [
12 | ["{", "}"],
13 | ["[", "]"],
14 | ["(", ")"],
15 | { "open": "\"", "close": "\"", "notIn": ["string"] }
16 | ],
17 | "surroundingPairs": [
18 | ["{", "}"],
19 | ["[", "]"],
20 | ["(", ")"],
21 | ["\"", "\""]
22 | ],
23 | "indentationRules": {
24 | "increaseIndentPattern": "^.*\\{[^}\"']*$|^.*\\([^\\)\"']*$",
25 | "decreaseIndentPattern": "^\\s*(\\s*\\/[*].*[*]\\/\\s*)*[})]"
26 | },
27 | "folding": {
28 | "markers": {
29 | "start": "^\\s*//\\s*#?region\\b",
30 | "end": "^\\s*//\\s*#?endregion\\b"
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/extensions/typescript-language-features/src/utils/documentSelector.ts:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Licensed under the MIT License. See License.txt in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | import * as vscode from 'vscode';
7 |
8 | export interface DocumentSelector {
9 | /**
10 | * Selector for files which only require a basic syntax server.
11 | */
12 | readonly syntax: vscode.DocumentFilter[];
13 |
14 | /**
15 | * Selector for files which require semantic server support.
16 | */
17 | readonly semantic: vscode.DocumentFilter[];
18 | }
19 |
--------------------------------------------------------------------------------
/extensions/python/src/pythonMain.ts:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Licensed under the MIT License. See License.txt in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | import { ExtensionContext, languages, IndentAction } from 'vscode';
7 |
8 | export function activate(_context: ExtensionContext): any {
9 | languages.setLanguageConfiguration('python', {
10 | onEnterRules: [
11 | {
12 | beforeText: /^\s*(?:def|class|for|if|elif|else|while|try|with|finally|except|async).*?:\s*$/,
13 | action: { indentAction: IndentAction.Indent }
14 | }
15 | ]
16 | });
17 | }
--------------------------------------------------------------------------------
/extensions/lua/language-configuration.json:
--------------------------------------------------------------------------------
1 | {
2 | "comments": {
3 | "lineComment": "--",
4 | "blockComment": [ "--[[", "]]" ]
5 | },
6 | "brackets": [
7 | ["{", "}"],
8 | ["[", "]"],
9 | ["(", ")"]
10 | ],
11 | "autoClosingPairs": [
12 | ["{", "}"],
13 | ["[", "]"],
14 | ["(", ")"],
15 | { "open": "\"", "close": "\"", "notIn": ["string"] },
16 | { "open": "'", "close": "'", "notIn": ["string"] }
17 | ],
18 | "surroundingPairs": [
19 | ["{", "}"],
20 | ["[", "]"],
21 | ["(", ")"],
22 | ["\"", "\""],
23 | ["'", "'"]
24 | ],
25 | "indentationRules": {
26 | "increaseIndentPattern": "^((?!(\\-\\-)).)*((\\b(else|function|then|do|repeat)\\b((?!\\b(end|until)\\b).)*)|(\\{\\s*))$",
27 | "decreaseIndentPattern": "^\\s*((\\b(elseif|else|end|until)\\b)|(\\})|(\\)))"
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/extensions/shellscript/test/colorize-fixtures/test.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | if [[ "$OSTYPE" == "darwin"* ]]; then
4 | realpath() { [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"; }
5 | ROOT=$(dirname $(dirname $(realpath "$0")))
6 | else
7 | ROOT=$(dirname $(dirname $(readlink -f $0)))
8 | fi
9 |
10 | DEVELOPER=$(xcode-select -print-path)
11 | LIPO=$(xcrun -sdk iphoneos -find lipo)
12 |
13 | function code() {
14 | cd $ROOT
15 |
16 | # Node modules
17 | test -d node_modules || ./scripts/npm.sh install
18 |
19 | # Configuration
20 | export NODE_ENV=development
21 |
22 | # Launch Code
23 | if [[ "$OSTYPE" == "darwin"* ]]; then
24 | exec ./.build/electron/Electron.app/Contents/MacOS/Electron . "$@"
25 | else
26 | exec ./.build/electron/electron . "$@"
27 | fi
28 | }
29 |
30 | code "$@"
31 |
--------------------------------------------------------------------------------
/extensions/clojure/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "clojure",
3 | "displayName": "%displayName%",
4 | "description": "%description%",
5 | "version": "1.0.0",
6 | "publisher": "vscode",
7 | "license": "MIT",
8 | "engines": { "vscode": "*" },
9 | "scripts": {
10 | "update-grammar": "node ../../build/npm/update-grammar.js atom/language-clojure grammars/clojure.cson ./syntaxes/clojure.tmLanguage.json"
11 | },
12 | "contributes": {
13 | "languages": [{
14 | "id": "clojure",
15 | "aliases": ["Clojure", "clojure"],
16 | "extensions": [".clj", ".cljs", ".cljc", ".cljx", ".clojure", ".edn"],
17 | "configuration": "./language-configuration.json"
18 | }],
19 | "grammars": [{
20 | "language": "clojure",
21 | "scopeName": "source.clojure",
22 | "path": "./syntaxes/clojure.tmLanguage.json"
23 | }]
24 | }
25 | }
--------------------------------------------------------------------------------
/scie-grammar/src/inter/location.rs:
--------------------------------------------------------------------------------
1 | #[derive(Serialize, Deserialize, PartialEq, Eq, Debug, Clone)]
2 | pub struct ILocation {
3 | pub filename: String,
4 | pub line: String,
5 | pub chart: String,
6 | }
7 |
8 | impl ILocation {
9 | pub fn new() -> Self {
10 | ILocation {
11 | filename: "".to_string(),
12 | line: "".to_string(),
13 | chart: "".to_string(),
14 | }
15 | }
16 | }
17 |
18 | #[derive(Serialize, Deserialize, PartialEq, Eq, Debug, Clone)]
19 | pub struct ILocatable {
20 | #[serde(flatten, skip_serializing_if = "Option::is_none")]
21 | pub textmate_location: Option,
22 | }
23 |
24 | impl ILocatable {
25 | pub fn new() -> Self {
26 | ILocatable {
27 | textmate_location: None,
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/scie-onig/src/lib.rs:
--------------------------------------------------------------------------------
1 | #[cfg(feature = "generate")]
2 | mod bindgened;
3 |
4 | #[cfg(feature = "generate")]
5 | pub use bindgened::*;
6 |
7 | #[cfg(not(feature = "generate"))]
8 | #[allow(non_upper_case_globals)]
9 | #[allow(non_camel_case_types)]
10 | #[allow(non_snake_case)]
11 | #[allow(clippy::all)]
12 | mod ffi;
13 |
14 | #[cfg(not(feature = "generate"))]
15 | pub use self::ffi::*;
16 |
17 | // backfill types from the old hand-written bindings:
18 |
19 | pub type OnigSyntaxBehavior = ::std::os::raw::c_uint;
20 | pub type OnigSyntaxOp = ::std::os::raw::c_uint;
21 | pub type OnigSyntaxOp2 = ::std::os::raw::c_uint;
22 |
23 | #[test]
24 | fn test_is_linked() {
25 | unsafe {
26 | assert!(!onig_copyright().is_null());
27 | assert!(!onig_version().is_null());
28 | getLastOnigError();
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/extensions/java/language-configuration.json:
--------------------------------------------------------------------------------
1 | {
2 | "comments": {
3 | "lineComment": "//",
4 | "blockComment": [ "/*", "*/" ]
5 | },
6 | "brackets": [
7 | ["{", "}"],
8 | ["[", "]"],
9 | ["(", ")"]
10 | ],
11 | "autoClosingPairs": [
12 | ["{", "}"],
13 | ["[", "]"],
14 | ["(", ")"],
15 | { "open": "\"", "close": "\"", "notIn": ["string"] },
16 | { "open": "'", "close": "'", "notIn": ["string"] },
17 | { "open": "/**", "close": " */", "notIn": ["string"] }
18 | ],
19 | "surroundingPairs": [
20 | ["{", "}"],
21 | ["[", "]"],
22 | ["(", ")"],
23 | ["\"", "\""],
24 | ["'", "'"],
25 | ["<", ">"]
26 | ],
27 | "folding": {
28 | "markers": {
29 | "start": "^\\s*//\\s*(?:(?:#?region\\b)|(?:))"
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/extensions/java/test/colorize-fixtures/basic.java:
--------------------------------------------------------------------------------
1 | package foo;
2 |
3 | import org.junit.Test;
4 | import org.junit.runners.*;
5 |
6 | /*
7 | * Multi line comment
8 | */
9 | public class TestClass {
10 |
11 | private String aString;
12 |
13 | /**
14 | * Note:
Hello
15 | * @param args
16 | */
17 | public void doSomething(int a) {
18 | double b = 0.0;
19 | double c = 10e3;
20 | long l = 134l;
21 | }
22 |
23 | /*
24 | * multiline comment
25 | */
26 | @SuppressWarnings(value = "aString")
27 | private long privateMethod(long b){
28 | for (int i = 0; i < 9; i++) {
29 | System.out.println("Hello" + i);
30 | }
31 | return 10;
32 | }
33 |
34 | //single line comment
35 | @Test
36 | public void someTests() {
37 | int hex = 0x5;
38 | Vector v = new Vector();
39 | }
40 |
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/extensions/css-language-features/server/extension.webpack.config.js:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Licensed under the MIT License. See License.txt in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | //@ts-check
7 |
8 | 'use strict';
9 |
10 | const withDefaults = require('../../shared.webpack.config');
11 | const path = require('path');
12 |
13 | module.exports = withDefaults({
14 | context: path.join(__dirname),
15 | entry: {
16 | extension: './src/node/cssServerMain.ts',
17 | },
18 | output: {
19 | filename: 'cssServerMain.js',
20 | path: path.join(__dirname, 'dist', 'node'),
21 | }
22 | });
23 |
--------------------------------------------------------------------------------
/extensions/xml/test/colorize-fixtures/test.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | Lucy
13 | 1952-03-03
14 | bossy, crabby and selfish
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/scie-model/src/contribute.rs:
--------------------------------------------------------------------------------
1 | use crate::raw_language::RawLanguageExt;
2 | use crate::tm_grammar::TMGrammar;
3 |
4 | #[derive(Serialize, Deserialize, Debug, Clone)]
5 | pub struct Contribute {
6 | #[serde(skip_serializing_if = "Option::is_none")]
7 | pub languages: Option>,
8 | #[serde(skip_serializing_if = "Option::is_none")]
9 | pub grammars: Option>,
10 | #[serde(skip_serializing_if = "Option::is_none")]
11 | #[serde(alias = "breakPoints")]
12 | pub break_points: Option>,
13 | #[serde(skip_serializing_if = "Option::is_none")]
14 | pub snippets: Option>,
15 | }
16 |
17 | #[derive(Serialize, Deserialize, Debug, Clone)]
18 | pub struct BreakPoint {}
19 |
20 | #[derive(Serialize, Deserialize, Debug, Clone)]
21 | pub struct ContribSnippet {}
22 |
--------------------------------------------------------------------------------
/extensions/css-language-features/extension.webpack.config.js:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Licensed under the MIT License. See License.txt in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | //@ts-check
7 |
8 | 'use strict';
9 |
10 | const withDefaults = require('../shared.webpack.config');
11 | const path = require('path');
12 |
13 | module.exports = withDefaults({
14 | context: path.join(__dirname, 'client'),
15 | entry: {
16 | extension: './src/node/cssClientMain.ts',
17 | },
18 | output: {
19 | filename: 'cssClientMain.js',
20 | path: path.join(__dirname, 'client', 'dist', 'node')
21 | }
22 | });
23 |
--------------------------------------------------------------------------------
/extensions/cpp/test/colorize-fixtures/test.cpp:
--------------------------------------------------------------------------------
1 | // classes example
2 | #include
3 | using namespace std;
4 |
5 | #define EXTERN_C extern "C"
6 |
7 | class Rectangle {
8 | int width, height;
9 | public:
10 | void set_values (int,int);
11 | int area() {return width*height;}
12 | };
13 |
14 | void Rectangle::set_values (int x, int y) {
15 | width = x;
16 | height = y;
17 | }
18 |
19 | long double operator "" _w(long double);
20 | #define MY_MACRO(a, b)
21 |
22 | int main () {
23 | 1.2_w; // calls operator "" _w(1.2L)
24 | asm("movl %a %b");
25 | MY_MACRO(1, 2);
26 | Rectangle rect;
27 | rect.set_values (3,4);
28 | cout << "area: " << rect.area();
29 | Task::links_to;
30 | int t = 2;
31 | if (t > 0) puts("\n*************************************************");
32 | return 0;
33 | }
34 |
--------------------------------------------------------------------------------
/extensions/css-language-features/server/src/browser/cssServerMain.ts:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Licensed under the MIT License. See License.txt in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | import { createConnection, BrowserMessageReader, BrowserMessageWriter } from 'vscode-languageserver/browser';
7 | import { startServer } from '../cssServer';
8 |
9 | declare let self: any;
10 |
11 | const messageReader = new BrowserMessageReader(self);
12 | const messageWriter = new BrowserMessageWriter(self);
13 |
14 | const connection = createConnection(messageReader, messageWriter);
15 |
16 | startServer(connection, {});
17 |
--------------------------------------------------------------------------------
/extensions/json-language-features/server/src/browser/jsonServerMain.ts:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Licensed under the MIT License. See License.txt in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | import { createConnection, BrowserMessageReader, BrowserMessageWriter } from 'vscode-languageserver/browser';
7 | import { startServer } from '../jsonServer';
8 |
9 | declare let self: any;
10 |
11 | const messageReader = new BrowserMessageReader(self);
12 | const messageWriter = new BrowserMessageWriter(self);
13 |
14 | const connection = createConnection(messageReader, messageWriter);
15 |
16 | startServer(connection, {});
17 |
--------------------------------------------------------------------------------
/scie-infra/src/format_output.rs:
--------------------------------------------------------------------------------
1 | pub struct FormatOutput {}
2 |
3 | impl FormatOutput {
4 | pub fn hashmap() {
5 | println!(
6 | "{0: <10} | {1: <10} | {2: <10} | {3: <10}",
7 | "total", "blanks", "comments", "code"
8 | );
9 | println!("{0: <10} | {1: <10} | {2: <10} | {3: <10}", 0, 0, 0, 0);
10 | println!("{0: <10} | {1: <10} | {2: <10} | {3: <10}", 77, 0, 3, 74);
11 | println!("{0: <10} | {1: <10} | {2: <10} | {3: <10}", 112, 0, 6, 106);
12 | println!(
13 | "{0: <10} | {1: <10} | {2: <10} | {3: <10}",
14 | 460, 0, 10, 1371
15 | );
16 | }
17 | }
18 |
19 | #[cfg(test)]
20 | mod tests {
21 | use crate::format_output::FormatOutput;
22 |
23 | #[test]
24 | fn should_filter_gitignore_rules() {
25 | FormatOutput::hashmap();
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/extensions/objective-c/build/update-grammars.js:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Licensed under the MIT License. See License.txt in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 | 'use strict';
6 |
7 | var updateGrammar = require('../../../build/npm/update-grammar');
8 |
9 | updateGrammar.update('jeff-hykin/cpp-textmate-grammar', '/syntaxes/objc.tmLanguage.json', './syntaxes/objective-c.tmLanguage.json', undefined, 'master', 'source/languages/cpp');
10 | updateGrammar.update('jeff-hykin/cpp-textmate-grammar', '/syntaxes/objcpp.tmLanguage.json', './syntaxes/objective-c++.tmLanguage.json', undefined, 'master', 'source/languages/cpp');
11 |
12 |
--------------------------------------------------------------------------------
/extensions/css/language-configuration.json:
--------------------------------------------------------------------------------
1 | {
2 | "comments": {
3 | "blockComment": ["/*", "*/"]
4 | },
5 | "brackets": [
6 | ["{", "}"],
7 | ["[", "]"],
8 | ["(", ")"]
9 | ],
10 | "autoClosingPairs": [
11 | { "open": "{", "close": "}", "notIn": ["string", "comment"] },
12 | { "open": "[", "close": "]", "notIn": ["string", "comment"] },
13 | { "open": "(", "close": ")", "notIn": ["string", "comment"] },
14 | { "open": "\"", "close": "\"", "notIn": ["string", "comment"] },
15 | { "open": "'", "close": "'", "notIn": ["string", "comment"] }
16 | ],
17 | "surroundingPairs": [
18 | ["{", "}"],
19 | ["[", "]"],
20 | ["(", ")"],
21 | ["\"", "\""],
22 | ["'", "'"]
23 | ],
24 | "folding": {
25 | "markers": {
26 | "start": "^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/",
27 | "end": "^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/"
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/extensions/java/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "java",
3 | "displayName": "%displayName%",
4 | "description": "%description%",
5 | "version": "1.0.0",
6 | "publisher": "vscode",
7 | "license": "MIT",
8 | "engines": { "vscode": "*" },
9 | "scripts": {
10 | "update-grammar": "node ../../build/npm/update-grammar.js atom/language-java grammars/java.cson ./syntaxes/java.tmLanguage.json"
11 | },
12 | "contributes": {
13 | "languages": [{
14 | "id": "java",
15 | "extensions": [ ".java", ".jav" ],
16 | "aliases": [ "Java", "java" ],
17 | "configuration": "./language-configuration.json"
18 | }],
19 | "grammars": [{
20 | "language": "java",
21 | "scopeName": "source.java",
22 | "path": "./syntaxes/java.tmLanguage.json"
23 | }],
24 | "snippets": [{
25 | "language": "java",
26 | "path": "./snippets/java.code-snippets"
27 | }]
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/extensions/powershell/language-configuration.json:
--------------------------------------------------------------------------------
1 | {
2 | "comments": {
3 | "lineComment": "#",
4 | "blockComment": [ "<#", "#>" ]
5 | },
6 | "brackets": [
7 | ["{", "}"],
8 | ["[", "]"],
9 | ["(", ")"]
10 | ],
11 | "autoClosingPairs": [
12 | ["{", "}"],
13 | ["[", "]"],
14 | ["(", ")"],
15 | { "open": "@'", "close": "\n'@", "notIn": ["string", "comment"]},
16 | { "open": "@\"", "close": "\n\"@", "notIn": ["string", "comment"]},
17 | { "open": "\"", "close": "\"", "notIn": ["string"]},
18 | { "open": "'", "close": "'", "notIn": ["string", "comment"]},
19 | ["<#", "#>"]
20 | ],
21 | "surroundingPairs": [
22 | ["{", "}"],
23 | ["[", "]"],
24 | ["(", ")"],
25 | ["\"", "\""],
26 | ["'", "'"]
27 | ],
28 | "folding": {
29 | "markers": {
30 | "start": "^\\s*#[rR]egion\\b",
31 | "end": "^\\s*#[eE]nd[rR]egion\\b"
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/extensions/css-language-features/extension-browser.webpack.config.js:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Licensed under the MIT License. See License.txt in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | //@ts-check
7 |
8 | 'use strict';
9 |
10 | const withBrowserDefaults = require('../shared.webpack.config').browser;
11 | const path = require('path');
12 |
13 | module.exports = withBrowserDefaults({
14 | context: path.join(__dirname, 'client'),
15 | entry: {
16 | extension: './src/browser/cssClientMain.ts'
17 | },
18 | output: {
19 | filename: 'cssClientMain.js',
20 | path: path.join(__dirname, 'client', 'dist', 'browser')
21 | }
22 | });
23 |
--------------------------------------------------------------------------------
/extensions/swift/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "swift",
3 | "displayName": "%displayName%",
4 | "description": "%description%",
5 | "version": "1.0.0",
6 | "publisher": "vscode",
7 | "license": "MIT",
8 | "engines": { "vscode": "*" },
9 | "scripts": {
10 | "update-grammar": "node ../../build/npm/update-grammar.js textmate/swift.tmbundle Syntaxes/Swift.tmLanguage ./syntaxes/swift.tmLanguage.json"
11 | },
12 | "contributes": {
13 | "languages": [{
14 | "id": "swift",
15 | "aliases": ["Swift","swift"],
16 | "extensions": [".swift"],
17 | "configuration": "./language-configuration.json"
18 | }],
19 | "grammars": [{
20 | "language": "swift",
21 | "scopeName": "source.swift",
22 | "path": "./syntaxes/swift.tmLanguage.json"
23 | }],
24 | "snippets": [{
25 | "language": "swift",
26 | "path": "./snippets/swift.code-snippets"
27 | }]
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/extensions/typescript-language-features/extension.webpack.config.js:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Licensed under the MIT License. See License.txt in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | //@ts-check
7 |
8 | 'use strict';
9 |
10 | const withDefaults = require('../shared.webpack.config');
11 |
12 | module.exports = withDefaults({
13 | context: __dirname,
14 | resolve: {
15 | mainFields: ['module', 'main']
16 | },
17 | externals: {
18 | 'typescript-vscode-sh-plugin': 'commonjs vscode' // used by build/lib/extensions to know what node_modules to bundle
19 | },
20 | entry: {
21 | extension: './src/extension.ts',
22 | }
23 | });
24 |
--------------------------------------------------------------------------------
/extensions/css-language-features/server/extension-browser.webpack.config.js:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Licensed under the MIT License. See License.txt in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | //@ts-check
7 |
8 | 'use strict';
9 |
10 | const withBrowserDefaults = require('../../shared.webpack.config').browser;
11 | const path = require('path');
12 |
13 | module.exports = withBrowserDefaults({
14 | context: __dirname,
15 | entry: {
16 | extension: './src/browser/cssServerMain.ts',
17 | },
18 | output: {
19 | filename: 'cssServerMain.js',
20 | path: path.join(__dirname, 'dist', 'browser'),
21 | libraryTarget: 'var'
22 | }
23 | });
24 |
--------------------------------------------------------------------------------
/scie-grammar/src/rule/rule.rs:
--------------------------------------------------------------------------------
1 | use crate::inter::ILocation;
2 |
3 | #[derive(Clone, Debug, Serialize)]
4 | pub struct Rule {
5 | pub _type: String,
6 | #[serde(skip_serializing_if = "Option::is_none")]
7 | pub _location: Option,
8 | pub id: i32,
9 | #[serde(skip_serializing_if = "Option::is_none")]
10 | pub _name: Option,
11 | #[serde(skip_serializing_if = "Option::is_none")]
12 | pub _content_name: Option,
13 | }
14 |
15 | impl Rule {
16 | pub fn new(
17 | location: ILocation,
18 | id: i32,
19 | name: Option,
20 | content_name: Option,
21 | ) -> Self {
22 | Rule {
23 | _type: "".to_string(),
24 | _location: Some(location),
25 | id,
26 | _name: name,
27 | _content_name: content_name,
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/extensions/bat/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "bat",
3 | "displayName": "%displayName%",
4 | "description": "%description%",
5 | "version": "1.0.0",
6 | "publisher": "vscode",
7 | "license": "MIT",
8 | "engines": { "vscode": "*" },
9 | "scripts": {
10 | "update-grammar": "node ../../build/npm/update-grammar.js mmims/language-batchfile grammars/batchfile.cson ./syntaxes/batchfile.tmLanguage.json"
11 | },
12 | "contributes": {
13 | "languages": [{
14 | "id": "bat",
15 | "extensions": [ ".bat", ".cmd"],
16 | "aliases": [ "Batch", "bat" ],
17 | "configuration": "./language-configuration.json"
18 | }],
19 | "grammars": [{
20 | "language": "bat",
21 | "scopeName": "source.batchfile",
22 | "path": "./syntaxes/batchfile.tmLanguage.json"
23 | }],
24 | "snippets": [{
25 | "language": "bat",
26 | "path": "./snippets/batchfile.code-snippets"
27 | }]
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/extensions/json-language-features/server/extension-browser.webpack.config.js:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Licensed under the MIT License. See License.txt in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | //@ts-check
7 |
8 | 'use strict';
9 |
10 | const withBrowserDefaults = require('../../shared.webpack.config').browser;
11 | const path = require('path');
12 |
13 | module.exports = withBrowserDefaults({
14 | context: __dirname,
15 | entry: {
16 | extension: './src/browser/jsonServerMain.ts',
17 | },
18 | output: {
19 | filename: 'jsonServerMain.js',
20 | path: path.join(__dirname, 'dist', 'browser'),
21 | libraryTarget: 'var'
22 | }
23 | });
24 |
--------------------------------------------------------------------------------
/extensions/scss/language-configuration.json:
--------------------------------------------------------------------------------
1 | {
2 | "comments": {
3 | "blockComment": ["/*", "*/"],
4 | "lineComment": "//"
5 | },
6 | "brackets": [
7 | ["{", "}"],
8 | ["[", "]"],
9 | ["(", ")"]
10 | ],
11 | "autoClosingPairs": [
12 | { "open": "{", "close": "}", "notIn": ["string", "comment"] },
13 | { "open": "[", "close": "]", "notIn": ["string", "comment"] },
14 | { "open": "(", "close": ")", "notIn": ["string", "comment"] },
15 | { "open": "\"", "close": "\"", "notIn": ["string", "comment"] },
16 | { "open": "'", "close": "'", "notIn": ["string", "comment"] }
17 | ],
18 | "surroundingPairs": [
19 | ["{", "}"],
20 | ["[", "]"],
21 | ["(", ")"],
22 | ["\"", "\""],
23 | ["'", "'"]
24 | ],
25 | "folding": {
26 | "markers": {
27 | "start": "^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/",
28 | "end": "^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/"
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/scie-detector/src/content_root.rs:
--------------------------------------------------------------------------------
1 | #[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
2 | pub struct ContentRoot {
3 | pub root_dirs: Vec,
4 | pub source_dirs: Vec,
5 | pub gen_source_dirs: Vec,
6 | pub resource_dirs: Vec,
7 | pub test_source_dirs: Vec,
8 | pub get_test_dirs: Vec,
9 | pub get_test_source_dirs: Vec,
10 | pub exclude_dirs: Vec,
11 | }
12 |
13 | impl Default for ContentRoot {
14 | fn default() -> Self {
15 | ContentRoot {
16 | root_dirs: vec![],
17 | source_dirs: vec![],
18 | gen_source_dirs: vec![],
19 | resource_dirs: vec![],
20 | test_source_dirs: vec![],
21 | get_test_dirs: vec![],
22 | get_test_source_dirs: vec![],
23 | exclude_dirs: vec![],
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/extensions/typescript-language-features/src/commands/configurePlugin.ts:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Licensed under the MIT License. See License.txt in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | import { PluginManager } from '../utils/plugins';
7 | import { Command } from './commandManager';
8 |
9 | export class ConfigurePluginCommand implements Command {
10 | public readonly id = '_typescript.configurePlugin';
11 |
12 | public constructor(
13 | private readonly pluginManager: PluginManager,
14 | ) { }
15 |
16 | public execute(pluginId: string, configuration: any) {
17 | this.pluginManager.setConfiguration(pluginId, configuration);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/extensions/typescript-language-features/src/utils/fileSchemes.ts:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Licensed under the MIT License. See License.txt in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | export const file = 'file';
7 | export const untitled = 'untitled';
8 | export const git = 'git';
9 | /** Live share scheme */
10 | export const vsls = 'vsls';
11 | export const walkThroughSnippet = 'walkThroughSnippet';
12 |
13 | export const semanticSupportedSchemes = [
14 | file,
15 | untitled,
16 | ];
17 |
18 | /**
19 | * File scheme for which JS/TS language feature should be disabled
20 | */
21 | export const disabledSchemes = new Set([
22 | git,
23 | vsls
24 | ]);
25 |
--------------------------------------------------------------------------------
/extensions/json-language-features/extension-browser.webpack.config.js:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Licensed under the MIT License. See License.txt in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | //@ts-check
7 |
8 | 'use strict';
9 |
10 | const withBrowserDefaults = require('../shared.webpack.config').browser;
11 | const path = require('path');
12 |
13 | module.exports = withBrowserDefaults({
14 | target: 'webworker',
15 | context: path.join(__dirname, 'client'),
16 | entry: {
17 | extension: './src/browser/jsonClientMain.ts'
18 | },
19 | output: {
20 | filename: 'jsonClientMain.js',
21 | path: path.join(__dirname, 'client', 'dist', 'browser')
22 | }
23 | });
24 |
--------------------------------------------------------------------------------
/docs/adr/0006-add-rust-onig-to-source-code.md:
--------------------------------------------------------------------------------
1 | # 6. add rust-onig to source code
2 |
3 | Date: 2020-09-11
4 |
5 | ## Status
6 |
7 | 2020-09-11 proposed
8 |
9 | 2020-09-14 deprecated
10 |
11 | ## Context
12 |
13 | Onig use OnigRegSet as parameters, but it's private:
14 |
15 | `rust
16 | pub fn onig_regset_search(
17 | set: *mut OnigRegSet,
18 | str: *const OnigUChar,
19 | end: *const OnigUChar,
20 | start: *const OnigUChar,
21 | range: *const OnigUChar,
22 | lead: OnigRegSetLead,
23 | option: OnigOptionType,
24 | rmatch_pos: *mut ::std::os::raw::c_int,
25 | ) -> ::std::os::raw::c_int;
26 | `
27 |
28 |
29 | see in :
30 |
31 | ```
32 | #[repr(C)]
33 | #[derive(Debug, Copy, Clone)]
34 | pub struct OnigRegSetStruct {
35 | _unused: [u8; 0],
36 | }
37 | ```
38 |
39 |
40 | ## Decision
41 |
42 | Decision here...
43 |
44 | ## Consequences
45 |
46 | Consequences here...
47 |
--------------------------------------------------------------------------------
/extensions/vb/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "vb",
3 | "displayName": "%displayName%",
4 | "description": "%description%",
5 | "version": "1.0.0",
6 | "publisher": "vscode",
7 | "license": "MIT",
8 | "engines": { "vscode": "*" },
9 | "scripts": {
10 | "update-grammar": "node ../../build/npm/update-grammar.js textmate/asp.vb.net.tmbundle Syntaxes/ASP%20VB.net.plist ./syntaxes/asp-vb-net.tmlanguage.json"
11 | },
12 | "contributes": {
13 | "languages": [{
14 | "id": "vb",
15 | "extensions": [ ".vb", ".brs", ".vbs", ".bas" ],
16 | "aliases": [ "Visual Basic", "vb" ],
17 | "configuration": "./language-configuration.json"
18 | }],
19 | "grammars": [{
20 | "language": "vb",
21 | "scopeName": "source.asp.vb.net",
22 | "path": "./syntaxes/asp-vb-net.tmlanguage.json"
23 | }],
24 | "snippets": [{
25 | "language": "vb",
26 | "path": "./snippets/vb.code-snippets"
27 | }]
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/extensions/html/language-configuration.json:
--------------------------------------------------------------------------------
1 | {
2 | "comments": {
3 | "blockComment": [ "" ]
4 | },
5 | "brackets": [
6 | [""],
7 | ["<", ">"],
8 | ["{", "}"],
9 | ["(", ")"]
10 | ],
11 | "autoClosingPairs": [
12 | { "open": "{", "close": "}"},
13 | { "open": "[", "close": "]"},
14 | { "open": "(", "close": ")" },
15 | { "open": "'", "close": "'" },
16 | { "open": "\"", "close": "\"" },
17 | { "open": "", "notIn": [ "comment", "string" ]}
18 | ],
19 | "surroundingPairs": [
20 | { "open": "'", "close": "'" },
21 | { "open": "\"", "close": "\"" },
22 | { "open": "{", "close": "}"},
23 | { "open": "[", "close": "]"},
24 | { "open": "(", "close": ")" },
25 | { "open": "<", "close": ">" }
26 | ],
27 | "folding": {
28 | "markers": {
29 | "start": "^\\s*",
30 | "end": "^\\s*"
31 | }
32 | }
33 | }
--------------------------------------------------------------------------------
/extensions/fsharp/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "fsharp",
3 | "displayName": "%displayName%",
4 | "description": "%description%",
5 | "version": "1.0.0",
6 | "publisher": "vscode",
7 | "license": "MIT",
8 | "engines": { "vscode": "*" },
9 | "scripts": {
10 | "update-grammar": "node ../../build/npm/update-grammar.js ionide/ionide-fsgrammar grammar/fsharp.json ./syntaxes/fsharp.tmLanguage.json"
11 | },
12 | "contributes": {
13 | "languages": [{
14 | "id": "fsharp",
15 | "extensions": [ ".fs", ".fsi", ".fsx", ".fsscript" ],
16 | "aliases": [ "F#", "FSharp", "fsharp" ],
17 | "configuration": "./language-configuration.json"
18 | }],
19 | "grammars": [{
20 | "language": "fsharp",
21 | "scopeName": "source.fsharp",
22 | "path": "./syntaxes/fsharp.tmLanguage.json"
23 | }],
24 | "snippets": [{
25 | "language": "fsharp",
26 | "path": "./snippets/fsharp.code-snippets"
27 | }]
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/extensions/php-language-features/src/typings/node.additions.d.ts:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Licensed under the MIT License. See License.txt in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | declare function setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timer;
7 | declare function clearTimeout(timeoutId: NodeJS.Timer): void;
8 | declare function setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timer;
9 | declare function clearInterval(intervalId: NodeJS.Timer): void;
10 | declare function setImmediate(callback: (...args: any[]) => void, ...args: any[]): any;
11 | declare function clearImmediate(immediateId: any): void;
12 |
--------------------------------------------------------------------------------
/extensions/typescript-language-features/language-configuration.json:
--------------------------------------------------------------------------------
1 | {
2 | "comments": {
3 | "lineComment": "//",
4 | "blockComment": [ "/*", "*/" ]
5 | },
6 | "brackets": [
7 | ["{", "}"],
8 | ["[", "]"],
9 | ["(", ")"]
10 | ],
11 | "autoClosingPairs": [
12 | { "open": "{", "close": "}" },
13 | { "open": "[", "close": "]" },
14 | { "open": "(", "close": ")" },
15 | { "open": "'", "close": "'", "notIn": ["string", "comment"] },
16 | { "open": "\"", "close": "\"", "notIn": ["string"] },
17 | { "open": "`", "close": "`", "notIn": ["string", "comment"] },
18 | { "open": "/**", "close": " */", "notIn": ["string"] }
19 | ],
20 | "surroundingPairs": [
21 | ["{", "}"],
22 | ["[", "]"],
23 | ["(", ")"],
24 | ["'", "'"],
25 | ["\"", "\""],
26 | ["`", "`"]
27 | ],
28 | "folding": {
29 | "markers": {
30 | "start": "^\\s*//\\s*#?region\\b",
31 | "end": "^\\s*//\\s*#?endregion\\b"
32 | }
33 | }
34 | }
--------------------------------------------------------------------------------
/fixtures/test-cases/first-mate/fixtures/apply-end-pattern-last.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "applyEndPatternLast",
3 | "scopeName": "source.apply-end-pattern-last",
4 | "patterns": [
5 | {
6 | "name": "end-pattern-last-env",
7 | "begin": "last",
8 | "end": "^$",
9 | "patterns": [
10 | {
11 | "name": "scope",
12 | "begin": "\\{",
13 | "end": "\\}",
14 | "applyEndPatternLast": true,
15 | "patterns": [
16 | {
17 | "match": "\\}excentricSyntax",
18 | "name": "excentric"
19 | }
20 | ]
21 | }
22 | ]
23 | },
24 | {
25 | "name": "normal-env",
26 | "begin": "first",
27 | "end": "^$",
28 | "patterns": [
29 | {
30 | "name": "scope",
31 | "begin": "\\{",
32 | "end": "\\}",
33 | "patterns": [
34 | {
35 | "match": "\\}excentricSyntax",
36 | "name": "excentric"
37 | }
38 | ]
39 | }
40 | ]
41 | }
42 | ]
43 | }
--------------------------------------------------------------------------------
/scie-grammar/src/grammar/grammar_reader.rs:
--------------------------------------------------------------------------------
1 | use crate::inter::IRawGrammar;
2 |
3 | fn parse_raw_grammar(content: String, file_path: Option) -> Result {
4 | if let Some(path) = file_path.clone() {
5 | if path.ends_with(".json") {
6 | return Ok(parse_json_grammar(content, path));
7 | }
8 | }
9 |
10 | Err(String::from(
11 | "only support json file, input file is not a json file",
12 | ))
13 | }
14 |
15 | fn parse_json_grammar(_content: String, _file_path: String) -> IRawGrammar {
16 | IRawGrammar::new()
17 | }
18 |
19 | #[cfg(test)]
20 | mod tests {
21 | use crate::grammar::grammar_reader::parse_raw_grammar;
22 |
23 | #[test]
24 | fn should_run() {
25 | let grammar = parse_raw_grammar(String::from("hello"), Some(String::from("world.json")));
26 | assert_eq!(format!("{:?}", grammar.unwrap().location), "None");
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/extensions/typescript-language-features/src/commands/restartTsServer.ts:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Licensed under the MIT License. See License.txt in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | import TypeScriptServiceClientHost from '../typeScriptServiceClientHost';
7 | import { Lazy } from '../utils/lazy';
8 | import { Command } from './commandManager';
9 |
10 | export class RestartTsServerCommand implements Command {
11 | public readonly id = 'typescript.restartTsServer';
12 |
13 | public constructor(
14 | private readonly lazyClientHost: Lazy
15 | ) { }
16 |
17 | public execute() {
18 | this.lazyClientHost.value.serviceClient.restartTsServer();
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/docs/crash.md:
--------------------------------------------------------------------------------
1 | Notes:
2 |
3 | 1. old reg not bee clear
4 |
5 |
6 | ## Demo 1
7 |
8 | patterns_length_ptr = {*mut i32 | 0x7f907b1042f0} 0x00007f907b1042f0
9 |
10 | [0] = {*mut u8 | 0x7f907b1042c0} 0x00007f907b1042c0
11 | [1] = {*mut u8 | 0x7f907b1042d0} 0x00007f907b1042d0
12 | [2] = {*mut u8 | 0x7f907b1042e0} 0x00007f907b1042e0
13 |
14 | patterns_ptr = {*mut *mut u8 | 0x7f907b104300} 0x00007f907b104300
15 |
16 | in C
17 |
18 | lengths = {int * | 0x7f907b1042f0} 0x00007f907b1042f0
19 | patterns = {unsigned char ** | 0x7f907b104300} 0x00007f907b104300
20 |
21 | regexes = {OnigRegExp ** | 0x7f907b104320} 0x00007f907b104320
22 | *regexes = {OnigRegExp * | 0x0} NULL
23 | [1] = {OnigRegExp * | 0x0} NULL
24 | [2] = {OnigRegExp * | 0x0} NULL
25 | [3] = {OnigRegExp * | 0x0} NULL
26 |
27 | regs = {regex_t ** | 0x7f907b104340} 0x00007f907b104340
28 | *regs = {regex_t * | 0x0} NULL
29 | [1] = {regex_t * | 0x0} NULL
30 | [2] = {regex_t * | 0x0} NULL
31 |
--------------------------------------------------------------------------------
/extensions/typescript-language-features/src/commands/openTsServerLog.ts:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Licensed under the MIT License. See License.txt in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | import TypeScriptServiceClientHost from '../typeScriptServiceClientHost';
7 | import { Lazy } from '../utils/lazy';
8 | import { Command } from './commandManager';
9 |
10 | export class OpenTsServerLogCommand implements Command {
11 | public readonly id = 'typescript.openTsServerLog';
12 |
13 | public constructor(
14 | private readonly lazyClientHost: Lazy
15 | ) { }
16 |
17 | public execute() {
18 | this.lazyClientHost.value.serviceClient.openTsServerLogFile();
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/extensions/go/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "go",
3 | "displayName": "%displayName%",
4 | "description": "%description%",
5 | "version": "1.0.0",
6 | "publisher": "vscode",
7 | "license": "MIT",
8 | "engines": {
9 | "vscode": "*"
10 | },
11 | "scripts": {
12 | "update-grammar": "node ../../build/npm/update-grammar.js jeff-hykin/better-go-syntax source/generated.tmLanguage.json ./syntaxes/go.tmLanguage.json"
13 | },
14 | "contributes": {
15 | "languages": [
16 | {
17 | "id": "go",
18 | "extensions": [
19 | ".go"
20 | ],
21 | "aliases": [
22 | "Go"
23 | ],
24 | "configuration": "./language-configuration.json"
25 | }
26 | ],
27 | "grammars": [
28 | {
29 | "language": "go",
30 | "scopeName": "source.go",
31 | "path": "./syntaxes/go.tmLanguage.json"
32 | }
33 | ],
34 | "configurationDefaults": {
35 | "[go]": {
36 | "editor.insertSpaces": false
37 | }
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/extensions/ruby/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ruby",
3 | "displayName": "%displayName%",
4 | "description": "%description%",
5 | "version": "1.0.0",
6 | "publisher": "vscode",
7 | "license": "MIT",
8 | "engines": { "vscode": "*" },
9 | "scripts": {
10 | "update-grammar": "node ../../build/npm/update-grammar.js textmate/ruby.tmbundle Syntaxes/Ruby.plist ./syntaxes/ruby.tmLanguage.json"
11 | },
12 | "contributes": {
13 | "languages": [{
14 | "id": "ruby",
15 | "extensions": [ ".rb", ".rbx", ".rjs", ".gemspec", ".rake", ".ru", ".erb", ".podspec", ".rbi" ],
16 | "filenames": [ "rakefile", "gemfile", "guardfile", "podfile", "capfile" ],
17 | "aliases": [ "Ruby", "rb" ],
18 | "firstLine": "^#!\\s*/.*\\bruby\\b",
19 | "configuration": "./language-configuration.json"
20 | }],
21 | "grammars": [{
22 | "language": "ruby",
23 | "scopeName": "source.ruby",
24 | "path": "./syntaxes/ruby.tmLanguage.json"
25 | }]
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/scie-grammar/src/rule/compiled_rule.rs:
--------------------------------------------------------------------------------
1 | use scie_scanner::scanner::scie_scanner::ScieScanner;
2 |
3 | #[derive(Clone, Debug, Serialize)]
4 | pub struct CompiledRule {
5 | pub debug_reg_exps: Vec,
6 | pub rules: Vec,
7 | pub scanner: Box,
8 | }
9 |
10 | impl Default for CompiledRule {
11 | fn default() -> Self {
12 | CompiledRule {
13 | debug_reg_exps: vec![],
14 | rules: vec![],
15 | scanner: Box::new(ScieScanner::new(vec![])),
16 | }
17 | }
18 | }
19 |
20 | impl CompiledRule {
21 | pub fn new(debug_reg_exps: Vec, rules: Vec) -> Self {
22 | let scanner = ScieScanner::new(debug_reg_exps.clone());
23 | CompiledRule {
24 | debug_reg_exps,
25 | rules,
26 | scanner: Box::new(scanner),
27 | }
28 | }
29 |
30 | pub fn dispose(&self) {
31 | self.scanner.dispose();
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/extensions/javascript/javascript-language-configuration.json:
--------------------------------------------------------------------------------
1 | {
2 | "comments": {
3 | "lineComment": "//",
4 | "blockComment": [ "/*", "*/" ]
5 | },
6 | "brackets": [
7 | ["{", "}"],
8 | ["[", "]"],
9 | ["(", ")"]
10 | ],
11 | "autoClosingPairs": [
12 | { "open": "{", "close": "}" },
13 | { "open": "[", "close": "]" },
14 | { "open": "(", "close": ")" },
15 | { "open": "'", "close": "'", "notIn": ["string", "comment"] },
16 | { "open": "\"", "close": "\"", "notIn": ["string"] },
17 | { "open": "`", "close": "`", "notIn": ["string", "comment"] },
18 | { "open": "/**", "close": " */", "notIn": ["string"] }
19 | ],
20 | "surroundingPairs": [
21 | ["{", "}"],
22 | ["[", "]"],
23 | ["(", ")"],
24 | ["'", "'"],
25 | ["\"", "\""],
26 | ["`", "`"]
27 | ],
28 | "autoCloseBefore": ";:.,=}])>` \n\t",
29 | "folding": {
30 | "markers": {
31 | "start": "^\\s*//\\s*#?region\\b",
32 | "end": "^\\s*//\\s*#?endregion\\b"
33 | }
34 | }
35 | }
--------------------------------------------------------------------------------
/extensions/typescript-language-features/src/commands/selectTypeScriptVersion.ts:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Licensed under the MIT License. See License.txt in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | import TypeScriptServiceClientHost from '../typeScriptServiceClientHost';
7 | import { Lazy } from '../utils/lazy';
8 | import { Command } from './commandManager';
9 |
10 | export class SelectTypeScriptVersionCommand implements Command {
11 | public readonly id = 'typescript.selectTypeScriptVersion';
12 |
13 | public constructor(
14 | private readonly lazyClientHost: Lazy
15 | ) { }
16 |
17 | public execute() {
18 | this.lazyClientHost.value.serviceClient.showVersionPicker();
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/fixtures/test-cases/first-mate/fixtures/text.json:
--------------------------------------------------------------------------------
1 | {
2 | "fileTypes": [
3 | "txt"
4 | ],
5 | "keyEquivalent": "^~P",
6 | "name": "Plain Text",
7 | "patterns": [
8 | {
9 | "captures": {
10 | "1": {
11 | "name": "punctuation.definition.item.text"
12 | }
13 | },
14 | "match": "^\\s*(•).*$\\n?",
15 | "name": "meta.bullet-point.strong.text"
16 | },
17 | {
18 | "captures": {
19 | "1": {
20 | "name": "punctuation.definition.item.text"
21 | }
22 | },
23 | "match": "^\\s*(·).*$\\n?",
24 | "name": "meta.bullet-point.light.text"
25 | },
26 | {
27 | "captures": {
28 | "1": {
29 | "name": "punctuation.definition.item.text"
30 | }
31 | },
32 | "match": "^\\s*(\\*).*$\\n?",
33 | "name": "meta.bullet-point.star.text"
34 | },
35 | {
36 | "begin": "^([ \\t]*)(?=\\S)",
37 | "contentName": "meta.paragraph.text",
38 | "end": "^(?!\\1(?=\\S))"
39 | }
40 | ],
41 | "scopeName": "text.plain"
42 | }
--------------------------------------------------------------------------------
/extensions/cpp/test/colorize-fixtures/test.c:
--------------------------------------------------------------------------------
1 | /* C Program to find roots of a quadratic equation when coefficients are entered by user. */
2 | /* Library function sqrt() computes the square root. */
3 |
4 | #include
5 | #include /* This is needed to use sqrt() function.*/
6 | int main()
7 | {
8 | float a, b, c, determinant, r1,r2, real, imag;
9 | printf("Enter coefficients a, b and c: ");
10 | scanf("%f%f%f",&a,&b,&c);
11 | determinant=b*b-4*a*c;
12 | if (determinant>0)
13 | {
14 | r1= (-b+sqrt(determinant))/(2*a);
15 | r2= (-b-sqrt(determinant))/(2*a);
16 | printf("Roots are: %.2f and %.2f",r1 , r2);
17 | }
18 | else if (determinant==0)
19 | {
20 | r1 = r2 = -b/(2*a);
21 | printf("Roots are: %.2f and %.2f", r1, r2);
22 | }
23 | else
24 | {
25 | real= -b/(2*a);
26 | imag = sqrt(-determinant)/(2*a);
27 | printf("Roots are: %.2f+%.2fi and %.2f-%.2fi", real, imag, real, imag);
28 | }
29 | return 0;
30 | }
--------------------------------------------------------------------------------
/scie-model/src/raw_language.rs:
--------------------------------------------------------------------------------
1 | #[derive(Serialize, Deserialize, Debug, Clone)]
2 | pub struct RawLanguageExt {
3 | pub id: String,
4 |
5 | #[serde(skip_serializing_if = "Option::is_none")]
6 | pub extensions: Option>,
7 |
8 | #[serde(skip_serializing_if = "Option::is_none")]
9 | pub filenames: Option>,
10 |
11 | #[serde(skip_serializing_if = "Option::is_none")]
12 | #[serde(alias = "filenamePatterns")]
13 | pub filename_patterns: Option>,
14 |
15 | #[serde(alias = "firstLine")]
16 | #[serde(skip_serializing_if = "Option::is_none")]
17 | pub first_line: Option,
18 |
19 | #[serde(skip_serializing_if = "Option::is_none")]
20 | pub aliases: Option>,
21 |
22 | #[serde(skip_serializing_if = "Option::is_none")]
23 | pub mimetypes: Option>,
24 |
25 | #[serde(skip_serializing_if = "Option::is_none")]
26 | pub configuration: Option,
27 | }
28 |
--------------------------------------------------------------------------------
/docs/adr/0011-gitignore-design.md:
--------------------------------------------------------------------------------
1 | # 11. gitignore design
2 |
3 | Date: 2020-10-14
4 |
5 | ## Status
6 |
7 | 2020-10-14 proposed
8 |
9 | ## Context
10 |
11 | We need ignore for git rules for our project, to make process fast.
12 |
13 |
14 | As a user, they will had such as content:
15 |
16 | ```
17 | ├── .gitmodules
18 | ├── .idea
19 | └── app
20 | ├── .git
21 | ├── .gitmodules
22 | ├── .travis.yml
23 | └── community
24 | ```
25 |
26 | and also they may forgot build/target such as dir in project.
27 |
28 | So we need to:
29 |
30 | 1. accept workspace Root `.Gitignore` file in project.
31 | 2. accept workspace Module `.Gitignore` file in project.
32 | 3. accept Different languages gitignore files
33 | 4. add some default editor's rules such as `.idea` and also start with `.*`
34 |
35 | ## Decision
36 |
37 | add GitHub [gitignore](https://github.com/github/gitignore) project as gitignore file source.
38 |
39 | ## Consequences
40 |
41 | Consequences here...
42 |
--------------------------------------------------------------------------------
/docs/adr/README.md:
--------------------------------------------------------------------------------
1 | # Architecture Decision Records
2 |
3 | * [1. base-language-choice](0001-base-language-choice.md)
4 | * [2. grammer-engine-choice](0002-grammer-engine-choice.md)
5 | * [3. rule-map-not-align-issue](0003-rule-map-not-align-issue.md)
6 | * [4. cache-compiled](0004-cache-compiled.md)
7 | * [5. switch-to-onig-sys-api](0005-switch-to-onig-sys-api.md)
8 | * [6. add-rust-onig-to-source-code](0006-add-rust-onig-to-source-code.md)
9 | * [7. use-bin-data-for-languages](0007-use-bin-data-for-languages.md)
10 | * [8. bindata-for-embed](0008-bindata-for-embed.md)
11 | * [9. framework-detector](0009-framework-detector.md)
12 | * [10. align-extensions](0010-align-extensions.md)
13 | * [11. gitignore-design](0011-gitignore-design.md)
14 | * [12. multiple-thread](0012-multiple-thread.md)
15 | * [13. virtual-file-system](0013-virtual-file-system.md)
16 | * [14. code-generate-engine](0014-code-generate-engine.md)
17 | * [15. migration-to-tree-sitter](0015-migration-to-tree-sitter.md)
18 |
--------------------------------------------------------------------------------
/scie-detector/src/dependency/base_library.rs:
--------------------------------------------------------------------------------
1 | #[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
2 | pub struct BaseLibrary {
3 | pub name: String,
4 | pub version: String,
5 | pub group: String,
6 | pub source: String,
7 | pub scope: String,
8 | }
9 |
10 | pub enum LibraryScope {
11 | Dev,
12 | Test,
13 | }
14 |
15 | impl BaseLibrary {
16 | pub fn is_dev(&self) -> bool {
17 | return self.scope == "Test";
18 | }
19 | }
20 |
21 | #[cfg(test)]
22 | mod tests {
23 | use crate::dependency::base_library::BaseLibrary;
24 |
25 | #[test]
26 | fn should_be_dev_when_scope_dev() {
27 | let base_library = BaseLibrary {
28 | name: "some".to_string(),
29 | version: "0.1.1".to_string(),
30 | group: "".to_string(),
31 | source: "github.com".to_string(),
32 | scope: "Test".to_string(),
33 | };
34 |
35 | assert!(base_library.is_dev());
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/extensions/css-language-features/schemas/package.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json-schema.org/draft-07/schema#",
3 | "title": "CSS contributions to package.json",
4 | "type": "object",
5 | "properties": {
6 | "contributes": {
7 | "type": "object",
8 | "properties": {
9 | "css.customData": {
10 | "type": "array",
11 | "markdownDescription": "A list of relative file paths pointing to JSON files following the [custom data format](https://github.com/Microsoft/vscode-css-languageservice/blob/master/docs/customData.md).\n\nVS Code loads custom data on startup to enhance its CSS support for the custom CSS properties, at directives, pseudo classes and pseudo elements you specify in the JSON files.\n\nThe file paths are relative to workspace and only workspace folder settings are considered.",
12 | "items": {
13 | "type": "string",
14 | "description": "Relative path to a CSS custom data file"
15 | }
16 | }
17 | }
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/extensions/json-language-features/server/src/utils/strings.ts:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Licensed under the MIT License. See License.txt in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | /**
7 | * Determines if haystack ends with needle.
8 | */
9 | export function endsWith(haystack: string, needle: string): boolean {
10 | let diff = haystack.length - needle.length;
11 | if (diff > 0) {
12 | return haystack.lastIndexOf(needle) === diff;
13 | } else if (diff === 0) {
14 | return haystack === needle;
15 | } else {
16 | return false;
17 | }
18 | }
19 |
20 | export function convertSimple2RegExpPattern(pattern: string): string {
21 | return pattern.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g, '\\$&').replace(/[\*]/g, '.*');
22 | }
23 |
--------------------------------------------------------------------------------
/extensions/sql/language-configuration.json:
--------------------------------------------------------------------------------
1 | {
2 | "comments": {
3 | "lineComment": "--",
4 | "blockComment": [ "/*", "*/" ]
5 | },
6 | "brackets": [
7 | ["{", "}"],
8 | ["[", "]"],
9 | ["(", ")"]
10 | ],
11 | "autoClosingPairs": [
12 | ["{", "}"],
13 | ["[", "]"],
14 | ["(", ")"],
15 | { "open": "\"", "close": "\"", "notIn": ["string"] },
16 | { "open": "N'", "close": "'", "notIn": ["string", "comment"] },
17 | { "open": "'", "close": "'", "notIn": ["string", "comment"] }
18 | ],
19 | "surroundingPairs": [
20 | ["{", "}"],
21 | ["[", "]"],
22 | ["(", ")"],
23 | ["\"", "\""],
24 | ["'", "'"],
25 | ["`", "`"]
26 | ]
27 |
28 | // enhancedBrackets:[
29 | // { openTrigger: 'n', open: /begin$/i, closeComplete: 'end', matchCase: true },
30 | // { openTrigger: 'e', open: /case$/i, closeComplete: 'end', matchCase: true },
31 | // { openTrigger: 'n', open: /when$/i, closeComplete: 'then', matchCase: true }
32 | // ],
33 | // noindentBrackets: '()',
34 | }
--------------------------------------------------------------------------------
/extensions/typescript-basics/language-configuration.json:
--------------------------------------------------------------------------------
1 | {
2 | "comments": {
3 | "lineComment": "//",
4 | "blockComment": [ "/*", "*/" ]
5 | },
6 | "brackets": [
7 | ["{", "}"],
8 | ["[", "]"],
9 | ["(", ")"]
10 | ],
11 | "autoClosingPairs": [
12 | { "open": "{", "close": "}" },
13 | { "open": "[", "close": "]" },
14 | { "open": "(", "close": ")" },
15 | { "open": "'", "close": "'", "notIn": ["string", "comment"] },
16 | { "open": "\"", "close": "\"", "notIn": ["string"] },
17 | { "open": "`", "close": "`", "notIn": ["string", "comment"] },
18 | { "open": "/**", "close": " */", "notIn": ["string"] }
19 | ],
20 | "surroundingPairs": [
21 | ["{", "}"],
22 | ["[", "]"],
23 | ["(", ")"],
24 | ["'", "'"],
25 | ["\"", "\""],
26 | ["`", "`"],
27 | ["<", ">"]
28 | ],
29 | "autoCloseBefore": ";:.,=}])>` \n\t",
30 | "folding": {
31 | "markers": {
32 | "start": "^\\s*//\\s*#?region\\b",
33 | "end": "^\\s*//\\s*#?endregion\\b"
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/scie-grammar/src/rule/empty_rule.rs:
--------------------------------------------------------------------------------
1 | use std::any::Any;
2 |
3 | use crate::rule::abstract_rule::RuleEnum;
4 | use crate::rule::{AbstractRule, Rule};
5 |
6 | #[derive(Clone, Debug, Serialize)]
7 | pub struct EmptyRule {}
8 |
9 | impl EmptyRule {
10 | pub fn new() -> Self {
11 | EmptyRule {}
12 | }
13 | }
14 |
15 | lazy_static! {
16 | static ref EMPTY_RULE: Rule = Rule {
17 | _type: "".to_string(),
18 | _location: None,
19 | id: 0,
20 | _name: None,
21 | _content_name: None,
22 | };
23 | }
24 |
25 | impl AbstractRule for EmptyRule {
26 | fn id(&self) -> i32 {
27 | 0
28 | }
29 | fn type_of(&self) -> &'static str {
30 | "EmptyRule"
31 | }
32 | fn get_rule(&self) -> &Rule {
33 | &EMPTY_RULE
34 | }
35 | fn get_rule_instance(&self) -> RuleEnum {
36 | RuleEnum::EmptyRule(self)
37 | }
38 | fn get_instance(&mut self) -> &mut dyn Any {
39 | self
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/extensions/groovy/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "groovy",
3 | "displayName": "%displayName%",
4 | "description": "%description%",
5 | "version": "1.0.0",
6 | "publisher": "vscode",
7 | "license": "MIT",
8 | "engines": { "vscode": "*" },
9 | "scripts": {
10 | "update-grammar": "node ../../build/npm/update-grammar.js textmate/groovy.tmbundle Syntaxes/Groovy.tmLanguage ./syntaxes/groovy.tmLanguage.json"
11 | },
12 | "contributes": {
13 | "languages": [{
14 | "id": "groovy",
15 | "aliases": ["Groovy", "groovy"],
16 | "extensions": [".groovy", ".gvy", ".gradle"],
17 | "filenames": [ "Jenkinsfile" ],
18 | "firstLine": "^#!.*\\bgroovy\\b",
19 | "configuration": "./language-configuration.json"
20 | }],
21 | "grammars": [{
22 | "language": "groovy",
23 | "scopeName": "source.groovy",
24 | "path": "./syntaxes/groovy.tmLanguage.json"
25 | }],
26 | "snippets": [{
27 | "language": "groovy",
28 | "path": "./snippets/groovy.code-snippets"
29 | }]
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/extensions/javascript/test/colorize-fixtures/test.jsx:
--------------------------------------------------------------------------------
1 | var ToggleText = React.createClass({
2 | getInitialState: function () {
3 | return {
4 | showDefault: true
5 | }
6 | },
7 |
8 | toggle: function (e) {
9 | // Prevent following the link.
10 | e.preventDefault();
11 |
12 | // Invert the chosen default.
13 | // This will trigger an intelligent re-render of the component.
14 | this.setState({ showDefault: !this.state.showDefault })
15 | },
16 |
17 | render: function () {
18 | // Default to the default message.
19 | var message = this.props.default;
20 |
21 | // If toggled, show the alternate message.
22 | if (!this.state.showDefault) {
23 | message = this.props.alt;
24 | }
25 |
26 | return (
27 |
28 |
Hello {message}!
29 |
Toggle
30 |
31 | );
32 | }
33 | });
34 |
35 | React.render(, document.body);
--------------------------------------------------------------------------------
/extensions/typescript-language-features/schemas/package.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json-schema.org/draft-07/schema#",
3 | "title": "TypeScript contributions to package.json",
4 | "type": "object",
5 | "properties": {
6 | "contributes": {
7 | "type": "object",
8 | "properties": {
9 | "typescriptServerPlugins": {
10 | "type": "array",
11 | "description": "Contributed TypeScript server plugins.",
12 | "items": {
13 | "type": "object",
14 | "description": "TypeScript server plugin.",
15 | "properties": {
16 | "name": {
17 | "type": "string",
18 | "description": "Name of the plugin as listed in the package.json."
19 | },
20 | "enableForWorkspaceTypeScriptVersions": {
21 | "type": "boolean",
22 | "default": false,
23 | "description": "Should the plugin be loaded when using workspace versions of TypeScript?"
24 | }
25 | }
26 | }
27 | }
28 | }
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/extensions/less/language-configuration.json:
--------------------------------------------------------------------------------
1 | {
2 | "comments": {
3 | "blockComment": ["/*", "*/"],
4 | "lineComment": "//"
5 | },
6 | "brackets": [
7 | ["{", "}"],
8 | ["[", "]"],
9 | ["(", ")"]
10 | ],
11 | "autoClosingPairs": [
12 | { "open": "{", "close": "}", "notIn": ["string", "comment"] },
13 | { "open": "[", "close": "]", "notIn": ["string", "comment"] },
14 | { "open": "(", "close": ")", "notIn": ["string", "comment"] },
15 | { "open": "\"", "close": "\"", "notIn": ["string", "comment"] },
16 | { "open": "'", "close": "'", "notIn": ["string", "comment"] }
17 | ],
18 | "surroundingPairs": [
19 | ["{", "}"],
20 | ["[", "]"],
21 | ["(", ")"],
22 | ["\"", "\""],
23 | ["'", "'"]
24 | ],
25 | "indentationRules": {
26 | "increaseIndentPattern": "(^.*\\{[^}]*$)",
27 | "decreaseIndentPattern": "^\\s*\\}"
28 | },
29 | "folding": {
30 | "markers": {
31 | "start": "^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/",
32 | "end": "^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/"
33 | }
34 | }
35 | }
--------------------------------------------------------------------------------
/extensions/vb/test/colorize-fixtures/test.vb:
--------------------------------------------------------------------------------
1 | ' Copyright (c) Microsoft Corporation. All rights reserved.
2 |
3 | Public Sub LongTask(ByVal Duration As Single, _
4 | ByVal MinimumInterval As Single)
5 | Dim Threshold As Single
6 | Dim Start As Single
7 | Dim blnCancel As Boolean
8 |
9 | ' The Timer property of the DateAndTime object returns the seconds
10 | ' and milliseconds that have passed since midnight.
11 | Start = CSng(Timer)
12 | Threshold = MinimumInterval
13 |
14 | Do While CSng(Timer)< (Start + Duration)
15 | ' In a real application, some unit of work would
16 | ' be done here each time through the loop.
17 | If CSng(Timer)> (Start + Threshold) Then
18 | RaiseEvent PercentDone( _
19 | Threshold / Duration, blnCancel)
20 | ' Check to see if the operation was canceled.
21 | If blnCancel Then Exit Sub
22 | Threshold = Threshold + MinimumInterval
23 | End If
24 | Loop
25 | End Sub
--------------------------------------------------------------------------------
/extensions/ruby/language-configuration.json:
--------------------------------------------------------------------------------
1 | {
2 | "comments": {
3 | "lineComment": "#",
4 | "blockComment": [ "=begin", "=end" ]
5 | },
6 | "brackets": [
7 | ["{", "}"],
8 | ["[", "]"],
9 | ["(", ")"]
10 | ],
11 | "autoClosingPairs": [
12 | ["{", "}"],
13 | ["[", "]"],
14 | ["(", ")"],
15 | { "open": "\"", "close": "\"", "notIn": ["string"] },
16 | { "open": "'", "close": "'", "notIn": ["string"] },
17 | { "open": "`", "close": "`", "notIn": ["string"] }
18 | ],
19 | "surroundingPairs": [
20 | ["{", "}"],
21 | ["[", "]"],
22 | ["(", ")"],
23 | ["\"", "\""],
24 | ["'", "'"],
25 | ["`", "`"]
26 | ],
27 | "indentationRules": {
28 | "increaseIndentPattern": "^\\s*((begin|class|(private|protected)\\s+def|def|else|elsif|ensure|for|if|module|rescue|unless|until|when|while|case)|([^#]*\\sdo\\b)|([^#]*=\\s*(case|if|unless)))\\b([^#\\{;]|(\"|'|\/).*\\4)*(#.*)?$",
29 | "decreaseIndentPattern": "^\\s*([}\\]]([,)]?\\s*(#|$)|\\.[a-zA-Z_]\\w*\\b)|(end|rescue|ensure|else|elsif|when)\\b)"
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/docs/adr/0010-align-extensions.md:
--------------------------------------------------------------------------------
1 | # 10. align extensions
2 |
3 | Date: 2020-10-12
4 |
5 | ## Status
6 |
7 | 2020-10-12 proposed
8 |
9 | ## Context
10 |
11 | Some extensions not align:
12 |
13 | ```
14 | error path: "/Users/fdhuang/charj/scie/extensions/perl/syntaxes/perl.tmLanguage.json", err: Error("invalid type: integer `1`, expected a boolean", line: 38, column: 27)
15 | ```
16 |
17 | ### replace "applyEndPatternLast": 1,
18 |
19 | "applyEndPatternLast": 1, => "applyEndPatternLast": true,
20 |
21 | ### xml.tmLanguage.json not correnct issues
22 |
23 | related: https://github.com/atom/language-xml/issues/96
24 |
25 | solution: replace from xml.bundle
26 |
27 | https://github.com/textmate/xml.tmbundle
28 |
29 | ### R issues
30 |
31 | ```
32 | {
33 | "end": "\\)",
34 | "endCaptures": {
35 | "0": {
36 | "name": "punctuation.section.parens.end.r"
37 | }
38 | }
39 | },
40 | ```
41 |
42 | ## Decision
43 |
44 | Decision here...
45 |
46 | ## Consequences
47 |
48 | Consequences here...
49 |
--------------------------------------------------------------------------------
/extensions/powershell/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "powershell",
3 | "displayName": "%displayName%",
4 | "description": "%description%",
5 | "version": "1.0.0",
6 | "publisher": "vscode",
7 | "license": "MIT",
8 | "engines": { "vscode": "*" },
9 | "contributes": {
10 | "languages": [{
11 | "id": "powershell",
12 | "extensions": [ ".ps1", ".psm1", ".psd1", ".pssc", ".psrc" ],
13 | "aliases": [ "PowerShell", "powershell", "ps", "ps1" ],
14 | "firstLine": "^#!\\s*/.*\\bpwsh\\b",
15 | "configuration": "./language-configuration.json"
16 | }],
17 | "grammars": [{
18 | "language": "powershell",
19 | "scopeName": "source.powershell",
20 | "path": "./syntaxes/powershell.tmLanguage.json"
21 | }],
22 | "snippets": [{
23 | "language": "powershell",
24 | "path": "./snippets/powershell.code-snippets"
25 | }]
26 | },
27 | "scripts": {
28 | "update-grammar": "node ../../build/npm/update-grammar.js PowerShell/EditorSyntax PowerShellSyntax.tmLanguage ./syntaxes/powershell.tmLanguage.json"
29 | }
30 | }
31 |
--------------------------------------------------------------------------------