-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
289 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -102,3 +102,5 @@ dist | |
|
||
# TernJS port file | ||
.tern-port | ||
|
||
*.vsix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// A launch configuration that launches the extension inside a new window | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Extension", | ||
"type": "extensionHost", | ||
"request": "launch", | ||
"args": [ | ||
"--extensionDevelopmentPath=${workspaceFolder}" | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.vscode/** | ||
.vscode-test/** | ||
.gitignore | ||
vsc-extension-quickstart.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Change Log | ||
|
||
All notable changes to the "meml" extension will be documented in this file. | ||
|
||
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file. | ||
|
||
## [Unreleased] | ||
|
||
- Initial release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
# vscode | ||
The VSCode extention for meml | ||
# Fushra meml | ||
|
||
Meml syntax highlighting in vscode. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"comments": { | ||
// symbol used for single line comment. Remove this entry if your language does not support line comments | ||
"lineComment": "//" | ||
// symbols used for start and end a block comment. Remove this entry if your language does not support block comments | ||
// "blockComment": [ "/*", "*/" ] | ||
}, | ||
// symbols used as brackets | ||
"brackets": [ | ||
//["{", "}"], | ||
//["[", "]"], | ||
["(", ")"] | ||
], | ||
// symbols that are auto closed when typing | ||
"autoClosingPairs": [ | ||
//["{", "}"], | ||
//["[", "]"], | ||
["(", ")"], | ||
["\"", "\""], | ||
["'", "'"] | ||
], | ||
// symbols that can be used to surround a selection | ||
"surroundingPairs": [ | ||
//["{", "}"], | ||
//["[", "]"], | ||
["(", ")"], | ||
["\"", "\""], | ||
["'", "'"] | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"name": "meml", | ||
"displayName": "MEML", | ||
"description": "MEML support for VSCode", | ||
"publisher": "Fushra", | ||
"version": "0.0.1", | ||
"engines": { | ||
"vscode": "^1.55.0" | ||
}, | ||
"categories": [ | ||
"Programming Languages" | ||
], | ||
"contributes": { | ||
"languages": [{ | ||
"id": "meml", | ||
"aliases": ["MEML", "meml"], | ||
"extensions": [".meml"], | ||
"configuration": "./language-configuration.json" | ||
}], | ||
"grammars": [{ | ||
"language": "meml", | ||
"scopeName": "source.meml", | ||
"path": "./syntaxes/meml.tmLanguage" | ||
}] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0" > | ||
<!-- Generated via Iro --> | ||
<dict> | ||
<key>fileTypes</key> | ||
<array> | ||
<string>meml</string> | ||
</array> | ||
<key>name</key> | ||
<string>meml</string> | ||
<key>patterns</key> | ||
<array> | ||
<dict> | ||
<key>include</key> | ||
<string>#main</string> | ||
</dict> | ||
</array> | ||
<key>scopeName</key> | ||
<string>source.meml</string> | ||
<key>uuid</key> | ||
<string></string> | ||
<key>repository</key> | ||
<dict> | ||
<key>main</key> | ||
<dict> | ||
<key>patterns</key> | ||
<array> | ||
<dict> | ||
<key>match</key> | ||
<string>(import|from|export)</string> | ||
<key>name</key> | ||
<string>keyword.meml</string> | ||
</dict> | ||
<dict> | ||
<key>match</key> | ||
<string>(component)</string> | ||
<key>name</key> | ||
<string>punctuation.definition.meml</string> | ||
</dict> | ||
<dict> | ||
<key>match</key> | ||
<string>((?<=\(\s*)\w*(?=.*))</string> | ||
<key>name</key> | ||
<string>entity.name.tag.meml</string> | ||
</dict> | ||
<dict> | ||
<key>match</key> | ||
<string>((?<=\(component\ )\w*)</string> | ||
<key>name</key> | ||
<string>variable.other.constant.meml</string> | ||
</dict> | ||
<dict> | ||
<key>match</key> | ||
<string>((?<=\()\w*(, \w*)*(?=\)))</string> | ||
<key>name</key> | ||
<string>variable.other.constant.meml</string> | ||
</dict> | ||
<dict> | ||
<key>match</key> | ||
<string>(\+|-|(?<!/)(/)(?!/)|\*|=)</string> | ||
<key>name</key> | ||
<string>punctuation.meml</string> | ||
</dict> | ||
<dict> | ||
<key>match</key> | ||
<string>(\(|\))</string> | ||
<key>name</key> | ||
<string>punctuation.definition.tag.meml</string> | ||
</dict> | ||
<dict> | ||
<key>match</key> | ||
<string>((\w*)(?==))</string> | ||
<key>name</key> | ||
<string>variable.meml</string> | ||
</dict> | ||
<dict> | ||
<key>match</key> | ||
<string>(//.*)</string> | ||
<key>name</key> | ||
<string>comment.meml</string> | ||
</dict> | ||
<dict> | ||
<key>begin</key> | ||
<string>(")</string> | ||
<key>beginCaptures</key> | ||
<dict> | ||
<key>1</key> | ||
<dict> | ||
<key>name</key> | ||
<string>punctuation.definition.string.meml</string> | ||
</dict> | ||
</dict> | ||
<key>contentName</key> | ||
<string>string.meml</string> | ||
<key>end</key> | ||
<string>(")</string> | ||
<key>endCaptures</key> | ||
<dict> | ||
<key>1</key> | ||
<dict> | ||
<key>name</key> | ||
<string>punctuation.definition.string.meml</string> | ||
</dict> | ||
</dict> | ||
</dict> | ||
<dict> | ||
<key>begin</key> | ||
<string>(')</string> | ||
<key>beginCaptures</key> | ||
<dict> | ||
<key>1</key> | ||
<dict> | ||
<key>name</key> | ||
<string>punctuation.definition.string.meml</string> | ||
</dict> | ||
</dict> | ||
<key>contentName</key> | ||
<string>string.meml</string> | ||
<key>end</key> | ||
<string>(')</string> | ||
<key>endCaptures</key> | ||
<dict> | ||
<key>1</key> | ||
<dict> | ||
<key>name</key> | ||
<string>punctuation.definition.string.meml</string> | ||
</dict> | ||
</dict> | ||
</dict> | ||
</array> | ||
</dict> | ||
<key>main__1</key> | ||
<dict> | ||
<key>patterns</key> | ||
<array> | ||
</array> | ||
</dict> | ||
<key>main__2</key> | ||
<dict> | ||
<key>patterns</key> | ||
<array> | ||
</array> | ||
</dict> | ||
</dict> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
(import (nav) from "./nav.meml") | ||
|
||
// Lets define a sample component | ||
(component helloComponent (name) | ||
(p "Hello " name ". This comes from a component!") | ||
) | ||
// The rest of the file | ||
( | ||
head | ||
(title "Hello World!") | ||
) | ||
// This is a comment | ||
( | ||
body | ||
(nav) | ||
(p "Basic website made with MEML!") | ||
(p "1 + 2 = " 1 + 2) | ||
(p "BODMAS: " 5 - 5 * 5 + 5) | ||
(helloComponent name="TrickyPR") | ||
) | ||
|
||
(export (helloComponent)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Welcome to your VS Code Extension | ||
|
||
## What's in the folder | ||
|
||
* This folder contains all of the files necessary for your extension. | ||
* `package.json` - this is the manifest file in which you declare your language support and define the location of the grammar file that has been copied into your extension. | ||
* `syntaxes/meml.tmLanguage` - this is the Text mate grammar file that is used for tokenization. | ||
* `language-configuration.json` - this is the language configuration, defining the tokens that are used for comments and brackets. | ||
|
||
## Get up and running straight away | ||
|
||
* Make sure the language configuration settings in `language-configuration.json` are accurate. | ||
* Press `F5` to open a new window with your extension loaded. | ||
* Create a new file with a file name suffix matching your language. | ||
* Verify that syntax highlighting works and that the language configuration settings are working. | ||
|
||
## Make changes | ||
|
||
* You can relaunch the extension from the debug toolbar after making changes to the files listed above. | ||
* You can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes. | ||
|
||
## Add more language features | ||
|
||
* To add features such as intellisense, hovers and validators check out the VS Code extenders documentation at https://code.visualstudio.com/docs | ||
|
||
## Install your extension | ||
|
||
* To start using your extension with Visual Studio Code copy it into the `<user home>/.vscode/extensions` folder and restart Code. | ||
* To share your extension with the world, read on https://code.visualstudio.com/docs about publishing an extension. |