textmate / standard-ml.tmbundle

TextMate support for Standard ML
7 stars 3 forks source link

Does not work when installing: The mode has failed when tokenizing the input #5

Closed andry-tino closed 8 years ago

andry-tino commented 8 years ago

Tried installing both from yo code and manually (creating the folder in extensions myself and adding package.json and syntaxes and copying syntax files). I get:

Error: The mode has failing when tokenizing the input

image

When I open code.

Using the extension tool

If I use yo code, I get the following:

     _-----_
    |       |    .--------------------------.
    |--(o)--|    |   Welcome to the Visual  |
   `---------´   |   Studio Code Extension  |
    ( _´U`_ )    |        generator!        |
    /___A___\    '--------------------------'
     |  ~  |
   __'.___.'__
 ´   `  |° ´ Y `

? What type of extension do you want to create? (Use arrow keys)
? What type of extension do you want to create? New Language Support
URL (http, https) or file name of the tmLanguage file, e.g., http://raw.githubusercontent.com/textmate/ant.tmbundle/mast
er/Syntaxes/Ant.tmLanguage.
? URL or file: https://github.com/textmate/ocaml.tmbundle/blob/master/Syntaxes/OCamllex.tmLanguage
? What's the name of your extension? ocaml
? What's the identifier of your extension? ocaml
? What's the description of your extension? OCaml
? What's your publisher name? TextMate
Verify the id of the language. The id is an identifier and is single, lower-case name such as 'php', 'javascript'
? Detected languageId: ocaml
Verify the name of the language. The name will be shown in the VS code editor mode selector.
? Detected name: ocaml
Verify the file extensions of the language. Use commas to separate multiple entries (e.g. .ruby, .rb)
? Detected file extensions: .sml, .ml
events.js:154
      throw er; // Unhandled 'error' event
      ^

ReferenceError: C:\Users\myuser\AppData\Roaming\npm\node_modules\generator-code\generators\app\templates\ext-language\vs
c-extension-quickstart.md:7
    5| * `package.json` - this is the manifest file in which you declare your language support and define
    6| the location of the grammar file that has been copied into you extension.
 >> 7| * `syntaxes/<%= languageFileName %>` - this is the Text mate grammar file that is used for tokenization
    8| * `<%= languageId %>.configuration.json` - this the language configuration, defining the tokens that are used for

    9| comments and brackets.
    10|

languageFileName is not defined
    at eval (eval at <anonymous> (C:\Users\myuser\AppData\Roaming\npm\node_modules\generator-code\node_modules\yeoman-ge
nerator\node_modules\mem-fs-editor\node_modules\ejs\lib\ejs.js:485:12), <anonymous>:11:23)
    at returnedFn (C:\Users\myuser\AppData\Roaming\npm\node_modules\generator-code\node_modules\yeoman-generator\node_mo
dules\mem-fs-editor\node_modules\ejs\lib\ejs.js:514:17)
    at Object.exports.render (C:\Users\myuser\AppData\Roaming\npm\node_modules\generator-code\node_modules\yeoman-genera
tor\node_modules\mem-fs-editor\node_modules\ejs\lib\ejs.js:316:37)
    at copy.process (C:\Users\myuser\AppData\Roaming\npm\node_modules\generator-code\node_modules\yeoman-generator\node_
modules\mem-fs-editor\lib\actions\copy-tpl.js:14:18)
    at applyProcessingFunc (C:\Users\myuser\AppData\Roaming\npm\node_modules\generator-code\node_modules\yeoman-generato
r\node_modules\mem-fs-editor\lib\actions\copy.js:13:16)
    at EditionInterface.exports._copySingle (C:\Users\myuser\AppData\Roaming\npm\node_modules\generator-code\node_module
s\yeoman-generator\node_modules\mem-fs-editor\lib\actions\copy.js:51:16)
    at EditionInterface.exports.copy (C:\Users\myuser\AppData\Roaming\npm\node_modules\generator-code\node_modules\yeoma
n-generator\node_modules\mem-fs-editor\lib\actions\copy.js:23:17)
    at EditionInterface.module.exports [as copyTpl] (C:\Users\myuser\AppData\Roaming\npm\node_modules\generator-code\nod
e_modules\yeoman-generator\node_modules\mem-fs-editor\lib\actions\copy-tpl.js:12:8)
    at template (C:\Users\myuser\AppData\Roaming\npm\node_modules\generator-code\node_modules\yeoman-generator\lib\actio
ns\actions.js:134:11)
    at module.exports.yeoman.generators.Base.extend._writingLanguage (C:\Users\myuser\AppData\Roaming\npm\node_modules\g
enerator-code\generators\app\index.js:562:14)

You probably have a problem...

infininight commented 8 years ago

If there is something about the grammar causing an issue we can correct that, but the format is valid according to TextMate. You will need to file an issue in the Microsoft/vscode-generator-code repository to narrow down what is causing the issue.

If you want to track down the issue yourself you could delete sections of the grammar to narrow down where the issue is located.

Reply to this issue if you track down the issue, I will see it despite the closed state.

andry-tino commented 8 years ago

I will try filing the issue there and see!