Блог пользователя Xellos

Автор Xellos, история, 8 лет назад, По-английски

A long time ago, I started writing syntax definitions for Q# in Sublime Text. Motivated again by the recent contest, I significantly improved them, so they're actually usable in a competition. You can check the current version at https://gitgud.io/Xellos/qsharp-sublime-syntax.

  • Проголосовать: нравится
  • +43
  • Проголосовать: не нравится

»
8 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Auto comment: topic has been updated by Xellos (previous revision, new revision, compare).

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

why not to use language server protocol instead of editor-specific definitions

  • »
    »
    8 лет назад, скрыть # ^ |
     
    Проголосовать: нравится +13 Проголосовать: не нравится

    Hmm, first, I had no idea what that is. Second, after checking out the docs, I'm not in the mood to learn how it works. Seems too long.

    If you want something else done, why not do it yourself?

»
7 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Auto comment: topic has been updated by Xellos (previous revision, new revision, compare).

»
6 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Thank you, it is a good idea!

Though, it seems there are some weird broken things (due to Q# syntax evolving?) (commit 6f99c0b56dbe241f86792745b1f4f5a8d65a2c2e):

namespace Solution {
function f(a: Int): Int {    
    for(i in a) {
    }
}
operation g(q: Qubit): Unit {
    
}
}
  1. For me operation g and below is not highlighted. If I remove the for loop or change function to operation, then operation g becomes highlighted.

  2. There is a within { ... } apply {... }; construction.

  3. Functors e.g. is Ctl+Adj seem to cause en error in parsing.

  4. is it possible to make commenting code with Ctrl+/ work?