Microsoft/monaco-editor

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

Open

#134 创建于 2016年8月30日

在 GitHub 查看
 (8 评论) (4 反应) (1 负责人)JavaScript (1,283 fork)batch import
buggrammarshelp wanted

仓库指标

Star
 (14,836 star)
PR 合并指标
 (平均合并 6小时 26分钟) (30 天内合并 15 个 PR)

描述

  • 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

贡献者指南