├── .rspec ├── Gemfile ├── Support ├── res │ ├── completion_icons │ │ ├── alias.pdf │ │ ├── array.pdf │ │ ├── class.pdf │ │ ├── enum.pdf │ │ ├── module.pdf │ │ ├── struct.pdf │ │ ├── union.pdf │ │ ├── function.pdf │ │ ├── keyword.pdf │ │ ├── package.pdf │ │ ├── template.pdf │ │ ├── variable.pdf │ │ ├── enum_member.pdf │ │ ├── interface.pdf │ │ ├── variable_name.pdf │ │ ├── mixin_template.pdf │ │ ├── originals │ │ │ ├── alias.psd │ │ │ ├── array.psd │ │ │ ├── class.psd │ │ │ ├── colors.psd │ │ │ ├── enum.psd │ │ │ ├── module.psd │ │ │ ├── struct.psd │ │ │ ├── union.psd │ │ │ ├── function.psd │ │ │ ├── keyword.psd │ │ │ ├── package.psd │ │ │ ├── template.psd │ │ │ ├── variable.psd │ │ │ ├── enum_member.psd │ │ │ ├── interface.psd │ │ │ ├── variable_name.psd │ │ │ ├── mixin_template.psd │ │ │ └── associative_array.psd │ │ └── associative_array.pdf │ ├── ddoc_theme.ddoc │ └── ddoc_theme.css ├── bin │ ├── run_single_script.rb │ ├── run_script.rb │ ├── build_script.rb │ ├── test_script.rb │ └── script_helper.rb ├── lib │ ├── commands │ │ ├── stop_dcd_server_command.rb │ │ ├── ddoc_macros.rb │ │ ├── start_dcd_server.rb │ │ ├── dcd_command.rb │ │ ├── go_to_definition_command.rb │ │ ├── docummentation_command.rb │ │ └── complete_command.rb │ ├── text_mate │ │ ├── dialog.rb │ │ ├── document.rb │ │ ├── process.rb │ │ ├── core_ext │ │ │ └── capture3.rb │ │ ├── text_mate.rb │ │ ├── text_mate_session.rb │ │ └── helpers │ │ │ ├── options_helper.rb │ │ │ ├── tag_helper.rb │ │ │ └── url_helper.rb │ ├── text_mate.rb │ └── dmate │ │ ├── dcd.rb │ │ ├── path.rb │ │ ├── dcd_client.rb │ │ ├── dcd_server.rb │ │ ├── dub_project.rb │ │ ├── compiler.rb │ │ └── error_handler.rb └── help.md ├── spec ├── support │ ├── temp_files.rb │ ├── code_to_file.rb │ └── matchers │ │ └── be_parsed_as.rb ├── dgrammar │ ├── conditional_spec.rb │ ├── method_declaration_spec.rb │ └── string_literal_spec.rb ├── spec_helper.rb └── dsupport │ ├── text_mate │ └── helpers │ │ ├── options_helper_spec.rb │ │ ├── tag_helper_spec.rb │ │ └── url_helper_spec.rb │ └── dmate │ └── error_handler_spec.rb ├── Templates ├── D Class.tmTemplate │ ├── template.d │ └── info.plist └── Program.tmTemplate │ ├── template.d │ └── info.plist ├── Snippets ├── return.tmSnippet ├── debug.tmSnippet ├── if.tmSnippet ├── enum.tmSnippet ├── main.tmSnippet ├── unittest.tmSnippet ├── while.tmSnippet ├── foreach.tmSnippet ├── import.tmSnippet ├── version.tmSnippet ├── struct.tmSnippet ├── try finally.tmSnippet ├── if else.tmSnippet ├── debugm.tmSnippet ├── foreach reverse.tmSnippet ├── try catch.tmSnippet ├── main with args.tmSnippet ├── method.tmSnippet ├── class.tmSnippet ├── try catch finally.tmSnippet └── Continue Block Comment.tmSnippet ├── Preferences ├── Folding.tmPreferences ├── Symbol List-Method-Constructor.tmPreferences ├── Indentation Rules.tmPreferences └── Comments.tmPreferences ├── Gemfile.lock ├── Commands ├── Stop Completion Server.tmCommand ├── Complete.tmCommand ├── Documentation.tmCommand ├── Help.tmCommand ├── Run.tmCommand ├── Test.tmCommand ├── Build.tmCommand ├── Go To Definition.tmCommand ├── Run Single File.tmCommand ├── Start Completion Server.tmCommand └── New method.tmCommand ├── README.mdown ├── Tests └── test.d ├── info.plist └── Syntaxes └── D.tmLanguage /.rspec: -------------------------------------------------------------------------------- 1 | --color 2 | --format progress 3 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gem 'pry' 4 | gem 'rspec' 5 | -------------------------------------------------------------------------------- /Support/res/completion_icons/alias.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/textmate/d.tmbundle/HEAD/Support/res/completion_icons/alias.pdf -------------------------------------------------------------------------------- /Support/res/completion_icons/array.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/textmate/d.tmbundle/HEAD/Support/res/completion_icons/array.pdf -------------------------------------------------------------------------------- /Support/res/completion_icons/class.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/textmate/d.tmbundle/HEAD/Support/res/completion_icons/class.pdf -------------------------------------------------------------------------------- /Support/res/completion_icons/enum.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/textmate/d.tmbundle/HEAD/Support/res/completion_icons/enum.pdf -------------------------------------------------------------------------------- /Support/res/completion_icons/module.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/textmate/d.tmbundle/HEAD/Support/res/completion_icons/module.pdf -------------------------------------------------------------------------------- /Support/res/completion_icons/struct.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/textmate/d.tmbundle/HEAD/Support/res/completion_icons/struct.pdf -------------------------------------------------------------------------------- /Support/res/completion_icons/union.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/textmate/d.tmbundle/HEAD/Support/res/completion_icons/union.pdf -------------------------------------------------------------------------------- /Support/res/completion_icons/function.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/textmate/d.tmbundle/HEAD/Support/res/completion_icons/function.pdf -------------------------------------------------------------------------------- /Support/res/completion_icons/keyword.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/textmate/d.tmbundle/HEAD/Support/res/completion_icons/keyword.pdf -------------------------------------------------------------------------------- /Support/res/completion_icons/package.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/textmate/d.tmbundle/HEAD/Support/res/completion_icons/package.pdf -------------------------------------------------------------------------------- /Support/res/completion_icons/template.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/textmate/d.tmbundle/HEAD/Support/res/completion_icons/template.pdf -------------------------------------------------------------------------------- /Support/res/completion_icons/variable.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/textmate/d.tmbundle/HEAD/Support/res/completion_icons/variable.pdf -------------------------------------------------------------------------------- /Support/res/completion_icons/enum_member.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/textmate/d.tmbundle/HEAD/Support/res/completion_icons/enum_member.pdf -------------------------------------------------------------------------------- /Support/res/completion_icons/interface.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/textmate/d.tmbundle/HEAD/Support/res/completion_icons/interface.pdf -------------------------------------------------------------------------------- /Support/res/completion_icons/variable_name.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/textmate/d.tmbundle/HEAD/Support/res/completion_icons/variable_name.pdf -------------------------------------------------------------------------------- /Support/res/completion_icons/mixin_template.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/textmate/d.tmbundle/HEAD/Support/res/completion_icons/mixin_template.pdf -------------------------------------------------------------------------------- /Support/res/completion_icons/originals/alias.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/textmate/d.tmbundle/HEAD/Support/res/completion_icons/originals/alias.psd -------------------------------------------------------------------------------- /Support/res/completion_icons/originals/array.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/textmate/d.tmbundle/HEAD/Support/res/completion_icons/originals/array.psd -------------------------------------------------------------------------------- /Support/res/completion_icons/originals/class.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/textmate/d.tmbundle/HEAD/Support/res/completion_icons/originals/class.psd -------------------------------------------------------------------------------- /Support/res/completion_icons/originals/colors.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/textmate/d.tmbundle/HEAD/Support/res/completion_icons/originals/colors.psd -------------------------------------------------------------------------------- /Support/res/completion_icons/originals/enum.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/textmate/d.tmbundle/HEAD/Support/res/completion_icons/originals/enum.psd -------------------------------------------------------------------------------- /Support/res/completion_icons/originals/module.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/textmate/d.tmbundle/HEAD/Support/res/completion_icons/originals/module.psd -------------------------------------------------------------------------------- /Support/res/completion_icons/originals/struct.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/textmate/d.tmbundle/HEAD/Support/res/completion_icons/originals/struct.psd -------------------------------------------------------------------------------- /Support/res/completion_icons/originals/union.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/textmate/d.tmbundle/HEAD/Support/res/completion_icons/originals/union.psd -------------------------------------------------------------------------------- /Support/res/completion_icons/associative_array.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/textmate/d.tmbundle/HEAD/Support/res/completion_icons/associative_array.pdf -------------------------------------------------------------------------------- /Support/res/completion_icons/originals/function.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/textmate/d.tmbundle/HEAD/Support/res/completion_icons/originals/function.psd -------------------------------------------------------------------------------- /Support/res/completion_icons/originals/keyword.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/textmate/d.tmbundle/HEAD/Support/res/completion_icons/originals/keyword.psd -------------------------------------------------------------------------------- /Support/res/completion_icons/originals/package.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/textmate/d.tmbundle/HEAD/Support/res/completion_icons/originals/package.psd -------------------------------------------------------------------------------- /Support/res/completion_icons/originals/template.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/textmate/d.tmbundle/HEAD/Support/res/completion_icons/originals/template.psd -------------------------------------------------------------------------------- /Support/res/completion_icons/originals/variable.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/textmate/d.tmbundle/HEAD/Support/res/completion_icons/originals/variable.psd -------------------------------------------------------------------------------- /Support/res/completion_icons/originals/enum_member.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/textmate/d.tmbundle/HEAD/Support/res/completion_icons/originals/enum_member.psd -------------------------------------------------------------------------------- /Support/res/completion_icons/originals/interface.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/textmate/d.tmbundle/HEAD/Support/res/completion_icons/originals/interface.psd -------------------------------------------------------------------------------- /Support/res/completion_icons/originals/variable_name.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/textmate/d.tmbundle/HEAD/Support/res/completion_icons/originals/variable_name.psd -------------------------------------------------------------------------------- /Support/res/completion_icons/originals/mixin_template.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/textmate/d.tmbundle/HEAD/Support/res/completion_icons/originals/mixin_template.psd -------------------------------------------------------------------------------- /Support/res/completion_icons/originals/associative_array.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/textmate/d.tmbundle/HEAD/Support/res/completion_icons/originals/associative_array.psd -------------------------------------------------------------------------------- /Support/bin/run_single_script.rb: -------------------------------------------------------------------------------- 1 | require_relative 'script_helper' 2 | 3 | class RunSingleScript 4 | include ScriptHelper 5 | 6 | def run_project 7 | run_single_file 8 | end 9 | end 10 | 11 | RunSingleScript.new.run 12 | -------------------------------------------------------------------------------- /Support/lib/commands/stop_dcd_server_command.rb: -------------------------------------------------------------------------------- 1 | TextMate.require_bundle 'lib/commands/dcd_command' 2 | 3 | class StopDcdServerCommand < DcdCommand 4 | def run 5 | enforce_dcd_client 6 | _, stderr = dcd_client.execute('--shutdown') 7 | enforce(stderr) 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /spec/support/temp_files.rb: -------------------------------------------------------------------------------- 1 | module DMate 2 | module Support 3 | module TempFiles 4 | module_function 5 | 6 | def files 7 | @files ||= [] 8 | end 9 | 10 | def clear 11 | files.each(&:unlink) 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /spec/dgrammar/conditional_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'condtional' do 4 | subject { code_to_file(code) } 5 | 6 | describe '"if" inside symbol' do 7 | let(:code) { 'uniform' } 8 | it { should_not be_parsed_as('keyword.control.conditional.d') } 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /Templates/D Class.tmTemplate/template.d: -------------------------------------------------------------------------------- 1 | module ${TM_NEW_FILE_BASENAME}; 2 | 3 | /** 4 | * @author ${TM_FULLNAME} 5 | * @copyright Copyright (c) ${TM_YEAR} ${TM_ORGANIZATION_NAME}. All rights reserved. 6 | * @version $Rev$ 7 | */ 8 | class ${TM_NEW_FILE_BASENAME} { 9 | this() { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /spec/dgrammar/method_declaration_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'method declaration' do 4 | subject { code_to_file(code) } 5 | 6 | describe 'void foo() {}' do 7 | let(:code) { 'void foo() {}' } 8 | it { should be_parsed_as('meta.definition.method.d') } 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /Support/bin/run_script.rb: -------------------------------------------------------------------------------- 1 | require_relative 'script_helper' 2 | 3 | class RunScript 4 | include ScriptHelper 5 | 6 | def run_shell_path 7 | @run_path ||= File.join(TextMate.project_path, Compiler.shell.run) 8 | end 9 | 10 | def dub_command 11 | Compiler.dub.run 12 | end 13 | end 14 | 15 | RunScript.new.run 16 | -------------------------------------------------------------------------------- /spec/support/code_to_file.rb: -------------------------------------------------------------------------------- 1 | module DMate 2 | module Support 3 | module CodeToFile 4 | def code_to_file(code) 5 | file = Tempfile.new('foo') 6 | TempFiles.files << file 7 | file.write(code) 8 | file 9 | ensure 10 | file.close 11 | end 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /Templates/Program.tmTemplate/template.d: -------------------------------------------------------------------------------- 1 | /** 2 | * @author ${TM_FULLNAME} 3 | * @copyright Copyright (c) ${TM_YEAR} ${TM_ORGANIZATION_NAME}. All rights reserved. 4 | * @version $Rev$ 5 | */ 6 | module ${TM_NEW_FILE_BASENAME}; 7 | import tango.io.Stdout; 8 | import tango.text.convert.Format; 9 | 10 | void main() { 11 | Stdout(`Hello`).newline; 12 | } -------------------------------------------------------------------------------- /Support/lib/text_mate/dialog.rb: -------------------------------------------------------------------------------- 1 | module TextMate 2 | class Dialog 3 | attr_reader :env 4 | 5 | def initialize(env) 6 | @env = env 7 | end 8 | 9 | def register_images(images) 10 | images = images.map { |k, v| "#{k} = '#{v}';" }.join(' ') 11 | icon_plist = "{ #{images} }" 12 | system(env.dialog, 'images', '--register', icon_plist) 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /Support/bin/build_script.rb: -------------------------------------------------------------------------------- 1 | require_relative 'script_helper' 2 | 3 | class BuildScript 4 | include ScriptHelper 5 | 6 | def run_single_file 7 | super << '--build-only' 8 | end 9 | 10 | def run_shell_path 11 | @run_path ||= File.join(TextMate.project_path, Compiler.shell.build) 12 | end 13 | 14 | def dub_command 15 | Compiler.dub.build 16 | end 17 | end 18 | 19 | BuildScript.new.run 20 | -------------------------------------------------------------------------------- /Support/lib/text_mate.rb: -------------------------------------------------------------------------------- 1 | require File.expand_path('text_mate/text_mate', File.dirname(__FILE__)) 2 | 3 | TextMate.require_support 'lib/exit_codes' 4 | 5 | TextMate.require_bundle 'lib/text_mate/core_ext/capture3' 6 | TextMate.require_bundle 'lib/text_mate/text_mate_session' 7 | TextMate.require_bundle 'lib/text_mate/dialog' 8 | TextMate.require_bundle 'lib/text_mate/document' 9 | TextMate.require_bundle 'lib/text_mate/process' 10 | -------------------------------------------------------------------------------- /Support/lib/dmate/dcd.rb: -------------------------------------------------------------------------------- 1 | require 'digest' 2 | require 'tmpdir' 3 | 4 | module DMate 5 | module Dcd 6 | private 7 | 8 | def session 9 | @session ||= TextMate::TextMateSession.current 10 | end 11 | 12 | def socket_path 13 | @socket_path ||= begin 14 | name = Digest::SHA1.hexdigest(session.env.project_directory) + '.sock' 15 | File.join(Dir.tmpdir, name) 16 | end 17 | end 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /spec/dgrammar/string_literal_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'string literal' do 4 | subject { code_to_file(code) } 5 | 6 | describe '" bar("' do 7 | let(:code) { '" bar("' } 8 | it { should_not be_parsed_as('meta.definition.method.d') } 9 | end 10 | 11 | describe 'writeln("foo bar()");' do 12 | let(:code) { 'writeln("foo bar()");' } 13 | it { should_not be_parsed_as('meta.definition.method.d') } 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /Support/lib/text_mate/document.rb: -------------------------------------------------------------------------------- 1 | module TextMate 2 | class Document 3 | attr_reader :env 4 | 5 | def initialize(env) 6 | @env = env 7 | end 8 | 9 | def lines 10 | @lines ||= $stdin.readlines 11 | end 12 | 13 | def content 14 | @content ||= lines.join('') 15 | end 16 | 17 | def uuid 18 | env.document_uuid 19 | end 20 | 21 | def filepath 22 | env.filepath 23 | end 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /spec/spec_helper.rb: -------------------------------------------------------------------------------- 1 | require 'tempfile' 2 | 3 | require 'pry' 4 | 5 | DMATE_ROOT = File.expand_path(File.dirname(__FILE__) + '/..') 6 | $LOAD_PATH << File.join(DMATE_ROOT, 'Support/lib') 7 | Dir[DMATE_ROOT + '/spec/support/**/*.rb'].each { |f| require f } 8 | 9 | RSpec.configure do |config| 10 | config.include DMate::Support::CodeToFile 11 | 12 | config.order = 'random' 13 | 14 | config.after :example do 15 | DMate::Support::TempFiles.clear 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /Support/lib/text_mate/process.rb: -------------------------------------------------------------------------------- 1 | module TextMate 2 | module Process 3 | module_function 4 | 5 | def detach(&block) 6 | pid = fork do 7 | STDOUT.reopen(open('/dev/null', 'w')) 8 | STDERR.reopen(open('/dev/null', 'w')) 9 | 10 | begin 11 | block.call 12 | rescue SystemExit => e 13 | # not sure why this is an exception!?! 14 | end 15 | end 16 | 17 | ::Process.detach(pid) 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /Support/lib/dmate/path.rb: -------------------------------------------------------------------------------- 1 | module DMate 2 | # Helper for manipulating the PATH environment variable 3 | module Path 4 | module_function 5 | 6 | # @return `true` if the given filename exists in the PATH environment 7 | # variable and is executable 8 | def executable_exists?(filename) 9 | ENV['PATH']. 10 | split(File::PATH_SEPARATOR). 11 | map { |path| File.join(path, filename) }. 12 | any? { |e| File.executable?(e) } 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /Support/lib/commands/ddoc_macros.rb: -------------------------------------------------------------------------------- 1 | module DdocMacros 2 | def ddoc_macros 3 | res_directory = File.join( 4 | TextMate::TextMateSession.current.env.bundle_support, 'res' 5 | ) 6 | 7 | ddoc_path = File.join(res_directory, 'ddoc_theme.ddoc') 8 | ddoc_css_path = File.join(res_directory, 'ddoc_theme.css') 9 | ddoc_macros = File.read(ddoc_path) 10 | 11 | <<-DDOC 12 | Macros: 13 | #{ddoc_macros.gsub('<%= ddoc_macros %>', 'file://' + ddoc_css_path)} 14 | DDOC 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /Snippets/return.tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | return $0; 7 | name 8 | return … 9 | scope 10 | source.d 11 | tabTrigger 12 | r 13 | uuid 14 | ECBA4CA0-275F-460E-85BE-F82FEA2E2B0B 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/debug.tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | debug 7 | { 8 | $0 9 | } 10 | name 11 | debug { … } 12 | scope 13 | source.d 14 | tabTrigger 15 | debug 16 | uuid 17 | ECBA4CA0-275F-460E-85BE-F82FEA2E2B09 18 | 19 | 20 | -------------------------------------------------------------------------------- /Snippets/if.tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | if (${1:condition}) 7 | { 8 | $0 9 | } 10 | name 11 | if … 12 | scope 13 | source.d 14 | tabTrigger 15 | if 16 | uuid 17 | C7D15778-04A6-4750-BED7-E0B2C9FAC817 18 | 19 | 20 | -------------------------------------------------------------------------------- /Snippets/enum.tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | enum ${1:name} 7 | { 8 | $0 9 | } 10 | name 11 | enum … { … } 12 | scope 13 | source.d 14 | tabTrigger 15 | en 16 | uuid 17 | C3A24E5E-A057-4A4A-BE65-5E7B92E0CB11 18 | 19 | 20 | -------------------------------------------------------------------------------- /Snippets/main.tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | void main() 7 | { 8 | ${1} 9 | } 10 | name 11 | void main() { … } 12 | scope 13 | source.d 14 | tabTrigger 15 | main 16 | uuid 17 | 644E0687-5DC6-49B4-838B-5CD72685225B 18 | 19 | 20 | -------------------------------------------------------------------------------- /Snippets/unittest.tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | unittest 7 | { 8 | $0 9 | } 10 | name 11 | unittest { … } 12 | scope 13 | source.d 14 | tabTrigger 15 | unit 16 | uuid 17 | ECBA4CA0-275F-460E-85BE-F82FEA2E2B07 18 | 19 | 20 | -------------------------------------------------------------------------------- /Snippets/while.tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | while (${1:condition}) 7 | { 8 | $0 9 | } 10 | name 11 | while (…) { … } 12 | scope 13 | source.d 14 | tabTrigger 15 | while 16 | uuid 17 | ECBA4CA0-275F-460E-85BE-F82FEA2E2B02 18 | 19 | 20 | -------------------------------------------------------------------------------- /Snippets/foreach.tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | foreach (${1:e} ; $0) 7 | { 8 | 9 | } 10 | name 11 | foreach (e ; …) { … } 12 | scope 13 | source.d 14 | tabTrigger 15 | fe 16 | uuid 17 | ECBA4CA0-275F-460E-85BE-F82FEA2E2B01 18 | 19 | 20 | -------------------------------------------------------------------------------- /Snippets/import.tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | import ${1:${TM_FILEPATH/.+\/([^\/]+)\/[^\/]+\.d$/\l$1/}.}; 7 | name 8 | import … 9 | scope 10 | source.d 11 | tabTrigger 12 | im 13 | uuid 14 | 897B3073-FF95-4D71-A581-206EF3FF59D6 15 | 16 | 17 | -------------------------------------------------------------------------------- /Snippets/version.tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | version(${1:Posix}) 7 | { 8 | $0 9 | } 10 | name 11 | version (ident) { … } 12 | scope 13 | source.d 14 | tabTrigger 15 | ver 16 | uuid 17 | ECBA4CA0-275F-460E-85BE-F82FEA2E2B0A 18 | 19 | 20 | -------------------------------------------------------------------------------- /Snippets/struct.tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | /** 7 | * $2 8 | */ 9 | struct ${1:name} 10 | { 11 | $3 12 | } 13 | name 14 | struct … { … } 15 | scope 16 | source.d 17 | tabTrigger 18 | st 19 | uuid 20 | C3A24E5E-A057-4A4A-BE65-5E7B92E0CB10 21 | 22 | 23 | -------------------------------------------------------------------------------- /Snippets/try finally.tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | try 7 | { 8 | $1 9 | } 10 | finally 11 | { 12 | $0 13 | } 14 | name 15 | try … finally 16 | scope 17 | source.d 18 | tabTrigger 19 | tf 20 | uuid 21 | E87DC9FC-8C4E-468B-BBA5-03D810BB71E0 22 | 23 | 24 | -------------------------------------------------------------------------------- /Snippets/if else.tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | if (${1:condition}) 7 | { 8 | $2 9 | } 10 | else 11 | { 12 | $0 13 | } 14 | name 15 | if … else 16 | scope 17 | source.d 18 | tabTrigger 19 | ife 20 | uuid 21 | C7D15778-04A6-4750-BED7-E0B2C9FAC818 22 | 23 | 24 | -------------------------------------------------------------------------------- /Snippets/debugm.tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | debug (${1:${TM_FILENAME/(.*?)(\..+)/$1/}}) 7 | { 8 | $0 9 | } 10 | name 11 | debug (module) { … } 12 | scope 13 | source.d 14 | tabTrigger 15 | debugm 16 | uuid 17 | ECBA4CA0-275F-460E-85BE-F82FEA2E2B08 18 | 19 | 20 | -------------------------------------------------------------------------------- /Snippets/foreach reverse.tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | foreach_reverse (${1:e} ; $0) 7 | { 8 | 9 | } 10 | name 11 | foreach_reverse (e ; …) { … } 12 | scope 13 | source.d 14 | tabTrigger 15 | fer 16 | uuid 17 | ECBA4CA0-275F-460E-85BE-F82FDA2E2B01 18 | 19 | 20 | -------------------------------------------------------------------------------- /Snippets/try catch.tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | try 7 | { 8 | $2 9 | } 10 | catch (${1:Exception} e) 11 | { 12 | $0 13 | } 14 | name 15 | try … catch 16 | scope 17 | source.d 18 | tabTrigger 19 | tc 20 | uuid 21 | E87DC9FC-8C4E-468B-BBA5-03D810BB71D9 22 | 23 | 24 | -------------------------------------------------------------------------------- /Snippets/main with args.tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | int main(string[] args) 7 | { 8 | $1 9 | return 0; 10 | } 11 | name 12 | int main(string[] args) { … } 13 | scope 14 | source.d 15 | tabTrigger 16 | maina 17 | uuid 18 | 644E0687-5DC6-49B4-838B-5CD72685225C 19 | 20 | 21 | -------------------------------------------------------------------------------- /Snippets/method.tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | /** 7 | * $2 8 | */ 9 | ${1:void} ${2:method}(${3:args}) 10 | { 11 | ${0} 12 | } 13 | name 14 | method … { … } 15 | scope 16 | source.d 17 | tabTrigger 18 | me 19 | uuid 20 | C3A24E5E-A057-4A4A-BE65-5E7B92E0CB0F 21 | 22 | 23 | -------------------------------------------------------------------------------- /Snippets/class.tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | class ${1:${TM_FILENAME/(.*?)(\..+)/$1/}} 7 | { 8 | this($2) 9 | { 10 | $0 11 | } 12 | } 13 | 14 | name 15 | class … { … } 16 | scope 17 | source.d 18 | tabTrigger 19 | cla 20 | uuid 21 | E3D192EB-3C23-4B9A-9364-A301417F0434 22 | 23 | 24 | -------------------------------------------------------------------------------- /Support/lib/dmate/dcd_client.rb: -------------------------------------------------------------------------------- 1 | TextMate.require_bundle 'lib/dmate/dcd' 2 | TextMate.require_bundle 'lib/dmate/path' 3 | 4 | module DMate 5 | class DcdClient 6 | include Dcd 7 | 8 | def exists? 9 | @exists ||= begin 10 | session.env.dcd_client || Path.executable_exists?('dcd-client') 11 | end 12 | end 13 | 14 | def execute(*args) 15 | args = [executable, '--socketFile', socket_path] + args 16 | Open3.capture3(*args) 17 | end 18 | 19 | private 20 | 21 | def executable 22 | @dcd_client ||= session.env.dcd_client || 'dcd-client' 23 | end 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /Support/bin/test_script.rb: -------------------------------------------------------------------------------- 1 | require_relative 'script_helper' 2 | 3 | class TestScript 4 | include ScriptHelper 5 | 6 | def run_shell_path 7 | @run_path ||= File.join(TextMate.project_path, Compiler.shell.test) 8 | end 9 | 10 | def run_single_file 11 | compiler = Compiler.dmd 12 | 13 | [ 14 | Compiler.rdmd.executable, 15 | '-vcolumns', 16 | '-unittest', 17 | "--compiler=#{compiler.executable}", 18 | TextMate.env.filepath, 19 | compiler.version_options 20 | ] 21 | end 22 | 23 | def dub_command 24 | Compiler.dub.test 25 | end 26 | end 27 | 28 | TestScript.new.run 29 | -------------------------------------------------------------------------------- /Snippets/try catch finally.tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | try 7 | { 8 | $2 9 | } 10 | catch (${1:Exception} e) 11 | { 12 | $3 13 | } 14 | finally 15 | { 16 | $0 17 | } 18 | name 19 | try … catch … finally 20 | scope 21 | source.d 22 | tabTrigger 23 | tcf 24 | uuid 25 | E87DC9FC-8C4E-468B-BBA5-03D810BB71D8 26 | 27 | 28 | -------------------------------------------------------------------------------- /Templates/Program.tmTemplate/info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | command 6 | if [[ ! -f "$TM_NEW_FILE" ]]; then 7 | TM_YEAR=`date +%Y` \ 8 | TM_DATE=`date +%Y-%m-%d` \ 9 | perl -pe 's/\$\{([^}]*)\}/$ENV{$1}/g' \ 10 | < template.d > "$TM_NEW_FILE" 11 | fi 12 | extension 13 | d 14 | name 15 | Program 16 | uuid 17 | 9498824E-F545-4567-8995-2914937A7AEE 18 | 19 | 20 | -------------------------------------------------------------------------------- /Snippets/Continue Block Comment.tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | ${TM_CURRENT_LINE/(.*\*\/$)|.*?(\/\*(?!.*\*\/)).*|.*/(?1: 7 | : 8 | (?2: )* )/} 9 | keyEquivalent 10 |  11 | name 12 | Continue Block Comment 13 | scope 14 | source.d comment.block, source.d comment.block.documentation.javadoc 15 | uuid 16 | 3B85C6F6-769C-4FF6-B70B-327BBEA574D7 17 | 18 | 19 | -------------------------------------------------------------------------------- /Preferences/Folding.tmPreferences: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | name 6 | Folding 7 | scope 8 | source.d 9 | settings 10 | 11 | foldingStartMarker 12 | (?x)/\*\*(?!\*)|^(?![^{]*?//|[^{]*?/\*(?!.*?\*/.*?\{)).*?\{\s*($|//|/\*(?!.*?\*/.*\S)) 13 | foldingStopMarker 14 | (?<!\*)\*\*/|^\s*\} 15 | 16 | uuid 17 | B1976C92-6C07-491F-BC33-5ADA6F411DC8 18 | 19 | 20 | -------------------------------------------------------------------------------- /Support/lib/text_mate/core_ext/capture3.rb: -------------------------------------------------------------------------------- 1 | require 'open3' 2 | 3 | unless Open3.respond_to?(:capture3) 4 | module Open3 5 | def self.capture3(*cmd) 6 | if cmd.last.is_a?(Hash) 7 | options = cmd.last 8 | args = cmd[0 ... -1] 9 | else 10 | options = {} 11 | args = cmd 12 | end 13 | 14 | Open3.popen3(*args) do |i, o, e, t| 15 | out_reader = Thread.new { o.read } 16 | err_reader = Thread.new { e.read } 17 | 18 | begin 19 | i.write options[:stdin_data] 20 | rescue Errno::EPIPE 21 | end 22 | 23 | i.close 24 | [out_reader.value, err_reader.value] 25 | end 26 | end 27 | end 28 | end 29 | -------------------------------------------------------------------------------- /Preferences/Symbol List-Method-Constructor.tmPreferences: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | name 6 | Symbol List: Method / Constructor 7 | scope 8 | source.d meta.definition.method, source.d meta.definition.constructor, source.d meta.definition.destructor 9 | settings 10 | 11 | showInSymbolList 12 | 0 13 | symbolTransformation 14 | 15 | s/^\s*([^\)]+)/ $1/; # pad 16 | 17 | uuid 18 | A6BCFD4A-B6CC-49C6-93F9-FEB979CC679E 19 | 20 | 21 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | coderay (1.1.1) 5 | diff-lcs (1.2.5) 6 | method_source (0.8.2) 7 | pry (0.10.3) 8 | coderay (~> 1.1.0) 9 | method_source (~> 0.8.1) 10 | slop (~> 3.4) 11 | rspec (3.3.0) 12 | rspec-core (~> 3.3.0) 13 | rspec-expectations (~> 3.3.0) 14 | rspec-mocks (~> 3.3.0) 15 | rspec-core (3.3.1) 16 | rspec-support (~> 3.3.0) 17 | rspec-expectations (3.3.0) 18 | diff-lcs (>= 1.2.0, < 2.0) 19 | rspec-support (~> 3.3.0) 20 | rspec-mocks (3.3.0) 21 | diff-lcs (>= 1.2.0, < 2.0) 22 | rspec-support (~> 3.3.0) 23 | rspec-support (3.3.0) 24 | slop (3.6.0) 25 | 26 | PLATFORMS 27 | ruby 28 | 29 | DEPENDENCIES 30 | pry 31 | rspec 32 | 33 | BUNDLED WITH 34 | 1.10.6 35 | -------------------------------------------------------------------------------- /Support/lib/text_mate/text_mate.rb: -------------------------------------------------------------------------------- 1 | # 2 | module TextMate 3 | # 4 | module Env 5 | module_function 6 | 7 | def [](name) 8 | name = name.to_s 9 | name = "TM_#{name}" unless name.start_with?('TM_') 10 | ENV[name] 11 | end 12 | 13 | def method_missing(name) 14 | self[name.to_s.upcase] 15 | end 16 | 17 | def dialog 18 | ENV['DIALOG'] 19 | end 20 | end 21 | 22 | module_function 23 | 24 | def env 25 | Env 26 | end 27 | 28 | def require_bundle(path) 29 | require File.join(env.bundle_support, path) 30 | end 31 | 32 | def require_support(path) 33 | require File.join(env.support_path, path) 34 | end 35 | 36 | def project_path 37 | env.project_directory 38 | end 39 | 40 | def project? 41 | !project_path.nil? 42 | end 43 | end 44 | -------------------------------------------------------------------------------- /Support/lib/dmate/dcd_server.rb: -------------------------------------------------------------------------------- 1 | TextMate.require_bundle 'lib/dmate/dcd' 2 | 3 | module DMate 4 | class DcdServer 5 | include Dcd 6 | 7 | def initialize(client) 8 | @client = client 9 | end 10 | 11 | def running? 12 | @running ||= begin 13 | _, _, status = client.execute('--status') 14 | status.success? 15 | end 16 | end 17 | 18 | def exists? 19 | @exists ||= begin 20 | session.env.dcd_server || Path.executable_exists?('dcd-server') 21 | end 22 | end 23 | 24 | def start(import_paths = []) 25 | cmd = [executable, '--socketFile', socket_path] + 26 | import_paths.flat_map { |e| ['-I', e] } 27 | TextMate::Process.detach { exec(*cmd) } 28 | end 29 | 30 | private 31 | 32 | attr_reader :client 33 | 34 | def executable 35 | @dcd_server ||= session.env.dcd_server || 'dcd-server' 36 | end 37 | end 38 | end 39 | -------------------------------------------------------------------------------- /Templates/D Class.tmTemplate/info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | command 6 | #!/usr/bin/env ruby18 -wKU 7 | 8 | f = open(ENV["TM_NEW_FILE"], 'w') 9 | template = open("template.d").read 10 | 11 | ENV["TM_YEAR"] = `date +%Y`.chomp 12 | ENV["TM_DATE"] = `date +%Y-%m-%d`.chomp 13 | 14 | if ENV["TM_SOFT_TABS"] == "YES" 15 | tab_size = ENV["TM_TAB_SIZE"].to_i 16 | tab_size = tab_size ? tab_size : 4 17 | template = template.gsub(/\t/, " "*tab_size) 18 | end 19 | 20 | template = template.gsub(/[$]\{([^}]+)\}/){|match| "#{ENV[$1]}" } 21 | f.write template 22 | f.close 23 | 24 | extension 25 | d 26 | name 27 | Class 28 | uuid 29 | 1C52B2CF-6202-4D2B-ABF4-6838AD4D8865 30 | 31 | 32 | -------------------------------------------------------------------------------- /Support/lib/commands/start_dcd_server.rb: -------------------------------------------------------------------------------- 1 | TextMate.require_bundle 'lib/dmate/compiler' 2 | TextMate.require_bundle 'lib/dmate/dub_project' 3 | TextMate.require_bundle 'lib/dmate/dcd_server' 4 | TextMate.require_bundle 'lib/commands/dcd_command' 5 | 6 | class StartDcdServer < DcdCommand 7 | include DMate 8 | 9 | attr_reader :dcd_server 10 | attr_reader :dub_project 11 | 12 | def initialize 13 | super 14 | @dub_project = DubProject.new 15 | @dcd_server = DcdServer.new(dcd_client) 16 | end 17 | 18 | def run 19 | return unless dcd_server.exists? 20 | return if dcd_server.running? 21 | dcd_server.start(import_paths) 22 | end 23 | 24 | def import_paths 25 | @import_paths ||= default_import_paths + dub_import_paths 26 | end 27 | 28 | def default_import_paths 29 | @default_import_paths ||= Compiler.dmd.import_paths 30 | end 31 | 32 | def dub_import_paths 33 | @dub_import_paths ||= dub_project.exists? ? dub_project.import_paths : [] 34 | end 35 | end 36 | -------------------------------------------------------------------------------- /spec/support/matchers/be_parsed_as.rb: -------------------------------------------------------------------------------- 1 | RSpec::Matchers.define :be_parsed_as do |scope| 2 | match do |temp_file| 3 | lines = gtm(temp_file.path).split("\n") 4 | filterd = lines.reject { |e| lines_to_filter.include?(e) } 5 | filterd.first =~ /#{Regexp.escape(scope)}/ 6 | end 7 | 8 | failure_message do |temp_file| 9 | "expected '#{code(temp_file)}' to be parsed as scope #{scope}" 10 | end 11 | 12 | failure_message_when_negated do |temp_file| 13 | "expected '#{code(temp_file)}' not to be parsed as scope #{scope}" 14 | end 15 | 16 | private 17 | 18 | def gtm(path) 19 | `gtm < "#{path}" Syntaxes/D.tmLanguage 2>&1` 20 | end 21 | 22 | def code(temp_file) 23 | File.read(temp_file.path) 24 | end 25 | 26 | def lines_to_filter 27 | [ 28 | 'grammar_for_scope: unable to find a grammar for ‘text.html.javadoc’', 29 | '*** couldn’t resolve text.html.javadoc', 30 | '*** couldn’t resolve #regular_expressions', 31 | 'failed to resolve text.html.javadoc' 32 | ].freeze 33 | end 34 | end 35 | -------------------------------------------------------------------------------- /Preferences/Indentation Rules.tmPreferences: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | name 6 | Indentation Rules 7 | scope 8 | source.d 9 | settings 10 | 11 | decreaseIndentPattern 12 | (?x) 13 | ^ (.*\*/)? \s* \} ([^}{"']* \{)?[;\s]* (//.*|/\*.*\*/\s*)? $ | 14 | ^ \s* (public|private|protected): \s* $ 15 | 16 | increaseIndentPattern 17 | (?x) 18 | ^ .* \{ [^}"']* $ | 19 | ^ \s* (public|private|protected): \s* $ | 20 | ^ \s* \{ \} $ 21 | 22 | indentNextLinePattern 23 | (?x) 24 | ^ (?!(.*[};:])? \s* (//|/\*.*\*/\s*$)) 25 | .* [^\s;:{}] \s* $ # indent next if this one isn’t terminated with ;, :, {, or } 26 | 27 | 28 | uuid 29 | B48E6A36-3B18-4E76-BE32-6A623AF53D67 30 | 31 | 32 | -------------------------------------------------------------------------------- /Commands/Stop Completion Server.tmCommand: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | #!/usr/bin/env ruby20 9 | 10 | require ENV['TM_BUNDLE_SUPPORT'] + '/lib/text_mate' 11 | TextMate.require_bundle 'lib/commands/stop_dcd_server_command' 12 | 13 | StopDcdServerCommand.new.run 14 | 15 | input 16 | none 17 | inputFormat 18 | text 19 | name 20 | Stop Completion Server 21 | outputCaret 22 | afterOutput 23 | outputFormat 24 | text 25 | outputLocation 26 | discard 27 | scope 28 | source.d 29 | uuid 30 | 6E83E8EB-F766-4C7A-A395-38E79074D6B8 31 | version 32 | 2 33 | 34 | 35 | -------------------------------------------------------------------------------- /Commands/Complete.tmCommand: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | #!/usr/bin/env ruby18 -wKU 9 | 10 | require ENV['TM_BUNDLE_SUPPORT'] + '/lib/text_mate' 11 | TextMate.require_bundle 'lib/commands/complete_command' 12 | 13 | CompleteCommand.new.run 14 | 15 | input 16 | document 17 | inputFormat 18 | text 19 | keyEquivalent 20 | ~ 21 | name 22 | Complete 23 | outputCaret 24 | afterOutput 25 | outputFormat 26 | text 27 | outputLocation 28 | atCaret 29 | scope 30 | source.d 31 | uuid 32 | DE80CCA9-6CD2-45DB-BBD0-534FF8B24D82 33 | version 34 | 2 35 | 36 | 37 | -------------------------------------------------------------------------------- /Commands/Documentation.tmCommand: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | #!/usr/bin/env ruby20 9 | 10 | require ENV['TM_BUNDLE_SUPPORT'] + '/lib/text_mate' 11 | TextMate.require_bundle 'lib/commands/docummentation_command' 12 | 13 | DocummentationCommand.new.run 14 | 15 | input 16 | document 17 | inputFormat 18 | text 19 | keyEquivalent 20 | ^h 21 | name 22 | Documentation for Word 23 | outputCaret 24 | afterOutput 25 | outputFormat 26 | html 27 | outputLocation 28 | newWindow 29 | scope 30 | source.d 31 | uuid 32 | 8877DBE4-46AA-42D4-A0BB-7E0D92EC6AC4 33 | version 34 | 2 35 | 36 | 37 | -------------------------------------------------------------------------------- /Commands/Help.tmCommand: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | #!/bin/bash 9 | [[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] && . "${TM_SUPPORT_PATH}/lib/bash_init.sh" 10 | 11 | . "$TM_SUPPORT_PATH/lib/webpreview.sh" 12 | html_header "D Bundle Help" "D" 13 | "$TM_SUPPORT_PATH/lib/markdown_to_help.rb" "$TM_BUNDLE_SUPPORT/help.md" 14 | html_footer 15 | 16 | input 17 | none 18 | inputFormat 19 | text 20 | name 21 | Help 22 | outputCaret 23 | afterOutput 24 | outputFormat 25 | html 26 | outputLocation 27 | newWindow 28 | scope 29 | source.d 30 | uuid 31 | C46D70B2-E299-42C3-9D78-101A9D4B7266 32 | version 33 | 2 34 | 35 | 36 | -------------------------------------------------------------------------------- /Commands/Run.tmCommand: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | autoScrollOutput 6 | 7 | beforeRunningCommand 8 | nop 9 | command 10 | #!/usr/bin/env ruby20 11 | 12 | require ENV['TM_BUNDLE_SUPPORT'] + '/lib/text_mate' 13 | TextMate.require_bundle 'bin/run_script' 14 | input 15 | document 16 | inputFormat 17 | text 18 | keyEquivalent 19 | @r 20 | name 21 | Run 22 | outputCaret 23 | afterOutput 24 | outputFormat 25 | html 26 | outputLocation 27 | newWindow 28 | scope 29 | source.d 30 | semanticClass 31 | process.run.script.d 32 | uuid 33 | 108A335C-282D-459B-AD2C-72AB9B30BFB2 34 | version 35 | 2 36 | 37 | 38 | -------------------------------------------------------------------------------- /Commands/Test.tmCommand: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | autoScrollOutput 6 | 7 | beforeRunningCommand 8 | nop 9 | command 10 | #!/usr/bin/env ruby20 11 | 12 | require ENV['TM_BUNDLE_SUPPORT'] + '/lib/text_mate' 13 | TextMate.require_bundle 'bin/test_script' 14 | input 15 | document 16 | inputFormat 17 | text 18 | keyEquivalent 19 | @R 20 | name 21 | Test 22 | outputCaret 23 | afterOutput 24 | outputFormat 25 | html 26 | outputLocation 27 | newWindow 28 | scope 29 | source.d 30 | semanticClass 31 | process.run.script.d 32 | uuid 33 | 152B9721-1EAB-427F-BD12-450F3AF27237 34 | version 35 | 2 36 | 37 | 38 | -------------------------------------------------------------------------------- /Commands/Build.tmCommand: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | autoScrollOutput 6 | 7 | beforeRunningCommand 8 | nop 9 | command 10 | #!/usr/bin/env ruby20 11 | 12 | require ENV['TM_BUNDLE_SUPPORT'] + '/lib/text_mate' 13 | TextMate.require_bundle 'bin/build_script' 14 | input 15 | document 16 | inputFormat 17 | text 18 | keyEquivalent 19 | @b 20 | name 21 | Build 22 | outputCaret 23 | afterOutput 24 | outputFormat 25 | html 26 | outputLocation 27 | newWindow 28 | scope 29 | source.d 30 | semanticClass 31 | process.build.script.d 32 | uuid 33 | AA8221FD-066E-4A9D-A23D-701BDF5E0272 34 | version 35 | 2 36 | 37 | 38 | -------------------------------------------------------------------------------- /Support/lib/text_mate/text_mate_session.rb: -------------------------------------------------------------------------------- 1 | module TextMate 2 | class TextMateSession 3 | def self.current 4 | @session ||= TextMateSession.new 5 | end 6 | 7 | def document 8 | @document ||= Document.new(env) 9 | end 10 | 11 | def env 12 | Env 13 | end 14 | 15 | def dialog 16 | @dialog ||= Dialog.new(env) 17 | end 18 | 19 | def line 20 | env.line_number.to_i 21 | end 22 | 23 | def column 24 | env.line_index.to_i 25 | end 26 | 27 | # Returns the position of the cursor in bytes 28 | def cursor 29 | @cursor ||= document.lines.first(line - 1).join('').bytes.to_a.length + column 30 | end 31 | 32 | # Returns the line and column for the given cursor in bytes and content 33 | def to_column_line(cursor, content) 34 | return [1, 1] if cursor == 0 35 | 36 | content_before_cursor = content[0 .. cursor] 37 | lines = content_before_cursor.split("\n") 38 | line = lines.length 39 | column = lines.last.bytes.length 40 | [line, column] 41 | end 42 | 43 | def bundle_support_path 44 | env.bundle_support 45 | end 46 | end 47 | end 48 | -------------------------------------------------------------------------------- /Commands/Go To Definition.tmCommand: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | #!/usr/bin/env ruby20 9 | 10 | require ENV['TM_BUNDLE_SUPPORT'] + '/lib/text_mate' 11 | TextMate.require_bundle 'lib/commands/go_to_definition_command' 12 | 13 | GoToDefinitionCommand.new.run 14 | 15 | input 16 | document 17 | inputFormat 18 | text 19 | name 20 | Go to Definition 21 | outputCaret 22 | afterOutput 23 | outputFormat 24 | text 25 | outputLocation 26 | atCaret 27 | scope 28 | source.d dyn.modifier.command 29 | semanticClass 30 | callback.single-click, callback.mouse-click 31 | uuid 32 | 99AFC116-8E25-4976-A424-34DC6F03DC53 33 | version 34 | 2 35 | 36 | 37 | -------------------------------------------------------------------------------- /Commands/Run Single File.tmCommand: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | autoScrollOutput 6 | 7 | beforeRunningCommand 8 | nop 9 | command 10 | #!/usr/bin/env ruby20 11 | 12 | require ENV['TM_BUNDLE_SUPPORT'] + '/lib/text_mate' 13 | TextMate.require_bundle 'bin/run_single_script' 14 | input 15 | document 16 | inputFormat 17 | text 18 | keyEquivalent 19 | ^@R 20 | name 21 | Run Single File 22 | outputCaret 23 | afterOutput 24 | outputFormat 25 | html 26 | outputLocation 27 | newWindow 28 | scope 29 | source.d 30 | semanticClass 31 | process.run.script.d 32 | uuid 33 | 2E0857A0-2E1D-4ABB-8E00-BDE8A86ACD36 34 | version 35 | 2 36 | 37 | 38 | -------------------------------------------------------------------------------- /README.mdown: -------------------------------------------------------------------------------- 1 | # Installation 2 | 3 | You can install this bundle in TextMate by opening the preferences and going to the bundles tab. After installation it will be automatically updated for you. 4 | 5 | # General 6 | 7 | * [Bundle Styleguide](http://kb.textmate.org/bundle_styleguide) — _before you make changes_ 8 | * [Commit Styleguide](http://kb.textmate.org/commit_styleguide) — _before you send a pull request_ 9 | * [Writing Bug Reports](http://kb.textmate.org/writing_bug_reports) — _before you report an issue_ 10 | 11 | # License 12 | 13 | If not otherwise specified (see below), files in this repository fall under the following license: 14 | 15 | Permission to copy, use, modify, sell and distribute this 16 | software is granted. This software is provided "as is" without 17 | express or implied warranty, and with no claim as to its 18 | suitability for any purpose. 19 | 20 | An exception is made for files in readable text which contain their own license information, or files where an accompanying file exists (in the same directory) with a “-license” suffix added to the base-name name of the original file, and an extension of txt, html, or similar. For example “tidy” is accompanied by “tidy-license.txt”. -------------------------------------------------------------------------------- /Commands/Start Completion Server.tmCommand: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | #!/usr/bin/env ruby20 9 | 10 | require ENV['TM_BUNDLE_SUPPORT'] + '/lib/text_mate/process' 11 | 12 | # We're using `TextMate.detach` to run this in the background to avoid blocking 13 | # the UI when running this command. 14 | TextMate::Process.detach do 15 | require ENV['TM_BUNDLE_SUPPORT'] + '/lib/text_mate' 16 | TextMate.require_bundle 'lib/commands/start_dcd_server' 17 | 18 | StartDcdServer.new.run 19 | end 20 | 21 | input 22 | none 23 | inputFormat 24 | text 25 | name 26 | Start Completion Server 27 | outputCaret 28 | afterOutput 29 | outputFormat 30 | text 31 | outputLocation 32 | discard 33 | scope 34 | source.d 35 | semanticClass 36 | callback.document.did-open 37 | uuid 38 | 6B9D73C8-8E6B-45FE-A0A0-25B528EDE5E1 39 | version 40 | 2 41 | 42 | 43 | -------------------------------------------------------------------------------- /Commands/New method.tmCommand: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | #!/usr/bin/env ruby18 -wKU 9 | 10 | require "#{ENV['TM_SUPPORT_PATH']}/lib/exit_codes" 11 | require "#{ENV['TM_SUPPORT_PATH']}/lib/escape" 12 | 13 | method_name = ENV["TM_SELECTED_TEXT"] || ENV["TM_CURRENT_WORD"] or 14 | TextMate.exit_show_tool_tip( 15 | "Please type the new function's name or use the me⇥ snippet." 16 | ) 17 | 18 | print <<END_SNIPPET 19 | \${1:void} #{e_sn method_name}(\${2:args}) 20 | { 21 | \$0 22 | } 23 | END_SNIPPET 24 | fallbackInput 25 | word 26 | input 27 | selection 28 | inputFormat 29 | text 30 | keyEquivalent 31 | $ 32 | name 33 | New Method 34 | outputCaret 35 | afterOutput 36 | outputFormat 37 | snippet 38 | outputLocation 39 | replaceInput 40 | scope 41 | source.d 42 | uuid 43 | 7EB57A38-809C-464D-8025-CE990B100488 44 | version 45 | 2 46 | 47 | 48 | -------------------------------------------------------------------------------- /Support/lib/commands/dcd_command.rb: -------------------------------------------------------------------------------- 1 | TextMate.require_bundle 'lib/dmate/dcd_client' 2 | 3 | class DcdCommand 4 | include DMate 5 | 6 | attr_reader :session 7 | attr_reader :dcd_client 8 | 9 | def initialize 10 | @session = TextMate::TextMateSession.current 11 | @dcd_client = DcdClient.new 12 | end 13 | 14 | def dcd_args 15 | raise NotImplementedError, "Abstract method 'dcd_args' not implemented" 16 | end 17 | 18 | def run 19 | enforce_dcd_client 20 | enforce_current_word 21 | # this elaborate way to call `capture3` is to make it compatible with 22 | # both Ruby 1.8 and later. In Ruby 1.8 it's not possible to have any 23 | # arguments after a splat (*). 24 | args = dcd_args + [{ :stdin_data => session.document.content }] 25 | stdout, stderr = dcd_client.execute(*args) 26 | enforce(stderr) 27 | stdout 28 | end 29 | 30 | private 31 | 32 | def enforce(error_message) 33 | TextMate.exit_show_tool_tip(error_message) unless error_message.empty? 34 | end 35 | 36 | def enforce_dcd_client 37 | unless dcd_client.exists? 38 | TextMate.exit_show_tool_tip('Failed to find the DCD client') 39 | end 40 | end 41 | 42 | def enforce_current_word 43 | if session.env.current_word.to_s.empty? 44 | TextMate.exit_show_tool_tip('No symbol selected') 45 | end 46 | end 47 | 48 | def exit_no_result 49 | current_word = session.env.current_word 50 | message = "No matching definition found for '#{current_word}'" 51 | TextMate.exit_show_tool_tip(message) 52 | end 53 | end 54 | -------------------------------------------------------------------------------- /Preferences/Comments.tmPreferences: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | name 6 | Comments 7 | scope 8 | source.d 9 | settings 10 | 11 | shellVariables 12 | 13 | 14 | name 15 | TM_COMMENT_START 16 | value 17 | // 18 | 19 | 20 | name 21 | TM_COMMENT_START_2 22 | value 23 | /* 24 | 25 | 26 | name 27 | TM_COMMENT_END_2 28 | value 29 | */ 30 | 31 | 32 | name 33 | TM_COMMENT_MODE_2 34 | value 35 | block 36 | 37 | 38 | name 39 | TM_COMMENT_START_3 40 | value 41 | /+ 42 | 43 | 44 | name 45 | TM_COMMENT_END_3 46 | value 47 | +/ 48 | 49 | 50 | name 51 | TM_COMMENT_MODE_3 52 | value 53 | block 54 | 55 | 56 | 57 | uuid 58 | 2ED4399F-9004-4192-AEC1-E4BAD81715B3 59 | 60 | 61 | -------------------------------------------------------------------------------- /Support/lib/dmate/dub_project.rb: -------------------------------------------------------------------------------- 1 | TextMate.require_bundle 'lib/dmate/compiler' 2 | TextMate.require_bundle 'lib/dmate/dub_project' 3 | 4 | module DMate 5 | class DubProject 6 | def exists? 7 | @exists ||= !dub_configuration_path.nil? 8 | end 9 | 10 | def import_paths 11 | @import_paths ||= begin 12 | args = [ 13 | dub, 14 | 'describe', 15 | '--import-paths', 16 | '--compiler', Compiler.dmd.executable, 17 | '--root', session.env.project_directory 18 | ] 19 | 20 | if has_dub? 21 | stdout, _, status = Open3.capture3(*args) 22 | status.success? ? extract_import_paths(stdout) : [] 23 | else 24 | [] 25 | end 26 | end 27 | end 28 | 29 | private 30 | 31 | def dub_configuration_path 32 | @dub_configuration_path ||= 33 | possible_dub_configuration_paths.find { |path| File.exist?(path) } 34 | end 35 | 36 | def possible_dub_configuration_paths 37 | @possible_dub_configuration_paths ||= [ 38 | File.join(session.env.project_directory, "dub.sdl"), 39 | File.join(session.env.project_directory, "dub.json"), 40 | ] 41 | end 42 | 43 | def has_dub? 44 | @has_dub ||= session.env.dub || Path.executable_exists?('dub') 45 | end 46 | 47 | def dub 48 | @dub ||= session.env.dub || 'dub' 49 | end 50 | 51 | def session 52 | @session ||= TextMate::TextMateSession.current 53 | end 54 | 55 | def extract_import_paths(stdout) 56 | stdout.split("\n").select { |line| line.start_with?('/') } 57 | end 58 | end 59 | end 60 | -------------------------------------------------------------------------------- /Support/lib/commands/go_to_definition_command.rb: -------------------------------------------------------------------------------- 1 | TextMate.require_bundle 'lib/commands/dcd_command' 2 | 3 | class GoToDefinitionCommand < DcdCommand 4 | def initialize 5 | super 6 | TextMate::TextMateSession.current.document.content 7 | end 8 | 9 | def dcd_args 10 | ['--symbolLocation', '-c', session.cursor.to_s] 11 | end 12 | 13 | def run 14 | result = super 15 | parse_result(result) 16 | end 17 | 18 | private 19 | 20 | def parse_result(result) 21 | lines = result.split("\n") 22 | 23 | lines.each do |line| 24 | if line == 'Not found' && lines.length == 1 25 | handle_no_result 26 | else 27 | handle_definition(line) 28 | end 29 | end 30 | end 31 | 32 | def handle_no_result 33 | current_word = session.env.current_word 34 | message = "No matching definition found for '#{current_word}'" 35 | TextMate.exit_show_tool_tip(message) 36 | end 37 | 38 | def handle_definition(line) 39 | path, cursor = line.split("\t") 40 | cursor = cursor.chomp.to_i 41 | 42 | if path == 'stdin' 43 | line, column = to_column_line(cursor) 44 | go_to_uuid(session.document.uuid, line, column) 45 | else 46 | line, column = to_column_line(cursor, path) 47 | go_to(path, line, column) 48 | end 49 | end 50 | 51 | def go_to_uuid(uuid, line, column) 52 | `#{session.env.mate} -u #{uuid} -l #{line}:#{column}` 53 | end 54 | 55 | def go_to(path, line, column) 56 | `#{session.env.mate} #{path} -l #{line}:#{column}` 57 | end 58 | 59 | # Returns the line and column for the given cursor in bytes 60 | def to_column_line(cursor, path = nil) 61 | content = path ? File.read(path) : session.document.lines.join('') 62 | session.to_column_line(cursor, content) 63 | end 64 | end 65 | -------------------------------------------------------------------------------- /Support/lib/commands/docummentation_command.rb: -------------------------------------------------------------------------------- 1 | require 'English' 2 | require 'tempfile' 3 | 4 | TextMate.require_bundle 'lib/commands/dcd_command' 5 | TextMate.require_bundle 'lib/commands/ddoc_macros' 6 | TextMate.require_bundle 'lib/dmate/compiler' 7 | 8 | class DocummentationCommand < DcdCommand 9 | include DdocMacros 10 | include DMate 11 | 12 | def initialize 13 | super 14 | TextMate::TextMateSession.current.document.content 15 | end 16 | 17 | def dcd_args 18 | ['--doc', '-c', session.cursor.to_s] 19 | end 20 | 21 | def run 22 | result = super 23 | parse_result(result) 24 | end 25 | 26 | private 27 | 28 | def parse_result(result) 29 | lines = result.split("\n") 30 | exit_no_result if lines.empty? 31 | lines.each { |line| handle_doc_line(line) } 32 | end 33 | 34 | def handle_doc_line(documentation) 35 | documentation.gsub!('\n', "\n") 36 | documentation = append_template(documentation) 37 | puts generate_ddoc(documentation) 38 | end 39 | 40 | def append_template(documentation) 41 | ddoc_components = [ 42 | "module foo;\n/**", 43 | documentation, 44 | ddoc_macros, 45 | "*/\nvoid foo();" 46 | ] 47 | 48 | ddoc_components.join("\n") 49 | end 50 | 51 | def generate_ddoc(documentation) 52 | Dir.mktmpdir do |dir| 53 | ddoc_file, output_file = build_ddoc_filenames(dir) 54 | File.write(ddoc_file, documentation) 55 | execute_ddoc_command(dir, ddoc_file, output_file) 56 | File.read(output_file) 57 | end 58 | end 59 | 60 | def execute_ddoc_command(dir, ddoc_file, output_file) 61 | result = Dir.chdir(dir) do 62 | `#{Compiler.dmd} -D -c -o- #{ddoc_file} -of#{output_file} 2>&1` 63 | end 64 | 65 | enforce(result) 66 | end 67 | 68 | def build_ddoc_filenames(dir) 69 | uuid = session.document.uuid 70 | filename = File.join(dir, uuid) 71 | ddoc_file = filename + '.d' 72 | output_file = filename + '.html' 73 | [ddoc_file, output_file] 74 | end 75 | end 76 | -------------------------------------------------------------------------------- /Support/bin/script_helper.rb: -------------------------------------------------------------------------------- 1 | $LOAD_PATH << File.join(ENV['TM_BUNDLE_SUPPORT'], 'lib') 2 | 3 | require 'pathname' 4 | 5 | require 'text_mate/text_mate' 6 | 7 | TextMate.require_support 'lib/tm/executor' 8 | TextMate.require_support 'lib/tm/save_current_document' 9 | 10 | require 'dmate/compiler' 11 | require 'dmate/error_handler' 12 | 13 | module ScriptHelper 14 | include DMate 15 | 16 | def initialize 17 | @error_handler = ErrorHandler.new 18 | end 19 | 20 | def run 21 | restore_working_directory do 22 | TextMate.save_current_document 23 | args = TextMate.project? ? run_project : run_single_file 24 | run_command(args) 25 | end 26 | end 27 | 28 | private 29 | 30 | attr_reader :error_handler 31 | 32 | def run_single_file 33 | rdmd = Compiler.rdmd 34 | compiler = Compiler.dmd 35 | [rdmd.executable, '-vcolumns', "--compiler=#{compiler.executable}", TextMate.env.filepath, 36 | compiler.version_options] 37 | end 38 | 39 | def run_project 40 | if run_shell? 41 | ['bash', run_shell_path] 42 | elsif dub? 43 | dub = Compiler.dub 44 | compiler = Compiler.dmd 45 | [dub.executable, dub_command, "--compiler=#{compiler.executable}", dub.version_options] 46 | else 47 | run_single_file 48 | end 49 | end 50 | 51 | def run_command(args) 52 | TextMate::Executor.run(*args) do |line, type| 53 | error_handler.handle(line, type) 54 | end 55 | end 56 | 57 | def run_shell_path 58 | raise 'Abstract method "run_shell_path" not implemented' 59 | end 60 | 61 | def restore_working_directory(&block) 62 | current_dir = Dir.pwd 63 | block.call 64 | ensure 65 | Dir.chdir current_dir 66 | end 67 | 68 | def dub? 69 | json_path = File.join(TextMate.project_path, 'dub.json') 70 | sdl_path = File.join(TextMate.project_path, 'dub.sdl') 71 | File.exist?(json_path) || File.exist?(sdl_path) 72 | end 73 | 74 | def run_shell? 75 | File.exist?(run_shell_path) 76 | end 77 | 78 | def dub_command 79 | raise 'Abstract method "dub_command" not implemented' 80 | end 81 | end 82 | -------------------------------------------------------------------------------- /Tests/test.d: -------------------------------------------------------------------------------- 1 | /** 2 | * @author Rasmus Andersson 3 | * @copyright Copyright (c) 2008 Spotify Technology S.A.R.L. All rights reserved. 4 | * @version $Rev$ 5 | */ 6 | module untitled; 7 | import tango.io.Stdout; 8 | import tango.text.convert.Format; 9 | import tango.util.log.Log, tango.util.log.Configurator; 10 | 11 | protected static Logger log = null; 12 | static this() { 13 | log = Log.getLogger(__FILE__); 14 | //log.setLevel(log.Level.Info); 15 | } 16 | 17 | private static final char[] NAME = "John Dong"; 18 | 19 | alias NAME name; 20 | 21 | class MyClass : Log { 22 | protected int x = 0x3; 23 | this(lazy int d) { 24 | this.x = d; 25 | } 26 | ~this() { 27 | this.x = 0; 28 | } 29 | public synchronized void run() { 30 | Stdout("I'm running...").newline; 31 | } 32 | } 33 | 34 | void main() { 35 | Stdout(r"Hej på dig \n internets").newline; 36 | Stdout(`Hello`).newline; 37 | Stdout("hello " ~ "world" ~ \' ).newline; 38 | Stdout(name).newline; 39 | log.error("Hello"); 40 | log.info(Format("Hello {}", NAME)); 41 | debug { 42 | Stdout("this is from within debug { }").newline; 43 | } 44 | 45 | foreach_reverse(i,c; name) { 46 | Stdout.format("{}:{}, ", i, c); 47 | } 48 | Stdout.newline; 49 | 50 | auto mc = new MyClass(14); 51 | mc.run(); 52 | } 53 | 54 | // "if" in "uniform" should not be parsed as keyword.control.conditional.d 55 | import std.random : Random, unpredictableSeed, uniform; 56 | 57 | // "static" and "if" should be parsed as keyword.control.conditional.d 58 | // "static" and "if be parsed as two separate words 59 | static if (true) {} 60 | 61 | void main() 62 | { 63 | // "if" should be parsed as keyword.control.conditional.d 64 | if (true) {} 65 | 66 | // "else" and "if" should be parsed as keyword.control.conditional.d 67 | // "else" and "if" should be parsed as two separate words 68 | else if (true) {} 69 | 70 | // "else" and "if" should be parsed as keyword.control.conditional.d 71 | // "else" and "if" should be parsed as two separate words 72 | else 73 | if (true) {} 74 | 75 | // "else" should be parsed as keyword.control.conditional.d 76 | else{} 77 | 78 | // "if" should be parsed as keyword.control.conditional.d 79 | if (false) {} 80 | } 81 | -------------------------------------------------------------------------------- /Support/lib/text_mate/helpers/options_helper.rb: -------------------------------------------------------------------------------- 1 | module TextMate 2 | module Helpers 3 | module OptionsHelper 4 | # Appends the given classes to the given options hash. 5 | # 6 | # It will look for both the "class" and :class key. This will create a new 7 | # :class key in the given hash if neither exists. 8 | # 9 | # @param options [Hash] hash of options to append the classes to 10 | # @param new_classes [Array] the classes to append 11 | # 12 | # @return [Hash] options 13 | def append_class!(options, *new_classes) 14 | return options if new_classes.empty? 15 | key = options.key?('class') ? 'class' : :class 16 | 17 | cls = options[key].to_s 18 | cls << ' ' unless cls.empty? 19 | 20 | cls << new_classes.join(' ') 21 | options[key] = cls 22 | options 23 | end 24 | 25 | # Converts the given Ruby options to HTML attributes. 26 | # 27 | # @param options [{ Symbol => String }] 28 | # @param escape [Boolean] if true will escape HTML 29 | # 30 | # @return [String] the HTML attributes 31 | def tag_options(options, escape = true) 32 | options.map do |attribute, value| 33 | attribute = ERB::Util.html_escape(attribute) if escape 34 | value = ERB::Util.html_escape(value) if escape 35 | "#{attribute}=\"#{value}\"" 36 | end.join(' ') 37 | end 38 | 39 | # Extras the hash of options in the given array. 40 | # 41 | # Extracts the last element in the given array that is a Hash<\tt>, 42 | # replaces the last element with the hash and the current element with 43 | # nil<\tt>. If there's no hash in the array the last element will 44 | # be replaced with an empty hash. 45 | # 46 | # @param args [Array] the arguments to extract the hash from 47 | # 48 | # @return [Array] a new array with the hash as its last element 49 | def extract_options(*args) 50 | args = args.dup 51 | index = args.rindex { |e| e.is_a?(Hash) } || args.length 52 | args[-1] = args[index] || {} 53 | args[index] = nil if index < args.length - 1 54 | args 55 | end 56 | end 57 | end 58 | end 59 | -------------------------------------------------------------------------------- /Support/lib/dmate/compiler.rb: -------------------------------------------------------------------------------- 1 | require 'json' 2 | 3 | module DMate 4 | class Compiler < BasicObject 5 | class << self 6 | def dmd 7 | @dc ||= Dmd.new 8 | end 9 | 10 | def rdmd 11 | @rdmd ||= Rdmd.new 12 | end 13 | 14 | def dub 15 | @dub ||= Dub.new 16 | end 17 | 18 | def shell 19 | @shell ||= Shell.new 20 | end 21 | end 22 | 23 | def __class__ 24 | (class << self; self end).superclass 25 | end 26 | 27 | def executable 28 | @executable ||= begin 29 | class_name = __class__.name.split('::').last 30 | ::TextMate.env[class_name.upcase] || class_name.downcase 31 | end 32 | end 33 | 34 | def method_missing(*args, &block) 35 | executable.send(*args, &block) 36 | end 37 | 38 | def version_options 39 | { version_args: '--help' } 40 | end 41 | 42 | class Dmd < Compiler 43 | def initialize 44 | @session = ::TextMate::TextMateSession.current 45 | end 46 | 47 | def import_paths 48 | result, _, status = ::Open3.capture3( 49 | compiler_path, '-Xf=-', '-Xi=buildInfo', '-o-', '-', stdin_data: '' 50 | ) 51 | return [] unless status.success? 52 | parse_import_paths(result) 53 | end 54 | 55 | def compiler_path 56 | @compiler_path ||= session.env.dmd ? session.env.dmd : which('dmd') 57 | end 58 | 59 | private 60 | 61 | attr_reader :session 62 | 63 | def parse_import_paths(compiler_output) 64 | ::JSON 65 | .parse(compiler_output) 66 | .dig('buildInfo', 'importPaths') || [] 67 | end 68 | 69 | def which(executable) 70 | session.env.path.each do |path| 71 | file = File.join(path, 'dmd') 72 | return file if File.executable?(file) 73 | end 74 | 75 | return nil 76 | end 77 | end 78 | 79 | class Rdmd < Compiler 80 | end 81 | 82 | class Dub < Compiler 83 | def version_options 84 | super.merge(version_regex: /.+(DUB version.+)$/m, version_replace: '\1') 85 | end 86 | 87 | def run 88 | 'run' 89 | end 90 | 91 | def build 92 | 'build' 93 | end 94 | 95 | def test 96 | 'test' 97 | end 98 | end 99 | 100 | class Shell < Compiler 101 | def run 102 | 'run.sh' 103 | end 104 | 105 | def build 106 | 'build.sh' 107 | end 108 | 109 | def test 110 | 'test.sh' 111 | end 112 | end 113 | end 114 | end 115 | -------------------------------------------------------------------------------- /Support/lib/dmate/error_handler.rb: -------------------------------------------------------------------------------- 1 | require 'pathname' 2 | 3 | require 'text_mate/helpers/url_helper' 4 | 5 | module DMate 6 | class ErrorHandler 7 | include TextMate::Helpers::UrlHelper 8 | 9 | EXCEPTION_PATTERN = /^(.*?)@(.*?)\((\d+)\):(.*)?/ 10 | COMPILE_ERROR_PATTERN = /^(.*?)\((\d+)(,(\d+))?\): (.+)?/ 11 | 12 | def handle(line, type) 13 | return if type != :err 14 | 15 | args = if line =~ EXCEPTION_PATTERN 16 | handle_exception(Regexp.last_match[1], Regexp.last_match[2], 17 | Regexp.last_match[3], Regexp.last_match[4]) 18 | elsif line =~ COMPILE_ERROR_PATTERN 19 | handle_compile_error(Regexp.last_match[1], Regexp.last_match[2], 20 | Regexp.last_match[4], Regexp.last_match[5]) 21 | end 22 | 23 | return if args.nil? 24 | 25 | message, display_name, file, line, column = args 26 | error_marks(file, line, column, message) 27 | link_to_error message, display_name, file, line, column 28 | end 29 | 30 | private 31 | 32 | def handle_exception(exception, file, line, message) 33 | file = module_to_path(file) 34 | display_name = display_name(file) 35 | display_name = "#{exception}@#{display_name}" 36 | 37 | return message, display_name, file, line 38 | end 39 | 40 | def handle_compile_error(file, line, column_or_message, message = nil) 41 | if message.nil? 42 | message = column_or_message 43 | else 44 | column = column_or_message 45 | end 46 | 47 | return message, display_name(file), full_path(file), line, column 48 | end 49 | 50 | def error_marks(file, line, column, message) 51 | return unless file && line 52 | 53 | column ||= 1 54 | type = message =~ /^(error|warning|note):/i ? $1 : nil 55 | type ||= message =~ /^deprecation:/i ? 'warning' : 'error' 56 | 57 | pattern = "#{type}:" 58 | value = "#{type.downcase}:#{message}" 59 | 60 | args = [file, "--line=#{line}:#{column}", "--set-mark=#{value}"] 61 | system(ENV['TM_MATE'], *args) 62 | end 63 | 64 | def display_name(path) 65 | File.basename(path) 66 | end 67 | 68 | def full_path(path) 69 | File.absolute_path(path, TextMate.project_path) 70 | end 71 | 72 | def module_to_path(module_name) 73 | if File.exist?(module_name) || !TextMate.project? 74 | return File.absolute_path(module_name) 75 | end 76 | 77 | path = File.join(TextMate.project_path, module_name) 78 | return path if File.exist?(path) 79 | 80 | path = path.gsub('.', File::SEPARATOR) 81 | path = File.exist?(path + '.di') ? path + '.di' : path + '.d' 82 | File.absolute_path(path) 83 | end 84 | end 85 | end 86 | -------------------------------------------------------------------------------- /Support/lib/text_mate/helpers/tag_helper.rb: -------------------------------------------------------------------------------- 1 | require_relative 'options_helper' 2 | 3 | module TextMate 4 | module Helpers 5 | module TagHelper 6 | include OptionsHelper 7 | 8 | # Creates an HTML tag with the given name and content. 9 | # 10 | # @param name [String, Symbol] the name of the tag 11 | # 12 | # @param content [String, { Symbol => String }] the content of the tag. 13 | # If a block is given this is considered to be the same as options 14 | # 15 | # @param options [{ Symbol => String }] this hash will be converted to 16 | # HTML attributes 17 | # 18 | # @param escape [Boolean] if true will escape HTML. Defaults to true when 19 | # no block is given 20 | # 21 | # @param block [Proc] if a block is given, the return value will be used 22 | # as content 23 | # 24 | # @return [String] the HTML tag 25 | def content_tag(name, content = nil, options = {}, escape = nil, &block) 26 | if block_given? 27 | options = content if content.is_a?(Hash) 28 | escape = false if escape.nil? 29 | content_tag_string(name, block.call, options, escape) 30 | else 31 | escape = true if escape.nil? 32 | content_tag_string(name, content, options, escape) 33 | end 34 | end 35 | 36 | # Creates an HTML start or end tag with the given name. 37 | # 38 | # @param name [Symbol, String] the name of the tag 39 | # @param options [Hash] hash of options 40 | # 41 | # @option options [Boolean] :end_tag (false) if true it will return an 42 | # end tag 43 | # 44 | # @option options [Boolean] :self_closing (false) if true it will return 45 | # self closing tag 46 | # 47 | # @option options [Boolean] :escape (true) if true will escape HTML 48 | # 49 | # @option option [{ Symbol => String }] :options ({}) a hash of options 50 | # that will be converted to HTML attributes. Will be ignored if 51 | # :end_tag or :self_closing is true 52 | def tag(name, options = {}) 53 | name = ERB::Util.html_escape(name) if options[:escape] 54 | return "" if options[:end_tag] 55 | return "<#{name} />" if options[:self_closing] 56 | 57 | attributes = tag_options(options[:options] || {}, options[:escape]) 58 | result = "<#{name}" 59 | result << " #{attributes}" unless attributes.empty? 60 | result << '>' 61 | end 62 | 63 | private 64 | 65 | def content_tag_string(name, content, options, escape) 66 | content = ERB::Util.html_escape(content) if escape 67 | tag(name, options: options) << content << tag(name, end_tag: true) 68 | end 69 | end 70 | end 71 | end 72 | -------------------------------------------------------------------------------- /spec/dsupport/text_mate/helpers/options_helper_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | require 'text_mate/helpers/options_helper.rb' 3 | 4 | describe TextMate::Helpers::OptionsHelper do 5 | class Mock 6 | include ::TextMate::Helpers::OptionsHelper 7 | end 8 | 9 | before :all do 10 | @helper = Mock.new 11 | end 12 | 13 | attr_reader :helper 14 | 15 | let(:options) { { class: 'foo', id: 'bar' } } 16 | let(:result) { options.dup } 17 | 18 | describe 'append_class!' do 19 | context 'when a class exists' do 20 | it 'appends the given classes existing class key' do 21 | result[:class] << ' bar' 22 | helper.append_class!(options, 'bar').should == result 23 | end 24 | 25 | context 'when multiple classes are appended' do 26 | it 'appends all the given classes' do 27 | result[:class] << ' bar baz' 28 | helper.append_class!(options, 'bar', :baz).should == result 29 | end 30 | end 31 | 32 | context 'when a string is used as the class key' do 33 | let(:options) { { 'class' => 'foo', :id => 'bar' } } 34 | 35 | it 'appends the given classes existing class key' do 36 | result['class'] << ' bar' 37 | helper.append_class!(options, 'bar').should == result 38 | end 39 | end 40 | end 41 | 42 | context 'when no class exists' do 43 | it 'creates a new class key with the given classes' do 44 | options.delete(:class) 45 | result[:class] = 'bar' 46 | helper.append_class!(options, 'bar').should == result 47 | end 48 | end 49 | end 50 | 51 | describe 'tag_options' do 52 | it 'converts Ruby hashes to HTML attributes' do 53 | helper.tag_options(options).should == 'class="foo" id="bar"' 54 | end 55 | 56 | context 'when the key or value contains HTML' do 57 | let(:options) { { :class => 'foo', 'id' => 'bar' } } 58 | 59 | it 'escapes the HTML' do 60 | expected = 'class="<asd>foo" <asd>id="bar"' 61 | helper.tag_options(options).should == expected 62 | end 63 | end 64 | end 65 | 66 | describe 'extract_options' do 67 | let(:args) { [1, 2, 3, { a: 1 }] } 68 | 69 | def result 70 | helper.extract_options(*args) 71 | end 72 | 73 | it 'extracts the hash of options from an array' do 74 | result.should == args 75 | end 76 | 77 | context 'with no hash in the arguments' do 78 | let(:args) { [1, 2, nil] } 79 | 80 | it 'sets the last element to an empty hash' do 81 | result.should == [1, 2, {}] 82 | end 83 | end 84 | 85 | context 'when hash is not the last element' do 86 | let(:args) { [1, 2, { a: 3 }, nil] } 87 | 88 | it 'should replace the last element with the hash and set the current element to nil' do 89 | result.should == [1, 2, nil, { a: 3 }] 90 | end 91 | end 92 | end 93 | end 94 | -------------------------------------------------------------------------------- /spec/dsupport/dmate/error_handler_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | require 'text_mate/text_mate' 4 | require 'dmate/error_handler' 5 | 6 | describe DMate::ErrorHandler do 7 | let(:handler) { DMate::ErrorHandler.new } 8 | 9 | describe 'module_to_path' do 10 | def module_to_path(*args) 11 | handler.send(:module_to_path, *args) 12 | end 13 | 14 | context 'when not in a project' do 15 | before :each do 16 | allow(TextMate).to receive(:project?).and_return(false) 17 | end 18 | 19 | context 'when the given value is a module name' do 20 | it 'returns the given path unchanged' do 21 | module_to_path('foo.bar').should == 'foo.bar' 22 | end 23 | 24 | context 'and original module name exists' do 25 | before :each do 26 | expect(File).to receive(:exist?).once.and_return(true) 27 | end 28 | 29 | it 'returns the given path unchanged' do 30 | module_to_path('foo.bar').should == 'foo.bar' 31 | end 32 | end 33 | end 34 | 35 | context 'when the given value is a path' do 36 | it 'returns the given path unchanged' do 37 | module_to_path('x/y').should == 'x/y' 38 | end 39 | 40 | context 'and original path exists' do 41 | before :each do 42 | expect(File).to receive(:exist?).once.and_return(true) 43 | end 44 | 45 | it 'returns the given path unchanged' do 46 | module_to_path('x/y').should == 'x/y' 47 | end 48 | end 49 | end 50 | end 51 | 52 | context 'when in a project' do 53 | let(:project_path) { '/foo/bar' } 54 | 55 | before :each do 56 | allow(TextMate).to receive(:project?).and_return(true) 57 | allow(TextMate).to receive(:project_path).and_return(project_path) 58 | end 59 | 60 | context 'when the given value is module name' do 61 | it 'returns the full path of the given module name' do 62 | module_to_path('x.y').should == project_path + '/x/y.d' 63 | end 64 | 65 | context 'and original module name exists' do 66 | before :each do 67 | expect(File).to receive(:exist?).once.and_return(true) 68 | end 69 | 70 | it 'returns the given path unchanged' do 71 | module_to_path('foo.bar').should == 'foo.bar' 72 | end 73 | end 74 | end 75 | 76 | context 'when the given value is a path' do 77 | it 'returns the full path of the given module name' do 78 | module_to_path('x/y').should == project_path + '/x/y.d' 79 | end 80 | 81 | context 'and original path exists' do 82 | before :each do 83 | expect(File).to receive(:exist?).once.and_return(true) 84 | end 85 | 86 | it 'returns the given path unchanged' do 87 | module_to_path('x/y').should == 'x/y' 88 | end 89 | end 90 | end 91 | end 92 | end 93 | end 94 | -------------------------------------------------------------------------------- /Support/help.md: -------------------------------------------------------------------------------- 1 | # Building and Running 2 | 3 | There are three commands to build or run a project: 4 | 5 | * Run ⌘R 6 | * Build ⌘B 7 | * Test ⇧⌘R 8 | * Run Single File ⌃⇧⌘R 9 | 10 | ## Run 11 | 12 | The Run command will build and run the current project in the following way: 13 | 14 | 1. If a file name `run.sh` exists in the current working directory, that will 15 | be executed 16 | 17 | 2. If a filed name `dub.json` exists in the current working directory 18 | the `dub run` command will be executed 19 | 20 | 3. Otherwise it will fallback to the Run Single File command 21 | 22 | ## Build 23 | 24 | The Build command works similar to the Run command but it will only build the 25 | project and not run it. 26 | 27 | 1. If a file name `build.sh` exists in the current working directory, that will 28 | be executed 29 | 30 | 2. If a filed name `dub.json` exists in the current working directory 31 | the `dub build` command will be executed 32 | 33 | 3. Otherwise it will fallback to the Run Single File command but with the extra 34 | `--build-only` flag 35 | 36 | ## Test 37 | 38 | The Test command will build with unit tests enabled and run the current project 39 | in the following way: 40 | 41 | 1. If a file name `test.sh` exists in the current working directory, that will 42 | be executed 43 | 44 | 2. If a filed name `dub.json` or `dub.sdl` exists in the current working 45 | directory the `dub test` command will be executed 46 | 47 | 3. Otherwise it will fallback to the 48 | Run Single File command but with the 49 | extra `-unittest` flag 50 | 51 | ## Run Single File 52 | 53 | The Run Single File will compile and run the currently active file, regardless 54 | if it's part of a project or a standalone file. The command that will be 55 | executed is: 56 | 57 | rdmd -vcolumns --compiler=$TM_DMD 58 | 59 | Where `` is the current active file. 60 | 61 | # D Completion Daemon (DCD) 62 | 63 | This bundle has support for the D Completion Daemon. DCD uses a server client 64 | architecture. The server will be started automatically as soon as a D document 65 | is opened and add the default import paths to DCD. The bundle will then invoke 66 | the client binary to communicate with the server which provides all features. 67 | 68 | To install and setup refer to the DCD 69 | [documentation](https://github.com/Hackerpilot/dcd#setup). 70 | 71 | ## Supported Features: 72 | 73 | * Completion ⌥⎋ 74 | * Go To Definition ⌘Click 75 | * Generate documentation ⌃H 76 | 77 | # Environment Variables 78 | 79 | The run and build commands recognizes the `TM_DMD` environment variable. This 80 | should point to the compiler that is to be used when building. It needs to be 81 | compatible with the DMD command line interface, for GDC and LDC that means it 82 | needs to point to the `gdmd` or `ldmd` command. If the `TM_DMD` variable isn't 83 | present it will fallback to use `dmd`. 84 | 85 | The DCD related commands recognizes the `TM_DCD_CLIENT` environment 86 | variable. This should point to the `dcd-client` binary. 87 | -------------------------------------------------------------------------------- /Support/lib/commands/complete_command.rb: -------------------------------------------------------------------------------- 1 | TextMate.require_support 'lib/ui' 2 | TextMate.require_support 'lib/exit_codes' 3 | 4 | TextMate.require_bundle 'lib/commands/dcd_command' 5 | 6 | class CompleteCommand < DcdCommand 7 | BUNDLE_IDENTIFIER = 'com.github.textmate.d' 8 | 9 | ICON_MAP = { 10 | 'l' => 'alias', 11 | 'a' => 'array', 12 | 'A' => 'associative_array', 13 | 'c' => 'class', 14 | 'e' => 'enum_member', 15 | 'g' => 'enum', 16 | 'f' => 'function', 17 | 'F' => 'function', 18 | 'i' => 'interface', 19 | 'k' => 'keyword', 20 | 'T' => 'mixin_template', 21 | 'M' => 'module', 22 | 'P' => 'package', 23 | 's' => 'struct', 24 | 't' => 'template', 25 | 'u' => 'union', 26 | 'v' => 'variable_name', 27 | 'm' => 'variable' 28 | }.freeze 29 | 30 | def initialize 31 | super 32 | TextMate::TextMateSession.current.document.content 33 | register_icons 34 | end 35 | 36 | def dcd_args 37 | ['--extended', '-c', session.cursor.to_s] 38 | end 39 | 40 | def run 41 | result = parse_completion_result(super) 42 | TextMate::UI.complete(result, :extra_chars => '_', :case_insensitive => true) 43 | end 44 | 45 | def register_icons 46 | support_path = session.bundle_support_path 47 | icons_directory = File.join(support_path, 'res/completion_icons') 48 | 49 | icons = ICON_MAP.values.map do |e| 50 | [icon_name(e), "#{icons_directory}/#{e}.pdf"] 51 | end 52 | 53 | icons = Hash[icons] 54 | session.dialog.register_images(icons) 55 | end 56 | 57 | private 58 | 59 | def parse_completion_result(result) 60 | completions = result.split("\n") 61 | return no_completions if completions.empty? 62 | return show_calltip(completions[1 .. -1]) if calltip?(completions) 63 | extract_completions(completions) 64 | end 65 | 66 | def no_completions 67 | TextMate.exit_show_tool_tip('No completions found') 68 | end 69 | 70 | def extract_completions(completions) 71 | completions[1 .. -1].map do |line| 72 | columns = line.split("\t") 73 | icon = map_icon(columns[1]) 74 | { 75 | 'match' => columns.first, 76 | 'display' => display(columns), 77 | 'image' => icon, 78 | 'tooltip' => columns[4] || '' 79 | } 80 | end 81 | end 82 | 83 | def calltip?(completions) 84 | completions.first == "calltips" 85 | end 86 | 87 | def show_calltip(calltips) 88 | calltips = calltips.map do |line| 89 | line.split("\t").reject { |e| e.empty? }[1] 90 | end.join("\n") 91 | 92 | TextMate.exit_show_tool_tip(calltips) 93 | end 94 | 95 | def map_icon(symbol_type) 96 | key = ICON_MAP[symbol_type] 97 | raise "No icon mapping for '#{symbol_type}'" if key.nil? 98 | icon_name(key) 99 | end 100 | 101 | def icon_name(name) 102 | BUNDLE_IDENTIFIER + '-' + name 103 | end 104 | 105 | def display(columns) 106 | display = columns[2] || columns.first 107 | display.empty? ? columns.first : display 108 | end 109 | end 110 | -------------------------------------------------------------------------------- /spec/dsupport/text_mate/helpers/tag_helper_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | require 'text_mate/helpers/tag_helper.rb' 3 | 4 | describe TextMate::Helpers::TagHelper do 5 | class Mock 6 | include ::TextMate::Helpers::TagHelper 7 | end 8 | 9 | before :all do 10 | @helper = Mock.new 11 | end 12 | 13 | attr_reader :helper 14 | 15 | describe 'content_tag' do 16 | context 'when no content is given' do 17 | it 'creates an HTML start and end tag with the given name' do 18 | helper.content_tag(:div).should == '
' 19 | end 20 | end 21 | 22 | context 'when content is given' do 23 | it 'creates an HTML tag with the given name and content' do 24 | helper.content_tag(:div, 'foo').should == '
foo
' 25 | end 26 | end 27 | 28 | context 'when the content contains HTML' do 29 | it 'escapes the HTML content' do 30 | expected = '
<bar>foo
' 31 | helper.content_tag(:div, 'foo').should == expected 32 | end 33 | end 34 | 35 | context 'when a option hash is passed' do 36 | it 'creates an HTML tag with attributes' do 37 | attributes = { class: 'bar', id: 'primary' } 38 | expected = '
foo
' 39 | helper.content_tag(:div, 'foo', attributes).should == expected 40 | end 41 | end 42 | 43 | context 'when a block is given' do 44 | it 'creates an HTML tag with the given name and content' do 45 | helper.content_tag(:div) { 'foo' }.should == '
foo
' 46 | end 47 | 48 | it "doesn't escape the content of the block" do 49 | expected = '
foo
' 50 | helper.content_tag(:div) { 'foo' }.should == expected 51 | end 52 | end 53 | end 54 | 55 | describe 'tag' do 56 | it 'create an HTML start tag with the given name' do 57 | helper.tag(:div).should == '
' 58 | end 59 | 60 | context 'end tag' do 61 | it 'create an HTML end tag with the given name' do 62 | helper.tag(:div, end_tag: true).should == '
' 63 | end 64 | end 65 | 66 | context 'self closing tag' do 67 | it 'create an HTML self closing end tag with the given name' do 68 | helper.tag(:div, self_closing: true).should == '
' 69 | end 70 | end 71 | 72 | context 'with options' do 73 | let(:options) do 74 | { options: { class: 'bar' } } 75 | end 76 | 77 | it 'create an HTML start tag with the given name and attributes' do 78 | helper.tag(:div, options).should == '
' 79 | end 80 | 81 | context 'and with end tag' do 82 | it 'create an HTML end tag with the given name WITHOUT attributes' do 83 | helper.tag(:div, options.merge(end_tag: true)).should == '
' 84 | end 85 | end 86 | 87 | context 'and with self closing tag' do 88 | it 'create an HTML end tag with the given name WITHOUT attributes' do 89 | options = self.options.merge(self_closing: true) 90 | helper.tag(:div, options).should == '
' 91 | end 92 | end 93 | end 94 | end 95 | end 96 | -------------------------------------------------------------------------------- /Support/lib/text_mate/helpers/url_helper.rb: -------------------------------------------------------------------------------- 1 | require File.join(File.dirname(__FILE__), 'tag_helper') 2 | 3 | module TextMate 4 | module Helpers 5 | module UrlHelper 6 | include TagHelper 7 | 8 | TEXT_MATE_PROTOCOL = 'txmt://open?url=file://' 9 | 10 | # Create an error link linking to a file on disk using the txmt protocol. 11 | # 12 | # @param message [String] the error message 13 | # @param display_name [String] a short version of the file to link to 14 | # @param file [String] the full path to the file where the error occurred 15 | # @param line [String, Integer] the line where the error occurred 16 | # @param column [String, Integer] the column where the error occurred 17 | # 18 | # @param options [{ Symbol => String }] this hash will be converted to 19 | # HTML attributes 20 | # 21 | # @return [String] the error link 22 | def link_to_error(message, display_name, file, line = nil, column = nil, 23 | options = nil) 24 | 25 | line, column, options = extract_options(line, column, options) 26 | text = display_name 27 | 28 | if line 29 | text += "(#{line}" 30 | text += ",#{column}" if column 31 | text += ')' 32 | end 33 | 34 | text = ERB::Util.html_escape(text) 35 | 36 | message = ': ' + ERB::Util.html_escape(message) 37 | 38 | content_tag(:span, class: 'err') do 39 | link_to_txmt(text, file, line, column, options) + 40 | message + 41 | tag(:br, self_closing: true) 42 | end 43 | end 44 | 45 | # Creates an HTML link linking to a file on disk using the txmt protocol. 46 | # 47 | # @param text [String] the text of the link. If a block is given this is 48 | # considered to be the same as file 49 | # 50 | # @param file [String] the full path to the file to link to. If a block 51 | # is given this is considered to be the same as line 52 | # 53 | # @param line [String, Integer] the line in the file to link to. If a 54 | # block is given this is considered to be the same as options 55 | # 56 | # @param column [String, Integer] the column in the line to link to. If a 57 | # block is given this is considered to be the same as options 58 | # 59 | # @param options [{ Symbol => String }] this hash will be converted to 60 | # HTML attributes 61 | # 62 | # @param block [Proc] the text of the link 63 | # 64 | # @return [String] the link 65 | def link_to_txmt(text, file, line = nil, column = nil, options = nil, 66 | &block) 67 | 68 | file, line, column, options = text, file, line, column if block_given? 69 | line, column, options = extract_options(line, column, options) 70 | 71 | line = line.to_s 72 | line = "&line=#{line}" unless line.empty? 73 | 74 | column = column.to_s 75 | column = "&column=#{column}" unless column.empty? 76 | 77 | url = TEXT_MATE_PROTOCOL + file + line + column 78 | 79 | if block_given? 80 | link_to(url, options, &block) 81 | else 82 | link_to(text, url, options) 83 | end 84 | end 85 | 86 | # Creates an HTML link with the given text an URL. 87 | # 88 | # @param text [String] the text of the link. If a block is given this is 89 | # considered to be the same as url 90 | # 91 | # @param url [String] the URL of the link. If a block is given this is 92 | # considered to be the same as options 93 | # 94 | # @param options [{ Symbol => String }] this hash will be converted to 95 | # HTML attributes 96 | # 97 | # @return [String] the HTML link 98 | def link_to(text, url = nil, options = {}, &block) 99 | if block_given? 100 | options = url || {} 101 | url = text 102 | end 103 | 104 | options = { href: url }.merge(options) 105 | 106 | if block_given? 107 | content_tag(:a, options, &block) 108 | else 109 | content_tag(:a, text, options) 110 | end 111 | end 112 | end 113 | end 114 | end 115 | -------------------------------------------------------------------------------- /spec/dsupport/text_mate/helpers/url_helper_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | require 'text_mate/helpers/url_helper.rb' 3 | 4 | describe TextMate::Helpers::UrlHelper do 5 | class Mock 6 | include ::TextMate::Helpers::UrlHelper 7 | end 8 | 9 | before :all do 10 | @helper = Mock.new 11 | end 12 | 13 | attr_reader :helper 14 | 15 | let(:file) { 'path/to/local/file' } 16 | let(:text) { 'foo' } 17 | let(:line) { 30 } 18 | 19 | describe 'link_to_error' do 20 | let(:message) { 'message' } 21 | let(:href) { "\"txmt://open?url=file://#{file}\"" } 22 | let(:link) { "#{text}: #{message}
" } 23 | let(:expected) { "#{link}" } 24 | 25 | it 'creates an error link to a local file using the txmt:// protocol' do 26 | helper.link_to_error(message, text, file).should == expected 27 | end 28 | 29 | context 'with line number' do 30 | let(:href) { "\"txmt://open?url=file://#{file}&line=#{line}\"" } 31 | let(:link) { "#{text}(#{line}): #{message}
" } 32 | 33 | it 'creates an error link with line number' do 34 | helper.link_to_error(message, text, file, line).should == expected 35 | end 36 | 37 | context 'with column' do 38 | let(:column) { 2 } 39 | 40 | let(:href) do 41 | "\"txmt://open?url=file://#{file}&line=#{line}&column=#{column}\"" 42 | end 43 | 44 | let(:link) do 45 | "#{text}(#{line},#{column}): #{message}
" 46 | end 47 | 48 | it 'creates an error link with line and column number' do 49 | args = [message, text, file, line, column] 50 | helper.link_to_error(*args).should == expected 51 | end 52 | 53 | context 'with attributes' do 54 | let(:link) do 55 | content = "#{text}(#{line},#{column})" 56 | "#{content}: #{message}
" 57 | end 58 | 59 | it 'creates an error link with attributes' do 60 | args = [message, text, file, line, column, foo: 'bar'] 61 | helper.link_to_error(*args).should == expected 62 | end 63 | end 64 | end 65 | 66 | context 'with attributes' do 67 | let(:link) do 68 | "#{text}(#{line}): #{message}
" 69 | end 70 | 71 | it 'creates an error link with attributes' do 72 | result = helper.link_to_error(message, text, file, line, foo: 'bar') 73 | result.should == expected 74 | end 75 | end 76 | end 77 | 78 | context 'with attributes' do 79 | let(:link) { "#{text}: #{message}
" } 80 | 81 | it 'creates an error link with attributes' do 82 | helper.link_to_error(message, text, file, foo: 'bar').should == expected 83 | end 84 | end 85 | end 86 | 87 | describe 'link_to_txmt' do 88 | let(:href) { "\"txmt://open?url=file://#{file}\"" } 89 | let(:expected) { "#{text}" } 90 | 91 | it 'creates an HTML link to a local file using the txmt:// protocol' do 92 | helper.link_to_txmt(text, file).should == expected 93 | end 94 | 95 | context 'with line number' do 96 | let(:href) { "\"txmt://open?url=file://#{file}&line=#{line}\"" } 97 | 98 | it 'creates an HTML link with line number' do 99 | helper.link_to_txmt(text, file, line).should == expected 100 | end 101 | end 102 | end 103 | 104 | describe 'link_to' do 105 | it 'creates an HTML link' do 106 | helper.link_to('foo', 'bar').should == 'foo' 107 | end 108 | 109 | context 'when an option is passed' do 110 | it 'creates an HTML link with attributes' do 111 | expected = 'foo' 112 | helper.link_to('foo', 'bar', class: 'err').should == expected 113 | end 114 | end 115 | 116 | context 'when a block is given' do 117 | it 'creates an HTML link with the given URL and content' do 118 | helper.link_to('bar') { 'foo' }.should == 'foo' 119 | end 120 | 121 | context 'when an option is passed' do 122 | it 'creates an HTML link with attributes' do 123 | expected = 'foo' 124 | helper.link_to('bar', class: 'err') { 'foo' }.should == expected 125 | end 126 | end 127 | end 128 | end 129 | end 130 | -------------------------------------------------------------------------------- /Support/res/ddoc_theme.ddoc: -------------------------------------------------------------------------------- 1 | LPAREN = ( 2 | RPAREN = ) 3 | BACKTICK = ` 4 | DOLLAR = $ 5 | LF = 6 | $(LF) 7 | 8 | B = $0 9 | I = $0 10 | U = $0 11 | P =

$0

12 | DL =
$0
13 | DT =
$0
14 | DD =
$0
15 | TABLE = $0
16 | TR = $0 17 | TH = $0 18 | TD = $0 19 | OL =
    $0
20 | UL =
    $0
21 | LI =
  • $0
  • 22 | BIG = $0 23 | SMALL = $0 24 | BR =
    25 | LINK = $0 26 | LINK2 = $+ 27 | DEPRECATED = $0 28 | 29 | RED = $0 30 | BLUE = $0 31 | GREEN = $0 32 | YELLOW = $0 33 | BLACK = $0 34 | WHITE = $0 35 | 36 | D_CODE = 37 |
    38 |
    39 |
    40 |
      41 |
    1. $0
    2. 42 |
    43 |
    44 |
    45 |
    46 | 47 | D_INLINECODE = $0 48 | DDOC_BACKQUOTED = $(D_INLINECODE $0) 49 | D_COMMENT = $0 50 | D_STRING = $0 51 | D_KEYWORD = $0 52 | D_PSYMBOL = $0 53 | D_PARAM = $0 54 | 55 | DDOC_BLANKLINE =

    56 | DDOC_COMMENT = 57 | 58 | DDOC = 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 |
    68 |
    69 |
    $(BODY)
    70 |
    71 |
    72 | 73 | 74 | 75 | DDOC_MODULE_MEMBERS =
    76 |
    77 | $(DDOC_MEMBERS $0) 78 |
    79 |
    $(LF) 80 | 81 | DDOC_CLASS_MEMBERS = $(DDOC_MEMBERS $0)$(LF) 82 | DDOC_STRUCT_MEMBERS = $(DDOC_MEMBERS $0)$(LF) 83 | DDOC_ENUM_MEMBERS = $(DDOC_MEMBERS $0)$(LF) 84 | DDOC_TEMPLATE_MEMBERS = $(DDOC_MEMBERS $0)$(LF) 85 | 86 | DDOC_MEMBERS =
      87 | $0 88 |
    89 | 90 | DDOC_MEMBER =
  • 91 | $0 92 |
  • 93 | 94 | DDOC_MEMBER_HEADER = 95 | 96 | DDOC_HEADER_ANCHOR =
    97 | $2 98 |
    99 | 100 | DDOC_DECL = 101 | DDOC_ANCHOR = 102 | 103 | DDOC_DECL_DD =
    104 | $0 105 |
    106 | 107 | DDOC_SECTIONS =
    108 | $0 109 |
    $(LF) 110 | 111 | DDOC_SUMMARY =
    112 |

    113 | $0 114 |

    115 |
    $(LF) 116 | 117 | DDOC_DESCRIPTION =
    118 |

    Discussion

    119 |

    120 | $0 121 |

    122 |
    $(LF) 123 | 124 | DDOC_EXAMPLES =
    125 |

    Examples

    126 |

    127 | $0 128 |

    129 |
    130 | 131 | DDOC_RETURNS =
    132 |

    Return Value

    133 |

    134 | $0 135 |

    136 |
    $(LF) 137 | 138 | DDOC_PARAMS =
    139 |

    Parameters

    140 | 141 | 142 | $0 143 | 144 |
    145 |
    $(LF) 146 | 147 | DDOC_PARAM_ROW = 148 | $0 149 | $(LF) 150 | 151 | DDOC_PARAM_ID = 152 | 153 | $0 154 | 155 | $(LF) 156 | 157 | DDOC_PARAM_DESC = 158 |
    159 |

    160 | $0 161 |

    162 |
    163 | 164 | 165 | DDOC_LICENSE =
    166 |

    License

    167 |

    168 | $0 169 |

    170 |
    $(LF) 171 | 172 | DDOC_AUTHORS =
    173 |

    Authors

    174 |

    175 | $0 176 |

    177 |
    $(LF) 178 | 179 | DDOC_BUGS =
    180 |

    Bugs

    181 |

    182 | $0 183 |

    184 |
    $(LF) 185 | 186 | DDOC_COPYRIGHT = $(LF) 192 | 193 | DDOC_DATE =
    194 |

    Date

    195 |

    196 | $0 197 |

    198 |
    $(LF) 199 | 200 | DDOC_DEPRECATED =
    201 |

    Deprecated

    202 |

    203 | $0 204 |

    205 |
    $(LF) 206 | 207 | DDOC_HISTORY =
    208 |

    History

    209 |

    210 | $0 211 |

    212 |
    $(LF) 213 | 214 | DDOC_SEE_ALSO =
    215 |

    See Also

    216 |

    217 | $0 218 |

    219 |
    $(LF) 220 | 221 | DDOC_STANDARDS =
    222 |

    Standards

    223 |

    224 | $0 225 |

    226 |
    227 | 228 | DDOC_THROWS =
    229 |

    Throws

    230 |

    231 | $0 232 |

    233 |
    234 | 235 | DDOC_VERSION =
    236 |

    Version

    237 |

    238 | $0 239 |

    240 |
    241 | 242 | DDOC_SECTION =
    243 |

    244 | $0 245 |

    246 |
    $(LF) 247 | 248 | DDOC_SECTION_H = $0:$(LF) 249 | 250 | DDOC_DITTO =
    251 | $0 252 | 253 | DDOC_PSYMBOL = $0 254 | DDOC_ENUM_BASETYPE = $0 255 | DDOC_PSUPER_SYMBOL = $0 256 | DDOC_KEYWORD = $0 257 | DDOC_PARAM = $0 258 | DDOC_CONSTRAINT = $(DDOC_CONSTRAINT) if ($0) 259 | DDOC_OVERLOAD_SEPARATOR = $0 260 | DDOC_TEMPLATE_PARAM_LIST = $0 261 | DDOC_TEMPLATE_PARAM = $0 262 | -------------------------------------------------------------------------------- /info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | contactEmailRot13 6 | qbbo@zr.pbz 7 | contactName 8 | Jacob Carlborg 9 | description 10 | Syntax highlight for the <a href="http://dlang.org">D programming language</a> 11 | mainMenu 12 | 13 | excludedItems 14 | 15 | 6B9D73C8-8E6B-45FE-A0A0-25B528EDE5E1 16 | 17 | items 18 | 19 | 108A335C-282D-459B-AD2C-72AB9B30BFB2 20 | AA8221FD-066E-4A9D-A23D-701BDF5E0272 21 | 152B9721-1EAB-427F-BD12-450F3AF27237 22 | 2E0857A0-2E1D-4ABB-8E00-BDE8A86ACD36 23 | ------------------------------------ 24 | DE80CCA9-6CD2-45DB-BBD0-534FF8B24D82 25 | 99AFC116-8E25-4976-A424-34DC6F03DC53 26 | 8877DBE4-46AA-42D4-A0BB-7E0D92EC6AC4 27 | 6E83E8EB-F766-4C7A-A395-38E79074D6B8 28 | ------------------------------------ 29 | 70974D3C-C2BB-46EA-AA5C-15FCD20FE95F 30 | 9C6AD279-4804-4094-AB1E-B69D905B4057 31 | 65C6D8FD-7FBF-4CC9-9F50-E52D788DE5BE 32 | 938D40D6-FC88-47E1-9C51-72565180B624 33 | ------------------------------------ 34 | C46D70B2-E299-42C3-9D78-101A9D4B7266 35 | 36 | submenus 37 | 38 | 65C6D8FD-7FBF-4CC9-9F50-E52D788DE5BE 39 | 40 | items 41 | 42 | 644E0687-5DC6-49B4-838B-5CD72685225B 43 | 644E0687-5DC6-49B4-838B-5CD72685225C 44 | 45 | name 46 | Idioms 47 | 48 | 70974D3C-C2BB-46EA-AA5C-15FCD20FE95F 49 | 50 | items 51 | 52 | 7EB57A38-809C-464D-8025-CE990B100488 53 | ------------------------------------ 54 | 897B3073-FF95-4D71-A581-206EF3FF59D6 55 | E3D192EB-3C23-4B9A-9364-A301417F0434 56 | C3A24E5E-A057-4A4A-BE65-5E7B92E0CB10 57 | C3A24E5E-A057-4A4A-BE65-5E7B92E0CB11 58 | C3A24E5E-A057-4A4A-BE65-5E7B92E0CB0F 59 | ------------------------------------ 60 | C7D15778-04A6-4750-BED7-E0B2C9FAC817 61 | C7D15778-04A6-4750-BED7-E0B2C9FAC818 62 | E87DC9FC-8C4E-468B-BBA5-03D810BB71D9 63 | E87DC9FC-8C4E-468B-BBA5-03D810BB71E0 64 | E87DC9FC-8C4E-468B-BBA5-03D810BB71D8 65 | ECBA4CA0-275F-460E-85BE-F82FEA2E2B02 66 | ECBA4CA0-275F-460E-85BE-F82FEA2E2B01 67 | ECBA4CA0-275F-460E-85BE-F82FDA2E2B01 68 | ------------------------------------ 69 | ECBA4CA0-275F-460E-85BE-F82FEA2E2B0A 70 | ECBA4CA0-275F-460E-85BE-F82FEA2E2B09 71 | ECBA4CA0-275F-460E-85BE-F82FEA2E2B08 72 | ------------------------------------ 73 | ECBA4CA0-275F-460E-85BE-F82FEA2E2B0B 74 | 75 | name 76 | Declarations 77 | 78 | 938D40D6-FC88-47E1-9C51-72565180B624 79 | 80 | items 81 | 82 | 3B85C6F6-769C-4FF6-B70B-327BBEA574D7 83 | 84 | name 85 | Documentation 86 | 87 | 9C6AD279-4804-4094-AB1E-B69D905B4057 88 | 89 | items 90 | 91 | ECBA4CA0-275F-460E-85BE-F82FEA2E2B07 92 | 93 | name 94 | Testing 95 | 96 | 97 | 98 | name 99 | D 100 | ordering 101 | 102 | D7C3A109-0466-4C28-9ECF-10753300FF46 103 | 4A7C08E3-CF6E-47AC-B5C4-F177BC6F2653 104 | 7C8F9C84-7DCC-4DD7-B32E-A638F322199F 105 | A6BCFD4A-B6CC-49C6-93F9-FEB979CC679E 106 | BB84553C-7D75-4D17-9E49-FADADC13F187 107 | 49187E65-D29E-4E5F-8DAD-2C0FDEB0AA5F 108 | 6CBFA0E9-56C7-4B65-9358-8B7732F1E7C5 109 | 7EB57A38-809C-464D-8025-CE990B100488 110 | 1C52B2CF-6202-4D2B-ABF4-6838AD4D8865 111 | 9498824E-F545-4567-8995-2914937A7AEE 112 | E3D192EB-3C23-4B9A-9364-A301417F0434 113 | 3B85C6F6-769C-4FF6-B70B-327BBEA574D7 114 | C7D15778-04A6-4750-BED7-E0B2C9FAC817 115 | 644E0687-5DC6-49B4-838B-5CD72685225B 116 | C3A24E5E-A057-4A4A-BE65-5E7B92E0CB0F 117 | E87DC9FC-8C4E-468B-BBA5-03D810BB71D8 118 | 4CF479D3-48FD-4FE4-847B-AD7570D383C3 119 | ECBA4CA0-275F-460E-85BE-F82FEA2E2B06 120 | ECBA4CA0-275F-460E-85BE-F82FEA2E2B05 121 | ECBA4CA0-275F-460E-85BE-F82FEA2E2B04 122 | ECBA4CA0-275F-460E-85BE-F82FEA2E2B03 123 | BC8B8F52-5F16-11D9-B9C3-000D93589AF7 124 | ECBA4CA0-275F-460E-85BE-F82FEA2E2B09 125 | ECBA4CA0-275F-460E-85BE-F82FEA2E2B08 126 | C3A24E5E-A057-4A4A-BE65-5E7B92E0CB11 127 | ECBA4CA0-275F-460E-85BE-F82FEA2E2B01 128 | ECBA4CA0-275F-460E-85BE-F82FDA2E2B01 129 | C7D15778-04A6-4750-BED7-E0B2C9FAC818 130 | 644E0687-5DC6-49B4-838B-5CD72685225C 131 | ECBA4CA0-275F-460E-85BE-F82FEA2E2B0B 132 | C3A24E5E-A057-4A4A-BE65-5E7B92E0CB10 133 | E87DC9FC-8C4E-468B-BBA5-03D810BB71D9 134 | E87DC9FC-8C4E-468B-BBA5-03D810BB71E0 135 | ECBA4CA0-275F-460E-85BE-F82FEA2E2B07 136 | ECBA4CA0-275F-460E-85BE-F82FEA2E2B0A 137 | ECBA4CA0-275F-460E-85BE-F82FEA2E2B02 138 | 897B3073-FF95-4D71-A581-206EF3FF59D6 139 | 140 | uuid 141 | 900968B5-AF02-48CD-AEDD-105595DE37DB 142 | 143 | 144 | -------------------------------------------------------------------------------- /Support/res/ddoc_theme.css: -------------------------------------------------------------------------------- 1 | html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, 2 | blockquote, pre, a, abbr, address, cite, code, del, dfn, em, figure, 3 | img, ins, kbd, q, s, samp, small, strong, sub, sup, var, b, u, i, dl, 4 | dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, 5 | tbody, tfoot, thead, tr, th, td { 6 | background: transparent none repeat scroll 0 0; 7 | border: 0 none; 8 | font-size: 100%; 9 | margin: 0; 10 | outline: 0 none; 11 | padding: 0; 12 | vertical-align: baseline; 13 | } 14 | 15 | .color_red { color: #dc322f; } 16 | .color_blue { color: #268bd2; } 17 | .color_green { color: #859901; } 18 | .color_yellow { color: #b58901; } 19 | .color_black { color: black; } 20 | .color_white { color: white; } 21 | 22 | .font_big { 23 | font-size: 1.2em; 24 | } 25 | 26 | .ddoc_section_h { 27 | font-weight: bold; 28 | font-size: 13px; 29 | line-height: 19.5px; 30 | margin-top: 11px; 31 | display: block; 32 | } 33 | 34 | body.dlang .dlang { 35 | display: inline-block; 36 | } 37 | 38 | body.dlang .declaration .dlang { 39 | display: block; 40 | } 41 | 42 | body.dlang .ddoc_header_anchor a.dlang { 43 | display: block; 44 | color: rgba(0, 136, 204, 1); 45 | text-decoration: none; 46 | } 47 | 48 | body.dlang .ddoc_header_anchor .code { 49 | color: rgba(0, 136, 204, 1); 50 | } 51 | 52 | #ddoc_main .module { 53 | overflow-x: hidden; 54 | } 55 | 56 | #ddoc_main .section .section { 57 | margin-top: 0; 58 | } 59 | 60 | #ddoc_main .ddoc_module_members_section { 61 | padding: 1px 0 0; 62 | transition: transform 0.3s ease 0s; 63 | } 64 | 65 | #ddoc_main .ddoc_member, #ddoc_main .ddoc_module_members section.intro { 66 | background: #fff none repeat scroll 0 0; 67 | list-style-type: none; 68 | width: 100%; 69 | } 70 | 71 | #ddoc_main .ddoc_header_anchor { 72 | font-size: 1.4em; 73 | transition: transform 0.3s ease 0s; 74 | } 75 | 76 | #ddoc_main .ddoc_header_anchor > .code { 77 | display: inline-block; 78 | 79 | } 80 | 81 | #ddoc_main .ddoc_decl { 82 | background-color: transparent; 83 | height: 100%; 84 | left: 0; 85 | top: 0; 86 | padding: 0; 87 | } 88 | 89 | #ddoc_main .ddoc_decl .section, #ddoc_main .section.ddoc_sections { 90 | background: white none repeat scroll 0 0; 91 | margin: 0; 92 | padding: 5px; 93 | position: relative; 94 | border-radius: 5px; 95 | } 96 | 97 | #ddoc_main .ddoc_decl .section h4, #ddoc_main .section.ddoc_sections h4 { 98 | font-size: 13px; 99 | line-height: 1.5; 100 | margin-top: 21px; 101 | } 102 | 103 | #ddoc_main .section .declaration { 104 | margin-top: 21px; 105 | } 106 | 107 | #ddoc_main .section .declaration .code { 108 | color: rgba(0, 0, 0, 1); 109 | margin-bottom: 15px; 110 | padding-bottom: 6px; 111 | } 112 | 113 | #ddoc_main .declaration div .para { 114 | margin-bottom: 0; 115 | } 116 | 117 | #ddoc_main .ddoc_params .graybox tr td:first-of-type { 118 | padding: 7px; 119 | text-align: right; 120 | vertical-align: top; 121 | word-break: normal; 122 | white-space: nowrap; 123 | } 124 | 125 | #ddoc_main .ddoc_params .graybox { 126 | border: 0 none; 127 | } 128 | 129 | #ddoc_main .ddoc_params .graybox td { 130 | border-color: rgba(214, 214, 214, 1); 131 | } 132 | 133 | #ddoc_main .ddoc_params .graybox tr:first-child > td { 134 | border-top: 0 none; 135 | } 136 | 137 | #ddoc_main .ddoc_params .graybox tr:last-child > td { 138 | border-bottom: 0 none; 139 | } 140 | 141 | #ddoc_main .ddoc_params .graybox tr > td:first-child { 142 | border-left: 0 none; 143 | } 144 | 145 | #ddoc_main .ddoc_params .graybox tr > td:last-child { 146 | border-right: 0 none; 147 | width: 100%; 148 | } 149 | 150 | #ddoc_main em.term, #ddoc_main em.term .code { 151 | color: rgba(65, 65, 65, 1); 152 | font-size: 12px; 153 | font-style: italic; 154 | line-height: 1.5; 155 | } 156 | 157 | #ddoc_main .see-also { 158 | cursor: pointer; 159 | font-family: Menlo,monospace; 160 | } 161 | 162 | #ddoc_main .ddoc_decl .section > div:last-of-type { 163 | margin-bottom: 15px; 164 | } 165 | 166 | #ddoc_main .ddoc_member, #ddoc_main .ddoc_module_members { 167 | transition: transform 0.3s ease 0s; 168 | } 169 | 170 | #ddoc_main .code_sample { 171 | background: inherit; 172 | } 173 | 174 | #ddoc_main .declaration .code-line { 175 | display: block; 176 | font: 1em Menlo,monospace; 177 | } 178 | 179 | #ddoc_main a[name] { 180 | margin: -112px 0 0; 181 | padding-top: 112px; 182 | } 183 | 184 | #ddoc_main .ddoc_decl td { 185 | max-width: inherit; 186 | } 187 | 188 | #ddoc_main .declaration a { 189 | color: inherit; 190 | } 191 | 192 | #ddoc_main .declaration a:hover { 193 | color: rgba(0, 136, 204, 1); 194 | text-decoration: underline; 195 | } 196 | 197 | body.ddoc { 198 | background-color: transparent; 199 | color: rgba(0, 0, 0, 1); 200 | font-family: Helvetica,Arial,sans-serif; 201 | font-size: 62.5%; 202 | margin: 0; 203 | border: 0; 204 | left: 0; 205 | top: 0; 206 | padding: 0; 207 | } 208 | 209 | .ddoc a[name] { 210 | display: block; 211 | height: 0; 212 | margin: -85px 0 0; 213 | padding-top: 85px; 214 | width: 0; 215 | } 216 | 217 | .ddoc .module { 218 | border-color: transparent; 219 | background-color: rgba(255, 255, 255, 1); 220 | display: block; 221 | margin-left: 0; 222 | min-height: calc(100% - 173px); 223 | overflow: auto; 224 | } 225 | 226 | .ddoc .content_wrapper { 227 | background-color: rgba(242, 242, 242, 1); 228 | margin: 0; 229 | } 230 | 231 | .ddoc .section { 232 | padding: 15px 25px 30px; 233 | } 234 | 235 | .ddoc .section .section { 236 | margin: 30px 0 0; 237 | padding: 0; 238 | } 239 | 240 | .ddoc .para { 241 | color: rgba(65, 65, 65, 1); 242 | font-size: 1.4em; 243 | line-height: 145%; 244 | margin-bottom: 15px; 245 | } 246 | 247 | .ddoc .ddoc_examples .para { 248 | margin-bottom: 0; 249 | } 250 | 251 | .ddoc .module_name { 252 | color: rgba(0, 0, 0, 1); 253 | display: block; 254 | font-family: Helvetica; 255 | font-size: 2.8em; 256 | font-weight: 100; 257 | margin-bottom: 0; 258 | padding: 15px 0; 259 | } 260 | 261 | .ddoc .module a { 262 | color: rgba(0, 136, 204, 1); 263 | text-decoration: none; 264 | } 265 | 266 | .ddoc .code { 267 | color: rgba(128, 128, 128, 1); 268 | font-family: Menlo,monospace; 269 | font-size: 0.85em; 270 | word-wrap: break-word; 271 | } 272 | 273 | .ddoc .code i { 274 | font-style: normal; 275 | } 276 | 277 | .ddoc .code .code { 278 | font-size: 1em; 279 | } 280 | 281 | .ddoc .code_sample { 282 | background-clip: padding-box; 283 | margin: 1px 0; 284 | text-align: left; 285 | } 286 | 287 | .ddoc .code_sample { 288 | display: block; 289 | font-size: 1.4em; 290 | } 291 | 292 | .ddoc ol .code_sample { 293 | font-size: 1em; 294 | } 295 | 296 | .ddoc .code_lines { 297 | counter-reset: li; 298 | line-height: 1.6em; 299 | list-style: outside none none; 300 | margin: 0; 301 | padding: 0; 302 | } 303 | 304 | .ddoc .code_listing .code_sample div { 305 | margin-left: 13px; 306 | width: 93%; 307 | } 308 | 309 | .ddoc .code_listing .code_sample div .code_lines li { 310 | list-style-type: none; 311 | margin: 0; 312 | padding-right: 10px; 313 | } 314 | 315 | .ddoc .code_sample div .code_lines li::before { 316 | margin-left: -33px; 317 | margin-right: 25px; 318 | } 319 | 320 | .ddoc .code_sample div .code_lines li:nth-child(n+10)::before { 321 | margin-left: -39px; 322 | margin-right: 25px; 323 | } 324 | 325 | .ddoc .code_sample div .code_lines li:nth-child(n+100)::before { 326 | margin-left: -46px; 327 | margin-right: 25px; 328 | } 329 | 330 | .ddoc .code_sample .code_lines .code { 331 | color: #000; 332 | } 333 | 334 | .ddoc div.dlang { 335 | margin: 10px 0 21px; 336 | padding: 4px 0 2px 10px; 337 | } 338 | 339 | .ddoc div.dlang { 340 | margin: 10px 0 21px; 341 | padding: 4px 0 2px 10px; 342 | } 343 | 344 | .ddoc div.dlang { 345 | border-left: 5px solid rgba(0, 155, 51, 0.2); 346 | } 347 | 348 | .ddoc .code_lines li::before { 349 | color: rgba(128, 128, 128, 1); 350 | content: counter(li, decimal); 351 | counter-increment: li; 352 | font-family: Menlo,monospace; 353 | font-size: 0.9em; 354 | margin-right: 16px; 355 | } 356 | 357 | .ddoc .code_lines li { 358 | padding-left: 0; 359 | white-space: pre-wrap; 360 | } 361 | 362 | .ddoc .code_lines li:only-of-type::before { 363 | color: rgba(255, 255, 255, 1); 364 | content: " "; 365 | } 366 | 367 | .ddoc .code_lines li:only-of-type { 368 | color: rgba(255, 255, 255, 1); 369 | content: " "; 370 | } 371 | 372 | .ddoc .code_lines li:nth-child(n+10) { 373 | text-indent: -17px; 374 | } 375 | 376 | .ddoc .code_lines li:nth-child(n+10)::before { 377 | margin-right: 12px; 378 | } 379 | 380 | .ddoc .graybox { 381 | border: 1px solid rgba(233, 233, 233, 1); 382 | border-collapse: collapse; 383 | border-spacing: 0; 384 | empty-cells: hide; 385 | margin: 20px 0 36px; 386 | text-align: left; 387 | } 388 | 389 | .ddoc .graybox p { 390 | margin: 0; 391 | min-width: 50px; 392 | } 393 | 394 | .ddoc td { 395 | border: 1px solid rgba(233, 233, 233, 1); 396 | margin: 0; 397 | max-width: 260px; 398 | padding: 5px 25px 5px 10px; 399 | vertical-align: middle; 400 | } 401 | 402 | .punctuation { 403 | color: rgba(0, 0, 0, 1); 404 | } 405 | 406 | .comment { 407 | color: rgba(0, 131, 18, 1); 408 | } 409 | 410 | .operator { 411 | color: #000; 412 | } 413 | 414 | .keyword { 415 | color: rgba(170, 13, 145, 1); 416 | } 417 | 418 | .keyword_type { 419 | color: rgba(170, 51, 145, 1); 420 | } 421 | 422 | .string_literal { 423 | color: rgba(196, 26, 22, 1); 424 | } 425 | 426 | .ddoc_psuper_symbol { 427 | color: rgba(92, 38, 153, 1); 428 | } 429 | 430 | .param { 431 | color: rgba(0, 0, 0, 1); 432 | } 433 | 434 | .psymbol { 435 | color: rgba(0, 0, 0, 1); 436 | } 437 | 438 | .ddoc_member_header .ddoc_header_anchor .code { 439 | font-size: 1em; 440 | } 441 | -------------------------------------------------------------------------------- /Syntaxes/D.tmLanguage: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | comment 6 | D language 7 | fileTypes 8 | 9 | d 10 | di 11 | 12 | firstLineMatch 13 | ^#!.*\bg?dmd\b. 14 | keyEquivalent 15 | ^~D 16 | name 17 | D 18 | patterns 19 | 20 | 21 | match 22 | \A#!.+ 23 | name 24 | comment.line.number-sign.shebang.d 25 | 26 | 27 | captures 28 | 29 | 0 30 | 31 | name 32 | punctuation.definition.comment.d 33 | 34 | 35 | match 36 | /\*\*/ 37 | name 38 | comment.block.empty.d 39 | 40 | 41 | include 42 | text.html.javadoc 43 | 44 | 45 | captures 46 | 47 | 2 48 | 49 | name 50 | keyword.other.debug.d 51 | 52 | 4 53 | 54 | name 55 | keyword.other.debug.d 56 | 57 | 5 58 | 59 | name 60 | keyword.other.debug.d 61 | 62 | 63 | match 64 | \s*(\b(deprecated|unittest|debug)\b|(\b(static)\b\s+)?\b(assert)\b) 65 | name 66 | meta.other.debug.d 67 | 68 | 69 | captures 70 | 71 | 1 72 | 73 | name 74 | keyword.control.version.d 75 | 76 | 2 77 | 78 | name 79 | keyword.control.version.d 80 | 81 | 3 82 | 83 | name 84 | constant.language.version.d 85 | 86 | 4 87 | 88 | name 89 | invalid.deprecated.version.d 90 | 91 | 92 | match 93 | (?x)(?<=^|\}|:)\s* 94 | (else\s+)?(version)\s* 95 | (?: 96 | \(\s* 97 | (?: 98 | ( 99 | DigitalMars| 100 | GNU| 101 | LDC| 102 | SDC| 103 | Windows| 104 | Win32| 105 | Win64| 106 | linux| 107 | OSX| 108 | FreeBSD| 109 | OpenBSD| 110 | NetBSD| 111 | DragonFlyBSD| 112 | BSD| 113 | Solaris| 114 | Posix| 115 | AIX| 116 | Haiku| 117 | SkyOS| 118 | SysV3| 119 | SysV4| 120 | Hurd| 121 | Android| 122 | Emscripten| 123 | PlayStation| 124 | PlayStation4| 125 | Cygwin| 126 | MinGW| 127 | FreeStanding| 128 | CppRuntime_Clang| 129 | CppRuntime_DigitalMars| 130 | CppRuntime_Gcc| 131 | CppRuntime_Microsoft| 132 | CppRuntime_Sun| 133 | CRuntime_Bionic| 134 | CRuntime_DigitalMars| 135 | CRuntime_Glibc| 136 | CRuntime_Microsoft| 137 | CRuntime_Musl| 138 | CRuntime_UClibc| 139 | CRuntime_WASI| 140 | X86| 141 | X86_64| 142 | ARM| 143 | ARM_Thumb| 144 | ARM_SoftFloat| 145 | ARM_SoftFP| 146 | ARM_HardFloat| 147 | AArch64| 148 | AsmJS| 149 | Epiphany| 150 | PPC| 151 | PPC_SoftFloat| 152 | PPC_HardFloat| 153 | PPC64| 154 | IA64| 155 | MIPS32| 156 | MIPS64| 157 | MIPS_O32| 158 | MIPS_N32| 159 | MIPS_O64| 160 | MIPS_N64| 161 | MIPS_EABI| 162 | MIPS_SoftFloat| 163 | MIPS_HardFloat| 164 | NVPTX| 165 | NVPTX64| 166 | RISCV32| 167 | RISCV64| 168 | SPARC| 169 | SPARC_V8Plus| 170 | SPARC_SoftFloat| 171 | SPARC_HardFloat| 172 | SPARC64| 173 | S390| 174 | SystemZ| 175 | HPPA| 176 | HPPA64| 177 | SH| 178 | WebAssembly| 179 | WASI| 180 | Alpha| 181 | Alpha_SoftFloat| 182 | Alpha_HardFloat| 183 | LittleEndian| 184 | BigEndian| 185 | ELFv1| 186 | ELFv2| 187 | D_BetterC| 188 | D_Coverage| 189 | D_Ddoc| 190 | D_InlineAsm_X86| 191 | D_InlineAsm_X86_64| 192 | D_LP64| 193 | D_X32| 194 | D_HardFloat| 195 | D_SoftFloat| 196 | D_PIC| 197 | D_SIMD| 198 | D_AVX| 199 | D_AVX2| 200 | D_Version2| 201 | D_NoBoundsChecks| 202 | D_ObjectiveC| 203 | unittest| 204 | assert| 205 | none| 206 | all 207 | )| 208 | (darwin|Thumb|S390X)| 209 | (?:[A-Za-z_][A-Za-z0-9_]*) 210 | ) 211 | \s*\) 212 | )? 213 | name 214 | meta.version.d 215 | 216 | 217 | captures 218 | 219 | 2 220 | 221 | name 222 | keyword.control.conditional.d 223 | 224 | 4 225 | 226 | name 227 | keyword.control.conditional.d 228 | 229 | 5 230 | 231 | name 232 | keyword.control.conditional.d 233 | 234 | 235 | match 236 | \s*\b((else|switch)|((static)\s+)?(if))\b 237 | name 238 | meta.control.conditional.d 239 | 240 | 241 | begin 242 | (?x)(?<=^|\}|;)\s* 243 | (?<meta_modifier> 244 | (?: 245 | (?: 246 | (?:(?:\b(?:public|private|protected|static|final|synchronized|abstract|export|shared)\b)) | 247 | (?:\b(?:extern)\b(?:\s*\(\s*(?:(?:(?:C\+\+)(?:\s*,\s*[A-Za-z_][A-Za-z0-9._]*)?)|\b(?:C|D|Windows|Pascal|System|Objective-C)\b)\s*\))?) 248 | )\s* 249 | )* 250 | ) 251 | (?<structure>class|interface)\s+ 252 | (?<identifier>\w+)\s* # identifier 253 | (?:\(\s*(?<template_params>[^\)]+)\s*\)|)\s* # Template type 254 | (?: 255 | \s*(?<inheritance_separator>:)\s* 256 | (?<inherited>\w+) 257 | (?:\s*,\s*(?<inherited>\w+))? 258 | (?:\s*,\s*(?<inherited>\w+))? 259 | (?:\s*,\s*(?<inherited>\w+))? 260 | (?:\s*,\s*(?<inherited>\w+))? 261 | (?:\s*,\s*(?<inherited>\w+))? 262 | (?:\s*,\s*(?<inherited>\w+))? 263 | )? # super class 264 | 265 | beginCaptures 266 | 267 | identifier 268 | 269 | name 270 | entity.name.type.class.d 271 | 272 | inheritance_separator 273 | 274 | name 275 | punctuation.separator.inheritance.d 276 | 277 | inherited 278 | 279 | name 280 | entity.other.inherited-class.d 281 | 282 | meta_modifier 283 | 284 | patterns 285 | 286 | 287 | include 288 | #meta-modifier 289 | 290 | 291 | 292 | structure 293 | 294 | name 295 | storage.type.structure.d 296 | 297 | template_params 298 | 299 | patterns 300 | 301 | 302 | include 303 | $base 304 | 305 | 306 | 307 | 308 | end 309 | (?={|;) 310 | name 311 | meta.definition.class.d 312 | patterns 313 | 314 | 315 | begin 316 | \b(_|:)\b 317 | captures 318 | 319 | 1 320 | 321 | name 322 | storage.modifier.d 323 | 324 | 325 | end 326 | (?={) 327 | name 328 | meta.definition.class.extends.d 329 | patterns 330 | 331 | 332 | include 333 | #all-types 334 | 335 | 336 | 337 | 338 | include 339 | #template-constraint-d 340 | 341 | 342 | 343 | 344 | begin 345 | (?x)(?<=^|\}|;)\s* 346 | (?<meta_modifier> 347 | (?: 348 | (?: 349 | (?:(?:\b(?:public|private|protected|static|final|synchronized|abstract|export|shared)\b)) | 350 | (?:\b(?:extern)\b(?:\s*\(\s*(?:(?:(?:C\+\+)(?:\s*,\s*[A-Za-z_][A-Za-z0-9._]*)?)|\b(?:C|D|Windows|Pascal|System|Objective-C)\b)\s*\))?) 351 | )\s* 352 | )* 353 | ) 354 | (?<structure>struct)\s+ 355 | (?<identifier>\w+)\s* 356 | (?:\(\s*(?<template_params>[^\)]+)\s*\)|)\s* 357 | 358 | beginCaptures 359 | 360 | identifier 361 | 362 | name 363 | entity.name.type.struct.d 364 | 365 | meta_modifier 366 | 367 | patterns 368 | 369 | 370 | include 371 | #meta-modifier 372 | 373 | 374 | 375 | structure 376 | 377 | name 378 | storage.type.structure.d 379 | 380 | template_params 381 | 382 | patterns 383 | 384 | 385 | include 386 | $base 387 | 388 | 389 | 390 | 391 | end 392 | (?={|;) 393 | name 394 | meta.definition.struct.d 395 | patterns 396 | 397 | 398 | begin 399 | \b(_|:)\b 400 | captures 401 | 402 | 1 403 | 404 | name 405 | storage.modifier.d 406 | 407 | 408 | end 409 | (?={) 410 | name 411 | meta.definition.class.extends.d 412 | patterns 413 | 414 | 415 | include 416 | #all-types 417 | 418 | 419 | 420 | 421 | include 422 | #template-constraint-d 423 | 424 | 425 | 426 | 427 | begin 428 | (?x)(?<=^|\}|;)\s* 429 | ((?:\b(public|private|protected|static|final|synchronized|abstract|export)\b\s*)*) # modifier 430 | (\b(this))\s* # identifier 431 | (?=\() 432 | captures 433 | 434 | 1 435 | 436 | name 437 | storage.modifier.d 438 | 439 | 3 440 | 441 | name 442 | entity.name.function.constructor.d 443 | 444 | 445 | end 446 | (?={|;) 447 | name 448 | meta.definition.constructor.d 449 | patterns 450 | 451 | 452 | include 453 | $base 454 | 455 | 456 | 457 | 458 | begin 459 | (?x) 460 | (?: ^ # begin-of-line 461 | | (?: (?<!else|new|=) ) # or word + space before name 462 | ) 463 | ((?:\b(?:public|private|protected|static|final|synchronized|abstract|export)\b\s*)*) # modifier 464 | (~this) # actual name 465 | \s*(\() # start bracket or end-of-line 466 | 467 | captures 468 | 469 | 1 470 | 471 | name 472 | storage.modifier.d 473 | 474 | 2 475 | 476 | name 477 | entity.name.function.destructor.d 478 | 479 | 480 | end 481 | \) 482 | endCaptures 483 | 484 | 0 485 | 486 | name 487 | punctuation.definition.parameters.d 488 | 489 | 490 | name 491 | meta.definition.destructor.d 492 | patterns 493 | 494 | 495 | include 496 | $base 497 | 498 | 499 | 500 | 501 | begin 502 | (?x)(?<=^|\}|;)\s* 503 | ((?:\b(?:public|private|protected|static|final|synchronized|abstract|export|override|auto|nothrow|immutable|const|inout|ref|shared)\b\s*)*) # modifier 504 | (?:(_|\w[^"'`\s]*))\s+ # return type 505 | (\w+)\s* # identifier 506 | (?=\() 507 | beginCaptures 508 | 509 | 1 510 | 511 | name 512 | storage.modifier.d 513 | 514 | 2 515 | 516 | patterns 517 | 518 | 519 | include 520 | $base 521 | 522 | 523 | 524 | 3 525 | 526 | name 527 | entity.name.function.d 528 | 529 | 530 | end 531 | (?={|;) 532 | name 533 | meta.definition.method.d 534 | patterns 535 | 536 | 537 | include 538 | $base 539 | 540 | 541 | include 542 | #block 543 | 544 | 545 | 546 | 547 | begin 548 | (?x)(?<=^|;)\s* 549 | (__traits) 550 | \( 551 | (isAbstractClass| 552 | isArithmetic| 553 | isAssociativeArray| 554 | isFinalClass| 555 | isPOD| 556 | isNested| 557 | isFloating| 558 | isIntegral| 559 | isScalar| 560 | isStaticArray| 561 | isUnsigned| 562 | isVirtualFunction| 563 | isVirtualMethod| 564 | isAbstractFunction| 565 | isFinalFunction| 566 | isStaticFunction| 567 | isOverrideFunction| 568 | isRef| 569 | isOut| 570 | isLazy| 571 | hasMember| 572 | identifier| 573 | getAliasThis| 574 | getAttributes| 575 | getFunctionAttributes| 576 | getMember| 577 | getOverloads| 578 | getPointerBitmap| 579 | getProtection| 580 | getVirtualFunctions| 581 | getVirtualMethods| 582 | getUnitTests| 583 | parent| 584 | classInstanceSize| 585 | getVirtualIndex| 586 | allMembers| 587 | derivedMembers| 588 | isSame| 589 | compiles) 590 | 591 | beginCaptures 592 | 593 | 1 594 | 595 | name 596 | keyword.other.special.d 597 | 598 | 2 599 | 600 | name 601 | constant.language.traits.d 602 | 603 | 604 | end 605 | \); 606 | name 607 | meta.traits.d 608 | patterns 609 | 610 | 611 | include 612 | $base 613 | 614 | 615 | 616 | 617 | captures 618 | 619 | 1 620 | 621 | patterns 622 | 623 | 624 | include 625 | #meta-external 626 | 627 | 628 | 629 | 630 | match 631 | (\b(?:extern)\b(?:\s*\(\s*(?:(?:(?:C\+\+)(?:\s*,\s*[A-Za-z_][A-Za-z0-9._]*)?)|\b(?:C|D|Windows|Pascal|System|Objective-C)\b)\s*\))?) 632 | name 633 | meta.external.d 634 | 635 | 636 | match 637 | \b([A-Z][A-Z0-9_]+)\b 638 | name 639 | constant.other.d 640 | 641 | 642 | include 643 | #comments 644 | 645 | 646 | include 647 | #all-types 648 | 649 | 650 | match 651 | \b(private|protected|public|export|package)\b 652 | name 653 | storage.modifier.access-control.d 654 | 655 | 656 | match 657 | (?x) 658 | \b( 659 | auto| 660 | static| 661 | override| 662 | final| 663 | abstract| 664 | volatile| 665 | synchronized| 666 | lazy| 667 | nothrow| 668 | immutable| 669 | const| 670 | inout| 671 | ref| 672 | in| 673 | scope| 674 | __gshared| 675 | shared| 676 | pure 677 | ) 678 | \b| 679 | (@)( 680 | property| 681 | disable| 682 | nogc| 683 | live| 684 | safe| 685 | trusted| 686 | system 687 | )\b 688 | name 689 | storage.modifier.d 690 | 691 | 692 | match 693 | \b(template|interface|class|enum|struct|union)\b 694 | name 695 | storage.type.structure.d 696 | 697 | 698 | match 699 | (?x) 700 | \b( 701 | ushort| 702 | int| 703 | uint| 704 | long| 705 | ulong| 706 | float| 707 | void| 708 | byte| 709 | ubyte| 710 | double| 711 | char| 712 | wchar| 713 | ucent| 714 | cent| 715 | short| 716 | bool| 717 | dchar| 718 | real| 719 | ireal| 720 | ifloat| 721 | idouble| 722 | creal| 723 | cfloat| 724 | cdouble| 725 | lazy| 726 | __vector 727 | )\b 728 | name 729 | storage.type.d 730 | 731 | 732 | match 733 | \b(try|catch|finally|throw)\b 734 | name 735 | keyword.control.exception.d 736 | 737 | 738 | match 739 | \b(return|break|case|continue|default|do|while|for|switch|if|else)\b 740 | name 741 | keyword.control.d 742 | 743 | 744 | match 745 | \b(goto|break|continue)\b 746 | name 747 | keyword.control.branch.d 748 | 749 | 750 | match 751 | \b(while|for|do|foreach(_reverse)?)\b 752 | name 753 | keyword.control.repeat.d 754 | 755 | 756 | match 757 | \b(return|with|invariant|body|scope|asm|mixin|function|delegate|out|in)\b 758 | name 759 | keyword.control.statement.d 760 | 761 | 762 | match 763 | \b(pragma)\b 764 | name 765 | keyword.control.pragma.d 766 | 767 | 768 | match 769 | \b(alias|typedef)\b 770 | name 771 | keyword.control.alias.d 772 | 773 | 774 | match 775 | \b(import)\b 776 | name 777 | keyword.control.import.d 778 | 779 | 780 | captures 781 | 782 | 1 783 | 784 | name 785 | keyword.control.module.d 786 | 787 | 2 788 | 789 | name 790 | entity.name.function.package.d 791 | 792 | 793 | match 794 | ^\s*(module)\s+([^ ;]+?); 795 | name 796 | meta.module.d 797 | 798 | 799 | match 800 | \b(true|false)\b 801 | name 802 | constant.language.boolean.d 803 | 804 | 805 | match 806 | (?x) 807 | \b( 808 | __FILE__| 809 | __LINE__| 810 | __DATE__| 811 | __TIME__| 812 | __TIMESTAMP__| 813 | __MODULE__| 814 | __FUNCTION__| 815 | __PRETTY_FUNCTION__| 816 | __VENDOR__| 817 | __VERSION__| 818 | null 819 | )\b 820 | name 821 | constant.language.d 822 | 823 | 824 | match 825 | \b(this|super)\b 826 | name 827 | variable.language.d 828 | 829 | 830 | match 831 | \b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?)([LlFfUuDd]|UL|ul)?\b 832 | name 833 | constant.numeric.d 834 | 835 | 836 | include 837 | #string_escaped_char 838 | 839 | 840 | include 841 | #strings 842 | 843 | 844 | match 845 | (==|!=|<=|>=|<>|<|>) 846 | name 847 | keyword.operator.comparison.d 848 | 849 | 850 | match 851 | (\-\-|\+\+) 852 | name 853 | keyword.operator.increment-decrement.d 854 | 855 | 856 | match 857 | (\-|\+|\*|\/|~|%|\^|\^\^)=? 858 | name 859 | keyword.operator.arithmetic.d 860 | 861 | 862 | match 863 | (\.\.\.) 864 | name 865 | keyword.operator.variadic.d 866 | 867 | 868 | match 869 | (\.\.) 870 | name 871 | keyword.operator.slice.d 872 | 873 | 874 | match 875 | (!|&&|\|\|) 876 | name 877 | keyword.operator.logical.d 878 | 879 | 880 | match 881 | (?x) 882 | \b( 883 | opNeg| 884 | opCom| 885 | opPostInc| 886 | opPostDec| 887 | opCast| 888 | opAdd| 889 | opSub| 890 | opSub_r| 891 | opMul| 892 | opDiv| 893 | opDiv_r| 894 | opMod| 895 | opMod_r| 896 | opAnd| 897 | opOr| 898 | opXor| 899 | opShl| 900 | opShl_r| 901 | opShr| 902 | opShr_r| 903 | opUShr| 904 | opUShr_r| 905 | opCat| 906 | opCat_r| 907 | opEquals| 908 | opEquals| 909 | opCmp| 910 | opCmp| 911 | opCmp| 912 | opCmp| 913 | opAddAssign| 914 | opSubAssign| 915 | opMulAssign| 916 | opDivAssign| 917 | opModAssign| 918 | opAndAssign| 919 | opOrAssign| 920 | opXorAssign| 921 | opShlAssign| 922 | opShrAssign| 923 | opUShrAssign| 924 | opCatAssign| 925 | opIndex| 926 | opIndexAssign| 927 | opCall| 928 | opSlice| 929 | opSliceAssign| 930 | opPos| 931 | opAdd_r| 932 | opMul_r| 933 | opAnd_r| 934 | opOr_r| 935 | opXor_r| 936 | opDispatch 937 | )\b 938 | name 939 | keyword.operator.overload.d 940 | 941 | 942 | match 943 | => 944 | name 945 | keyword.operator.lambda.d 946 | 947 | 948 | match 949 | \b(new|delete|typeof|typeid|cast|align|is)\b 950 | name 951 | keyword.operator.d 952 | 953 | 954 | match 955 | \b(new)\b 956 | name 957 | keyword.other.class-fns.d 958 | 959 | 960 | match 961 | \b(__parameters)\b|(#)line\b 962 | name 963 | keyword.other.special.d 964 | 965 | 966 | match 967 | \b(macro)\b 968 | name 969 | keyword.other.reserved.d 970 | 971 | 972 | match 973 | (?x) 974 | \b( 975 | u_char| 976 | u_short| 977 | u_int| 978 | u_long| 979 | ushort| 980 | uint| 981 | u_quad_t| 982 | quad_t| 983 | qaddr_t| 984 | caddr_t| 985 | daddr_t| 986 | dev_t| 987 | fixpt_t| 988 | blkcnt_t| 989 | blksize_t| 990 | gid_t| 991 | in_addr_t| 992 | in_port_t| 993 | ino_t| 994 | key_t| 995 | mode_t| 996 | nlink_t| 997 | id_t| 998 | pid_t| 999 | off_t| 1000 | segsz_t| 1001 | swblk_t| 1002 | uid_t| 1003 | id_t| 1004 | clock_t| 1005 | size_t| 1006 | ssize_t| 1007 | time_t| 1008 | useconds_t| 1009 | suseconds_t 1010 | )\b 1011 | name 1012 | support.type.sys-types.c 1013 | 1014 | 1015 | match 1016 | (?x) 1017 | \b( 1018 | pthread_attr_t| 1019 | pthread_cond_t| 1020 | pthread_condattr_t| 1021 | pthread_mutex_t| 1022 | pthread_mutexattr_t| 1023 | pthread_once_t| 1024 | pthread_rwlock_t| 1025 | pthread_rwlockattr_t| 1026 | pthread_t| 1027 | pthread_key_t 1028 | )\b 1029 | name 1030 | support.type.pthread.c 1031 | 1032 | 1033 | match 1034 | (?x) 1035 | \b( 1036 | int8_t| 1037 | int16_t| 1038 | int32_t| 1039 | int64_t| 1040 | uint8_t| 1041 | uint16_t| 1042 | uint32_t| 1043 | uint64_t| 1044 | int_least8_t| 1045 | int_least16_t| 1046 | int_least32_t| 1047 | int_least64_t| 1048 | uint_least8_t| 1049 | uint_least16_t| 1050 | uint_least32_t| 1051 | uint_least64_t| 1052 | int_fast8_t| 1053 | int_fast16_t| 1054 | int_fast32_t| 1055 | int_fast64_t| 1056 | uint_fast8_t| 1057 | uint_fast16_t| 1058 | uint_fast32_t| 1059 | uint_fast64_t| 1060 | intptr_t| 1061 | uintptr_t| 1062 | intmax_t| 1063 | intmax_t| 1064 | uintmax_t| 1065 | uintmax_t 1066 | )\b 1067 | name 1068 | support.type.stdint.c 1069 | 1070 | 1071 | include 1072 | #block 1073 | 1074 | 1075 | repository 1076 | 1077 | all-types 1078 | 1079 | patterns 1080 | 1081 | 1082 | include 1083 | #support-type-built-ins-d 1084 | 1085 | 1086 | include 1087 | #support-type-d 1088 | 1089 | 1090 | include 1091 | #storage-type-d 1092 | 1093 | 1094 | 1095 | block 1096 | 1097 | patterns 1098 | 1099 | 1100 | begin 1101 | \{ 1102 | beginCaptures 1103 | 1104 | 0 1105 | 1106 | name 1107 | punctuation.section.block.begin.d 1108 | 1109 | 1110 | end 1111 | \} 1112 | endCaptures 1113 | 1114 | 0 1115 | 1116 | name 1117 | punctuation.section.block.end.d 1118 | 1119 | 1120 | name 1121 | meta.block.d 1122 | patterns 1123 | 1124 | 1125 | include 1126 | $base 1127 | 1128 | 1129 | 1130 | 1131 | 1132 | comments 1133 | 1134 | patterns 1135 | 1136 | 1137 | begin 1138 | /\* 1139 | captures 1140 | 1141 | 0 1142 | 1143 | name 1144 | punctuation.definition.comment.d 1145 | 1146 | 1147 | end 1148 | \*/ 1149 | name 1150 | comment.block.d 1151 | 1152 | 1153 | include 1154 | #nested_comment 1155 | 1156 | 1157 | begin 1158 | (^[ \t]+)?(?=//) 1159 | beginCaptures 1160 | 1161 | 1 1162 | 1163 | name 1164 | punctuation.whitespace.comment.leading.d 1165 | 1166 | 1167 | end 1168 | (?!\G) 1169 | patterns 1170 | 1171 | 1172 | begin 1173 | // 1174 | beginCaptures 1175 | 1176 | 0 1177 | 1178 | name 1179 | punctuation.definition.comment.d 1180 | 1181 | 1182 | end 1183 | \n 1184 | name 1185 | comment.line.double-slash.d 1186 | 1187 | 1188 | 1189 | 1190 | 1191 | constant_placeholder 1192 | 1193 | match 1194 | (?i:%(\([a-z_]+\))?#?0?\-?[ ]?\+?([0-9]*|\*)(\.([0-9]*|\*))?[hL]?[a-z%]) 1195 | name 1196 | constant.other.placeholder.d 1197 | 1198 | meta-external 1199 | 1200 | captures 1201 | 1202 | identifier 1203 | 1204 | name 1205 | constant.language.external.d 1206 | 1207 | keyword 1208 | 1209 | name 1210 | keyword.other.external.d 1211 | 1212 | 1213 | match 1214 | \b(?<keyword>extern)\b(\s*\(\s*(?:(?:(?<identifier>C\+\+)(?:\s*,\s*[A-Za-z_][A-Za-z0-9._]*)?)|(?<identifier>C|D|Windows|Pascal|System|Objective-C))\s*\))? 1215 | name 1216 | meta.external.d 1217 | 1218 | meta-modifier 1219 | 1220 | captures 1221 | 1222 | meta_external 1223 | 1224 | patterns 1225 | 1226 | 1227 | include 1228 | #meta-external 1229 | 1230 | 1231 | 1232 | modifier 1233 | 1234 | name 1235 | storage.modifier.d 1236 | 1237 | 1238 | match 1239 | (?x) 1240 | (?: 1241 | (?<modifier>\b(?:public|private|protected|static|final|synchronized|abstract|export|shared)\b) | 1242 | (?<meta_external>\b(?:extern)\b(?:\s*\(\s*(?:(?:(?:C\+\+)(?:\s*,\s*[A-Za-z_][A-Za-z0-9._]*)?)|\b(?:C|D|Windows|Pascal|System|Objective-C)\b)\s*\))?) 1243 | )\s* 1244 | 1245 | name 1246 | meta.modifier.d 1247 | 1248 | nested_comment 1249 | 1250 | patterns 1251 | 1252 | 1253 | begin 1254 | /\+ 1255 | captures 1256 | 1257 | 0 1258 | 1259 | name 1260 | punctuation.definition.comment.d 1261 | 1262 | 1263 | end 1264 | \+/ 1265 | name 1266 | comment.block.nested.d 1267 | patterns 1268 | 1269 | 1270 | include 1271 | #nested_comment 1272 | 1273 | 1274 | 1275 | 1276 | 1277 | regular_expressions 1278 | 1279 | comment 1280 | Change disabled to 1 to turn off syntax highlighting in “r” strings. 1281 | disabled 1282 | 1 1283 | patterns 1284 | 1285 | 1286 | include 1287 | source.regexp.python 1288 | 1289 | 1290 | 1291 | statement-remainder 1292 | 1293 | patterns 1294 | 1295 | 1296 | begin 1297 | \( 1298 | end 1299 | (?=\)) 1300 | name 1301 | meta.definition.param-list.d 1302 | patterns 1303 | 1304 | 1305 | include 1306 | #all-types 1307 | 1308 | 1309 | 1310 | 1311 | 1312 | storage-type-d 1313 | 1314 | match 1315 | \b(void|byte|short|char|int|long|float|double)\b 1316 | name 1317 | storage.type.d 1318 | 1319 | string_escaped_char 1320 | 1321 | patterns 1322 | 1323 | 1324 | match 1325 | \\(\\|[abefnprtv'"?]|[0-3]\d{0,2}|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8}|&\w+;) 1326 | name 1327 | constant.character.escape.d 1328 | 1329 | 1330 | match 1331 | \\. 1332 | name 1333 | invalid.illegal.unknown-escape.d 1334 | 1335 | 1336 | 1337 | strings 1338 | 1339 | patterns 1340 | 1341 | 1342 | begin 1343 | " 1344 | beginCaptures 1345 | 1346 | 0 1347 | 1348 | name 1349 | punctuation.definition.string.begin.d 1350 | 1351 | 1352 | end 1353 | " 1354 | endCaptures 1355 | 1356 | 0 1357 | 1358 | name 1359 | punctuation.definition.string.end.d 1360 | 1361 | 1362 | name 1363 | string.quoted.double.d 1364 | patterns 1365 | 1366 | 1367 | include 1368 | #string_escaped_char 1369 | 1370 | 1371 | 1372 | 1373 | begin 1374 | (r)(") 1375 | beginCaptures 1376 | 1377 | 1 1378 | 1379 | name 1380 | storage.type.string.d 1381 | 1382 | 2 1383 | 1384 | name 1385 | punctuation.definition.string.begin.d 1386 | 1387 | 1388 | end 1389 | ((?<=")(")|") 1390 | endCaptures 1391 | 1392 | 1 1393 | 1394 | name 1395 | punctuation.definition.string.end.d 1396 | 1397 | 2 1398 | 1399 | name 1400 | meta.empty-string.double.d 1401 | 1402 | 1403 | name 1404 | string.quoted.double.raw.d 1405 | patterns 1406 | 1407 | 1408 | include 1409 | #regular_expressions 1410 | 1411 | 1412 | 1413 | 1414 | begin 1415 | ` 1416 | beginCaptures 1417 | 1418 | 0 1419 | 1420 | name 1421 | punctuation.definition.string.begin.d 1422 | 1423 | 1424 | end 1425 | ((?<=`)(`)|`) 1426 | endCaptures 1427 | 1428 | 1 1429 | 1430 | name 1431 | punctuation.definition.string.end.d 1432 | 1433 | 2 1434 | 1435 | name 1436 | meta.empty-string.double.d 1437 | 1438 | 1439 | name 1440 | string.quoted.double.raw.backtick.d 1441 | 1442 | 1443 | begin 1444 | ' 1445 | beginCaptures 1446 | 1447 | 0 1448 | 1449 | name 1450 | punctuation.definition.string.begin.d 1451 | 1452 | 1453 | end 1454 | ' 1455 | endCaptures 1456 | 1457 | 0 1458 | 1459 | name 1460 | punctuation.definition.string.end.d 1461 | 1462 | 1463 | name 1464 | string.quoted.single.d 1465 | patterns 1466 | 1467 | 1468 | include 1469 | #string_escaped_char 1470 | 1471 | 1472 | 1473 | 1474 | 1475 | support-type-built-ins-aliases-d 1476 | 1477 | match 1478 | \b(dstring|equals_t|hash_t|ptrdiff_t|sizediff_t|size_t|string|wstring)\b 1479 | name 1480 | support.type.built-ins.aliases.d 1481 | 1482 | support-type-built-ins-classes-d 1483 | 1484 | match 1485 | (?x) 1486 | \b( 1487 | AbstractServer| 1488 | ArchiveMember| 1489 | ArgParser| 1490 | Barrier| 1491 | BomSniffer| 1492 | Buffer| 1493 | BufferInput| 1494 | BufferOutput| 1495 | BufferSlice| 1496 | BufferedFile| 1497 | BufferedStream| 1498 | BzipInput| 1499 | BzipOutput| 1500 | CFile| 1501 | CacheInvalidatee| 1502 | CacheInvalidator| 1503 | CacheServer| 1504 | CacheThread| 1505 | Certificate| 1506 | CertificateStore| 1507 | CertificateStoreCtx| 1508 | ChunkInput| 1509 | ChunkOutput| 1510 | ClassInfo| 1511 | Cluster| 1512 | ClusterCache| 1513 | ClusterQueue| 1514 | ClusterThread| 1515 | CmdParser| 1516 | ComObject| 1517 | Compress| 1518 | Condition| 1519 | Conduit| 1520 | Cookie| 1521 | CookieParser| 1522 | CookieStack| 1523 | CounterInput| 1524 | CounterOutput| 1525 | DataFileInput| 1526 | DataFileOutput| 1527 | DataInput| 1528 | DataOutput| 1529 | Database| 1530 | DatagramConduit| 1531 | DeviceConduit| 1532 | DigestInput| 1533 | DigestOutput| 1534 | DocPrinter| 1535 | Document| 1536 | DummyInputStream| 1537 | DummyOutputStream| 1538 | EndianInput| 1539 | EndianOutput| 1540 | EndianProtocol| 1541 | EndianStream| 1542 | EventSeekInputStream| 1543 | EventSeekOutputStream| 1544 | FTPConnection| 1545 | Fiber| 1546 | Field| 1547 | File| 1548 | FileConduit| 1549 | FileFolder| 1550 | FileGroup| 1551 | FileInput| 1552 | FileOutput| 1553 | FilePath| 1554 | FileScan| 1555 | FilterStream| 1556 | Foo| 1557 | FormatOutput| 1558 | GreedyInput| 1559 | GreedyOutput| 1560 | Gregorian| 1561 | GrowBuffer| 1562 | HeapCopy| 1563 | HeapSlice| 1564 | Hierarchy| 1565 | HttpClient| 1566 | HttpCookies| 1567 | HttpCookiesView| 1568 | HttpGet| 1569 | HttpHeaders| 1570 | HttpHeadersView| 1571 | HttpParams| 1572 | HttpPost| 1573 | HttpStack| 1574 | HttpTokens| 1575 | HttpTriplet| 1576 | IPv4Address| 1577 | IUnknown| 1578 | InputFilter| 1579 | InternetAddress| 1580 | InternetHost| 1581 | Layout| 1582 | LineInput| 1583 | LineIterator| 1584 | LinkedFolder| 1585 | Log| 1586 | MapInput| 1587 | MapOutput| 1588 | MappedBuffer| 1589 | Md2| 1590 | Md4| 1591 | MemoryQueue| 1592 | MemoryStream| 1593 | MmFile| 1594 | MmFileStream| 1595 | ModuleInfo| 1596 | MulticastConduit| 1597 | Mutex| 1598 | NativeProtocol| 1599 | NetCall| 1600 | NetHost| 1601 | NetworkAlert| 1602 | NetworkCache| 1603 | NetworkCall| 1604 | NetworkClient| 1605 | NetworkCombo| 1606 | NetworkMessage| 1607 | NetworkQueue| 1608 | NetworkRegistry| 1609 | NetworkTask| 1610 | NotImplemented| 1611 | Object| 1612 | Observer| 1613 | OutBuffer| 1614 | OutputFilter| 1615 | PersistQueue| 1616 | Pipe| 1617 | PipeConduit| 1618 | Print| 1619 | PrivateKey| 1620 | Process| 1621 | Properties| 1622 | Protocol| 1623 | ProtocolReader| 1624 | ProtocolWriter| 1625 | PublicKey| 1626 | PullParser| 1627 | QueueFile| 1628 | QueueServer| 1629 | QueueThread| 1630 | QueuedCache| 1631 | QuoteIterator| 1632 | Random| 1633 | Range| 1634 | ReadWriteMutex| 1635 | Reader| 1636 | Record| 1637 | RegExp| 1638 | RegExpT| 1639 | RegexIterator| 1640 | RollCall| 1641 | SSLCtx| 1642 | SSLServerSocket| 1643 | SSLSocketConduit| 1644 | SaxParser| 1645 | SelectionKey| 1646 | Semaphore| 1647 | ServerSocket| 1648 | ServerThread| 1649 | Service| 1650 | SimpleIterator| 1651 | SliceInputStream| 1652 | SliceSeekInputStream| 1653 | SliceSeekOutputStream| 1654 | SliceStream| 1655 | SnoopInput| 1656 | SnoopOutput| 1657 | Socket| 1658 | SocketConduit| 1659 | SocketListener| 1660 | SocketSet| 1661 | SocketStream| 1662 | Sprint| 1663 | Stream| 1664 | StreamIterator| 1665 | TArrayStream| 1666 | TaskServer| 1667 | TaskThread| 1668 | TcpSocket| 1669 | Telnet| 1670 | TempFile| 1671 | Text| 1672 | TextFileInput| 1673 | TextFileOutput| 1674 | TextView| 1675 | Thread| 1676 | ThreadGroup| 1677 | ThreadLocal| 1678 | ThreadPool| 1679 | Token| 1680 | TypeInfo| 1681 | TypeInfo_AC| 1682 | TypeInfo_Aa| 1683 | TypeInfo_Ab| 1684 | TypeInfo_Ac| 1685 | TypeInfo_Ad| 1686 | TypeInfo_Ae| 1687 | TypeInfo_Af| 1688 | TypeInfo_Ag| 1689 | TypeInfo_Ah| 1690 | TypeInfo_Ai| 1691 | TypeInfo_Aj| 1692 | TypeInfo_Ak| 1693 | TypeInfo_Al| 1694 | TypeInfo_Am| 1695 | TypeInfo_Ao| 1696 | TypeInfo_Ap| 1697 | TypeInfo_Aq| 1698 | TypeInfo_Ar| 1699 | TypeInfo_Array| 1700 | TypeInfo_As| 1701 | TypeInfo_AssociativeArray| 1702 | TypeInfo_At| 1703 | TypeInfo_Au| 1704 | TypeInfo_Av| 1705 | TypeInfo_Aw| 1706 | TypeInfo_C| 1707 | TypeInfo_Class| 1708 | TypeInfo_D| 1709 | TypeInfo_Delegate| 1710 | TypeInfo_Enum| 1711 | TypeInfo_Function| 1712 | TypeInfo_Interface| 1713 | TypeInfo_P| 1714 | TypeInfo_Pointer| 1715 | TypeInfo_StaticArray| 1716 | TypeInfo_Struct| 1717 | TypeInfo_Tuple| 1718 | TypeInfo_Typedef| 1719 | TypeInfo_a| 1720 | TypeInfo_b| 1721 | TypeInfo_c| 1722 | TypeInfo_d| 1723 | TypeInfo_e| 1724 | TypeInfo_f| 1725 | TypeInfo_g| 1726 | TypeInfo_h| 1727 | TypeInfo_i| 1728 | TypeInfo_j| 1729 | TypeInfo_k| 1730 | TypeInfo_l| 1731 | TypeInfo_m| 1732 | TypeInfo_o| 1733 | TypeInfo_p| 1734 | TypeInfo_q| 1735 | TypeInfo_r| 1736 | TypeInfo_s| 1737 | TypeInfo_t| 1738 | TypeInfo_u| 1739 | TypeInfo_v| 1740 | TypeInfo_w| 1741 | TypedInput| 1742 | TypedOutput| 1743 | URIerror| 1744 | UdpSocket| 1745 | UnCompress| 1746 | UniText| 1747 | UnicodeBom| 1748 | UnicodeFile| 1749 | UnknownAddress| 1750 | Uri| 1751 | UtfInput| 1752 | UtfOutput| 1753 | VirtualFolder| 1754 | WrapSeekInputStream| 1755 | WrapSeekOutputStream| 1756 | Writer| 1757 | XmlPrinter| 1758 | ZipArchive| 1759 | ZipBlockReader| 1760 | ZipBlockWriter| 1761 | ZipEntry| 1762 | ZipEntryVerifier| 1763 | ZipFile| 1764 | ZipFileGroup| 1765 | ZipFolder| 1766 | ZipSubFolder| 1767 | ZipSubFolderEntry| 1768 | ZipSubFolderGroup| 1769 | ZlibInput| 1770 | ZlibOutput 1771 | )\b 1772 | name 1773 | support.type.built-ins.classes.d 1774 | 1775 | support-type-built-ins-d 1776 | 1777 | patterns 1778 | 1779 | 1780 | include 1781 | #support-type-built-ins-exceptions-d 1782 | 1783 | 1784 | include 1785 | #support-type-built-ins-classes-d 1786 | 1787 | 1788 | include 1789 | #support-type-built-ins-interfaces-d 1790 | 1791 | 1792 | include 1793 | #support-type-built-ins-structs-d 1794 | 1795 | 1796 | include 1797 | #support-type-built-ins-aliases-d 1798 | 1799 | 1800 | include 1801 | #support-type-built-ins-functions-d 1802 | 1803 | 1804 | include 1805 | #support-type-built-ins-templates-d 1806 | 1807 | 1808 | 1809 | support-type-built-ins-exceptions-d 1810 | 1811 | match 1812 | (?x) 1813 | \b( 1814 | AddressException| 1815 | ArrayBoundsError| 1816 | ArrayBoundsException| 1817 | AssertError| 1818 | AssertException| 1819 | Base64CharException| 1820 | Base64Exception| 1821 | BzipClosedException| 1822 | BzipException| 1823 | ClusterEmptyException| 1824 | ClusterFullException| 1825 | ConvError| 1826 | ConvOverflowError| 1827 | ConversionException| 1828 | CorruptedIteratorException| 1829 | DatabaseException| 1830 | DateParseError| 1831 | Exception| 1832 | FTPException| 1833 | FiberException| 1834 | FileException| 1835 | FinalizeException| 1836 | FormatError| 1837 | HostException| 1838 | IOException| 1839 | IllegalArgumentException| 1840 | IllegalElementException| 1841 | InvalidKeyException| 1842 | InvalidTypeException| 1843 | LocaleException| 1844 | ModuleCtorError| 1845 | NoSuchElementException| 1846 | OpenException| 1847 | OpenRJException| 1848 | OutOfMemoryException| 1849 | PlatformException| 1850 | ProcessCreateException| 1851 | ProcessException| 1852 | ProcessForkException| 1853 | ProcessKillException| 1854 | ProcessWaitException| 1855 | ReadException| 1856 | RegExpException| 1857 | RegexException| 1858 | RegistryException| 1859 | SeekException| 1860 | SharedLibException| 1861 | SocketAcceptException| 1862 | SocketException| 1863 | StdioException| 1864 | StreamException| 1865 | StreamFileException| 1866 | StringException| 1867 | SwitchError| 1868 | SwitchException| 1869 | SyncException| 1870 | TextException| 1871 | ThreadError| 1872 | ThreadException| 1873 | UnboxException| 1874 | UnicodeException| 1875 | UtfException| 1876 | VariantTypeMismatchException| 1877 | Win32Exception| 1878 | WriteException| 1879 | XmlException| 1880 | ZipChecksumException| 1881 | ZipException| 1882 | ZipExhaustedException| 1883 | ZipNotSupportedException| 1884 | ZlibClosedException| 1885 | ZlibException| 1886 | OurUnwindException| 1887 | SysError 1888 | )\b 1889 | name 1890 | support.type.built-ins.exceptions.d 1891 | 1892 | support-type-built-ins-functions-d 1893 | 1894 | match 1895 | (?x) 1896 | \b( 1897 | aaLiteral| 1898 | assumeSafeAppend| 1899 | byKey| 1900 | byKeyValue| 1901 | byValue| 1902 | capacity| 1903 | destroy| 1904 | dup| 1905 | get| 1906 | keys| 1907 | rehash| 1908 | reserve| 1909 | values 1910 | )\b 1911 | name 1912 | support.type.built-ins.functions.d 1913 | 1914 | support-type-built-ins-interfaces-d 1915 | 1916 | match 1917 | (?x) 1918 | \b( 1919 | Buffered| 1920 | HttpParamsView| 1921 | ICache| 1922 | IChannel| 1923 | IClassFactory| 1924 | ICluster| 1925 | IConduit| 1926 | IConsumer| 1927 | IEvent| 1928 | IHierarchy| 1929 | ILevel| 1930 | IListener| 1931 | IMessage| 1932 | IMessageLoader| 1933 | IOStream| 1934 | IReadable| 1935 | ISelectable| 1936 | ISelectionSet| 1937 | ISelector| 1938 | IServer| 1939 | IUnknown| 1940 | IWritable| 1941 | IXmlPrinter| 1942 | InputStream| 1943 | OutputStream| 1944 | PathView| 1945 | VfsFile| 1946 | VfsFiles| 1947 | VfsFolder| 1948 | VfsFolderEntry| 1949 | VfsFolders| 1950 | VfsHost| 1951 | VfsSync| 1952 | ZipReader| 1953 | ZipWriter 1954 | )\b 1955 | name 1956 | support.type.built-ins.interfaces.d 1957 | 1958 | support-type-built-ins-structs-d 1959 | 1960 | match 1961 | (?x) 1962 | \b( 1963 | ABC| 1964 | ABCFLOAT| 1965 | ACCEL| 1966 | ACCESSTIMEOUT| 1967 | ACCESS_ALLOWED_ACE| 1968 | ACCESS_DENIED_ACE| 1969 | ACE_HEADER| 1970 | ACL| 1971 | ACL_REVISION_INFORMATION| 1972 | ACL_SIZE_INFORMATION| 1973 | ACTION_HEADER| 1974 | ADAPTER_STATUS| 1975 | ADDJOB_INFO_1| 1976 | ANIMATIONINFO| 1977 | APPBARDATA| 1978 | Argument| 1979 | Atomic| 1980 | Attribute| 1981 | BITMAP| 1982 | BITMAPCOREHEADER| 1983 | BITMAPCOREINFO| 1984 | BITMAPINFO| 1985 | BITMAPINFOHEADER| 1986 | BITMAPV4HEADER| 1987 | BLOB| 1988 | BROWSEINFO| 1989 | BY_HANDLE_FILE_INFORMATION| 1990 | Bar| 1991 | Baz| 1992 | BitArray| 1993 | Box| 1994 | BracketResult| 1995 | ByteSwap| 1996 | CANDIDATEFORM| 1997 | CANDIDATELIST| 1998 | CBTACTIVATESTRUCT| 1999 | CBT_CREATEWND| 2000 | CHARFORMAT| 2001 | CHARRANGE| 2002 | CHARSET| 2003 | CHARSETINFO| 2004 | CHAR_INFO| 2005 | CIDA| 2006 | CIEXYZ| 2007 | CIEXYZTRIPLE| 2008 | CLIENTCREATESTRUCT| 2009 | CMINVOKECOMMANDINFO| 2010 | COLORADJUSTMENT| 2011 | COLORMAP| 2012 | COMMCONFIG| 2013 | COMMPROP| 2014 | COMMTIMEOUTS| 2015 | COMPAREITEMSTRUCT| 2016 | COMPCOLOR| 2017 | COMPOSITIONFORM| 2018 | COMSTAT| 2019 | CONNECTDLGSTRUCT| 2020 | CONSOLE_CURSOR_INFO| 2021 | CONTEXT| 2022 | CONVCONTEXT| 2023 | CONVINFO| 2024 | COORD| 2025 | COPYDATASTRUCT| 2026 | CPINFO| 2027 | CPLINFO| 2028 | CREATESTRUCT| 2029 | CREATE_PROCESS_DEBUG_INFO| 2030 | CREATE_THREAD_DEBUG_INFO| 2031 | CRITICAL_SECTION| 2032 | CRITICAL_SECTION_DEBUG| 2033 | CURRENCYFMT| 2034 | CURSORSHAPE| 2035 | CWPRETSTRUCT| 2036 | CWPSTRUCT| 2037 | CharClass| 2038 | CharRange| 2039 | Clock| 2040 | CodePage| 2041 | Console| 2042 | DATATYPES_INFO_1| 2043 | DCB| 2044 | DDEACK| 2045 | DDEADVISE| 2046 | DDEDATA| 2047 | DDELN| 2048 | DDEML_MSG_HOOK_DATA| 2049 | DDEPOKE| 2050 | DDEUP| 2051 | DEBUGHOOKINFO| 2052 | DEBUG_EVENT| 2053 | DELETEITEMSTRUCT| 2054 | DEVMODE| 2055 | DEVNAMES| 2056 | DEV_BROADCAST_HDR| 2057 | DEV_BROADCAST_OEM| 2058 | DEV_BROADCAST_PORT| 2059 | DEV_BROADCAST_VOLUME| 2060 | DIBSECTION| 2061 | DIR| 2062 | DISCDLGSTRUCT| 2063 | DISK_GEOMETRY| 2064 | DISK_PERFORMANCE| 2065 | DOCINFO| 2066 | DOC_INFO_1| 2067 | DOC_INFO_2| 2068 | DRAGLISTINFO| 2069 | DRAWITEMSTRUCT| 2070 | DRAWTEXTPARAMS| 2071 | DRIVER_INFO_1| 2072 | DRIVER_INFO_2| 2073 | DRIVER_INFO_3| 2074 | DRIVE_LAYOUT_INFORMATION| 2075 | Date| 2076 | DateParse| 2077 | DateTime| 2078 | DirEntry| 2079 | DynArg| 2080 | EDITSTREAM| 2081 | EMPTYRECORD| 2082 | EMR| 2083 | EMRABORTPATH| 2084 | EMRANGLEARC| 2085 | EMRARC| 2086 | EMRBITBLT| 2087 | EMRCREATEBRUSHINDIRECT| 2088 | EMRCREATECOLORSPACE| 2089 | EMRCREATEDIBPATTERNBRUSHPT| 2090 | EMRCREATEMONOBRUSH| 2091 | EMRCREATEPALETTE| 2092 | EMRCREATEPEN| 2093 | EMRELLIPSE| 2094 | EMREOF| 2095 | EMREXCLUDECLIPRECT| 2096 | EMREXTCREATEFONTINDIRECTW| 2097 | EMREXTCREATEPEN| 2098 | EMREXTFLOODFILL| 2099 | EMREXTSELECTCLIPRGN| 2100 | EMREXTTEXTOUTA| 2101 | EMRFILLPATH| 2102 | EMRFILLRGN| 2103 | EMRFORMAT| 2104 | EMRFRAMERGN| 2105 | EMRGDICOMMENT| 2106 | EMRINVERTRGN| 2107 | EMRLINETO| 2108 | EMRMASKBLT| 2109 | EMRMODIFYWORLDTRANSFORM| 2110 | EMROFFSETCLIPRGN| 2111 | EMRPLGBLT| 2112 | EMRPOLYDRAW| 2113 | EMRPOLYDRAW16| 2114 | EMRPOLYLINE| 2115 | EMRPOLYLINE16| 2116 | EMRPOLYPOLYLINE| 2117 | EMRPOLYPOLYLINE16| 2118 | EMRPOLYTEXTOUTA| 2119 | EMRRESIZEPALETTE| 2120 | EMRRESTOREDC| 2121 | EMRROUNDRECT| 2122 | EMRSCALEVIEWPORTEXTEX| 2123 | EMRSELECTCLIPPATH| 2124 | EMRSELECTCOLORSPACE| 2125 | EMRSELECTOBJECT| 2126 | EMRSELECTPALETTE| 2127 | EMRSETARCDIRECTION| 2128 | EMRSETBKCOLOR| 2129 | EMRSETCOLORADJUSTMENT| 2130 | EMRSETDIBITSTODEVICE| 2131 | EMRSETMAPPERFLAGS| 2132 | EMRSETMITERLIMIT| 2133 | EMRSETPALETTEENTRIES| 2134 | EMRSETPIXELV| 2135 | EMRSETVIEWPORTEXTEX| 2136 | EMRSETVIEWPORTORGEX| 2137 | EMRSETWORLDTRANSFORM| 2138 | EMRSTRETCHBLT| 2139 | EMRSTRETCHDIBITS| 2140 | EMRTEXT| 2141 | ENCORRECTTEXT| 2142 | ENDROPFILES| 2143 | ENHMETAHEADER| 2144 | ENHMETARECORD| 2145 | ENOLEOPFAILED| 2146 | ENPROTECTED| 2147 | ENSAVECLIPBOARD| 2148 | ENUMLOGFONT| 2149 | ENUMLOGFONTEX| 2150 | ENUM_SERVICE_STATUS| 2151 | EVENTLOGRECORD| 2152 | EVENTMSG| 2153 | EXCEPTION_DEBUG_INFO| 2154 | EXCEPTION_POINTERS| 2155 | EXCEPTION_RECORD| 2156 | EXIT_PROCESS_DEBUG_INFO| 2157 | EXIT_THREAD_DEBUG_INFO| 2158 | EXTLOGFONT| 2159 | EXTLOGPEN| 2160 | EXT_BUTTON| 2161 | EmptySlot| 2162 | EndOfCDRecord| 2163 | Environment| 2164 | FILETIME| 2165 | FILTERKEYS| 2166 | FINDREPLACE| 2167 | FINDTEXTEX| 2168 | FIND_NAME_BUFFER| 2169 | FIND_NAME_HEADER| 2170 | FIXED| 2171 | FLOATING_SAVE_AREA| 2172 | FMS_GETDRIVEINFO| 2173 | FMS_GETFILESEL| 2174 | FMS_LOAD| 2175 | FMS_TOOLBARLOAD| 2176 | FOCUS_EVENT_RECORD| 2177 | FONTSIGNATURE| 2178 | FORMATRANGE| 2179 | FORMAT_PARAMETERS| 2180 | FORM_INFO_1| 2181 | FileConst| 2182 | FileHeader| 2183 | FileRoots| 2184 | FileSystem| 2185 | FoldingCaseData| 2186 | Foo| 2187 | FtpConnectionDetail| 2188 | FtpFeature| 2189 | FtpFileInfo| 2190 | FtpResponse| 2191 | GC| 2192 | GCP_RESULTS| 2193 | GCStats| 2194 | GENERIC_MAPPING| 2195 | GLYPHMETRICS| 2196 | GLYPHMETRICSFLOAT| 2197 | GROUP_INFO_2| 2198 | GUID| 2199 | HANDLETABLE| 2200 | HD_HITTESTINFO| 2201 | HD_ITEM| 2202 | HD_LAYOUT| 2203 | HD_NOTIFY| 2204 | HELPINFO| 2205 | HELPWININFO| 2206 | HIGHCONTRAST| 2207 | HSZPAIR| 2208 | HeaderElement| 2209 | HttpConst| 2210 | HttpHeader| 2211 | HttpHeaderName| 2212 | HttpResponses| 2213 | HttpStatus| 2214 | HttpToken| 2215 | ICONINFO| 2216 | ICONMETRICS| 2217 | IMAGEINFO| 2218 | IMAGE_DOS_HEADER| 2219 | INPUT_RECORD| 2220 | ITEMIDLIST| 2221 | IeeeFlags| 2222 | Interface| 2223 | JOB_INFO_1| 2224 | JOB_INFO_2| 2225 | KERNINGPAIR| 2226 | LANA_ENUM| 2227 | LAYERPLANEDESCRIPTOR| 2228 | LDT_ENTRY| 2229 | LIST_ENTRY| 2230 | LOAD_DLL_DEBUG_INFO| 2231 | LOCALESIGNATURE| 2232 | LOCALGROUP_INFO_0| 2233 | LOCALGROUP_MEMBERS_INFO_0| 2234 | LOCALGROUP_MEMBERS_INFO_3| 2235 | LOGBRUSH| 2236 | LOGCOLORSPACE| 2237 | LOGFONT| 2238 | LOGFONTA| 2239 | LOGFONTW| 2240 | LOGPALETTE| 2241 | LOGPEN| 2242 | LUID_AND_ATTRIBUTES| 2243 | LV_COLUMN| 2244 | LV_DISPINFO| 2245 | LV_FINDINFO| 2246 | LV_HITTESTINFO| 2247 | LV_ITEM| 2248 | LV_KEYDOWN| 2249 | LocalFileHeader| 2250 | MAT2| 2251 | MD5_CTX| 2252 | MDICREATESTRUCT| 2253 | MEASUREITEMSTRUCT| 2254 | MEMORYSTATUS| 2255 | MEMORY_BASIC_INFORMATION| 2256 | MENUEX_TEMPLATE_HEADER| 2257 | MENUEX_TEMPLATE_ITEM| 2258 | MENUITEMINFO| 2259 | MENUITEMTEMPLATE| 2260 | MENUITEMTEMPLATEHEADER| 2261 | MENUTEMPLATE| 2262 | MENU_EVENT_RECORD| 2263 | METAFILEPICT| 2264 | METARECORD| 2265 | MINIMIZEDMETRICS| 2266 | MINMAXINFO| 2267 | MODEMDEVCAPS| 2268 | MODEMSETTINGS| 2269 | MONCBSTRUCT| 2270 | MONCONVSTRUCT| 2271 | MONERRSTRUCT| 2272 | MONHSZSTRUCT| 2273 | MONITOR_INFO_1| 2274 | MONITOR_INFO_2| 2275 | MONLINKSTRUCT| 2276 | MONMSGSTRUCT| 2277 | MOUSEHOOKSTRUCT| 2278 | MOUSEKEYS| 2279 | MOUSE_EVENT_RECORD| 2280 | MSG| 2281 | MSGBOXPARAMS| 2282 | MSGFILTER| 2283 | MULTIKEYHELP| 2284 | NAME_BUFFER| 2285 | NCB| 2286 | NCCALCSIZE_PARAMS| 2287 | NDDESHAREINFO| 2288 | NETCONNECTINFOSTRUCT| 2289 | NETINFOSTRUCT| 2290 | NETRESOURCE| 2291 | NEWCPLINFO| 2292 | NEWTEXTMETRIC| 2293 | NEWTEXTMETRICEX| 2294 | NMHDR| 2295 | NM_LISTVIEW| 2296 | NM_TREEVIEW| 2297 | NM_UPDOWNW| 2298 | NONCLIENTMETRICS| 2299 | NS_SERVICE_INFO| 2300 | NUMBERFMT| 2301 | OFNOTIFY| 2302 | OFSTRUCT| 2303 | OPENFILENAME| 2304 | OPENFILENAMEA| 2305 | OPENFILENAMEW| 2306 | OSVERSIONINFO| 2307 | OUTLINETEXTMETRIC| 2308 | OUTPUT_DEBUG_STRING_INFO| 2309 | OVERLAPPED| 2310 | OffsetTypeInfo| 2311 | PAINTSTRUCT| 2312 | PALETTEENTRY| 2313 | PANOSE| 2314 | PARAFORMAT| 2315 | PARTITION_INFORMATION| 2316 | PERF_COUNTER_BLOCK| 2317 | PERF_COUNTER_DEFINITION| 2318 | PERF_DATA_BLOCK| 2319 | PERF_INSTANCE_DEFINITION| 2320 | PERF_OBJECT_TYPE| 2321 | PIXELFORMATDESCRIPTOR| 2322 | POINT| 2323 | POINTFLOAT| 2324 | POINTFX| 2325 | POINTL| 2326 | POINTS| 2327 | POLYTEXT| 2328 | PORT_INFO_1| 2329 | PORT_INFO_2| 2330 | PREVENT_MEDIA_REMOVAL| 2331 | PRINTER_DEFAULTS| 2332 | PRINTER_INFO_1| 2333 | PRINTER_INFO_2| 2334 | PRINTER_INFO_3| 2335 | PRINTER_INFO_4| 2336 | PRINTER_INFO_5| 2337 | PRINTER_NOTIFY_INFO| 2338 | PRINTER_NOTIFY_INFO_DATA| 2339 | PRINTER_NOTIFY_OPTIONS| 2340 | PRINTER_NOTIFY_OPTIONS_TYPE| 2341 | PRINTPROCESSOR_INFO_1| 2342 | PRIVILEGE_SET| 2343 | PROCESS_HEAPENTRY| 2344 | PROCESS_INFORMATION| 2345 | PROPSHEETHEADER| 2346 | PROPSHEETHEADER_U1| 2347 | PROPSHEETHEADER_U2| 2348 | PROPSHEETHEADER_U3| 2349 | PROPSHEETPAGE| 2350 | PROPSHEETPAGE_U1| 2351 | PROPSHEETPAGE_U2| 2352 | PROTOCOL_INFO| 2353 | PROVIDOR_INFO_1| 2354 | PSHNOTIFY| 2355 | PUNCTUATION| 2356 | PassByCopy| 2357 | PassByRef| 2358 | Phase1Info| 2359 | PropertyConfigurator| 2360 | QUERY_SERVICE_CONFIG| 2361 | QUERY_SERVICE_LOCK_STATUS| 2362 | RASAMB| 2363 | RASCONN| 2364 | RASCONNSTATUS| 2365 | RASDIALEXTENSIONS| 2366 | RASDIALPARAMS| 2367 | RASENTRYNAME| 2368 | RASPPPIP| 2369 | RASPPPIPX| 2370 | RASPPPNBF| 2371 | RASTERIZER_STATUS| 2372 | REASSIGN_BLOCKS| 2373 | RECT| 2374 | RECTL| 2375 | REMOTE_NAME_INFO| 2376 | REPASTESPECIAL| 2377 | REQRESIZE| 2378 | RGBQUAD| 2379 | RGBTRIPLE| 2380 | RGNDATA| 2381 | RGNDATAHEADER| 2382 | RIP_INFO| 2383 | Runtime| 2384 | SCROLLINFO| 2385 | SECURITY_ATTRIBUTES| 2386 | SECURITY_DESCRIPTOR| 2387 | SECURITY_QUALITY_OF_SERVICE| 2388 | SELCHANGE| 2389 | SERIALKEYS| 2390 | SERVICE_ADDRESS| 2391 | SERVICE_ADDRESSES| 2392 | SERVICE_INFO| 2393 | SERVICE_STATUS| 2394 | SERVICE_TABLE_ENTRY| 2395 | SERVICE_TYPE_INFO_ABS| 2396 | SERVICE_TYPE_VALUE_ABS| 2397 | SESSION_BUFFER| 2398 | SESSION_HEADER| 2399 | SET_PARTITION_INFORMATION| 2400 | SHFILEINFO| 2401 | SHFILEOPSTRUCT| 2402 | SHITEMID| 2403 | SHNAMEMAPPING| 2404 | SID| 2405 | SID_AND_ATTRIBUTES| 2406 | SID_IDENTIFIER_AUTHORITY| 2407 | SINGLE_LIST_ENTRY| 2408 | SIZE| 2409 | SMALL_RECT| 2410 | SOUNDSENTRY| 2411 | STARTUPINFO| 2412 | STICKYKEYS| 2413 | STRRET| 2414 | STYLEBUF| 2415 | STYLESTRUCT| 2416 | SYSTEMTIME| 2417 | SYSTEM_AUDIT_ACE| 2418 | SYSTEM_INFO| 2419 | SYSTEM_INFO_U| 2420 | SYSTEM_POWER_STATUS| 2421 | Signal| 2422 | SjLj_Function_Context| 2423 | SpecialCaseData| 2424 | TAPE_ERASE| 2425 | TAPE_GET_DRIVE_PARAMETERS| 2426 | TAPE_GET_MEDIA_PARAMETERS| 2427 | TAPE_GET_POSITION| 2428 | TAPE_PREPARE| 2429 | TAPE_SET_DRIVE_PARAMETERS| 2430 | TAPE_SET_MEDIA_PARAMETERS| 2431 | TAPE_SET_POSITION| 2432 | TAPE_WRITE_MARKS| 2433 | TBADDBITMAP| 2434 | TBBUTTON| 2435 | TBNOTIFY| 2436 | TBSAVEPARAMS| 2437 | TCHOOSECOLOR| 2438 | TCHOOSEFONT| 2439 | TC_HITTESTINFO| 2440 | TC_ITEM| 2441 | TC_ITEMHEADER| 2442 | TC_KEYDOWN| 2443 | TEXTMETRIC| 2444 | TEXTMETRICA| 2445 | TEXTRANGE| 2446 | TFINDTEXT| 2447 | TIME_ZONE_INFORMATION| 2448 | TOGGLEKEYS| 2449 | TOKEN_CONTROL| 2450 | TOKEN_DEFAULT_DACL| 2451 | TOKEN_GROUPS| 2452 | TOKEN_OWNER| 2453 | TOKEN_PRIMARY_GROUP| 2454 | TOKEN_PRIVILEGES| 2455 | TOKEN_SOURCE| 2456 | TOKEN_STATISTICS| 2457 | TOKEN_USER| 2458 | TOOLINFO| 2459 | TOOLTIPTEXT| 2460 | TPAGESETUPDLG| 2461 | TPMPARAMS| 2462 | TRANSMIT_FILE_BUFFERS| 2463 | TREEITEM| 2464 | TSMALLPOINT| 2465 | TTHITTESTINFO| 2466 | TTPOLYCURVE| 2467 | TTPOLYGONHEADER| 2468 | TVARIANT| 2469 | TV_DISPINFO| 2470 | TV_HITTESTINFO| 2471 | TV_INSERTSTRUCT| 2472 | TV_ITEM| 2473 | TV_KEYDOWN| 2474 | TV_SORTCB| 2475 | Time| 2476 | TimeOfDay| 2477 | TimeSpan| 2478 | Tuple| 2479 | UDACCEL| 2480 | ULARGE_INTEGER| 2481 | UNIVERSAL_NAME_INFO| 2482 | UNLOAD_DLL_DEBUG_INFO| 2483 | USEROBJECTFLAGS| 2484 | USER_INFO_0| 2485 | USER_INFO_2| 2486 | USER_INFO_3| 2487 | UnicodeData| 2488 | VALENT| 2489 | VA_LIST| 2490 | VERIFY_INFORMATION| 2491 | VS_FIXEDFILEINFO| 2492 | Variant| 2493 | VfsFilterInfo| 2494 | WIN32_FILE_ATTRIBUTE_DATA| 2495 | WIN32_FIND_DATA| 2496 | WIN32_FIND_DATAW| 2497 | WIN32_STREAM_ID| 2498 | WINDOWINFO| 2499 | WINDOWPLACEMENT| 2500 | WINDOWPOS| 2501 | WINDOW_BUFFER_SIZE_RECORD| 2502 | WNDCLASS| 2503 | WNDCLASSA| 2504 | WNDCLASSEX| 2505 | WNDCLASSEXA| 2506 | WSADATA| 2507 | WallClock| 2508 | XFORM| 2509 | ZipEntryInfo 2510 | )\b 2511 | name 2512 | support.type.built-ins.structs.d 2513 | 2514 | support-type-built-ins-templates-d 2515 | 2516 | match 2517 | \b(AssociativeArray|RTInfo)\b 2518 | name 2519 | support.type.built-ins.templates.d 2520 | 2521 | support-type-d 2522 | 2523 | match 2524 | \b((?:core|std)\.[\w\.]+)\b 2525 | name 2526 | support.type.d 2527 | 2528 | template-constraint-d 2529 | 2530 | patterns 2531 | 2532 | 2533 | captures 2534 | 2535 | 1 2536 | 2537 | patterns 2538 | 2539 | 2540 | include 2541 | $base 2542 | 2543 | 2544 | 2545 | 2546 | match 2547 | \s*(if\s*\(\s*([^\)]+)\s*\)|) 2548 | name 2549 | meta.definition.template-constraint.d 2550 | 2551 | 2552 | 2553 | 2554 | scopeName 2555 | source.d 2556 | uuid 2557 | D7C3A109-0466-4C28-9ECF-10753300FF46 2558 | 2559 | 2560 | --------------------------------------------------------------------------------