microsoft / microsoft/monaco-editor

Error: ruby: trying to pop an empty stack in rule

Open
#134 8 comments 4 reactions 1 assignee View on GitHub

@alexdima is already working on this.

Since Dec 13, 2019.

bug grammars help wanted
Dominant language
JavaScript
Stars
46.8k
Forks
4.1k
Avg merge
17h 58m
Merged PRs (30d)
1

Description

  • create a ruby model
  • paste the code below
  • 💥 see the error below
some text - ruby
some text - #-------------------------------------------------------------------------
some text - # Copyright (c) Microsoft. All rights reserved.
some text - #--------------------------------------------------------------------------
some text - 
some text - module Azure
  module Blob
    class Blob

      def initialize
        @properties = {}
        @metadata = {}
        yield self if block_given?
      end

      attr_accessor :name
      attr_accessor :snapshot
      attr_accessor :properties
      attr_accessor :metadata
    end
  end
end
Error: ruby: trying to pop an empty stack in rule: tokenizer.root: ^(\s*)([a-z_]\w*[!?=]?)
    at Object.throwError (http://localhost:8080/vscode/out/vs/editor/common/modes/monarch/monarchCommon.js:57:15)
    at MonarchLexer.tokenize (http://localhost:8080/vscode/out/vs/editor/common/modes/monarch/monarchLexer.js:219:43)
    at MonarchLexer.tokenize (http://localhost:8080/vscode/out/vs/editor/common/modes/monarch/monarchLexer.js:287:41)
    at MonarchLexer.tokenize (http://localhost:8080/vscode/out/vs/editor/common/modes/monarch/monarchLexer.js:272:29)
    at _loop_1 (http://localhost:8080/vscode/out/vs/editor/common/modes/supports/tokenizationSupport.js:122:43)
    at TokenizationSupport._myTokenize (http://localhost:8080/vscode/out/vs/editor/common/modes/supports/tokenizationSupport.js:178:31)
    at TokenizationSupport.tokenize (http://localhost:8080/vscode/out/vs/editor/common/modes/supports/tokenizationSupport.js:46:29)
    at Model.TextModelWithTokens._updateTokensUntilLine (http://localhost:8080/vscode/out/vs/editor/common/model/textModelWithTokens.js:460:60)
    at Model.TextModelWithTokens._revalidateTokensNow (http://localhost:8080/vscode/out/vs/editor/common/model/textModelWithTokens.js:420:22)
    at http://localhost:8080/vscode/out/vs/editor/common/model/textModelWithTokens.js:373:27

Playground link:
https://microsoft.github.io/monaco-editor/playground.html?source=v0.36.0-dev.20230224#XQAAAAKsAwAAAAAAAABBqQkHQ5NjdMjwa-jY7SIQ9S7DNlzs5W-mwj0fe1ZCDRFc9ws9XQE0SJE1jc2VKxhaLFIw9vEWSxW3yscw4l5XSjQNeA7FQlbpOv2DA3EMY8CYQ3CFqhMFQnNbwxh6oNnQu4zdOiVyZGIB-vxwfpQbbeL25j50ItdHT-fQwzmNrusFBv0v9iXe5FWKDdzF8qMWVilBieAxIj4YzEs2HvBWFa6oHrPfbFjcfukVP7Y67jQn7LR_78a0e5lCiJ4f0jt-ZfrCbQVBQx7p-rHH-01ebDeFknzHKwwPo1YSMk7mUwuhixaQ3Jxn2h39O8zbDkTDADlUx5vni1MWpdhr0ycH36ylOun0HyTXX2WiY9-fUjcEm_4jYcBQG0Mek-78kaAHK--3TjOSfxeSxy13tgflHn1b5iO--GLIKgJ6YiUsPWGq-hEpK3wWTHasBaWjhmZACQjceGdbzyzIa9_Ri01WzmgBwuAojyHSNACyOtGUrpuUpCy4R10K3aBBTYjBfgANlYcM1yYvaw5RMxNmI9PJBp_rKMUXikHmHMWDQggW3AtRM34-_6k-Zu8dMGCywbowkcnsX_PElAHJvBSib_iCWLzTvp_dSrwy73f6Ymr_gavT2Q

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.