[
  {
    "path": ".gitattributes",
    "content": "*.bat eol=crlf\n"
  },
  {
    "path": ".gitignore",
    "content": "/build/\n/google-app-engine/build/\n/google-app-engine/google-app-engine-yaml/build/\n/utils/build/\n/plan9/build/\n\n.gradle\n\n.idea/workspace.xml\n.idea/modules.xml\n.idea/misc.xml\n.idea/gradle.xml\n.idea/compiler.xml\n.idea/shelf/\n.idea/libraries/\n.idea/.name\n.idea/*.png\n*.iml\n\n/testData/performance/docker/\n/testData/performance/go/\n"
  },
  {
    "path": ".idea/ant.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\" />"
  },
  {
    "path": ".idea/codeStyleSettings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"ProjectCodeStyleSettingsManager\">\n    <option name=\"PER_PROJECT_SETTINGS\">\n      <value>\n        <option name=\"OTHER_INDENT_OPTIONS\">\n          <value>\n            <option name=\"INDENT_SIZE\" value=\"2\" />\n            <option name=\"CONTINUATION_INDENT_SIZE\" value=\"4\" />\n            <option name=\"TAB_SIZE\" value=\"8\" />\n            <option name=\"USE_TAB_CHARACTER\" value=\"false\" />\n            <option name=\"SMART_TABS\" value=\"false\" />\n            <option name=\"LABEL_INDENT_SIZE\" value=\"0\" />\n            <option name=\"LABEL_INDENT_ABSOLUTE\" value=\"false\" />\n            <option name=\"USE_RELATIVE_INDENTS\" value=\"false\" />\n          </value>\n        </option>\n        <option name=\"LINE_SEPARATOR\" value=\"&#10;\" />\n        <option name=\"FIELD_NAME_PREFIX\" value=\"my\" />\n        <option name=\"STATIC_FIELD_NAME_PREFIX\" value=\"our\" />\n        <option name=\"PREFER_LONGER_NAMES\" value=\"false\" />\n        <option name=\"PACKAGES_TO_USE_IMPORT_ON_DEMAND\">\n          <value>\n            <package name=\"java.awt\" withSubpackages=\"false\" static=\"false\" />\n            <package name=\"javax.tools\" withSubpackages=\"true\" static=\"false\" />\n            <package name=\"javax.swing\" withSubpackages=\"false\" static=\"false\" />\n          </value>\n        </option>\n        <option name=\"STATIC_METHODS_ORDER_WEIGHT\" value=\"5\" />\n        <option name=\"METHODS_ORDER_WEIGHT\" value=\"4\" />\n        <option name=\"RIGHT_MARGIN\" value=\"140\" />\n        <option name=\"FORMATTER_TAGS_ENABLED\" value=\"true\" />\n        <option name=\"LINE_COMMENT_AT_FIRST_COLUMN\" value=\"false\" />\n        <option name=\"BLOCK_COMMENT_AT_FIRST_COLUMN\" value=\"false\" />\n        <XML>\n          <option name=\"XML_LEGACY_SETTINGS_IMPORTED\" value=\"true\" />\n        </XML>\n        <codeStyleSettings language=\"CFML\">\n          <option name=\"ELSE_ON_NEW_LINE\" value=\"true\" />\n          <option name=\"WHILE_ON_NEW_LINE\" value=\"true\" />\n          <option name=\"CATCH_ON_NEW_LINE\" value=\"true\" />\n          <option name=\"ALIGN_MULTILINE_PARAMETERS_IN_CALLS\" value=\"true\" />\n          <option name=\"ALIGN_MULTILINE_BINARY_OPERATION\" value=\"true\" />\n          <option name=\"ALIGN_MULTILINE_TERNARY_OPERATION\" value=\"true\" />\n          <option name=\"CALL_PARAMETERS_WRAP\" value=\"1\" />\n          <option name=\"METHOD_PARAMETERS_WRAP\" value=\"5\" />\n          <option name=\"BINARY_OPERATION_WRAP\" value=\"5\" />\n          <option name=\"TERNARY_OPERATION_WRAP\" value=\"5\" />\n          <option name=\"TERNARY_OPERATION_SIGNS_ON_NEXT_LINE\" value=\"true\" />\n          <option name=\"FOR_STATEMENT_WRAP\" value=\"5\" />\n          <option name=\"ASSIGNMENT_WRAP\" value=\"1\" />\n          <option name=\"PARENT_SETTINGS_INSTALLED\" value=\"true\" />\n        </codeStyleSettings>\n        <codeStyleSettings language=\"ECMA Script Level 4\">\n          <option name=\"ELSE_ON_NEW_LINE\" value=\"true\" />\n          <option name=\"WHILE_ON_NEW_LINE\" value=\"true\" />\n          <option name=\"CATCH_ON_NEW_LINE\" value=\"true\" />\n          <option name=\"FINALLY_ON_NEW_LINE\" value=\"true\" />\n          <option name=\"ALIGN_MULTILINE_PARAMETERS_IN_CALLS\" value=\"true\" />\n          <option name=\"ALIGN_MULTILINE_BINARY_OPERATION\" value=\"true\" />\n          <option name=\"ALIGN_MULTILINE_TERNARY_OPERATION\" value=\"true\" />\n          <option name=\"ALIGN_MULTILINE_EXTENDS_LIST\" value=\"true\" />\n          <option name=\"CALL_PARAMETERS_WRAP\" value=\"1\" />\n          <option name=\"METHOD_PARAMETERS_WRAP\" value=\"5\" />\n          <option name=\"EXTENDS_LIST_WRAP\" value=\"1\" />\n          <option name=\"EXTENDS_KEYWORD_WRAP\" value=\"1\" />\n          <option name=\"BINARY_OPERATION_WRAP\" value=\"5\" />\n          <option name=\"TERNARY_OPERATION_WRAP\" value=\"5\" />\n          <option name=\"TERNARY_OPERATION_SIGNS_ON_NEXT_LINE\" value=\"true\" />\n          <option name=\"FOR_STATEMENT_WRAP\" value=\"5\" />\n          <option name=\"ARRAY_INITIALIZER_WRAP\" value=\"1\" />\n          <option name=\"ASSIGNMENT_WRAP\" value=\"1\" />\n          <option name=\"IF_BRACE_FORCE\" value=\"1\" />\n          <option name=\"DOWHILE_BRACE_FORCE\" value=\"1\" />\n          <option name=\"WHILE_BRACE_FORCE\" value=\"1\" />\n          <option name=\"FOR_BRACE_FORCE\" value=\"1\" />\n          <option name=\"PARENT_SETTINGS_INSTALLED\" value=\"true\" />\n        </codeStyleSettings>\n        <codeStyleSettings language=\"Groovy\">\n          <option name=\"KEEP_BLANK_LINES_BEFORE_RBRACE\" value=\"0\" />\n          <option name=\"ELSE_ON_NEW_LINE\" value=\"true\" />\n          <option name=\"CATCH_ON_NEW_LINE\" value=\"true\" />\n          <option name=\"FINALLY_ON_NEW_LINE\" value=\"true\" />\n          <option name=\"ALIGN_MULTILINE_PARAMETERS_IN_CALLS\" value=\"true\" />\n          <option name=\"ALIGN_MULTILINE_BINARY_OPERATION\" value=\"true\" />\n          <option name=\"ALIGN_MULTILINE_ASSIGNMENT\" value=\"true\" />\n          <option name=\"ALIGN_MULTILINE_TERNARY_OPERATION\" value=\"true\" />\n          <option name=\"ALIGN_MULTILINE_THROWS_LIST\" value=\"true\" />\n          <option name=\"ALIGN_MULTILINE_EXTENDS_LIST\" value=\"true\" />\n          <option name=\"SPACE_AFTER_TYPE_CAST\" value=\"false\" />\n          <option name=\"CALL_PARAMETERS_WRAP\" value=\"1\" />\n          <option name=\"METHOD_PARAMETERS_WRAP\" value=\"5\" />\n          <option name=\"EXTENDS_LIST_WRAP\" value=\"1\" />\n          <option name=\"THROWS_LIST_WRAP\" value=\"5\" />\n          <option name=\"EXTENDS_KEYWORD_WRAP\" value=\"1\" />\n          <option name=\"THROWS_KEYWORD_WRAP\" value=\"1\" />\n          <option name=\"METHOD_CALL_CHAIN_WRAP\" value=\"1\" />\n          <option name=\"BINARY_OPERATION_WRAP\" value=\"5\" />\n          <option name=\"TERNARY_OPERATION_WRAP\" value=\"5\" />\n          <option name=\"FOR_STATEMENT_WRAP\" value=\"5\" />\n          <option name=\"ASSIGNMENT_WRAP\" value=\"1\" />\n          <option name=\"IF_BRACE_FORCE\" value=\"1\" />\n          <option name=\"WHILE_BRACE_FORCE\" value=\"1\" />\n          <option name=\"FOR_BRACE_FORCE\" value=\"1\" />\n          <option name=\"FIELD_ANNOTATION_WRAP\" value=\"0\" />\n          <option name=\"PARENT_SETTINGS_INSTALLED\" value=\"true\" />\n          <indentOptions>\n            <option name=\"INDENT_SIZE\" value=\"2\" />\n            <option name=\"CONTINUATION_INDENT_SIZE\" value=\"2\" />\n            <option name=\"TAB_SIZE\" value=\"8\" />\n          </indentOptions>\n        </codeStyleSettings>\n        <codeStyleSettings language=\"HTML\">\n          <indentOptions>\n            <option name=\"INDENT_SIZE\" value=\"2\" />\n            <option name=\"CONTINUATION_INDENT_SIZE\" value=\"4\" />\n            <option name=\"TAB_SIZE\" value=\"8\" />\n          </indentOptions>\n        </codeStyleSettings>\n        <codeStyleSettings language=\"JAVA\">\n          <option name=\"LINE_COMMENT_AT_FIRST_COLUMN\" value=\"false\" />\n          <option name=\"BLOCK_COMMENT_AT_FIRST_COLUMN\" value=\"false\" />\n          <option name=\"KEEP_FIRST_COLUMN_COMMENT\" value=\"false\" />\n          <option name=\"KEEP_BLANK_LINES_BEFORE_RBRACE\" value=\"0\" />\n          <option name=\"ELSE_ON_NEW_LINE\" value=\"true\" />\n          <option name=\"WHILE_ON_NEW_LINE\" value=\"true\" />\n          <option name=\"CATCH_ON_NEW_LINE\" value=\"true\" />\n          <option name=\"FINALLY_ON_NEW_LINE\" value=\"true\" />\n          <option name=\"ALIGN_MULTILINE_PARAMETERS_IN_CALLS\" value=\"true\" />\n          <option name=\"ALIGN_MULTILINE_BINARY_OPERATION\" value=\"true\" />\n          <option name=\"ALIGN_MULTILINE_ASSIGNMENT\" value=\"true\" />\n          <option name=\"ALIGN_MULTILINE_TERNARY_OPERATION\" value=\"true\" />\n          <option name=\"ALIGN_MULTILINE_THROWS_LIST\" value=\"true\" />\n          <option name=\"ALIGN_MULTILINE_EXTENDS_LIST\" value=\"true\" />\n          <option name=\"ALIGN_MULTILINE_PARENTHESIZED_EXPRESSION\" value=\"true\" />\n          <option name=\"ALIGN_SUBSEQUENT_SIMPLE_METHODS\" value=\"true\" />\n          <option name=\"SPACE_WITHIN_BRACES\" value=\"true\" />\n          <option name=\"SPACE_AFTER_TYPE_CAST\" value=\"false\" />\n          <option name=\"CALL_PARAMETERS_WRAP\" value=\"1\" />\n          <option name=\"METHOD_PARAMETERS_WRAP\" value=\"5\" />\n          <option name=\"EXTENDS_LIST_WRAP\" value=\"1\" />\n          <option name=\"THROWS_LIST_WRAP\" value=\"5\" />\n          <option name=\"EXTENDS_KEYWORD_WRAP\" value=\"1\" />\n          <option name=\"THROWS_KEYWORD_WRAP\" value=\"1\" />\n          <option name=\"METHOD_CALL_CHAIN_WRAP\" value=\"1\" />\n          <option name=\"BINARY_OPERATION_WRAP\" value=\"5\" />\n          <option name=\"TERNARY_OPERATION_WRAP\" value=\"5\" />\n          <option name=\"TERNARY_OPERATION_SIGNS_ON_NEXT_LINE\" value=\"true\" />\n          <option name=\"KEEP_SIMPLE_METHODS_IN_ONE_LINE\" value=\"true\" />\n          <option name=\"FOR_STATEMENT_WRAP\" value=\"5\" />\n          <option name=\"ARRAY_INITIALIZER_WRAP\" value=\"1\" />\n          <option name=\"ASSIGNMENT_WRAP\" value=\"1\" />\n          <option name=\"IF_BRACE_FORCE\" value=\"1\" />\n          <option name=\"DOWHILE_BRACE_FORCE\" value=\"1\" />\n          <option name=\"WHILE_BRACE_FORCE\" value=\"1\" />\n          <option name=\"FOR_BRACE_FORCE\" value=\"1\" />\n          <option name=\"FIELD_ANNOTATION_WRAP\" value=\"0\" />\n          <option name=\"PARENT_SETTINGS_INSTALLED\" value=\"true\" />\n          <indentOptions>\n            <option name=\"INDENT_SIZE\" value=\"2\" />\n            <option name=\"CONTINUATION_INDENT_SIZE\" value=\"2\" />\n            <option name=\"TAB_SIZE\" value=\"8\" />\n          </indentOptions>\n        </codeStyleSettings>\n        <codeStyleSettings language=\"JavaScript\">\n          <option name=\"ELSE_ON_NEW_LINE\" value=\"true\" />\n          <option name=\"WHILE_ON_NEW_LINE\" value=\"true\" />\n          <option name=\"CATCH_ON_NEW_LINE\" value=\"true\" />\n          <option name=\"FINALLY_ON_NEW_LINE\" value=\"true\" />\n          <option name=\"ALIGN_MULTILINE_PARAMETERS_IN_CALLS\" value=\"true\" />\n          <option name=\"ALIGN_MULTILINE_BINARY_OPERATION\" value=\"true\" />\n          <option name=\"ALIGN_MULTILINE_TERNARY_OPERATION\" value=\"true\" />\n          <option name=\"CALL_PARAMETERS_WRAP\" value=\"1\" />\n          <option name=\"METHOD_PARAMETERS_WRAP\" value=\"5\" />\n          <option name=\"BINARY_OPERATION_WRAP\" value=\"5\" />\n          <option name=\"TERNARY_OPERATION_WRAP\" value=\"5\" />\n          <option name=\"TERNARY_OPERATION_SIGNS_ON_NEXT_LINE\" value=\"true\" />\n          <option name=\"FOR_STATEMENT_WRAP\" value=\"5\" />\n          <option name=\"ARRAY_INITIALIZER_WRAP\" value=\"1\" />\n          <option name=\"ASSIGNMENT_WRAP\" value=\"1\" />\n          <option name=\"IF_BRACE_FORCE\" value=\"1\" />\n          <option name=\"DOWHILE_BRACE_FORCE\" value=\"1\" />\n          <option name=\"WHILE_BRACE_FORCE\" value=\"1\" />\n          <option name=\"FOR_BRACE_FORCE\" value=\"1\" />\n          <option name=\"PARENT_SETTINGS_INSTALLED\" value=\"true\" />\n          <indentOptions>\n            <option name=\"INDENT_SIZE\" value=\"2\" />\n            <option name=\"TAB_SIZE\" value=\"2\" />\n          </indentOptions>\n        </codeStyleSettings>\n        <codeStyleSettings language=\"PHP\">\n          <option name=\"KEEP_BLANK_LINES_BEFORE_RBRACE\" value=\"0\" />\n          <option name=\"CLASS_BRACE_STYLE\" value=\"1\" />\n          <option name=\"METHOD_BRACE_STYLE\" value=\"1\" />\n          <option name=\"ELSE_ON_NEW_LINE\" value=\"true\" />\n          <option name=\"WHILE_ON_NEW_LINE\" value=\"true\" />\n          <option name=\"CATCH_ON_NEW_LINE\" value=\"true\" />\n          <option name=\"ALIGN_MULTILINE_TERNARY_OPERATION\" value=\"true\" />\n          <option name=\"ALIGN_MULTILINE_EXTENDS_LIST\" value=\"true\" />\n          <option name=\"METHOD_PARAMETERS_WRAP\" value=\"5\" />\n          <option name=\"EXTENDS_LIST_WRAP\" value=\"1\" />\n          <option name=\"EXTENDS_KEYWORD_WRAP\" value=\"1\" />\n          <option name=\"BINARY_OPERATION_WRAP\" value=\"5\" />\n          <option name=\"TERNARY_OPERATION_WRAP\" value=\"5\" />\n          <option name=\"TERNARY_OPERATION_SIGNS_ON_NEXT_LINE\" value=\"true\" />\n          <option name=\"KEEP_SIMPLE_METHODS_IN_ONE_LINE\" value=\"true\" />\n          <option name=\"FOR_STATEMENT_WRAP\" value=\"5\" />\n          <option name=\"IF_BRACE_FORCE\" value=\"1\" />\n          <option name=\"DOWHILE_BRACE_FORCE\" value=\"1\" />\n          <option name=\"WHILE_BRACE_FORCE\" value=\"1\" />\n          <option name=\"FOR_BRACE_FORCE\" value=\"1\" />\n          <option name=\"PARENT_SETTINGS_INSTALLED\" value=\"true\" />\n        </codeStyleSettings>\n        <codeStyleSettings language=\"Python\">\n          <option name=\"PARENT_SETTINGS_INSTALLED\" value=\"true\" />\n        </codeStyleSettings>\n        <codeStyleSettings language=\"XML\">\n          <indentOptions>\n            <option name=\"INDENT_SIZE\" value=\"2\" />\n            <option name=\"CONTINUATION_INDENT_SIZE\" value=\"4\" />\n            <option name=\"TAB_SIZE\" value=\"8\" />\n          </indentOptions>\n        </codeStyleSettings>\n      </value>\n    </option>\n    <option name=\"USE_PER_PROJECT_SETTINGS\" value=\"true\" />\n  </component>\n</project>"
  },
  {
    "path": ".idea/copyright/apache.xml",
    "content": "<component name=\"CopyrightManager\">\n  <copyright>\n    <option name=\"notice\" value=\"Copyright 2013-&amp;#36;today.year Sergey Ignatov, Alexander Zolotov, Florin Patan&#10;&#10;Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);&#10;you may not use this file except in compliance with the License.&#10;You may obtain a copy of the License at&#10;&#10;http://www.apache.org/licenses/LICENSE-2.0&#10;&#10;Unless required by applicable law or agreed to in writing, software&#10;distributed under the License is distributed on an &quot;AS IS&quot; BASIS,&#10;WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&#10;See the License for the specific language governing permissions and&#10;limitations under the License.\" />\n    <option name=\"keyword\" value=\"Copyright\" />\n    <option name=\"allowReplaceKeyword\" value=\"Copyright\" />\n    <option name=\"myName\" value=\"apache\" />\n    <option name=\"myLocal\" value=\"true\" />\n  </copyright>\n</component>"
  },
  {
    "path": ".idea/copyright/no_copyright.xml",
    "content": "<component name=\"CopyrightManager\">\n  <copyright>\n    <option name=\"notice\" value=\"\" />\n    <option name=\"keyword\" value=\"\" />\n    <option name=\"myName\" value=\"no copyright\" />\n  </copyright>\n</component>"
  },
  {
    "path": ".idea/copyright/profiles_settings.xml",
    "content": "<component name=\"CopyrightManager\">\n  <settings default=\"apache\">\n    <module2copyright>\n      <element module=\"testdata\" copyright=\"no copyright\" />\n    </module2copyright>\n    <LanguageOptions name=\"JAVA\" />\n  </settings>\n</component>"
  },
  {
    "path": ".idea/dictionaries/ignatov.xml",
    "content": "<component name=\"ProjectDictionaryState\">\n  <dictionary name=\"ignatov\">\n    <words>\n      <w>exprs</w>\n      <w>goroutine</w>\n      <w>mihai</w>\n      <w>modificator</w>\n      <w>patan</w>\n      <w>structs</w>\n      <w>toader</w>\n      <w>uintptr</w>\n      <w>unescapes</w>\n      <w>unescaping</w>\n      <w>variadic</w>\n      <w>vendoring</w>\n      <w>zolotov</w>\n    </words>\n  </dictionary>\n</component>"
  },
  {
    "path": ".idea/dictionaries/zolotov.xml",
    "content": "<component name=\"ProjectDictionaryState\">\n  <dictionary name=\"zolotov\">\n    <words>\n      <w>autoimport</w>\n      <w>backticks</w>\n      <w>consts</w>\n      <w>covermode</w>\n      <w>coverprofile</w>\n      <w>devel</w>\n      <w>gcloud</w>\n      <w>gobench</w>\n      <w>gocheck</w>\n      <w>goide</w>\n      <w>goimports</w>\n      <w>gopath</w>\n      <w>goroot</w>\n      <w>gotest</w>\n      <w>hgap</w>\n      <w>nacl</w>\n      <w>netbsd</w>\n      <w>notwin</w>\n      <w>openbsd</w>\n      <w>recv</w>\n      <w>redeclared</w>\n      <w>runconfig</w>\n      <w>solaris</w>\n      <w>vendored</w>\n      <w>vgap</w>\n      <w>vspacer</w>\n    </words>\n  </dictionary>\n</component>"
  },
  {
    "path": ".idea/encodings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"Encoding\" useUTFGuessing=\"true\" native2AsciiForPropertiesFiles=\"false\">\n    <file url=\"PROJECT\" charset=\"UTF-8\" />\n  </component>\n</project>"
  },
  {
    "path": ".idea/externalDependencies.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"ExternalDependencies\">\n    <plugin id=\"DevKit\" />\n    <plugin id=\"com.intellij.uiDesigner\" />\n    <plugin id=\"org.jetbrains.idea.grammar\" min-version=\"1.4.2\" max-version=\"1.4.2\" />\n    <plugin id=\"org.jetbrains.plugins.gradle\" />\n  </component>\n</project>"
  },
  {
    "path": ".idea/inspectionProfiles/Project_Default.xml",
    "content": "<component name=\"InspectionProjectProfileManager\">\n  <profile version=\"1.0\" is_locked=\"false\">\n    <option name=\"myName\" value=\"Project Default\" />\n    <option name=\"myLocal\" value=\"false\" />\n  </profile>\n</component>"
  },
  {
    "path": ".idea/inspectionProfiles/idea_default.xml",
    "content": "<component name=\"InspectionProjectProfileManager\">\n  <profile version=\"1.0\">\n    <option name=\"myName\" value=\"idea.default\" />\n    <option name=\"myLocal\" value=\"true\" />\n    <inspection_tool class=\"AbstractMethodCallInConstructor\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"AndroidDomInspection\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidElementNotAllowed\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintAdapterViewChildren\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintAllowBackup\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintAlwaysShowAction\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintButtonCase\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintButtonOrder\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintButtonStyle\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintCommitPrefEdits\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintContentDescription\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintCutPasteId\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintDisableBaselineAlignment\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintDrawAllocation\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintDuplicateActivity\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintDuplicateDefinition\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintDuplicateIds\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintDuplicateIncludedIds\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintDuplicateUsesFeature\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintEnforceUTF8\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintExportedContentProvider\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintExportedReceiver\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintExportedService\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintExtraText\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintExtraTranslation\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintGifUsage\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintGrantAllUris\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintGridLayout\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintHardcodedDebugMode\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintHardcodedText\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintIconColors\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintIconDensities\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintIconDipSize\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintIconDuplicates\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintIconDuplicatesConfig\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintIconExtension\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintIconLauncherShape\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintIconLocation\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintIconMissingDensityFolder\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintIconMixedNinePatch\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintIconNoDpi\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintIconXmlAndPng\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintIllegalResourceRef\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintInOrMmUsage\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintInconsistentArrays\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintInconsistentLayout\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintInefficientWeight\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintInlinedApi\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintInnerclassSeparator\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintInvalidId\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintLabelFor\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintLibraryCustomView\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintLocalSuppress\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintMangledCRLF\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintManifestOrder\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintMenuTitle\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintMergeRootFrame\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintMissingApplicationIcon\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintMissingId\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintMissingPrefix\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintMissingQuantity\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintMissingTranslation\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintMissingVersion\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintMultipleUsesSdk\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintNestedScrolling\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintNestedWeights\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintNewApi\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintNotSibling\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintObsoleteLayoutParam\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintOldTargetApi\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintOrientation\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintOverdraw\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintOverride\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintPackagedPrivateKey\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintPrivateResource\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintProguard\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintProguardSplit\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintProtectedPermissions\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintPxUsage\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintRegistered\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintRequiredSize\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintResAuto\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintResourceAsColor\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintScrollViewCount\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintScrollViewSize\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintSdCardPath\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintServiceCast\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintSetJavaScriptEnabled\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintShowToast\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintSmallSp\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintSpUsage\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintStateListReachable\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintStringFormatCount\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintStringFormatInvalid\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintStringFormatMatches\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintStyleCycle\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintSuspicious0dp\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintSuspiciousImport\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintTextFields\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintTextViewEdits\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintTooDeepLayout\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintTooManyViews\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintTypographyDashes\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintTypographyEllipsis\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintTypographyFractions\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintTypographyOther\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintTypos\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintUniquePermission\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintUnknownId\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintUnknownIdInLayout\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintUnlocalizedSms\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintUnusedQuantity\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintUnusedResources\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintUseCompoundDrawables\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintUseSparseArrays\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintUseValueOf\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintUselessLeaf\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintUselessParent\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintUsesMinSdkAttributes\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintWorldReadableFiles\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintWorldWriteableFiles\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintWrongCase\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintWrongFolder\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidLintWrongViewCast\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidMissingOnClickHandler\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidNonConstantResIdsInSwitch\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AndroidUnknownAttribute\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AppEngineForbiddenCode\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"ArchaicSystemPropertyAccess\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"ArgNamesErrorsInspection\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"ArgNamesWarningsInspection\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"AroundAdviceStyleInspection\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"ArrayEquality\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"ArraysAsListWithZeroOrOneArgument\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\">\n      <scope name=\"Tests\" level=\"INFO\" enabled=\"true\" />\n    </inspection_tool>\n    <inspection_tool class=\"AssignmentToForLoopParameter\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\">\n      <option name=\"m_checkForeachParameters\" value=\"false\" />\n    </inspection_tool>\n    <inspection_tool class=\"AssignmentToStaticFieldFromInstanceMethod\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\">\n      <scope name=\"Tests\" level=\"WARNING\" enabled=\"false\" />\n    </inspection_tool>\n    <inspection_tool class=\"AssignmentUsedAsCondition\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"AutoBoxing\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"false\">\n      <scope name=\"runtime.classes\" level=\"WARNING\" enabled=\"true\">\n        <option name=\"ignoreAddedToCollection\" value=\"false\" />\n      </scope>\n      <option name=\"ignoreAddedToCollection\" value=\"false\" />\n    </inspection_tool>\n    <inspection_tool class=\"AutoUnboxing\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"false\">\n      <scope name=\"runtime.classes\" level=\"WARNING\" enabled=\"true\" />\n    </inspection_tool>\n    <inspection_tool class=\"BadExpressionStatementJS\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"BeforeClassOrAfterClassIsPublicStaticVoidNoArg\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"BeforeOrAfterIsPublicVoidNoArg\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"BindingAnnotationWithoutInject\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"BooleanExpressionMayBeConditional\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"BooleanMethodIsAlwaysInverted\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"BpmnConfigDomInspection\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"BreakStatementWithLabel\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"BuildoutUnresolvedPartInspection\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"BusyWait\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"BvConfigDomInspection\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"BvConstraintMappingsInspection\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"CStyleArrayDeclaration\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"CallerJS\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"CastConflictsWithInstanceof\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"CastToIncompatibleInterface\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"CdiDecoratorInspection\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"CdiDisposerMethodInspection\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"CdiDomBeans\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"CdiInjectInspection\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"CdiInjectionPointsInspection\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"CdiInterceptorInspection\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"CdiManagedBeanInconsistencyInspection\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"CdiNormalScopeInspection\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"CdiObservesInspection\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"CdiSpecializesInspection\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"CdiStereotypeInspection\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"CdiStereotypeRestrictionsInspection\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"CdiTypedAnnotationInspection\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"CdiUnproxyableBeanTypesInspection\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"CfmlFileReference\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"CfmlReferenceInspection\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"ChainedEquality\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"CheckNodeTest\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"ClassNameSameAsAncestorName\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"CloneCallsSuperClone\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"CloneDeclaresCloneNotSupported\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"CommaExpressionJS\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"ComparisonOfShortAndChar\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"ConditionalExpressionWithIdenticalBranches\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"ConflictingAnnotations\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"ConfusingElse\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\">\n      <option name=\"reportWhenNoStatementFollow\" value=\"false\" />\n    </inspection_tool>\n    <inspection_tool class=\"ConfusingOctalEscape\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"ConstantConditionalExpression\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\">\n      <scope name=\"Tests\" level=\"WARNING\" enabled=\"true\" />\n    </inspection_tool>\n    <inspection_tool class=\"ConstantConditionalExpressionJS\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"ConstantConditions\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\">\n      <scope name=\"runtime.classes\" level=\"WARNING\" enabled=\"false\">\n        <option name=\"SUGGEST_NULLABLE_ANNOTATIONS\" value=\"false\" />\n        <option name=\"DONT_REPORT_TRUE_ASSERT_STATEMENTS\" value=\"false\" />\n      </scope>\n      <option name=\"SUGGEST_NULLABLE_ANNOTATIONS\" value=\"false\" />\n      <option name=\"DONT_REPORT_TRUE_ASSERT_STATEMENTS\" value=\"false\" />\n    </inspection_tool>\n    <inspection_tool class=\"ConstantIfStatement\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\">\n      <scope name=\"Tests\" level=\"WARNING\" enabled=\"true\" />\n    </inspection_tool>\n    <inspection_tool class=\"ConstantIfStatementJS\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"ConstraintValidatorCreator\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"ContinueOrBreakFromFinallyBlock\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"ContinueOrBreakFromFinallyBlockJS\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"ContinueStatementWithLabel\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"Convert2streamapi\" enabled=\"true\" level=\"INFORMATION\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"CovariantCompareTo\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"CovariantEquals\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"DeclareParentsInspection\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"DefaultNotLastCaseInSwitch\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"DeprecatedGemInspection\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"DjangoBrokenLineCommentInspection\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"DjangoCloseTagInspection\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"DjangoUnresolvedFilterInspection\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"DjangoUnresolvedLoadInspection\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"DjangoUnresolvedStaticReferenceInspection\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"DjangoUnresolvedTagInspection\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"DjangoUnresolvedTemplateReferenceInspection\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"DoubleCheckedLocking\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\">\n      <option name=\"ignoreOnVolatileVariables\" value=\"true\" />\n    </inspection_tool>\n    <inspection_tool class=\"DuplicateBooleanBranch\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"DuplicateCaseLabelJS\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"DuplicateCondition\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\">\n      <option name=\"ignoreMethodCalls\" value=\"false\" />\n    </inspection_tool>\n    <inspection_tool class=\"DuplicatedBlockNamesInspection\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"EmptyStatementBodyJS\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\">\n      <option name=\"m_reportEmptyBlocks\" value=\"false\" />\n    </inspection_tool>\n    <inspection_tool class=\"EmptySynchronizedStatement\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"EnumSwitchStatementWhichMissesCases\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\">\n      <option name=\"ignoreSwitchStatementsWithDefault\" value=\"true\" />\n    </inspection_tool>\n    <inspection_tool class=\"EqualsCalledOnEnumConstant\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"ExceptionCaughtLocallyJS\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"ExceptionNameDoesntEndWithException\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"ExtendsTagPositionInspection\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"FallthroughInSwitchStatementJS\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"FieldAccessedSynchronizedAndUnsynchronized\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\">\n      <option name=\"countGettersAndSetters\" value=\"false\" />\n    </inspection_tool>\n    <inspection_tool class=\"FieldMayBeStatic\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"Finalize\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\">\n      <option name=\"ignoreTrivialFinalizers\" value=\"true\" />\n    </inspection_tool>\n    <inspection_tool class=\"FinalizeNotProtected\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"ForCanBeForeach\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\">\n      <option name=\"REPORT_INDEXED_LOOP\" value=\"true\" />\n      <option name=\"ignoreUntypedCollections\" value=\"false\" />\n    </inspection_tool>\n    <inspection_tool class=\"ForLoopReplaceableByWhile\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\">\n      <option name=\"m_ignoreLoopsWithoutConditions\" value=\"false\" />\n    </inspection_tool>\n    <inspection_tool class=\"ForLoopThatDoesntUseLoopVariable\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"GemInspection\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"Geronimo\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"GlassFish\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"GrUnresolvedAccess\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"Guava\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"HardcodedActionUrl\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"HardwiredNamespacePrefix\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"IOResource\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\">\n      <option name=\"ignoredTypesString\" value=\"java.io.ByteArrayOutputStream,java.io.ByteArrayInputStream,java.io.StringBufferInputStream,java.io.CharArrayWriter,java.io.CharArrayReader,java.io.StringWriter,java.io.StringReader\" />\n      <option name=\"insideTryAllowed\" value=\"false\" />\n    </inspection_tool>\n    <inspection_tool class=\"IfCanBeSwitch\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\">\n      <option name=\"minimumBranches\" value=\"3\" />\n      <option name=\"suggestIntSwitches\" value=\"false\" />\n      <option name=\"suggestEnumSwitches\" value=\"false\" />\n    </inspection_tool>\n    <inspection_tool class=\"IfMayBeConditional\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"IfStatementWithIdenticalBranches\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"IgnoreResultOfCall\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\">\n      <option name=\"m_reportAllNonLibraryCalls\" value=\"false\" />\n      <option name=\"callCheckString\" value=\"java.io.File,.*,java.io.InputStream,read|skip|available|markSupported,java.io.Writer,read|skip|ready|markSupported,java.lang.Boolean,.*,java.lang.Byte,.*,java.lang.Character,.*,java.lang.Double,.*,java.lang.Float,.*,java.lang.Integer,.*,java.lang.Long,.*,java.lang.Math,.*,java.lang.Object,equals|hashCode|toString,java.lang.Short,.*,java.lang.StrictMath,.*,java.lang.String,.*,java.math.BigInteger,.*,java.math.BigDecimal,.*,java.net.InetAddress,.*,java.net.URI,.*,java.util.UUID,.*,java.util.regex.Matcher,pattern|toMatchResult|start|end|group|groupCount|matches|find|lookingAt|quoteReplacement|replaceAll|replaceFirst|regionStart|regionEnd|hasTransparantBounds|hasAnchoringBounds|hitEnd|requireEnd,java.util.regex.Pattern,.*,com.intellij.openapi.util.LowMemoryWatcher,register,com.intellij.codeInsight.FileModificationService,preparePsiElementForWrite\" />\n    </inspection_tool>\n    <inspection_tool class=\"ImplicitTypeConversion\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\">\n      <option name=\"BITS\" value=\"1720\" />\n      <option name=\"FLAG_EXPLICIT_CONVERSION\" value=\"true\" />\n      <option name=\"IGNORE_NODESET_TO_BOOLEAN_VIA_STRING\" value=\"true\" />\n    </inspection_tool>\n    <inspection_tool class=\"IncompatibleMaskJS\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"IndexZeroUsage\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"InfiniteLoopJS\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"InfiniteRecursionJS\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"InnerClassMayBeStatic\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"InspectionDescriptionNotFoundInspection\" enabled=\"true\" level=\"ERROR\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"InstanceofCatchParameter\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"InstanceofIncompatibleInterface\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"InterceptionAnnotationWithoutRuntimeRetention\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"InvalidImplementedBy\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"InvalidProvidedBy\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"InvalidRequestParameters\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"JBoss\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"JSDeprecatedSymbols\" enabled=\"false\" level=\"WEAK WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"JSDuplicatedDeclaration\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"JSFieldCanBeLocal\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"JSImplicitlyInternalDeclaration\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"JSLastCommaInArrayLiteral\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"JSLastCommaInObjectLiteral\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"JSMethodCanBeStatic\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"JSMismatchedCollectionQueryUpdate\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\">\n      <option name=\"queries\" value=\"trace,write\" />\n      <option name=\"updates\" value=\"pop,push,shift,splice,unshift\" />\n    </inspection_tool>\n    <inspection_tool class=\"JSPotentiallyInvalidConstructorUsage\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\">\n      <option name=\"myConsiderUppercaseFunctionsToBeConstructors\" value=\"true\" />\n    </inspection_tool>\n    <inspection_tool class=\"JSPotentiallyInvalidTargetOfIndexedPropertyAccess\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"JSPotentiallyInvalidUsageOfThis\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"JSReferencingMutableVariableFromClosure\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"JSSuspiciousNameCombination\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\">\n      <group names=\"x,width,left,right\" />\n      <group names=\"y,height,top,bottom\" />\n      <exclude classes=\"Math\" />\n    </inspection_tool>\n    <inspection_tool class=\"JSUndeclaredVariable\" enabled=\"false\" level=\"WEAK WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"JSUnfilteredForInLoop\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"JSUnnecessarySemicolon\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"JSUnresolvedFunction\" enabled=\"false\" level=\"WEAK WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"JSUnresolvedLibraryURL\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"JSUnresolvedVariable\" enabled=\"false\" level=\"WEAK WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"JSUntypedDeclaration\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"JSUnusedGlobalSymbols\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"JSUnusedLocalSymbols\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"JSValidateJSON\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"JSValidateTypes\" enabled=\"false\" level=\"WEAK WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"JUnitTestClassNamingConvention\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\">\n      <option name=\"m_regex\" value=\"[A-Z][A-Za-z0-9_]*Test\" />\n      <option name=\"m_minLength\" value=\"8\" />\n      <option name=\"m_maxLength\" value=\"64\" />\n    </inspection_tool>\n    <inspection_tool class=\"JavaDoc\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"false\">\n      <scope name=\"Tests\" level=\"WARNING\" enabled=\"false\">\n        <option name=\"TOP_LEVEL_CLASS_OPTIONS\">\n          <value>\n            <option name=\"ACCESS_JAVADOC_REQUIRED_FOR\" value=\"none\" />\n            <option name=\"REQUIRED_TAGS\" value=\"\" />\n          </value>\n        </option>\n        <option name=\"INNER_CLASS_OPTIONS\">\n          <value>\n            <option name=\"ACCESS_JAVADOC_REQUIRED_FOR\" value=\"none\" />\n            <option name=\"REQUIRED_TAGS\" value=\"\" />\n          </value>\n        </option>\n        <option name=\"METHOD_OPTIONS\">\n          <value>\n            <option name=\"ACCESS_JAVADOC_REQUIRED_FOR\" value=\"none\" />\n            <option name=\"REQUIRED_TAGS\" value=\"@return@param@throws or @exception\" />\n          </value>\n        </option>\n        <option name=\"FIELD_OPTIONS\">\n          <value>\n            <option name=\"ACCESS_JAVADOC_REQUIRED_FOR\" value=\"none\" />\n            <option name=\"REQUIRED_TAGS\" value=\"\" />\n          </value>\n        </option>\n        <option name=\"IGNORE_DEPRECATED\" value=\"false\" />\n        <option name=\"IGNORE_JAVADOC_PERIOD\" value=\"true\" />\n        <option name=\"IGNORE_DUPLICATED_THROWS\" value=\"false\" />\n        <option name=\"IGNORE_POINT_TO_ITSELF\" value=\"false\" />\n        <option name=\"myAdditionalJavadocTags\" value=\"\" />\n      </scope>\n      <scope name=\"idea openapi\" level=\"WARNING\" enabled=\"true\">\n        <option name=\"TOP_LEVEL_CLASS_OPTIONS\">\n          <value>\n            <option name=\"ACCESS_JAVADOC_REQUIRED_FOR\" value=\"none\" />\n            <option name=\"REQUIRED_TAGS\" value=\"\" />\n          </value>\n        </option>\n        <option name=\"INNER_CLASS_OPTIONS\">\n          <value>\n            <option name=\"ACCESS_JAVADOC_REQUIRED_FOR\" value=\"none\" />\n            <option name=\"REQUIRED_TAGS\" value=\"\" />\n          </value>\n        </option>\n        <option name=\"METHOD_OPTIONS\">\n          <value>\n            <option name=\"ACCESS_JAVADOC_REQUIRED_FOR\" value=\"none\" />\n            <option name=\"REQUIRED_TAGS\" value=\"@return@param@throws or @exception\" />\n          </value>\n        </option>\n        <option name=\"FIELD_OPTIONS\">\n          <value>\n            <option name=\"ACCESS_JAVADOC_REQUIRED_FOR\" value=\"none\" />\n            <option name=\"REQUIRED_TAGS\" value=\"\" />\n          </value>\n        </option>\n        <option name=\"IGNORE_DEPRECATED\" value=\"true\" />\n        <option name=\"IGNORE_JAVADOC_PERIOD\" value=\"true\" />\n        <option name=\"IGNORE_DUPLICATED_THROWS\" value=\"false\" />\n        <option name=\"IGNORE_POINT_TO_ITSELF\" value=\"false\" />\n        <option name=\"myAdditionalJavadocTags\" value=\"\" />\n      </scope>\n      <scope name=\"runtime.classes\" level=\"WARNING\" enabled=\"true\">\n        <option name=\"TOP_LEVEL_CLASS_OPTIONS\">\n          <value>\n            <option name=\"ACCESS_JAVADOC_REQUIRED_FOR\" value=\"none\" />\n            <option name=\"REQUIRED_TAGS\" value=\"\" />\n          </value>\n        </option>\n        <option name=\"INNER_CLASS_OPTIONS\">\n          <value>\n            <option name=\"ACCESS_JAVADOC_REQUIRED_FOR\" value=\"none\" />\n            <option name=\"REQUIRED_TAGS\" value=\"\" />\n          </value>\n        </option>\n        <option name=\"METHOD_OPTIONS\">\n          <value>\n            <option name=\"ACCESS_JAVADOC_REQUIRED_FOR\" value=\"none\" />\n            <option name=\"REQUIRED_TAGS\" value=\"@return@param@throws or @exception\" />\n          </value>\n        </option>\n        <option name=\"FIELD_OPTIONS\">\n          <value>\n            <option name=\"ACCESS_JAVADOC_REQUIRED_FOR\" value=\"none\" />\n            <option name=\"REQUIRED_TAGS\" value=\"\" />\n          </value>\n        </option>\n        <option name=\"IGNORE_DEPRECATED\" value=\"false\" />\n        <option name=\"IGNORE_JAVADOC_PERIOD\" value=\"true\" />\n        <option name=\"IGNORE_DUPLICATED_THROWS\" value=\"false\" />\n        <option name=\"IGNORE_POINT_TO_ITSELF\" value=\"false\" />\n        <option name=\"myAdditionalJavadocTags\" value=\"\" />\n      </scope>\n      <option name=\"TOP_LEVEL_CLASS_OPTIONS\">\n        <value>\n          <option name=\"ACCESS_JAVADOC_REQUIRED_FOR\" value=\"none\" />\n          <option name=\"REQUIRED_TAGS\" value=\"\" />\n        </value>\n      </option>\n      <option name=\"INNER_CLASS_OPTIONS\">\n        <value>\n          <option name=\"ACCESS_JAVADOC_REQUIRED_FOR\" value=\"none\" />\n          <option name=\"REQUIRED_TAGS\" value=\"\" />\n        </value>\n      </option>\n      <option name=\"METHOD_OPTIONS\">\n        <value>\n          <option name=\"ACCESS_JAVADOC_REQUIRED_FOR\" value=\"none\" />\n          <option name=\"REQUIRED_TAGS\" value=\"@return@param@throws or @exception\" />\n        </value>\n      </option>\n      <option name=\"FIELD_OPTIONS\">\n        <value>\n          <option name=\"ACCESS_JAVADOC_REQUIRED_FOR\" value=\"none\" />\n          <option name=\"REQUIRED_TAGS\" value=\"\" />\n        </value>\n      </option>\n      <option name=\"IGNORE_DEPRECATED\" value=\"false\" />\n      <option name=\"IGNORE_JAVADOC_PERIOD\" value=\"true\" />\n      <option name=\"IGNORE_DUPLICATED_THROWS\" value=\"false\" />\n      <option name=\"IGNORE_POINT_TO_ITSELF\" value=\"false\" />\n      <option name=\"myAdditionalJavadocTags\" value=\"\" />\n    </inspection_tool>\n    <inspection_tool class=\"JavaFxDefaultTag\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"JavaFxUnresolvedFxIdReference\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"JavaFxUnresolvedStyleClassReference\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"JavaFxUnusedImports\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"JavadocReference\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\">\n      <scope name=\"Tests\" level=\"ERROR\" enabled=\"false\" />\n      <scope name=\"idea openapi\" level=\"WARNING\" enabled=\"true\" />\n      <scope name=\"runtime.classes\" level=\"ERROR\" enabled=\"true\" />\n    </inspection_tool>\n    <inspection_tool class=\"ListIndexOfReplaceableByContains\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"ListenerMayUseAdapter\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\">\n      <option name=\"checkForEmptyMethods\" value=\"true\" />\n    </inspection_tool>\n    <inspection_tool class=\"LiteralAsArgToStringEquals\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"LoggerInitializedWithForeignClass\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\">\n      <option name=\"loggerClassName\" value=\"org.apache.log4j.Logger,org.slf4j.LoggerFactory,org.apache.commons.logging.LogFactory,java.util.logging.Logger\" />\n      <option name=\"loggerFactoryMethodName\" value=\"getLogger,getLogger,getLog,getLogger\" />\n    </inspection_tool>\n    <inspection_tool class=\"LoopStatementThatDoesntLoopJS\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"MakoArgumentListInspection\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"MapReplaceableByEnumMap\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"MavenDuplicateDependenciesInspection\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"MavenModelInspection\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"MethodMayBeStatic\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\">\n      <option name=\"m_onlyPrivateOrFinal\" value=\"true\" />\n      <option name=\"m_ignoreEmptyMethods\" value=\"true\" />\n    </inspection_tool>\n    <inspection_tool class=\"MethodNamesDifferOnlyByCase\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"MethodOverloadsParentMethod\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"MethodOverridesStaticMethod\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"MinMaxValuesInspection\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"MinitestFrameworkSupportInspection\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"MisorderedAssertEqualsParameters\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"MissingOverrideAnnotation\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\">\n      <option name=\"ignoreObjectMethods\" value=\"true\" />\n      <option name=\"ignoreAnonymousClassMethods\" value=\"false\" />\n    </inspection_tool>\n    <inspection_tool class=\"MisspelledCompareTo\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"MisspelledEquals\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"MisspelledHashcode\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"MisspelledSetUp\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"MisspelledTearDown\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"MisspelledToString\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"MultipleBindingAnnotations\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"MultipleInjectedConstructorsForClass\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"MultipleTypedDeclaration\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"NestedSynchronizedStatement\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"NoExplicitFinalizeCalls\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"NonExceptionNameEndsWithException\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"NonStaticFinalLogger\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\">\n      <scope name=\"Tests\" level=\"WARNING\" enabled=\"false\">\n        <option name=\"loggerClassName\" value=\"java.util.logging.Logger\" />\n      </scope>\n      <option name=\"loggerClassName\" value=\"java.util.logging.Logger\" />\n    </inspection_tool>\n    <inspection_tool class=\"NonSynchronizedMethodOverridesSynchronizedMethod\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"NullableProblems\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\">\n      <scope name=\"java-decompiler-engine\" level=\"WARNING\" enabled=\"true\">\n        <option name=\"REPORT_NULLABLE_METHOD_OVERRIDES_NOTNULL\" value=\"true\" />\n        <option name=\"REPORT_NOT_ANNOTATED_METHOD_OVERRIDES_NOTNULL\" value=\"false\" />\n        <option name=\"REPORT_NOTNULL_PARAMETER_OVERRIDES_NULLABLE\" value=\"false\" />\n        <option name=\"REPORT_NOT_ANNOTATED_PARAMETER_OVERRIDES_NOTNULL\" value=\"true\" />\n        <option name=\"REPORT_NOT_ANNOTATED_GETTER\" value=\"false\" />\n        <option name=\"REPORT_NOT_ANNOTATED_SETTER_PARAMETER\" value=\"true\" />\n        <option name=\"REPORT_ANNOTATION_NOT_PROPAGATED_TO_OVERRIDERS\" value=\"false\" />\n        <option name=\"REPORT_NULLS_PASSED_TO_NON_ANNOTATED_METHOD\" value=\"true\" />\n      </scope>\n      <option name=\"REPORT_NULLABLE_METHOD_OVERRIDES_NOTNULL\" value=\"true\" />\n      <option name=\"REPORT_NOT_ANNOTATED_METHOD_OVERRIDES_NOTNULL\" value=\"true\" />\n      <option name=\"REPORT_NOTNULL_PARAMETER_OVERRIDES_NULLABLE\" value=\"true\" />\n      <option name=\"REPORT_NOT_ANNOTATED_PARAMETER_OVERRIDES_NOTNULL\" value=\"true\" />\n      <option name=\"REPORT_NOT_ANNOTATED_GETTER\" value=\"true\" />\n      <option name=\"IGNORE_EXTERNAL_SUPER_NOTNULL\" value=\"true\" />\n      <option name=\"REPORT_NOT_ANNOTATED_SETTER_PARAMETER\" value=\"true\" />\n      <option name=\"REPORT_ANNOTATION_NOT_PROPAGATED_TO_OVERRIDERS\" value=\"true\" />\n      <option name=\"REPORT_NULLS_PASSED_TO_NON_ANNOTATED_METHOD\" value=\"true\" />\n    </inspection_tool>\n    <inspection_tool class=\"ObjectEqualsNull\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"ObjectNotify\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"ObsoleteCollection\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\">\n      <option name=\"ignoreRequiredObsoleteCollectionTypes\" value=\"false\" />\n    </inspection_tool>\n    <inspection_tool class=\"OctalIntegerJS\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"PageflowModelInspection\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"PagesModelInspection\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"PointcutMethodStyleInspection\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"PointlessArithmeticExpressionJS\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"PointlessBinding\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"PointlessBitwiseExpressionJS\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\">\n      <option name=\"m_ignoreExpressionsContainingConstants\" value=\"false\" />\n    </inspection_tool>\n    <inspection_tool class=\"PointlessBooleanExpressionJS\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"PointlessNullCheck\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"ProtectedMemberInFinalClass\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"PublicFieldAccessedInSynchronizedContext\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"Query_bound_parameters\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"Query_index_required\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"Query_restricted\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"RedundantCast\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\">\n      <option name=\"IGNORE_ANNOTATED_METHODS\" value=\"true\" />\n      <option name=\"IGNORE_SUSPICIOUS_METHOD_CALLS\" value=\"true\" />\n    </inspection_tool>\n    <inspection_tool class=\"RedundantFieldInitialization\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"RedundantScopeBinding\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"RedundantToBinding\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"RedundantToProviderBinding\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"RedundantTypeConversion\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\">\n      <option name=\"CHECK_ANY\" value=\"false\" />\n    </inspection_tool>\n    <inspection_tool class=\"ReplaceAssignmentWithOperatorAssignment\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\">\n      <option name=\"ignoreLazyOperators\" value=\"true\" />\n      <option name=\"ignoreObscureOperators\" value=\"true\" />\n    </inspection_tool>\n    <inspection_tool class=\"ReservedWordUsedAsNameJS\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"Restricted_Python_calls\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"ResultOfObjectAllocationIgnored\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"ReturnFromFinallyBlockJS\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"SSBasedInspection\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\">\n      <searchConfiguration name=\"SwingUtilities.invokeLater\" text=\"SwingUtilities.invokeLater($runnable$)\" recursive=\"false\" caseInsensitive=\"false\" type=\"JAVA\">\n        <constraint name=\"Instance\" regexp=\"SwingUtilities\" minCount=\"0\" target=\"true\" within=\"\" contains=\"\" />\n        <constraint name=\"MethodCall\" within=\"\" contains=\"\" />\n        <constraint name=\"Parameter\" minCount=\"0\" maxCount=\"2147483647\" within=\"\" contains=\"\" />\n        <constraint name=\"__context__\" within=\"\" contains=\"\" />\n        <constraint name=\"runnable\" within=\"\" contains=\"\" />\n      </searchConfiguration>\n      <replaceConfiguration name=\"DirectCallOfDispose\" text=\"$Instance$.dispose()\" recursive=\"false\" caseInsensitive=\"false\" type=\"JAVA\" reformatAccordingToStyle=\"true\" shortenFQN=\"true\" replacement=\"Disposer.dispose($Instance$)\">\n        <constraint name=\"Instance\" regexp=\"super\" nameOfExprType=\"Disposable\" withinHierarchy=\"true\" exprTypeWithinHierarchy=\"true\" minCount=\"0\" negateName=\"true\" within=\"\" contains=\"\" />\n        <constraint name=\"MethodCall\" target=\"true\" within=\"\" contains=\"\" />\n        <constraint name=\"Parameter\" minCount=\"0\" maxCount=\"2147483647\" within=\"\" contains=\"\" />\n        <constraint name=\"__context__\" within=\"\" contains=\"\" />\n      </replaceConfiguration>\n      <replaceConfiguration name=\"new Object[0]\" text=\"new Object[0]\" recursive=\"false\" caseInsensitive=\"true\" type=\"JAVA\" reformatAccordingToStyle=\"true\" shortenFQN=\"true\" replacement=\"com.intellij.util.ArrayUtil.EMPTY_OBJECT_ARRAY\" />\n      <replaceConfiguration name=\"new String[0]\" text=\"new String[0]\" recursive=\"false\" caseInsensitive=\"true\" type=\"JAVA\" reformatAccordingToStyle=\"true\" shortenFQN=\"true\" replacement=\"com.intellij.util.ArrayUtil.EMPTY_STRING_ARRAY\" />\n      <replaceConfiguration name=\"new Class[0]\" text=\"new Class[0]\" recursive=\"false\" caseInsensitive=\"true\" type=\"JAVA\" reformatAccordingToStyle=\"true\" shortenFQN=\"true\" replacement=\"com.intellij.util.ArrayUtil.EMPTY_CLASS_ARRAY\" />\n      <replaceConfiguration name=\"Log.error\" text=\"$LOG$.assertTrue(false, $e$)\" recursive=\"false\" caseInsensitive=\"true\" type=\"JAVA\" reformatAccordingToStyle=\"true\" shortenFQN=\"true\" replacement=\"$LOG$.error($e$)\">\n        <constraint name=\"e\" within=\"\" contains=\"\" />\n        <constraint name=\"LOG\" within=\"\" contains=\"\" />\n      </replaceConfiguration>\n      <replaceConfiguration name=\"toStringArray\" text=\"$collection$.toArray(new String[$collection$.size()])\" recursive=\"false\" caseInsensitive=\"true\" type=\"JAVA\" reformatAccordingToStyle=\"true\" shortenFQN=\"true\" replacement=\"com.intellij.util.ArrayUtil.toStringArray($collection$)\">\n        <constraint name=\"collection\" within=\"\" contains=\"\" />\n      </replaceConfiguration>\n      <replaceConfiguration name=\"toObjectArray\" text=\"$collection$.toArray(new Object[$collection$.size()])\" recursive=\"false\" caseInsensitive=\"true\" type=\"JAVA\" reformatAccordingToStyle=\"true\" shortenFQN=\"true\" replacement=\"com.intellij.util.ArrayUtil.toObjectArray($collection$)\">\n        <constraint name=\"collection\" within=\"\" contains=\"\" />\n      </replaceConfiguration>\n      <replaceConfiguration name=\"toStringArray0\" text=\"$collection$.toArray(new String[0])\" recursive=\"false\" caseInsensitive=\"true\" type=\"JAVA\" reformatAccordingToStyle=\"true\" shortenFQN=\"true\" replacement=\"com.intellij.util.ArrayUtil.toStringArray($collection$)\">\n        <constraint name=\"collection\" within=\"\" contains=\"\" />\n      </replaceConfiguration>\n      <replaceConfiguration name=\"toObjectArray0\" text=\"$collection$.toArray(new Object[0])\" recursive=\"false\" caseInsensitive=\"true\" type=\"JAVA\" reformatAccordingToStyle=\"true\" shortenFQN=\"true\" replacement=\"com.intellij.util.ArrayUtil.toObjectArray($collection$)\">\n        <constraint name=\"collection\" within=\"\" contains=\"\" />\n      </replaceConfiguration>\n      <replaceConfiguration name=\"toStringArray00\" text=\"$collection$.toArray(ArrayUtil.EMPTY_STRING_ARRAY)\" recursive=\"false\" caseInsensitive=\"true\" type=\"JAVA\" reformatAccordingToStyle=\"true\" shortenFQN=\"true\" replacement=\"com.intellij.util.ArrayUtil.toStringArray($collection$)\">\n        <constraint name=\"collection\" within=\"\" contains=\"\" />\n      </replaceConfiguration>\n      <replaceConfiguration name=\"toObjectArray00\" text=\"$collection$.toArray(ArrayUtil.EMPTY_OBJECT_ARRAY)\" recursive=\"false\" caseInsensitive=\"true\" type=\"JAVA\" reformatAccordingToStyle=\"true\" shortenFQN=\"true\" replacement=\"com.intellij.util.ArrayUtil.toObjectArray($collection$)\">\n        <constraint name=\"collection\" within=\"\" contains=\"\" />\n      </replaceConfiguration>\n      <replaceConfiguration name=\"File.createTempFile\" text=\"java.io.File.createTempFile($prefix$, $suffix$)\" recursive=\"false\" caseInsensitive=\"true\" type=\"JAVA\" reformatAccordingToStyle=\"true\" shortenFQN=\"true\" replacement=\"com.intellij.openapi.util.io.FileUtil.createTempFile($prefix$, $suffix$)\">\n        <constraint name=\"prefix\" within=\"\" contains=\"\" />\n        <constraint name=\"suffix\" within=\"\" contains=\"\" />\n      </replaceConfiguration>\n      <replaceConfiguration name=\"File.createTempFile(dir)\" text=\"java.io.File.createTempFile($prefix$, $suffix$, $dir$)\" recursive=\"false\" caseInsensitive=\"true\" type=\"JAVA\" reformatAccordingToStyle=\"true\" shortenFQN=\"true\" replacement=\"com.intellij.openapi.util.io.FileUtil.createTempFile($dir$, $prefix$, $suffix$, true)\">\n        <constraint name=\"prefix\" within=\"\" contains=\"\" />\n        <constraint name=\"suffix\" within=\"\" contains=\"\" />\n        <constraint name=\"dir\" within=\"\" contains=\"\" />\n      </replaceConfiguration>\n      <searchConfiguration name=\"Consider explicit delete when file is not needed any more\" text=\"$file$.deleteOnExit()\" recursive=\"false\" caseInsensitive=\"true\" type=\"JAVA\">\n        <constraint name=\"prefix\" within=\"\" contains=\"\" />\n        <constraint name=\"suffix\" within=\"\" contains=\"\" />\n        <constraint name=\"file\" nameOfExprType=\"java.io.File\" within=\"\" contains=\"\" />\n      </searchConfiguration>\n      <searchConfiguration name=\"Use RecursionManager?\" text=\"class $Class$ { &#10;  ThreadLocal&lt;$FieldType$&gt; $FieldName$ = $Init$;&#10;}\" recursive=\"false\" caseInsensitive=\"false\" type=\"JAVA\">\n        <constraint name=\"Class\" script=\"&quot;&quot;\" within=\"\" contains=\"\" />\n        <constraint name=\"FieldType\" script=\"&quot;&quot;\" regexp=\"Collection\" withinHierarchy=\"true\" maxCount=\"2147483647\" target=\"true\" wholeWordsOnly=\"true\" within=\"\" contains=\"\" />\n        <constraint name=\"FieldName\" script=\"&quot;&quot;\" maxCount=\"2147483647\" within=\"\" contains=\"\" />\n        <constraint name=\"Init\" script=\"&quot;&quot;\" minCount=\"0\" maxCount=\"2147483647\" within=\"\" contains=\"\" />\n        <constraint name=\"__context__\" script=\"&quot;&quot;\" within=\"\" contains=\"\" />\n      </searchConfiguration>\n      <searchConfiguration name=\"use NotificationGroup.toolWindowGroup().createNotification().notify() instead\" text=\"$Instance$.notifyByBalloon($Parameter$)\" recursive=\"false\" caseInsensitive=\"false\" type=\"JAVA\">\n        <constraint name=\"Instance\" script=\"&quot;&quot;\" nameOfExprType=\"com.intellij.openapi.wm.ToolWindowManager\" exprTypeWithinHierarchy=\"true\" minCount=\"0\" within=\"\" contains=\"\" />\n        <constraint name=\"MethodCall\" target=\"true\" within=\"\" contains=\"\" />\n        <constraint name=\"Parameter\" minCount=\"0\" maxCount=\"2147483647\" within=\"\" contains=\"\" />\n      </searchConfiguration>\n      <replaceConfiguration name=\"PsiManager.getInstance(psiElement.getProject())\" text=\"com.intellij.psi.PsiManager.getInstance($psiElement$.getProject())\" recursive=\"false\" caseInsensitive=\"true\" type=\"JAVA\" reformatAccordingToStyle=\"true\" shortenFQN=\"true\" replacement=\"$psiElement$.getManager()\">\n        <constraint name=\"psiElement\" script=\"&quot;&quot;\" nameOfExprType=\"com\\.intellij\\.psi\\.PsiElement\" exprTypeWithinHierarchy=\"true\" within=\"\" contains=\"\" />\n      </replaceConfiguration>\n      <searchConfiguration name=\"String.getBytes() is current locale-dependant, use String.getBytes(Charset) instead\" text=\"$s$.getBytes()\" recursive=\"false\" caseInsensitive=\"true\" type=\"JAVA\">\n        <constraint name=\"String\" within=\"\" contains=\"\" />\n        <constraint name=\"myTexts\" within=\"\" contains=\"\" />\n        <constraint name=\"s\" script=\"&quot;&quot;\" nameOfExprType=\"java.lang.String\" exprTypeWithinHierarchy=\"true\" within=\"\" contains=\"\" />\n      </searchConfiguration>\n      <searchConfiguration name=\"searchable configurable should not contain JComponent fields\" text=\"class $Class$ implements SearchableConfigurable{ &#10;  @Modifier(&quot;Instance&quot;) $FieldType$ $FieldName$ = $Init$;&#10;  public void disposeUIResources(){}&#10;}\" recursive=\"false\" caseInsensitive=\"false\" type=\"JAVA\">\n        <constraint name=\"Class\" script=\"&quot;&quot;\" target=\"true\" within=\"\" contains=\"\" />\n        <constraint name=\"FieldType\" script=\"&quot;&quot;\" regexp=\"javax.swing.JComponent\" withinHierarchy=\"true\" formalTypeWithinHierarchy=\"true\" within=\"\" contains=\"\" />\n        <constraint name=\"FieldName\" script=\"&quot;&quot;\" maxCount=\"2147483647\" within=\"\" contains=\"\" />\n        <constraint name=\"Init\" script=\"&quot;&quot;\" minCount=\"0\" maxCount=\"2147483647\" within=\"\" contains=\"\" />\n        <constraint name=\"__context__\" script=\"&quot;&quot;\" within=\"\" contains=\"\" />\n      </searchConfiguration>\n      <searchConfiguration name=\"Suspicious usage of PsiUtilBase#findEditor inside quick fix, probably better idea to use LocalQuickFixAndIntentionActionOnPsiElement\" text=\"$Instance$.$MethodCall$($Parameter$)\" recursive=\"false\" caseInsensitive=\"false\" type=\"JAVA\">\n        <constraint name=\"Instance\" script=\"&quot;&quot;\" regexp=\"com.intellij.psi.util.PsiUtilBase\" minCount=\"0\" within=\"\" contains=\"\" />\n        <constraint name=\"MethodCall\" script=\"&quot;import com.intellij.psi.PsiClass&#10;import com.intellij.psi.util.InheritanceUtil&#10;import com.intellij.psi.util.PsiTreeUtil&#10;&#10;PsiClass aClass = PsiTreeUtil.getParentOfType(__context__, PsiClass.class)&#10;aClass != null &amp;&amp; InheritanceUtil.isInheritor(aClass, &quot;com.intellij.codeInspection.LocalQuickFix&quot;)&quot;\" regexp=\"findEditor\" target=\"true\" within=\"\" contains=\"\" />\n        <constraint name=\"Parameter\" script=\"&quot;&quot;\" minCount=\"0\" maxCount=\"2147483647\" within=\"\" contains=\"\" />\n      </searchConfiguration>\n      <searchConfiguration name=\"Potential memory leak: don't hold PsiElement inside quick fix, use SmartPsiElementPointer or instead of; also see LocalQuickFixOnPsiElement\" text=\"class $Class$ { &#10;  $FieldType$ $FieldName$ = $Init$;&#10;}\" recursive=\"false\" caseInsensitive=\"false\" type=\"JAVA\">\n        <constraint name=\"Class\" script=\"&quot;import com.intellij.psi.PsiClass&#10;import com.intellij.psi.util.InheritanceUtil&#10;import com.intellij.psi.util.PsiTreeUtil&#10;&#10;Object c = __context__&#10;return c instanceof PsiClass &amp;&amp; InheritanceUtil.isInheritor(c, &quot;com.intellij.codeInspection.LocalQuickFix&quot;) &#10;&quot;\" within=\"\" contains=\"\" />\n        <constraint name=\"FieldType\" script=\"&quot;import com.intellij.psi.PsiClass&#10;import com.intellij.psi.PsiElement&#10;import com.intellij.psi.PsiField&#10;import com.intellij.psi.util.InheritanceUtil&#10;import com.intellij.psi.util.PsiTreeUtil&#10;&#10;PsiField f = PsiTreeUtil.getParentOfType(__context__, PsiField)&#10;return f != null &amp;&amp; InheritanceUtil.isInheritor(f.getType(), &quot;com.intellij.psi.PsiElement&quot;) &#10;&quot;\" maxCount=\"2147483647\" within=\"\" contains=\"\" />\n        <constraint name=\"FieldName\" maxCount=\"2147483647\" target=\"true\" within=\"\" contains=\"\" />\n        <constraint name=\"Init\" minCount=\"0\" maxCount=\"2147483647\" within=\"\" contains=\"\" />\n      </searchConfiguration>\n      <replaceConfiguration name=\"Potential non-desired escape from lambda expression\" text=\"PsiTreeUtil.getParentOfType($Parameter$, PsiMethod.class, true, PsiClass.class)\" recursive=\"false\" caseInsensitive=\"false\" type=\"JAVA\" reformatAccordingToStyle=\"true\" shortenFQN=\"true\" useStaticImport=\"true\" replacement=\"PsiTreeUtil.getParentOfType($Parameter$, PsiMethod.class, true, PsiClass.class, PsiLambdaExpression.class)\">\n        <constraint name=\"Instance\" minCount=\"0\" within=\"\" contains=\"\" />\n        <constraint name=\"MethodCall\" target=\"true\" within=\"\" contains=\"\" />\n        <constraint name=\"Parameter\" script=\"&quot;&quot;\" minCount=\"0\" maxCount=\"2147483647\" within=\"\" contains=\"\" />\n      </replaceConfiguration>\n      <replaceConfiguration name=\"StringUtil.stripQuotesAroundValue\" text=\"com.intellij.openapi.util.text.StringUtil.stripQuotesAroundValue($Parameter$)\" recursive=\"false\" caseInsensitive=\"false\" type=\"JAVA\" reformatAccordingToStyle=\"true\" shortenFQN=\"true\" replacement=\"com.intellij.openapi.util.text.StringUtil.unquoteString($Parameter$)\">\n        <constraint name=\"Parameter\" within=\"\" contains=\"\" />\n      </replaceConfiguration>\n      <replaceConfiguration name=\"new String(byte[]) is default locale dependent; use new String(byte[], Charset) instead\" text=\"new String($b$)\" recursive=\"false\" caseInsensitive=\"true\" type=\"JAVA\" reformatAccordingToStyle=\"true\" shortenFQN=\"true\" replacement=\"new String($b$, com.intellij.openapi.vfs.CharsetToolkit.UTF8_CHARSET)\">\n        <constraint name=\"s\" within=\"\" contains=\"\" />\n        <constraint name=\"type\" within=\"\" contains=\"\" />\n        <constraint name=\"b\" nameOfExprType=\"byte\\[\\]\" exprTypeWithinHierarchy=\"true\" within=\"\" contains=\"\" />\n      </replaceConfiguration>\n      <searchConfiguration name=\"Anonymous threads are discouraged; please supply name\" text=\"new Thread()\" recursive=\"true\" caseInsensitive=\"true\" type=\"JAVA\">\n        <constraint name=\"s\" within=\"\" contains=\"\" />\n        <constraint name=\"type\" within=\"\" contains=\"\" />\n      </searchConfiguration>\n      <searchConfiguration name=\"Anonymous threads runnable are discouraged; please supply name\" text=\"new Thread($runnable$)\" recursive=\"true\" caseInsensitive=\"true\" type=\"JAVA\">\n        <constraint name=\"s\" within=\"\" contains=\"\" />\n        <constraint name=\"type\" within=\"\" contains=\"\" />\n        <constraint name=\"runnable\" nameOfExprType=\"java.lang.Runnable\" exprTypeWithinHierarchy=\"true\" within=\"\" contains=\"\" />\n      </searchConfiguration>\n      <searchConfiguration name=\"DBE model property is private (must be public)\" text=\"class $Class$ {&#10;  @StateProperty&#10;  private $FieldType$ $FieldName$&#10;}\" recursive=\"true\" caseInsensitive=\"true\" type=\"JAVA\">\n        <constraint name=\"Class\" within=\"\" contains=\"\" />\n        <constraint name=\"FieldType\" within=\"\" contains=\"\" />\n        <constraint name=\"FieldName\" target=\"true\" within=\"\" contains=\"\" />\n        <constraint name=\"__context__\" within=\"\" contains=\"\" />\n      </searchConfiguration>\n      <searchConfiguration name=\"DBE model property is package local (must be public)\" text=\"class $Class$ {&#10;  @StateProperty&#10;  @Modifier(&quot;packageLocal&quot;) $FieldType$ $FieldName$&#10;}\" recursive=\"true\" caseInsensitive=\"true\" type=\"JAVA\">\n        <constraint name=\"Class\" within=\"\" contains=\"\" />\n        <constraint name=\"FieldType\" within=\"\" contains=\"\" />\n        <constraint name=\"FieldName\" target=\"true\" within=\"\" contains=\"\" />\n      </searchConfiguration>\n      <searchConfiguration name=\"DBE model property is protected (must be public)\" text=\"class $Class$ {&#10;  @StateProperty&#10;  protected $FieldType$ $FieldName$&#10;}\" recursive=\"true\" caseInsensitive=\"true\" type=\"JAVA\">\n        <constraint name=\"Class\" within=\"\" contains=\"\" />\n        <constraint name=\"FieldType\" within=\"\" contains=\"\" />\n        <constraint name=\"FieldName\" target=\"true\" within=\"\" contains=\"\" />\n        <constraint name=\"__context__\" within=\"\" contains=\"\" />\n      </searchConfiguration>\n    </inspection_tool>\n    <inspection_tool class=\"SeamAnnotationIncorrectSignatureInspection\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"SeamAnnotationsInconsistencyInspection\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"SeamBijectionIllegalScopeParameterInspection\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"SeamBijectionTypeMismatchInspection\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"SeamBijectionUndefinedContextVariableInspection\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"SeamDomModelInspection\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"SeamDuplicateComponentsInspection\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"SeamIllegalComponentScopeInspection\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"SeamJamComponentInspection\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"SessionScopedInjectsRequestScoped\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"SetReplaceableByEnumSet\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"SetupCallsSuperSetup\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"SetupIsPublicVoidNoArg\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"ShiftOutOfRangeJS\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"SillyAssignmentJS\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"SimplifiableAnnotation\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"SimplifiableEqualsExpression\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"SimplifiableIfStatement\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"Since15\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"SingletonInjectsScoped\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"SizeReplaceableByIsEmpty\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"SocketResource\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\">\n      <option name=\"insideTryAllowed\" value=\"false\" />\n    </inspection_tool>\n    <inspection_tool class=\"SpringFacetCodeInspection\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"SpringFacetInspection\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\">\n      <option name=\"checkTestFiles\" value=\"false\" />\n    </inspection_tool>\n    <inspection_tool class=\"SpringFacetProgrammaticInspection\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"StaticCallOnSubclass\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"StaticFieldReferenceOnSubclass\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"StaticSuite\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"StringConcatenationInLoops\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\">\n      <option name=\"m_ignoreUnlessAssigned\" value=\"true\" />\n    </inspection_tool>\n    <inspection_tool class=\"StringConstructor\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\">\n      <option name=\"ignoreSubstringArguments\" value=\"false\" />\n    </inspection_tool>\n    <inspection_tool class=\"StringEquality\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"StringEqualsEmptyString\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"StringToUpperWithoutLocale\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"Struts2ModelInspection\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"StrutsInspection\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"StrutsTilesInspection\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"StrutsValidatorFormInspection\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"StrutsValidatorInspection\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"SwitchStatementWithConfusingDeclaration\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"SynchronizeOnThis\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"SystemOutErr\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\">\n      <scope name=\"Tests\" level=\"WARNING\" enabled=\"false\" />\n    </inspection_tool>\n    <inspection_tool class=\"TeardownCallsSuperTeardown\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"TeardownIsPublicVoidNoArg\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"TelReferencesInspection\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"TestCaseWithNoTestMethods\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\">\n      <option name=\"ignoreSupers\" value=\"true\" />\n    </inspection_tool>\n    <inspection_tool class=\"TestMethodIsPublicVoidNoArg\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"TestOnlyProblems\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"TextLabelInSwitchStatement\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"ThisExpressionReferencesGlobalObjectJS\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"ThreadDumpStack\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\">\n      <scope name=\"Tests\" level=\"WARNING\" enabled=\"false\" />\n    </inspection_tool>\n    <inspection_tool class=\"ThreadRun\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"ThreadStartInConstruction\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"ThrowFromFinallyBlockJS\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"ThrowablePrintStackTrace\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\">\n      <scope name=\"Tests\" level=\"WARNING\" enabled=\"false\" />\n    </inspection_tool>\n    <inspection_tool class=\"TrivialConditionalJS\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"TrivialIfJS\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"TrivialStringConcatenation\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"TypeParameterExtendsFinalClass\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"UNCHECKED_WARNING\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\">\n      <option name=\"IGNORE_UNCHECKED_ASSIGNMENT\" value=\"false\" />\n      <option name=\"IGNORE_UNCHECKED_GENERICS_ARRAY_CREATION\" value=\"true\" />\n      <option name=\"IGNORE_UNCHECKED_CALL\" value=\"false\" />\n      <option name=\"IGNORE_UNCHECKED_CAST\" value=\"false\" />\n      <option name=\"IGNORE_UNCHECKED_OVERRIDING\" value=\"false\" />\n    </inspection_tool>\n    <inspection_tool class=\"UndeclaredTests\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"false\">\n      <scope name=\"Tests\" level=\"WARNING\" enabled=\"true\" />\n    </inspection_tool>\n    <inspection_tool class=\"UninstantiableBinding\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"UninstantiableImplementedByClass\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"UninstantiableProvidedByClass\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"UnnecessarilyQualifiedStaticUsage\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\">\n      <scope name=\"Tests\" level=\"WARNING\" enabled=\"false\">\n        <option name=\"m_ignoreStaticFieldAccesses\" value=\"false\" />\n        <option name=\"m_ignoreStaticMethodCalls\" value=\"false\" />\n        <option name=\"m_ignoreStaticAccessFromStaticContext\" value=\"false\" />\n      </scope>\n      <option name=\"m_ignoreStaticFieldAccesses\" value=\"false\" />\n      <option name=\"m_ignoreStaticMethodCalls\" value=\"false\" />\n      <option name=\"m_ignoreStaticAccessFromStaticContext\" value=\"false\" />\n    </inspection_tool>\n    <inspection_tool class=\"UnnecessarilyQualifiedStaticallyImportedElement\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"UnnecessaryBlockStatement\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\">\n      <option name=\"ignoreSwitchBranches\" value=\"false\" />\n    </inspection_tool>\n    <inspection_tool class=\"UnnecessaryCallToStringValueOf\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"UnnecessaryContinueJS\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"UnnecessaryFinalOnLocalVariableOrParameter\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"UnnecessaryFullyQualifiedName\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\">\n      <scope name=\"Tests\" level=\"WARNING\" enabled=\"false\">\n        <option name=\"m_ignoreJavadoc\" value=\"true\" />\n      </scope>\n      <option name=\"m_ignoreJavadoc\" value=\"true\" />\n    </inspection_tool>\n    <inspection_tool class=\"UnnecessaryLabelJS\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"UnnecessaryLabelOnBreakStatement\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"UnnecessaryLabelOnBreakStatementJS\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"UnnecessaryLabelOnContinueStatement\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"UnnecessaryLabelOnContinueStatementJS\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"UnnecessaryLocalVariable\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\">\n      <option name=\"m_ignoreImmediatelyReturnedVariables\" value=\"false\" />\n      <option name=\"m_ignoreAnnotatedVariables\" value=\"true\" />\n    </inspection_tool>\n    <inspection_tool class=\"UnnecessaryLocalVariableJS\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\">\n      <option name=\"m_ignoreImmediatelyReturnedVariables\" value=\"false\" />\n      <option name=\"m_ignoreAnnotatedVariables\" value=\"false\" />\n    </inspection_tool>\n    <inspection_tool class=\"UnnecessaryParentheses\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\">\n      <option name=\"ignoreClarifyingParentheses\" value=\"false\" />\n      <option name=\"ignoreParenthesesOnConditionals\" value=\"false\" />\n      <option name=\"ignoreParenthesesOnLambdaParameter\" value=\"false\" />\n    </inspection_tool>\n    <inspection_tool class=\"UnnecessaryQualifierForThis\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"UnnecessaryReturnJS\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"UnnecessaryStaticInjection\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"UnnecessarySuperConstructor\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"UnnecessaryThis\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"UnnecessaryToStringCall\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"UnreachableCodeJS\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"UnresolvedReference\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"UnsortedPropertiesFile\" enabled=\"false\" level=\"INFO\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"UnterminatedStatementJS\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\">\n      <option name=\"ignoreSemicolonAtEndOfBlock\" value=\"true\" />\n    </inspection_tool>\n    <inspection_tool class=\"UseJBColor\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\">\n      <scope name=\"Tests\" level=\"WARNING\" enabled=\"false\" />\n    </inspection_tool>\n    <inspection_tool class=\"UseOfPropertiesAsHashtable\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"UtilityClassWithPublicConstructor\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"ValidatorConfigModelInspection\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"ValidatorModelInspection\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"WaitNotInLoop\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"WaitNotInSynchronizedContext\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"WaitWhileHoldingTwoLocks\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\" />\n    <inspection_tool class=\"WeakerAccess\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\">\n      <option name=\"SUGGEST_PACKAGE_LOCAL_FOR_MEMBERS\" value=\"false\" />\n      <option name=\"SUGGEST_PACKAGE_LOCAL_FOR_TOP_CLASSES\" value=\"false\" />\n      <option name=\"SUGGEST_PRIVATE_FOR_INNERS\" value=\"false\" />\n    </inspection_tool>\n    <inspection_tool class=\"Weblogic\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"WhileCanBeForeach\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"WhileLoopSpinsOnField\" enabled=\"true\" level=\"WARNING\" enabled_by_default=\"true\">\n      <option name=\"ignoreNonEmtpyLoops\" value=\"false\" />\n    </inspection_tool>\n    <inspection_tool class=\"WithStatementJS\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"XsltDeclarations\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"XsltTemplateInvocation\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"XsltUnusedDeclaration\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"XsltVariableShadowing\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"osmorcClassInDefaultPackage\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"osmorcNonOsgiMavenDependency\" enabled=\"false\" level=\"WARNING\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"osmorcUnknownManifestPackage\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"osmorcUnregisteredActivator\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n    <inspection_tool class=\"osmorcWrongImportPackage\" enabled=\"false\" level=\"ERROR\" enabled_by_default=\"false\" />\n  </profile>\n</component>"
  },
  {
    "path": ".idea/inspectionProfiles/profiles_settings.xml",
    "content": "<component name=\"InspectionProjectProfileManager\">\n  <settings>\n    <option name=\"PROJECT_PROFILE\" value=\"idea.default\" />\n    <option name=\"USE_PROJECT_PROFILE\" value=\"true\" />\n    <version value=\"1.0\" />\n  </settings>\n</component>"
  },
  {
    "path": ".idea/runConfigurations/All_tests.xml",
    "content": "<component name=\"ProjectRunConfigurationManager\">\n  <configuration default=\"false\" name=\"All tests\" type=\"GradleRunConfiguration\" factoryName=\"Gradle\" singleton=\"true\">\n    <ExternalSystemSettings>\n      <option name=\"executionName\" />\n      <option name=\"externalProjectPath\" value=\"$PROJECT_DIR$\" />\n      <option name=\"externalSystemIdString\" value=\"GRADLE\" />\n      <option name=\"scriptParameters\" value=\"--stacktrace --info\" />\n      <option name=\"taskDescriptions\">\n        <list />\n      </option>\n      <option name=\"taskNames\">\n        <list>\n          <option value=\"cleanTest\" />\n          <option value=\"test\" />\n        </list>\n      </option>\n      <option name=\"vmOptions\" value=\"\" />\n    </ExternalSystemSettings>\n    <method />\n  </configuration>\n</component>"
  },
  {
    "path": ".idea/runConfigurations/Build_plugin.xml",
    "content": "<component name=\"ProjectRunConfigurationManager\">\n  <configuration default=\"false\" name=\"Build plugin\" type=\"GradleRunConfiguration\" factoryName=\"Gradle\" singleton=\"true\">\n    <ExternalSystemSettings>\n      <option name=\"executionName\" />\n      <option name=\"externalProjectPath\" value=\"$PROJECT_DIR$\" />\n      <option name=\"externalSystemIdString\" value=\"GRADLE\" />\n      <option name=\"scriptParameters\" value=\"\" />\n      <option name=\"taskDescriptions\">\n        <list />\n      </option>\n      <option name=\"taskNames\">\n        <list>\n          <option value=\"buildPlugin\" />\n        </list>\n      </option>\n      <option name=\"vmOptions\" value=\"\" />\n    </ExternalSystemSettings>\n    <method />\n  </configuration>\n</component>"
  },
  {
    "path": ".idea/runConfigurations/Go.xml",
    "content": "<component name=\"ProjectRunConfigurationManager\">\n  <configuration default=\"false\" name=\"Go\" type=\"GradleRunConfiguration\" factoryName=\"Gradle\" singleton=\"true\">\n    <log_file path=\"$PROJECT_DIR$/build/idea-sandbox/system/log/idea.log\" checked=\"true\" skipped=\"true\" show_all=\"false\" alias=\"idea.log\" />\n    <ExternalSystemSettings>\n      <option name=\"executionName\" />\n      <option name=\"externalProjectPath\" value=\"$PROJECT_DIR$\" />\n      <option name=\"externalSystemIdString\" value=\"GRADLE\" />\n      <option name=\"scriptParameters\" value=\"--stacktrace --info\" />\n      <option name=\"taskDescriptions\">\n        <list />\n      </option>\n      <option name=\"taskNames\">\n        <list>\n          <option value=\":runIdea\" />\n        </list>\n      </option>\n      <option name=\"vmOptions\" value=\"\" />\n    </ExternalSystemSettings>\n    <method />\n  </configuration>\n</component>"
  },
  {
    "path": ".idea/runConfigurations/Local_IDE.xml",
    "content": "<component name=\"ProjectRunConfigurationManager\">\n  <configuration default=\"false\" name=\"Local IDE\" type=\"GradleRunConfiguration\" factoryName=\"Gradle\" singleton=\"true\">\n    <log_file path=\"$PROJECT_DIR$/build/idea-sandbox/system/log/idea.log\" checked=\"true\" skipped=\"true\" show_all=\"false\" alias=\"idea.log\" />\n    <ExternalSystemSettings>\n      <option name=\"executionName\" />\n      <option name=\"externalProjectPath\" value=\"$PROJECT_DIR$\" />\n      <option name=\"externalSystemIdString\" value=\"GRADLE\" />\n      <option name=\"scriptParameters\" value=\"--stacktrace --info\" />\n      <option name=\"taskDescriptions\">\n        <list />\n      </option>\n      <option name=\"taskNames\">\n        <list>\n          <option value=\":runIdea\" />\n        </list>\n      </option>\n      <option name=\"vmOptions\" value=\"-Dorg.gradle.project.localIdePath=&quot;/Applications/WebStorm.app&quot;\" />\n    </ExternalSystemSettings>\n    <method />\n  </configuration>\n</component>"
  },
  {
    "path": ".idea/runConfigurations/Performance_tests.xml",
    "content": "<component name=\"ProjectRunConfigurationManager\">\n  <configuration default=\"false\" name=\"Performance tests\" type=\"GradleRunConfiguration\" factoryName=\"Gradle\" singleton=\"true\">\n    <ExternalSystemSettings>\n      <option name=\"executionName\" />\n      <option name=\"externalProjectPath\" value=\"$PROJECT_DIR$\" />\n      <option name=\"externalSystemIdString\" value=\"GRADLE\" />\n      <option name=\"scriptParameters\" value=\"--stacktrace --info\" />\n      <option name=\"taskDescriptions\">\n        <list />\n      </option>\n      <option name=\"taskNames\">\n        <list>\n          <option value=\"performanceTest\" />\n        </list>\n      </option>\n      <option name=\"vmOptions\" value=\"\" />\n    </ExternalSystemSettings>\n    <method />\n  </configuration>\n</component>"
  },
  {
    "path": ".idea/scopes/scope_settings.xml",
    "content": "<component name=\"DependencyValidationManager\">\n  <state>\n    <option name=\"SKIP_IMPORT_STATEMENTS\" value=\"false\" />\n  </state>\n</component>"
  },
  {
    "path": ".idea/scopes/testdata.xml",
    "content": "<component name=\"DependencyValidationManager\">\n  <scope name=\"testdata\" pattern=\"file[intellij-go]:testData//*\" />\n</component>"
  },
  {
    "path": ".idea/uiDesigner.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"Palette2\">\n    <group name=\"Swing\">\n      <item class=\"com.intellij.uiDesigner.HSpacer\" tooltip-text=\"Horizontal Spacer\" icon=\"/com/intellij/uiDesigner/icons/hspacer.png\" removable=\"false\" auto-create-binding=\"false\" can-attach-label=\"false\">\n        <default-constraints vsize-policy=\"1\" hsize-policy=\"6\" anchor=\"0\" fill=\"1\" />\n      </item>\n      <item class=\"com.intellij.uiDesigner.VSpacer\" tooltip-text=\"Vertical Spacer\" icon=\"/com/intellij/uiDesigner/icons/vspacer.png\" removable=\"false\" auto-create-binding=\"false\" can-attach-label=\"false\">\n        <default-constraints vsize-policy=\"6\" hsize-policy=\"1\" anchor=\"0\" fill=\"2\" />\n      </item>\n      <item class=\"javax.swing.JPanel\" icon=\"/com/intellij/uiDesigner/icons/panel.png\" removable=\"false\" auto-create-binding=\"false\" can-attach-label=\"false\">\n        <default-constraints vsize-policy=\"3\" hsize-policy=\"3\" anchor=\"0\" fill=\"3\" />\n      </item>\n      <item class=\"javax.swing.JScrollPane\" icon=\"/com/intellij/uiDesigner/icons/scrollPane.png\" removable=\"false\" auto-create-binding=\"false\" can-attach-label=\"true\">\n        <default-constraints vsize-policy=\"7\" hsize-policy=\"7\" anchor=\"0\" fill=\"3\" />\n      </item>\n      <item class=\"javax.swing.JButton\" icon=\"/com/intellij/uiDesigner/icons/button.png\" removable=\"false\" auto-create-binding=\"true\" can-attach-label=\"false\">\n        <default-constraints vsize-policy=\"0\" hsize-policy=\"3\" anchor=\"0\" fill=\"1\" />\n        <initial-values>\n          <property name=\"text\" value=\"Button\" />\n        </initial-values>\n      </item>\n      <item class=\"javax.swing.JRadioButton\" icon=\"/com/intellij/uiDesigner/icons/radioButton.png\" removable=\"false\" auto-create-binding=\"true\" can-attach-label=\"false\">\n        <default-constraints vsize-policy=\"0\" hsize-policy=\"3\" anchor=\"8\" fill=\"0\" />\n        <initial-values>\n          <property name=\"text\" value=\"RadioButton\" />\n        </initial-values>\n      </item>\n      <item class=\"javax.swing.JCheckBox\" icon=\"/com/intellij/uiDesigner/icons/checkBox.png\" removable=\"false\" auto-create-binding=\"true\" can-attach-label=\"false\">\n        <default-constraints vsize-policy=\"0\" hsize-policy=\"3\" anchor=\"8\" fill=\"0\" />\n        <initial-values>\n          <property name=\"text\" value=\"CheckBox\" />\n        </initial-values>\n      </item>\n      <item class=\"javax.swing.JLabel\" icon=\"/com/intellij/uiDesigner/icons/label.png\" removable=\"false\" auto-create-binding=\"false\" can-attach-label=\"false\">\n        <default-constraints vsize-policy=\"0\" hsize-policy=\"0\" anchor=\"8\" fill=\"0\" />\n        <initial-values>\n          <property name=\"text\" value=\"Label\" />\n        </initial-values>\n      </item>\n      <item class=\"javax.swing.JTextField\" icon=\"/com/intellij/uiDesigner/icons/textField.png\" removable=\"false\" auto-create-binding=\"true\" can-attach-label=\"true\">\n        <default-constraints vsize-policy=\"0\" hsize-policy=\"6\" anchor=\"8\" fill=\"1\">\n          <preferred-size width=\"150\" height=\"-1\" />\n        </default-constraints>\n      </item>\n      <item class=\"javax.swing.JPasswordField\" icon=\"/com/intellij/uiDesigner/icons/passwordField.png\" removable=\"false\" auto-create-binding=\"true\" can-attach-label=\"true\">\n        <default-constraints vsize-policy=\"0\" hsize-policy=\"6\" anchor=\"8\" fill=\"1\">\n          <preferred-size width=\"150\" height=\"-1\" />\n        </default-constraints>\n      </item>\n      <item class=\"javax.swing.JFormattedTextField\" icon=\"/com/intellij/uiDesigner/icons/formattedTextField.png\" removable=\"false\" auto-create-binding=\"true\" can-attach-label=\"true\">\n        <default-constraints vsize-policy=\"0\" hsize-policy=\"6\" anchor=\"8\" fill=\"1\">\n          <preferred-size width=\"150\" height=\"-1\" />\n        </default-constraints>\n      </item>\n      <item class=\"javax.swing.JTextArea\" icon=\"/com/intellij/uiDesigner/icons/textArea.png\" removable=\"false\" auto-create-binding=\"true\" can-attach-label=\"true\">\n        <default-constraints vsize-policy=\"6\" hsize-policy=\"6\" anchor=\"0\" fill=\"3\">\n          <preferred-size width=\"150\" height=\"50\" />\n        </default-constraints>\n      </item>\n      <item class=\"javax.swing.JTextPane\" icon=\"/com/intellij/uiDesigner/icons/textPane.png\" removable=\"false\" auto-create-binding=\"true\" can-attach-label=\"true\">\n        <default-constraints vsize-policy=\"6\" hsize-policy=\"6\" anchor=\"0\" fill=\"3\">\n          <preferred-size width=\"150\" height=\"50\" />\n        </default-constraints>\n      </item>\n      <item class=\"javax.swing.JEditorPane\" icon=\"/com/intellij/uiDesigner/icons/editorPane.png\" removable=\"false\" auto-create-binding=\"true\" can-attach-label=\"true\">\n        <default-constraints vsize-policy=\"6\" hsize-policy=\"6\" anchor=\"0\" fill=\"3\">\n          <preferred-size width=\"150\" height=\"50\" />\n        </default-constraints>\n      </item>\n      <item class=\"javax.swing.JComboBox\" icon=\"/com/intellij/uiDesigner/icons/comboBox.png\" removable=\"false\" auto-create-binding=\"true\" can-attach-label=\"true\">\n        <default-constraints vsize-policy=\"0\" hsize-policy=\"2\" anchor=\"8\" fill=\"1\" />\n      </item>\n      <item class=\"javax.swing.JTable\" icon=\"/com/intellij/uiDesigner/icons/table.png\" removable=\"false\" auto-create-binding=\"true\" can-attach-label=\"false\">\n        <default-constraints vsize-policy=\"6\" hsize-policy=\"6\" anchor=\"0\" fill=\"3\">\n          <preferred-size width=\"150\" height=\"50\" />\n        </default-constraints>\n      </item>\n      <item class=\"javax.swing.JList\" icon=\"/com/intellij/uiDesigner/icons/list.png\" removable=\"false\" auto-create-binding=\"true\" can-attach-label=\"false\">\n        <default-constraints vsize-policy=\"6\" hsize-policy=\"2\" anchor=\"0\" fill=\"3\">\n          <preferred-size width=\"150\" height=\"50\" />\n        </default-constraints>\n      </item>\n      <item class=\"javax.swing.JTree\" icon=\"/com/intellij/uiDesigner/icons/tree.png\" removable=\"false\" auto-create-binding=\"true\" can-attach-label=\"false\">\n        <default-constraints vsize-policy=\"6\" hsize-policy=\"6\" anchor=\"0\" fill=\"3\">\n          <preferred-size width=\"150\" height=\"50\" />\n        </default-constraints>\n      </item>\n      <item class=\"javax.swing.JTabbedPane\" icon=\"/com/intellij/uiDesigner/icons/tabbedPane.png\" removable=\"false\" auto-create-binding=\"true\" can-attach-label=\"false\">\n        <default-constraints vsize-policy=\"3\" hsize-policy=\"3\" anchor=\"0\" fill=\"3\">\n          <preferred-size width=\"200\" height=\"200\" />\n        </default-constraints>\n      </item>\n      <item class=\"javax.swing.JSplitPane\" icon=\"/com/intellij/uiDesigner/icons/splitPane.png\" removable=\"false\" auto-create-binding=\"false\" can-attach-label=\"false\">\n        <default-constraints vsize-policy=\"3\" hsize-policy=\"3\" anchor=\"0\" fill=\"3\">\n          <preferred-size width=\"200\" height=\"200\" />\n        </default-constraints>\n      </item>\n      <item class=\"javax.swing.JSpinner\" icon=\"/com/intellij/uiDesigner/icons/spinner.png\" removable=\"false\" auto-create-binding=\"true\" can-attach-label=\"true\">\n        <default-constraints vsize-policy=\"0\" hsize-policy=\"6\" anchor=\"8\" fill=\"1\" />\n      </item>\n      <item class=\"javax.swing.JSlider\" icon=\"/com/intellij/uiDesigner/icons/slider.png\" removable=\"false\" auto-create-binding=\"true\" can-attach-label=\"false\">\n        <default-constraints vsize-policy=\"0\" hsize-policy=\"6\" anchor=\"8\" fill=\"1\" />\n      </item>\n      <item class=\"javax.swing.JSeparator\" icon=\"/com/intellij/uiDesigner/icons/separator.png\" removable=\"false\" auto-create-binding=\"false\" can-attach-label=\"false\">\n        <default-constraints vsize-policy=\"6\" hsize-policy=\"6\" anchor=\"0\" fill=\"3\" />\n      </item>\n      <item class=\"javax.swing.JProgressBar\" icon=\"/com/intellij/uiDesigner/icons/progressbar.png\" removable=\"false\" auto-create-binding=\"true\" can-attach-label=\"false\">\n        <default-constraints vsize-policy=\"0\" hsize-policy=\"6\" anchor=\"0\" fill=\"1\" />\n      </item>\n      <item class=\"javax.swing.JToolBar\" icon=\"/com/intellij/uiDesigner/icons/toolbar.png\" removable=\"false\" auto-create-binding=\"false\" can-attach-label=\"false\">\n        <default-constraints vsize-policy=\"0\" hsize-policy=\"6\" anchor=\"0\" fill=\"1\">\n          <preferred-size width=\"-1\" height=\"20\" />\n        </default-constraints>\n      </item>\n      <item class=\"javax.swing.JToolBar$Separator\" icon=\"/com/intellij/uiDesigner/icons/toolbarSeparator.png\" removable=\"false\" auto-create-binding=\"false\" can-attach-label=\"false\">\n        <default-constraints vsize-policy=\"0\" hsize-policy=\"0\" anchor=\"0\" fill=\"1\" />\n      </item>\n      <item class=\"javax.swing.JScrollBar\" icon=\"/com/intellij/uiDesigner/icons/scrollbar.png\" removable=\"false\" auto-create-binding=\"true\" can-attach-label=\"false\">\n        <default-constraints vsize-policy=\"6\" hsize-policy=\"0\" anchor=\"0\" fill=\"2\" />\n      </item>\n    </group>\n  </component>\n</project>\n\n"
  },
  {
    "path": ".idea/vcs.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"IssueNavigationConfiguration\">\n    <option name=\"links\">\n      <list>\n        <IssueNavigationLink>\n          <option name=\"issueRegexp\" value=\"#(\\d+)\" />\n          <option name=\"linkRegexp\" value=\"https://github.com/go-lang-plugin-org/go-lang-idea-plugin/issues/$1\" />\n        </IssueNavigationLink>\n      </list>\n    </option>\n  </component>\n  <component name=\"VcsDirectoryMappings\">\n    <mapping directory=\"$PROJECT_DIR$\" vcs=\"Git\" />\n  </component>\n</project>"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "# How to contribute\n\n[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/go-lang-plugin-org/go-lang-idea-plugin?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\n## Contents\n+ [Reporting errors](#reporting-errors)\n+ [Contributing to the code](#contributing-to-the-code)\n+ [Submitting test cases](#submitting-test-cases)\n+ [Building and running the unit tests](#building-and-running-the-unit-tests)\n+ [Configuring and debugging in IntelliJ](#configuring-and-debugging-in-IntelliJ)\n+ [Code Style](#code-style)\n+ [Delve integration](#delve-integration)\n+ [Useful links](#useful-links)\n\n## Reporting errors\n\nBefore reporting an error, please read the [FAQ](https://github.com/go-lang-plugin-org/go-lang-idea-plugin/wiki/FAQ)\nand search for the issue in the issue tracker. Also, please don't bump, +1\nor \"me too\" issues. Thank you.\n\nThe simplest way to contribute to the plugin is to report issues you encounter\nin your day to day use.\n\nAs a rule of thumb, always keep in mind that we are developers just like you. So,\nwhenever you are going to report an issue, think of how you'd like to receive issues\nfor your projects. Also, we are doing this in our spare time, so the more information\nwe have in the report, the faster we can replicate the problem and get on solving it\nrather that just doing a bunch of ping-pong in comments trying to extract the needed\ndetails from you.\n\nThis information applies also when you don't have an error that is caught by the\nbuilt-in facility but it's something that happens and shouldn't happen (say for\nexample, a formatting issue).\n\nWhen filing an issue, please answer these questions:\n\n- What version of Go plugin are you using?\n- What version of IDEA are you using?\n- What version of Java are you using?\n- What did you do?\n- What did you expect to see?\n- What did you see instead?\n\nAlso, every time you can, submit the piece of code that's generating the issue.\nAs it might be some proprietary code, take some time and write the smallest code\nsample that can reproduce it and paste it in the issue (or send it as a link to\n[Go Playground](http://play.golang.org/). Screenshots are useful, but, just like\nyou, we can't copy paste code from screenshots either.\n\nPlease ensure that the bug is not reported already, this helps us focusing on\nworking on bug fixes not triage work.\n\n## Contributing to the code\n\nIf you want to contribute to the code, go to GitHub and check out the latest version\nand follow the instructions on how to build the plugin from source. After that, you\ncan start picking some [pending tasks](https://github.com/go-lang-plugin-org/go-lang-idea-plugin/issues) on the issue tracker.\n\nMake sure you look for issues tags with [up for grabs](https://github.com/go-lang-plugin-org/go-lang-idea-plugin/labels/up%20for%20grabs)\nas these are some of the easier ones to get started with.\n\n### CLA requirement\n\nContributing to the plugin requires a signed CLA with JetBrains.\nYou can view the steps necessary for this at [this page](http://www.jetbrains.org/display/IJOS/Contribute#Contribute-ContributeCode).\n\n### Submitting test cases\n\nSubmitting test cases is the next best thing you can do to developing on this\nproject. In fact, you'll actually develop on it since the test code you are\ngoing to contribute is still code.\n\nWhenever your time or knowledge allows, submitting good test cases for either\nfor existing issues or for issues that you come across will make a huge difference\nin the way we spend time to understand the problems and thus solve them.\n\n### Building and running the unit tests\n\nAll code can be checked out from our Github repository in the usual way. That is, clone the repository with HTTPS or SSH:\n\n```\n$ git clone https://github.com/go-lang-plugin-org/go-lang-idea-plugin.git\nCloning into 'go-lang-idea-plugin'...\n```\n\nOn Linux/Mac OS X we use gradle as our build system. Gradle is self-installing. This one command\n\n```\n$ ./gradlew buildPlugin\n```\n\ncompiles everything, runs the tests, and builds the plugins. The output appears in `build/distributions`.\n\n\n### Configuring and debugging in IntelliJ\n\n1. [Download](http://www.jetbrains.com/idea/) IDEA Community or Ultimate\n1. Setup the right version of [Grammar-Kit](https://github.com/JetBrains/Grammar-Kit/releases/download/1.4.1/GrammarKit.zip)\n1. Make sure that **UI Designer** and **Gradle** plugins are turned on\n1. Checkout plugin repo and open the project\n1. Open the copy of go-lang-idea-plugin repository (`File | New | Project from Existing Sources...`) with it. Then import Gradle project. The default project module config should work with a recent IDEA 15 version\n1. Git revert changes to the .idea folder because IDEA Gradle import blows it away (https://youtrack.jetbrains.com/issue/IDEA-146295)\n1. Open `File -> Project Settings`, go to the SDKs entry, click the `+` and select JDK 1.6\n1. Go to the Project entry and make sure that the Project SDK is set to selected SDK\n1. Wait until the source files of the SDK are indexed\n1. Run or debug the **Go** run configuration\n\nIf you use Mac, you may check follow path while looking for SDK:\n```\n/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/\n/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/\n```\n\nNow you can use the run configurations provided by the plugin source code to\nrun and play.\n\nThere are multiple branches of the plugin which correspond to different versions\nof the IntelliJ Platform:\n\n- 141 -> can be used for IDEA 14.1\n- 144 -> can be used for IDEA 16\n\nThe master branch will follow the current stable release of IDEA (currently IDEA 15).\n\nGoing to ``` Run -> Run... ``` will provide you with the following run configurations:\n\n+ `Go` will spawn a new IDEA with the latest version of the plugin enabled.\n+ `All tests` will run all the test cases available in the project. Please make\nsure that all the test cases pass before committing anything (or making a pull request).\n+ `Performance tests` will run all performance test cases available in the project.\n+ `Build plugin` will build plugin distribution archive. All artifacts are stored in `gradle/distributions` directory.\n\nYou can also have a look at some [useful links](#useful-links) for getting started with\nplugin development on IntelliJ IDEA platform.\n\n##### IMPORTANT: MacOS X users note\n\nYou might get the following error ```Unsupported major.minor version 52``` in the\nlogs or the plugin might not work at all.\n\nCheck the version of Java your IDE is running on. Since in 99.9% of the cases it will\nbe Java 6, this means that you compiled the plugin with a different version of Java,\nfor example Java 8.\n\nTo fix the error, please use Java JDK 6 to compile the plugin and everything should work.\n\nTo get the log files, you can go to ```Help | Show Log in File Manager``` and then the\nlog will be displayed to you.\n\n### Code Style\n\n* Please don't use class comments with information about author or date and time creation.\n* Please don't commit anything from `.idea/` directory if you're not very sure what you doing.\n\n### Delve integration\n\nWe're syncing the plugin source with the [Delve](https://github.com/derekparker/delve) debugger.\n\nIf you want to customize delve distribution that's used in the plugin you can use `-Dorg.gradle.project.customDlvPath` for setting up the path to your local version of dlv.\n\n### Useful links\n\nFor further information please see [the official plugin development page](http://confluence.jetbrains.net/display/IDEADEV/PluginDevelopment).\n\nAlso, you can read some [tips and tricks](http://tomaszdziurko.pl/2011/09/developing-plugin-intellij-idea-some-tips-and-links/).\n\nFor all development questions and proposals, you can mail to our [Open API and Plugin Development forum](https://devnet.jetbrains.com/community/idea/open_api_and_plugin_development).\n\nHappy hacking!\n"
  },
  {
    "path": "ISSUE_TEMPLATE.md",
    "content": "If you are using [GoLand](https://jetbrains.com/go) or [IntelliJ IDEA Ultimate](https://jetbrains.com/idea) 2017.3 or later, please report your issue at the official tracker: https://youtrack.jetbrains.com/issues/Go\n\nThis repository is not maintained anymore.\n\n- Plugin version (or commit hash):\n- IDE name and version:\n- Java version:\n- OS name and version: \n\n- What are you trying to do?\n\n- What would you expect to happen?\n\n- What happens?\n\n\nYour issue description goes here.\nPlease be as detailed as possible\n\n```go\nPlease include a go sample to reproduce the issue\n```\n\nOr include a screenshot / video of the issue.\n"
  },
  {
    "path": "LICENCE",
    "content": "Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License."
  },
  {
    "path": "README.md",
    "content": "# Go plugin for IntelliJ\n\n# Deprecation notice\n\nThis project is officially not maintained anymore. If you are using [GoLand](https://jetbrains.com/go) or [IntelliJ IDEA Ultimate](https://jetbrains.com/idea) 2017.3 or later, please report your issue at the official tracker: https://youtrack.jetbrains.com/issues/Go\n\n\n[![Build Status](https://teamcity.jetbrains.com/app/rest/builds/buildType:(id:IntellijIdeaPlugins_Go_Test)/statusIcon.svg?guest=1)](https://teamcity.jetbrains.com/viewType.html?buildTypeId=IntellijIdeaPlugins_Go_Test&guest=1) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/go-lang-plugin-org/go-lang-idea-plugin?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n## Pre-release builds\n\nPlease note, that the following features are available in [GoLand, JetBrains's official IDE](https://www.jetbrains.com/go/), or [JetBrains maintained plugin](https://plugins.jetbrains.com/plugin/9568-go), but **not in this plugin**:\n\n- Navigation\n  - Go to inheritor structures\n  - Go to super interfaces\n- Type-aware completion (aka Smart completion)\n- Extract function refactoring\n- Implement type\n- Inspections and quick-fixes\n    - Introduce method\n    - Introduce field\n    - Delete unused parameter\n    - Show symbol duplicates\n    - Add/delete missing/redundant expressions in case of assignment count mismatch\n    - Properly implemented Duplicated symbols inspection\n    - Recursive type detection\n    - Invalid const initialization\n- Tests and coverage\n    - Sub-tests support (runner, navigation, gutter actions)\n    - Debugging tests\n- Debugger\n    - Step out\n    - 100x faster performance\n- General\n    - Highlighting of go:generate comments\n    - Quick documentation for struct fields\n    - Semantic highlighting\n    - Parameter name hints\n    - SQL auto-injection\n    - Support for Go 1.9+\n    - Support for AppEngine 1.9.54+\n\n\n**Supported IDEs**\n\nThe plugin can be installed on following IntelliJ-based:\n\n- IntelliJ 2016.1+ (Ultimate or Community)\n- WebStorm 2016.1+\n- PhpStorm 2016.1+\n- PyCharm 2016.1+\n- RubyMine 2016.1+\n- CLion 2016.1+\n- Android Studio 1.2.1+\n\nPre-release builds are available in two forms: nightly and alphas. Alpha builds are usually released at the beginning of every week while nightly builds are released every night.\n\nTo use them do the following:\n\n1. Use [the instructions](https://www.jetbrains.com/idea/help/managing-enterprise-plugin-repositories.html)\n1. Paste the URL for the version you need:\n - alpha: https://plugins.jetbrains.com/plugins/alpha/5047\n - nightly: https://plugins.jetbrains.com/plugins/nightly/5047\n\n**NOTE**\nThe above links are not meant to be used in browsers, so don't report issues\nabout them not working or being inaccessible unless there's an error in the IDE itself.\n\nSince these are not stable releases, some things might not work as expected.\n\n### Release versions schema\n\nBellow you can see the versions of the plugin which correspond to the versions of the \nIntelliJ Platfom (IntelliJ IDEA, WebStorm, PyCharm etc.):\n\n| Plugin version number | Platform number |\n| ---- | --- |\n| 0.12.x | IntelliJ 2016.2 (IntelliJ IDEA 2016.2) | \n| 0.11.x | IntelliJ 2016.1 (IntelliJ IDEA 2016.1) | \n| 0.10.x | IntelliJ 143.1180 - 143.9999 (IntelliJ IDEA 15.0.2+) | \n| 0.9.x | IntelliJ 141.1532 - 141.9999 (IntelliJ IDEA 14.1) |\n \n If you are not using IntelliJ IDEA, then please check the build number of your IDE\n as that will correspond to the IntelliJ Platform version.\n\nReporting issues is very important for us as such, please see the section below\non how to submit a proper bug report.\n\n## FAQ\n\nHere's a list of the most frequently asked questions: [FAQ](https://github.com/go-lang-plugin-org/go-lang-idea-plugin/wiki/FAQ)\n \n## Bugs\n\nIf you've found a bug, which is not a duplicate, [report it](http://github.com/go-lang-plugin-org/go-lang-idea-plugin/issues).\n\nWhen reporting a bug, please include the following:\n- IDEA version\n- OS version\n- JDK version\n- Plugin version (or commit hash, if you built the plugin yourself)\n- Detailed steps to reproduce (please include sample code)\n\n## Bumping or +1 comments\n\nPlease don't comment with \"bump\", \"+1\", \"same for me\" or other irrelevant comments as they're useless for identifying the issue and finding the solution.\n\nContributions are always welcome and we'll do our best to make the most of them.\n\n## Contributing\n\nWe encourage you to contribute to the plugin if you find any issues or missing\nfunctionality that you'd like to see. In order to get started, see the\n[contribution](CONTRIBUTING.md) guide.\n\n## [People who helped](https://github.com/go-lang-plugin-org/go-lang-idea-plugin/graphs/contributors)\n\n## License\n\nThe Gopher icons are based on the Go mascot designed by [Renée French](http://reneefrench.blogspot.com/) and copyrighted under the [Creative Commons Attribution 3.0 license](http://creativecommons.org/licenses/by/3.0/us/).\n\nThe plugin is distributed under Apache License, version 2.0. For full license terms, see [LICENCE](https://github.com/go-lang-plugin-org/go-lang-idea-plugin/blob/master/LICENCE).\n"
  },
  {
    "path": "build.gradle",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nbuildscript {\n  repositories {\n    maven { url 'http://dl.bintray.com/jetbrains/intellij-plugin-service' }\n    maven { url \"https://oss.sonatype.org/content/repositories/snapshots/\" }\n  }\n  dependencies {\n    classpath \"org.jetbrains.intellij.plugins:gradle-intellij-plugin:0.2.0-SNAPSHOT\"\n  }\n}\n\nplugins {\n  id \"de.undercouch.download\" version \"3.1.0\"\n}\n\napply plugin: 'de.undercouch.download'\n\nversion = \"${version}.$buildNumber\"\nallprojects {\n  apply plugin: 'java'\n  sourceCompatibility = javaVersion\n  targetCompatibility = javaTargetVersion\n  tasks.withType(JavaCompile) { options.encoding = 'UTF-8' }\n\n  sourceSets {\n    main {\n      java.srcDirs 'src', 'gen'\n      resources.srcDirs 'resources', 'pluginResources'\n    }\n    test {\n      java.srcDir 'tests'\n    }\n  }\n\n  apply plugin: 'org.jetbrains.intellij'\n  intellij {\n    version ideaVersion\n    pluginName 'Go'\n    plugins 'coverage'\n    downloadSources Boolean.valueOf(sources)\n    sameSinceUntilBuild Boolean.valueOf(isEAP)\n    alternativeIdePath localIdePath\n    systemProperty 'dlv.path', customDlvPath\n  }\n}\n\npublishPlugin {\n  username publishUsername\n  password publishPassword\n  channels publishChannel\n}\n\npatchPluginXml {\n    if (customSinceBuild) {\n        sinceBuild customSinceBuild\n    }\n}\n\napply plugin: 'idea'\nidea {\n  project {\n    jdkName = javaVersion\n    languageLevel = javaVersion\n    vcs = 'Git'\n  }\n  module {\n    generatedSourceDirs += file('gen')\n  }\n}\n\nrepositories { maven { url \"http://dl.bintray.com/jetbrains/golang\" } }\ndependencies {\n  compile project(':utils'), project(':google-app-engine'), project(':google-app-engine:google-app-engine-yaml'), project(':plan9')\n  runtime \"com.jetbrains:delve:$delveVersion@zip\"\n}\n\n// delve packing\nproject.afterEvaluate {\n  prepareSandbox.doLast {\n    def libraries = \"$it.destinationDir/$intellij.pluginName/lib/\"\n    def delveFile = fileTree(dir: libraries, include: 'delve*').singleFile\n    copy {\n      from zipTree(delveFile)\n      into libraries\n    }\n    delveFile.delete()\n  }\n}\n\ntest {\n  useJUnit {\n    excludeCategories 'com.goide.categories.Performance'\n  }\n  testLogging {\n    exceptionFormat = 'full'\n  }\n}\n\ntask preparePerformanceTestData << {\n  downloadAndUnzip('https://storage.googleapis.com/golang/go1.5.1.src.tar.gz', 'go', 'go')\n  downloadAndUnzip('https://github.com/docker/docker/archive/v1.9.1.tar.gz', 'docker-1.9.1', 'docker')\n}\n\ntask performanceTest(type: Test, group: 'Verification', dependsOn: [classes, testClasses, preparePerformanceTestData]) {\n  maxHeapSize = '512m'\n  minHeapSize = '256m'\n\n  useJUnit {\n    includeCategories 'com.goide.categories.Performance'\n    reports.html.destination = \"$buildDir/reports/performanceTests\"\n  }\n  testLogging {\n    exceptionFormat = 'full'\n  }\n}\ncheck.dependsOn performanceTest\n\nprivate void downloadAndUnzip(url, sourceDir, targetDir) {\n  def testDataPath = \"$projectDir/testData/performance/\"\n  def markerFile = file(\"$testDataPath/$targetDir/markerFile\")\n  def tmpPath = \"$testDataPath/tmp/\"\n  def tar = file(\"$tmpPath/${targetDir}.tar.gz\")\n  if (!markerFile.exists()) {\n    download {\n      src url\n      dest tar\n    }\n    copy {\n      from tarTree(tar)\n      into tmpPath\n    }\n    copy {\n      from \"$tmpPath/$sourceDir\"\n      into \"$testDataPath/$targetDir\"\n    }\n    markerFile.createNewFile()\n  }\n  delete file(tmpPath)\n}"
  },
  {
    "path": "cloneToWt.sh",
    "content": "#!/bin/bash\n# Creates new worktrees for all IntelliJ IDEA repositories pointing to a new release branch.\n# Usage: ./cloneToWt.sh <target directory> <branch>\n# Restrictions:\n#   None of the given Git repositories should have the branch with name <branch>.\n#   There should be a remote branch origin/<branch> from which a new local branch will be created by this script.\n#   You must use Git 2.5.0 or later.\n\nset -e # Any command which returns non-zero exit code will cause this shell script to exit immediately\n\nif [[ -z \"$1\" || -z \"$2\" ]] ; then\n  echo \"\n  Usage:   ./cloneToWt.sh <target directory> <branch>\n  Example: ./cloneToWt.sh ~/intellij-go-143 143\"\n  exit 1\nfi\n\nNEW_REPO=\"$1\"\nBRANCH=\"$2\"\n\nif [[ \"$BRANCH\" == origin/* ]]; then\n  BRANCH=\"${BRANCH/origin\\//}\"\nfi\n\n# Absolute path to directory containing existing IntelliJ IDEA repo (and this script as well)\nOLD_REPO=\"$(cd \"`dirname \"$0\"`\"; pwd)\"\nROOTS=(\"/\")\n\nif [ -d \"$NEW_REPO\" ]; then\n  echo \"Directory '$NEW_REPO' already exists\"\n  exit 2\nfi\n\nfor ROOT in ${ROOTS[@]}; do\n  if [[ ! -z `git --git-dir=\"${OLD_REPO}${ROOT}/.git\" --work-tree=\"${OLD_REPO}${ROOT}\" branch --list $BRANCH` ]]; then\n    echo \"Branch '$BRANCH' already exists in $ROOT\"\n    exit 3\n  fi\ndone\n\nfor ROOT in ${ROOTS[@]}; do\n  git --git-dir=\"${OLD_REPO}${ROOT}/.git\" --work-tree=\"${OLD_REPO}${ROOT}\" worktree add -b $BRANCH \"${NEW_REPO}${ROOT}\" origin/${BRANCH}\ndone\n\ncp -a \"$OLD_REPO/.idea/workspace.xml\" \"$NEW_REPO/.idea/\"\n"
  },
  {
    "path": "gen/com/goide/GoTypes.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide;\n\nimport com.intellij.psi.tree.IElementType;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.lang.ASTNode;\nimport com.goide.psi.GoCompositeElementType;\nimport com.goide.stubs.GoElementTypeFactory;\nimport com.goide.psi.GoTokenType;\nimport com.goide.psi.impl.*;\n\npublic interface GoTypes {\n\n  IElementType ADD_EXPR = new GoCompositeElementType(\"ADD_EXPR\");\n  IElementType AND_EXPR = new GoCompositeElementType(\"AND_EXPR\");\n  IElementType ANONYMOUS_FIELD_DEFINITION = GoElementTypeFactory.stubFactory(\"ANONYMOUS_FIELD_DEFINITION\");\n  IElementType ARGUMENT_LIST = new GoCompositeElementType(\"ARGUMENT_LIST\");\n  IElementType ARRAY_OR_SLICE_TYPE = GoElementTypeFactory.stubFactory(\"ARRAY_OR_SLICE_TYPE\");\n  IElementType ASSIGNMENT_STATEMENT = new GoCompositeElementType(\"ASSIGNMENT_STATEMENT\");\n  IElementType ASSIGN_OP = new GoCompositeElementType(\"ASSIGN_OP\");\n  IElementType BLOCK = new GoCompositeElementType(\"BLOCK\");\n  IElementType BREAK_STATEMENT = new GoCompositeElementType(\"BREAK_STATEMENT\");\n  IElementType BUILTIN_ARGUMENT_LIST = new GoCompositeElementType(\"BUILTIN_ARGUMENT_LIST\");\n  IElementType BUILTIN_CALL_EXPR = new GoCompositeElementType(\"BUILTIN_CALL_EXPR\");\n  IElementType CALL_EXPR = new GoCompositeElementType(\"CALL_EXPR\");\n  IElementType CHANNEL_TYPE = GoElementTypeFactory.stubFactory(\"CHANNEL_TYPE\");\n  IElementType COMM_CASE = new GoCompositeElementType(\"COMM_CASE\");\n  IElementType COMM_CLAUSE = new GoCompositeElementType(\"COMM_CLAUSE\");\n  IElementType COMPOSITE_LIT = new GoCompositeElementType(\"COMPOSITE_LIT\");\n  IElementType CONDITIONAL_EXPR = new GoCompositeElementType(\"CONDITIONAL_EXPR\");\n  IElementType CONST_DECLARATION = new GoCompositeElementType(\"CONST_DECLARATION\");\n  IElementType CONST_DEFINITION = GoElementTypeFactory.stubFactory(\"CONST_DEFINITION\");\n  IElementType CONST_SPEC = GoElementTypeFactory.stubFactory(\"CONST_SPEC\");\n  IElementType CONTINUE_STATEMENT = new GoCompositeElementType(\"CONTINUE_STATEMENT\");\n  IElementType CONVERSION_EXPR = new GoCompositeElementType(\"CONVERSION_EXPR\");\n  IElementType DEFER_STATEMENT = new GoCompositeElementType(\"DEFER_STATEMENT\");\n  IElementType ELEMENT = new GoCompositeElementType(\"ELEMENT\");\n  IElementType ELSE_STATEMENT = new GoCompositeElementType(\"ELSE_STATEMENT\");\n  IElementType EXPRESSION = new GoCompositeElementType(\"EXPRESSION\");\n  IElementType EXPR_CASE_CLAUSE = new GoCompositeElementType(\"EXPR_CASE_CLAUSE\");\n  IElementType EXPR_SWITCH_STATEMENT = new GoCompositeElementType(\"EXPR_SWITCH_STATEMENT\");\n  IElementType FALLTHROUGH_STATEMENT = new GoCompositeElementType(\"FALLTHROUGH_STATEMENT\");\n  IElementType FIELD_DECLARATION = new GoCompositeElementType(\"FIELD_DECLARATION\");\n  IElementType FIELD_DEFINITION = GoElementTypeFactory.stubFactory(\"FIELD_DEFINITION\");\n  IElementType FIELD_NAME = new GoCompositeElementType(\"FIELD_NAME\");\n  IElementType FOR_CLAUSE = new GoCompositeElementType(\"FOR_CLAUSE\");\n  IElementType FOR_STATEMENT = new GoCompositeElementType(\"FOR_STATEMENT\");\n  IElementType FUNCTION_DECLARATION = GoElementTypeFactory.stubFactory(\"FUNCTION_DECLARATION\");\n  IElementType FUNCTION_LIT = new GoCompositeElementType(\"FUNCTION_LIT\");\n  IElementType FUNCTION_TYPE = GoElementTypeFactory.stubFactory(\"FUNCTION_TYPE\");\n  IElementType GOTO_STATEMENT = new GoCompositeElementType(\"GOTO_STATEMENT\");\n  IElementType GO_STATEMENT = new GoCompositeElementType(\"GO_STATEMENT\");\n  IElementType IF_STATEMENT = new GoCompositeElementType(\"IF_STATEMENT\");\n  IElementType IMPORT_DECLARATION = new GoCompositeElementType(\"IMPORT_DECLARATION\");\n  IElementType IMPORT_LIST = new GoCompositeElementType(\"IMPORT_LIST\");\n  IElementType IMPORT_SPEC = GoElementTypeFactory.stubFactory(\"IMPORT_SPEC\");\n  IElementType IMPORT_STRING = new GoCompositeElementType(\"IMPORT_STRING\");\n  IElementType INC_DEC_STATEMENT = new GoCompositeElementType(\"INC_DEC_STATEMENT\");\n  IElementType INDEX_OR_SLICE_EXPR = new GoCompositeElementType(\"INDEX_OR_SLICE_EXPR\");\n  IElementType INTERFACE_TYPE = GoElementTypeFactory.stubFactory(\"INTERFACE_TYPE\");\n  IElementType KEY = new GoCompositeElementType(\"KEY\");\n  IElementType LABELED_STATEMENT = new GoCompositeElementType(\"LABELED_STATEMENT\");\n  IElementType LABEL_DEFINITION = GoElementTypeFactory.stubFactory(\"LABEL_DEFINITION\");\n  IElementType LABEL_REF = new GoCompositeElementType(\"LABEL_REF\");\n  IElementType LEFT_HAND_EXPR_LIST = new GoCompositeElementType(\"LEFT_HAND_EXPR_LIST\");\n  IElementType LITERAL = new GoCompositeElementType(\"LITERAL\");\n  IElementType LITERAL_TYPE_EXPR = new GoCompositeElementType(\"LITERAL_TYPE_EXPR\");\n  IElementType LITERAL_VALUE = new GoCompositeElementType(\"LITERAL_VALUE\");\n  IElementType MAP_TYPE = GoElementTypeFactory.stubFactory(\"MAP_TYPE\");\n  IElementType METHOD_DECLARATION = GoElementTypeFactory.stubFactory(\"METHOD_DECLARATION\");\n  IElementType METHOD_SPEC = GoElementTypeFactory.stubFactory(\"METHOD_SPEC\");\n  IElementType MUL_EXPR = new GoCompositeElementType(\"MUL_EXPR\");\n  IElementType OR_EXPR = new GoCompositeElementType(\"OR_EXPR\");\n  IElementType PACKAGE_CLAUSE = GoElementTypeFactory.stubFactory(\"PACKAGE_CLAUSE\");\n  IElementType PARAMETERS = GoElementTypeFactory.stubFactory(\"PARAMETERS\");\n  IElementType PARAMETER_DECLARATION = GoElementTypeFactory.stubFactory(\"PARAMETER_DECLARATION\");\n  IElementType PARAM_DEFINITION = GoElementTypeFactory.stubFactory(\"PARAM_DEFINITION\");\n  IElementType PARENTHESES_EXPR = new GoCompositeElementType(\"PARENTHESES_EXPR\");\n  IElementType PAR_TYPE = GoElementTypeFactory.stubFactory(\"PAR_TYPE\");\n  IElementType POINTER_TYPE = GoElementTypeFactory.stubFactory(\"POINTER_TYPE\");\n  IElementType RANGE_CLAUSE = GoElementTypeFactory.stubFactory(\"RANGE_CLAUSE\");\n  IElementType RECEIVER = GoElementTypeFactory.stubFactory(\"RECEIVER\");\n  IElementType RECV_STATEMENT = GoElementTypeFactory.stubFactory(\"RECV_STATEMENT\");\n  IElementType REFERENCE_EXPRESSION = new GoCompositeElementType(\"REFERENCE_EXPRESSION\");\n  IElementType RESULT = GoElementTypeFactory.stubFactory(\"RESULT\");\n  IElementType RETURN_STATEMENT = new GoCompositeElementType(\"RETURN_STATEMENT\");\n  IElementType SELECTOR_EXPR = new GoCompositeElementType(\"SELECTOR_EXPR\");\n  IElementType SELECT_STATEMENT = new GoCompositeElementType(\"SELECT_STATEMENT\");\n  IElementType SEND_STATEMENT = new GoCompositeElementType(\"SEND_STATEMENT\");\n  IElementType SHORT_VAR_DECLARATION = GoElementTypeFactory.stubFactory(\"SHORT_VAR_DECLARATION\");\n  IElementType SIGNATURE = GoElementTypeFactory.stubFactory(\"SIGNATURE\");\n  IElementType SIMPLE_STATEMENT = new GoCompositeElementType(\"SIMPLE_STATEMENT\");\n  IElementType SPEC_TYPE = GoElementTypeFactory.stubFactory(\"SPEC_TYPE\");\n  IElementType STATEMENT = new GoCompositeElementType(\"STATEMENT\");\n  IElementType STRING_LITERAL = new GoCompositeElementType(\"STRING_LITERAL\");\n  IElementType STRUCT_TYPE = GoElementTypeFactory.stubFactory(\"STRUCT_TYPE\");\n  IElementType SWITCH_START = new GoCompositeElementType(\"SWITCH_START\");\n  IElementType SWITCH_STATEMENT = new GoCompositeElementType(\"SWITCH_STATEMENT\");\n  IElementType TAG = new GoCompositeElementType(\"TAG\");\n  IElementType TYPE = GoElementTypeFactory.stubFactory(\"TYPE\");\n  IElementType TYPE_ASSERTION_EXPR = new GoCompositeElementType(\"TYPE_ASSERTION_EXPR\");\n  IElementType TYPE_CASE_CLAUSE = new GoCompositeElementType(\"TYPE_CASE_CLAUSE\");\n  IElementType TYPE_DECLARATION = new GoCompositeElementType(\"TYPE_DECLARATION\");\n  IElementType TYPE_GUARD = new GoCompositeElementType(\"TYPE_GUARD\");\n  IElementType TYPE_LIST = GoElementTypeFactory.stubFactory(\"TYPE_LIST\");\n  IElementType TYPE_REFERENCE_EXPRESSION = new GoCompositeElementType(\"TYPE_REFERENCE_EXPRESSION\");\n  IElementType TYPE_SPEC = GoElementTypeFactory.stubFactory(\"TYPE_SPEC\");\n  IElementType TYPE_SWITCH_GUARD = new GoCompositeElementType(\"TYPE_SWITCH_GUARD\");\n  IElementType TYPE_SWITCH_STATEMENT = new GoCompositeElementType(\"TYPE_SWITCH_STATEMENT\");\n  IElementType UNARY_EXPR = new GoCompositeElementType(\"UNARY_EXPR\");\n  IElementType VALUE = new GoCompositeElementType(\"VALUE\");\n  IElementType VAR_DECLARATION = new GoCompositeElementType(\"VAR_DECLARATION\");\n  IElementType VAR_DEFINITION = GoElementTypeFactory.stubFactory(\"VAR_DEFINITION\");\n  IElementType VAR_SPEC = GoElementTypeFactory.stubFactory(\"VAR_SPEC\");\n\n  IElementType ASSIGN = new GoTokenType(\"=\");\n  IElementType BIT_AND = new GoTokenType(\"&\");\n  IElementType BIT_AND_ASSIGN = new GoTokenType(\"&=\");\n  IElementType BIT_CLEAR = new GoTokenType(\"&^\");\n  IElementType BIT_CLEAR_ASSIGN = new GoTokenType(\"&^=\");\n  IElementType BIT_OR = new GoTokenType(\"|\");\n  IElementType BIT_OR_ASSIGN = new GoTokenType(\"|=\");\n  IElementType BIT_XOR = new GoTokenType(\"^\");\n  IElementType BIT_XOR_ASSIGN = new GoTokenType(\"^=\");\n  IElementType BREAK = new GoTokenType(\"break\");\n  IElementType CASE = new GoTokenType(\"case\");\n  IElementType CHAN = new GoTokenType(\"chan\");\n  IElementType CHAR = new GoTokenType(\"char\");\n  IElementType COLON = new GoTokenType(\":\");\n  IElementType COMMA = new GoTokenType(\",\");\n  IElementType COND_AND = new GoTokenType(\"&&\");\n  IElementType COND_OR = new GoTokenType(\"||\");\n  IElementType CONST = new GoTokenType(\"const\");\n  IElementType CONTINUE = new GoTokenType(\"continue\");\n  IElementType DECIMALI = new GoTokenType(\"decimali\");\n  IElementType DEFAULT = new GoTokenType(\"default\");\n  IElementType DEFER = new GoTokenType(\"defer\");\n  IElementType DOT = new GoTokenType(\".\");\n  IElementType ELSE = new GoTokenType(\"else\");\n  IElementType EQ = new GoTokenType(\"==\");\n  IElementType FALLTHROUGH = new GoTokenType(\"fallthrough\");\n  IElementType FLOAT = new GoTokenType(\"float\");\n  IElementType FLOATI = new GoTokenType(\"floati\");\n  IElementType FOR = new GoTokenType(\"for\");\n  IElementType FUNC = new GoTokenType(\"func\");\n  IElementType GO = new GoTokenType(\"go\");\n  IElementType GOTO = new GoTokenType(\"goto\");\n  IElementType GREATER = new GoTokenType(\">\");\n  IElementType GREATER_OR_EQUAL = new GoTokenType(\">=\");\n  IElementType HEX = new GoTokenType(\"hex\");\n  IElementType IDENTIFIER = new GoTokenType(\"identifier\");\n  IElementType IF = new GoTokenType(\"if\");\n  IElementType IMPORT = new GoTokenType(\"import\");\n  IElementType INT = new GoTokenType(\"int\");\n  IElementType INTERFACE = new GoTokenType(\"interface\");\n  IElementType LBRACE = new GoTokenType(\"{\");\n  IElementType LBRACK = new GoTokenType(\"[\");\n  IElementType LESS = new GoTokenType(\"<\");\n  IElementType LESS_OR_EQUAL = new GoTokenType(\"<=\");\n  IElementType LPAREN = new GoTokenType(\"(\");\n  IElementType MAP = new GoTokenType(\"map\");\n  IElementType MINUS = new GoTokenType(\"-\");\n  IElementType MINUS_ASSIGN = new GoTokenType(\"-=\");\n  IElementType MINUS_MINUS = new GoTokenType(\"--\");\n  IElementType MUL = new GoTokenType(\"*\");\n  IElementType MUL_ASSIGN = new GoTokenType(\"*=\");\n  IElementType NOT = new GoTokenType(\"!\");\n  IElementType NOT_EQ = new GoTokenType(\"!=\");\n  IElementType OCT = new GoTokenType(\"oct\");\n  IElementType PACKAGE = new GoTokenType(\"package\");\n  IElementType PLUS = new GoTokenType(\"+\");\n  IElementType PLUS_ASSIGN = new GoTokenType(\"+=\");\n  IElementType PLUS_PLUS = new GoTokenType(\"++\");\n  IElementType QUOTIENT = new GoTokenType(\"/\");\n  IElementType QUOTIENT_ASSIGN = new GoTokenType(\"/=\");\n  IElementType RANGE = new GoTokenType(\"range\");\n  IElementType RAW_STRING = new GoTokenType(\"raw_string\");\n  IElementType RBRACE = new GoTokenType(\"}\");\n  IElementType RBRACK = new GoTokenType(\"]\");\n  IElementType REMAINDER = new GoTokenType(\"%\");\n  IElementType REMAINDER_ASSIGN = new GoTokenType(\"%=\");\n  IElementType RETURN = new GoTokenType(\"return\");\n  IElementType RPAREN = new GoTokenType(\")\");\n  IElementType SELECT = new GoTokenType(\"select\");\n  IElementType SEMICOLON = new GoTokenType(\";\");\n  IElementType SEMICOLON_SYNTHETIC = new GoTokenType(\"<NL>\");\n  IElementType SEND_CHANNEL = new GoTokenType(\"<-\");\n  IElementType SHIFT_LEFT = new GoTokenType(\"<<\");\n  IElementType SHIFT_LEFT_ASSIGN = new GoTokenType(\"<<=\");\n  IElementType SHIFT_RIGHT = new GoTokenType(\">>\");\n  IElementType SHIFT_RIGHT_ASSIGN = new GoTokenType(\">>=\");\n  IElementType STRING = new GoTokenType(\"string\");\n  IElementType STRUCT = new GoTokenType(\"struct\");\n  IElementType SWITCH = new GoTokenType(\"switch\");\n  IElementType TRIPLE_DOT = new GoTokenType(\"...\");\n  IElementType TYPE_ = new GoTokenType(\"type\");\n  IElementType VAR = new GoTokenType(\"var\");\n  IElementType VAR_ASSIGN = new GoTokenType(\":=\");\n\n  class Factory {\n    public static PsiElement createElement(ASTNode node) {\n      IElementType type = node.getElementType();\n       if (type == ADD_EXPR) {\n        return new GoAddExprImpl(node);\n      }\n      else if (type == AND_EXPR) {\n        return new GoAndExprImpl(node);\n      }\n      else if (type == ANONYMOUS_FIELD_DEFINITION) {\n        return new GoAnonymousFieldDefinitionImpl(node);\n      }\n      else if (type == ARGUMENT_LIST) {\n        return new GoArgumentListImpl(node);\n      }\n      else if (type == ARRAY_OR_SLICE_TYPE) {\n        return new GoArrayOrSliceTypeImpl(node);\n      }\n      else if (type == ASSIGNMENT_STATEMENT) {\n        return new GoAssignmentStatementImpl(node);\n      }\n      else if (type == ASSIGN_OP) {\n        return new GoAssignOpImpl(node);\n      }\n      else if (type == BLOCK) {\n        return new GoBlockImpl(node);\n      }\n      else if (type == BREAK_STATEMENT) {\n        return new GoBreakStatementImpl(node);\n      }\n      else if (type == BUILTIN_ARGUMENT_LIST) {\n        return new GoBuiltinArgumentListImpl(node);\n      }\n      else if (type == BUILTIN_CALL_EXPR) {\n        return new GoBuiltinCallExprImpl(node);\n      }\n      else if (type == CALL_EXPR) {\n        return new GoCallExprImpl(node);\n      }\n      else if (type == CHANNEL_TYPE) {\n        return new GoChannelTypeImpl(node);\n      }\n      else if (type == COMM_CASE) {\n        return new GoCommCaseImpl(node);\n      }\n      else if (type == COMM_CLAUSE) {\n        return new GoCommClauseImpl(node);\n      }\n      else if (type == COMPOSITE_LIT) {\n        return new GoCompositeLitImpl(node);\n      }\n      else if (type == CONDITIONAL_EXPR) {\n        return new GoConditionalExprImpl(node);\n      }\n      else if (type == CONST_DECLARATION) {\n        return new GoConstDeclarationImpl(node);\n      }\n      else if (type == CONST_DEFINITION) {\n        return new GoConstDefinitionImpl(node);\n      }\n      else if (type == CONST_SPEC) {\n        return new GoConstSpecImpl(node);\n      }\n      else if (type == CONTINUE_STATEMENT) {\n        return new GoContinueStatementImpl(node);\n      }\n      else if (type == CONVERSION_EXPR) {\n        return new GoConversionExprImpl(node);\n      }\n      else if (type == DEFER_STATEMENT) {\n        return new GoDeferStatementImpl(node);\n      }\n      else if (type == ELEMENT) {\n        return new GoElementImpl(node);\n      }\n      else if (type == ELSE_STATEMENT) {\n        return new GoElseStatementImpl(node);\n      }\n      else if (type == EXPRESSION) {\n        return new GoExpressionImpl(node);\n      }\n      else if (type == EXPR_CASE_CLAUSE) {\n        return new GoExprCaseClauseImpl(node);\n      }\n      else if (type == EXPR_SWITCH_STATEMENT) {\n        return new GoExprSwitchStatementImpl(node);\n      }\n      else if (type == FALLTHROUGH_STATEMENT) {\n        return new GoFallthroughStatementImpl(node);\n      }\n      else if (type == FIELD_DECLARATION) {\n        return new GoFieldDeclarationImpl(node);\n      }\n      else if (type == FIELD_DEFINITION) {\n        return new GoFieldDefinitionImpl(node);\n      }\n      else if (type == FIELD_NAME) {\n        return new GoFieldNameImpl(node);\n      }\n      else if (type == FOR_CLAUSE) {\n        return new GoForClauseImpl(node);\n      }\n      else if (type == FOR_STATEMENT) {\n        return new GoForStatementImpl(node);\n      }\n      else if (type == FUNCTION_DECLARATION) {\n        return new GoFunctionDeclarationImpl(node);\n      }\n      else if (type == FUNCTION_LIT) {\n        return new GoFunctionLitImpl(node);\n      }\n      else if (type == FUNCTION_TYPE) {\n        return new GoFunctionTypeImpl(node);\n      }\n      else if (type == GOTO_STATEMENT) {\n        return new GoGotoStatementImpl(node);\n      }\n      else if (type == GO_STATEMENT) {\n        return new GoGoStatementImpl(node);\n      }\n      else if (type == IF_STATEMENT) {\n        return new GoIfStatementImpl(node);\n      }\n      else if (type == IMPORT_DECLARATION) {\n        return new GoImportDeclarationImpl(node);\n      }\n      else if (type == IMPORT_LIST) {\n        return new GoImportListImpl(node);\n      }\n      else if (type == IMPORT_SPEC) {\n        return new GoImportSpecImpl(node);\n      }\n      else if (type == IMPORT_STRING) {\n        return new GoImportStringImpl(node);\n      }\n      else if (type == INC_DEC_STATEMENT) {\n        return new GoIncDecStatementImpl(node);\n      }\n      else if (type == INDEX_OR_SLICE_EXPR) {\n        return new GoIndexOrSliceExprImpl(node);\n      }\n      else if (type == INTERFACE_TYPE) {\n        return new GoInterfaceTypeImpl(node);\n      }\n      else if (type == KEY) {\n        return new GoKeyImpl(node);\n      }\n      else if (type == LABELED_STATEMENT) {\n        return new GoLabeledStatementImpl(node);\n      }\n      else if (type == LABEL_DEFINITION) {\n        return new GoLabelDefinitionImpl(node);\n      }\n      else if (type == LABEL_REF) {\n        return new GoLabelRefImpl(node);\n      }\n      else if (type == LEFT_HAND_EXPR_LIST) {\n        return new GoLeftHandExprListImpl(node);\n      }\n      else if (type == LITERAL) {\n        return new GoLiteralImpl(node);\n      }\n      else if (type == LITERAL_TYPE_EXPR) {\n        return new GoLiteralTypeExprImpl(node);\n      }\n      else if (type == LITERAL_VALUE) {\n        return new GoLiteralValueImpl(node);\n      }\n      else if (type == MAP_TYPE) {\n        return new GoMapTypeImpl(node);\n      }\n      else if (type == METHOD_DECLARATION) {\n        return new GoMethodDeclarationImpl(node);\n      }\n      else if (type == METHOD_SPEC) {\n        return new GoMethodSpecImpl(node);\n      }\n      else if (type == MUL_EXPR) {\n        return new GoMulExprImpl(node);\n      }\n      else if (type == OR_EXPR) {\n        return new GoOrExprImpl(node);\n      }\n      else if (type == PACKAGE_CLAUSE) {\n        return new GoPackageClauseImpl(node);\n      }\n      else if (type == PARAMETERS) {\n        return new GoParametersImpl(node);\n      }\n      else if (type == PARAMETER_DECLARATION) {\n        return new GoParameterDeclarationImpl(node);\n      }\n      else if (type == PARAM_DEFINITION) {\n        return new GoParamDefinitionImpl(node);\n      }\n      else if (type == PARENTHESES_EXPR) {\n        return new GoParenthesesExprImpl(node);\n      }\n      else if (type == PAR_TYPE) {\n        return new GoParTypeImpl(node);\n      }\n      else if (type == POINTER_TYPE) {\n        return new GoPointerTypeImpl(node);\n      }\n      else if (type == RANGE_CLAUSE) {\n        return new GoRangeClauseImpl(node);\n      }\n      else if (type == RECEIVER) {\n        return new GoReceiverImpl(node);\n      }\n      else if (type == RECV_STATEMENT) {\n        return new GoRecvStatementImpl(node);\n      }\n      else if (type == REFERENCE_EXPRESSION) {\n        return new GoReferenceExpressionImpl(node);\n      }\n      else if (type == RESULT) {\n        return new GoResultImpl(node);\n      }\n      else if (type == RETURN_STATEMENT) {\n        return new GoReturnStatementImpl(node);\n      }\n      else if (type == SELECTOR_EXPR) {\n        return new GoSelectorExprImpl(node);\n      }\n      else if (type == SELECT_STATEMENT) {\n        return new GoSelectStatementImpl(node);\n      }\n      else if (type == SEND_STATEMENT) {\n        return new GoSendStatementImpl(node);\n      }\n      else if (type == SHORT_VAR_DECLARATION) {\n        return new GoShortVarDeclarationImpl(node);\n      }\n      else if (type == SIGNATURE) {\n        return new GoSignatureImpl(node);\n      }\n      else if (type == SIMPLE_STATEMENT) {\n        return new GoSimpleStatementImpl(node);\n      }\n      else if (type == SPEC_TYPE) {\n        return new GoSpecTypeImpl(node);\n      }\n      else if (type == STATEMENT) {\n        return new GoStatementImpl(node);\n      }\n      else if (type == STRING_LITERAL) {\n        return new GoStringLiteralImpl(node);\n      }\n      else if (type == STRUCT_TYPE) {\n        return new GoStructTypeImpl(node);\n      }\n      else if (type == SWITCH_START) {\n        return new GoSwitchStartImpl(node);\n      }\n      else if (type == SWITCH_STATEMENT) {\n        return new GoSwitchStatementImpl(node);\n      }\n      else if (type == TAG) {\n        return new GoTagImpl(node);\n      }\n      else if (type == TYPE) {\n        return new GoTypeImpl(node);\n      }\n      else if (type == TYPE_ASSERTION_EXPR) {\n        return new GoTypeAssertionExprImpl(node);\n      }\n      else if (type == TYPE_CASE_CLAUSE) {\n        return new GoTypeCaseClauseImpl(node);\n      }\n      else if (type == TYPE_DECLARATION) {\n        return new GoTypeDeclarationImpl(node);\n      }\n      else if (type == TYPE_GUARD) {\n        return new GoTypeGuardImpl(node);\n      }\n      else if (type == TYPE_LIST) {\n        return new GoTypeListImpl(node);\n      }\n      else if (type == TYPE_REFERENCE_EXPRESSION) {\n        return new GoTypeReferenceExpressionImpl(node);\n      }\n      else if (type == TYPE_SPEC) {\n        return new GoTypeSpecImpl(node);\n      }\n      else if (type == TYPE_SWITCH_GUARD) {\n        return new GoTypeSwitchGuardImpl(node);\n      }\n      else if (type == TYPE_SWITCH_STATEMENT) {\n        return new GoTypeSwitchStatementImpl(node);\n      }\n      else if (type == UNARY_EXPR) {\n        return new GoUnaryExprImpl(node);\n      }\n      else if (type == VALUE) {\n        return new GoValueImpl(node);\n      }\n      else if (type == VAR_DECLARATION) {\n        return new GoVarDeclarationImpl(node);\n      }\n      else if (type == VAR_DEFINITION) {\n        return new GoVarDefinitionImpl(node);\n      }\n      else if (type == VAR_SPEC) {\n        return new GoVarSpecImpl(node);\n      }\n      throw new AssertionError(\"Unknown element type: \" + type);\n    }\n  }\n}\n"
  },
  {
    "path": "gen/com/goide/lexer/_GoLexer.java",
    "content": "/* The following code was generated by JFlex 1.7.0-SNAPSHOT tweaked for IntelliJ platform */\n\npackage com.goide.lexer;\n\nimport com.intellij.lexer.FlexLexer;\nimport com.intellij.psi.tree.IElementType;\nimport com.goide.GoTypes;\nimport static com.intellij.psi.TokenType.BAD_CHARACTER;\nimport static com.goide.GoParserDefinition.*;\n\n\n/**\n * This class is a scanner generated by \n * <a href=\"http://www.jflex.de/\">JFlex</a> 1.7.0-SNAPSHOT\n * from the specification file <tt>go.flex</tt>\n */\npublic class _GoLexer implements FlexLexer, GoTypes {\n\n  /** This character denotes the end of file */\n  public static final int YYEOF = -1;\n\n  /** initial size of the lookahead buffer */\n  private static final int ZZ_BUFFERSIZE = 16384;\n\n  /** lexical states */\n  public static final int YYINITIAL = 0;\n  public static final int MAYBE_SEMICOLON = 2;\n\n  /**\n   * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l\n   * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l\n   *                  at the beginning of a line\n   * l is of the form l = 2*k, k a non negative integer\n   */\n  private static final int ZZ_LEXSTATE[] = { \n     0,  0,  1, 1\n  };\n\n  /** \n   * Translates characters to character classes\n   * Chosen bits are [11, 6, 4]\n   * Total runtime size is 13792 bytes\n   */\n  public static int ZZ_CMAP(int ch) {\n    return ZZ_CMAP_A[(ZZ_CMAP_Y[(ZZ_CMAP_Z[ch>>10]<<6)|((ch>>4)&0x3f)]<<4)|(ch&0xf)];\n  }\n\n  /* The ZZ_CMAP_Z table has 1088 entries */\n  static final char ZZ_CMAP_Z[] = zzUnpackCMap(\n    \"\\1\\0\\1\\1\\1\\2\\1\\3\\1\\4\\1\\5\\1\\6\\1\\7\\1\\10\\2\\11\\1\\12\\1\\13\\6\\14\\1\\15\\23\\14\\1\\16\"+\n    \"\\1\\14\\1\\17\\1\\20\\12\\14\\1\\21\\10\\11\\1\\22\\1\\23\\1\\24\\1\\25\\1\\26\\1\\27\\1\\30\\1\\31\\1\"+\n    \"\\32\\1\\11\\1\\33\\1\\34\\2\\11\\1\\14\\1\\35\\3\\11\\1\\36\\10\\11\\1\\37\\1\\40\\20\\11\\1\\41\\2\\11\"+\n    \"\\1\\42\\5\\11\\1\\43\\4\\11\\1\\44\\1\\45\\4\\11\\51\\14\\1\\46\\3\\14\\1\\47\\1\\50\\4\\14\\1\\51\\12\"+\n    \"\\11\\1\\52\\u0381\\11\");\n\n  /* The ZZ_CMAP_Y table has 2752 entries */\n  static final char ZZ_CMAP_Y[] = zzUnpackCMap(\n    \"\\1\\0\\1\\1\\1\\2\\1\\3\\1\\4\\1\\5\\1\\6\\1\\7\\1\\10\\1\\1\\1\\11\\1\\12\\1\\13\\1\\14\\1\\13\\1\\14\\34\"+\n    \"\\13\\1\\15\\1\\16\\1\\17\\10\\1\\1\\20\\1\\21\\1\\13\\1\\22\\4\\13\\1\\23\\10\\13\\1\\24\\12\\13\\1\\25\"+\n    \"\\1\\13\\1\\26\\1\\25\\1\\13\\1\\27\\4\\1\\1\\13\\1\\30\\1\\31\\2\\1\\2\\13\\1\\30\\1\\1\\1\\32\\1\\25\\5\"+\n    \"\\13\\1\\33\\1\\34\\1\\35\\1\\1\\1\\36\\1\\13\\1\\1\\1\\37\\5\\13\\1\\40\\1\\41\\1\\42\\1\\13\\1\\30\\1\"+\n    \"\\43\\1\\13\\1\\44\\1\\45\\1\\1\\1\\13\\1\\46\\4\\1\\1\\13\\1\\47\\4\\1\\1\\50\\2\\13\\1\\51\\1\\1\\1\\52\"+\n    \"\\1\\53\\1\\25\\1\\54\\1\\55\\1\\56\\1\\57\\1\\60\\1\\61\\1\\53\\1\\16\\1\\62\\1\\55\\1\\56\\1\\63\\1\\1\"+\n    \"\\1\\64\\1\\65\\1\\66\\1\\67\\1\\22\\1\\56\\1\\70\\1\\1\\1\\71\\1\\53\\1\\72\\1\\73\\1\\55\\1\\56\\1\\70\"+\n    \"\\1\\1\\1\\61\\1\\53\\1\\41\\1\\74\\1\\75\\1\\76\\1\\77\\1\\1\\1\\71\\1\\65\\1\\1\\1\\100\\1\\36\\1\\56\"+\n    \"\\1\\51\\1\\1\\1\\101\\1\\53\\1\\1\\1\\100\\1\\36\\1\\56\\1\\102\\1\\1\\1\\60\\1\\53\\1\\103\\1\\100\\1\"+\n    \"\\36\\1\\13\\1\\104\\1\\60\\1\\105\\1\\53\\1\\106\\1\\107\\1\\110\\1\\13\\1\\111\\1\\112\\1\\1\\1\\65\"+\n    \"\\1\\1\\1\\25\\2\\13\\1\\113\\1\\112\\1\\114\\2\\1\\1\\115\\1\\116\\1\\117\\1\\120\\1\\121\\1\\122\\2\"+\n    \"\\1\\1\\71\\1\\1\\1\\114\\1\\1\\1\\123\\1\\13\\1\\124\\1\\1\\1\\125\\7\\1\\2\\13\\1\\30\\1\\105\\1\\114\"+\n    \"\\1\\126\\1\\127\\1\\130\\1\\131\\1\\114\\2\\13\\1\\132\\2\\13\\1\\133\\24\\13\\1\\134\\1\\135\\2\\13\"+\n    \"\\1\\134\\2\\13\\1\\136\\1\\137\\1\\14\\3\\13\\1\\137\\3\\13\\1\\30\\2\\1\\1\\13\\1\\1\\5\\13\\1\\140\"+\n    \"\\1\\25\\45\\13\\1\\141\\1\\13\\1\\25\\1\\30\\4\\13\\1\\30\\1\\142\\1\\143\\1\\16\\1\\13\\1\\16\\1\\13\"+\n    \"\\1\\16\\1\\143\\1\\71\\3\\13\\1\\144\\1\\1\\1\\145\\1\\114\\2\\1\\1\\114\\5\\13\\1\\27\\2\\13\\1\\146\"+\n    \"\\4\\13\\1\\40\\1\\13\\1\\147\\2\\1\\1\\65\\1\\13\\1\\150\\1\\47\\2\\13\\1\\151\\1\\13\\1\\77\\1\\114\"+\n    \"\\2\\1\\1\\13\\1\\112\\3\\13\\1\\47\\2\\1\\2\\114\\1\\152\\5\\1\\1\\107\\2\\13\\1\\144\\1\\153\\1\\114\"+\n    \"\\2\\1\\1\\154\\1\\13\\1\\155\\1\\42\\2\\13\\1\\40\\1\\1\\2\\13\\1\\144\\1\\1\\1\\156\\1\\42\\1\\13\\1\"+\n    \"\\150\\6\\1\\1\\157\\1\\160\\14\\13\\4\\1\\21\\13\\1\\140\\2\\13\\1\\140\\1\\161\\1\\13\\1\\150\\3\\13\"+\n    \"\\1\\162\\1\\163\\1\\164\\1\\124\\1\\163\\2\\1\\1\\165\\4\\1\\1\\166\\1\\1\\1\\124\\6\\1\\1\\167\\1\\170\"+\n    \"\\1\\171\\1\\172\\1\\173\\3\\1\\1\\174\\147\\1\\2\\13\\1\\147\\2\\13\\1\\147\\10\\13\\1\\175\\1\\176\"+\n    \"\\2\\13\\1\\132\\3\\13\\1\\177\\1\\1\\1\\13\\1\\112\\4\\200\\4\\1\\1\\105\\35\\1\\1\\201\\2\\1\\1\\202\"+\n    \"\\1\\25\\4\\13\\1\\203\\1\\25\\4\\13\\1\\133\\1\\107\\1\\13\\1\\150\\1\\25\\4\\13\\1\\147\\1\\1\\1\\13\"+\n    \"\\1\\30\\3\\1\\1\\13\\40\\1\\133\\13\\1\\40\\4\\1\\135\\13\\1\\40\\2\\1\\10\\13\\1\\124\\4\\1\\2\\13\\1\"+\n    \"\\150\\20\\13\\1\\124\\1\\13\\1\\204\\1\\1\\2\\13\\1\\147\\1\\105\\1\\13\\1\\150\\4\\13\\1\\40\\2\\1\"+\n    \"\\1\\205\\1\\206\\5\\13\\1\\207\\1\\13\\1\\150\\1\\27\\3\\1\\1\\205\\1\\210\\1\\13\\1\\31\\1\\1\\3\\13\"+\n    \"\\1\\144\\1\\206\\2\\13\\1\\144\\1\\1\\1\\114\\1\\1\\1\\211\\1\\42\\1\\13\\1\\40\\1\\13\\1\\112\\1\\1\"+\n    \"\\1\\13\\1\\124\\1\\50\\2\\13\\1\\31\\1\\105\\1\\114\\1\\212\\1\\213\\2\\13\\1\\46\\1\\1\\1\\214\\1\\114\"+\n    \"\\1\\13\\1\\215\\3\\13\\1\\216\\1\\217\\1\\220\\1\\30\\1\\66\\1\\221\\1\\222\\1\\200\\2\\13\\1\\133\"+\n    \"\\1\\40\\7\\13\\1\\31\\1\\114\\72\\13\\1\\144\\1\\13\\1\\223\\2\\13\\1\\151\\20\\1\\26\\13\\1\\150\\6\"+\n    \"\\13\\1\\77\\2\\1\\1\\112\\1\\224\\1\\56\\1\\225\\1\\226\\6\\13\\1\\16\\1\\1\\1\\154\\25\\13\\1\\150\"+\n    \"\\1\\1\\4\\13\\1\\206\\2\\13\\1\\27\\2\\1\\1\\151\\7\\1\\1\\212\\7\\13\\1\\124\\1\\1\\1\\114\\1\\25\\1\"+\n    \"\\30\\1\\25\\1\\30\\1\\227\\4\\13\\1\\147\\1\\230\\1\\231\\2\\1\\1\\232\\1\\13\\1\\14\\1\\233\\2\\150\"+\n    \"\\2\\1\\7\\13\\1\\30\\30\\1\\1\\13\\1\\124\\3\\13\\1\\71\\2\\1\\2\\13\\1\\1\\1\\13\\1\\234\\2\\13\\1\\40\"+\n    \"\\1\\13\\1\\150\\2\\13\\1\\235\\3\\1\\11\\13\\1\\150\\1\\114\\5\\1\\2\\13\\1\\27\\3\\13\\1\\144\\11\\1\"+\n    \"\\23\\13\\1\\112\\1\\13\\1\\40\\1\\27\\11\\1\\1\\236\\2\\13\\1\\237\\1\\13\\1\\40\\1\\13\\1\\112\\1\\13\"+\n    \"\\1\\147\\4\\1\\1\\13\\1\\240\\1\\13\\1\\40\\1\\13\\1\\77\\4\\1\\3\\13\\1\\241\\4\\1\\1\\71\\1\\242\\1\"+\n    \"\\13\\1\\144\\2\\1\\1\\13\\1\\124\\1\\13\\1\\124\\2\\1\\1\\123\\1\\13\\1\\47\\1\\1\\3\\13\\1\\40\\1\\13\"+\n    \"\\1\\40\\1\\13\\1\\31\\1\\13\\1\\16\\6\\1\\4\\13\\1\\46\\3\\1\\3\\13\\1\\31\\3\\13\\1\\31\\60\\1\\1\\154\"+\n    \"\\2\\13\\1\\27\\2\\1\\1\\65\\1\\1\\1\\154\\2\\13\\2\\1\\1\\13\\1\\46\\1\\114\\1\\154\\1\\13\\1\\112\\1\"+\n    \"\\65\\1\\1\\2\\13\\1\\243\\1\\154\\2\\13\\1\\31\\1\\244\\1\\245\\2\\1\\1\\13\\1\\22\\1\\151\\5\\1\\1\\246\"+\n    \"\\1\\247\\1\\46\\2\\13\\1\\147\\1\\1\\1\\114\\1\\73\\1\\55\\1\\56\\1\\70\\1\\1\\1\\250\\1\\16\\21\\1\\3\"+\n    \"\\13\\1\\1\\1\\251\\1\\114\\12\\1\\2\\13\\1\\147\\2\\1\\1\\252\\2\\1\\3\\13\\1\\1\\1\\253\\1\\114\\2\\1\"+\n    \"\\2\\13\\1\\30\\1\\1\\1\\114\\3\\1\\1\\13\\1\\77\\1\\1\\1\\114\\26\\1\\4\\13\\1\\114\\1\\105\\34\\1\\3\"+\n    \"\\13\\1\\46\\20\\1\\71\\13\\1\\77\\16\\1\\14\\13\\1\\144\\53\\1\\2\\13\\1\\147\\75\\1\\44\\13\\1\\112\"+\n    \"\\33\\1\\43\\13\\1\\46\\1\\13\\1\\147\\1\\114\\6\\1\\1\\13\\1\\150\\1\\1\\3\\13\\1\\1\\1\\144\\1\\114\"+\n    \"\\1\\154\\1\\254\\1\\13\\67\\1\\4\\13\\1\\47\\1\\71\\3\\1\\1\\154\\6\\1\\1\\16\\77\\1\\6\\13\\1\\30\\1\"+\n    \"\\124\\1\\46\\1\\77\\66\\1\\5\\13\\1\\212\\3\\13\\1\\143\\1\\255\\1\\256\\1\\257\\3\\13\\1\\260\\1\\261\"+\n    \"\\1\\13\\1\\262\\1\\263\\1\\36\\24\\13\\1\\264\\1\\13\\1\\36\\1\\133\\1\\13\\1\\133\\1\\13\\1\\212\\1\"+\n    \"\\13\\1\\212\\1\\147\\1\\13\\1\\147\\1\\13\\1\\56\\1\\13\\1\\56\\1\\13\\1\\265\\3\\266\\14\\13\\1\\47\"+\n    \"\\123\\1\\1\\257\\1\\13\\1\\267\\1\\270\\1\\271\\1\\272\\1\\273\\1\\274\\1\\275\\1\\151\\1\\276\\1\"+\n    \"\\151\\24\\1\\55\\13\\1\\112\\2\\1\\103\\13\\1\\47\\15\\13\\1\\150\\150\\13\\1\\16\\25\\1\\41\\13\\1\"+\n    \"\\150\\36\\1\");\n\n  /* The ZZ_CMAP_A table has 3056 entries */\n  static final char ZZ_CMAP_A[] = zzUnpackCMap(\n    \"\\11\\0\\1\\4\\1\\2\\1\\1\\1\\5\\1\\3\\22\\0\\1\\4\\1\\47\\1\\23\\2\\0\\1\\54\\1\\51\\1\\31\\1\\41\\1\\42\"+\n    \"\\1\\7\\1\\50\\1\\45\\1\\21\\1\\22\\1\\6\\1\\15\\7\\14\\1\\26\\1\\13\\1\\43\\1\\44\\1\\53\\1\\46\\1\\55\"+\n    \"\\2\\0\\4\\12\\1\\20\\1\\12\\16\\10\\1\\25\\2\\10\\1\\17\\2\\10\\1\\37\\1\\24\\1\\40\\1\\52\\1\\10\\1\\33\"+\n    \"\\1\\61\\1\\56\\1\\71\\1\\73\\1\\60\\1\\30\\1\\67\\1\\65\\1\\72\\1\\10\\1\\62\\1\\63\\1\\76\\1\\70\\1\\66\"+\n    \"\\1\\74\\1\\10\\1\\57\\1\\75\\1\\64\\1\\32\\1\\27\\1\\77\\1\\16\\1\\100\\1\\10\\1\\35\\1\\34\\1\\36\\7\"+\n    \"\\0\\1\\1\\24\\0\\1\\10\\12\\0\\1\\10\\4\\0\\1\\10\\5\\0\\27\\10\\1\\0\\12\\10\\4\\0\\14\\10\\16\\0\\5\\10\"+\n    \"\\7\\0\\1\\10\\1\\0\\1\\10\\1\\0\\5\\10\\1\\0\\2\\10\\2\\0\\4\\10\\1\\0\\1\\10\\6\\0\\1\\10\\1\\0\\3\\10\\1\"+\n    \"\\0\\1\\10\\1\\0\\4\\10\\1\\0\\23\\10\\1\\0\\13\\10\\10\\0\\6\\10\\1\\0\\26\\10\\2\\0\\1\\10\\6\\0\\10\\10\"+\n    \"\\10\\0\\13\\10\\5\\0\\3\\10\\15\\0\\12\\11\\4\\0\\6\\10\\1\\0\\1\\10\\17\\0\\2\\10\\7\\0\\2\\10\\12\\11\"+\n    \"\\3\\10\\2\\0\\2\\10\\1\\0\\16\\10\\15\\0\\11\\10\\13\\0\\1\\10\\16\\0\\12\\11\\6\\10\\4\\0\\2\\10\\4\\0\"+\n    \"\\1\\10\\5\\0\\6\\10\\4\\0\\1\\10\\11\\0\\1\\10\\3\\0\\1\\10\\7\\0\\11\\10\\7\\0\\5\\10\\17\\0\\26\\10\\3\"+\n    \"\\0\\1\\10\\2\\0\\1\\10\\7\\0\\12\\10\\4\\0\\12\\11\\1\\10\\4\\0\\10\\10\\2\\0\\2\\10\\2\\0\\26\\10\\1\\0\"+\n    \"\\7\\10\\1\\0\\1\\10\\3\\0\\4\\10\\3\\0\\1\\10\\20\\0\\1\\10\\15\\0\\2\\10\\1\\0\\1\\10\\5\\0\\6\\10\\4\\0\"+\n    \"\\2\\10\\1\\0\\2\\10\\1\\0\\2\\10\\1\\0\\2\\10\\17\\0\\4\\10\\1\\0\\1\\10\\7\\0\\12\\11\\2\\0\\3\\10\\20\"+\n    \"\\0\\11\\10\\1\\0\\2\\10\\1\\0\\2\\10\\1\\0\\5\\10\\3\\0\\1\\10\\2\\0\\1\\10\\30\\0\\1\\10\\13\\0\\10\\10\"+\n    \"\\2\\0\\1\\10\\3\\0\\1\\10\\1\\0\\6\\10\\3\\0\\3\\10\\1\\0\\4\\10\\3\\0\\2\\10\\1\\0\\1\\10\\1\\0\\2\\10\\3\"+\n    \"\\0\\2\\10\\3\\0\\3\\10\\3\\0\\14\\10\\13\\0\\10\\10\\1\\0\\2\\10\\10\\0\\3\\10\\5\\0\\4\\10\\1\\0\\5\\10\"+\n    \"\\3\\0\\1\\10\\3\\0\\2\\10\\15\\0\\13\\10\\2\\0\\1\\10\\21\\0\\1\\10\\12\\0\\6\\10\\5\\0\\22\\10\\3\\0\\10\"+\n    \"\\10\\1\\0\\11\\10\\1\\0\\1\\10\\2\\0\\7\\10\\11\\0\\1\\10\\1\\0\\2\\10\\14\\0\\12\\11\\7\\0\\2\\10\\1\\0\"+\n    \"\\1\\10\\2\\0\\2\\10\\1\\0\\1\\10\\2\\0\\1\\10\\6\\0\\4\\10\\1\\0\\7\\10\\1\\0\\3\\10\\1\\0\\1\\10\\1\\0\\1\"+\n    \"\\10\\2\\0\\2\\10\\1\\0\\4\\10\\1\\0\\2\\10\\11\\0\\1\\10\\2\\0\\5\\10\\1\\0\\1\\10\\11\\0\\12\\11\\2\\0\"+\n    \"\\14\\10\\1\\0\\24\\10\\13\\0\\5\\10\\3\\0\\6\\10\\4\\0\\4\\10\\3\\0\\1\\10\\3\\0\\2\\10\\7\\0\\3\\10\\4\"+\n    \"\\0\\15\\10\\14\\0\\1\\10\\1\\0\\6\\10\\1\\0\\1\\10\\5\\0\\1\\10\\2\\0\\13\\10\\1\\0\\15\\10\\1\\0\\4\\10\"+\n    \"\\2\\0\\7\\10\\1\\0\\1\\10\\1\\0\\4\\10\\2\\0\\1\\10\\1\\0\\4\\10\\2\\0\\7\\10\\1\\0\\1\\10\\1\\0\\4\\10\\2\"+\n    \"\\0\\16\\10\\2\\0\\6\\10\\2\\0\\15\\10\\2\\0\\1\\10\\1\\0\\10\\10\\7\\0\\15\\10\\1\\0\\6\\10\\23\\0\\1\\10\"+\n    \"\\4\\0\\1\\10\\3\\0\\11\\10\\1\\0\\1\\10\\5\\0\\17\\10\\1\\0\\16\\10\\2\\0\\14\\10\\13\\0\\1\\10\\15\\0\"+\n    \"\\7\\10\\7\\0\\16\\10\\15\\0\\2\\10\\12\\11\\3\\0\\3\\10\\11\\0\\4\\10\\1\\0\\4\\10\\3\\0\\2\\10\\11\\0\"+\n    \"\\10\\10\\1\\0\\1\\10\\1\\0\\1\\10\\1\\0\\1\\10\\1\\0\\6\\10\\1\\0\\7\\10\\1\\0\\1\\10\\3\\0\\3\\10\\1\\0\"+\n    \"\\7\\10\\3\\0\\4\\10\\2\\0\\6\\10\\14\\0\\2\\1\\7\\0\\1\\10\\15\\0\\1\\10\\2\\0\\1\\10\\4\\0\\1\\10\\2\\0\"+\n    \"\\12\\10\\1\\0\\1\\10\\3\\0\\5\\10\\6\\0\\1\\10\\1\\0\\1\\10\\1\\0\\1\\10\\1\\0\\4\\10\\1\\0\\13\\10\\2\\0\"+\n    \"\\4\\10\\5\\0\\5\\10\\4\\0\\1\\10\\4\\0\\2\\10\\13\\0\\5\\10\\6\\0\\4\\10\\3\\0\\2\\10\\14\\0\\10\\10\\7\"+\n    \"\\0\\10\\10\\1\\0\\7\\10\\6\\0\\2\\10\\12\\0\\5\\10\\5\\0\\2\\10\\3\\0\\7\\10\\6\\0\\3\\10\\12\\11\\2\\10\"+\n    \"\\13\\0\\11\\10\\2\\0\\27\\10\\2\\0\\7\\10\\1\\0\\3\\10\\1\\0\\4\\10\\1\\0\\4\\10\\2\\0\\6\\10\\3\\0\\1\\10\"+\n    \"\\1\\0\\1\\10\\2\\0\\5\\10\\1\\0\\12\\10\\12\\11\\5\\10\\1\\0\\3\\10\\1\\0\\10\\10\\4\\0\\7\\10\\3\\0\\1\"+\n    \"\\10\\3\\0\\2\\10\\1\\0\\1\\10\\3\\0\\2\\10\\2\\0\\5\\10\\2\\0\\1\\10\\1\\0\\1\\10\\30\\0\\3\\10\\3\\0\\6\"+\n    \"\\10\\2\\0\\6\\10\\2\\0\\6\\10\\11\\0\\7\\10\\4\\0\\5\\10\\3\\0\\5\\10\\5\\0\\1\\10\\1\\0\\10\\10\\1\\0\\5\"+\n    \"\\10\\1\\0\\1\\10\\1\\0\\2\\10\\1\\0\\2\\10\\1\\0\\12\\10\\6\\0\\12\\10\\2\\0\\6\\10\\2\\0\\6\\10\\2\\0\\6\"+\n    \"\\10\\2\\0\\3\\10\\3\\0\\14\\10\\1\\0\\16\\10\\1\\0\\2\\10\\1\\0\\2\\10\\1\\0\\10\\10\\6\\0\\4\\10\\4\\0\"+\n    \"\\16\\10\\2\\0\\1\\10\\1\\0\\14\\10\\1\\0\\2\\10\\3\\0\\1\\10\\2\\0\\4\\10\\1\\0\\2\\10\\12\\0\\10\\10\\6\"+\n    \"\\0\\6\\10\\1\\0\\3\\10\\1\\0\\12\\10\\3\\0\\1\\10\\12\\0\\4\\10\\13\\0\\12\\11\\1\\10\\1\\0\\1\\10\\3\\0\"+\n    \"\\7\\10\\1\\0\\1\\10\\1\\0\\4\\10\\1\\0\\17\\10\\1\\0\\2\\10\\14\\0\\3\\10\\4\\0\\2\\10\\1\\0\\1\\10\\20\"+\n    \"\\0\\4\\10\\10\\0\\1\\10\\13\\0\\10\\10\\5\\0\\3\\10\\2\\0\\1\\10\\2\\0\\2\\10\\2\\0\\4\\10\\1\\0\\14\\10\"+\n    \"\\1\\0\\1\\10\\1\\0\\7\\10\\1\\0\\21\\10\\1\\0\\4\\10\\2\\0\\10\\10\\1\\0\\7\\10\\1\\0\\14\\10\\1\\0\\4\\10\"+\n    \"\\1\\0\\5\\10\\1\\0\\1\\10\\3\\0\\14\\10\\2\\0\\13\\10\\1\\0\\10\\10\\2\\0\\22\\11\\1\\0\\2\\10\\1\\0\\1\"+\n    \"\\10\\2\\0\\1\\10\\1\\0\\12\\10\\1\\0\\4\\10\\1\\0\\1\\10\\1\\0\\1\\10\\6\\0\\1\\10\\4\\0\\1\\10\\1\\0\\1\"+\n    \"\\10\\1\\0\\1\\10\\1\\0\\3\\10\\1\\0\\2\\10\\1\\0\\1\\10\\2\\0\\1\\10\\1\\0\\1\\10\\1\\0\\1\\10\\1\\0\\1\\10\"+\n    \"\\1\\0\\1\\10\\1\\0\\2\\10\\1\\0\\1\\10\\2\\0\\4\\10\\1\\0\\7\\10\\1\\0\\4\\10\\1\\0\\4\\10\\1\\0\\1\\10\\1\"+\n    \"\\0\\12\\10\\1\\0\\5\\10\\1\\0\\3\\10\\1\\0\\5\\10\\1\\0\\5\\10\");\n\n  /** \n   * Translates DFA states to action switch labels.\n   */\n  private static final int [] ZZ_ACTION = zzUnpackAction();\n\n  private static final String ZZ_ACTION_PACKED_0 =\n    \"\\2\\0\\1\\1\\1\\2\\2\\3\\1\\4\\1\\5\\1\\6\\1\\1\"+\n    \"\\2\\7\\1\\10\\1\\11\\1\\12\\2\\6\\1\\1\\1\\13\\1\\14\"+\n    \"\\1\\15\\1\\16\\1\\17\\1\\20\\1\\21\\1\\22\\1\\23\\1\\24\"+\n    \"\\1\\25\\1\\26\\1\\27\\1\\30\\1\\31\\1\\32\\1\\33\\1\\34\"+\n    \"\\1\\35\\13\\6\\1\\36\\2\\37\\1\\36\\1\\40\\1\\41\\1\\42\"+\n    \"\\1\\43\\2\\0\\1\\44\\1\\45\\1\\46\\1\\0\\1\\47\\1\\50\"+\n    \"\\1\\0\\1\\12\\1\\0\\4\\6\\1\\51\\1\\0\\1\\13\\1\\52\"+\n    \"\\1\\53\\1\\54\\1\\55\\1\\56\\1\\57\\1\\60\\1\\61\\1\\62\"+\n    \"\\1\\63\\1\\64\\1\\65\\1\\66\\1\\67\\1\\70\\1\\71\\1\\72\"+\n    \"\\5\\6\\1\\73\\3\\6\\1\\74\\10\\6\\1\\41\\1\\44\\1\\0\"+\n    \"\\1\\75\\1\\76\\1\\77\\1\\100\\2\\6\\1\\101\\1\\51\\3\\0\"+\n    \"\\1\\102\\1\\0\\1\\103\\1\\104\\1\\105\\20\\6\\1\\106\\1\\41\"+\n    \"\\1\\0\\1\\107\\1\\6\\4\\0\\3\\6\\1\\110\\1\\111\\1\\112\"+\n    \"\\1\\113\\1\\114\\13\\6\\1\\0\\1\\115\\1\\6\\1\\116\\1\\6\"+\n    \"\\1\\117\\2\\6\\1\\120\\6\\6\\1\\0\\1\\121\\2\\6\\1\\122\"+\n    \"\\2\\6\\1\\123\\1\\124\\1\\125\\3\\6\\1\\126\\1\\127\\1\\6\"+\n    \"\\1\\130\\2\\6\\1\\131\\1\\6\\1\\132\";\n\n  private static int [] zzUnpackAction() {\n    int [] result = new int[209];\n    int offset = 0;\n    offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);\n    return result;\n  }\n\n  private static int zzUnpackAction(String packed, int offset, int [] result) {\n    int i = 0;       /* index in packed string  */\n    int j = offset;  /* index in unpacked array */\n    int l = packed.length();\n    while (i < l) {\n      int count = packed.charAt(i++);\n      int value = packed.charAt(i++);\n      do result[j++] = value; while (--count > 0);\n    }\n    return j;\n  }\n\n\n  /** \n   * Translates a state to a row index in the transition table\n   */\n  private static final int [] ZZ_ROWMAP = zzUnpackRowMap();\n\n  private static final String ZZ_ROWMAP_PACKED_0 =\n    \"\\0\\0\\0\\101\\0\\202\\0\\303\\0\\202\\0\\303\\0\\u0104\\0\\u0145\"+\n    \"\\0\\u0186\\0\\u01c7\\0\\u0208\\0\\u0249\\0\\u028a\\0\\u02cb\\0\\u030c\\0\\u034d\"+\n    \"\\0\\u038e\\0\\u03cf\\0\\u0410\\0\\u0451\\0\\202\\0\\202\\0\\202\\0\\202\"+\n    \"\\0\\202\\0\\202\\0\\u0492\\0\\202\\0\\202\\0\\u04d3\\0\\u0514\\0\\u0555\"+\n    \"\\0\\u0596\\0\\u05d7\\0\\u0618\\0\\u0659\\0\\u069a\\0\\u06db\\0\\u071c\\0\\u075d\"+\n    \"\\0\\u079e\\0\\u07df\\0\\u0820\\0\\u0861\\0\\u08a2\\0\\u08e3\\0\\u0924\\0\\u0965\"+\n    \"\\0\\202\\0\\202\\0\\u09a6\\0\\u09e7\\0\\u0a28\\0\\u0a69\\0\\202\\0\\202\"+\n    \"\\0\\u01c7\\0\\u0aaa\\0\\u0aeb\\0\\202\\0\\u0b2c\\0\\u0b6d\\0\\202\\0\\202\"+\n    \"\\0\\u0bae\\0\\202\\0\\u0bef\\0\\u0c30\\0\\u0c71\\0\\u0cb2\\0\\u0cf3\\0\\u0d34\"+\n    \"\\0\\u0d75\\0\\202\\0\\202\\0\\202\\0\\202\\0\\202\\0\\202\\0\\202\"+\n    \"\\0\\202\\0\\202\\0\\202\\0\\u0db6\\0\\202\\0\\202\\0\\202\\0\\u0df7\"+\n    \"\\0\\202\\0\\202\\0\\u0e38\\0\\u0e79\\0\\u0eba\\0\\u0efb\\0\\u0f3c\\0\\u0f7d\"+\n    \"\\0\\u0fbe\\0\\u0fff\\0\\u1040\\0\\u1081\\0\\u0186\\0\\u10c2\\0\\u1103\\0\\u1144\"+\n    \"\\0\\u1185\\0\\u11c6\\0\\u1207\\0\\u1248\\0\\u1289\\0\\u12ca\\0\\u130b\\0\\u134c\"+\n    \"\\0\\202\\0\\u0b6d\\0\\202\\0\\u0186\\0\\u138d\\0\\u13ce\\0\\u0186\\0\\202\"+\n    \"\\0\\u140f\\0\\u1450\\0\\u1491\\0\\u0d34\\0\\u14d2\\0\\202\\0\\202\\0\\202\"+\n    \"\\0\\u1513\\0\\u1554\\0\\u1595\\0\\u15d6\\0\\u1617\\0\\u1658\\0\\u1699\\0\\u16da\"+\n    \"\\0\\u171b\\0\\u175c\\0\\u179d\\0\\u17de\\0\\u181f\\0\\u1860\\0\\u18a1\\0\\u18e2\"+\n    \"\\0\\u0186\\0\\202\\0\\u12ca\\0\\u0186\\0\\u1923\\0\\u1964\\0\\u19a5\\0\\u19e6\"+\n    \"\\0\\u1a27\\0\\u1a68\\0\\u1aa9\\0\\u1aea\\0\\u0186\\0\\u0186\\0\\u0186\\0\\u0186\"+\n    \"\\0\\u0186\\0\\u1b2b\\0\\u1b6c\\0\\u1bad\\0\\u1bee\\0\\u1c2f\\0\\u1c70\\0\\u1cb1\"+\n    \"\\0\\u1cf2\\0\\u1d33\\0\\u1d74\\0\\u1db5\\0\\u1df6\\0\\u0186\\0\\u1e37\\0\\u0186\"+\n    \"\\0\\u1e78\\0\\u0186\\0\\u1eb9\\0\\u1efa\\0\\u0186\\0\\u1f3b\\0\\u1f7c\\0\\u1fbd\"+\n    \"\\0\\u1ffe\\0\\u203f\\0\\u2080\\0\\u20c1\\0\\u0186\\0\\u2102\\0\\u2143\\0\\u0186\"+\n    \"\\0\\u2184\\0\\u21c5\\0\\u0186\\0\\u0186\\0\\u0186\\0\\u2206\\0\\u2247\\0\\u2288\"+\n    \"\\0\\u0186\\0\\u0186\\0\\u22c9\\0\\u0186\\0\\u230a\\0\\u234b\\0\\u0186\\0\\u238c\"+\n    \"\\0\\u0186\";\n\n  private static int [] zzUnpackRowMap() {\n    int [] result = new int[209];\n    int offset = 0;\n    offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);\n    return result;\n  }\n\n  private static int zzUnpackRowMap(String packed, int offset, int [] result) {\n    int i = 0;  /* index in packed string  */\n    int j = offset;  /* index in unpacked array */\n    int l = packed.length();\n    while (i < l) {\n      int high = packed.charAt(i++) << 16;\n      result[j++] = high | packed.charAt(i++);\n    }\n    return j;\n  }\n\n  /** \n   * The transition table of the DFA\n   */\n  private static final int [] ZZ_TRANS = zzUnpackTrans();\n\n  private static final String ZZ_TRANS_PACKED_0 =\n    \"\\1\\3\\3\\4\\1\\5\\1\\6\\1\\7\\1\\10\\1\\11\\1\\12\"+\n    \"\\1\\11\\2\\13\\1\\14\\3\\11\\1\\15\\1\\16\\1\\17\\1\\3\"+\n    \"\\1\\11\\1\\13\\1\\20\\1\\21\\1\\22\\1\\11\\1\\23\\1\\24\"+\n    \"\\1\\25\\1\\26\\1\\27\\1\\30\\1\\31\\1\\32\\1\\33\\1\\34\"+\n    \"\\1\\35\\1\\36\\1\\37\\1\\40\\1\\41\\1\\42\\1\\43\\1\\44\"+\n    \"\\1\\45\\1\\46\\1\\47\\1\\50\\3\\11\\1\\51\\2\\11\\1\\52\"+\n    \"\\1\\11\\1\\53\\1\\54\\1\\55\\1\\56\\1\\57\\1\\60\\2\\11\"+\n    \"\\1\\61\\2\\62\\1\\63\\2\\5\\1\\64\\72\\61\\102\\0\\3\\4\"+\n    \"\\1\\0\\1\\4\\101\\0\\1\\65\\1\\66\\36\\0\\1\\67\\100\\0\"+\n    \"\\1\\70\\42\\0\\11\\11\\4\\0\\4\\11\\1\\0\\1\\11\\23\\0\"+\n    \"\\23\\11\\11\\0\\1\\71\\1\\0\\3\\71\\2\\0\\1\\72\\1\\0\"+\n    \"\\1\\73\\3\\0\\1\\71\\31\\0\\1\\72\\11\\0\\1\\74\\17\\0\"+\n    \"\\1\\71\\1\\0\\3\\13\\2\\0\\1\\72\\1\\0\\1\\73\\3\\0\"+\n    \"\\1\\13\\31\\0\\1\\72\\11\\0\\1\\74\\17\\0\\1\\71\\1\\0\"+\n    \"\\1\\71\\2\\75\\2\\76\\1\\72\\1\\0\\1\\73\\3\\0\\1\\71\"+\n    \"\\31\\0\\1\\72\\11\\0\\1\\74\\27\\0\\1\\77\\24\\0\\1\\100\"+\n    \"\\43\\0\\1\\73\\1\\0\\3\\73\\4\\0\\1\\101\\3\\0\\1\\73\"+\n    \"\\52\\0\\2\\17\\2\\0\\17\\17\\1\\102\\1\\103\\54\\17\\10\\0\"+\n    \"\\11\\11\\4\\0\\4\\11\\1\\0\\1\\11\\23\\0\\3\\11\\1\\104\"+\n    \"\\17\\11\\10\\0\\11\\11\\4\\0\\4\\11\\1\\0\\1\\105\\23\\0\"+\n    \"\\3\\11\\1\\106\\4\\11\\1\\107\\12\\11\\24\\110\\1\\111\\54\\110\"+\n    \"\\33\\23\\1\\112\\45\\23\\34\\0\\1\\113\\11\\0\\1\\114\\100\\0\"+\n    \"\\1\\115\\100\\0\\1\\116\\100\\0\\1\\117\\100\\0\\1\\120\\1\\0\"+\n    \"\\1\\121\\76\\0\\1\\122\\2\\0\\1\\123\\1\\124\\74\\0\\1\\125\"+\n    \"\\53\\0\\1\\126\\24\\0\\1\\127\\4\\0\\1\\130\\73\\0\\1\\131\"+\n    \"\\100\\0\\1\\132\\6\\0\\1\\133\\33\\0\\11\\11\\4\\0\\4\\11\"+\n    \"\\1\\0\\1\\11\\23\\0\\1\\11\\1\\134\\21\\11\\10\\0\\11\\11\"+\n    \"\\4\\0\\4\\11\\1\\0\\1\\11\\23\\0\\2\\11\\1\\135\\1\\136\"+\n    \"\\17\\11\\10\\0\\11\\11\\4\\0\\4\\11\\1\\0\\1\\11\\23\\0\"+\n    \"\\5\\11\\1\\137\\15\\11\\10\\0\\11\\11\\4\\0\\4\\11\\1\\0\"+\n    \"\\1\\11\\23\\0\\22\\11\\1\\140\\10\\0\\11\\11\\4\\0\\4\\11\"+\n    \"\\1\\0\\1\\11\\23\\0\\10\\11\\1\\141\\12\\11\\10\\0\\11\\11\"+\n    \"\\4\\0\\4\\11\\1\\0\\1\\11\\23\\0\\3\\11\\1\\142\\3\\11\"+\n    \"\\1\\143\\1\\144\\12\\11\\10\\0\\11\\11\\4\\0\\3\\11\\1\\145\"+\n    \"\\1\\0\\1\\11\\23\\0\\12\\11\\1\\146\\5\\11\\1\\147\\2\\11\"+\n    \"\\10\\0\\11\\11\\4\\0\\4\\11\\1\\0\\1\\11\\23\\0\\2\\11\"+\n    \"\\1\\150\\20\\11\\10\\0\\11\\11\\4\\0\\4\\11\\1\\0\\1\\11\"+\n    \"\\23\\0\\3\\11\\1\\151\\17\\11\\10\\0\\11\\11\\4\\0\\4\\11\"+\n    \"\\1\\0\\1\\11\\23\\0\\2\\11\\1\\152\\3\\11\\1\\153\\12\\11\"+\n    \"\\1\\154\\1\\11\\10\\0\\11\\11\\4\\0\\4\\11\\1\\0\\1\\11\"+\n    \"\\23\\0\\3\\11\\1\\155\\17\\11\\2\\0\\1\\62\\104\\0\\1\\65\"+\n    \"\\1\\66\\71\\0\\2\\65\\2\\0\\75\\65\\7\\66\\1\\156\\71\\66\"+\n    \"\\11\\0\\1\\157\\1\\0\\3\\157\\3\\0\\1\\160\\4\\0\\1\\157\"+\n    \"\\21\\0\\1\\160\\41\\0\\1\\73\\1\\0\\3\\73\\2\\0\\1\\72\"+\n    \"\\5\\0\\1\\73\\31\\0\\1\\72\\11\\0\\1\\161\\17\\0\\1\\71\"+\n    \"\\1\\0\\1\\71\\2\\75\\2\\0\\1\\72\\1\\0\\1\\73\\3\\0\"+\n    \"\\1\\71\\31\\0\\1\\72\\11\\0\\1\\74\\20\\0\\4\\162\\2\\0\"+\n    \"\\1\\162\\5\\0\\1\\162\\1\\0\\1\\162\\25\\0\\1\\162\\1\\0\"+\n    \"\\2\\162\\7\\0\\1\\162\\1\\0\\1\\162\\27\\0\\1\\163\\72\\0\"+\n    \"\\3\\17\\4\\0\\6\\17\\1\\0\\1\\17\\23\\0\\2\\17\\1\\0\"+\n    \"\\1\\17\\2\\0\\1\\17\\3\\0\\1\\17\\20\\0\\11\\11\\4\\0\"+\n    \"\\4\\11\\1\\0\\1\\11\\23\\0\\1\\11\\1\\164\\21\\11\\10\\0\"+\n    \"\\11\\11\\4\\0\\4\\11\\1\\0\\1\\11\\23\\0\\12\\11\\1\\165\"+\n    \"\\10\\11\\10\\0\\11\\11\\4\\0\\4\\11\\1\\0\\1\\11\\23\\0\"+\n    \"\\5\\11\\1\\166\\15\\11\\10\\0\\11\\11\\4\\0\\4\\11\\1\\0\"+\n    \"\\1\\11\\23\\0\\1\\11\\1\\167\\21\\11\\31\\0\\1\\170\\63\\0\"+\n    \"\\2\\171\\1\\172\\5\\0\\1\\110\\1\\173\\1\\0\\2\\110\\1\\174\"+\n    \"\\1\\175\\23\\0\\2\\110\\1\\0\\1\\110\\2\\0\\1\\110\\3\\0\"+\n    \"\\1\\110\\56\\0\\1\\176\\100\\0\\1\\177\\100\\0\\1\\200\\42\\0\"+\n    \"\\11\\11\\4\\0\\4\\11\\1\\0\\1\\11\\23\\0\\2\\11\\1\\201\"+\n    \"\\20\\11\\10\\0\\11\\11\\4\\0\\4\\11\\1\\0\\1\\11\\23\\0\"+\n    \"\\6\\11\\1\\202\\14\\11\\10\\0\\11\\11\\4\\0\\4\\11\\1\\0\"+\n    \"\\1\\11\\23\\0\\12\\11\\1\\203\\10\\11\\10\\0\\11\\11\\4\\0\"+\n    \"\\4\\11\\1\\0\\1\\11\\23\\0\\17\\11\\1\\204\\3\\11\\10\\0\"+\n    \"\\11\\11\\4\\0\\4\\11\\1\\0\\1\\11\\23\\0\\16\\11\\1\\205\"+\n    \"\\4\\11\\10\\0\\11\\11\\4\\0\\4\\11\\1\\0\\1\\11\\23\\0\"+\n    \"\\6\\11\\1\\206\\14\\11\\10\\0\\11\\11\\4\\0\\4\\11\\1\\0\"+\n    \"\\1\\11\\23\\0\\17\\11\\1\\207\\3\\11\\10\\0\\11\\11\\4\\0\"+\n    \"\\4\\11\\1\\0\\1\\11\\23\\0\\3\\11\\1\\210\\17\\11\\10\\0\"+\n    \"\\11\\11\\4\\0\\4\\11\\1\\0\\1\\11\\23\\0\\12\\11\\1\\211\"+\n    \"\\10\\11\\10\\0\\11\\11\\4\\0\\4\\11\\1\\0\\1\\11\\23\\0\"+\n    \"\\6\\11\\1\\212\\14\\11\\10\\0\\11\\11\\4\\0\\4\\11\\1\\0\"+\n    \"\\1\\11\\23\\0\\16\\11\\1\\213\\4\\11\\10\\0\\11\\11\\4\\0\"+\n    \"\\3\\11\\1\\214\\1\\0\\1\\11\\23\\0\\23\\11\\10\\0\\11\\11\"+\n    \"\\4\\0\\4\\11\\1\\0\\1\\11\\23\\0\\13\\11\\1\\215\\7\\11\"+\n    \"\\10\\0\\11\\11\\4\\0\\4\\11\\1\\0\\1\\11\\23\\0\\5\\11\"+\n    \"\\1\\216\\15\\11\\10\\0\\11\\11\\4\\0\\4\\11\\1\\0\\1\\11\"+\n    \"\\23\\0\\1\\11\\1\\217\\21\\11\\10\\0\\11\\11\\4\\0\\4\\11\"+\n    \"\\1\\0\\1\\11\\23\\0\\14\\11\\1\\220\\6\\11\\10\\0\\11\\11\"+\n    \"\\4\\0\\4\\11\\1\\0\\1\\11\\23\\0\\16\\11\\1\\221\\4\\11\"+\n    \"\\6\\66\\1\\222\\1\\223\\71\\66\\11\\0\\1\\157\\1\\0\\3\\157\"+\n    \"\\10\\0\\1\\157\\43\\0\\1\\161\\17\\0\\1\\157\\1\\0\\3\\157\"+\n    \"\\10\\0\\1\\157\\62\\0\\11\\11\\4\\0\\4\\11\\1\\0\\1\\11\"+\n    \"\\23\\0\\13\\11\\1\\224\\7\\11\\10\\0\\11\\11\\4\\0\\4\\11\"+\n    \"\\1\\0\\1\\11\\23\\0\\5\\11\\1\\225\\15\\11\\14\\0\\2\\226\"+\n    \"\\75\\0\\4\\227\\2\\0\\1\\227\\5\\0\\1\\227\\1\\0\\1\\227\"+\n    \"\\25\\0\\1\\227\\1\\0\\2\\227\\7\\0\\1\\227\\1\\0\\1\\227\"+\n    \"\\17\\0\\4\\230\\2\\0\\1\\230\\5\\0\\1\\230\\1\\0\\1\\230\"+\n    \"\\25\\0\\1\\230\\1\\0\\2\\230\\7\\0\\1\\230\\1\\0\\1\\230\"+\n    \"\\17\\0\\4\\231\\2\\0\\1\\231\\5\\0\\1\\231\\1\\0\\1\\231\"+\n    \"\\25\\0\\1\\231\\1\\0\\2\\231\\7\\0\\1\\231\\1\\0\\1\\231\"+\n    \"\\15\\0\\11\\11\\4\\0\\4\\11\\1\\0\\1\\11\\23\\0\\3\\11\"+\n    \"\\1\\232\\17\\11\\10\\0\\11\\11\\4\\0\\4\\11\\1\\0\\1\\233\"+\n    \"\\23\\0\\23\\11\\10\\0\\11\\11\\4\\0\\4\\11\\1\\0\\1\\11\"+\n    \"\\23\\0\\11\\11\\1\\234\\11\\11\\10\\0\\11\\11\\4\\0\\4\\11\"+\n    \"\\1\\0\\1\\11\\23\\0\\2\\11\\1\\235\\20\\11\\10\\0\\11\\11\"+\n    \"\\4\\0\\4\\11\\1\\0\\1\\11\\23\\0\\2\\11\\1\\236\\20\\11\"+\n    \"\\10\\0\\11\\11\\4\\0\\4\\11\\1\\0\\1\\11\\23\\0\\10\\11\"+\n    \"\\1\\237\\12\\11\\10\\0\\11\\11\\4\\0\\4\\11\\1\\0\\1\\11\"+\n    \"\\23\\0\\2\\11\\1\\240\\20\\11\\10\\0\\11\\11\\4\\0\\4\\11\"+\n    \"\\1\\0\\1\\11\\23\\0\\12\\11\\1\\241\\10\\11\\10\\0\\11\\11\"+\n    \"\\4\\0\\4\\11\\1\\0\\1\\11\\23\\0\\6\\11\\1\\242\\10\\11\"+\n    \"\\1\\243\\3\\11\\10\\0\\11\\11\\4\\0\\4\\11\\1\\0\\1\\11\"+\n    \"\\23\\0\\2\\11\\1\\244\\20\\11\\10\\0\\11\\11\\4\\0\\4\\11\"+\n    \"\\1\\0\\1\\11\\23\\0\\10\\11\\1\\245\\12\\11\\10\\0\\11\\11\"+\n    \"\\4\\0\\4\\11\\1\\0\\1\\11\\23\\0\\2\\11\\1\\246\\1\\247\"+\n    \"\\17\\11\\10\\0\\11\\11\\4\\0\\4\\11\\1\\0\\1\\11\\23\\0\"+\n    \"\\4\\11\\1\\250\\16\\11\\10\\0\\11\\11\\4\\0\\4\\11\\1\\0\"+\n    \"\\1\\11\\23\\0\\2\\11\\1\\251\\20\\11\\10\\0\\11\\11\\4\\0\"+\n    \"\\4\\11\\1\\0\\1\\252\\23\\0\\23\\11\\10\\0\\11\\11\\4\\0\"+\n    \"\\4\\11\\1\\0\\1\\11\\23\\0\\6\\11\\1\\253\\14\\11\\10\\0\"+\n    \"\\11\\11\\4\\0\\4\\11\\1\\0\\1\\11\\23\\0\\6\\11\\1\\254\"+\n    \"\\14\\11\\14\\0\\2\\110\\75\\0\\4\\110\\2\\0\\1\\110\\5\\0\"+\n    \"\\1\\110\\1\\0\\1\\110\\25\\0\\1\\110\\1\\0\\2\\110\\7\\0\"+\n    \"\\1\\110\\1\\0\\1\\110\\17\\0\\4\\255\\2\\0\\1\\255\\5\\0\"+\n    \"\\1\\255\\1\\0\\1\\255\\25\\0\\1\\255\\1\\0\\2\\255\\7\\0\"+\n    \"\\1\\255\\1\\0\\1\\255\\17\\0\\4\\172\\2\\0\\1\\172\\5\\0\"+\n    \"\\1\\172\\1\\0\\1\\172\\25\\0\\1\\172\\1\\0\\2\\172\\7\\0\"+\n    \"\\1\\172\\1\\0\\1\\172\\15\\0\\11\\11\\4\\0\\4\\11\\1\\0\"+\n    \"\\1\\11\\23\\0\\4\\11\\1\\256\\16\\11\\10\\0\\11\\11\\4\\0\"+\n    \"\\4\\11\\1\\0\\1\\11\\23\\0\\1\\11\\1\\257\\21\\11\\10\\0\"+\n    \"\\11\\11\\4\\0\\4\\11\\1\\0\\1\\11\\23\\0\\2\\11\\1\\260\"+\n    \"\\20\\11\\10\\0\\11\\11\\4\\0\\4\\11\\1\\0\\1\\11\\23\\0\"+\n    \"\\14\\11\\1\\261\\6\\11\\10\\0\\11\\11\\4\\0\\4\\11\\1\\0\"+\n    \"\\1\\11\\23\\0\\6\\11\\1\\262\\14\\11\\10\\0\\11\\11\\4\\0\"+\n    \"\\4\\11\\1\\0\\1\\11\\23\\0\\1\\11\\1\\263\\21\\11\\10\\0\"+\n    \"\\11\\11\\4\\0\\4\\11\\1\\0\\1\\11\\23\\0\\1\\11\\1\\264\"+\n    \"\\21\\11\\10\\0\\11\\11\\4\\0\\4\\11\\1\\0\\1\\11\\23\\0\"+\n    \"\\1\\11\\1\\265\\21\\11\\10\\0\\11\\11\\4\\0\\4\\11\\1\\0\"+\n    \"\\1\\266\\23\\0\\23\\11\\10\\0\\11\\11\\4\\0\\4\\11\\1\\0\"+\n    \"\\1\\11\\23\\0\\3\\11\\1\\267\\17\\11\\10\\0\\11\\11\\4\\0\"+\n    \"\\4\\11\\1\\0\\1\\11\\23\\0\\13\\11\\1\\270\\7\\11\\10\\0\"+\n    \"\\11\\11\\4\\0\\4\\11\\1\\0\\1\\11\\23\\0\\13\\11\\1\\271\"+\n    \"\\7\\11\\10\\0\\11\\11\\4\\0\\4\\11\\1\\0\\1\\11\\23\\0\"+\n    \"\\13\\11\\1\\272\\7\\11\\10\\0\\11\\11\\4\\0\\4\\11\\1\\0\"+\n    \"\\1\\11\\23\\0\\7\\11\\1\\273\\13\\11\\12\\0\\4\\274\\2\\0\"+\n    \"\\1\\274\\5\\0\\1\\274\\1\\0\\1\\274\\25\\0\\1\\274\\1\\0\"+\n    \"\\2\\274\\7\\0\\1\\274\\1\\0\\1\\274\\15\\0\\11\\11\\4\\0\"+\n    \"\\4\\11\\1\\0\\1\\11\\23\\0\\12\\11\\1\\275\\10\\11\\10\\0\"+\n    \"\\11\\11\\4\\0\\4\\11\\1\\0\\1\\11\\23\\0\\12\\11\\1\\276\"+\n    \"\\10\\11\\10\\0\\11\\11\\4\\0\\3\\11\\1\\277\\1\\0\\1\\11\"+\n    \"\\23\\0\\23\\11\\10\\0\\11\\11\\4\\0\\4\\11\\1\\0\\1\\11\"+\n    \"\\23\\0\\6\\11\\1\\300\\14\\11\\10\\0\\11\\11\\4\\0\\4\\11\"+\n    \"\\1\\0\\1\\11\\23\\0\\5\\11\\1\\301\\15\\11\\10\\0\\11\\11\"+\n    \"\\4\\0\\4\\11\\1\\0\\1\\11\\23\\0\\11\\11\\1\\302\\11\\11\"+\n    \"\\10\\0\\11\\11\\4\\0\\4\\11\\1\\0\\1\\11\\23\\0\\6\\11\"+\n    \"\\1\\303\\14\\11\\10\\0\\11\\11\\4\\0\\4\\11\\1\\0\\1\\11\"+\n    \"\\23\\0\\6\\11\\1\\304\\14\\11\\10\\0\\11\\11\\4\\0\\4\\11\"+\n    \"\\1\\0\\1\\11\\23\\0\\7\\11\\1\\305\\13\\11\\10\\0\\11\\11\"+\n    \"\\4\\0\\4\\11\\1\\0\\1\\11\\23\\0\\1\\11\\1\\306\\21\\11\"+\n    \"\\12\\0\\4\\175\\2\\0\\1\\175\\5\\0\\1\\175\\1\\0\\1\\175\"+\n    \"\\25\\0\\1\\175\\1\\0\\2\\175\\7\\0\\1\\175\\1\\0\\1\\175\"+\n    \"\\15\\0\\11\\11\\4\\0\\4\\11\\1\\0\\1\\307\\23\\0\\23\\11\"+\n    \"\\10\\0\\11\\11\\4\\0\\4\\11\\1\\0\\1\\11\\23\\0\\3\\11\"+\n    \"\\1\\310\\17\\11\\10\\0\\11\\11\\4\\0\\4\\11\\1\\0\\1\\11\"+\n    \"\\23\\0\\6\\11\\1\\311\\14\\11\\10\\0\\11\\11\\4\\0\\4\\11\"+\n    \"\\1\\0\\1\\11\\23\\0\\2\\11\\1\\312\\20\\11\\10\\0\\11\\11\"+\n    \"\\4\\0\\4\\11\\1\\0\\1\\11\\23\\0\\10\\11\\1\\313\\12\\11\"+\n    \"\\10\\0\\11\\11\\4\\0\\4\\11\\1\\0\\1\\11\\23\\0\\2\\11\"+\n    \"\\1\\314\\20\\11\\10\\0\\11\\11\\4\\0\\4\\11\\1\\0\\1\\11\"+\n    \"\\23\\0\\13\\11\\1\\315\\7\\11\\10\\0\\11\\11\\4\\0\\4\\11\"+\n    \"\\1\\0\\1\\316\\23\\0\\23\\11\\10\\0\\11\\11\\4\\0\\4\\11\"+\n    \"\\1\\0\\1\\11\\23\\0\\2\\11\\1\\317\\20\\11\\10\\0\\11\\11\"+\n    \"\\4\\0\\4\\11\\1\\0\\1\\11\\23\\0\\11\\11\\1\\320\\11\\11\"+\n    \"\\10\\0\\11\\11\\4\\0\\4\\11\\1\\0\\1\\11\\23\\0\\7\\11\"+\n    \"\\1\\321\\13\\11\";\n\n  private static int [] zzUnpackTrans() {\n    int [] result = new int[9165];\n    int offset = 0;\n    offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);\n    return result;\n  }\n\n  private static int zzUnpackTrans(String packed, int offset, int [] result) {\n    int i = 0;       /* index in packed string  */\n    int j = offset;  /* index in unpacked array */\n    int l = packed.length();\n    while (i < l) {\n      int count = packed.charAt(i++);\n      int value = packed.charAt(i++);\n      value--;\n      do result[j++] = value; while (--count > 0);\n    }\n    return j;\n  }\n\n\n  /* error codes */\n  private static final int ZZ_UNKNOWN_ERROR = 0;\n  private static final int ZZ_NO_MATCH = 1;\n  private static final int ZZ_PUSHBACK_2BIG = 2;\n\n  /* error messages for the codes above */\n  private static final String[] ZZ_ERROR_MSG = {\n    \"Unknown internal scanner error\",\n    \"Error: could not match input\",\n    \"Error: pushback value was too large\"\n  };\n\n  /**\n   * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>\n   */\n  private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();\n\n  private static final String ZZ_ATTRIBUTE_PACKED_0 =\n    \"\\2\\0\\1\\11\\1\\1\\1\\11\\17\\1\\6\\11\\1\\1\\2\\11\"+\n    \"\\23\\1\\2\\11\\4\\1\\2\\11\\2\\0\\1\\1\\1\\11\\1\\1\"+\n    \"\\1\\0\\2\\11\\1\\0\\1\\11\\1\\0\\5\\1\\1\\0\\12\\11\"+\n    \"\\1\\1\\3\\11\\1\\1\\2\\11\\25\\1\\1\\0\\1\\11\\1\\1\"+\n    \"\\1\\11\\4\\1\\1\\11\\3\\0\\1\\1\\1\\0\\3\\11\\21\\1\"+\n    \"\\1\\11\\1\\0\\2\\1\\4\\0\\23\\1\\1\\0\\16\\1\\1\\0\"+\n    \"\\25\\1\";\n\n  private static int [] zzUnpackAttribute() {\n    int [] result = new int[209];\n    int offset = 0;\n    offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);\n    return result;\n  }\n\n  private static int zzUnpackAttribute(String packed, int offset, int [] result) {\n    int i = 0;       /* index in packed string  */\n    int j = offset;  /* index in unpacked array */\n    int l = packed.length();\n    while (i < l) {\n      int count = packed.charAt(i++);\n      int value = packed.charAt(i++);\n      do result[j++] = value; while (--count > 0);\n    }\n    return j;\n  }\n\n  /** the input device */\n  private java.io.Reader zzReader;\n\n  /** the current state of the DFA */\n  private int zzState;\n\n  /** the current lexical state */\n  private int zzLexicalState = YYINITIAL;\n\n  /** this buffer contains the current text to be matched and is\n      the source of the yytext() string */\n  private CharSequence zzBuffer = \"\";\n\n  /** the textposition at the last accepting state */\n  private int zzMarkedPos;\n\n  /** the current text position in the buffer */\n  private int zzCurrentPos;\n\n  /** startRead marks the beginning of the yytext() string in the buffer */\n  private int zzStartRead;\n\n  /** endRead marks the last character in the buffer, that has been read\n      from input */\n  private int zzEndRead;\n\n  /**\n   * zzAtBOL == true <=> the scanner is currently at the beginning of a line\n   */\n  private boolean zzAtBOL = true;\n\n  /** zzAtEOF == true <=> the scanner is at the EOF */\n  private boolean zzAtEOF;\n\n  /** denotes if the user-EOF-code has already been executed */\n  private boolean zzEOFDone;\n\n  /* user code: */\n  public _GoLexer() {\n    this((java.io.Reader)null);\n }\n\n\n  /**\n   * Creates a new scanner\n   *\n   * @param   in  the java.io.Reader to read input from.\n   */\n  public _GoLexer(java.io.Reader in) {\n    this.zzReader = in;\n  }\n\n\n  /** \n   * Unpacks the compressed character translation table.\n   *\n   * @param packed   the packed character translation table\n   * @return         the unpacked character translation table\n   */\n  private static char [] zzUnpackCMap(String packed) {\n    int size = 0;\n    for (int i = 0, length = packed.length(); i < length; i += 2) {\n      size += packed.charAt(i);\n    }\n    char[] map = new char[size];\n    int i = 0;  /* index in packed string  */\n    int j = 0;  /* index in unpacked array */\n    while (i < packed.length()) {\n      int  count = packed.charAt(i++);\n      char value = packed.charAt(i++);\n      do map[j++] = value; while (--count > 0);\n    }\n    return map;\n  }\n\n  public final int getTokenStart() {\n    return zzStartRead;\n  }\n\n  public final int getTokenEnd() {\n    return getTokenStart() + yylength();\n  }\n\n  public void reset(CharSequence buffer, int start, int end, int initialState) {\n    zzBuffer = buffer;\n    zzCurrentPos = zzMarkedPos = zzStartRead = start;\n    zzAtEOF  = false;\n    zzAtBOL = true;\n    zzEndRead = end;\n    yybegin(initialState);\n  }\n\n  /**\n   * Refills the input buffer.\n   *\n   * @return      <code>false</code>, iff there was new input.\n   *\n   * @exception   java.io.IOException  if any I/O-Error occurs\n   */\n  private boolean zzRefill() throws java.io.IOException {\n    return true;\n  }\n\n\n  /**\n   * Returns the current lexical state.\n   */\n  public final int yystate() {\n    return zzLexicalState;\n  }\n\n\n  /**\n   * Enters a new lexical state\n   *\n   * @param newState the new lexical state\n   */\n  public final void yybegin(int newState) {\n    zzLexicalState = newState;\n  }\n\n\n  /**\n   * Returns the text matched by the current regular expression.\n   */\n  public final CharSequence yytext() {\n    return zzBuffer.subSequence(zzStartRead, zzMarkedPos);\n  }\n\n\n  /**\n   * Returns the character at position <tt>pos</tt> from the\n   * matched text.\n   *\n   * It is equivalent to yytext().charAt(pos), but faster\n   *\n   * @param pos the position of the character to fetch.\n   *            A value from 0 to yylength()-1.\n   *\n   * @return the character at position pos\n   */\n  public final char yycharat(int pos) {\n    return zzBuffer.charAt(zzStartRead+pos);\n  }\n\n\n  /**\n   * Returns the length of the matched text region.\n   */\n  public final int yylength() {\n    return zzMarkedPos-zzStartRead;\n  }\n\n\n  /**\n   * Reports an error that occured while scanning.\n   *\n   * In a wellformed scanner (no or only correct usage of\n   * yypushback(int) and a match-all fallback rule) this method\n   * will only be called with things that \"Can't Possibly Happen\".\n   * If this method is called, something is seriously wrong\n   * (e.g. a JFlex bug producing a faulty scanner etc.).\n   *\n   * Usual syntax/scanner level error handling should be done\n   * in error fallback rules.\n   *\n   * @param   errorCode  the code of the errormessage to display\n   */\n  private void zzScanError(int errorCode) {\n    String message;\n    try {\n      message = ZZ_ERROR_MSG[errorCode];\n    }\n    catch (ArrayIndexOutOfBoundsException e) {\n      message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];\n    }\n\n    throw new Error(message);\n  }\n\n\n  /**\n   * Pushes the specified amount of characters back into the input stream.\n   *\n   * They will be read again by then next call of the scanning method\n   *\n   * @param number  the number of characters to be read again.\n   *                This number must not be greater than yylength()!\n   */\n  public void yypushback(int number)  {\n    if ( number > yylength() )\n      zzScanError(ZZ_PUSHBACK_2BIG);\n\n    zzMarkedPos -= number;\n  }\n\n\n  /**\n   * Resumes scanning until the next regular expression is matched,\n   * the end of input is encountered or an I/O-Error occurs.\n   *\n   * @return      the next token\n   * @exception   java.io.IOException  if any I/O-Error occurs\n   */\n  public IElementType advance() throws java.io.IOException {\n    int zzInput;\n    int zzAction;\n\n    // cached fields:\n    int zzCurrentPosL;\n    int zzMarkedPosL;\n    int zzEndReadL = zzEndRead;\n    CharSequence zzBufferL = zzBuffer;\n\n    int [] zzTransL = ZZ_TRANS;\n    int [] zzRowMapL = ZZ_ROWMAP;\n    int [] zzAttrL = ZZ_ATTRIBUTE;\n\n    while (true) {\n      zzMarkedPosL = zzMarkedPos;\n\n      zzAction = -1;\n\n      zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;\n\n      zzState = ZZ_LEXSTATE[zzLexicalState];\n\n      // set up zzAction for empty match case:\n      int zzAttributes = zzAttrL[zzState];\n      if ( (zzAttributes & 1) == 1 ) {\n        zzAction = zzState;\n      }\n\n\n      zzForAction: {\n        while (true) {\n\n          if (zzCurrentPosL < zzEndReadL) {\n            zzInput = Character.codePointAt(zzBufferL, zzCurrentPosL/*, zzEndReadL*/);\n            zzCurrentPosL += Character.charCount(zzInput);\n          }\n          else if (zzAtEOF) {\n            zzInput = YYEOF;\n            break zzForAction;\n          }\n          else {\n            // store back cached positions\n            zzCurrentPos  = zzCurrentPosL;\n            zzMarkedPos   = zzMarkedPosL;\n            boolean eof = zzRefill();\n            // get translated positions and possibly new buffer\n            zzCurrentPosL  = zzCurrentPos;\n            zzMarkedPosL   = zzMarkedPos;\n            zzBufferL      = zzBuffer;\n            zzEndReadL     = zzEndRead;\n            if (eof) {\n              zzInput = YYEOF;\n              break zzForAction;\n            }\n            else {\n              zzInput = Character.codePointAt(zzBufferL, zzCurrentPosL/*, zzEndReadL*/);\n              zzCurrentPosL += Character.charCount(zzInput);\n            }\n          }\n          int zzNext = zzTransL[ zzRowMapL[zzState] + ZZ_CMAP(zzInput) ];\n          if (zzNext == -1) break zzForAction;\n          zzState = zzNext;\n\n          zzAttributes = zzAttrL[zzState];\n          if ( (zzAttributes & 1) == 1 ) {\n            zzAction = zzState;\n            zzMarkedPosL = zzCurrentPosL;\n            if ( (zzAttributes & 8) == 8 ) break zzForAction;\n          }\n\n        }\n      }\n\n      // store back cached position\n      zzMarkedPos = zzMarkedPosL;\n\n      if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {\n        zzAtEOF = true;\n        return null;\n      }\n      else {\n        switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {\n          case 1: \n            { return BAD_CHARACTER;\n            }\n          case 91: break;\n          case 2: \n            { return NLS;\n            }\n          case 92: break;\n          case 3: \n            { return WS;\n            }\n          case 93: break;\n          case 4: \n            { return QUOTIENT;\n            }\n          case 94: break;\n          case 5: \n            { return MUL;\n            }\n          case 95: break;\n          case 6: \n            { yybegin(MAYBE_SEMICOLON); return IDENTIFIER;\n            }\n          case 96: break;\n          case 7: \n            { yybegin(MAYBE_SEMICOLON); return INT;\n            }\n          case 97: break;\n          case 8: \n            { return MINUS;\n            }\n          case 98: break;\n          case 9: \n            { return DOT;\n            }\n          case 99: break;\n          case 10: \n            { yybegin(MAYBE_SEMICOLON); return STRING;\n            }\n          case 100: break;\n          case 11: \n            { yybegin(MAYBE_SEMICOLON); return RAW_STRING;\n            }\n          case 101: break;\n          case 12: \n            { return BIT_OR;\n            }\n          case 102: break;\n          case 13: \n            { return LBRACE;\n            }\n          case 103: break;\n          case 14: \n            { yybegin(MAYBE_SEMICOLON); return RBRACE;\n            }\n          case 104: break;\n          case 15: \n            { return LBRACK;\n            }\n          case 105: break;\n          case 16: \n            { yybegin(MAYBE_SEMICOLON); return RBRACK;\n            }\n          case 106: break;\n          case 17: \n            { return LPAREN;\n            }\n          case 107: break;\n          case 18: \n            { yybegin(MAYBE_SEMICOLON); return RPAREN;\n            }\n          case 108: break;\n          case 19: \n            { return COLON;\n            }\n          case 109: break;\n          case 20: \n            { return SEMICOLON;\n            }\n          case 110: break;\n          case 21: \n            { return COMMA;\n            }\n          case 111: break;\n          case 22: \n            { return ASSIGN;\n            }\n          case 112: break;\n          case 23: \n            { return NOT;\n            }\n          case 113: break;\n          case 24: \n            { return PLUS;\n            }\n          case 114: break;\n          case 25: \n            { return BIT_AND;\n            }\n          case 115: break;\n          case 26: \n            { return BIT_XOR;\n            }\n          case 116: break;\n          case 27: \n            { return LESS;\n            }\n          case 117: break;\n          case 28: \n            { return REMAINDER;\n            }\n          case 118: break;\n          case 29: \n            { return GREATER;\n            }\n          case 119: break;\n          case 30: \n            { yybegin(YYINITIAL); yypushback(yytext().length());\n            }\n          case 120: break;\n          case 31: \n            { yybegin(YYINITIAL); yypushback(yytext().length()); return SEMICOLON_SYNTHETIC;\n            }\n          case 121: break;\n          case 32: \n            { return LINE_COMMENT;\n            }\n          case 122: break;\n          case 33: \n            { return MULTILINE_COMMENT;\n            }\n          case 123: break;\n          case 34: \n            { return QUOTIENT_ASSIGN;\n            }\n          case 124: break;\n          case 35: \n            { return MUL_ASSIGN;\n            }\n          case 125: break;\n          case 36: \n            { yybegin(MAYBE_SEMICOLON); return FLOAT;\n            }\n          case 126: break;\n          case 37: \n            { yybegin(MAYBE_SEMICOLON); return DECIMALI;\n            }\n          case 127: break;\n          case 38: \n            { yybegin(MAYBE_SEMICOLON); return OCT;\n            }\n          case 128: break;\n          case 39: \n            { yybegin(MAYBE_SEMICOLON); return MINUS_MINUS;\n            }\n          case 129: break;\n          case 40: \n            { return MINUS_ASSIGN;\n            }\n          case 130: break;\n          case 41: \n            { yybegin(MAYBE_SEMICOLON); return CHAR;\n            }\n          case 131: break;\n          case 42: \n            { return COND_OR;\n            }\n          case 132: break;\n          case 43: \n            { return BIT_OR_ASSIGN;\n            }\n          case 133: break;\n          case 44: \n            { return VAR_ASSIGN;\n            }\n          case 134: break;\n          case 45: \n            { return EQ;\n            }\n          case 135: break;\n          case 46: \n            { return NOT_EQ;\n            }\n          case 136: break;\n          case 47: \n            { return PLUS_ASSIGN;\n            }\n          case 137: break;\n          case 48: \n            { yybegin(MAYBE_SEMICOLON); return PLUS_PLUS;\n            }\n          case 138: break;\n          case 49: \n            { return BIT_AND_ASSIGN;\n            }\n          case 139: break;\n          case 50: \n            { return COND_AND;\n            }\n          case 140: break;\n          case 51: \n            { return BIT_CLEAR;\n            }\n          case 141: break;\n          case 52: \n            { return BIT_XOR_ASSIGN;\n            }\n          case 142: break;\n          case 53: \n            { return SEND_CHANNEL;\n            }\n          case 143: break;\n          case 54: \n            { return LESS_OR_EQUAL;\n            }\n          case 144: break;\n          case 55: \n            { return SHIFT_LEFT;\n            }\n          case 145: break;\n          case 56: \n            { return REMAINDER_ASSIGN;\n            }\n          case 146: break;\n          case 57: \n            { return GREATER_OR_EQUAL;\n            }\n          case 147: break;\n          case 58: \n            { return SHIFT_RIGHT;\n            }\n          case 148: break;\n          case 59: \n            { return GO;\n            }\n          case 149: break;\n          case 60: \n            { return IF ;\n            }\n          case 150: break;\n          case 61: \n            { yybegin(MAYBE_SEMICOLON); return FLOATI;\n            }\n          case 151: break;\n          case 62: \n            { yybegin(MAYBE_SEMICOLON); return HEX;\n            }\n          case 152: break;\n          case 63: \n            { return TRIPLE_DOT;\n            }\n          case 153: break;\n          case 64: \n            { return VAR;\n            }\n          case 154: break;\n          case 65: \n            { return FOR ;\n            }\n          case 155: break;\n          case 66: \n            { yybegin(MAYBE_SEMICOLON); return BAD_CHARACTER;\n            }\n          case 156: break;\n          case 67: \n            { return BIT_CLEAR_ASSIGN;\n            }\n          case 157: break;\n          case 68: \n            { return SHIFT_LEFT_ASSIGN;\n            }\n          case 158: break;\n          case 69: \n            { return SHIFT_RIGHT_ASSIGN;\n            }\n          case 159: break;\n          case 70: \n            { return MAP;\n            }\n          case 160: break;\n          case 71: \n            { return FUNC;\n            }\n          case 161: break;\n          case 72: \n            { return ELSE;\n            }\n          case 162: break;\n          case 73: \n            { return TYPE_;\n            }\n          case 163: break;\n          case 74: \n            { return GOTO;\n            }\n          case 164: break;\n          case 75: \n            { return CASE;\n            }\n          case 165: break;\n          case 76: \n            { return CHAN;\n            }\n          case 166: break;\n          case 77: \n            { yybegin(MAYBE_SEMICOLON); return BREAK;\n            }\n          case 167: break;\n          case 78: \n            { return RANGE;\n            }\n          case 168: break;\n          case 79: \n            { return CONST;\n            }\n          case 169: break;\n          case 80: \n            { return DEFER;\n            }\n          case 170: break;\n          case 81: \n            { yybegin(MAYBE_SEMICOLON); return RETURN ;\n            }\n          case 171: break;\n          case 82: \n            { return IMPORT ;\n            }\n          case 172: break;\n          case 83: \n            { return SELECT;\n            }\n          case 173: break;\n          case 84: \n            { return STRUCT;\n            }\n          case 174: break;\n          case 85: \n            { return SWITCH;\n            }\n          case 175: break;\n          case 86: \n            { return DEFAULT;\n            }\n          case 176: break;\n          case 87: \n            { return PACKAGE;\n            }\n          case 177: break;\n          case 88: \n            { yybegin(MAYBE_SEMICOLON); return CONTINUE ;\n            }\n          case 178: break;\n          case 89: \n            { return INTERFACE;\n            }\n          case 179: break;\n          case 90: \n            { yybegin(MAYBE_SEMICOLON); return FALLTHROUGH;\n            }\n          case 180: break;\n          default:\n            zzScanError(ZZ_NO_MATCH);\n          }\n      }\n    }\n  }\n\n\n}\n"
  },
  {
    "path": "gen/com/goide/parser/GoParser.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.parser;\n\nimport com.intellij.lang.PsiBuilder;\nimport com.intellij.lang.PsiBuilder.Marker;\nimport static com.goide.GoTypes.*;\nimport static com.goide.parser.GoParserUtil.*;\nimport com.intellij.psi.tree.IElementType;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.tree.TokenSet;\nimport com.intellij.lang.PsiParser;\nimport com.intellij.lang.LightPsiParser;\n\n@SuppressWarnings({\"SimplifiableIfStatement\", \"UnusedAssignment\"})\npublic class GoParser implements PsiParser, LightPsiParser {\n\n  public ASTNode parse(IElementType t, PsiBuilder b) {\n    parseLight(t, b);\n    return b.getTreeBuilt();\n  }\n\n  public void parseLight(IElementType t, PsiBuilder b) {\n    boolean r;\n    b = adapt_builder_(t, b, this, EXTENDS_SETS_);\n    Marker m = enter_section_(b, 0, _COLLAPSE_, null);\n    if (t == ANONYMOUS_FIELD_DEFINITION) {\n      r = AnonymousFieldDefinition(b, 0);\n    }\n    else if (t == ARGUMENT_LIST) {\n      r = ArgumentList(b, 0);\n    }\n    else if (t == ARRAY_OR_SLICE_TYPE) {\n      r = ArrayOrSliceType(b, 0);\n    }\n    else if (t == ASSIGNMENT_STATEMENT) {\n      r = AssignmentStatement(b, 0);\n    }\n    else if (t == BLOCK) {\n      r = Block(b, 0);\n    }\n    else if (t == BREAK_STATEMENT) {\n      r = BreakStatement(b, 0);\n    }\n    else if (t == BUILTIN_ARGUMENT_LIST) {\n      r = BuiltinArgumentList(b, 0);\n    }\n    else if (t == CHANNEL_TYPE) {\n      r = ChannelType(b, 0);\n    }\n    else if (t == COMM_CASE) {\n      r = CommCase(b, 0);\n    }\n    else if (t == COMM_CLAUSE) {\n      r = CommClause(b, 0);\n    }\n    else if (t == CONST_DECLARATION) {\n      r = ConstDeclaration(b, 0);\n    }\n    else if (t == CONST_DEFINITION) {\n      r = ConstDefinition(b, 0);\n    }\n    else if (t == CONST_SPEC) {\n      r = ConstSpec(b, 0);\n    }\n    else if (t == CONTINUE_STATEMENT) {\n      r = ContinueStatement(b, 0);\n    }\n    else if (t == DEFER_STATEMENT) {\n      r = DeferStatement(b, 0);\n    }\n    else if (t == ELEMENT) {\n      r = Element(b, 0);\n    }\n    else if (t == ELSE_STATEMENT) {\n      r = ElseStatement(b, 0);\n    }\n    else if (t == EXPR_CASE_CLAUSE) {\n      r = ExprCaseClause(b, 0);\n    }\n    else if (t == EXPR_SWITCH_STATEMENT) {\n      r = ExprSwitchStatement(b, 0);\n    }\n    else if (t == EXPRESSION) {\n      r = Expression(b, 0, -1);\n    }\n    else if (t == FALLTHROUGH_STATEMENT) {\n      r = FallthroughStatement(b, 0);\n    }\n    else if (t == FIELD_DECLARATION) {\n      r = FieldDeclaration(b, 0);\n    }\n    else if (t == FIELD_DEFINITION) {\n      r = FieldDefinition(b, 0);\n    }\n    else if (t == FIELD_NAME) {\n      r = FieldName(b, 0);\n    }\n    else if (t == FOR_CLAUSE) {\n      r = ForClause(b, 0);\n    }\n    else if (t == FOR_STATEMENT) {\n      r = ForStatement(b, 0);\n    }\n    else if (t == FUNCTION_DECLARATION) {\n      r = FunctionDeclaration(b, 0);\n    }\n    else if (t == FUNCTION_TYPE) {\n      r = FunctionType(b, 0);\n    }\n    else if (t == GO_STATEMENT) {\n      r = GoStatement(b, 0);\n    }\n    else if (t == GOTO_STATEMENT) {\n      r = GotoStatement(b, 0);\n    }\n    else if (t == IF_STATEMENT) {\n      r = IfStatement(b, 0);\n    }\n    else if (t == IMPORT_DECLARATION) {\n      r = ImportDeclaration(b, 0);\n    }\n    else if (t == IMPORT_LIST) {\n      r = ImportList(b, 0);\n    }\n    else if (t == IMPORT_SPEC) {\n      r = ImportSpec(b, 0);\n    }\n    else if (t == IMPORT_STRING) {\n      r = ImportString(b, 0);\n    }\n    else if (t == INC_DEC_STATEMENT) {\n      r = IncDecStatement(b, 0);\n    }\n    else if (t == INTERFACE_TYPE) {\n      r = InterfaceType(b, 0);\n    }\n    else if (t == KEY) {\n      r = Key(b, 0);\n    }\n    else if (t == LABEL_DEFINITION) {\n      r = LabelDefinition(b, 0);\n    }\n    else if (t == LABEL_REF) {\n      r = LabelRef(b, 0);\n    }\n    else if (t == LABELED_STATEMENT) {\n      r = LabeledStatement(b, 0);\n    }\n    else if (t == LEFT_HAND_EXPR_LIST) {\n      r = LeftHandExprList(b, 0);\n    }\n    else if (t == LITERAL_TYPE_EXPR) {\n      r = LiteralTypeExpr(b, 0);\n    }\n    else if (t == LITERAL_VALUE) {\n      r = LiteralValue(b, 0);\n    }\n    else if (t == MAP_TYPE) {\n      r = MapType(b, 0);\n    }\n    else if (t == METHOD_DECLARATION) {\n      r = MethodDeclaration(b, 0);\n    }\n    else if (t == METHOD_SPEC) {\n      r = MethodSpec(b, 0);\n    }\n    else if (t == PACKAGE_CLAUSE) {\n      r = PackageClause(b, 0);\n    }\n    else if (t == PAR_TYPE) {\n      r = ParType(b, 0);\n    }\n    else if (t == PARAM_DEFINITION) {\n      r = ParamDefinition(b, 0);\n    }\n    else if (t == PARAMETER_DECLARATION) {\n      r = ParameterDeclaration(b, 0);\n    }\n    else if (t == PARAMETERS) {\n      r = Parameters(b, 0);\n    }\n    else if (t == POINTER_TYPE) {\n      r = PointerType(b, 0);\n    }\n    else if (t == RANGE_CLAUSE) {\n      r = RangeClause(b, 0);\n    }\n    else if (t == RECEIVER) {\n      r = Receiver(b, 0);\n    }\n    else if (t == RECV_STATEMENT) {\n      r = RecvStatement(b, 0);\n    }\n    else if (t == REFERENCE_EXPRESSION) {\n      r = ReferenceExpression(b, 0);\n    }\n    else if (t == RESULT) {\n      r = Result(b, 0);\n    }\n    else if (t == RETURN_STATEMENT) {\n      r = ReturnStatement(b, 0);\n    }\n    else if (t == SELECT_STATEMENT) {\n      r = SelectStatement(b, 0);\n    }\n    else if (t == SEND_STATEMENT) {\n      r = SendStatement(b, 0);\n    }\n    else if (t == SHORT_VAR_DECLARATION) {\n      r = ShortVarDeclaration(b, 0);\n    }\n    else if (t == SIGNATURE) {\n      r = Signature(b, 0);\n    }\n    else if (t == SIMPLE_STATEMENT) {\n      r = SimpleStatement(b, 0);\n    }\n    else if (t == SPEC_TYPE) {\n      r = SpecType(b, 0);\n    }\n    else if (t == STATEMENT) {\n      r = Statement(b, 0);\n    }\n    else if (t == STRING_LITERAL) {\n      r = StringLiteral(b, 0);\n    }\n    else if (t == STRUCT_TYPE) {\n      r = StructType(b, 0);\n    }\n    else if (t == SWITCH_START) {\n      r = SwitchStart(b, 0);\n    }\n    else if (t == SWITCH_STATEMENT) {\n      r = SwitchStatement(b, 0);\n    }\n    else if (t == TAG) {\n      r = Tag(b, 0);\n    }\n    else if (t == TYPE) {\n      r = Type(b, 0);\n    }\n    else if (t == TYPE_CASE_CLAUSE) {\n      r = TypeCaseClause(b, 0);\n    }\n    else if (t == TYPE_DECLARATION) {\n      r = TypeDeclaration(b, 0);\n    }\n    else if (t == TYPE_GUARD) {\n      r = TypeGuard(b, 0);\n    }\n    else if (t == TYPE_LIST) {\n      r = TypeList(b, 0);\n    }\n    else if (t == TYPE_REFERENCE_EXPRESSION) {\n      r = TypeReferenceExpression(b, 0);\n    }\n    else if (t == TYPE_SPEC) {\n      r = TypeSpec(b, 0);\n    }\n    else if (t == TYPE_SWITCH_GUARD) {\n      r = TypeSwitchGuard(b, 0);\n    }\n    else if (t == TYPE_SWITCH_STATEMENT) {\n      r = TypeSwitchStatement(b, 0);\n    }\n    else if (t == VALUE) {\n      r = Value(b, 0);\n    }\n    else if (t == VAR_DECLARATION) {\n      r = VarDeclaration(b, 0);\n    }\n    else if (t == VAR_DEFINITION) {\n      r = VarDefinition(b, 0);\n    }\n    else if (t == VAR_SPEC) {\n      r = VarSpec(b, 0);\n    }\n    else if (t == ASSIGN_OP) {\n      r = assign_op(b, 0);\n    }\n    else {\n      r = parse_root_(t, b, 0);\n    }\n    exit_section_(b, 0, m, t, r, true, TRUE_CONDITION);\n  }\n\n  protected boolean parse_root_(IElementType t, PsiBuilder b, int l) {\n    return File(b, l + 1);\n  }\n\n  public static final TokenSet[] EXTENDS_SETS_ = new TokenSet[] {\n    create_token_set_(ARGUMENT_LIST, BUILTIN_ARGUMENT_LIST),\n    create_token_set_(RANGE_CLAUSE, RECV_STATEMENT, SHORT_VAR_DECLARATION, VAR_SPEC),\n    create_token_set_(ARRAY_OR_SLICE_TYPE, CHANNEL_TYPE, FUNCTION_TYPE, INTERFACE_TYPE,\n      MAP_TYPE, PAR_TYPE, POINTER_TYPE, STRUCT_TYPE,\n      TYPE, TYPE_LIST),\n    create_token_set_(ASSIGNMENT_STATEMENT, BREAK_STATEMENT, CONTINUE_STATEMENT, DEFER_STATEMENT,\n      ELSE_STATEMENT, EXPR_SWITCH_STATEMENT, FALLTHROUGH_STATEMENT, FOR_STATEMENT,\n      GOTO_STATEMENT, GO_STATEMENT, IF_STATEMENT, INC_DEC_STATEMENT,\n      LABELED_STATEMENT, RETURN_STATEMENT, SELECT_STATEMENT, SEND_STATEMENT,\n      SIMPLE_STATEMENT, STATEMENT, SWITCH_STATEMENT, TYPE_SWITCH_STATEMENT),\n    create_token_set_(ADD_EXPR, AND_EXPR, BUILTIN_CALL_EXPR, CALL_EXPR,\n      COMPOSITE_LIT, CONDITIONAL_EXPR, CONVERSION_EXPR, EXPRESSION,\n      FUNCTION_LIT, INDEX_OR_SLICE_EXPR, LITERAL, LITERAL_TYPE_EXPR,\n      MUL_EXPR, OR_EXPR, PARENTHESES_EXPR, REFERENCE_EXPRESSION,\n      SELECTOR_EXPR, STRING_LITERAL, TYPE_ASSERTION_EXPR, UNARY_EXPR),\n  };\n\n  /* ********************************************************** */\n  // '+' | '-' | '|' | '^'\n  static boolean AddOp(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"AddOp\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = consumeToken(b, PLUS);\n    if (!r) r = consumeToken(b, MINUS);\n    if (!r) r = consumeToken(b, BIT_OR);\n    if (!r) r = consumeToken(b, BIT_XOR);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // Type\n  public static boolean AnonymousFieldDefinition(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"AnonymousFieldDefinition\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _NONE_, ANONYMOUS_FIELD_DEFINITION, \"<anonymous field definition>\");\n    r = Type(b, l + 1);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // '(' [ ExpressionArgList '...'? ','? ] ')'\n  public static boolean ArgumentList(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ArgumentList\")) return false;\n    if (!nextTokenIs(b, LPAREN)) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_, ARGUMENT_LIST, null);\n    r = consumeToken(b, LPAREN);\n    p = r; // pin = 1\n    r = r && report_error_(b, ArgumentList_1(b, l + 1));\n    r = p && consumeToken(b, RPAREN) && r;\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // [ ExpressionArgList '...'? ','? ]\n  private static boolean ArgumentList_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ArgumentList_1\")) return false;\n    ArgumentList_1_0(b, l + 1);\n    return true;\n  }\n\n  // ExpressionArgList '...'? ','?\n  private static boolean ArgumentList_1_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ArgumentList_1_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = ExpressionArgList(b, l + 1);\n    r = r && ArgumentList_1_0_1(b, l + 1);\n    r = r && ArgumentList_1_0_2(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // '...'?\n  private static boolean ArgumentList_1_0_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ArgumentList_1_0_1\")) return false;\n    consumeToken(b, TRIPLE_DOT);\n    return true;\n  }\n\n  // ','?\n  private static boolean ArgumentList_1_0_2(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ArgumentList_1_0_2\")) return false;\n    consumeToken(b, COMMA);\n    return true;\n  }\n\n  /* ********************************************************** */\n  // '[' ('...'|Expression?) ']' Type\n  public static boolean ArrayOrSliceType(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ArrayOrSliceType\")) return false;\n    if (!nextTokenIs(b, LBRACK)) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_, ARRAY_OR_SLICE_TYPE, null);\n    r = consumeToken(b, LBRACK);\n    p = r; // pin = 1\n    r = r && report_error_(b, ArrayOrSliceType_1(b, l + 1));\n    r = p && report_error_(b, consumeToken(b, RBRACK)) && r;\n    r = p && Type(b, l + 1) && r;\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // '...'|Expression?\n  private static boolean ArrayOrSliceType_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ArrayOrSliceType_1\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = consumeToken(b, TRIPLE_DOT);\n    if (!r) r = ArrayOrSliceType_1_1(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // Expression?\n  private static boolean ArrayOrSliceType_1_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ArrayOrSliceType_1_1\")) return false;\n    Expression(b, l + 1, -1);\n    return true;\n  }\n\n  /* ********************************************************** */\n  // assign_op ExpressionList\n  public static boolean AssignmentStatement(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"AssignmentStatement\")) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _LEFT_, ASSIGNMENT_STATEMENT, \"<assignment statement>\");\n    r = assign_op(b, l + 1);\n    p = r; // pin = 1\n    r = r && ExpressionList(b, l + 1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  /* ********************************************************** */\n  // BlockInner\n  public static boolean Block(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"Block\")) return false;\n    if (!nextTokenIs(b, LBRACE)) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = BlockInner(b, l + 1);\n    exit_section_(b, m, BLOCK, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // '{' ('}' | (<<withOff Statements \"BLOCK?\" \"PAR\">> | (!() Statements)) '}')\n  static boolean BlockInner(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"BlockInner\")) return false;\n    if (!nextTokenIs(b, LBRACE)) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = consumeToken(b, LBRACE);\n    p = r; // pin = 1\n    r = r && BlockInner_1(b, l + 1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // '}' | (<<withOff Statements \"BLOCK?\" \"PAR\">> | (!() Statements)) '}'\n  private static boolean BlockInner_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"BlockInner_1\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = consumeToken(b, RBRACE);\n    if (!r) r = BlockInner_1_1(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // (<<withOff Statements \"BLOCK?\" \"PAR\">> | (!() Statements)) '}'\n  private static boolean BlockInner_1_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"BlockInner_1_1\")) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = BlockInner_1_1_0(b, l + 1);\n    p = r; // pin = 1\n    r = r && consumeToken(b, RBRACE);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // <<withOff Statements \"BLOCK?\" \"PAR\">> | (!() Statements)\n  private static boolean BlockInner_1_1_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"BlockInner_1_1_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = withOff(b, l + 1, Statements_parser_, \"BLOCK?\", \"PAR\");\n    if (!r) r = BlockInner_1_1_0_1(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // !() Statements\n  private static boolean BlockInner_1_1_0_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"BlockInner_1_1_0_1\")) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = BlockInner_1_1_0_1_0(b, l + 1);\n    p = r; // pin = 1\n    r = r && Statements(b, l + 1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // !()\n  private static boolean BlockInner_1_1_0_1_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"BlockInner_1_1_0_1_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _NOT_);\n    r = !BlockInner_1_1_0_1_0_0(b, l + 1);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  // ()\n  private static boolean BlockInner_1_1_0_1_0_0(PsiBuilder b, int l) {\n    return true;\n  }\n\n  /* ********************************************************** */\n  // <<consumeBlock>> | BlockInner\n  public static boolean BlockWithConsume(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"BlockWithConsume\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _COLLAPSE_, BLOCK, \"<block with consume>\");\n    r = consumeBlock(b, l + 1);\n    if (!r) r = BlockInner(b, l + 1);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // break LabelRef?\n  public static boolean BreakStatement(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"BreakStatement\")) return false;\n    if (!nextTokenIs(b, BREAK)) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_, BREAK_STATEMENT, null);\n    r = consumeToken(b, BREAK);\n    p = r; // pin = 1\n    r = r && BreakStatement_1(b, l + 1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // LabelRef?\n  private static boolean BreakStatement_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"BreakStatement_1\")) return false;\n    LabelRef(b, l + 1);\n    return true;\n  }\n\n  /* ********************************************************** */\n  // Type [ ',' BuiltinArgsTail ] | BuiltinArgsTail\n  static boolean BuiltinArgsInner(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"BuiltinArgsInner\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = BuiltinArgsInner_0(b, l + 1);\n    if (!r) r = BuiltinArgsTail(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // Type [ ',' BuiltinArgsTail ]\n  private static boolean BuiltinArgsInner_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"BuiltinArgsInner_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = Type(b, l + 1);\n    r = r && BuiltinArgsInner_0_1(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // [ ',' BuiltinArgsTail ]\n  private static boolean BuiltinArgsInner_0_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"BuiltinArgsInner_0_1\")) return false;\n    BuiltinArgsInner_0_1_0(b, l + 1);\n    return true;\n  }\n\n  // ',' BuiltinArgsTail\n  private static boolean BuiltinArgsInner_0_1_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"BuiltinArgsInner_0_1_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = consumeToken(b, COMMA);\n    r = r && BuiltinArgsTail(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // ExpressionList '...'?\n  static boolean BuiltinArgsTail(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"BuiltinArgsTail\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = ExpressionList(b, l + 1);\n    r = r && BuiltinArgsTail_1(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // '...'?\n  private static boolean BuiltinArgsTail_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"BuiltinArgsTail_1\")) return false;\n    consumeToken(b, TRIPLE_DOT);\n    return true;\n  }\n\n  /* ********************************************************** */\n  // '(' [ BuiltinArgsInner ','? ] ')'\n  public static boolean BuiltinArgumentList(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"BuiltinArgumentList\")) return false;\n    if (!nextTokenIs(b, LPAREN)) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_, BUILTIN_ARGUMENT_LIST, null);\n    r = consumeToken(b, LPAREN);\n    p = r; // pin = 1\n    r = r && report_error_(b, BuiltinArgumentList_1(b, l + 1));\n    r = p && consumeToken(b, RPAREN) && r;\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // [ BuiltinArgsInner ','? ]\n  private static boolean BuiltinArgumentList_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"BuiltinArgumentList_1\")) return false;\n    BuiltinArgumentList_1_0(b, l + 1);\n    return true;\n  }\n\n  // BuiltinArgsInner ','?\n  private static boolean BuiltinArgumentList_1_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"BuiltinArgumentList_1_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = BuiltinArgsInner(b, l + 1);\n    r = r && BuiltinArgumentList_1_0_1(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // ','?\n  private static boolean BuiltinArgumentList_1_0_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"BuiltinArgumentList_1_0_1\")) return false;\n    consumeToken(b, COMMA);\n    return true;\n  }\n\n  /* ********************************************************** */\n  // chan '<-'? | '<-' chan\n  static boolean ChanTypePrefix(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ChanTypePrefix\")) return false;\n    if (!nextTokenIs(b, \"\", SEND_CHANNEL, CHAN)) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = ChanTypePrefix_0(b, l + 1);\n    if (!r) r = ChanTypePrefix_1(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // chan '<-'?\n  private static boolean ChanTypePrefix_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ChanTypePrefix_0\")) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = consumeToken(b, CHAN);\n    p = r; // pin = 1\n    r = r && ChanTypePrefix_0_1(b, l + 1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // '<-'?\n  private static boolean ChanTypePrefix_0_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ChanTypePrefix_0_1\")) return false;\n    consumeToken(b, SEND_CHANNEL);\n    return true;\n  }\n\n  // '<-' chan\n  private static boolean ChanTypePrefix_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ChanTypePrefix_1\")) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = consumeToken(b, SEND_CHANNEL);\n    p = r; // pin = 1\n    r = r && consumeToken(b, CHAN);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  /* ********************************************************** */\n  // ChanTypePrefix Type\n  public static boolean ChannelType(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ChannelType\")) return false;\n    if (!nextTokenIs(b, \"<channel type>\", SEND_CHANNEL, CHAN)) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _COLLAPSE_, CHANNEL_TYPE, \"<channel type>\");\n    r = ChanTypePrefix(b, l + 1);\n    p = r; // pin = 1\n    r = r && Type(b, l + 1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  /* ********************************************************** */\n  // case ( Expression SendStatement | RecvStatement ) | default\n  public static boolean CommCase(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"CommCase\")) return false;\n    if (!nextTokenIs(b, \"<comm case>\", CASE, DEFAULT)) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _NONE_, COMM_CASE, \"<comm case>\");\n    r = CommCase_0(b, l + 1);\n    if (!r) r = consumeToken(b, DEFAULT);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  // case ( Expression SendStatement | RecvStatement )\n  private static boolean CommCase_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"CommCase_0\")) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = consumeToken(b, CASE);\n    p = r; // pin = case\n    r = r && CommCase_0_1(b, l + 1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // Expression SendStatement | RecvStatement\n  private static boolean CommCase_0_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"CommCase_0_1\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = CommCase_0_1_0(b, l + 1);\n    if (!r) r = RecvStatement(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // Expression SendStatement\n  private static boolean CommCase_0_1_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"CommCase_0_1_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = Expression(b, l + 1, -1);\n    r = r && SendStatement(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // CommCase ':' Statements?\n  public static boolean CommClause(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"CommClause\")) return false;\n    if (!nextTokenIs(b, \"<comm clause>\", CASE, DEFAULT)) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_, COMM_CLAUSE, \"<comm clause>\");\n    r = CommCase(b, l + 1);\n    p = r; // pin = 1\n    r = r && report_error_(b, consumeToken(b, COLON));\n    r = p && CommClause_2(b, l + 1) && r;\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // Statements?\n  private static boolean CommClause_2(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"CommClause_2\")) return false;\n    Statements(b, l + 1);\n    return true;\n  }\n\n  /* ********************************************************** */\n  // <<enterMode \"BLOCK?\">> SimpleStatementOpt Expression? <<exitModeSafe \"BLOCK?\">>\n  static boolean Condition(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"Condition\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = enterMode(b, l + 1, \"BLOCK?\");\n    r = r && SimpleStatementOpt(b, l + 1);\n    r = r && Condition_2(b, l + 1);\n    r = r && exitModeSafe(b, l + 1, \"BLOCK?\");\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // Expression?\n  private static boolean Condition_2(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"Condition_2\")) return false;\n    Expression(b, l + 1, -1);\n    return true;\n  }\n\n  /* ********************************************************** */\n  // const ( ConstSpec | '(' ConstSpecs? ')' )\n  public static boolean ConstDeclaration(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ConstDeclaration\")) return false;\n    if (!nextTokenIs(b, CONST)) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_, CONST_DECLARATION, null);\n    r = consumeToken(b, CONST);\n    p = r; // pin = 1\n    r = r && ConstDeclaration_1(b, l + 1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // ConstSpec | '(' ConstSpecs? ')'\n  private static boolean ConstDeclaration_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ConstDeclaration_1\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = ConstSpec(b, l + 1);\n    if (!r) r = ConstDeclaration_1_1(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // '(' ConstSpecs? ')'\n  private static boolean ConstDeclaration_1_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ConstDeclaration_1_1\")) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = consumeToken(b, LPAREN);\n    p = r; // pin = 1\n    r = r && report_error_(b, ConstDeclaration_1_1_1(b, l + 1));\n    r = p && consumeToken(b, RPAREN) && r;\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // ConstSpecs?\n  private static boolean ConstDeclaration_1_1_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ConstDeclaration_1_1_1\")) return false;\n    ConstSpecs(b, l + 1);\n    return true;\n  }\n\n  /* ********************************************************** */\n  // identifier\n  public static boolean ConstDefinition(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ConstDefinition\")) return false;\n    if (!nextTokenIs(b, IDENTIFIER)) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = consumeToken(b, IDENTIFIER);\n    exit_section_(b, m, CONST_DEFINITION, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // ConstDefinition ( ',' ConstDefinition )*\n  static boolean ConstDefinitionList(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ConstDefinitionList\")) return false;\n    if (!nextTokenIs(b, IDENTIFIER)) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = ConstDefinition(b, l + 1);\n    p = r; // pin = 1\n    r = r && ConstDefinitionList_1(b, l + 1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // ( ',' ConstDefinition )*\n  private static boolean ConstDefinitionList_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ConstDefinitionList_1\")) return false;\n    int c = current_position_(b);\n    while (true) {\n      if (!ConstDefinitionList_1_0(b, l + 1)) break;\n      if (!empty_element_parsed_guard_(b, \"ConstDefinitionList_1\", c)) break;\n      c = current_position_(b);\n    }\n    return true;\n  }\n\n  // ',' ConstDefinition\n  private static boolean ConstDefinitionList_1_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ConstDefinitionList_1_0\")) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = consumeToken(b, COMMA);\n    p = r; // pin = 1\n    r = r && ConstDefinition(b, l + 1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  /* ********************************************************** */\n  // ConstDefinitionList [ ('=' ExpressionList | Type '=' ExpressionList) ]\n  public static boolean ConstSpec(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ConstSpec\")) return false;\n    if (!nextTokenIs(b, IDENTIFIER)) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_, CONST_SPEC, null);\n    r = ConstDefinitionList(b, l + 1);\n    p = r; // pin = 1\n    r = r && ConstSpec_1(b, l + 1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // [ ('=' ExpressionList | Type '=' ExpressionList) ]\n  private static boolean ConstSpec_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ConstSpec_1\")) return false;\n    ConstSpec_1_0(b, l + 1);\n    return true;\n  }\n\n  // '=' ExpressionList | Type '=' ExpressionList\n  private static boolean ConstSpec_1_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ConstSpec_1_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = ConstSpec_1_0_0(b, l + 1);\n    if (!r) r = ConstSpec_1_0_1(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // '=' ExpressionList\n  private static boolean ConstSpec_1_0_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ConstSpec_1_0_0\")) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = consumeToken(b, ASSIGN);\n    p = r; // pin = 1\n    r = r && ExpressionList(b, l + 1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // Type '=' ExpressionList\n  private static boolean ConstSpec_1_0_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ConstSpec_1_0_1\")) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = Type(b, l + 1);\n    p = r; // pin = 1\n    r = r && report_error_(b, consumeToken(b, ASSIGN));\n    r = p && ExpressionList(b, l + 1) && r;\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  /* ********************************************************** */\n  // ConstSpec (semi ConstSpec)* semi?\n  static boolean ConstSpecs(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ConstSpecs\")) return false;\n    if (!nextTokenIs(b, IDENTIFIER)) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = ConstSpec(b, l + 1);\n    p = r; // pin = 1\n    r = r && report_error_(b, ConstSpecs_1(b, l + 1));\n    r = p && ConstSpecs_2(b, l + 1) && r;\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // (semi ConstSpec)*\n  private static boolean ConstSpecs_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ConstSpecs_1\")) return false;\n    int c = current_position_(b);\n    while (true) {\n      if (!ConstSpecs_1_0(b, l + 1)) break;\n      if (!empty_element_parsed_guard_(b, \"ConstSpecs_1\", c)) break;\n      c = current_position_(b);\n    }\n    return true;\n  }\n\n  // semi ConstSpec\n  private static boolean ConstSpecs_1_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ConstSpecs_1_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = semi(b, l + 1);\n    r = r && ConstSpec(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // semi?\n  private static boolean ConstSpecs_2(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ConstSpecs_2\")) return false;\n    semi(b, l + 1);\n    return true;\n  }\n\n  /* ********************************************************** */\n  // continue LabelRef?\n  public static boolean ContinueStatement(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ContinueStatement\")) return false;\n    if (!nextTokenIs(b, CONTINUE)) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_, CONTINUE_STATEMENT, null);\n    r = consumeToken(b, CONTINUE);\n    p = r; // pin = 1\n    r = r && ContinueStatement_1(b, l + 1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // LabelRef?\n  private static boolean ContinueStatement_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ContinueStatement_1\")) return false;\n    LabelRef(b, l + 1);\n    return true;\n  }\n\n  /* ********************************************************** */\n  // ConversionStart | '(' ConversionStart\n  static boolean ConversionPredicate(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ConversionPredicate\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = ConversionStart(b, l + 1);\n    if (!r) r = ConversionPredicate_1(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // '(' ConversionStart\n  private static boolean ConversionPredicate_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ConversionPredicate_1\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = consumeToken(b, LPAREN);\n    r = r && ConversionStart(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // '*' | '<-' | '[' | chan | func | interface | map | struct\n  static boolean ConversionStart(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ConversionStart\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = consumeToken(b, MUL);\n    if (!r) r = consumeToken(b, SEND_CHANNEL);\n    if (!r) r = consumeToken(b, LBRACK);\n    if (!r) r = consumeToken(b, CHAN);\n    if (!r) r = consumeToken(b, FUNC);\n    if (!r) r = consumeToken(b, INTERFACE);\n    if (!r) r = consumeToken(b, MAP);\n    if (!r) r = consumeToken(b, STRUCT);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // '(' Expression ','? ')'\n  static boolean ConversionTail(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ConversionTail\")) return false;\n    if (!nextTokenIs(b, LPAREN)) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = consumeToken(b, LPAREN);\n    p = r; // pin = 1\n    r = r && report_error_(b, Expression(b, l + 1, -1));\n    r = p && report_error_(b, ConversionTail_2(b, l + 1)) && r;\n    r = p && consumeToken(b, RPAREN) && r;\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // ','?\n  private static boolean ConversionTail_2(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ConversionTail_2\")) return false;\n    consumeToken(b, COMMA);\n    return true;\n  }\n\n  /* ********************************************************** */\n  // defer Expression\n  public static boolean DeferStatement(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"DeferStatement\")) return false;\n    if (!nextTokenIs(b, DEFER)) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_, DEFER_STATEMENT, null);\n    r = consumeToken(b, DEFER);\n    p = r; // pin = 1\n    r = r && Expression(b, l + 1, -1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  /* ********************************************************** */\n  // <<withOn \"PAR\" Element>> | (!() Element)\n  static boolean E(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"E\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = withOn(b, l + 1, \"PAR\", Element_parser_);\n    if (!r) r = E_1(b, l + 1);\n    exit_section_(b, l, m, r, false, E_recover_parser_);\n    return r;\n  }\n\n  // !() Element\n  private static boolean E_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"E_1\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = E_1_0(b, l + 1);\n    r = r && Element(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // !()\n  private static boolean E_1_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"E_1_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _NOT_);\n    r = !E_1_0_0(b, l + 1);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  // ()\n  private static boolean E_1_0_0(PsiBuilder b, int l) {\n    return true;\n  }\n\n  /* ********************************************************** */\n  // !('}'|',')\n  static boolean E_recover(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"E_recover\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _NOT_);\n    r = !E_recover_0(b, l + 1);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  // '}'|','\n  private static boolean E_recover_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"E_recover_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = consumeToken(b, RBRACE);\n    if (!r) r = consumeToken(b, COMMA);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // First [':' Value]\n  public static boolean Element(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"Element\")) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_, ELEMENT, \"<element>\");\n    r = First(b, l + 1);\n    p = r; // pin = 1\n    r = r && Element_1(b, l + 1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // [':' Value]\n  private static boolean Element_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"Element_1\")) return false;\n    Element_1_0(b, l + 1);\n    return true;\n  }\n\n  // ':' Value\n  private static boolean Element_1_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"Element_1_0\")) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = consumeToken(b, COLON);\n    p = r; // pin = 1\n    r = r && Value(b, l + 1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  /* ********************************************************** */\n  // E ( ',' E? )*\n  static boolean ElementList(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ElementList\")) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = E(b, l + 1);\n    p = r; // pin = 1\n    r = r && ElementList_1(b, l + 1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // ( ',' E? )*\n  private static boolean ElementList_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ElementList_1\")) return false;\n    int c = current_position_(b);\n    while (true) {\n      if (!ElementList_1_0(b, l + 1)) break;\n      if (!empty_element_parsed_guard_(b, \"ElementList_1\", c)) break;\n      c = current_position_(b);\n    }\n    return true;\n  }\n\n  // ',' E?\n  private static boolean ElementList_1_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ElementList_1_0\")) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = consumeToken(b, COMMA);\n    p = r; // pin = 1\n    r = r && ElementList_1_0_1(b, l + 1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // E?\n  private static boolean ElementList_1_0_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ElementList_1_0_1\")) return false;\n    E(b, l + 1);\n    return true;\n  }\n\n  /* ********************************************************** */\n  // else (IfStatement | Block)\n  public static boolean ElseStatement(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ElseStatement\")) return false;\n    if (!nextTokenIs(b, ELSE)) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_, ELSE_STATEMENT, null);\n    r = consumeToken(b, ELSE);\n    p = r; // pin = 1\n    r = r && ElseStatement_1(b, l + 1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // IfStatement | Block\n  private static boolean ElseStatement_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ElseStatement_1\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = IfStatement(b, l + 1);\n    if (!r) r = Block(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // !'}' ExprSwitchCase ':' Statements?\n  public static boolean ExprCaseClause(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ExprCaseClause\")) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_, EXPR_CASE_CLAUSE, \"<expr case clause>\");\n    r = ExprCaseClause_0(b, l + 1);\n    p = r; // pin = 1\n    r = r && report_error_(b, ExprSwitchCase(b, l + 1));\n    r = p && report_error_(b, consumeToken(b, COLON)) && r;\n    r = p && ExprCaseClause_3(b, l + 1) && r;\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // !'}'\n  private static boolean ExprCaseClause_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ExprCaseClause_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _NOT_);\n    r = !consumeToken(b, RBRACE);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  // Statements?\n  private static boolean ExprCaseClause_3(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ExprCaseClause_3\")) return false;\n    Statements(b, l + 1);\n    return true;\n  }\n\n  /* ********************************************************** */\n  // case ExpressionList | default\n  static boolean ExprSwitchCase(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ExprSwitchCase\")) return false;\n    if (!nextTokenIs(b, \"\", CASE, DEFAULT)) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = ExprSwitchCase_0(b, l + 1);\n    if (!r) r = consumeToken(b, DEFAULT);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // case ExpressionList\n  private static boolean ExprSwitchCase_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ExprSwitchCase_0\")) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = consumeToken(b, CASE);\n    p = r; // pin = 1\n    r = r && ExpressionList(b, l + 1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  /* ********************************************************** */\n  // Condition '{' ExprCaseClause* '}'\n  public static boolean ExprSwitchStatement(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ExprSwitchStatement\")) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _LEFT_, EXPR_SWITCH_STATEMENT, \"<expr switch statement>\");\n    r = Condition(b, l + 1);\n    r = r && consumeToken(b, LBRACE);\n    p = r; // pin = 2\n    r = r && report_error_(b, ExprSwitchStatement_2(b, l + 1));\n    r = p && consumeToken(b, RBRACE) && r;\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // ExprCaseClause*\n  private static boolean ExprSwitchStatement_2(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ExprSwitchStatement_2\")) return false;\n    int c = current_position_(b);\n    while (true) {\n      if (!ExprCaseClause(b, l + 1)) break;\n      if (!empty_element_parsed_guard_(b, \"ExprSwitchStatement_2\", c)) break;\n      c = current_position_(b);\n    }\n    return true;\n  }\n\n  /* ********************************************************** */\n  // ExpressionOrTypeWithRecover2 (',' (ExpressionOrTypeWithRecover2 | &')'))*\n  static boolean ExpressionArgList(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ExpressionArgList\")) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = ExpressionOrTypeWithRecover2(b, l + 1);\n    p = r; // pin = 1\n    r = r && ExpressionArgList_1(b, l + 1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // (',' (ExpressionOrTypeWithRecover2 | &')'))*\n  private static boolean ExpressionArgList_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ExpressionArgList_1\")) return false;\n    int c = current_position_(b);\n    while (true) {\n      if (!ExpressionArgList_1_0(b, l + 1)) break;\n      if (!empty_element_parsed_guard_(b, \"ExpressionArgList_1\", c)) break;\n      c = current_position_(b);\n    }\n    return true;\n  }\n\n  // ',' (ExpressionOrTypeWithRecover2 | &')')\n  private static boolean ExpressionArgList_1_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ExpressionArgList_1_0\")) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = consumeToken(b, COMMA);\n    p = r; // pin = 1\n    r = r && ExpressionArgList_1_0_1(b, l + 1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // ExpressionOrTypeWithRecover2 | &')'\n  private static boolean ExpressionArgList_1_0_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ExpressionArgList_1_0_1\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = ExpressionOrTypeWithRecover2(b, l + 1);\n    if (!r) r = ExpressionArgList_1_0_1_1(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // &')'\n  private static boolean ExpressionArgList_1_0_1_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ExpressionArgList_1_0_1_1\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _AND_);\n    r = consumeToken(b, RPAREN);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // ExpressionWithRecover (',' (ExpressionWithRecover | &')'))*\n  static boolean ExpressionList(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ExpressionList\")) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = ExpressionWithRecover(b, l + 1);\n    p = r; // pin = 1\n    r = r && ExpressionList_1(b, l + 1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // (',' (ExpressionWithRecover | &')'))*\n  private static boolean ExpressionList_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ExpressionList_1\")) return false;\n    int c = current_position_(b);\n    while (true) {\n      if (!ExpressionList_1_0(b, l + 1)) break;\n      if (!empty_element_parsed_guard_(b, \"ExpressionList_1\", c)) break;\n      c = current_position_(b);\n    }\n    return true;\n  }\n\n  // ',' (ExpressionWithRecover | &')')\n  private static boolean ExpressionList_1_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ExpressionList_1_0\")) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = consumeToken(b, COMMA);\n    p = r; // pin = 1\n    r = r && ExpressionList_1_0_1(b, l + 1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // ExpressionWithRecover | &')'\n  private static boolean ExpressionList_1_0_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ExpressionList_1_0_1\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = ExpressionWithRecover(b, l + 1);\n    if (!r) r = ExpressionList_1_0_1_1(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // &')'\n  private static boolean ExpressionList_1_0_1_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ExpressionList_1_0_1_1\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _AND_);\n    r = consumeToken(b, RPAREN);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // !('!' | '!=' | '%' | '%=' | '&&' | '&' | '&=' | '&^' | '&^=' | '(' | ')' | '*' | '*=' | '+' | '++' | '+=' | ',' | '-' | '--' | '-=' | '...' | '/' | '/=' | ':' | ';' | '<' | '<-' | '<<' | '<<=' | '<=' | '<NL>' | '=' | '==' | '>' | '>=' | '>>' | '>>=' | '[' | ']' | '^' | '^=' | 'type' | '{' | '|' | '|=' | '||' | '}' | break | case | chan | char | const | continue | decimali | default | defer | else | fallthrough | float | floati | for | func | go | goto | hex | identifier | if | int | interface | map | oct | return | select | string | raw_string | struct | switch | var)\n  static boolean ExpressionListRecover(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ExpressionListRecover\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _NOT_);\n    r = !ExpressionListRecover_0(b, l + 1);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  // '!' | '!=' | '%' | '%=' | '&&' | '&' | '&=' | '&^' | '&^=' | '(' | ')' | '*' | '*=' | '+' | '++' | '+=' | ',' | '-' | '--' | '-=' | '...' | '/' | '/=' | ':' | ';' | '<' | '<-' | '<<' | '<<=' | '<=' | '<NL>' | '=' | '==' | '>' | '>=' | '>>' | '>>=' | '[' | ']' | '^' | '^=' | 'type' | '{' | '|' | '|=' | '||' | '}' | break | case | chan | char | const | continue | decimali | default | defer | else | fallthrough | float | floati | for | func | go | goto | hex | identifier | if | int | interface | map | oct | return | select | string | raw_string | struct | switch | var\n  private static boolean ExpressionListRecover_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ExpressionListRecover_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = consumeToken(b, NOT);\n    if (!r) r = consumeToken(b, NOT_EQ);\n    if (!r) r = consumeToken(b, REMAINDER);\n    if (!r) r = consumeToken(b, REMAINDER_ASSIGN);\n    if (!r) r = consumeToken(b, COND_AND);\n    if (!r) r = consumeToken(b, BIT_AND);\n    if (!r) r = consumeToken(b, BIT_AND_ASSIGN);\n    if (!r) r = consumeToken(b, BIT_CLEAR);\n    if (!r) r = consumeToken(b, BIT_CLEAR_ASSIGN);\n    if (!r) r = consumeToken(b, LPAREN);\n    if (!r) r = consumeToken(b, RPAREN);\n    if (!r) r = consumeToken(b, MUL);\n    if (!r) r = consumeToken(b, MUL_ASSIGN);\n    if (!r) r = consumeToken(b, PLUS);\n    if (!r) r = consumeToken(b, PLUS_PLUS);\n    if (!r) r = consumeToken(b, PLUS_ASSIGN);\n    if (!r) r = consumeToken(b, COMMA);\n    if (!r) r = consumeToken(b, MINUS);\n    if (!r) r = consumeToken(b, MINUS_MINUS);\n    if (!r) r = consumeToken(b, MINUS_ASSIGN);\n    if (!r) r = consumeToken(b, TRIPLE_DOT);\n    if (!r) r = consumeToken(b, QUOTIENT);\n    if (!r) r = consumeToken(b, QUOTIENT_ASSIGN);\n    if (!r) r = consumeToken(b, COLON);\n    if (!r) r = consumeToken(b, SEMICOLON);\n    if (!r) r = consumeToken(b, LESS);\n    if (!r) r = consumeToken(b, SEND_CHANNEL);\n    if (!r) r = consumeToken(b, SHIFT_LEFT);\n    if (!r) r = consumeToken(b, SHIFT_LEFT_ASSIGN);\n    if (!r) r = consumeToken(b, LESS_OR_EQUAL);\n    if (!r) r = consumeToken(b, SEMICOLON_SYNTHETIC);\n    if (!r) r = consumeToken(b, ASSIGN);\n    if (!r) r = consumeToken(b, EQ);\n    if (!r) r = consumeToken(b, GREATER);\n    if (!r) r = consumeToken(b, GREATER_OR_EQUAL);\n    if (!r) r = consumeToken(b, SHIFT_RIGHT);\n    if (!r) r = consumeToken(b, SHIFT_RIGHT_ASSIGN);\n    if (!r) r = consumeToken(b, LBRACK);\n    if (!r) r = consumeToken(b, RBRACK);\n    if (!r) r = consumeToken(b, BIT_XOR);\n    if (!r) r = consumeToken(b, BIT_XOR_ASSIGN);\n    if (!r) r = consumeToken(b, TYPE_);\n    if (!r) r = consumeToken(b, LBRACE);\n    if (!r) r = consumeToken(b, BIT_OR);\n    if (!r) r = consumeToken(b, BIT_OR_ASSIGN);\n    if (!r) r = consumeToken(b, COND_OR);\n    if (!r) r = consumeToken(b, RBRACE);\n    if (!r) r = consumeToken(b, BREAK);\n    if (!r) r = consumeToken(b, CASE);\n    if (!r) r = consumeToken(b, CHAN);\n    if (!r) r = consumeToken(b, CHAR);\n    if (!r) r = consumeToken(b, CONST);\n    if (!r) r = consumeToken(b, CONTINUE);\n    if (!r) r = consumeToken(b, DECIMALI);\n    if (!r) r = consumeToken(b, DEFAULT);\n    if (!r) r = consumeToken(b, DEFER);\n    if (!r) r = consumeToken(b, ELSE);\n    if (!r) r = consumeToken(b, FALLTHROUGH);\n    if (!r) r = consumeToken(b, FLOAT);\n    if (!r) r = consumeToken(b, FLOATI);\n    if (!r) r = consumeToken(b, FOR);\n    if (!r) r = consumeToken(b, FUNC);\n    if (!r) r = consumeToken(b, GO);\n    if (!r) r = consumeToken(b, GOTO);\n    if (!r) r = consumeToken(b, HEX);\n    if (!r) r = consumeToken(b, IDENTIFIER);\n    if (!r) r = consumeToken(b, IF);\n    if (!r) r = consumeToken(b, INT);\n    if (!r) r = consumeToken(b, INTERFACE);\n    if (!r) r = consumeToken(b, MAP);\n    if (!r) r = consumeToken(b, OCT);\n    if (!r) r = consumeToken(b, RETURN);\n    if (!r) r = consumeToken(b, SELECT);\n    if (!r) r = consumeToken(b, STRING);\n    if (!r) r = consumeToken(b, RAW_STRING);\n    if (!r) r = consumeToken(b, STRUCT);\n    if (!r) r = consumeToken(b, SWITCH);\n    if (!r) r = consumeToken(b, VAR);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // Expression | LiteralTypeExpr\n  static boolean ExpressionOrLiteralTypeExpr(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ExpressionOrLiteralTypeExpr\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = Expression(b, l + 1, -1);\n    if (!r) r = LiteralTypeExpr(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // ExpressionOrLiteralTypeExpr\n  static boolean ExpressionOrTypeWithRecover(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ExpressionOrTypeWithRecover\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = ExpressionOrLiteralTypeExpr(b, l + 1);\n    exit_section_(b, l, m, r, false, ExpressionListRecover_parser_);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // <<withOn \"PAR\" ExpressionOrTypeWithRecover>> | (!() ExpressionOrLiteralTypeExpr)\n  static boolean ExpressionOrTypeWithRecover2(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ExpressionOrTypeWithRecover2\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = withOn(b, l + 1, \"PAR\", ExpressionOrTypeWithRecover_parser_);\n    if (!r) r = ExpressionOrTypeWithRecover2_1(b, l + 1);\n    exit_section_(b, l, m, r, false, ExpressionListRecover_parser_);\n    return r;\n  }\n\n  // !() ExpressionOrLiteralTypeExpr\n  private static boolean ExpressionOrTypeWithRecover2_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ExpressionOrTypeWithRecover2_1\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = ExpressionOrTypeWithRecover2_1_0(b, l + 1);\n    r = r && ExpressionOrLiteralTypeExpr(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // !()\n  private static boolean ExpressionOrTypeWithRecover2_1_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ExpressionOrTypeWithRecover2_1_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _NOT_);\n    r = !ExpressionOrTypeWithRecover2_1_0_0(b, l + 1);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  // ()\n  private static boolean ExpressionOrTypeWithRecover2_1_0_0(PsiBuilder b, int l) {\n    return true;\n  }\n\n  /* ********************************************************** */\n  // Expression\n  static boolean ExpressionWithRecover(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ExpressionWithRecover\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = Expression(b, l + 1, -1);\n    exit_section_(b, l, m, r, false, ExpressionListRecover_parser_);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // ExpressionList '=' | VarDefinitionList ':='\n  static boolean ExpressionsOrVariables(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ExpressionsOrVariables\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = ExpressionsOrVariables_0(b, l + 1);\n    if (!r) r = ExpressionsOrVariables_1(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // ExpressionList '='\n  private static boolean ExpressionsOrVariables_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ExpressionsOrVariables_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = ExpressionList(b, l + 1);\n    r = r && consumeToken(b, ASSIGN);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // VarDefinitionList ':='\n  private static boolean ExpressionsOrVariables_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ExpressionsOrVariables_1\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = VarDefinitionList(b, l + 1);\n    r = r && consumeToken(b, VAR_ASSIGN);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // fallthrough\n  public static boolean FallthroughStatement(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"FallthroughStatement\")) return false;\n    if (!nextTokenIs(b, FALLTHROUGH)) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = consumeToken(b, FALLTHROUGH);\n    exit_section_(b, m, FALLTHROUGH_STATEMENT, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // (FieldDefinitionList Type | AnonymousFieldDefinition) Tag?\n  public static boolean FieldDeclaration(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"FieldDeclaration\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _NONE_, FIELD_DECLARATION, \"<field declaration>\");\n    r = FieldDeclaration_0(b, l + 1);\n    r = r && FieldDeclaration_1(b, l + 1);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  // FieldDefinitionList Type | AnonymousFieldDefinition\n  private static boolean FieldDeclaration_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"FieldDeclaration_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = FieldDeclaration_0_0(b, l + 1);\n    if (!r) r = AnonymousFieldDefinition(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // FieldDefinitionList Type\n  private static boolean FieldDeclaration_0_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"FieldDeclaration_0_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = FieldDefinitionList(b, l + 1);\n    r = r && Type(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // Tag?\n  private static boolean FieldDeclaration_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"FieldDeclaration_1\")) return false;\n    Tag(b, l + 1);\n    return true;\n  }\n\n  /* ********************************************************** */\n  // identifier\n  public static boolean FieldDefinition(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"FieldDefinition\")) return false;\n    if (!nextTokenIs(b, IDENTIFIER)) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = consumeToken(b, IDENTIFIER);\n    exit_section_(b, m, FIELD_DEFINITION, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // FieldDefinition (',' FieldDefinition)*\n  static boolean FieldDefinitionList(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"FieldDefinitionList\")) return false;\n    if (!nextTokenIs(b, IDENTIFIER)) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = FieldDefinition(b, l + 1);\n    p = r; // pin = 1\n    r = r && FieldDefinitionList_1(b, l + 1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // (',' FieldDefinition)*\n  private static boolean FieldDefinitionList_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"FieldDefinitionList_1\")) return false;\n    int c = current_position_(b);\n    while (true) {\n      if (!FieldDefinitionList_1_0(b, l + 1)) break;\n      if (!empty_element_parsed_guard_(b, \"FieldDefinitionList_1\", c)) break;\n      c = current_position_(b);\n    }\n    return true;\n  }\n\n  // ',' FieldDefinition\n  private static boolean FieldDefinitionList_1_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"FieldDefinitionList_1_0\")) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = consumeToken(b, COMMA);\n    p = r; // pin = 1\n    r = r && FieldDefinition(b, l + 1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  /* ********************************************************** */\n  // identifier\n  public static boolean FieldName(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"FieldName\")) return false;\n    if (!nextTokenIs(b, IDENTIFIER)) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = consumeToken(b, IDENTIFIER);\n    exit_section_(b, m, FIELD_NAME, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // FieldDeclaration (semi FieldDeclaration)* semi?\n  static boolean Fields(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"Fields\")) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = FieldDeclaration(b, l + 1);\n    p = r; // pin = 1\n    r = r && report_error_(b, Fields_1(b, l + 1));\n    r = p && Fields_2(b, l + 1) && r;\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // (semi FieldDeclaration)*\n  private static boolean Fields_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"Fields_1\")) return false;\n    int c = current_position_(b);\n    while (true) {\n      if (!Fields_1_0(b, l + 1)) break;\n      if (!empty_element_parsed_guard_(b, \"Fields_1\", c)) break;\n      c = current_position_(b);\n    }\n    return true;\n  }\n\n  // semi FieldDeclaration\n  private static boolean Fields_1_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"Fields_1_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = semi(b, l + 1);\n    r = r && FieldDeclaration(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // semi?\n  private static boolean Fields_2(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"Fields_2\")) return false;\n    semi(b, l + 1);\n    return true;\n  }\n\n  /* ********************************************************** */\n  // PackageClause semi ImportList TopLevelDeclaration*\n  static boolean File(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"File\")) return false;\n    if (!nextTokenIs(b, PACKAGE)) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = PackageClause(b, l + 1);\n    p = r; // pin = 1\n    r = r && report_error_(b, semi(b, l + 1));\n    r = p && report_error_(b, ImportList(b, l + 1)) && r;\n    r = p && File_3(b, l + 1) && r;\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // TopLevelDeclaration*\n  private static boolean File_3(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"File_3\")) return false;\n    int c = current_position_(b);\n    while (true) {\n      if (!TopLevelDeclaration(b, l + 1)) break;\n      if (!empty_element_parsed_guard_(b, \"File_3\", c)) break;\n      c = current_position_(b);\n    }\n    return true;\n  }\n\n  /* ********************************************************** */\n  // Key | <<keyOrValueExpression>>\n  static boolean First(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"First\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = Key(b, l + 1);\n    if (!r) r = keyOrValueExpression(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // SimpleStatement? ';' Expression? ';' SimpleStatement?\n  public static boolean ForClause(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ForClause\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _NONE_, FOR_CLAUSE, \"<for clause>\");\n    r = ForClause_0(b, l + 1);\n    r = r && consumeToken(b, SEMICOLON);\n    r = r && ForClause_2(b, l + 1);\n    r = r && consumeToken(b, SEMICOLON);\n    r = r && ForClause_4(b, l + 1);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  // SimpleStatement?\n  private static boolean ForClause_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ForClause_0\")) return false;\n    SimpleStatement(b, l + 1);\n    return true;\n  }\n\n  // Expression?\n  private static boolean ForClause_2(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ForClause_2\")) return false;\n    Expression(b, l + 1, -1);\n    return true;\n  }\n\n  // SimpleStatement?\n  private static boolean ForClause_4(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ForClause_4\")) return false;\n    SimpleStatement(b, l + 1);\n    return true;\n  }\n\n  /* ********************************************************** */\n  // ForClause | RangeClause\n  static boolean ForOrRangeClause(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ForOrRangeClause\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = ForClause(b, l + 1);\n    if (!r) r = RangeClause(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // for <<enterMode \"BLOCK?\">> (ForOrRangeClause Block | Block | Expression Block) <<exitModeSafe \"BLOCK?\">>\n  public static boolean ForStatement(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ForStatement\")) return false;\n    if (!nextTokenIs(b, FOR)) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_, FOR_STATEMENT, null);\n    r = consumeToken(b, FOR);\n    p = r; // pin = for|ForOrRangeClause\n    r = r && report_error_(b, enterMode(b, l + 1, \"BLOCK?\"));\n    r = p && report_error_(b, ForStatement_2(b, l + 1)) && r;\n    r = p && exitModeSafe(b, l + 1, \"BLOCK?\") && r;\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // ForOrRangeClause Block | Block | Expression Block\n  private static boolean ForStatement_2(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ForStatement_2\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = ForStatement_2_0(b, l + 1);\n    if (!r) r = Block(b, l + 1);\n    if (!r) r = ForStatement_2_2(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // ForOrRangeClause Block\n  private static boolean ForStatement_2_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ForStatement_2_0\")) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = ForOrRangeClause(b, l + 1);\n    p = r; // pin = for|ForOrRangeClause\n    r = r && Block(b, l + 1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // Expression Block\n  private static boolean ForStatement_2_2(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ForStatement_2_2\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = Expression(b, l + 1, -1);\n    r = r && Block(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // func identifier Signature BlockWithConsume?\n  public static boolean FunctionDeclaration(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"FunctionDeclaration\")) return false;\n    if (!nextTokenIs(b, FUNC)) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_, FUNCTION_DECLARATION, null);\n    r = consumeTokens(b, 2, FUNC, IDENTIFIER);\n    p = r; // pin = 2\n    r = r && report_error_(b, Signature(b, l + 1));\n    r = p && FunctionDeclaration_3(b, l + 1) && r;\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // BlockWithConsume?\n  private static boolean FunctionDeclaration_3(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"FunctionDeclaration_3\")) return false;\n    BlockWithConsume(b, l + 1);\n    return true;\n  }\n\n  /* ********************************************************** */\n  // func Signature\n  public static boolean FunctionType(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"FunctionType\")) return false;\n    if (!nextTokenIs(b, FUNC)) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_, FUNCTION_TYPE, null);\n    r = consumeToken(b, FUNC);\n    p = r; // pin = 1\n    r = r && Signature(b, l + 1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  /* ********************************************************** */\n  // go Expression\n  public static boolean GoStatement(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"GoStatement\")) return false;\n    if (!nextTokenIs(b, GO)) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_, GO_STATEMENT, null);\n    r = consumeToken(b, GO);\n    p = r; // pin = 1\n    r = r && Expression(b, l + 1, -1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  /* ********************************************************** */\n  // goto LabelRef\n  public static boolean GotoStatement(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"GotoStatement\")) return false;\n    if (!nextTokenIs(b, GOTO)) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_, GOTO_STATEMENT, null);\n    r = consumeToken(b, GOTO);\n    p = r; // pin = 1\n    r = r && LabelRef(b, l + 1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  /* ********************************************************** */\n  // if Condition Block ElseStatement?\n  public static boolean IfStatement(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"IfStatement\")) return false;\n    if (!nextTokenIs(b, IF)) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_, IF_STATEMENT, null);\n    r = consumeToken(b, IF);\n    p = r; // pin = 1\n    r = r && report_error_(b, Condition(b, l + 1));\n    r = p && report_error_(b, Block(b, l + 1)) && r;\n    r = p && IfStatement_3(b, l + 1) && r;\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // ElseStatement?\n  private static boolean IfStatement_3(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"IfStatement_3\")) return false;\n    ElseStatement(b, l + 1);\n    return true;\n  }\n\n  /* ********************************************************** */\n  // import ( ImportSpec | '(' ImportSpecs? ')' )\n  public static boolean ImportDeclaration(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ImportDeclaration\")) return false;\n    if (!nextTokenIs(b, IMPORT)) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_, IMPORT_DECLARATION, null);\n    r = consumeToken(b, IMPORT);\n    p = r; // pin = 1\n    r = r && ImportDeclaration_1(b, l + 1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // ImportSpec | '(' ImportSpecs? ')'\n  private static boolean ImportDeclaration_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ImportDeclaration_1\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = ImportSpec(b, l + 1);\n    if (!r) r = ImportDeclaration_1_1(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // '(' ImportSpecs? ')'\n  private static boolean ImportDeclaration_1_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ImportDeclaration_1_1\")) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = consumeToken(b, LPAREN);\n    p = r; // pin = 1\n    r = r && report_error_(b, ImportDeclaration_1_1_1(b, l + 1));\n    r = p && consumeToken(b, RPAREN) && r;\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // ImportSpecs?\n  private static boolean ImportDeclaration_1_1_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ImportDeclaration_1_1_1\")) return false;\n    ImportSpecs(b, l + 1);\n    return true;\n  }\n\n  /* ********************************************************** */\n  // (ImportDeclaration semi)+|<<emptyImportList>>\n  public static boolean ImportList(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ImportList\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _NONE_, IMPORT_LIST, \"<import list>\");\n    r = ImportList_0(b, l + 1);\n    if (!r) r = emptyImportList(b, l + 1);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  // (ImportDeclaration semi)+\n  private static boolean ImportList_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ImportList_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = ImportList_0_0(b, l + 1);\n    int c = current_position_(b);\n    while (r) {\n      if (!ImportList_0_0(b, l + 1)) break;\n      if (!empty_element_parsed_guard_(b, \"ImportList_0\", c)) break;\n      c = current_position_(b);\n    }\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // ImportDeclaration semi\n  private static boolean ImportList_0_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ImportList_0_0\")) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = ImportDeclaration(b, l + 1);\n    p = r; // pin = 1\n    r = r && semi(b, l + 1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  /* ********************************************************** */\n  // [ '.' | identifier ] ImportString\n  public static boolean ImportSpec(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ImportSpec\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _NONE_, IMPORT_SPEC, \"<import spec>\");\n    r = ImportSpec_0(b, l + 1);\n    r = r && ImportString(b, l + 1);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  // [ '.' | identifier ]\n  private static boolean ImportSpec_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ImportSpec_0\")) return false;\n    ImportSpec_0_0(b, l + 1);\n    return true;\n  }\n\n  // '.' | identifier\n  private static boolean ImportSpec_0_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ImportSpec_0_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = consumeToken(b, DOT);\n    if (!r) r = consumeToken(b, IDENTIFIER);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // ImportSpec (semi ImportSpec)* semi?\n  static boolean ImportSpecs(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ImportSpecs\")) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = ImportSpec(b, l + 1);\n    p = r; // pin = 1\n    r = r && report_error_(b, ImportSpecs_1(b, l + 1));\n    r = p && ImportSpecs_2(b, l + 1) && r;\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // (semi ImportSpec)*\n  private static boolean ImportSpecs_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ImportSpecs_1\")) return false;\n    int c = current_position_(b);\n    while (true) {\n      if (!ImportSpecs_1_0(b, l + 1)) break;\n      if (!empty_element_parsed_guard_(b, \"ImportSpecs_1\", c)) break;\n      c = current_position_(b);\n    }\n    return true;\n  }\n\n  // semi ImportSpec\n  private static boolean ImportSpecs_1_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ImportSpecs_1_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = semi(b, l + 1);\n    r = r && ImportSpec(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // semi?\n  private static boolean ImportSpecs_2(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ImportSpecs_2\")) return false;\n    semi(b, l + 1);\n    return true;\n  }\n\n  /* ********************************************************** */\n  // StringLiteral\n  public static boolean ImportString(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ImportString\")) return false;\n    if (!nextTokenIs(b, \"<import string>\", RAW_STRING, STRING)) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _NONE_, IMPORT_STRING, \"<import string>\");\n    r = StringLiteral(b, l + 1);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // Expression ('++' | '--')\n  public static boolean IncDecStatement(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"IncDecStatement\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _NONE_, INC_DEC_STATEMENT, \"<inc dec statement>\");\n    r = Expression(b, l + 1, -1);\n    r = r && IncDecStatement_1(b, l + 1);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  // '++' | '--'\n  private static boolean IncDecStatement_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"IncDecStatement_1\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = consumeToken(b, PLUS_PLUS);\n    if (!r) r = consumeToken(b, MINUS_MINUS);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // Expression SliceExprBodyInner?\n  static boolean IndexExprBody(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"IndexExprBody\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = Expression(b, l + 1, -1);\n    r = r && IndexExprBody_1(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // SliceExprBodyInner?\n  private static boolean IndexExprBody_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"IndexExprBody_1\")) return false;\n    SliceExprBodyInner(b, l + 1);\n    return true;\n  }\n\n  /* ********************************************************** */\n  // interface '{' MethodSpecs? '}'\n  public static boolean InterfaceType(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"InterfaceType\")) return false;\n    if (!nextTokenIs(b, INTERFACE)) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_, INTERFACE_TYPE, null);\n    r = consumeToken(b, INTERFACE);\n    p = r; // pin = 1\n    r = r && report_error_(b, consumeToken(b, LBRACE));\n    r = p && report_error_(b, InterfaceType_2(b, l + 1)) && r;\n    r = p && consumeToken(b, RBRACE) && r;\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // MethodSpecs?\n  private static boolean InterfaceType_2(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"InterfaceType_2\")) return false;\n    MethodSpecs(b, l + 1);\n    return true;\n  }\n\n  /* ********************************************************** */\n  // (FieldName &':') | !() Expression\n  public static boolean Key(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"Key\")) return false;\n    if (!nextTokenIs(b, IDENTIFIER)) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = Key_0(b, l + 1);\n    if (!r) r = Key_1(b, l + 1);\n    exit_section_(b, m, KEY, r);\n    return r;\n  }\n\n  // FieldName &':'\n  private static boolean Key_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"Key_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = FieldName(b, l + 1);\n    r = r && Key_0_1(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // &':'\n  private static boolean Key_0_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"Key_0_1\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _AND_);\n    r = consumeToken(b, COLON);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  // !() Expression\n  private static boolean Key_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"Key_1\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = Key_1_0(b, l + 1);\n    r = r && Expression(b, l + 1, -1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // !()\n  private static boolean Key_1_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"Key_1_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _NOT_);\n    r = !Key_1_0_0(b, l + 1);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  // ()\n  private static boolean Key_1_0_0(PsiBuilder b, int l) {\n    return true;\n  }\n\n  /* ********************************************************** */\n  // identifier\n  public static boolean LabelDefinition(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"LabelDefinition\")) return false;\n    if (!nextTokenIs(b, IDENTIFIER)) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = consumeToken(b, IDENTIFIER);\n    exit_section_(b, m, LABEL_DEFINITION, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // identifier\n  public static boolean LabelRef(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"LabelRef\")) return false;\n    if (!nextTokenIs(b, IDENTIFIER)) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = consumeToken(b, IDENTIFIER);\n    exit_section_(b, m, LABEL_REF, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // LabelDefinition ':' Statement?\n  public static boolean LabeledStatement(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"LabeledStatement\")) return false;\n    if (!nextTokenIs(b, IDENTIFIER)) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_, LABELED_STATEMENT, null);\n    r = LabelDefinition(b, l + 1);\n    r = r && consumeToken(b, COLON);\n    p = r; // pin = 2\n    r = r && LabeledStatement_2(b, l + 1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // Statement?\n  private static boolean LabeledStatement_2(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"LabeledStatement_2\")) return false;\n    Statement(b, l + 1);\n    return true;\n  }\n\n  /* ********************************************************** */\n  // ExpressionList\n  public static boolean LeftHandExprList(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"LeftHandExprList\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _NONE_, LEFT_HAND_EXPR_LIST, \"<left hand expr list>\");\n    r = ExpressionList(b, l + 1);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // LiteralTypeExprInner | TypeName\n  public static boolean LiteralTypeExpr(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"LiteralTypeExpr\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _NONE_, LITERAL_TYPE_EXPR, \"<literal type expr>\");\n    r = LiteralTypeExprInner(b, l + 1);\n    if (!r) r = TypeName(b, l + 1);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // StructType | ArrayOrSliceType | MapType\n  static boolean LiteralTypeExprInner(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"LiteralTypeExprInner\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = StructType(b, l + 1);\n    if (!r) r = ArrayOrSliceType(b, l + 1);\n    if (!r) r = MapType(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // (<<isModeOff \"BLOCK?\">> | <<isModeOn \"PAR\">> | <<prevIsType>>) '{' ElementList? '}'\n  public static boolean LiteralValue(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"LiteralValue\")) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_, LITERAL_VALUE, \"<literal value>\");\n    r = LiteralValue_0(b, l + 1);\n    r = r && consumeToken(b, LBRACE);\n    p = r; // pin = 2\n    r = r && report_error_(b, LiteralValue_2(b, l + 1));\n    r = p && consumeToken(b, RBRACE) && r;\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // <<isModeOff \"BLOCK?\">> | <<isModeOn \"PAR\">> | <<prevIsType>>\n  private static boolean LiteralValue_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"LiteralValue_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = isModeOff(b, l + 1, \"BLOCK?\");\n    if (!r) r = isModeOn(b, l + 1, \"PAR\");\n    if (!r) r = prevIsType(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // ElementList?\n  private static boolean LiteralValue_2(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"LiteralValue_2\")) return false;\n    ElementList(b, l + 1);\n    return true;\n  }\n\n  /* ********************************************************** */\n  // map '[' Type ']' Type\n  public static boolean MapType(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"MapType\")) return false;\n    if (!nextTokenIs(b, MAP)) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_, MAP_TYPE, null);\n    r = consumeToken(b, MAP);\n    p = r; // pin = 1\n    r = r && report_error_(b, consumeToken(b, LBRACK));\n    r = p && report_error_(b, Type(b, l + 1)) && r;\n    r = p && report_error_(b, consumeToken(b, RBRACK)) && r;\n    r = p && Type(b, l + 1) && r;\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  /* ********************************************************** */\n  // func Receiver identifier Signature BlockWithConsume?\n  public static boolean MethodDeclaration(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"MethodDeclaration\")) return false;\n    if (!nextTokenIs(b, FUNC)) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_, METHOD_DECLARATION, null);\n    r = consumeToken(b, FUNC);\n    p = r; // pin = 1\n    r = r && report_error_(b, Receiver(b, l + 1));\n    r = p && report_error_(b, consumeToken(b, IDENTIFIER)) && r;\n    r = p && report_error_(b, Signature(b, l + 1)) && r;\n    r = p && MethodDeclaration_4(b, l + 1) && r;\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // BlockWithConsume?\n  private static boolean MethodDeclaration_4(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"MethodDeclaration_4\")) return false;\n    BlockWithConsume(b, l + 1);\n    return true;\n  }\n\n  /* ********************************************************** */\n  // TypeName &(!'(') | identifier Signature\n  public static boolean MethodSpec(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"MethodSpec\")) return false;\n    if (!nextTokenIs(b, IDENTIFIER)) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = MethodSpec_0(b, l + 1);\n    if (!r) r = MethodSpec_1(b, l + 1);\n    exit_section_(b, m, METHOD_SPEC, r);\n    return r;\n  }\n\n  // TypeName &(!'(')\n  private static boolean MethodSpec_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"MethodSpec_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = TypeName(b, l + 1);\n    r = r && MethodSpec_0_1(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // &(!'(')\n  private static boolean MethodSpec_0_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"MethodSpec_0_1\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _AND_);\n    r = MethodSpec_0_1_0(b, l + 1);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  // !'('\n  private static boolean MethodSpec_0_1_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"MethodSpec_0_1_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _NOT_);\n    r = !consumeToken(b, LPAREN);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  // identifier Signature\n  private static boolean MethodSpec_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"MethodSpec_1\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = consumeToken(b, IDENTIFIER);\n    r = r && Signature(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // MethodSpec (semi MethodSpec)* semi?\n  static boolean MethodSpecs(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"MethodSpecs\")) return false;\n    if (!nextTokenIs(b, IDENTIFIER)) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = MethodSpec(b, l + 1);\n    p = r; // pin = 1\n    r = r && report_error_(b, MethodSpecs_1(b, l + 1));\n    r = p && MethodSpecs_2(b, l + 1) && r;\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // (semi MethodSpec)*\n  private static boolean MethodSpecs_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"MethodSpecs_1\")) return false;\n    int c = current_position_(b);\n    while (true) {\n      if (!MethodSpecs_1_0(b, l + 1)) break;\n      if (!empty_element_parsed_guard_(b, \"MethodSpecs_1\", c)) break;\n      c = current_position_(b);\n    }\n    return true;\n  }\n\n  // semi MethodSpec\n  private static boolean MethodSpecs_1_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"MethodSpecs_1_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = semi(b, l + 1);\n    r = r && MethodSpec(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // semi?\n  private static boolean MethodSpecs_2(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"MethodSpecs_2\")) return false;\n    semi(b, l + 1);\n    return true;\n  }\n\n  /* ********************************************************** */\n  // '*' | '/' | '%' | '<<' | '>>' | '&' | '&^'\n  static boolean MulOp(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"MulOp\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = consumeToken(b, MUL);\n    if (!r) r = consumeToken(b, QUOTIENT);\n    if (!r) r = consumeToken(b, REMAINDER);\n    if (!r) r = consumeToken(b, SHIFT_LEFT);\n    if (!r) r = consumeToken(b, SHIFT_RIGHT);\n    if (!r) r = consumeToken(b, BIT_AND);\n    if (!r) r = consumeToken(b, BIT_CLEAR);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // package identifier\n  public static boolean PackageClause(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"PackageClause\")) return false;\n    if (!nextTokenIs(b, PACKAGE)) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_, PACKAGE_CLAUSE, null);\n    r = consumeTokens(b, 1, PACKAGE, IDENTIFIER);\n    p = r; // pin = 1\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  /* ********************************************************** */\n  // '(' Type ')'\n  public static boolean ParType(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ParType\")) return false;\n    if (!nextTokenIs(b, LPAREN)) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = consumeToken(b, LPAREN);\n    r = r && Type(b, l + 1);\n    r = r && consumeToken(b, RPAREN);\n    exit_section_(b, m, PAR_TYPE, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // identifier\n  public static boolean ParamDefinition(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ParamDefinition\")) return false;\n    if (!nextTokenIs(b, IDENTIFIER)) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = consumeToken(b, IDENTIFIER);\n    exit_section_(b, m, PARAM_DEFINITION, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // ParamDefinition &(!('.' | ')')) (',' ParamDefinition)*\n  static boolean ParamDefinitionListNoPin(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ParamDefinitionListNoPin\")) return false;\n    if (!nextTokenIs(b, IDENTIFIER)) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = ParamDefinition(b, l + 1);\n    r = r && ParamDefinitionListNoPin_1(b, l + 1);\n    r = r && ParamDefinitionListNoPin_2(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // &(!('.' | ')'))\n  private static boolean ParamDefinitionListNoPin_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ParamDefinitionListNoPin_1\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _AND_);\n    r = ParamDefinitionListNoPin_1_0(b, l + 1);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  // !('.' | ')')\n  private static boolean ParamDefinitionListNoPin_1_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ParamDefinitionListNoPin_1_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _NOT_);\n    r = !ParamDefinitionListNoPin_1_0_0(b, l + 1);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  // '.' | ')'\n  private static boolean ParamDefinitionListNoPin_1_0_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ParamDefinitionListNoPin_1_0_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = consumeToken(b, DOT);\n    if (!r) r = consumeToken(b, RPAREN);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // (',' ParamDefinition)*\n  private static boolean ParamDefinitionListNoPin_2(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ParamDefinitionListNoPin_2\")) return false;\n    int c = current_position_(b);\n    while (true) {\n      if (!ParamDefinitionListNoPin_2_0(b, l + 1)) break;\n      if (!empty_element_parsed_guard_(b, \"ParamDefinitionListNoPin_2\", c)) break;\n      c = current_position_(b);\n    }\n    return true;\n  }\n\n  // ',' ParamDefinition\n  private static boolean ParamDefinitionListNoPin_2_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ParamDefinitionListNoPin_2_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = consumeToken(b, COMMA);\n    r = r && ParamDefinition(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // ParamDefinitionListNoPin? '...'? Type | Type\n  public static boolean ParameterDeclaration(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ParameterDeclaration\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _NONE_, PARAMETER_DECLARATION, \"<parameter declaration>\");\n    r = ParameterDeclaration_0(b, l + 1);\n    if (!r) r = Type(b, l + 1);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  // ParamDefinitionListNoPin? '...'? Type\n  private static boolean ParameterDeclaration_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ParameterDeclaration_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = ParameterDeclaration_0_0(b, l + 1);\n    r = r && ParameterDeclaration_0_1(b, l + 1);\n    r = r && Type(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // ParamDefinitionListNoPin?\n  private static boolean ParameterDeclaration_0_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ParameterDeclaration_0_0\")) return false;\n    ParamDefinitionListNoPin(b, l + 1);\n    return true;\n  }\n\n  // '...'?\n  private static boolean ParameterDeclaration_0_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ParameterDeclaration_0_1\")) return false;\n    consumeToken(b, TRIPLE_DOT);\n    return true;\n  }\n\n  /* ********************************************************** */\n  // ParameterDeclaration (',' (ParameterDeclaration | &')'))*\n  static boolean ParameterList(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ParameterList\")) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = ParameterDeclaration(b, l + 1);\n    p = r; // pin = 1\n    r = r && ParameterList_1(b, l + 1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // (',' (ParameterDeclaration | &')'))*\n  private static boolean ParameterList_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ParameterList_1\")) return false;\n    int c = current_position_(b);\n    while (true) {\n      if (!ParameterList_1_0(b, l + 1)) break;\n      if (!empty_element_parsed_guard_(b, \"ParameterList_1\", c)) break;\n      c = current_position_(b);\n    }\n    return true;\n  }\n\n  // ',' (ParameterDeclaration | &')')\n  private static boolean ParameterList_1_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ParameterList_1_0\")) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = consumeToken(b, COMMA);\n    p = r; // pin = 1\n    r = r && ParameterList_1_0_1(b, l + 1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // ParameterDeclaration | &')'\n  private static boolean ParameterList_1_0_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ParameterList_1_0_1\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = ParameterDeclaration(b, l + 1);\n    if (!r) r = ParameterList_1_0_1_1(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // &')'\n  private static boolean ParameterList_1_0_1_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ParameterList_1_0_1_1\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _AND_);\n    r = consumeToken(b, RPAREN);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // '(' [ (ParameterList ','?| TypeListNoPin) ] ')'\n  public static boolean Parameters(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"Parameters\")) return false;\n    if (!nextTokenIs(b, LPAREN)) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_, PARAMETERS, null);\n    r = consumeToken(b, LPAREN);\n    p = r; // pin = 1\n    r = r && report_error_(b, Parameters_1(b, l + 1));\n    r = p && consumeToken(b, RPAREN) && r;\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // [ (ParameterList ','?| TypeListNoPin) ]\n  private static boolean Parameters_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"Parameters_1\")) return false;\n    Parameters_1_0(b, l + 1);\n    return true;\n  }\n\n  // ParameterList ','?| TypeListNoPin\n  private static boolean Parameters_1_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"Parameters_1_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = Parameters_1_0_0(b, l + 1);\n    if (!r) r = TypeListNoPin(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // ParameterList ','?\n  private static boolean Parameters_1_0_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"Parameters_1_0_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = ParameterList(b, l + 1);\n    r = r && Parameters_1_0_0_1(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // ','?\n  private static boolean Parameters_1_0_0_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"Parameters_1_0_0_1\")) return false;\n    consumeToken(b, COMMA);\n    return true;\n  }\n\n  /* ********************************************************** */\n  // '*' Type\n  public static boolean PointerType(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"PointerType\")) return false;\n    if (!nextTokenIs(b, MUL)) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_, POINTER_TYPE, null);\n    r = consumeToken(b, MUL);\n    p = r; // pin = 1\n    r = r && Type(b, l + 1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  /* ********************************************************** */\n  // '.' identifier\n  public static boolean QualifiedReferenceExpression(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"QualifiedReferenceExpression\")) return false;\n    if (!nextTokenIs(b, DOT)) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _LEFT_, REFERENCE_EXPRESSION, null);\n    r = consumeToken(b, DOT);\n    r = r && consumeToken(b, IDENTIFIER);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // '.' identifier\n  public static boolean QualifiedTypeReferenceExpression(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"QualifiedTypeReferenceExpression\")) return false;\n    if (!nextTokenIs(b, DOT)) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _LEFT_, TYPE_REFERENCE_EXPRESSION, null);\n    r = consumeToken(b, DOT);\n    r = r && consumeToken(b, IDENTIFIER);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // range Expression | ExpressionsOrVariables range Expression\n  public static boolean RangeClause(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"RangeClause\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _NONE_, RANGE_CLAUSE, \"<range clause>\");\n    r = RangeClause_0(b, l + 1);\n    if (!r) r = RangeClause_1(b, l + 1);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  // range Expression\n  private static boolean RangeClause_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"RangeClause_0\")) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = consumeToken(b, RANGE);\n    p = r; // pin = 1\n    r = r && Expression(b, l + 1, -1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // ExpressionsOrVariables range Expression\n  private static boolean RangeClause_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"RangeClause_1\")) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = ExpressionsOrVariables(b, l + 1);\n    p = r; // pin = 1\n    r = r && report_error_(b, consumeToken(b, RANGE));\n    r = p && Expression(b, l + 1, -1) && r;\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  /* ********************************************************** */\n  // '(' (identifier ReceiverTail | ReceiverTail) ')'\n  public static boolean Receiver(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"Receiver\")) return false;\n    if (!nextTokenIs(b, LPAREN)) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_, RECEIVER, null);\n    r = consumeToken(b, LPAREN);\n    p = r; // pin = 1\n    r = r && report_error_(b, Receiver_1(b, l + 1));\n    r = p && consumeToken(b, RPAREN) && r;\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // identifier ReceiverTail | ReceiverTail\n  private static boolean Receiver_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"Receiver_1\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = Receiver_1_0(b, l + 1);\n    if (!r) r = ReceiverTail(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // identifier ReceiverTail\n  private static boolean Receiver_1_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"Receiver_1_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = consumeToken(b, IDENTIFIER);\n    r = r && ReceiverTail(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // Type ','?\n  static boolean ReceiverTail(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ReceiverTail\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = Type(b, l + 1);\n    r = r && ReceiverTail_1(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // ','?\n  private static boolean ReceiverTail_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ReceiverTail_1\")) return false;\n    consumeToken(b, COMMA);\n    return true;\n  }\n\n  /* ********************************************************** */\n  // ExpressionsOrVariables? Expression\n  public static boolean RecvStatement(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"RecvStatement\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _NONE_, RECV_STATEMENT, \"<recv statement>\");\n    r = RecvStatement_0(b, l + 1);\n    r = r && Expression(b, l + 1, -1);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  // ExpressionsOrVariables?\n  private static boolean RecvStatement_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"RecvStatement_0\")) return false;\n    ExpressionsOrVariables(b, l + 1);\n    return true;\n  }\n\n  /* ********************************************************** */\n  // identifier\n  public static boolean ReferenceExpression(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ReferenceExpression\")) return false;\n    if (!nextTokenIs(b, IDENTIFIER)) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = consumeToken(b, IDENTIFIER);\n    exit_section_(b, m, REFERENCE_EXPRESSION, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // '==' | '!=' | '<' | '<=' | '>' | '>='\n  static boolean RelOp(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"RelOp\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = consumeToken(b, EQ);\n    if (!r) r = consumeToken(b, NOT_EQ);\n    if (!r) r = consumeToken(b, LESS);\n    if (!r) r = consumeToken(b, LESS_OR_EQUAL);\n    if (!r) r = consumeToken(b, GREATER);\n    if (!r) r = consumeToken(b, GREATER_OR_EQUAL);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // '(' TypeListNoPin ')' | Type | Parameters\n  public static boolean Result(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"Result\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _NONE_, RESULT, \"<result>\");\n    r = Result_0(b, l + 1);\n    if (!r) r = Type(b, l + 1);\n    if (!r) r = Parameters(b, l + 1);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  // '(' TypeListNoPin ')'\n  private static boolean Result_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"Result_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = consumeToken(b, LPAREN);\n    r = r && TypeListNoPin(b, l + 1);\n    r = r && consumeToken(b, RPAREN);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // return ExpressionList?\n  public static boolean ReturnStatement(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ReturnStatement\")) return false;\n    if (!nextTokenIs(b, RETURN)) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_, RETURN_STATEMENT, null);\n    r = consumeToken(b, RETURN);\n    p = r; // pin = 1\n    r = r && ReturnStatement_1(b, l + 1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // ExpressionList?\n  private static boolean ReturnStatement_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ReturnStatement_1\")) return false;\n    ExpressionList(b, l + 1);\n    return true;\n  }\n\n  /* ********************************************************** */\n  // select '{' CommClause* '}'\n  public static boolean SelectStatement(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"SelectStatement\")) return false;\n    if (!nextTokenIs(b, SELECT)) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_, SELECT_STATEMENT, null);\n    r = consumeToken(b, SELECT);\n    p = r; // pin = 1\n    r = r && report_error_(b, consumeToken(b, LBRACE));\n    r = p && report_error_(b, SelectStatement_2(b, l + 1)) && r;\n    r = p && consumeToken(b, RBRACE) && r;\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // CommClause*\n  private static boolean SelectStatement_2(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"SelectStatement_2\")) return false;\n    int c = current_position_(b);\n    while (true) {\n      if (!CommClause(b, l + 1)) break;\n      if (!empty_element_parsed_guard_(b, \"SelectStatement_2\", c)) break;\n      c = current_position_(b);\n    }\n    return true;\n  }\n\n  /* ********************************************************** */\n  // '<-' Expression\n  public static boolean SendStatement(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"SendStatement\")) return false;\n    if (!nextTokenIs(b, SEND_CHANNEL)) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _LEFT_, SEND_STATEMENT, null);\n    r = consumeToken(b, SEND_CHANNEL);\n    p = r; // pin = 1\n    r = r && Expression(b, l + 1, -1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  /* ********************************************************** */\n  // VarDefinitionList ':=' ExpressionList\n  public static boolean ShortVarDeclaration(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ShortVarDeclaration\")) return false;\n    if (!nextTokenIs(b, IDENTIFIER)) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_, SHORT_VAR_DECLARATION, null);\n    r = VarDefinitionList(b, l + 1);\n    r = r && consumeToken(b, VAR_ASSIGN);\n    p = r; // pin = 2\n    r = r && ExpressionList(b, l + 1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  /* ********************************************************** */\n  // Parameters Result?\n  public static boolean Signature(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"Signature\")) return false;\n    if (!nextTokenIs(b, LPAREN)) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_, SIGNATURE, null);\n    r = Parameters(b, l + 1);\n    p = r; // pin = 1\n    r = r && Signature_1(b, l + 1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // Result?\n  private static boolean Signature_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"Signature_1\")) return false;\n    Result(b, l + 1);\n    return true;\n  }\n\n  /* ********************************************************** */\n  // ShortVarDeclaration\n  //   | IncDecStatement\n  //   | (LeftHandExprList [AssignmentStatement | SendStatement])\n  public static boolean SimpleStatement(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"SimpleStatement\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _COLLAPSE_, SIMPLE_STATEMENT, \"<simple statement>\");\n    r = ShortVarDeclaration(b, l + 1);\n    if (!r) r = IncDecStatement(b, l + 1);\n    if (!r) r = SimpleStatement_2(b, l + 1);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  // LeftHandExprList [AssignmentStatement | SendStatement]\n  private static boolean SimpleStatement_2(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"SimpleStatement_2\")) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = LeftHandExprList(b, l + 1);\n    p = r; // pin = LeftHandExprList\n    r = r && SimpleStatement_2_1(b, l + 1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // [AssignmentStatement | SendStatement]\n  private static boolean SimpleStatement_2_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"SimpleStatement_2_1\")) return false;\n    SimpleStatement_2_1_0(b, l + 1);\n    return true;\n  }\n\n  // AssignmentStatement | SendStatement\n  private static boolean SimpleStatement_2_1_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"SimpleStatement_2_1_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = AssignmentStatement(b, l + 1);\n    if (!r) r = SendStatement(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // [SimpleStatement ';'?]\n  static boolean SimpleStatementOpt(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"SimpleStatementOpt\")) return false;\n    SimpleStatementOpt_0(b, l + 1);\n    return true;\n  }\n\n  // SimpleStatement ';'?\n  private static boolean SimpleStatementOpt_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"SimpleStatementOpt_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = SimpleStatement(b, l + 1);\n    r = r && SimpleStatementOpt_0_1(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // ';'?\n  private static boolean SimpleStatementOpt_0_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"SimpleStatementOpt_0_1\")) return false;\n    consumeToken(b, SEMICOLON);\n    return true;\n  }\n\n  /* ********************************************************** */\n  // &':' (':' Expression ':' Expression) | (':' Expression?)\n  static boolean SliceExprBody(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"SliceExprBody\")) return false;\n    if (!nextTokenIs(b, COLON)) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = SliceExprBody_0(b, l + 1);\n    if (!r) r = SliceExprBody_1(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // &':' (':' Expression ':' Expression)\n  private static boolean SliceExprBody_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"SliceExprBody_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = SliceExprBody_0_0(b, l + 1);\n    r = r && SliceExprBody_0_1(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // &':'\n  private static boolean SliceExprBody_0_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"SliceExprBody_0_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _AND_);\n    r = consumeToken(b, COLON);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  // ':' Expression ':' Expression\n  private static boolean SliceExprBody_0_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"SliceExprBody_0_1\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = consumeToken(b, COLON);\n    r = r && Expression(b, l + 1, -1);\n    r = r && consumeToken(b, COLON);\n    r = r && Expression(b, l + 1, -1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // ':' Expression?\n  private static boolean SliceExprBody_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"SliceExprBody_1\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = consumeToken(b, COLON);\n    r = r && SliceExprBody_1_1(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // Expression?\n  private static boolean SliceExprBody_1_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"SliceExprBody_1_1\")) return false;\n    Expression(b, l + 1, -1);\n    return true;\n  }\n\n  /* ********************************************************** */\n  // SliceExprBody\n  static boolean SliceExprBodyInner(PsiBuilder b, int l) {\n    return SliceExprBody(b, l + 1);\n  }\n\n  /* ********************************************************** */\n  // identifier Type\n  public static boolean SpecType(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"SpecType\")) return false;\n    if (!nextTokenIs(b, IDENTIFIER)) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_, SPEC_TYPE, null);\n    r = consumeToken(b, IDENTIFIER);\n    p = r; // pin = 1\n    r = r && Type(b, l + 1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  /* ********************************************************** */\n  // ConstDeclaration\n  //   | TypeDeclaration\n  //   | VarDeclaration\n  //   | LabeledStatement\n  //   | SimpleStatement\n  //   | GoStatement\n  //   | ReturnStatement\n  //   | BreakStatement\n  //   | ContinueStatement\n  //   | GotoStatement\n  //   | FallthroughStatement\n  //   | Block\n  //   | IfStatement\n  //   | SwitchStatement\n  //   | SelectStatement\n  //   | ForStatement\n  //   | DeferStatement\n  public static boolean Statement(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"Statement\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _COLLAPSE_, STATEMENT, \"<statement>\");\n    r = ConstDeclaration(b, l + 1);\n    if (!r) r = TypeDeclaration(b, l + 1);\n    if (!r) r = VarDeclaration(b, l + 1);\n    if (!r) r = LabeledStatement(b, l + 1);\n    if (!r) r = SimpleStatement(b, l + 1);\n    if (!r) r = GoStatement(b, l + 1);\n    if (!r) r = ReturnStatement(b, l + 1);\n    if (!r) r = BreakStatement(b, l + 1);\n    if (!r) r = ContinueStatement(b, l + 1);\n    if (!r) r = GotoStatement(b, l + 1);\n    if (!r) r = FallthroughStatement(b, l + 1);\n    if (!r) r = Block(b, l + 1);\n    if (!r) r = IfStatement(b, l + 1);\n    if (!r) r = SwitchStatement(b, l + 1);\n    if (!r) r = SelectStatement(b, l + 1);\n    if (!r) r = ForStatement(b, l + 1);\n    if (!r) r = DeferStatement(b, l + 1);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // !('!' | '&' | '(' | '*' | '+' | '-' | ';' | '<-' | '^' | 'type' | '{' | '|' | '|=' | '||' | '}' | break | case | char | const | continue | decimali | default | defer | else | fallthrough | float | floati | for | func | go | goto | hex | identifier | if | int | interface | map | oct | return | select | string | raw_string | struct | switch | var)\n  static boolean StatementRecover(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"StatementRecover\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _NOT_);\n    r = !StatementRecover_0(b, l + 1);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  // '!' | '&' | '(' | '*' | '+' | '-' | ';' | '<-' | '^' | 'type' | '{' | '|' | '|=' | '||' | '}' | break | case | char | const | continue | decimali | default | defer | else | fallthrough | float | floati | for | func | go | goto | hex | identifier | if | int | interface | map | oct | return | select | string | raw_string | struct | switch | var\n  private static boolean StatementRecover_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"StatementRecover_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = consumeToken(b, NOT);\n    if (!r) r = consumeToken(b, BIT_AND);\n    if (!r) r = consumeToken(b, LPAREN);\n    if (!r) r = consumeToken(b, MUL);\n    if (!r) r = consumeToken(b, PLUS);\n    if (!r) r = consumeToken(b, MINUS);\n    if (!r) r = consumeToken(b, SEMICOLON);\n    if (!r) r = consumeToken(b, SEND_CHANNEL);\n    if (!r) r = consumeToken(b, BIT_XOR);\n    if (!r) r = consumeToken(b, TYPE_);\n    if (!r) r = consumeToken(b, LBRACE);\n    if (!r) r = consumeToken(b, BIT_OR);\n    if (!r) r = consumeToken(b, BIT_OR_ASSIGN);\n    if (!r) r = consumeToken(b, COND_OR);\n    if (!r) r = consumeToken(b, RBRACE);\n    if (!r) r = consumeToken(b, BREAK);\n    if (!r) r = consumeToken(b, CASE);\n    if (!r) r = consumeToken(b, CHAR);\n    if (!r) r = consumeToken(b, CONST);\n    if (!r) r = consumeToken(b, CONTINUE);\n    if (!r) r = consumeToken(b, DECIMALI);\n    if (!r) r = consumeToken(b, DEFAULT);\n    if (!r) r = consumeToken(b, DEFER);\n    if (!r) r = consumeToken(b, ELSE);\n    if (!r) r = consumeToken(b, FALLTHROUGH);\n    if (!r) r = consumeToken(b, FLOAT);\n    if (!r) r = consumeToken(b, FLOATI);\n    if (!r) r = consumeToken(b, FOR);\n    if (!r) r = consumeToken(b, FUNC);\n    if (!r) r = consumeToken(b, GO);\n    if (!r) r = consumeToken(b, GOTO);\n    if (!r) r = consumeToken(b, HEX);\n    if (!r) r = consumeToken(b, IDENTIFIER);\n    if (!r) r = consumeToken(b, IF);\n    if (!r) r = consumeToken(b, INT);\n    if (!r) r = consumeToken(b, INTERFACE);\n    if (!r) r = consumeToken(b, MAP);\n    if (!r) r = consumeToken(b, OCT);\n    if (!r) r = consumeToken(b, RETURN);\n    if (!r) r = consumeToken(b, SELECT);\n    if (!r) r = consumeToken(b, STRING);\n    if (!r) r = consumeToken(b, RAW_STRING);\n    if (!r) r = consumeToken(b, STRUCT);\n    if (!r) r = consumeToken(b, SWITCH);\n    if (!r) r = consumeToken(b, VAR);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // Statement (semi|&'}')\n  static boolean StatementWithSemi(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"StatementWithSemi\")) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = Statement(b, l + 1);\n    p = r; // pin = 1\n    r = r && StatementWithSemi_1(b, l + 1);\n    exit_section_(b, l, m, r, p, StatementRecover_parser_);\n    return r || p;\n  }\n\n  // semi|&'}'\n  private static boolean StatementWithSemi_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"StatementWithSemi_1\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = semi(b, l + 1);\n    if (!r) r = StatementWithSemi_1_1(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // &'}'\n  private static boolean StatementWithSemi_1_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"StatementWithSemi_1_1\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _AND_);\n    r = consumeToken(b, RBRACE);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // StatementWithSemi*\n  static boolean Statements(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"Statements\")) return false;\n    int c = current_position_(b);\n    while (true) {\n      if (!StatementWithSemi(b, l + 1)) break;\n      if (!empty_element_parsed_guard_(b, \"Statements\", c)) break;\n      c = current_position_(b);\n    }\n    return true;\n  }\n\n  /* ********************************************************** */\n  // string | raw_string\n  public static boolean StringLiteral(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"StringLiteral\")) return false;\n    if (!nextTokenIs(b, \"<string literal>\", RAW_STRING, STRING)) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _NONE_, STRING_LITERAL, \"<string literal>\");\n    r = consumeToken(b, STRING);\n    if (!r) r = consumeToken(b, RAW_STRING);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // struct '{' Fields? '}'\n  public static boolean StructType(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"StructType\")) return false;\n    if (!nextTokenIs(b, STRUCT)) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_, STRUCT_TYPE, null);\n    r = consumeToken(b, STRUCT);\n    p = r; // pin = 1\n    r = r && report_error_(b, consumeToken(b, LBRACE));\n    r = p && report_error_(b, StructType_2(b, l + 1)) && r;\n    r = p && consumeToken(b, RBRACE) && r;\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // Fields?\n  private static boolean StructType_2(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"StructType_2\")) return false;\n    Fields(b, l + 1);\n    return true;\n  }\n\n  /* ********************************************************** */\n  // switch\n  public static boolean SwitchStart(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"SwitchStart\")) return false;\n    if (!nextTokenIs(b, SWITCH)) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = consumeToken(b, SWITCH);\n    exit_section_(b, m, SWITCH_START, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // SwitchStart (TypeSwitchStatement | ExprSwitchStatement)\n  public static boolean SwitchStatement(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"SwitchStatement\")) return false;\n    if (!nextTokenIs(b, SWITCH)) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _COLLAPSE_, SWITCH_STATEMENT, null);\n    r = SwitchStart(b, l + 1);\n    p = r; // pin = 1\n    r = r && SwitchStatement_1(b, l + 1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // TypeSwitchStatement | ExprSwitchStatement\n  private static boolean SwitchStatement_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"SwitchStatement_1\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = TypeSwitchStatement(b, l + 1);\n    if (!r) r = ExprSwitchStatement(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // StringLiteral\n  public static boolean Tag(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"Tag\")) return false;\n    if (!nextTokenIs(b, \"<tag>\", RAW_STRING, STRING)) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _NONE_, TAG, \"<tag>\");\n    r = StringLiteral(b, l + 1);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // ConstDeclaration\n  //   | TypeDeclaration\n  //   | VarDeclaration\n  //   | FunctionDeclaration\n  //   | MethodDeclaration\n  static boolean TopDeclaration(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"TopDeclaration\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = ConstDeclaration(b, l + 1);\n    if (!r) r = TypeDeclaration(b, l + 1);\n    if (!r) r = VarDeclaration(b, l + 1);\n    if (!r) r = FunctionDeclaration(b, l + 1);\n    if (!r) r = MethodDeclaration(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // !<<eof>> TopDeclaration semi\n  static boolean TopLevelDeclaration(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"TopLevelDeclaration\")) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = TopLevelDeclaration_0(b, l + 1);\n    p = r; // pin = 1\n    r = r && report_error_(b, TopDeclaration(b, l + 1));\n    r = p && semi(b, l + 1) && r;\n    exit_section_(b, l, m, r, p, TopLevelDeclarationRecover_parser_);\n    return r || p;\n  }\n\n  // !<<eof>>\n  private static boolean TopLevelDeclaration_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"TopLevelDeclaration_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _NOT_);\n    r = !eof(b, l + 1);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // !(';' |'type' | const | func | var)\n  static boolean TopLevelDeclarationRecover(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"TopLevelDeclarationRecover\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _NOT_);\n    r = !TopLevelDeclarationRecover_0(b, l + 1);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  // ';' |'type' | const | func | var\n  private static boolean TopLevelDeclarationRecover_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"TopLevelDeclarationRecover_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = consumeToken(b, SEMICOLON);\n    if (!r) r = consumeToken(b, TYPE_);\n    if (!r) r = consumeToken(b, CONST);\n    if (!r) r = consumeToken(b, FUNC);\n    if (!r) r = consumeToken(b, VAR);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // TypeName | TypeLit | ParType\n  public static boolean Type(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"Type\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _COLLAPSE_, TYPE, \"<type>\");\n    r = TypeName(b, l + 1);\n    if (!r) r = TypeLit(b, l + 1);\n    if (!r) r = ParType(b, l + 1);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // !'}' TypeSwitchCase ':' Statements?\n  public static boolean TypeCaseClause(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"TypeCaseClause\")) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_, TYPE_CASE_CLAUSE, \"<type case clause>\");\n    r = TypeCaseClause_0(b, l + 1);\n    p = r; // pin = 1\n    r = r && report_error_(b, TypeSwitchCase(b, l + 1));\n    r = p && report_error_(b, consumeToken(b, COLON)) && r;\n    r = p && TypeCaseClause_3(b, l + 1) && r;\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // !'}'\n  private static boolean TypeCaseClause_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"TypeCaseClause_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _NOT_);\n    r = !consumeToken(b, RBRACE);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  // Statements?\n  private static boolean TypeCaseClause_3(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"TypeCaseClause_3\")) return false;\n    Statements(b, l + 1);\n    return true;\n  }\n\n  /* ********************************************************** */\n  // 'type' ( TypeSpec | '(' TypeSpecs? ')' )\n  public static boolean TypeDeclaration(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"TypeDeclaration\")) return false;\n    if (!nextTokenIs(b, TYPE_)) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_, TYPE_DECLARATION, null);\n    r = consumeToken(b, TYPE_);\n    p = r; // pin = 1\n    r = r && TypeDeclaration_1(b, l + 1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // TypeSpec | '(' TypeSpecs? ')'\n  private static boolean TypeDeclaration_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"TypeDeclaration_1\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = TypeSpec(b, l + 1);\n    if (!r) r = TypeDeclaration_1_1(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // '(' TypeSpecs? ')'\n  private static boolean TypeDeclaration_1_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"TypeDeclaration_1_1\")) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = consumeToken(b, LPAREN);\n    p = r; // pin = 1\n    r = r && report_error_(b, TypeDeclaration_1_1_1(b, l + 1));\n    r = p && consumeToken(b, RPAREN) && r;\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // TypeSpecs?\n  private static boolean TypeDeclaration_1_1_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"TypeDeclaration_1_1_1\")) return false;\n    TypeSpecs(b, l + 1);\n    return true;\n  }\n\n  /* ********************************************************** */\n  // '(' 'type' ')'\n  public static boolean TypeGuard(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"TypeGuard\")) return false;\n    if (!nextTokenIs(b, LPAREN)) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_, TYPE_GUARD, null);\n    r = consumeToken(b, LPAREN);\n    r = r && consumeToken(b, TYPE_);\n    p = r; // pin = 2\n    r = r && consumeToken(b, RPAREN);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  /* ********************************************************** */\n  // Type ( ',' Type )* ','?\n  public static boolean TypeList(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"TypeList\")) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _COLLAPSE_, TYPE_LIST, \"<type list>\");\n    r = Type(b, l + 1);\n    p = r; // pin = 1\n    r = r && report_error_(b, TypeList_1(b, l + 1));\n    r = p && TypeList_2(b, l + 1) && r;\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // ( ',' Type )*\n  private static boolean TypeList_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"TypeList_1\")) return false;\n    int c = current_position_(b);\n    while (true) {\n      if (!TypeList_1_0(b, l + 1)) break;\n      if (!empty_element_parsed_guard_(b, \"TypeList_1\", c)) break;\n      c = current_position_(b);\n    }\n    return true;\n  }\n\n  // ',' Type\n  private static boolean TypeList_1_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"TypeList_1_0\")) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = consumeToken(b, COMMA);\n    p = r; // pin = 1\n    r = r && Type(b, l + 1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // ','?\n  private static boolean TypeList_2(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"TypeList_2\")) return false;\n    consumeToken(b, COMMA);\n    return true;\n  }\n\n  /* ********************************************************** */\n  // Type ( ',' Type )* ','?\n  public static boolean TypeListNoPin(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"TypeListNoPin\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _COLLAPSE_, TYPE_LIST, \"<type list no pin>\");\n    r = Type(b, l + 1);\n    r = r && TypeListNoPin_1(b, l + 1);\n    r = r && TypeListNoPin_2(b, l + 1);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  // ( ',' Type )*\n  private static boolean TypeListNoPin_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"TypeListNoPin_1\")) return false;\n    int c = current_position_(b);\n    while (true) {\n      if (!TypeListNoPin_1_0(b, l + 1)) break;\n      if (!empty_element_parsed_guard_(b, \"TypeListNoPin_1\", c)) break;\n      c = current_position_(b);\n    }\n    return true;\n  }\n\n  // ',' Type\n  private static boolean TypeListNoPin_1_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"TypeListNoPin_1_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = consumeToken(b, COMMA);\n    r = r && Type(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // ','?\n  private static boolean TypeListNoPin_2(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"TypeListNoPin_2\")) return false;\n    consumeToken(b, COMMA);\n    return true;\n  }\n\n  /* ********************************************************** */\n  // ArrayOrSliceType\n  //   | StructType\n  //   | PointerType\n  //   | FunctionType\n  //   | InterfaceType\n  //   | MapType\n  //   | ChannelType\n  static boolean TypeLit(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"TypeLit\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = ArrayOrSliceType(b, l + 1);\n    if (!r) r = StructType(b, l + 1);\n    if (!r) r = PointerType(b, l + 1);\n    if (!r) r = FunctionType(b, l + 1);\n    if (!r) r = InterfaceType(b, l + 1);\n    if (!r) r = MapType(b, l + 1);\n    if (!r) r = ChannelType(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // TypeReferenceExpression QualifiedTypeReferenceExpression?\n  static boolean TypeName(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"TypeName\")) return false;\n    if (!nextTokenIs(b, IDENTIFIER)) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = TypeReferenceExpression(b, l + 1);\n    r = r && TypeName_1(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // QualifiedTypeReferenceExpression?\n  private static boolean TypeName_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"TypeName_1\")) return false;\n    QualifiedTypeReferenceExpression(b, l + 1);\n    return true;\n  }\n\n  /* ********************************************************** */\n  // identifier\n  public static boolean TypeReferenceExpression(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"TypeReferenceExpression\")) return false;\n    if (!nextTokenIs(b, IDENTIFIER)) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = consumeToken(b, IDENTIFIER);\n    exit_section_(b, m, TYPE_REFERENCE_EXPRESSION, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // SpecType\n  public static boolean TypeSpec(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"TypeSpec\")) return false;\n    if (!nextTokenIs(b, IDENTIFIER)) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = SpecType(b, l + 1);\n    exit_section_(b, m, TYPE_SPEC, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // TypeSpec (semi TypeSpec)* semi?\n  static boolean TypeSpecs(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"TypeSpecs\")) return false;\n    if (!nextTokenIs(b, IDENTIFIER)) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = TypeSpec(b, l + 1);\n    p = r; // pin = 1\n    r = r && report_error_(b, TypeSpecs_1(b, l + 1));\n    r = p && TypeSpecs_2(b, l + 1) && r;\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // (semi TypeSpec)*\n  private static boolean TypeSpecs_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"TypeSpecs_1\")) return false;\n    int c = current_position_(b);\n    while (true) {\n      if (!TypeSpecs_1_0(b, l + 1)) break;\n      if (!empty_element_parsed_guard_(b, \"TypeSpecs_1\", c)) break;\n      c = current_position_(b);\n    }\n    return true;\n  }\n\n  // semi TypeSpec\n  private static boolean TypeSpecs_1_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"TypeSpecs_1_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = semi(b, l + 1);\n    r = r && TypeSpec(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // semi?\n  private static boolean TypeSpecs_2(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"TypeSpecs_2\")) return false;\n    semi(b, l + 1);\n    return true;\n  }\n\n  /* ********************************************************** */\n  // case TypeList | default\n  static boolean TypeSwitchCase(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"TypeSwitchCase\")) return false;\n    if (!nextTokenIs(b, \"\", CASE, DEFAULT)) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = TypeSwitchCase_0(b, l + 1);\n    if (!r) r = consumeToken(b, DEFAULT);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // case TypeList\n  private static boolean TypeSwitchCase_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"TypeSwitchCase_0\")) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = consumeToken(b, CASE);\n    p = r; // pin = 1\n    r = r && TypeList(b, l + 1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  /* ********************************************************** */\n  // [ VarDefinition ':=' ] Expression '.' TypeGuard\n  public static boolean TypeSwitchGuard(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"TypeSwitchGuard\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _NONE_, TYPE_SWITCH_GUARD, \"<type switch guard>\");\n    r = TypeSwitchGuard_0(b, l + 1);\n    r = r && Expression(b, l + 1, -1);\n    r = r && consumeToken(b, DOT);\n    r = r && TypeGuard(b, l + 1);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  // [ VarDefinition ':=' ]\n  private static boolean TypeSwitchGuard_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"TypeSwitchGuard_0\")) return false;\n    TypeSwitchGuard_0_0(b, l + 1);\n    return true;\n  }\n\n  // VarDefinition ':='\n  private static boolean TypeSwitchGuard_0_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"TypeSwitchGuard_0_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = VarDefinition(b, l + 1);\n    r = r && consumeToken(b, VAR_ASSIGN);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // (TypeSwitchGuard | SimpleStatement ';'? TypeSwitchGuard) '{' ( TypeCaseClause )* '}'\n  public static boolean TypeSwitchStatement(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"TypeSwitchStatement\")) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _LEFT_, TYPE_SWITCH_STATEMENT, \"<type switch statement>\");\n    r = TypeSwitchStatement_0(b, l + 1);\n    p = r; // pin = 1\n    r = r && report_error_(b, consumeToken(b, LBRACE));\n    r = p && report_error_(b, TypeSwitchStatement_2(b, l + 1)) && r;\n    r = p && consumeToken(b, RBRACE) && r;\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // TypeSwitchGuard | SimpleStatement ';'? TypeSwitchGuard\n  private static boolean TypeSwitchStatement_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"TypeSwitchStatement_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = TypeSwitchGuard(b, l + 1);\n    if (!r) r = TypeSwitchStatement_0_1(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // SimpleStatement ';'? TypeSwitchGuard\n  private static boolean TypeSwitchStatement_0_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"TypeSwitchStatement_0_1\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = SimpleStatement(b, l + 1);\n    r = r && TypeSwitchStatement_0_1_1(b, l + 1);\n    r = r && TypeSwitchGuard(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // ';'?\n  private static boolean TypeSwitchStatement_0_1_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"TypeSwitchStatement_0_1_1\")) return false;\n    consumeToken(b, SEMICOLON);\n    return true;\n  }\n\n  // ( TypeCaseClause )*\n  private static boolean TypeSwitchStatement_2(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"TypeSwitchStatement_2\")) return false;\n    int c = current_position_(b);\n    while (true) {\n      if (!TypeSwitchStatement_2_0(b, l + 1)) break;\n      if (!empty_element_parsed_guard_(b, \"TypeSwitchStatement_2\", c)) break;\n      c = current_position_(b);\n    }\n    return true;\n  }\n\n  // ( TypeCaseClause )\n  private static boolean TypeSwitchStatement_2_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"TypeSwitchStatement_2_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = TypeCaseClause(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // '+' | '-' | '!' | '^' | '*' | '&' | '<-'\n  static boolean UnaryOp(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"UnaryOp\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = consumeToken(b, PLUS);\n    if (!r) r = consumeToken(b, MINUS);\n    if (!r) r = consumeToken(b, NOT);\n    if (!r) r = consumeToken(b, BIT_XOR);\n    if (!r) r = consumeToken(b, MUL);\n    if (!r) r = consumeToken(b, BIT_AND);\n    if (!r) r = consumeToken(b, SEND_CHANNEL);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // Expression | LiteralValue\n  public static boolean Value(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"Value\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _NONE_, VALUE, \"<value>\");\n    r = Expression(b, l + 1, -1);\n    if (!r) r = LiteralValue(b, l + 1);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // var ( VarSpec | '(' VarSpecs? ')' )\n  public static boolean VarDeclaration(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"VarDeclaration\")) return false;\n    if (!nextTokenIs(b, VAR)) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_, VAR_DECLARATION, null);\n    r = consumeToken(b, VAR);\n    p = r; // pin = 1\n    r = r && VarDeclaration_1(b, l + 1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // VarSpec | '(' VarSpecs? ')'\n  private static boolean VarDeclaration_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"VarDeclaration_1\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = VarSpec(b, l + 1);\n    if (!r) r = VarDeclaration_1_1(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // '(' VarSpecs? ')'\n  private static boolean VarDeclaration_1_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"VarDeclaration_1_1\")) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = consumeToken(b, LPAREN);\n    p = r; // pin = 1\n    r = r && report_error_(b, VarDeclaration_1_1_1(b, l + 1));\n    r = p && consumeToken(b, RPAREN) && r;\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // VarSpecs?\n  private static boolean VarDeclaration_1_1_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"VarDeclaration_1_1_1\")) return false;\n    VarSpecs(b, l + 1);\n    return true;\n  }\n\n  /* ********************************************************** */\n  // identifier\n  public static boolean VarDefinition(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"VarDefinition\")) return false;\n    if (!nextTokenIs(b, IDENTIFIER)) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = consumeToken(b, IDENTIFIER);\n    exit_section_(b, m, VAR_DEFINITION, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // VarDefinition ( ',' VarDefinition )*\n  static boolean VarDefinitionList(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"VarDefinitionList\")) return false;\n    if (!nextTokenIs(b, IDENTIFIER)) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = VarDefinition(b, l + 1);\n    p = r; // pin = 1\n    r = r && VarDefinitionList_1(b, l + 1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // ( ',' VarDefinition )*\n  private static boolean VarDefinitionList_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"VarDefinitionList_1\")) return false;\n    int c = current_position_(b);\n    while (true) {\n      if (!VarDefinitionList_1_0(b, l + 1)) break;\n      if (!empty_element_parsed_guard_(b, \"VarDefinitionList_1\", c)) break;\n      c = current_position_(b);\n    }\n    return true;\n  }\n\n  // ',' VarDefinition\n  private static boolean VarDefinitionList_1_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"VarDefinitionList_1_0\")) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = consumeToken(b, COMMA);\n    p = r; // pin = 1\n    r = r && VarDefinition(b, l + 1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  /* ********************************************************** */\n  // VarDefinitionList ( Type [ '=' ExpressionList ] | '=' ExpressionList )\n  public static boolean VarSpec(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"VarSpec\")) return false;\n    if (!nextTokenIs(b, IDENTIFIER)) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_, VAR_SPEC, null);\n    r = VarDefinitionList(b, l + 1);\n    p = r; // pin = 1\n    r = r && VarSpec_1(b, l + 1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // Type [ '=' ExpressionList ] | '=' ExpressionList\n  private static boolean VarSpec_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"VarSpec_1\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = VarSpec_1_0(b, l + 1);\n    if (!r) r = VarSpec_1_1(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // Type [ '=' ExpressionList ]\n  private static boolean VarSpec_1_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"VarSpec_1_0\")) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = Type(b, l + 1);\n    p = r; // pin = 1\n    r = r && VarSpec_1_0_1(b, l + 1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // [ '=' ExpressionList ]\n  private static boolean VarSpec_1_0_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"VarSpec_1_0_1\")) return false;\n    VarSpec_1_0_1_0(b, l + 1);\n    return true;\n  }\n\n  // '=' ExpressionList\n  private static boolean VarSpec_1_0_1_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"VarSpec_1_0_1_0\")) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = consumeToken(b, ASSIGN);\n    p = r; // pin = 1\n    r = r && ExpressionList(b, l + 1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // '=' ExpressionList\n  private static boolean VarSpec_1_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"VarSpec_1_1\")) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = consumeToken(b, ASSIGN);\n    p = r; // pin = 1\n    r = r && ExpressionList(b, l + 1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  /* ********************************************************** */\n  // VarSpec (semi VarSpec)* semi?\n  static boolean VarSpecs(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"VarSpecs\")) return false;\n    if (!nextTokenIs(b, IDENTIFIER)) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = VarSpec(b, l + 1);\n    p = r; // pin = 1\n    r = r && report_error_(b, VarSpecs_1(b, l + 1));\n    r = p && VarSpecs_2(b, l + 1) && r;\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // (semi VarSpec)*\n  private static boolean VarSpecs_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"VarSpecs_1\")) return false;\n    int c = current_position_(b);\n    while (true) {\n      if (!VarSpecs_1_0(b, l + 1)) break;\n      if (!empty_element_parsed_guard_(b, \"VarSpecs_1\", c)) break;\n      c = current_position_(b);\n    }\n    return true;\n  }\n\n  // semi VarSpec\n  private static boolean VarSpecs_1_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"VarSpecs_1_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = semi(b, l + 1);\n    r = r && VarSpec(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // semi?\n  private static boolean VarSpecs_2(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"VarSpecs_2\")) return false;\n    semi(b, l + 1);\n    return true;\n  }\n\n  /* ********************************************************** */\n  // '=' | '+=' | '-=' | '|=' | '^=' | '*=' | '/=' | '%=' | '<<=' | '>>=' | '&=' | '&^='\n  public static boolean assign_op(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"assign_op\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _NONE_, ASSIGN_OP, \"<assign op>\");\n    r = consumeToken(b, ASSIGN);\n    if (!r) r = consumeToken(b, PLUS_ASSIGN);\n    if (!r) r = consumeToken(b, MINUS_ASSIGN);\n    if (!r) r = consumeToken(b, BIT_OR_ASSIGN);\n    if (!r) r = consumeToken(b, BIT_XOR_ASSIGN);\n    if (!r) r = consumeToken(b, MUL_ASSIGN);\n    if (!r) r = consumeToken(b, QUOTIENT_ASSIGN);\n    if (!r) r = consumeToken(b, REMAINDER_ASSIGN);\n    if (!r) r = consumeToken(b, SHIFT_LEFT_ASSIGN);\n    if (!r) r = consumeToken(b, SHIFT_RIGHT_ASSIGN);\n    if (!r) r = consumeToken(b, BIT_AND_ASSIGN);\n    if (!r) r = consumeToken(b, BIT_CLEAR_ASSIGN);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // '<NL>' | ';' | <<eof>>\n  static boolean semi(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"semi\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = consumeToken(b, SEMICOLON_SYNTHETIC);\n    if (!r) r = consumeToken(b, SEMICOLON);\n    if (!r) r = eof(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // Expression root: Expression\n  // Operator priority table:\n  // 0: BINARY(OrExpr)\n  // 1: BINARY(AndExpr)\n  // 2: BINARY(ConditionalExpr)\n  // 3: BINARY(AddExpr)\n  // 4: BINARY(MulExpr)\n  // 5: PREFIX(UnaryExpr)\n  // 6: ATOM(ConversionExpr)\n  // 7: ATOM(CompositeLit) ATOM(OperandName) POSTFIX(BuiltinCallExpr) POSTFIX(CallExpr)\n  //    POSTFIX(TypeAssertionExpr) BINARY(SelectorExpr) POSTFIX(IndexOrSliceExpr) ATOM(Literal)\n  //    ATOM(FunctionLit)\n  // 8: ATOM(ParenthesesExpr)\n  public static boolean Expression(PsiBuilder b, int l, int g) {\n    if (!recursion_guard_(b, l, \"Expression\")) return false;\n    addVariant(b, \"<expression>\");\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_, \"<expression>\");\n    r = UnaryExpr(b, l + 1);\n    if (!r) r = ConversionExpr(b, l + 1);\n    if (!r) r = CompositeLit(b, l + 1);\n    if (!r) r = OperandName(b, l + 1);\n    if (!r) r = Literal(b, l + 1);\n    if (!r) r = FunctionLit(b, l + 1);\n    if (!r) r = ParenthesesExpr(b, l + 1);\n    p = r;\n    r = r && Expression_0(b, l + 1, g);\n    exit_section_(b, l, m, null, r, p, null);\n    return r || p;\n  }\n\n  public static boolean Expression_0(PsiBuilder b, int l, int g) {\n    if (!recursion_guard_(b, l, \"Expression_0\")) return false;\n    boolean r = true;\n    while (true) {\n      Marker m = enter_section_(b, l, _LEFT_, null);\n      if (g < 0 && consumeTokenSmart(b, COND_OR)) {\n        r = Expression(b, l, 0);\n        exit_section_(b, l, m, OR_EXPR, r, true, null);\n      }\n      else if (g < 1 && consumeTokenSmart(b, COND_AND)) {\n        r = Expression(b, l, 1);\n        exit_section_(b, l, m, AND_EXPR, r, true, null);\n      }\n      else if (g < 2 && RelOp(b, l + 1)) {\n        r = Expression(b, l, 2);\n        exit_section_(b, l, m, CONDITIONAL_EXPR, r, true, null);\n      }\n      else if (g < 3 && AddOp(b, l + 1)) {\n        r = Expression(b, l, 3);\n        exit_section_(b, l, m, ADD_EXPR, r, true, null);\n      }\n      else if (g < 4 && MulOp(b, l + 1)) {\n        r = Expression(b, l, 4);\n        exit_section_(b, l, m, MUL_EXPR, r, true, null);\n      }\n      else if (g < 7 && leftMarkerIs(b, REFERENCE_EXPRESSION) && BuiltinCallExpr_0(b, l + 1)) {\n        r = true;\n        exit_section_(b, l, m, BUILTIN_CALL_EXPR, r, true, null);\n      }\n      else if (g < 7 && ArgumentList(b, l + 1)) {\n        r = true;\n        exit_section_(b, l, m, CALL_EXPR, r, true, null);\n      }\n      else if (g < 7 && TypeAssertionExpr_0(b, l + 1)) {\n        r = true;\n        exit_section_(b, l, m, TYPE_ASSERTION_EXPR, r, true, null);\n      }\n      else if (g < 7 && SelectorExpr_0(b, l + 1)) {\n        r = Expression(b, l, 7);\n        exit_section_(b, l, m, SELECTOR_EXPR, r, true, null);\n      }\n      else if (g < 7 && IndexOrSliceExpr_0(b, l + 1)) {\n        r = true;\n        exit_section_(b, l, m, INDEX_OR_SLICE_EXPR, r, true, null);\n      }\n      else {\n        exit_section_(b, l, m, null, false, false, null);\n        break;\n      }\n    }\n    return r;\n  }\n\n  public static boolean UnaryExpr(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"UnaryExpr\")) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_, null);\n    r = UnaryOp(b, l + 1);\n    p = r;\n    r = p && Expression(b, l, 5);\n    exit_section_(b, l, m, UNARY_EXPR, r, p, null);\n    return r || p;\n  }\n\n  // &ConversionPredicate Type ConversionTail\n  public static boolean ConversionExpr(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ConversionExpr\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _NONE_, CONVERSION_EXPR, \"<conversion expr>\");\n    r = ConversionExpr_0(b, l + 1);\n    r = r && Type(b, l + 1);\n    r = r && ConversionTail(b, l + 1);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  // &ConversionPredicate\n  private static boolean ConversionExpr_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ConversionExpr_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _AND_);\n    r = ConversionPredicate(b, l + 1);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  // LiteralTypeExprInner LiteralValue | TypeName LiteralValue\n  public static boolean CompositeLit(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"CompositeLit\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _NONE_, COMPOSITE_LIT, \"<composite lit>\");\n    r = CompositeLit_0(b, l + 1);\n    if (!r) r = CompositeLit_1(b, l + 1);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  // LiteralTypeExprInner LiteralValue\n  private static boolean CompositeLit_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"CompositeLit_0\")) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_);\n    r = LiteralTypeExprInner(b, l + 1);\n    p = r; // pin = LiteralTypeExprInner\n    r = r && LiteralValue(b, l + 1);\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // TypeName LiteralValue\n  private static boolean CompositeLit_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"CompositeLit_1\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = TypeName(b, l + 1);\n    r = r && LiteralValue(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // ReferenceExpression QualifiedReferenceExpression?\n  public static boolean OperandName(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"OperandName\")) return false;\n    if (!nextTokenIsSmart(b, IDENTIFIER)) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _COLLAPSE_, REFERENCE_EXPRESSION, null);\n    r = ReferenceExpression(b, l + 1);\n    r = r && OperandName_1(b, l + 1);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  // QualifiedReferenceExpression?\n  private static boolean OperandName_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"OperandName_1\")) return false;\n    QualifiedReferenceExpression(b, l + 1);\n    return true;\n  }\n\n  // <<isBuiltin>> BuiltinArgumentList\n  private static boolean BuiltinCallExpr_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"BuiltinCallExpr_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = isBuiltin(b, l + 1);\n    r = r && BuiltinArgumentList(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // '.' '(' &(!'type') Type ')'\n  private static boolean TypeAssertionExpr_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"TypeAssertionExpr_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = consumeTokenSmart(b, DOT);\n    r = r && consumeToken(b, LPAREN);\n    r = r && TypeAssertionExpr_0_2(b, l + 1);\n    r = r && Type(b, l + 1);\n    r = r && consumeToken(b, RPAREN);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // &(!'type')\n  private static boolean TypeAssertionExpr_0_2(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"TypeAssertionExpr_0_2\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _AND_);\n    r = TypeAssertionExpr_0_2_0(b, l + 1);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  // !'type'\n  private static boolean TypeAssertionExpr_0_2_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"TypeAssertionExpr_0_2_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _NOT_);\n    r = !consumeTokenSmart(b, TYPE_);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  // '.' !('(' 'type')\n  private static boolean SelectorExpr_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"SelectorExpr_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = consumeTokenSmart(b, DOT);\n    r = r && SelectorExpr_0_1(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // !('(' 'type')\n  private static boolean SelectorExpr_0_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"SelectorExpr_0_1\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _NOT_);\n    r = !SelectorExpr_0_1_0(b, l + 1);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  // '(' 'type'\n  private static boolean SelectorExpr_0_1_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"SelectorExpr_0_1_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = consumeTokenSmart(b, LPAREN);\n    r = r && consumeToken(b, TYPE_);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // '[' <<enterMode \"PAR\">> (SliceExprBody | IndexExprBody) <<exitModeSafe \"PAR\">> ']'\n  private static boolean IndexOrSliceExpr_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"IndexOrSliceExpr_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = consumeTokenSmart(b, LBRACK);\n    r = r && enterMode(b, l + 1, \"PAR\");\n    r = r && IndexOrSliceExpr_0_2(b, l + 1);\n    r = r && exitModeSafe(b, l + 1, \"PAR\");\n    r = r && consumeToken(b, RBRACK);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // SliceExprBody | IndexExprBody\n  private static boolean IndexOrSliceExpr_0_2(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"IndexOrSliceExpr_0_2\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = SliceExprBody(b, l + 1);\n    if (!r) r = IndexExprBody(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // int\n  //   | float\n  //   | floati\n  //   | decimali\n  //   | hex\n  //   | oct\n  //   | StringLiteral\n  //   | char\n  public static boolean Literal(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"Literal\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _COLLAPSE_, LITERAL, \"<literal>\");\n    r = consumeTokenSmart(b, INT);\n    if (!r) r = consumeTokenSmart(b, FLOAT);\n    if (!r) r = consumeTokenSmart(b, FLOATI);\n    if (!r) r = consumeTokenSmart(b, DECIMALI);\n    if (!r) r = consumeTokenSmart(b, HEX);\n    if (!r) r = consumeTokenSmart(b, OCT);\n    if (!r) r = StringLiteral(b, l + 1);\n    if (!r) r = consumeTokenSmart(b, CHAR);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  // func Signature Block\n  public static boolean FunctionLit(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"FunctionLit\")) return false;\n    if (!nextTokenIsSmart(b, FUNC)) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_, FUNCTION_LIT, null);\n    r = consumeTokenSmart(b, FUNC);\n    p = r; // pin = 1\n    r = r && report_error_(b, Signature(b, l + 1));\n    r = p && Block(b, l + 1) && r;\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  // '(' <<enterMode \"PAR\">> Expression <<exitModeSafe \"PAR\">>')'\n  public static boolean ParenthesesExpr(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"ParenthesesExpr\")) return false;\n    if (!nextTokenIsSmart(b, LPAREN)) return false;\n    boolean r, p;\n    Marker m = enter_section_(b, l, _NONE_, PARENTHESES_EXPR, null);\n    r = consumeTokenSmart(b, LPAREN);\n    p = r; // pin = 1\n    r = r && report_error_(b, enterMode(b, l + 1, \"PAR\"));\n    r = p && report_error_(b, Expression(b, l + 1, -1)) && r;\n    r = p && report_error_(b, exitModeSafe(b, l + 1, \"PAR\")) && r;\n    r = p && consumeToken(b, RPAREN) && r;\n    exit_section_(b, l, m, r, p, null);\n    return r || p;\n  }\n\n  final static Parser E_recover_parser_ = new Parser() {\n    public boolean parse(PsiBuilder b, int l) {\n      return E_recover(b, l + 1);\n    }\n  };\n  final static Parser Element_parser_ = new Parser() {\n    public boolean parse(PsiBuilder b, int l) {\n      return Element(b, l + 1);\n    }\n  };\n  final static Parser ExpressionListRecover_parser_ = new Parser() {\n    public boolean parse(PsiBuilder b, int l) {\n      return ExpressionListRecover(b, l + 1);\n    }\n  };\n  final static Parser ExpressionOrTypeWithRecover_parser_ = new Parser() {\n    public boolean parse(PsiBuilder b, int l) {\n      return ExpressionOrTypeWithRecover(b, l + 1);\n    }\n  };\n  final static Parser StatementRecover_parser_ = new Parser() {\n    public boolean parse(PsiBuilder b, int l) {\n      return StatementRecover(b, l + 1);\n    }\n  };\n  final static Parser Statements_parser_ = new Parser() {\n    public boolean parse(PsiBuilder b, int l) {\n      return Statements(b, l + 1);\n    }\n  };\n  final static Parser TopLevelDeclarationRecover_parser_ = new Parser() {\n    public boolean parse(PsiBuilder b, int l) {\n      return TopLevelDeclarationRecover(b, l + 1);\n    }\n  };\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoAddExpr.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoAddExpr extends GoBinaryExpr {\n\n  @Nullable\n  PsiElement getBitOr();\n\n  @Nullable\n  PsiElement getBitXor();\n\n  @Nullable\n  PsiElement getMinus();\n\n  @Nullable\n  PsiElement getPlus();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoAndExpr.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoAndExpr extends GoBinaryExpr {\n\n  @NotNull\n  PsiElement getCondAnd();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoAnonymousFieldDefinition.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.StubBasedPsiElement;\nimport com.goide.stubs.GoAnonymousFieldDefinitionStub;\nimport com.intellij.psi.ResolveState;\n\npublic interface GoAnonymousFieldDefinition extends GoNamedElement, StubBasedPsiElement<GoAnonymousFieldDefinitionStub> {\n\n  @NotNull\n  GoType getType();\n\n  @Nullable\n  PsiElement getIdentifier();\n\n  @Nullable\n  String getName();\n\n  @Nullable\n  GoTypeReferenceExpression getTypeReferenceExpression();\n\n  @Nullable\n  GoType getGoTypeInner(ResolveState context);\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoArgumentList.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoArgumentList extends GoCompositeElement {\n\n  @NotNull\n  List<GoExpression> getExpressionList();\n\n  @NotNull\n  PsiElement getLparen();\n\n  @Nullable\n  PsiElement getRparen();\n\n  @Nullable\n  PsiElement getTripleDot();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoArrayOrSliceType.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoArrayOrSliceType extends GoType {\n\n  @Nullable\n  GoExpression getExpression();\n\n  @Nullable\n  GoType getType();\n\n  @NotNull\n  PsiElement getLbrack();\n\n  @Nullable\n  PsiElement getRbrack();\n\n  @Nullable\n  PsiElement getTripleDot();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoAssignOp.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoAssignOp extends GoCompositeElement {\n\n  @Nullable\n  PsiElement getAssign();\n\n  @Nullable\n  PsiElement getBitAndAssign();\n\n  @Nullable\n  PsiElement getBitClearAssign();\n\n  @Nullable\n  PsiElement getBitOrAssign();\n\n  @Nullable\n  PsiElement getBitXorAssign();\n\n  @Nullable\n  PsiElement getMinusAssign();\n\n  @Nullable\n  PsiElement getMulAssign();\n\n  @Nullable\n  PsiElement getPlusAssign();\n\n  @Nullable\n  PsiElement getQuotientAssign();\n\n  @Nullable\n  PsiElement getRemainderAssign();\n\n  @Nullable\n  PsiElement getShiftLeftAssign();\n\n  @Nullable\n  PsiElement getShiftRightAssign();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoAssignmentStatement.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoAssignmentStatement extends GoStatement {\n\n  @NotNull\n  List<GoExpression> getExpressionList();\n\n  @NotNull\n  GoLeftHandExprList getLeftHandExprList();\n\n  @NotNull\n  GoAssignOp getAssignOp();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoBinaryExpr.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoBinaryExpr extends GoExpression {\n\n  @NotNull\n  List<GoExpression> getExpressionList();\n\n  @NotNull\n  GoExpression getLeft();\n\n  @Nullable\n  GoExpression getRight();\n\n  @Nullable\n  PsiElement getOperator();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoBlock.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.ResolveState;\nimport com.intellij.psi.scope.PsiScopeProcessor;\n\npublic interface GoBlock extends GoCompositeElement {\n\n  @NotNull\n  List<GoStatement> getStatementList();\n\n  @NotNull\n  PsiElement getLbrace();\n\n  @Nullable\n  PsiElement getRbrace();\n\n  boolean processDeclarations(PsiScopeProcessor processor, ResolveState state, PsiElement lastParent, PsiElement place);\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoBreakStatement.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoBreakStatement extends GoStatement {\n\n  @Nullable\n  GoLabelRef getLabelRef();\n\n  @NotNull\n  PsiElement getBreak();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoBuiltinArgumentList.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoBuiltinArgumentList extends GoArgumentList {\n\n  @Nullable\n  GoType getType();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoBuiltinCallExpr.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoBuiltinCallExpr extends GoExpression {\n\n  @Nullable\n  GoBuiltinArgumentList getBuiltinArgumentList();\n\n  @NotNull\n  GoReferenceExpression getReferenceExpression();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoCallExpr.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoCallExpr extends GoExpression {\n\n  @NotNull\n  GoArgumentList getArgumentList();\n\n  @NotNull\n  GoExpression getExpression();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoChannelType.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoChannelType extends GoType {\n\n  @Nullable\n  GoType getType();\n\n  @Nullable\n  PsiElement getSendChannel();\n\n  @Nullable\n  PsiElement getChan();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoCommCase.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoCommCase extends GoCompositeElement {\n\n  @Nullable\n  GoRecvStatement getRecvStatement();\n\n  @Nullable\n  GoSendStatement getSendStatement();\n\n  @Nullable\n  PsiElement getCase();\n\n  @Nullable\n  PsiElement getDefault();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoCommClause.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoCommClause extends GoCompositeElement {\n\n  @NotNull\n  GoCommCase getCommCase();\n\n  @NotNull\n  List<GoStatement> getStatementList();\n\n  @Nullable\n  PsiElement getColon();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoCompositeLit.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoCompositeLit extends GoExpression {\n\n  @Nullable\n  GoLiteralValue getLiteralValue();\n\n  @Nullable\n  GoType getType();\n\n  @Nullable\n  GoTypeReferenceExpression getTypeReferenceExpression();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoConditionalExpr.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoConditionalExpr extends GoBinaryExpr {\n\n  @Nullable\n  PsiElement getEq();\n\n  @Nullable\n  PsiElement getGreater();\n\n  @Nullable\n  PsiElement getGreaterOrEqual();\n\n  @Nullable\n  PsiElement getLess();\n\n  @Nullable\n  PsiElement getLessOrEqual();\n\n  @Nullable\n  PsiElement getNotEq();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoConstDeclaration.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoConstDeclaration extends GoTopLevelDeclaration {\n\n  @NotNull\n  List<GoConstSpec> getConstSpecList();\n\n  @Nullable\n  PsiElement getLparen();\n\n  @Nullable\n  PsiElement getRparen();\n\n  @NotNull\n  PsiElement getConst();\n\n  @NotNull\n  GoConstSpec addSpec(String name, String type, String value, GoConstSpec specAnchor);\n\n  void deleteSpec(GoConstSpec specToDelete);\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoConstDefinition.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.StubBasedPsiElement;\nimport com.goide.stubs.GoConstDefinitionStub;\nimport com.intellij.psi.ResolveState;\n\npublic interface GoConstDefinition extends GoNamedElement, StubBasedPsiElement<GoConstDefinitionStub> {\n\n  @NotNull\n  PsiElement getIdentifier();\n\n  @Nullable\n  GoType getGoTypeInner(ResolveState context);\n\n  @Nullable\n  GoExpression getValue();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoConstSpec.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.StubBasedPsiElement;\nimport com.goide.stubs.GoConstSpecStub;\n\npublic interface GoConstSpec extends GoCompositeElement, StubBasedPsiElement<GoConstSpecStub> {\n\n  @NotNull\n  List<GoConstDefinition> getConstDefinitionList();\n\n  @NotNull\n  List<GoExpression> getExpressionList();\n\n  @Nullable\n  GoType getType();\n\n  @Nullable\n  PsiElement getAssign();\n\n  void deleteDefinition(GoConstDefinition definitionToDelete);\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoContinueStatement.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoContinueStatement extends GoStatement {\n\n  @Nullable\n  GoLabelRef getLabelRef();\n\n  @NotNull\n  PsiElement getContinue();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoConversionExpr.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoConversionExpr extends GoBinaryExpr {\n\n  @Nullable\n  GoExpression getExpression();\n\n  @NotNull\n  GoType getType();\n\n  @Nullable\n  PsiElement getComma();\n\n  @NotNull\n  PsiElement getLparen();\n\n  @Nullable\n  PsiElement getRparen();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoDeferStatement.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoDeferStatement extends GoStatement {\n\n  @Nullable\n  GoExpression getExpression();\n\n  @NotNull\n  PsiElement getDefer();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoElement.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoElement extends GoCompositeElement {\n\n  @Nullable\n  GoKey getKey();\n\n  @Nullable\n  GoValue getValue();\n\n  @Nullable\n  PsiElement getColon();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoElseStatement.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoElseStatement extends GoStatement {\n\n  @Nullable\n  GoIfStatement getIfStatement();\n\n  @NotNull\n  PsiElement getElse();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoExprCaseClause.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoExprCaseClause extends GoCaseClause {\n\n  @NotNull\n  List<GoExpression> getExpressionList();\n\n  @NotNull\n  List<GoStatement> getStatementList();\n\n  @Nullable\n  PsiElement getColon();\n\n  @Nullable\n  PsiElement getCase();\n\n  @Nullable\n  PsiElement getDefault();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoExprSwitchStatement.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoExprSwitchStatement extends GoSwitchStatement {\n\n  @NotNull\n  List<GoExprCaseClause> getExprCaseClauseList();\n\n  @Nullable\n  GoExpression getExpression();\n\n  @Nullable\n  GoStatement getStatement();\n\n  @NotNull\n  GoSwitchStart getSwitchStart();\n\n  @NotNull\n  PsiElement getLbrace();\n\n  @Nullable\n  PsiElement getRbrace();\n\n  @Nullable\n  PsiElement getSemicolon();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoExpression.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.ResolveState;\n\npublic interface GoExpression extends GoTypeOwner {\n\n  @Nullable\n  GoType getGoType(ResolveState context);\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoFallthroughStatement.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoFallthroughStatement extends GoStatement {\n\n  @NotNull\n  PsiElement getFallthrough();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoFieldDeclaration.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoFieldDeclaration extends GoCompositeElement {\n\n  @Nullable\n  GoAnonymousFieldDefinition getAnonymousFieldDefinition();\n\n  @NotNull\n  List<GoFieldDefinition> getFieldDefinitionList();\n\n  @Nullable\n  GoTag getTag();\n\n  @Nullable\n  GoType getType();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoFieldDefinition.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.StubBasedPsiElement;\nimport com.goide.stubs.GoFieldDefinitionStub;\n\npublic interface GoFieldDefinition extends GoNamedElement, StubBasedPsiElement<GoFieldDefinitionStub> {\n\n  @NotNull\n  PsiElement getIdentifier();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoFieldName.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiReference;\n\npublic interface GoFieldName extends GoReferenceExpressionBase {\n\n  @NotNull\n  PsiElement getIdentifier();\n\n  @NotNull\n  PsiReference getReference();\n\n  @Nullable\n  GoReferenceExpression getQualifier();\n\n  @Nullable\n  PsiElement resolve();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoForClause.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.ResolveState;\nimport com.intellij.psi.scope.PsiScopeProcessor;\n\npublic interface GoForClause extends GoCompositeElement {\n\n  @Nullable\n  GoExpression getExpression();\n\n  @NotNull\n  List<GoStatement> getStatementList();\n\n  boolean processDeclarations(PsiScopeProcessor processor, ResolveState state, PsiElement lastParent, PsiElement place);\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoForStatement.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoForStatement extends GoStatement {\n\n  @Nullable\n  GoExpression getExpression();\n\n  @Nullable\n  GoForClause getForClause();\n\n  @Nullable\n  GoRangeClause getRangeClause();\n\n  @NotNull\n  PsiElement getFor();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoFunctionDeclaration.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.StubBasedPsiElement;\nimport com.goide.stubs.GoFunctionDeclarationStub;\n\npublic interface GoFunctionDeclaration extends GoFunctionOrMethodDeclaration, StubBasedPsiElement<GoFunctionDeclarationStub> {\n\n  @Nullable\n  GoBlock getBlock();\n\n  @Nullable\n  GoSignature getSignature();\n\n  @NotNull\n  PsiElement getFunc();\n\n  @NotNull\n  PsiElement getIdentifier();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoFunctionLit.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.ResolveState;\nimport com.intellij.psi.scope.PsiScopeProcessor;\n\npublic interface GoFunctionLit extends GoExpression, GoSignatureOwner {\n\n  @Nullable\n  GoBlock getBlock();\n\n  @Nullable\n  GoSignature getSignature();\n\n  @NotNull\n  PsiElement getFunc();\n\n  boolean processDeclarations(PsiScopeProcessor processor, ResolveState state, PsiElement lastParent, PsiElement place);\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoFunctionType.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoFunctionType extends GoType, GoSignatureOwner {\n\n  @Nullable\n  GoSignature getSignature();\n\n  @NotNull\n  PsiElement getFunc();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoGoStatement.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoGoStatement extends GoStatement {\n\n  @Nullable\n  GoExpression getExpression();\n\n  @NotNull\n  PsiElement getGo();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoGotoStatement.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoGotoStatement extends GoStatement {\n\n  @Nullable\n  GoLabelRef getLabelRef();\n\n  @NotNull\n  PsiElement getGoto();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoIfStatement.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoIfStatement extends GoStatement {\n\n  @Nullable\n  GoElseStatement getElseStatement();\n\n  @Nullable\n  GoExpression getExpression();\n\n  @Nullable\n  GoStatement getStatement();\n\n  @Nullable\n  PsiElement getSemicolon();\n\n  @NotNull\n  PsiElement getIf();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoImportDeclaration.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoImportDeclaration extends GoCompositeElement {\n\n  @NotNull\n  List<GoImportSpec> getImportSpecList();\n\n  @Nullable\n  PsiElement getLparen();\n\n  @Nullable\n  PsiElement getRparen();\n\n  @NotNull\n  PsiElement getImport();\n\n  @NotNull\n  GoImportSpec addImportSpec(String packagePath, String alias);\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoImportList.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoImportList extends GoCompositeElement {\n\n  @NotNull\n  List<GoImportDeclaration> getImportDeclarationList();\n\n  @NotNull\n  GoImportSpec addImport(String packagePath, String alias);\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoImportSpec.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.StubBasedPsiElement;\nimport com.goide.stubs.GoImportSpecStub;\n\npublic interface GoImportSpec extends GoNamedElement, StubBasedPsiElement<GoImportSpecStub> {\n\n  @NotNull\n  GoImportString getImportString();\n\n  @Nullable\n  PsiElement getDot();\n\n  @Nullable\n  PsiElement getIdentifier();\n\n  String getAlias();\n\n  String getLocalPackageName();\n\n  boolean shouldGoDeeper();\n\n  boolean isForSideEffects();\n\n  boolean isDot();\n\n  @NotNull\n  String getPath();\n\n  String getName();\n\n  boolean isCImport();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoImportString.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.openapi.util.TextRange;\nimport com.intellij.psi.PsiDirectory;\nimport com.intellij.psi.PsiReference;\n\npublic interface GoImportString extends GoCompositeElement {\n\n  @NotNull\n  GoStringLiteral getStringLiteral();\n\n  @NotNull\n  PsiReference[] getReferences();\n\n  @Nullable\n  PsiDirectory resolve();\n\n  @NotNull\n  String getPath();\n\n  @NotNull\n  TextRange getPathTextRange();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoIncDecStatement.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoIncDecStatement extends GoStatement {\n\n  @NotNull\n  GoExpression getExpression();\n\n  @Nullable\n  PsiElement getMinusMinus();\n\n  @Nullable\n  PsiElement getPlusPlus();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoIndexOrSliceExpr.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.openapi.util.Trinity;\n\npublic interface GoIndexOrSliceExpr extends GoExpression {\n\n  @NotNull\n  List<GoExpression> getExpressionList();\n\n  @NotNull\n  PsiElement getLbrack();\n\n  @Nullable\n  PsiElement getRbrack();\n\n  @Nullable\n  GoExpression getExpression();\n\n  @NotNull\n  Trinity<GoExpression, GoExpression, GoExpression> getIndices();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoInterfaceType.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoInterfaceType extends GoType {\n\n  @NotNull\n  List<GoMethodSpec> getMethodSpecList();\n\n  @Nullable\n  PsiElement getLbrace();\n\n  @Nullable\n  PsiElement getRbrace();\n\n  @NotNull\n  PsiElement getInterface();\n\n  @NotNull\n  List<GoMethodSpec> getMethods();\n\n  @NotNull\n  List<GoTypeReferenceExpression> getBaseTypesReferences();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoKey.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoKey extends GoCompositeElement {\n\n  @Nullable\n  GoExpression getExpression();\n\n  @Nullable\n  GoFieldName getFieldName();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoLabelDefinition.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.StubBasedPsiElement;\nimport com.goide.stubs.GoLabelDefinitionStub;\n\npublic interface GoLabelDefinition extends GoNamedElement, StubBasedPsiElement<GoLabelDefinitionStub> {\n\n  @NotNull\n  PsiElement getIdentifier();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoLabelRef.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiReference;\n\npublic interface GoLabelRef extends GoCompositeElement {\n\n  @NotNull\n  PsiElement getIdentifier();\n\n  @NotNull\n  PsiReference getReference();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoLabeledStatement.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoLabeledStatement extends GoStatement {\n\n  @NotNull\n  GoLabelDefinition getLabelDefinition();\n\n  @Nullable\n  GoStatement getStatement();\n\n  @NotNull\n  PsiElement getColon();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoLeftHandExprList.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoLeftHandExprList extends GoCompositeElement {\n\n  @NotNull\n  List<GoExpression> getExpressionList();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoLiteral.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoLiteral extends GoExpression {\n\n  @Nullable\n  PsiElement getChar();\n\n  @Nullable\n  PsiElement getDecimali();\n\n  @Nullable\n  PsiElement getFloat();\n\n  @Nullable\n  PsiElement getFloati();\n\n  @Nullable\n  PsiElement getHex();\n\n  @Nullable\n  PsiElement getInt();\n\n  @Nullable\n  PsiElement getOct();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoLiteralTypeExpr.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoLiteralTypeExpr extends GoExpression {\n\n  @Nullable\n  GoType getType();\n\n  @Nullable\n  GoTypeReferenceExpression getTypeReferenceExpression();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoLiteralValue.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoLiteralValue extends GoCompositeElement {\n\n  @NotNull\n  List<GoElement> getElementList();\n\n  @NotNull\n  PsiElement getLbrace();\n\n  @Nullable\n  PsiElement getRbrace();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoMapType.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoMapType extends GoType {\n\n  @NotNull\n  List<GoType> getTypeList();\n\n  @Nullable\n  PsiElement getLbrack();\n\n  @Nullable\n  PsiElement getRbrack();\n\n  @NotNull\n  PsiElement getMap();\n\n  @Nullable\n  GoType getKeyType();\n\n  @Nullable\n  GoType getValueType();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoMethodDeclaration.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.StubBasedPsiElement;\nimport com.goide.stubs.GoMethodDeclarationStub;\n\npublic interface GoMethodDeclaration extends GoFunctionOrMethodDeclaration, StubBasedPsiElement<GoMethodDeclarationStub> {\n\n  @Nullable\n  GoBlock getBlock();\n\n  @Nullable\n  GoReceiver getReceiver();\n\n  @Nullable\n  GoSignature getSignature();\n\n  @NotNull\n  PsiElement getFunc();\n\n  @Nullable\n  PsiElement getIdentifier();\n\n  @Nullable\n  GoType getReceiverType();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoMethodSpec.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.StubBasedPsiElement;\nimport com.goide.stubs.GoMethodSpecStub;\nimport com.intellij.psi.ResolveState;\n\npublic interface GoMethodSpec extends GoNamedSignatureOwner, StubBasedPsiElement<GoMethodSpecStub> {\n\n  @Nullable\n  GoSignature getSignature();\n\n  @Nullable\n  GoTypeReferenceExpression getTypeReferenceExpression();\n\n  @Nullable\n  PsiElement getIdentifier();\n\n  @Nullable\n  GoType getGoTypeInner(ResolveState context);\n\n  @Nullable\n  String getName();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoMulExpr.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoMulExpr extends GoBinaryExpr {\n\n  @Nullable\n  PsiElement getBitAnd();\n\n  @Nullable\n  PsiElement getBitClear();\n\n  @Nullable\n  PsiElement getMul();\n\n  @Nullable\n  PsiElement getQuotient();\n\n  @Nullable\n  PsiElement getRemainder();\n\n  @Nullable\n  PsiElement getShiftLeft();\n\n  @Nullable\n  PsiElement getShiftRight();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoOrExpr.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoOrExpr extends GoBinaryExpr {\n\n  @NotNull\n  PsiElement getCondOr();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoPackageClause.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.StubBasedPsiElement;\nimport com.goide.stubs.GoPackageClauseStub;\n\npublic interface GoPackageClause extends GoCompositeElement, StubBasedPsiElement<GoPackageClauseStub> {\n\n  @Nullable\n  PsiElement getIdentifier();\n\n  @NotNull\n  PsiElement getPackage();\n\n  @Nullable\n  String getName();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoParType.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoParType extends GoType {\n\n  @NotNull\n  GoType getType();\n\n  @NotNull\n  PsiElement getLparen();\n\n  @NotNull\n  PsiElement getRparen();\n\n  @NotNull\n  GoType getActualType();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoParamDefinition.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.StubBasedPsiElement;\nimport com.goide.stubs.GoParamDefinitionStub;\n\npublic interface GoParamDefinition extends GoNamedElement, StubBasedPsiElement<GoParamDefinitionStub> {\n\n  @NotNull\n  PsiElement getIdentifier();\n\n  boolean isVariadic();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoParameterDeclaration.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.StubBasedPsiElement;\nimport com.goide.stubs.GoParameterDeclarationStub;\n\npublic interface GoParameterDeclaration extends GoCompositeElement, StubBasedPsiElement<GoParameterDeclarationStub> {\n\n  @NotNull\n  List<GoParamDefinition> getParamDefinitionList();\n\n  @NotNull\n  GoType getType();\n\n  @Nullable\n  PsiElement getTripleDot();\n\n  boolean isVariadic();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoParameters.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.StubBasedPsiElement;\nimport com.goide.stubs.GoParametersStub;\n\npublic interface GoParameters extends GoCompositeElement, StubBasedPsiElement<GoParametersStub> {\n\n  @NotNull\n  List<GoParameterDeclaration> getParameterDeclarationList();\n\n  @Nullable\n  GoType getType();\n\n  @NotNull\n  PsiElement getLparen();\n\n  @Nullable\n  PsiElement getRparen();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoParenthesesExpr.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoParenthesesExpr extends GoExpression {\n\n  @Nullable\n  GoExpression getExpression();\n\n  @NotNull\n  PsiElement getLparen();\n\n  @Nullable\n  PsiElement getRparen();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoPointerType.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoPointerType extends GoType {\n\n  @Nullable\n  GoType getType();\n\n  @NotNull\n  PsiElement getMul();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoRangeClause.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoRangeClause extends GoVarSpec {\n\n  @NotNull\n  List<GoVarDefinition> getVarDefinitionList();\n\n  @Nullable\n  PsiElement getVarAssign();\n\n  @Nullable\n  PsiElement getRange();\n\n  @Nullable\n  GoExpression getRangeExpression();\n\n  @NotNull\n  List<GoExpression> getLeftExpressionsList();\n\n  @NotNull\n  List<GoExpression> getRightExpressionsList();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoReceiver.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.StubBasedPsiElement;\nimport com.goide.stubs.GoReceiverStub;\nimport com.intellij.psi.ResolveState;\n\npublic interface GoReceiver extends GoNamedElement, StubBasedPsiElement<GoReceiverStub> {\n\n  @Nullable\n  GoType getType();\n\n  @Nullable\n  PsiElement getComma();\n\n  @NotNull\n  PsiElement getLparen();\n\n  @Nullable\n  PsiElement getRparen();\n\n  @Nullable\n  PsiElement getIdentifier();\n\n  @Nullable\n  GoType getGoTypeInner(ResolveState context);\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoRecvStatement.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoRecvStatement extends GoVarSpec {\n\n  @NotNull\n  List<GoExpression> getExpressionList();\n\n  @NotNull\n  List<GoVarDefinition> getVarDefinitionList();\n\n  @Nullable\n  PsiElement getVarAssign();\n\n  @Nullable\n  GoExpression getRecvExpression();\n\n  @NotNull\n  List<GoExpression> getLeftExpressionsList();\n\n  @NotNull\n  List<GoExpression> getRightExpressionsList();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoReferenceExpression.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\nimport com.goide.psi.impl.GoReference;\nimport com.intellij.codeInsight.highlighting.ReadWriteAccessDetector.Access;\n\npublic interface GoReferenceExpression extends GoExpression, GoReferenceExpressionBase {\n\n  @NotNull\n  PsiElement getIdentifier();\n\n  @NotNull\n  GoReference getReference();\n\n  @Nullable\n  GoReferenceExpression getQualifier();\n\n  @Nullable\n  PsiElement resolve();\n\n  @NotNull\n  Access getReadWriteAccess();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoResult.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.StubBasedPsiElement;\nimport com.goide.stubs.GoResultStub;\n\npublic interface GoResult extends GoCompositeElement, StubBasedPsiElement<GoResultStub> {\n\n  @Nullable\n  GoParameters getParameters();\n\n  @Nullable\n  GoType getType();\n\n  @Nullable\n  PsiElement getLparen();\n\n  @Nullable\n  PsiElement getRparen();\n\n  boolean isVoid();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoReturnStatement.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoReturnStatement extends GoStatement {\n\n  @NotNull\n  List<GoExpression> getExpressionList();\n\n  @NotNull\n  PsiElement getReturn();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoSelectStatement.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoSelectStatement extends GoStatement {\n\n  @NotNull\n  List<GoCommClause> getCommClauseList();\n\n  @Nullable\n  PsiElement getLbrace();\n\n  @Nullable\n  PsiElement getRbrace();\n\n  @NotNull\n  PsiElement getSelect();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoSelectorExpr.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoSelectorExpr extends GoBinaryExpr {\n\n  @NotNull\n  PsiElement getDot();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoSendStatement.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoSendStatement extends GoStatement {\n\n  @NotNull\n  List<GoExpression> getExpressionList();\n\n  @Nullable\n  GoLeftHandExprList getLeftHandExprList();\n\n  @NotNull\n  PsiElement getSendChannel();\n\n  @Nullable\n  GoExpression getSendExpression();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoShortVarDeclaration.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoShortVarDeclaration extends GoVarSpec {\n\n  @NotNull\n  PsiElement getVarAssign();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoSignature.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.StubBasedPsiElement;\nimport com.goide.stubs.GoSignatureStub;\n\npublic interface GoSignature extends GoCompositeElement, StubBasedPsiElement<GoSignatureStub> {\n\n  @NotNull\n  GoParameters getParameters();\n\n  @Nullable\n  GoResult getResult();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoSimpleStatement.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoSimpleStatement extends GoStatement {\n\n  @Nullable\n  GoLeftHandExprList getLeftHandExprList();\n\n  @Nullable\n  GoShortVarDeclaration getShortVarDeclaration();\n\n  @Nullable\n  GoStatement getStatement();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoSpecType.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.StubBasedPsiElement;\nimport com.goide.stubs.GoTypeStub;\n\npublic interface GoSpecType extends GoType, StubBasedPsiElement<GoTypeStub> {\n\n  @Nullable\n  GoType getType();\n\n  @NotNull\n  PsiElement getIdentifier();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoStatement.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.ResolveState;\nimport com.intellij.psi.scope.PsiScopeProcessor;\n\npublic interface GoStatement extends GoCompositeElement {\n\n  @Nullable\n  GoBlock getBlock();\n\n  @Nullable\n  GoConstDeclaration getConstDeclaration();\n\n  @Nullable\n  GoTypeDeclaration getTypeDeclaration();\n\n  @Nullable\n  GoVarDeclaration getVarDeclaration();\n\n  boolean processDeclarations(PsiScopeProcessor processor, ResolveState state, PsiElement lastParent, PsiElement place);\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoStringLiteral.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiLanguageInjectionHost;\nimport com.goide.psi.impl.GoStringLiteralImpl;\nimport com.goide.util.GoStringLiteralEscaper;\n\npublic interface GoStringLiteral extends GoExpression, PsiLanguageInjectionHost {\n\n  @Nullable\n  PsiElement getRawString();\n\n  @Nullable\n  PsiElement getString();\n\n  boolean isValidHost();\n\n  @NotNull\n  GoStringLiteralImpl updateText(String text);\n\n  @NotNull\n  GoStringLiteralEscaper createLiteralTextEscaper();\n\n  @NotNull\n  String getDecodedText();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoStructType.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoStructType extends GoType {\n\n  @NotNull\n  List<GoFieldDeclaration> getFieldDeclarationList();\n\n  @Nullable\n  PsiElement getLbrace();\n\n  @Nullable\n  PsiElement getRbrace();\n\n  @NotNull\n  PsiElement getStruct();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoSwitchStart.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoSwitchStart extends GoCompositeElement {\n\n  @NotNull\n  PsiElement getSwitch();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoSwitchStatement.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoSwitchStatement extends GoStatement {\n\n  @Nullable\n  GoSwitchStart getSwitchStart();\n\n  @Nullable\n  GoSwitchStatement getSwitchStatement();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoTag.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoTag extends GoCompositeElement {\n\n  @NotNull\n  GoStringLiteral getStringLiteral();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoType.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.StubBasedPsiElement;\nimport com.goide.stubs.GoTypeStub;\n\npublic interface GoType extends GoCompositeElement, StubBasedPsiElement<GoTypeStub> {\n\n  @Nullable\n  GoTypeReferenceExpression getTypeReferenceExpression();\n\n  @NotNull\n  GoType getUnderlyingType();\n\n  boolean shouldGoDeeper();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoTypeAssertionExpr.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoTypeAssertionExpr extends GoExpression {\n\n  @NotNull\n  GoExpression getExpression();\n\n  @NotNull\n  GoType getType();\n\n  @NotNull\n  PsiElement getDot();\n\n  @NotNull\n  PsiElement getLparen();\n\n  @NotNull\n  PsiElement getRparen();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoTypeCaseClause.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoTypeCaseClause extends GoCaseClause {\n\n  @NotNull\n  List<GoStatement> getStatementList();\n\n  @Nullable\n  GoType getType();\n\n  @Nullable\n  PsiElement getColon();\n\n  @Nullable\n  PsiElement getCase();\n\n  @Nullable\n  PsiElement getDefault();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoTypeDeclaration.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoTypeDeclaration extends GoTopLevelDeclaration {\n\n  @NotNull\n  List<GoTypeSpec> getTypeSpecList();\n\n  @Nullable\n  PsiElement getLparen();\n\n  @Nullable\n  PsiElement getRparen();\n\n  @NotNull\n  PsiElement getType_();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoTypeGuard.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoTypeGuard extends GoCompositeElement {\n\n  @NotNull\n  PsiElement getLparen();\n\n  @Nullable\n  PsiElement getRparen();\n\n  @NotNull\n  PsiElement getType_();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoTypeList.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoTypeList extends GoType {\n\n  @NotNull\n  List<GoType> getTypeList();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoTypeReferenceExpression.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiReference;\n\npublic interface GoTypeReferenceExpression extends GoReferenceExpressionBase {\n\n  @NotNull\n  PsiElement getIdentifier();\n\n  @NotNull\n  PsiReference getReference();\n\n  @Nullable\n  GoTypeReferenceExpression getQualifier();\n\n  @Nullable\n  PsiElement resolve();\n\n  @Nullable\n  GoType resolveType();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoTypeSpec.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.StubBasedPsiElement;\nimport com.goide.stubs.GoTypeSpecStub;\nimport com.intellij.psi.ResolveState;\n\npublic interface GoTypeSpec extends GoNamedElement, StubBasedPsiElement<GoTypeSpecStub> {\n\n  @NotNull\n  GoSpecType getSpecType();\n\n  @Nullable\n  GoType getGoTypeInner(ResolveState context);\n\n  @NotNull\n  List<GoMethodDeclaration> getMethods();\n\n  boolean shouldGoDeeper();\n\n  @NotNull\n  PsiElement getIdentifier();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoTypeSwitchGuard.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoTypeSwitchGuard extends GoCompositeElement {\n\n  @NotNull\n  GoExpression getExpression();\n\n  @NotNull\n  GoTypeGuard getTypeGuard();\n\n  @Nullable\n  GoVarDefinition getVarDefinition();\n\n  @NotNull\n  PsiElement getDot();\n\n  @Nullable\n  PsiElement getVarAssign();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoTypeSwitchStatement.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoTypeSwitchStatement extends GoSwitchStatement {\n\n  @Nullable\n  GoStatement getStatement();\n\n  @NotNull\n  GoSwitchStart getSwitchStart();\n\n  @NotNull\n  List<GoTypeCaseClause> getTypeCaseClauseList();\n\n  @NotNull\n  GoTypeSwitchGuard getTypeSwitchGuard();\n\n  @Nullable\n  PsiElement getLbrace();\n\n  @Nullable\n  PsiElement getRbrace();\n\n  @Nullable\n  PsiElement getSemicolon();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoUnaryExpr.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoUnaryExpr extends GoExpression {\n\n  @Nullable\n  GoExpression getExpression();\n\n  @Nullable\n  PsiElement getBitAnd();\n\n  @Nullable\n  PsiElement getBitXor();\n\n  @Nullable\n  PsiElement getMinus();\n\n  @Nullable\n  PsiElement getMul();\n\n  @Nullable\n  PsiElement getNot();\n\n  @Nullable\n  PsiElement getPlus();\n\n  @Nullable\n  PsiElement getSendChannel();\n\n  @Nullable\n  PsiElement getOperator();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoValue.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoValue extends GoCompositeElement {\n\n  @Nullable\n  GoExpression getExpression();\n\n  @Nullable\n  GoLiteralValue getLiteralValue();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoVarDeclaration.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface GoVarDeclaration extends GoTopLevelDeclaration {\n\n  @NotNull\n  List<GoVarSpec> getVarSpecList();\n\n  @Nullable\n  PsiElement getLparen();\n\n  @Nullable\n  PsiElement getRparen();\n\n  @NotNull\n  PsiElement getVar();\n\n  @NotNull\n  GoVarSpec addSpec(String name, String type, String value, GoVarSpec specAnchor);\n\n  void deleteSpec(GoVarSpec specToDelete);\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoVarDefinition.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.StubBasedPsiElement;\nimport com.goide.stubs.GoVarDefinitionStub;\nimport com.intellij.psi.PsiReference;\nimport com.intellij.psi.ResolveState;\n\npublic interface GoVarDefinition extends GoNamedElement, StubBasedPsiElement<GoVarDefinitionStub> {\n\n  @NotNull\n  PsiElement getIdentifier();\n\n  @Nullable\n  GoType getGoTypeInner(ResolveState context);\n\n  @Nullable\n  PsiReference getReference();\n\n  @Nullable\n  GoExpression getValue();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoVarSpec.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.StubBasedPsiElement;\nimport com.goide.stubs.GoVarSpecStub;\nimport com.intellij.psi.ResolveState;\nimport com.intellij.psi.scope.PsiScopeProcessor;\n\npublic interface GoVarSpec extends GoCompositeElement, StubBasedPsiElement<GoVarSpecStub> {\n\n  @NotNull\n  List<GoExpression> getExpressionList();\n\n  @Nullable\n  GoType getType();\n\n  @NotNull\n  List<GoVarDefinition> getVarDefinitionList();\n\n  @Nullable\n  PsiElement getAssign();\n\n  boolean processDeclarations(PsiScopeProcessor processor, ResolveState state, PsiElement lastParent, PsiElement place);\n\n  void deleteDefinition(GoVarDefinition definitionToDelete);\n\n  @NotNull\n  List<GoExpression> getRightExpressionsList();\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/GoVisitor.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi;\n\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.intellij.psi.PsiLanguageInjectionHost;\n\npublic class GoVisitor extends PsiElementVisitor {\n\n  public void visitAddExpr(@NotNull GoAddExpr o) {\n    visitBinaryExpr(o);\n  }\n\n  public void visitAndExpr(@NotNull GoAndExpr o) {\n    visitBinaryExpr(o);\n  }\n\n  public void visitAnonymousFieldDefinition(@NotNull GoAnonymousFieldDefinition o) {\n    visitNamedElement(o);\n  }\n\n  public void visitArgumentList(@NotNull GoArgumentList o) {\n    visitCompositeElement(o);\n  }\n\n  public void visitArrayOrSliceType(@NotNull GoArrayOrSliceType o) {\n    visitType(o);\n  }\n\n  public void visitAssignmentStatement(@NotNull GoAssignmentStatement o) {\n    visitStatement(o);\n  }\n\n  public void visitBinaryExpr(@NotNull GoBinaryExpr o) {\n    visitExpression(o);\n  }\n\n  public void visitBlock(@NotNull GoBlock o) {\n    visitCompositeElement(o);\n  }\n\n  public void visitBreakStatement(@NotNull GoBreakStatement o) {\n    visitStatement(o);\n  }\n\n  public void visitBuiltinArgumentList(@NotNull GoBuiltinArgumentList o) {\n    visitArgumentList(o);\n  }\n\n  public void visitBuiltinCallExpr(@NotNull GoBuiltinCallExpr o) {\n    visitExpression(o);\n  }\n\n  public void visitCallExpr(@NotNull GoCallExpr o) {\n    visitExpression(o);\n  }\n\n  public void visitChannelType(@NotNull GoChannelType o) {\n    visitType(o);\n  }\n\n  public void visitCommCase(@NotNull GoCommCase o) {\n    visitCompositeElement(o);\n  }\n\n  public void visitCommClause(@NotNull GoCommClause o) {\n    visitCompositeElement(o);\n  }\n\n  public void visitCompositeLit(@NotNull GoCompositeLit o) {\n    visitExpression(o);\n  }\n\n  public void visitConditionalExpr(@NotNull GoConditionalExpr o) {\n    visitBinaryExpr(o);\n  }\n\n  public void visitConstDeclaration(@NotNull GoConstDeclaration o) {\n    visitTopLevelDeclaration(o);\n  }\n\n  public void visitConstDefinition(@NotNull GoConstDefinition o) {\n    visitNamedElement(o);\n  }\n\n  public void visitConstSpec(@NotNull GoConstSpec o) {\n    visitCompositeElement(o);\n  }\n\n  public void visitContinueStatement(@NotNull GoContinueStatement o) {\n    visitStatement(o);\n  }\n\n  public void visitConversionExpr(@NotNull GoConversionExpr o) {\n    visitBinaryExpr(o);\n  }\n\n  public void visitDeferStatement(@NotNull GoDeferStatement o) {\n    visitStatement(o);\n  }\n\n  public void visitElement(@NotNull GoElement o) {\n    visitCompositeElement(o);\n  }\n\n  public void visitElseStatement(@NotNull GoElseStatement o) {\n    visitStatement(o);\n  }\n\n  public void visitExprCaseClause(@NotNull GoExprCaseClause o) {\n    visitCaseClause(o);\n  }\n\n  public void visitExprSwitchStatement(@NotNull GoExprSwitchStatement o) {\n    visitSwitchStatement(o);\n  }\n\n  public void visitExpression(@NotNull GoExpression o) {\n    visitTypeOwner(o);\n  }\n\n  public void visitFallthroughStatement(@NotNull GoFallthroughStatement o) {\n    visitStatement(o);\n  }\n\n  public void visitFieldDeclaration(@NotNull GoFieldDeclaration o) {\n    visitCompositeElement(o);\n  }\n\n  public void visitFieldDefinition(@NotNull GoFieldDefinition o) {\n    visitNamedElement(o);\n  }\n\n  public void visitFieldName(@NotNull GoFieldName o) {\n    visitReferenceExpressionBase(o);\n  }\n\n  public void visitForClause(@NotNull GoForClause o) {\n    visitCompositeElement(o);\n  }\n\n  public void visitForStatement(@NotNull GoForStatement o) {\n    visitStatement(o);\n  }\n\n  public void visitFunctionDeclaration(@NotNull GoFunctionDeclaration o) {\n    visitFunctionOrMethodDeclaration(o);\n  }\n\n  public void visitFunctionLit(@NotNull GoFunctionLit o) {\n    visitExpression(o);\n    // visitSignatureOwner(o);\n  }\n\n  public void visitFunctionType(@NotNull GoFunctionType o) {\n    visitType(o);\n    // visitSignatureOwner(o);\n  }\n\n  public void visitGoStatement(@NotNull GoGoStatement o) {\n    visitStatement(o);\n  }\n\n  public void visitGotoStatement(@NotNull GoGotoStatement o) {\n    visitStatement(o);\n  }\n\n  public void visitIfStatement(@NotNull GoIfStatement o) {\n    visitStatement(o);\n  }\n\n  public void visitImportDeclaration(@NotNull GoImportDeclaration o) {\n    visitCompositeElement(o);\n  }\n\n  public void visitImportList(@NotNull GoImportList o) {\n    visitCompositeElement(o);\n  }\n\n  public void visitImportSpec(@NotNull GoImportSpec o) {\n    visitNamedElement(o);\n  }\n\n  public void visitImportString(@NotNull GoImportString o) {\n    visitCompositeElement(o);\n  }\n\n  public void visitIncDecStatement(@NotNull GoIncDecStatement o) {\n    visitStatement(o);\n  }\n\n  public void visitIndexOrSliceExpr(@NotNull GoIndexOrSliceExpr o) {\n    visitExpression(o);\n  }\n\n  public void visitInterfaceType(@NotNull GoInterfaceType o) {\n    visitType(o);\n  }\n\n  public void visitKey(@NotNull GoKey o) {\n    visitCompositeElement(o);\n  }\n\n  public void visitLabelDefinition(@NotNull GoLabelDefinition o) {\n    visitNamedElement(o);\n  }\n\n  public void visitLabelRef(@NotNull GoLabelRef o) {\n    visitCompositeElement(o);\n  }\n\n  public void visitLabeledStatement(@NotNull GoLabeledStatement o) {\n    visitStatement(o);\n  }\n\n  public void visitLeftHandExprList(@NotNull GoLeftHandExprList o) {\n    visitCompositeElement(o);\n  }\n\n  public void visitLiteral(@NotNull GoLiteral o) {\n    visitExpression(o);\n  }\n\n  public void visitLiteralTypeExpr(@NotNull GoLiteralTypeExpr o) {\n    visitExpression(o);\n  }\n\n  public void visitLiteralValue(@NotNull GoLiteralValue o) {\n    visitCompositeElement(o);\n  }\n\n  public void visitMapType(@NotNull GoMapType o) {\n    visitType(o);\n  }\n\n  public void visitMethodDeclaration(@NotNull GoMethodDeclaration o) {\n    visitFunctionOrMethodDeclaration(o);\n  }\n\n  public void visitMethodSpec(@NotNull GoMethodSpec o) {\n    visitNamedSignatureOwner(o);\n  }\n\n  public void visitMulExpr(@NotNull GoMulExpr o) {\n    visitBinaryExpr(o);\n  }\n\n  public void visitOrExpr(@NotNull GoOrExpr o) {\n    visitBinaryExpr(o);\n  }\n\n  public void visitPackageClause(@NotNull GoPackageClause o) {\n    visitCompositeElement(o);\n  }\n\n  public void visitParType(@NotNull GoParType o) {\n    visitType(o);\n  }\n\n  public void visitParamDefinition(@NotNull GoParamDefinition o) {\n    visitNamedElement(o);\n  }\n\n  public void visitParameterDeclaration(@NotNull GoParameterDeclaration o) {\n    visitCompositeElement(o);\n  }\n\n  public void visitParameters(@NotNull GoParameters o) {\n    visitCompositeElement(o);\n  }\n\n  public void visitParenthesesExpr(@NotNull GoParenthesesExpr o) {\n    visitExpression(o);\n  }\n\n  public void visitPointerType(@NotNull GoPointerType o) {\n    visitType(o);\n  }\n\n  public void visitRangeClause(@NotNull GoRangeClause o) {\n    visitVarSpec(o);\n  }\n\n  public void visitReceiver(@NotNull GoReceiver o) {\n    visitNamedElement(o);\n  }\n\n  public void visitRecvStatement(@NotNull GoRecvStatement o) {\n    visitVarSpec(o);\n  }\n\n  public void visitReferenceExpression(@NotNull GoReferenceExpression o) {\n    visitExpression(o);\n    // visitReferenceExpressionBase(o);\n  }\n\n  public void visitResult(@NotNull GoResult o) {\n    visitCompositeElement(o);\n  }\n\n  public void visitReturnStatement(@NotNull GoReturnStatement o) {\n    visitStatement(o);\n  }\n\n  public void visitSelectStatement(@NotNull GoSelectStatement o) {\n    visitStatement(o);\n  }\n\n  public void visitSelectorExpr(@NotNull GoSelectorExpr o) {\n    visitBinaryExpr(o);\n  }\n\n  public void visitSendStatement(@NotNull GoSendStatement o) {\n    visitStatement(o);\n  }\n\n  public void visitShortVarDeclaration(@NotNull GoShortVarDeclaration o) {\n    visitVarSpec(o);\n  }\n\n  public void visitSignature(@NotNull GoSignature o) {\n    visitCompositeElement(o);\n  }\n\n  public void visitSimpleStatement(@NotNull GoSimpleStatement o) {\n    visitStatement(o);\n  }\n\n  public void visitSpecType(@NotNull GoSpecType o) {\n    visitType(o);\n  }\n\n  public void visitStatement(@NotNull GoStatement o) {\n    visitCompositeElement(o);\n  }\n\n  public void visitStringLiteral(@NotNull GoStringLiteral o) {\n    visitExpression(o);\n    // visitPsiLanguageInjectionHost(o);\n  }\n\n  public void visitStructType(@NotNull GoStructType o) {\n    visitType(o);\n  }\n\n  public void visitSwitchStart(@NotNull GoSwitchStart o) {\n    visitCompositeElement(o);\n  }\n\n  public void visitSwitchStatement(@NotNull GoSwitchStatement o) {\n    visitStatement(o);\n  }\n\n  public void visitTag(@NotNull GoTag o) {\n    visitCompositeElement(o);\n  }\n\n  public void visitType(@NotNull GoType o) {\n    visitCompositeElement(o);\n  }\n\n  public void visitTypeAssertionExpr(@NotNull GoTypeAssertionExpr o) {\n    visitExpression(o);\n  }\n\n  public void visitTypeCaseClause(@NotNull GoTypeCaseClause o) {\n    visitCaseClause(o);\n  }\n\n  public void visitTypeDeclaration(@NotNull GoTypeDeclaration o) {\n    visitTopLevelDeclaration(o);\n  }\n\n  public void visitTypeGuard(@NotNull GoTypeGuard o) {\n    visitCompositeElement(o);\n  }\n\n  public void visitTypeList(@NotNull GoTypeList o) {\n    visitType(o);\n  }\n\n  public void visitTypeReferenceExpression(@NotNull GoTypeReferenceExpression o) {\n    visitReferenceExpressionBase(o);\n  }\n\n  public void visitTypeSpec(@NotNull GoTypeSpec o) {\n    visitNamedElement(o);\n  }\n\n  public void visitTypeSwitchGuard(@NotNull GoTypeSwitchGuard o) {\n    visitCompositeElement(o);\n  }\n\n  public void visitTypeSwitchStatement(@NotNull GoTypeSwitchStatement o) {\n    visitSwitchStatement(o);\n  }\n\n  public void visitUnaryExpr(@NotNull GoUnaryExpr o) {\n    visitExpression(o);\n  }\n\n  public void visitValue(@NotNull GoValue o) {\n    visitCompositeElement(o);\n  }\n\n  public void visitVarDeclaration(@NotNull GoVarDeclaration o) {\n    visitTopLevelDeclaration(o);\n  }\n\n  public void visitVarDefinition(@NotNull GoVarDefinition o) {\n    visitNamedElement(o);\n  }\n\n  public void visitVarSpec(@NotNull GoVarSpec o) {\n    visitCompositeElement(o);\n  }\n\n  public void visitAssignOp(@NotNull GoAssignOp o) {\n    visitCompositeElement(o);\n  }\n\n  public void visitCaseClause(@NotNull GoCaseClause o) {\n    visitCompositeElement(o);\n  }\n\n  public void visitFunctionOrMethodDeclaration(@NotNull GoFunctionOrMethodDeclaration o) {\n    visitCompositeElement(o);\n  }\n\n  public void visitNamedElement(@NotNull GoNamedElement o) {\n    visitCompositeElement(o);\n  }\n\n  public void visitNamedSignatureOwner(@NotNull GoNamedSignatureOwner o) {\n    visitCompositeElement(o);\n  }\n\n  public void visitReferenceExpressionBase(@NotNull GoReferenceExpressionBase o) {\n    visitCompositeElement(o);\n  }\n\n  public void visitTopLevelDeclaration(@NotNull GoTopLevelDeclaration o) {\n    visitCompositeElement(o);\n  }\n\n  public void visitTypeOwner(@NotNull GoTypeOwner o) {\n    visitCompositeElement(o);\n  }\n\n  public void visitCompositeElement(@NotNull GoCompositeElement o) {\n    visitElement(o);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoAddExprImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoAddExprImpl extends GoBinaryExprImpl implements GoAddExpr {\n\n  public GoAddExprImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitAddExpr(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getBitOr() {\n    return findChildByType(BIT_OR);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getBitXor() {\n    return findChildByType(BIT_XOR);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getMinus() {\n    return findChildByType(MINUS);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getPlus() {\n    return findChildByType(PLUS);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoAndExprImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoAndExprImpl extends GoBinaryExprImpl implements GoAndExpr {\n\n  public GoAndExprImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitAndExpr(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getCondAnd() {\n    return notNullChild(findChildByType(COND_AND));\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoAnonymousFieldDefinitionImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.stubs.GoAnonymousFieldDefinitionStub;\nimport com.goide.psi.*;\nimport com.intellij.psi.ResolveState;\nimport com.intellij.psi.stubs.IStubElementType;\n\npublic class GoAnonymousFieldDefinitionImpl extends GoNamedElementImpl<GoAnonymousFieldDefinitionStub> implements GoAnonymousFieldDefinition {\n\n  public GoAnonymousFieldDefinitionImpl(GoAnonymousFieldDefinitionStub stub, IStubElementType nodeType) {\n    super(stub, nodeType);\n  }\n\n  public GoAnonymousFieldDefinitionImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitAnonymousFieldDefinition(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public GoType getType() {\n    return notNullChild(GoPsiTreeUtil.getStubChildOfType(this, GoType.class));\n  }\n\n  @Nullable\n  public PsiElement getIdentifier() {\n    return GoPsiImplUtil.getIdentifier(this);\n  }\n\n  @Nullable\n  public String getName() {\n    return GoPsiImplUtil.getName(this);\n  }\n\n  @Nullable\n  public GoTypeReferenceExpression getTypeReferenceExpression() {\n    return GoPsiImplUtil.getTypeReferenceExpression(this);\n  }\n\n  @Nullable\n  public GoType getGoTypeInner(ResolveState context) {\n    return GoPsiImplUtil.getGoTypeInner(this, context);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoArgumentListImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoArgumentListImpl extends GoCompositeElementImpl implements GoArgumentList {\n\n  public GoArgumentListImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitArgumentList(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public List<GoExpression> getExpressionList() {\n    return GoPsiTreeUtil.getChildrenOfTypeAsList(this, GoExpression.class);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getLparen() {\n    return notNullChild(findChildByType(LPAREN));\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getRparen() {\n    return findChildByType(RPAREN);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getTripleDot() {\n    return findChildByType(TRIPLE_DOT);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoArrayOrSliceTypeImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\nimport com.goide.stubs.GoTypeStub;\nimport com.intellij.psi.stubs.IStubElementType;\n\npublic class GoArrayOrSliceTypeImpl extends GoTypeImpl implements GoArrayOrSliceType {\n\n  public GoArrayOrSliceTypeImpl(GoTypeStub stub, IStubElementType nodeType) {\n    super(stub, nodeType);\n  }\n\n  public GoArrayOrSliceTypeImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitArrayOrSliceType(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @Nullable\n  public GoExpression getExpression() {\n    return GoPsiTreeUtil.getChildOfType(this, GoExpression.class);\n  }\n\n  @Override\n  @Nullable\n  public GoType getType() {\n    return GoPsiTreeUtil.getStubChildOfType(this, GoType.class);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getLbrack() {\n    return notNullChild(findChildByType(LBRACK));\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getRbrack() {\n    return findChildByType(RBRACK);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getTripleDot() {\n    return findChildByType(TRIPLE_DOT);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoAssignOpImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoAssignOpImpl extends GoCompositeElementImpl implements GoAssignOp {\n\n  public GoAssignOpImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitAssignOp(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getAssign() {\n    return findChildByType(ASSIGN);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getBitAndAssign() {\n    return findChildByType(BIT_AND_ASSIGN);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getBitClearAssign() {\n    return findChildByType(BIT_CLEAR_ASSIGN);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getBitOrAssign() {\n    return findChildByType(BIT_OR_ASSIGN);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getBitXorAssign() {\n    return findChildByType(BIT_XOR_ASSIGN);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getMinusAssign() {\n    return findChildByType(MINUS_ASSIGN);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getMulAssign() {\n    return findChildByType(MUL_ASSIGN);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getPlusAssign() {\n    return findChildByType(PLUS_ASSIGN);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getQuotientAssign() {\n    return findChildByType(QUOTIENT_ASSIGN);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getRemainderAssign() {\n    return findChildByType(REMAINDER_ASSIGN);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getShiftLeftAssign() {\n    return findChildByType(SHIFT_LEFT_ASSIGN);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getShiftRightAssign() {\n    return findChildByType(SHIFT_RIGHT_ASSIGN);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoAssignmentStatementImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoAssignmentStatementImpl extends GoStatementImpl implements GoAssignmentStatement {\n\n  public GoAssignmentStatementImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitAssignmentStatement(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public List<GoExpression> getExpressionList() {\n    return GoPsiTreeUtil.getChildrenOfTypeAsList(this, GoExpression.class);\n  }\n\n  @Override\n  @NotNull\n  public GoLeftHandExprList getLeftHandExprList() {\n    return notNullChild(GoPsiTreeUtil.getChildOfType(this, GoLeftHandExprList.class));\n  }\n\n  @Override\n  @NotNull\n  public GoAssignOp getAssignOp() {\n    return notNullChild(GoPsiTreeUtil.getChildOfType(this, GoAssignOp.class));\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoBinaryExprImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoBinaryExprImpl extends GoExpressionImpl implements GoBinaryExpr {\n\n  public GoBinaryExprImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitBinaryExpr(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public List<GoExpression> getExpressionList() {\n    return GoPsiTreeUtil.getChildrenOfTypeAsList(this, GoExpression.class);\n  }\n\n  @Override\n  @NotNull\n  public GoExpression getLeft() {\n    List<GoExpression> p1 = getExpressionList();\n    return p1.get(0);\n  }\n\n  @Override\n  @Nullable\n  public GoExpression getRight() {\n    List<GoExpression> p1 = getExpressionList();\n    return p1.size() < 2 ? null : p1.get(1);\n  }\n\n  @Nullable\n  public PsiElement getOperator() {\n    return GoPsiImplUtil.getOperator(this);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoBlockImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\nimport com.intellij.psi.ResolveState;\nimport com.intellij.psi.scope.PsiScopeProcessor;\n\npublic class GoBlockImpl extends GoCompositeElementImpl implements GoBlock {\n\n  public GoBlockImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitBlock(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public List<GoStatement> getStatementList() {\n    return GoPsiTreeUtil.getChildrenOfTypeAsList(this, GoStatement.class);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getLbrace() {\n    return notNullChild(findChildByType(LBRACE));\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getRbrace() {\n    return findChildByType(RBRACE);\n  }\n\n  public boolean processDeclarations(PsiScopeProcessor processor, ResolveState state, PsiElement lastParent, PsiElement place) {\n    return GoPsiImplUtil.processDeclarations(this, processor, state, lastParent, place);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoBreakStatementImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoBreakStatementImpl extends GoStatementImpl implements GoBreakStatement {\n\n  public GoBreakStatementImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitBreakStatement(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @Nullable\n  public GoLabelRef getLabelRef() {\n    return GoPsiTreeUtil.getChildOfType(this, GoLabelRef.class);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getBreak() {\n    return notNullChild(findChildByType(BREAK));\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoBuiltinArgumentListImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoBuiltinArgumentListImpl extends GoArgumentListImpl implements GoBuiltinArgumentList {\n\n  public GoBuiltinArgumentListImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitBuiltinArgumentList(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @Nullable\n  public GoType getType() {\n    return GoPsiTreeUtil.getChildOfType(this, GoType.class);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoBuiltinCallExprImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoBuiltinCallExprImpl extends GoExpressionImpl implements GoBuiltinCallExpr {\n\n  public GoBuiltinCallExprImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitBuiltinCallExpr(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @Nullable\n  public GoBuiltinArgumentList getBuiltinArgumentList() {\n    return GoPsiTreeUtil.getChildOfType(this, GoBuiltinArgumentList.class);\n  }\n\n  @Override\n  @NotNull\n  public GoReferenceExpression getReferenceExpression() {\n    return notNullChild(GoPsiTreeUtil.getChildOfType(this, GoReferenceExpression.class));\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoCallExprImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoCallExprImpl extends GoExpressionImpl implements GoCallExpr {\n\n  public GoCallExprImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitCallExpr(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public GoArgumentList getArgumentList() {\n    return notNullChild(GoPsiTreeUtil.getChildOfType(this, GoArgumentList.class));\n  }\n\n  @Override\n  @NotNull\n  public GoExpression getExpression() {\n    return notNullChild(GoPsiTreeUtil.getChildOfType(this, GoExpression.class));\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoChannelTypeImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\nimport com.goide.stubs.GoTypeStub;\nimport com.intellij.psi.stubs.IStubElementType;\n\npublic class GoChannelTypeImpl extends GoTypeImpl implements GoChannelType {\n\n  public GoChannelTypeImpl(GoTypeStub stub, IStubElementType nodeType) {\n    super(stub, nodeType);\n  }\n\n  public GoChannelTypeImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitChannelType(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @Nullable\n  public GoType getType() {\n    return GoPsiTreeUtil.getStubChildOfType(this, GoType.class);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getSendChannel() {\n    return findChildByType(SEND_CHANNEL);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getChan() {\n    return findChildByType(CHAN);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoCommCaseImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoCommCaseImpl extends GoCompositeElementImpl implements GoCommCase {\n\n  public GoCommCaseImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitCommCase(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @Nullable\n  public GoRecvStatement getRecvStatement() {\n    return GoPsiTreeUtil.getChildOfType(this, GoRecvStatement.class);\n  }\n\n  @Override\n  @Nullable\n  public GoSendStatement getSendStatement() {\n    return GoPsiTreeUtil.getChildOfType(this, GoSendStatement.class);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getCase() {\n    return findChildByType(CASE);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getDefault() {\n    return findChildByType(DEFAULT);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoCommClauseImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoCommClauseImpl extends GoCompositeElementImpl implements GoCommClause {\n\n  public GoCommClauseImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitCommClause(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public GoCommCase getCommCase() {\n    return notNullChild(GoPsiTreeUtil.getChildOfType(this, GoCommCase.class));\n  }\n\n  @Override\n  @NotNull\n  public List<GoStatement> getStatementList() {\n    return GoPsiTreeUtil.getChildrenOfTypeAsList(this, GoStatement.class);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getColon() {\n    return findChildByType(COLON);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoCompositeLitImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoCompositeLitImpl extends GoExpressionImpl implements GoCompositeLit {\n\n  public GoCompositeLitImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitCompositeLit(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @Nullable\n  public GoLiteralValue getLiteralValue() {\n    return GoPsiTreeUtil.getChildOfType(this, GoLiteralValue.class);\n  }\n\n  @Override\n  @Nullable\n  public GoType getType() {\n    return GoPsiTreeUtil.getChildOfType(this, GoType.class);\n  }\n\n  @Override\n  @Nullable\n  public GoTypeReferenceExpression getTypeReferenceExpression() {\n    return GoPsiTreeUtil.getChildOfType(this, GoTypeReferenceExpression.class);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoConditionalExprImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoConditionalExprImpl extends GoBinaryExprImpl implements GoConditionalExpr {\n\n  public GoConditionalExprImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitConditionalExpr(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getEq() {\n    return findChildByType(EQ);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getGreater() {\n    return findChildByType(GREATER);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getGreaterOrEqual() {\n    return findChildByType(GREATER_OR_EQUAL);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getLess() {\n    return findChildByType(LESS);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getLessOrEqual() {\n    return findChildByType(LESS_OR_EQUAL);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getNotEq() {\n    return findChildByType(NOT_EQ);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoConstDeclarationImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoConstDeclarationImpl extends GoCompositeElementImpl implements GoConstDeclaration {\n\n  public GoConstDeclarationImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitConstDeclaration(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public List<GoConstSpec> getConstSpecList() {\n    return GoPsiTreeUtil.getChildrenOfTypeAsList(this, GoConstSpec.class);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getLparen() {\n    return findChildByType(LPAREN);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getRparen() {\n    return findChildByType(RPAREN);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getConst() {\n    return notNullChild(findChildByType(CONST));\n  }\n\n  @NotNull\n  public GoConstSpec addSpec(String name, String type, String value, GoConstSpec specAnchor) {\n    return GoPsiImplUtil.addSpec(this, name, type, value, specAnchor);\n  }\n\n  public void deleteSpec(GoConstSpec specToDelete) {\n    GoPsiImplUtil.deleteSpec(this, specToDelete);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoConstDefinitionImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.stubs.GoConstDefinitionStub;\nimport com.goide.psi.*;\nimport com.intellij.psi.ResolveState;\nimport com.intellij.psi.stubs.IStubElementType;\n\npublic class GoConstDefinitionImpl extends GoNamedElementImpl<GoConstDefinitionStub> implements GoConstDefinition {\n\n  public GoConstDefinitionImpl(GoConstDefinitionStub stub, IStubElementType nodeType) {\n    super(stub, nodeType);\n  }\n\n  public GoConstDefinitionImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitConstDefinition(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getIdentifier() {\n    return notNullChild(findChildByType(IDENTIFIER));\n  }\n\n  @Nullable\n  public GoType getGoTypeInner(ResolveState context) {\n    return GoPsiImplUtil.getGoTypeInner(this, context);\n  }\n\n  @Nullable\n  public GoExpression getValue() {\n    return GoPsiImplUtil.getValue(this);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoConstSpecImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.stubs.GoConstSpecStub;\nimport com.goide.psi.*;\nimport com.intellij.psi.stubs.IStubElementType;\n\npublic class GoConstSpecImpl extends GoStubbedElementImpl<GoConstSpecStub> implements GoConstSpec {\n\n  public GoConstSpecImpl(GoConstSpecStub stub, IStubElementType nodeType) {\n    super(stub, nodeType);\n  }\n\n  public GoConstSpecImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitConstSpec(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public List<GoConstDefinition> getConstDefinitionList() {\n    return GoPsiTreeUtil.getStubChildrenOfTypeAsList(this, GoConstDefinition.class);\n  }\n\n  @Override\n  @NotNull\n  public List<GoExpression> getExpressionList() {\n    return GoPsiTreeUtil.getChildrenOfTypeAsList(this, GoExpression.class);\n  }\n\n  @Override\n  @Nullable\n  public GoType getType() {\n    return GoPsiTreeUtil.getStubChildOfType(this, GoType.class);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getAssign() {\n    return findChildByType(ASSIGN);\n  }\n\n  public void deleteDefinition(GoConstDefinition definitionToDelete) {\n    GoPsiImplUtil.deleteDefinition(this, definitionToDelete);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoContinueStatementImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoContinueStatementImpl extends GoStatementImpl implements GoContinueStatement {\n\n  public GoContinueStatementImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitContinueStatement(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @Nullable\n  public GoLabelRef getLabelRef() {\n    return GoPsiTreeUtil.getChildOfType(this, GoLabelRef.class);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getContinue() {\n    return notNullChild(findChildByType(CONTINUE));\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoConversionExprImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoConversionExprImpl extends GoBinaryExprImpl implements GoConversionExpr {\n\n  public GoConversionExprImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitConversionExpr(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @Nullable\n  public GoExpression getExpression() {\n    return GoPsiTreeUtil.getChildOfType(this, GoExpression.class);\n  }\n\n  @Override\n  @NotNull\n  public GoType getType() {\n    return notNullChild(GoPsiTreeUtil.getChildOfType(this, GoType.class));\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getComma() {\n    return findChildByType(COMMA);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getLparen() {\n    return notNullChild(findChildByType(LPAREN));\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getRparen() {\n    return findChildByType(RPAREN);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoDeferStatementImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoDeferStatementImpl extends GoStatementImpl implements GoDeferStatement {\n\n  public GoDeferStatementImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitDeferStatement(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @Nullable\n  public GoExpression getExpression() {\n    return GoPsiTreeUtil.getChildOfType(this, GoExpression.class);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getDefer() {\n    return notNullChild(findChildByType(DEFER));\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoElementImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoElementImpl extends GoCompositeElementImpl implements GoElement {\n\n  public GoElementImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitElement(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @Nullable\n  public GoKey getKey() {\n    return GoPsiTreeUtil.getChildOfType(this, GoKey.class);\n  }\n\n  @Override\n  @Nullable\n  public GoValue getValue() {\n    return GoPsiTreeUtil.getChildOfType(this, GoValue.class);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getColon() {\n    return findChildByType(COLON);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoElseStatementImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoElseStatementImpl extends GoStatementImpl implements GoElseStatement {\n\n  public GoElseStatementImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitElseStatement(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @Nullable\n  public GoIfStatement getIfStatement() {\n    return GoPsiTreeUtil.getChildOfType(this, GoIfStatement.class);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getElse() {\n    return notNullChild(findChildByType(ELSE));\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoExprCaseClauseImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoExprCaseClauseImpl extends GoCompositeElementImpl implements GoExprCaseClause {\n\n  public GoExprCaseClauseImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitExprCaseClause(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public List<GoExpression> getExpressionList() {\n    return GoPsiTreeUtil.getChildrenOfTypeAsList(this, GoExpression.class);\n  }\n\n  @Override\n  @NotNull\n  public List<GoStatement> getStatementList() {\n    return GoPsiTreeUtil.getChildrenOfTypeAsList(this, GoStatement.class);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getColon() {\n    return findChildByType(COLON);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getCase() {\n    return findChildByType(CASE);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getDefault() {\n    return findChildByType(DEFAULT);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoExprSwitchStatementImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoExprSwitchStatementImpl extends GoSwitchStatementImpl implements GoExprSwitchStatement {\n\n  public GoExprSwitchStatementImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitExprSwitchStatement(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public List<GoExprCaseClause> getExprCaseClauseList() {\n    return GoPsiTreeUtil.getChildrenOfTypeAsList(this, GoExprCaseClause.class);\n  }\n\n  @Override\n  @Nullable\n  public GoExpression getExpression() {\n    return GoPsiTreeUtil.getChildOfType(this, GoExpression.class);\n  }\n\n  @Override\n  @Nullable\n  public GoStatement getStatement() {\n    return GoPsiTreeUtil.getChildOfType(this, GoStatement.class);\n  }\n\n  @Override\n  @NotNull\n  public GoSwitchStart getSwitchStart() {\n    return notNullChild(GoPsiTreeUtil.getChildOfType(this, GoSwitchStart.class));\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getLbrace() {\n    return notNullChild(findChildByType(LBRACE));\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getRbrace() {\n    return findChildByType(RBRACE);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getSemicolon() {\n    return findChildByType(SEMICOLON);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoExpressionImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\nimport com.intellij.psi.ResolveState;\n\npublic class GoExpressionImpl extends GoCompositeElementImpl implements GoExpression {\n\n  public GoExpressionImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitExpression(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Nullable\n  public GoType getGoType(ResolveState context) {\n    return GoPsiImplUtil.getGoType(this, context);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoFallthroughStatementImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoFallthroughStatementImpl extends GoStatementImpl implements GoFallthroughStatement {\n\n  public GoFallthroughStatementImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitFallthroughStatement(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getFallthrough() {\n    return notNullChild(findChildByType(FALLTHROUGH));\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoFieldDeclarationImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoFieldDeclarationImpl extends GoCompositeElementImpl implements GoFieldDeclaration {\n\n  public GoFieldDeclarationImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitFieldDeclaration(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @Nullable\n  public GoAnonymousFieldDefinition getAnonymousFieldDefinition() {\n    return GoPsiTreeUtil.getChildOfType(this, GoAnonymousFieldDefinition.class);\n  }\n\n  @Override\n  @NotNull\n  public List<GoFieldDefinition> getFieldDefinitionList() {\n    return GoPsiTreeUtil.getChildrenOfTypeAsList(this, GoFieldDefinition.class);\n  }\n\n  @Override\n  @Nullable\n  public GoTag getTag() {\n    return GoPsiTreeUtil.getChildOfType(this, GoTag.class);\n  }\n\n  @Override\n  @Nullable\n  public GoType getType() {\n    return GoPsiTreeUtil.getChildOfType(this, GoType.class);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoFieldDefinitionImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.stubs.GoFieldDefinitionStub;\nimport com.goide.psi.*;\nimport com.intellij.psi.stubs.IStubElementType;\n\npublic class GoFieldDefinitionImpl extends GoNamedElementImpl<GoFieldDefinitionStub> implements GoFieldDefinition {\n\n  public GoFieldDefinitionImpl(GoFieldDefinitionStub stub, IStubElementType nodeType) {\n    super(stub, nodeType);\n  }\n\n  public GoFieldDefinitionImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitFieldDefinition(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getIdentifier() {\n    return notNullChild(findChildByType(IDENTIFIER));\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoFieldNameImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\nimport com.intellij.psi.PsiReference;\n\npublic class GoFieldNameImpl extends GoCompositeElementImpl implements GoFieldName {\n\n  public GoFieldNameImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitFieldName(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getIdentifier() {\n    return notNullChild(findChildByType(IDENTIFIER));\n  }\n\n  @NotNull\n  public PsiReference getReference() {\n    return GoPsiImplUtil.getReference(this);\n  }\n\n  @Nullable\n  public GoReferenceExpression getQualifier() {\n    return GoPsiImplUtil.getQualifier(this);\n  }\n\n  @Nullable\n  public PsiElement resolve() {\n    return GoPsiImplUtil.resolve(this);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoForClauseImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\nimport com.intellij.psi.ResolveState;\nimport com.intellij.psi.scope.PsiScopeProcessor;\n\npublic class GoForClauseImpl extends GoCompositeElementImpl implements GoForClause {\n\n  public GoForClauseImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitForClause(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @Nullable\n  public GoExpression getExpression() {\n    return GoPsiTreeUtil.getChildOfType(this, GoExpression.class);\n  }\n\n  @Override\n  @NotNull\n  public List<GoStatement> getStatementList() {\n    return GoPsiTreeUtil.getChildrenOfTypeAsList(this, GoStatement.class);\n  }\n\n  public boolean processDeclarations(PsiScopeProcessor processor, ResolveState state, PsiElement lastParent, PsiElement place) {\n    return GoPsiImplUtil.processDeclarations(this, processor, state, lastParent, place);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoForStatementImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoForStatementImpl extends GoStatementImpl implements GoForStatement {\n\n  public GoForStatementImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitForStatement(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @Nullable\n  public GoExpression getExpression() {\n    return GoPsiTreeUtil.getChildOfType(this, GoExpression.class);\n  }\n\n  @Override\n  @Nullable\n  public GoForClause getForClause() {\n    return GoPsiTreeUtil.getChildOfType(this, GoForClause.class);\n  }\n\n  @Override\n  @Nullable\n  public GoRangeClause getRangeClause() {\n    return GoPsiTreeUtil.getChildOfType(this, GoRangeClause.class);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getFor() {\n    return notNullChild(findChildByType(FOR));\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoFunctionDeclarationImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.stubs.GoFunctionDeclarationStub;\nimport com.goide.psi.*;\nimport com.intellij.psi.stubs.IStubElementType;\n\npublic class GoFunctionDeclarationImpl extends GoFunctionOrMethodDeclarationImpl<GoFunctionDeclarationStub> implements GoFunctionDeclaration {\n\n  public GoFunctionDeclarationImpl(GoFunctionDeclarationStub stub, IStubElementType nodeType) {\n    super(stub, nodeType);\n  }\n\n  public GoFunctionDeclarationImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitFunctionDeclaration(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @Nullable\n  public GoBlock getBlock() {\n    return GoPsiTreeUtil.getChildOfType(this, GoBlock.class);\n  }\n\n  @Override\n  @Nullable\n  public GoSignature getSignature() {\n    return GoPsiTreeUtil.getStubChildOfType(this, GoSignature.class);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getFunc() {\n    return notNullChild(findChildByType(FUNC));\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getIdentifier() {\n    return notNullChild(findChildByType(IDENTIFIER));\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoFunctionLitImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\nimport com.intellij.psi.ResolveState;\nimport com.intellij.psi.scope.PsiScopeProcessor;\n\npublic class GoFunctionLitImpl extends GoExpressionImpl implements GoFunctionLit {\n\n  public GoFunctionLitImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitFunctionLit(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @Nullable\n  public GoBlock getBlock() {\n    return GoPsiTreeUtil.getChildOfType(this, GoBlock.class);\n  }\n\n  @Override\n  @Nullable\n  public GoSignature getSignature() {\n    return GoPsiTreeUtil.getChildOfType(this, GoSignature.class);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getFunc() {\n    return notNullChild(findChildByType(FUNC));\n  }\n\n  public boolean processDeclarations(PsiScopeProcessor processor, ResolveState state, PsiElement lastParent, PsiElement place) {\n    return GoPsiImplUtil.processDeclarations(this, processor, state, lastParent, place);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoFunctionTypeImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\nimport com.goide.stubs.GoTypeStub;\nimport com.intellij.psi.stubs.IStubElementType;\n\npublic class GoFunctionTypeImpl extends GoTypeImpl implements GoFunctionType {\n\n  public GoFunctionTypeImpl(GoTypeStub stub, IStubElementType nodeType) {\n    super(stub, nodeType);\n  }\n\n  public GoFunctionTypeImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitFunctionType(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @Nullable\n  public GoSignature getSignature() {\n    return GoPsiTreeUtil.getStubChildOfType(this, GoSignature.class);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getFunc() {\n    return notNullChild(findChildByType(FUNC));\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoGoStatementImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoGoStatementImpl extends GoStatementImpl implements GoGoStatement {\n\n  public GoGoStatementImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitGoStatement(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @Nullable\n  public GoExpression getExpression() {\n    return GoPsiTreeUtil.getChildOfType(this, GoExpression.class);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getGo() {\n    return notNullChild(findChildByType(GO));\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoGotoStatementImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoGotoStatementImpl extends GoStatementImpl implements GoGotoStatement {\n\n  public GoGotoStatementImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitGotoStatement(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @Nullable\n  public GoLabelRef getLabelRef() {\n    return GoPsiTreeUtil.getChildOfType(this, GoLabelRef.class);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getGoto() {\n    return notNullChild(findChildByType(GOTO));\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoIfStatementImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoIfStatementImpl extends GoStatementImpl implements GoIfStatement {\n\n  public GoIfStatementImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitIfStatement(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @Nullable\n  public GoElseStatement getElseStatement() {\n    return GoPsiTreeUtil.getChildOfType(this, GoElseStatement.class);\n  }\n\n  @Override\n  @Nullable\n  public GoExpression getExpression() {\n    return GoPsiTreeUtil.getChildOfType(this, GoExpression.class);\n  }\n\n  @Override\n  @Nullable\n  public GoStatement getStatement() {\n    return GoPsiTreeUtil.getChildOfType(this, GoStatement.class);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getSemicolon() {\n    return findChildByType(SEMICOLON);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getIf() {\n    return notNullChild(findChildByType(IF));\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoImportDeclarationImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoImportDeclarationImpl extends GoCompositeElementImpl implements GoImportDeclaration {\n\n  public GoImportDeclarationImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitImportDeclaration(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public List<GoImportSpec> getImportSpecList() {\n    return GoPsiTreeUtil.getChildrenOfTypeAsList(this, GoImportSpec.class);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getLparen() {\n    return findChildByType(LPAREN);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getRparen() {\n    return findChildByType(RPAREN);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getImport() {\n    return notNullChild(findChildByType(IMPORT));\n  }\n\n  @NotNull\n  public GoImportSpec addImportSpec(String packagePath, String alias) {\n    return GoPsiImplUtil.addImportSpec(this, packagePath, alias);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoImportListImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoImportListImpl extends GoCompositeElementImpl implements GoImportList {\n\n  public GoImportListImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitImportList(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public List<GoImportDeclaration> getImportDeclarationList() {\n    return GoPsiTreeUtil.getChildrenOfTypeAsList(this, GoImportDeclaration.class);\n  }\n\n  @NotNull\n  public GoImportSpec addImport(String packagePath, String alias) {\n    return GoPsiImplUtil.addImport(this, packagePath, alias);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoImportSpecImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.stubs.GoImportSpecStub;\nimport com.goide.psi.*;\nimport com.intellij.psi.stubs.IStubElementType;\n\npublic class GoImportSpecImpl extends GoNamedElementImpl<GoImportSpecStub> implements GoImportSpec {\n\n  public GoImportSpecImpl(GoImportSpecStub stub, IStubElementType nodeType) {\n    super(stub, nodeType);\n  }\n\n  public GoImportSpecImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitImportSpec(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public GoImportString getImportString() {\n    return notNullChild(GoPsiTreeUtil.getChildOfType(this, GoImportString.class));\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getDot() {\n    return findChildByType(DOT);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getIdentifier() {\n    return findChildByType(IDENTIFIER);\n  }\n\n  public String getAlias() {\n    return GoPsiImplUtil.getAlias(this);\n  }\n\n  public String getLocalPackageName() {\n    return GoPsiImplUtil.getLocalPackageName(this);\n  }\n\n  public boolean shouldGoDeeper() {\n    return GoPsiImplUtil.shouldGoDeeper(this);\n  }\n\n  public boolean isForSideEffects() {\n    return GoPsiImplUtil.isForSideEffects(this);\n  }\n\n  public boolean isDot() {\n    return GoPsiImplUtil.isDot(this);\n  }\n\n  @NotNull\n  public String getPath() {\n    return GoPsiImplUtil.getPath(this);\n  }\n\n  public String getName() {\n    return GoPsiImplUtil.getName(this);\n  }\n\n  public boolean isCImport() {\n    return GoPsiImplUtil.isCImport(this);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoImportStringImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\nimport com.intellij.openapi.util.TextRange;\nimport com.intellij.psi.PsiDirectory;\nimport com.intellij.psi.PsiReference;\n\npublic class GoImportStringImpl extends GoCompositeElementImpl implements GoImportString {\n\n  public GoImportStringImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitImportString(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public GoStringLiteral getStringLiteral() {\n    return notNullChild(GoPsiTreeUtil.getChildOfType(this, GoStringLiteral.class));\n  }\n\n  @NotNull\n  public PsiReference[] getReferences() {\n    return GoPsiImplUtil.getReferences(this);\n  }\n\n  @Nullable\n  public PsiDirectory resolve() {\n    return GoPsiImplUtil.resolve(this);\n  }\n\n  @NotNull\n  public String getPath() {\n    return GoPsiImplUtil.getPath(this);\n  }\n\n  @NotNull\n  public TextRange getPathTextRange() {\n    return GoPsiImplUtil.getPathTextRange(this);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoIncDecStatementImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoIncDecStatementImpl extends GoStatementImpl implements GoIncDecStatement {\n\n  public GoIncDecStatementImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitIncDecStatement(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public GoExpression getExpression() {\n    return notNullChild(GoPsiTreeUtil.getChildOfType(this, GoExpression.class));\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getMinusMinus() {\n    return findChildByType(MINUS_MINUS);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getPlusPlus() {\n    return findChildByType(PLUS_PLUS);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoIndexOrSliceExprImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\nimport com.intellij.openapi.util.Trinity;\n\npublic class GoIndexOrSliceExprImpl extends GoExpressionImpl implements GoIndexOrSliceExpr {\n\n  public GoIndexOrSliceExprImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitIndexOrSliceExpr(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public List<GoExpression> getExpressionList() {\n    return GoPsiTreeUtil.getChildrenOfTypeAsList(this, GoExpression.class);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getLbrack() {\n    return notNullChild(findChildByType(LBRACK));\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getRbrack() {\n    return findChildByType(RBRACK);\n  }\n\n  @Nullable\n  public GoExpression getExpression() {\n    return GoPsiImplUtil.getExpression(this);\n  }\n\n  @NotNull\n  public Trinity<GoExpression, GoExpression, GoExpression> getIndices() {\n    return GoPsiImplUtil.getIndices(this);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoInterfaceTypeImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\nimport com.goide.stubs.GoTypeStub;\nimport com.intellij.psi.stubs.IStubElementType;\n\npublic class GoInterfaceTypeImpl extends GoTypeImpl implements GoInterfaceType {\n\n  public GoInterfaceTypeImpl(GoTypeStub stub, IStubElementType nodeType) {\n    super(stub, nodeType);\n  }\n\n  public GoInterfaceTypeImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitInterfaceType(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public List<GoMethodSpec> getMethodSpecList() {\n    return GoPsiTreeUtil.getStubChildrenOfTypeAsList(this, GoMethodSpec.class);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getLbrace() {\n    return findChildByType(LBRACE);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getRbrace() {\n    return findChildByType(RBRACE);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getInterface() {\n    return notNullChild(findChildByType(INTERFACE));\n  }\n\n  @NotNull\n  public List<GoMethodSpec> getMethods() {\n    return GoPsiImplUtil.getMethods(this);\n  }\n\n  @NotNull\n  public List<GoTypeReferenceExpression> getBaseTypesReferences() {\n    return GoPsiImplUtil.getBaseTypesReferences(this);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoKeyImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoKeyImpl extends GoCompositeElementImpl implements GoKey {\n\n  public GoKeyImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitKey(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @Nullable\n  public GoExpression getExpression() {\n    return GoPsiTreeUtil.getChildOfType(this, GoExpression.class);\n  }\n\n  @Override\n  @Nullable\n  public GoFieldName getFieldName() {\n    return GoPsiTreeUtil.getChildOfType(this, GoFieldName.class);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoLabelDefinitionImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.stubs.GoLabelDefinitionStub;\nimport com.goide.psi.*;\nimport com.intellij.psi.stubs.IStubElementType;\n\npublic class GoLabelDefinitionImpl extends GoNamedElementImpl<GoLabelDefinitionStub> implements GoLabelDefinition {\n\n  public GoLabelDefinitionImpl(GoLabelDefinitionStub stub, IStubElementType nodeType) {\n    super(stub, nodeType);\n  }\n\n  public GoLabelDefinitionImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitLabelDefinition(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getIdentifier() {\n    return notNullChild(findChildByType(IDENTIFIER));\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoLabelRefImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\nimport com.intellij.psi.PsiReference;\n\npublic class GoLabelRefImpl extends GoCompositeElementImpl implements GoLabelRef {\n\n  public GoLabelRefImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitLabelRef(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getIdentifier() {\n    return notNullChild(findChildByType(IDENTIFIER));\n  }\n\n  @NotNull\n  public PsiReference getReference() {\n    return GoPsiImplUtil.getReference(this);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoLabeledStatementImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoLabeledStatementImpl extends GoStatementImpl implements GoLabeledStatement {\n\n  public GoLabeledStatementImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitLabeledStatement(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public GoLabelDefinition getLabelDefinition() {\n    return notNullChild(GoPsiTreeUtil.getChildOfType(this, GoLabelDefinition.class));\n  }\n\n  @Override\n  @Nullable\n  public GoStatement getStatement() {\n    return GoPsiTreeUtil.getChildOfType(this, GoStatement.class);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getColon() {\n    return notNullChild(findChildByType(COLON));\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoLeftHandExprListImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoLeftHandExprListImpl extends GoCompositeElementImpl implements GoLeftHandExprList {\n\n  public GoLeftHandExprListImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitLeftHandExprList(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public List<GoExpression> getExpressionList() {\n    return GoPsiTreeUtil.getChildrenOfTypeAsList(this, GoExpression.class);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoLiteralImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoLiteralImpl extends GoExpressionImpl implements GoLiteral {\n\n  public GoLiteralImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitLiteral(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getChar() {\n    return findChildByType(CHAR);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getDecimali() {\n    return findChildByType(DECIMALI);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getFloat() {\n    return findChildByType(FLOAT);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getFloati() {\n    return findChildByType(FLOATI);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getHex() {\n    return findChildByType(HEX);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getInt() {\n    return findChildByType(INT);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getOct() {\n    return findChildByType(OCT);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoLiteralTypeExprImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoLiteralTypeExprImpl extends GoExpressionImpl implements GoLiteralTypeExpr {\n\n  public GoLiteralTypeExprImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitLiteralTypeExpr(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @Nullable\n  public GoType getType() {\n    return GoPsiTreeUtil.getChildOfType(this, GoType.class);\n  }\n\n  @Override\n  @Nullable\n  public GoTypeReferenceExpression getTypeReferenceExpression() {\n    return GoPsiTreeUtil.getChildOfType(this, GoTypeReferenceExpression.class);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoLiteralValueImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoLiteralValueImpl extends GoCompositeElementImpl implements GoLiteralValue {\n\n  public GoLiteralValueImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitLiteralValue(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public List<GoElement> getElementList() {\n    return GoPsiTreeUtil.getChildrenOfTypeAsList(this, GoElement.class);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getLbrace() {\n    return notNullChild(findChildByType(LBRACE));\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getRbrace() {\n    return findChildByType(RBRACE);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoMapTypeImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\nimport com.goide.stubs.GoTypeStub;\nimport com.intellij.psi.stubs.IStubElementType;\n\npublic class GoMapTypeImpl extends GoTypeImpl implements GoMapType {\n\n  public GoMapTypeImpl(GoTypeStub stub, IStubElementType nodeType) {\n    super(stub, nodeType);\n  }\n\n  public GoMapTypeImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitMapType(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public List<GoType> getTypeList() {\n    return GoPsiTreeUtil.getStubChildrenOfTypeAsList(this, GoType.class);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getLbrack() {\n    return findChildByType(LBRACK);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getRbrack() {\n    return findChildByType(RBRACK);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getMap() {\n    return notNullChild(findChildByType(MAP));\n  }\n\n  @Override\n  @Nullable\n  public GoType getKeyType() {\n    List<GoType> p1 = getTypeList();\n    return p1.size() < 1 ? null : p1.get(0);\n  }\n\n  @Override\n  @Nullable\n  public GoType getValueType() {\n    List<GoType> p1 = getTypeList();\n    return p1.size() < 2 ? null : p1.get(1);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoMethodDeclarationImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.stubs.GoMethodDeclarationStub;\nimport com.goide.psi.*;\nimport com.intellij.psi.stubs.IStubElementType;\n\npublic class GoMethodDeclarationImpl extends GoFunctionOrMethodDeclarationImpl<GoMethodDeclarationStub> implements GoMethodDeclaration {\n\n  public GoMethodDeclarationImpl(GoMethodDeclarationStub stub, IStubElementType nodeType) {\n    super(stub, nodeType);\n  }\n\n  public GoMethodDeclarationImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitMethodDeclaration(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @Nullable\n  public GoBlock getBlock() {\n    return GoPsiTreeUtil.getChildOfType(this, GoBlock.class);\n  }\n\n  @Override\n  @Nullable\n  public GoReceiver getReceiver() {\n    return GoPsiTreeUtil.getStubChildOfType(this, GoReceiver.class);\n  }\n\n  @Override\n  @Nullable\n  public GoSignature getSignature() {\n    return GoPsiTreeUtil.getStubChildOfType(this, GoSignature.class);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getFunc() {\n    return notNullChild(findChildByType(FUNC));\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getIdentifier() {\n    return findChildByType(IDENTIFIER);\n  }\n\n  @Nullable\n  public GoType getReceiverType() {\n    return GoPsiImplUtil.getReceiverType(this);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoMethodSpecImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.stubs.GoMethodSpecStub;\nimport com.goide.psi.*;\nimport com.intellij.psi.ResolveState;\nimport com.intellij.psi.stubs.IStubElementType;\n\npublic class GoMethodSpecImpl extends GoNamedElementImpl<GoMethodSpecStub> implements GoMethodSpec {\n\n  public GoMethodSpecImpl(GoMethodSpecStub stub, IStubElementType nodeType) {\n    super(stub, nodeType);\n  }\n\n  public GoMethodSpecImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitMethodSpec(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @Nullable\n  public GoSignature getSignature() {\n    return GoPsiTreeUtil.getStubChildOfType(this, GoSignature.class);\n  }\n\n  @Override\n  @Nullable\n  public GoTypeReferenceExpression getTypeReferenceExpression() {\n    return GoPsiTreeUtil.getChildOfType(this, GoTypeReferenceExpression.class);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getIdentifier() {\n    return findChildByType(IDENTIFIER);\n  }\n\n  @Nullable\n  public GoType getGoTypeInner(ResolveState context) {\n    return GoPsiImplUtil.getGoTypeInner(this, context);\n  }\n\n  @Nullable\n  public String getName() {\n    return GoPsiImplUtil.getName(this);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoMulExprImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoMulExprImpl extends GoBinaryExprImpl implements GoMulExpr {\n\n  public GoMulExprImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitMulExpr(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getBitAnd() {\n    return findChildByType(BIT_AND);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getBitClear() {\n    return findChildByType(BIT_CLEAR);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getMul() {\n    return findChildByType(MUL);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getQuotient() {\n    return findChildByType(QUOTIENT);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getRemainder() {\n    return findChildByType(REMAINDER);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getShiftLeft() {\n    return findChildByType(SHIFT_LEFT);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getShiftRight() {\n    return findChildByType(SHIFT_RIGHT);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoOrExprImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoOrExprImpl extends GoBinaryExprImpl implements GoOrExpr {\n\n  public GoOrExprImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitOrExpr(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getCondOr() {\n    return notNullChild(findChildByType(COND_OR));\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoPackageClauseImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.stubs.GoPackageClauseStub;\nimport com.goide.psi.*;\nimport com.intellij.psi.stubs.IStubElementType;\n\npublic class GoPackageClauseImpl extends GoStubbedElementImpl<GoPackageClauseStub> implements GoPackageClause {\n\n  public GoPackageClauseImpl(GoPackageClauseStub stub, IStubElementType nodeType) {\n    super(stub, nodeType);\n  }\n\n  public GoPackageClauseImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitPackageClause(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getIdentifier() {\n    return findChildByType(IDENTIFIER);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getPackage() {\n    return notNullChild(findChildByType(PACKAGE));\n  }\n\n  @Nullable\n  public String getName() {\n    return GoPsiImplUtil.getName(this);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoParTypeImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\nimport com.goide.stubs.GoTypeStub;\nimport com.intellij.psi.stubs.IStubElementType;\n\npublic class GoParTypeImpl extends GoTypeImpl implements GoParType {\n\n  public GoParTypeImpl(GoTypeStub stub, IStubElementType nodeType) {\n    super(stub, nodeType);\n  }\n\n  public GoParTypeImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitParType(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public GoType getType() {\n    return notNullChild(GoPsiTreeUtil.getStubChildOfType(this, GoType.class));\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getLparen() {\n    return notNullChild(findChildByType(LPAREN));\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getRparen() {\n    return notNullChild(findChildByType(RPAREN));\n  }\n\n  @NotNull\n  public GoType getActualType() {\n    return GoPsiImplUtil.getActualType(this);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoParamDefinitionImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.stubs.GoParamDefinitionStub;\nimport com.goide.psi.*;\nimport com.intellij.psi.stubs.IStubElementType;\n\npublic class GoParamDefinitionImpl extends GoNamedElementImpl<GoParamDefinitionStub> implements GoParamDefinition {\n\n  public GoParamDefinitionImpl(GoParamDefinitionStub stub, IStubElementType nodeType) {\n    super(stub, nodeType);\n  }\n\n  public GoParamDefinitionImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitParamDefinition(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getIdentifier() {\n    return notNullChild(findChildByType(IDENTIFIER));\n  }\n\n  public boolean isVariadic() {\n    return GoPsiImplUtil.isVariadic(this);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoParameterDeclarationImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.stubs.GoParameterDeclarationStub;\nimport com.goide.psi.*;\nimport com.intellij.psi.stubs.IStubElementType;\n\npublic class GoParameterDeclarationImpl extends GoStubbedElementImpl<GoParameterDeclarationStub> implements GoParameterDeclaration {\n\n  public GoParameterDeclarationImpl(GoParameterDeclarationStub stub, IStubElementType nodeType) {\n    super(stub, nodeType);\n  }\n\n  public GoParameterDeclarationImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitParameterDeclaration(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public List<GoParamDefinition> getParamDefinitionList() {\n    return GoPsiTreeUtil.getStubChildrenOfTypeAsList(this, GoParamDefinition.class);\n  }\n\n  @Override\n  @NotNull\n  public GoType getType() {\n    return notNullChild(GoPsiTreeUtil.getStubChildOfType(this, GoType.class));\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getTripleDot() {\n    return findChildByType(TRIPLE_DOT);\n  }\n\n  public boolean isVariadic() {\n    return GoPsiImplUtil.isVariadic(this);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoParametersImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.stubs.GoParametersStub;\nimport com.goide.psi.*;\nimport com.intellij.psi.stubs.IStubElementType;\n\npublic class GoParametersImpl extends GoStubbedElementImpl<GoParametersStub> implements GoParameters {\n\n  public GoParametersImpl(GoParametersStub stub, IStubElementType nodeType) {\n    super(stub, nodeType);\n  }\n\n  public GoParametersImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitParameters(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public List<GoParameterDeclaration> getParameterDeclarationList() {\n    return GoPsiTreeUtil.getStubChildrenOfTypeAsList(this, GoParameterDeclaration.class);\n  }\n\n  @Override\n  @Nullable\n  public GoType getType() {\n    return GoPsiTreeUtil.getStubChildOfType(this, GoType.class);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getLparen() {\n    return notNullChild(findChildByType(LPAREN));\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getRparen() {\n    return findChildByType(RPAREN);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoParenthesesExprImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoParenthesesExprImpl extends GoExpressionImpl implements GoParenthesesExpr {\n\n  public GoParenthesesExprImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitParenthesesExpr(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @Nullable\n  public GoExpression getExpression() {\n    return GoPsiTreeUtil.getChildOfType(this, GoExpression.class);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getLparen() {\n    return notNullChild(findChildByType(LPAREN));\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getRparen() {\n    return findChildByType(RPAREN);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoPointerTypeImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\nimport com.goide.stubs.GoTypeStub;\nimport com.intellij.psi.stubs.IStubElementType;\n\npublic class GoPointerTypeImpl extends GoTypeImpl implements GoPointerType {\n\n  public GoPointerTypeImpl(GoTypeStub stub, IStubElementType nodeType) {\n    super(stub, nodeType);\n  }\n\n  public GoPointerTypeImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitPointerType(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @Nullable\n  public GoType getType() {\n    return GoPsiTreeUtil.getStubChildOfType(this, GoType.class);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getMul() {\n    return notNullChild(findChildByType(MUL));\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoRangeClauseImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\nimport com.goide.stubs.GoVarSpecStub;\nimport com.intellij.psi.stubs.IStubElementType;\n\npublic class GoRangeClauseImpl extends GoVarSpecImpl implements GoRangeClause {\n\n  public GoRangeClauseImpl(GoVarSpecStub stub, IStubElementType nodeType) {\n    super(stub, nodeType);\n  }\n\n  public GoRangeClauseImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitRangeClause(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public List<GoVarDefinition> getVarDefinitionList() {\n    return GoPsiTreeUtil.getStubChildrenOfTypeAsList(this, GoVarDefinition.class);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getVarAssign() {\n    return findChildByType(VAR_ASSIGN);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getRange() {\n    return findChildByType(RANGE);\n  }\n\n  @Nullable\n  public GoExpression getRangeExpression() {\n    return GoPsiImplUtil.getRangeExpression(this);\n  }\n\n  @NotNull\n  public List<GoExpression> getLeftExpressionsList() {\n    return GoPsiImplUtil.getLeftExpressionsList(this);\n  }\n\n  @NotNull\n  public List<GoExpression> getRightExpressionsList() {\n    return GoPsiImplUtil.getRightExpressionsList(this);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoReceiverImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.stubs.GoReceiverStub;\nimport com.goide.psi.*;\nimport com.intellij.psi.ResolveState;\nimport com.intellij.psi.stubs.IStubElementType;\n\npublic class GoReceiverImpl extends GoNamedElementImpl<GoReceiverStub> implements GoReceiver {\n\n  public GoReceiverImpl(GoReceiverStub stub, IStubElementType nodeType) {\n    super(stub, nodeType);\n  }\n\n  public GoReceiverImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitReceiver(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @Nullable\n  public GoType getType() {\n    return GoPsiTreeUtil.getStubChildOfType(this, GoType.class);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getComma() {\n    return findChildByType(COMMA);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getLparen() {\n    return notNullChild(findChildByType(LPAREN));\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getRparen() {\n    return findChildByType(RPAREN);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getIdentifier() {\n    return findChildByType(IDENTIFIER);\n  }\n\n  @Nullable\n  public GoType getGoTypeInner(ResolveState context) {\n    return GoPsiImplUtil.getGoTypeInner(this, context);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoRecvStatementImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\nimport com.goide.stubs.GoVarSpecStub;\nimport com.intellij.psi.stubs.IStubElementType;\n\npublic class GoRecvStatementImpl extends GoVarSpecImpl implements GoRecvStatement {\n\n  public GoRecvStatementImpl(GoVarSpecStub stub, IStubElementType nodeType) {\n    super(stub, nodeType);\n  }\n\n  public GoRecvStatementImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitRecvStatement(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public List<GoExpression> getExpressionList() {\n    return GoPsiTreeUtil.getChildrenOfTypeAsList(this, GoExpression.class);\n  }\n\n  @Override\n  @NotNull\n  public List<GoVarDefinition> getVarDefinitionList() {\n    return GoPsiTreeUtil.getStubChildrenOfTypeAsList(this, GoVarDefinition.class);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getVarAssign() {\n    return findChildByType(VAR_ASSIGN);\n  }\n\n  @Nullable\n  public GoExpression getRecvExpression() {\n    return GoPsiImplUtil.getRecvExpression(this);\n  }\n\n  @NotNull\n  public List<GoExpression> getLeftExpressionsList() {\n    return GoPsiImplUtil.getLeftExpressionsList(this);\n  }\n\n  @NotNull\n  public List<GoExpression> getRightExpressionsList() {\n    return GoPsiImplUtil.getRightExpressionsList(this);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoReferenceExpressionImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\nimport com.intellij.codeInsight.highlighting.ReadWriteAccessDetector.Access;\n\npublic class GoReferenceExpressionImpl extends GoExpressionImpl implements GoReferenceExpression {\n\n  public GoReferenceExpressionImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitReferenceExpression(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getIdentifier() {\n    return notNullChild(findChildByType(IDENTIFIER));\n  }\n\n  @NotNull\n  public GoReference getReference() {\n    return GoPsiImplUtil.getReference(this);\n  }\n\n  @Nullable\n  public GoReferenceExpression getQualifier() {\n    return GoPsiImplUtil.getQualifier(this);\n  }\n\n  @Nullable\n  public PsiElement resolve() {\n    return GoPsiImplUtil.resolve(this);\n  }\n\n  @NotNull\n  public Access getReadWriteAccess() {\n    return GoPsiImplUtil.getReadWriteAccess(this);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoResultImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.stubs.GoResultStub;\nimport com.goide.psi.*;\nimport com.intellij.psi.stubs.IStubElementType;\n\npublic class GoResultImpl extends GoStubbedElementImpl<GoResultStub> implements GoResult {\n\n  public GoResultImpl(GoResultStub stub, IStubElementType nodeType) {\n    super(stub, nodeType);\n  }\n\n  public GoResultImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitResult(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @Nullable\n  public GoParameters getParameters() {\n    return GoPsiTreeUtil.getStubChildOfType(this, GoParameters.class);\n  }\n\n  @Override\n  @Nullable\n  public GoType getType() {\n    return GoPsiTreeUtil.getStubChildOfType(this, GoType.class);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getLparen() {\n    return findChildByType(LPAREN);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getRparen() {\n    return findChildByType(RPAREN);\n  }\n\n  public boolean isVoid() {\n    return GoPsiImplUtil.isVoid(this);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoReturnStatementImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoReturnStatementImpl extends GoStatementImpl implements GoReturnStatement {\n\n  public GoReturnStatementImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitReturnStatement(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public List<GoExpression> getExpressionList() {\n    return GoPsiTreeUtil.getChildrenOfTypeAsList(this, GoExpression.class);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getReturn() {\n    return notNullChild(findChildByType(RETURN));\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoSelectStatementImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoSelectStatementImpl extends GoStatementImpl implements GoSelectStatement {\n\n  public GoSelectStatementImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitSelectStatement(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public List<GoCommClause> getCommClauseList() {\n    return GoPsiTreeUtil.getChildrenOfTypeAsList(this, GoCommClause.class);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getLbrace() {\n    return findChildByType(LBRACE);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getRbrace() {\n    return findChildByType(RBRACE);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getSelect() {\n    return notNullChild(findChildByType(SELECT));\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoSelectorExprImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoSelectorExprImpl extends GoBinaryExprImpl implements GoSelectorExpr {\n\n  public GoSelectorExprImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitSelectorExpr(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getDot() {\n    return notNullChild(findChildByType(DOT));\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoSendStatementImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoSendStatementImpl extends GoStatementImpl implements GoSendStatement {\n\n  public GoSendStatementImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitSendStatement(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public List<GoExpression> getExpressionList() {\n    return GoPsiTreeUtil.getChildrenOfTypeAsList(this, GoExpression.class);\n  }\n\n  @Override\n  @Nullable\n  public GoLeftHandExprList getLeftHandExprList() {\n    return GoPsiTreeUtil.getChildOfType(this, GoLeftHandExprList.class);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getSendChannel() {\n    return notNullChild(findChildByType(SEND_CHANNEL));\n  }\n\n  @Nullable\n  public GoExpression getSendExpression() {\n    return GoPsiImplUtil.getSendExpression(this);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoShortVarDeclarationImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\nimport com.goide.stubs.GoVarSpecStub;\nimport com.intellij.psi.stubs.IStubElementType;\n\npublic class GoShortVarDeclarationImpl extends GoVarSpecImpl implements GoShortVarDeclaration {\n\n  public GoShortVarDeclarationImpl(GoVarSpecStub stub, IStubElementType nodeType) {\n    super(stub, nodeType);\n  }\n\n  public GoShortVarDeclarationImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitShortVarDeclaration(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getVarAssign() {\n    return notNullChild(findChildByType(VAR_ASSIGN));\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoSignatureImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.stubs.GoSignatureStub;\nimport com.goide.psi.*;\nimport com.intellij.psi.stubs.IStubElementType;\n\npublic class GoSignatureImpl extends GoStubbedElementImpl<GoSignatureStub> implements GoSignature {\n\n  public GoSignatureImpl(GoSignatureStub stub, IStubElementType nodeType) {\n    super(stub, nodeType);\n  }\n\n  public GoSignatureImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitSignature(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public GoParameters getParameters() {\n    return notNullChild(GoPsiTreeUtil.getStubChildOfType(this, GoParameters.class));\n  }\n\n  @Override\n  @Nullable\n  public GoResult getResult() {\n    return GoPsiTreeUtil.getStubChildOfType(this, GoResult.class);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoSimpleStatementImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoSimpleStatementImpl extends GoStatementImpl implements GoSimpleStatement {\n\n  public GoSimpleStatementImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitSimpleStatement(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @Nullable\n  public GoLeftHandExprList getLeftHandExprList() {\n    return GoPsiTreeUtil.getChildOfType(this, GoLeftHandExprList.class);\n  }\n\n  @Override\n  @Nullable\n  public GoShortVarDeclaration getShortVarDeclaration() {\n    return GoPsiTreeUtil.getChildOfType(this, GoShortVarDeclaration.class);\n  }\n\n  @Override\n  @Nullable\n  public GoStatement getStatement() {\n    return GoPsiTreeUtil.getChildOfType(this, GoStatement.class);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoSpecTypeImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\nimport com.goide.stubs.GoTypeStub;\nimport com.intellij.psi.stubs.IStubElementType;\n\npublic class GoSpecTypeImpl extends GoTypeImpl implements GoSpecType {\n\n  public GoSpecTypeImpl(GoTypeStub stub, IStubElementType nodeType) {\n    super(stub, nodeType);\n  }\n\n  public GoSpecTypeImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitSpecType(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @Nullable\n  public GoType getType() {\n    return GoPsiTreeUtil.getStubChildOfType(this, GoType.class);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getIdentifier() {\n    return notNullChild(findChildByType(IDENTIFIER));\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoStatementImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\nimport com.intellij.psi.ResolveState;\nimport com.intellij.psi.scope.PsiScopeProcessor;\n\npublic class GoStatementImpl extends GoCompositeElementImpl implements GoStatement {\n\n  public GoStatementImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitStatement(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @Nullable\n  public GoBlock getBlock() {\n    return GoPsiTreeUtil.getChildOfType(this, GoBlock.class);\n  }\n\n  @Override\n  @Nullable\n  public GoConstDeclaration getConstDeclaration() {\n    return GoPsiTreeUtil.getChildOfType(this, GoConstDeclaration.class);\n  }\n\n  @Override\n  @Nullable\n  public GoTypeDeclaration getTypeDeclaration() {\n    return GoPsiTreeUtil.getChildOfType(this, GoTypeDeclaration.class);\n  }\n\n  @Override\n  @Nullable\n  public GoVarDeclaration getVarDeclaration() {\n    return GoPsiTreeUtil.getChildOfType(this, GoVarDeclaration.class);\n  }\n\n  public boolean processDeclarations(PsiScopeProcessor processor, ResolveState state, PsiElement lastParent, PsiElement place) {\n    return GoPsiImplUtil.processDeclarations(this, processor, state, lastParent, place);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoStringLiteralImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\nimport com.goide.util.GoStringLiteralEscaper;\n\npublic class GoStringLiteralImpl extends GoExpressionImpl implements GoStringLiteral {\n\n  public GoStringLiteralImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitStringLiteral(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getRawString() {\n    return findChildByType(RAW_STRING);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getString() {\n    return findChildByType(STRING);\n  }\n\n  public boolean isValidHost() {\n    return GoPsiImplUtil.isValidHost(this);\n  }\n\n  @NotNull\n  public GoStringLiteralImpl updateText(String text) {\n    return GoPsiImplUtil.updateText(this, text);\n  }\n\n  @NotNull\n  public GoStringLiteralEscaper createLiteralTextEscaper() {\n    return GoPsiImplUtil.createLiteralTextEscaper(this);\n  }\n\n  @NotNull\n  public String getDecodedText() {\n    return GoPsiImplUtil.getDecodedText(this);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoStructTypeImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\nimport com.goide.stubs.GoTypeStub;\nimport com.intellij.psi.stubs.IStubElementType;\n\npublic class GoStructTypeImpl extends GoTypeImpl implements GoStructType {\n\n  public GoStructTypeImpl(GoTypeStub stub, IStubElementType nodeType) {\n    super(stub, nodeType);\n  }\n\n  public GoStructTypeImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitStructType(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public List<GoFieldDeclaration> getFieldDeclarationList() {\n    return GoPsiTreeUtil.getChildrenOfTypeAsList(this, GoFieldDeclaration.class);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getLbrace() {\n    return findChildByType(LBRACE);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getRbrace() {\n    return findChildByType(RBRACE);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getStruct() {\n    return notNullChild(findChildByType(STRUCT));\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoSwitchStartImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoSwitchStartImpl extends GoCompositeElementImpl implements GoSwitchStart {\n\n  public GoSwitchStartImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitSwitchStart(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getSwitch() {\n    return notNullChild(findChildByType(SWITCH));\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoSwitchStatementImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoSwitchStatementImpl extends GoStatementImpl implements GoSwitchStatement {\n\n  public GoSwitchStatementImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitSwitchStatement(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @Nullable\n  public GoSwitchStart getSwitchStart() {\n    return GoPsiTreeUtil.getChildOfType(this, GoSwitchStart.class);\n  }\n\n  @Override\n  @Nullable\n  public GoSwitchStatement getSwitchStatement() {\n    return GoPsiTreeUtil.getChildOfType(this, GoSwitchStatement.class);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoTagImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoTagImpl extends GoCompositeElementImpl implements GoTag {\n\n  public GoTagImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitTag(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public GoStringLiteral getStringLiteral() {\n    return notNullChild(GoPsiTreeUtil.getChildOfType(this, GoStringLiteral.class));\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoTypeAssertionExprImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoTypeAssertionExprImpl extends GoExpressionImpl implements GoTypeAssertionExpr {\n\n  public GoTypeAssertionExprImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitTypeAssertionExpr(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public GoExpression getExpression() {\n    return notNullChild(GoPsiTreeUtil.getChildOfType(this, GoExpression.class));\n  }\n\n  @Override\n  @NotNull\n  public GoType getType() {\n    return notNullChild(GoPsiTreeUtil.getChildOfType(this, GoType.class));\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getDot() {\n    return notNullChild(findChildByType(DOT));\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getLparen() {\n    return notNullChild(findChildByType(LPAREN));\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getRparen() {\n    return notNullChild(findChildByType(RPAREN));\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoTypeCaseClauseImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoTypeCaseClauseImpl extends GoCompositeElementImpl implements GoTypeCaseClause {\n\n  public GoTypeCaseClauseImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitTypeCaseClause(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public List<GoStatement> getStatementList() {\n    return GoPsiTreeUtil.getChildrenOfTypeAsList(this, GoStatement.class);\n  }\n\n  @Override\n  @Nullable\n  public GoType getType() {\n    return GoPsiTreeUtil.getChildOfType(this, GoType.class);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getColon() {\n    return findChildByType(COLON);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getCase() {\n    return findChildByType(CASE);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getDefault() {\n    return findChildByType(DEFAULT);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoTypeDeclarationImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoTypeDeclarationImpl extends GoCompositeElementImpl implements GoTypeDeclaration {\n\n  public GoTypeDeclarationImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitTypeDeclaration(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public List<GoTypeSpec> getTypeSpecList() {\n    return GoPsiTreeUtil.getChildrenOfTypeAsList(this, GoTypeSpec.class);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getLparen() {\n    return findChildByType(LPAREN);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getRparen() {\n    return findChildByType(RPAREN);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getType_() {\n    return notNullChild(findChildByType(TYPE_));\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoTypeGuardImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoTypeGuardImpl extends GoCompositeElementImpl implements GoTypeGuard {\n\n  public GoTypeGuardImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitTypeGuard(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getLparen() {\n    return notNullChild(findChildByType(LPAREN));\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getRparen() {\n    return findChildByType(RPAREN);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getType_() {\n    return notNullChild(findChildByType(TYPE_));\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoTypeImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.stubs.GoTypeStub;\nimport com.goide.psi.*;\nimport com.intellij.psi.stubs.IStubElementType;\n\npublic class GoTypeImpl extends GoStubbedElementImpl<GoTypeStub> implements GoType {\n\n  public GoTypeImpl(GoTypeStub stub, IStubElementType nodeType) {\n    super(stub, nodeType);\n  }\n\n  public GoTypeImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitType(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @Nullable\n  public GoTypeReferenceExpression getTypeReferenceExpression() {\n    return GoPsiTreeUtil.getChildOfType(this, GoTypeReferenceExpression.class);\n  }\n\n  @NotNull\n  public GoType getUnderlyingType() {\n    return GoPsiImplUtil.getUnderlyingType(this);\n  }\n\n  public boolean shouldGoDeeper() {\n    return GoPsiImplUtil.shouldGoDeeper(this);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoTypeListImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\nimport com.goide.stubs.GoTypeStub;\nimport com.intellij.psi.stubs.IStubElementType;\n\npublic class GoTypeListImpl extends GoTypeImpl implements GoTypeList {\n\n  public GoTypeListImpl(GoTypeStub stub, IStubElementType nodeType) {\n    super(stub, nodeType);\n  }\n\n  public GoTypeListImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitTypeList(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public List<GoType> getTypeList() {\n    return GoPsiTreeUtil.getStubChildrenOfTypeAsList(this, GoType.class);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoTypeReferenceExpressionImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\nimport com.intellij.psi.PsiReference;\n\npublic class GoTypeReferenceExpressionImpl extends GoCompositeElementImpl implements GoTypeReferenceExpression {\n\n  public GoTypeReferenceExpressionImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitTypeReferenceExpression(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getIdentifier() {\n    return notNullChild(findChildByType(IDENTIFIER));\n  }\n\n  @NotNull\n  public PsiReference getReference() {\n    return GoPsiImplUtil.getReference(this);\n  }\n\n  @Nullable\n  public GoTypeReferenceExpression getQualifier() {\n    return GoPsiImplUtil.getQualifier(this);\n  }\n\n  @Nullable\n  public PsiElement resolve() {\n    return GoPsiImplUtil.resolve(this);\n  }\n\n  @Nullable\n  public GoType resolveType() {\n    return GoPsiImplUtil.resolveType(this);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoTypeSpecImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.stubs.GoTypeSpecStub;\nimport com.goide.psi.*;\nimport com.intellij.psi.ResolveState;\nimport com.intellij.psi.stubs.IStubElementType;\n\npublic class GoTypeSpecImpl extends GoNamedElementImpl<GoTypeSpecStub> implements GoTypeSpec {\n\n  public GoTypeSpecImpl(GoTypeSpecStub stub, IStubElementType nodeType) {\n    super(stub, nodeType);\n  }\n\n  public GoTypeSpecImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitTypeSpec(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public GoSpecType getSpecType() {\n    return notNullChild(GoPsiTreeUtil.getStubChildOfType(this, GoSpecType.class));\n  }\n\n  @Nullable\n  public GoType getGoTypeInner(ResolveState context) {\n    return GoPsiImplUtil.getGoTypeInner(this, context);\n  }\n\n  @NotNull\n  public List<GoMethodDeclaration> getMethods() {\n    return GoPsiImplUtil.getMethods(this);\n  }\n\n  public boolean shouldGoDeeper() {\n    return GoPsiImplUtil.shouldGoDeeper(this);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getIdentifier() {\n    GoSpecType p1 = getSpecType();\n    return p1.getIdentifier();\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoTypeSwitchGuardImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoTypeSwitchGuardImpl extends GoCompositeElementImpl implements GoTypeSwitchGuard {\n\n  public GoTypeSwitchGuardImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitTypeSwitchGuard(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public GoExpression getExpression() {\n    return notNullChild(GoPsiTreeUtil.getChildOfType(this, GoExpression.class));\n  }\n\n  @Override\n  @NotNull\n  public GoTypeGuard getTypeGuard() {\n    return notNullChild(GoPsiTreeUtil.getChildOfType(this, GoTypeGuard.class));\n  }\n\n  @Override\n  @Nullable\n  public GoVarDefinition getVarDefinition() {\n    return GoPsiTreeUtil.getChildOfType(this, GoVarDefinition.class);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getDot() {\n    return notNullChild(findChildByType(DOT));\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getVarAssign() {\n    return findChildByType(VAR_ASSIGN);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoTypeSwitchStatementImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoTypeSwitchStatementImpl extends GoSwitchStatementImpl implements GoTypeSwitchStatement {\n\n  public GoTypeSwitchStatementImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitTypeSwitchStatement(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @Nullable\n  public GoStatement getStatement() {\n    return GoPsiTreeUtil.getChildOfType(this, GoStatement.class);\n  }\n\n  @Override\n  @NotNull\n  public GoSwitchStart getSwitchStart() {\n    return notNullChild(GoPsiTreeUtil.getChildOfType(this, GoSwitchStart.class));\n  }\n\n  @Override\n  @NotNull\n  public List<GoTypeCaseClause> getTypeCaseClauseList() {\n    return GoPsiTreeUtil.getChildrenOfTypeAsList(this, GoTypeCaseClause.class);\n  }\n\n  @Override\n  @NotNull\n  public GoTypeSwitchGuard getTypeSwitchGuard() {\n    return notNullChild(GoPsiTreeUtil.getChildOfType(this, GoTypeSwitchGuard.class));\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getLbrace() {\n    return findChildByType(LBRACE);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getRbrace() {\n    return findChildByType(RBRACE);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getSemicolon() {\n    return findChildByType(SEMICOLON);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoUnaryExprImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoUnaryExprImpl extends GoExpressionImpl implements GoUnaryExpr {\n\n  public GoUnaryExprImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitUnaryExpr(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @Nullable\n  public GoExpression getExpression() {\n    return GoPsiTreeUtil.getChildOfType(this, GoExpression.class);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getBitAnd() {\n    return findChildByType(BIT_AND);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getBitXor() {\n    return findChildByType(BIT_XOR);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getMinus() {\n    return findChildByType(MINUS);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getMul() {\n    return findChildByType(MUL);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getNot() {\n    return findChildByType(NOT);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getPlus() {\n    return findChildByType(PLUS);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getSendChannel() {\n    return findChildByType(SEND_CHANNEL);\n  }\n\n  @Nullable\n  public PsiElement getOperator() {\n    return GoPsiImplUtil.getOperator(this);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoValueImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoValueImpl extends GoCompositeElementImpl implements GoValue {\n\n  public GoValueImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitValue(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @Nullable\n  public GoExpression getExpression() {\n    return GoPsiTreeUtil.getChildOfType(this, GoExpression.class);\n  }\n\n  @Override\n  @Nullable\n  public GoLiteralValue getLiteralValue() {\n    return GoPsiTreeUtil.getChildOfType(this, GoLiteralValue.class);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoVarDeclarationImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.psi.*;\n\npublic class GoVarDeclarationImpl extends GoCompositeElementImpl implements GoVarDeclaration {\n\n  public GoVarDeclarationImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitVarDeclaration(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public List<GoVarSpec> getVarSpecList() {\n    return GoPsiTreeUtil.getChildrenOfTypeAsList(this, GoVarSpec.class);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getLparen() {\n    return findChildByType(LPAREN);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getRparen() {\n    return findChildByType(RPAREN);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getVar() {\n    return notNullChild(findChildByType(VAR));\n  }\n\n  @NotNull\n  public GoVarSpec addSpec(String name, String type, String value, GoVarSpec specAnchor) {\n    return GoPsiImplUtil.addSpec(this, name, type, value, specAnchor);\n  }\n\n  public void deleteSpec(GoVarSpec specToDelete) {\n    GoPsiImplUtil.deleteSpec(this, specToDelete);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoVarDefinitionImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.stubs.GoVarDefinitionStub;\nimport com.goide.psi.*;\nimport com.intellij.psi.PsiReference;\nimport com.intellij.psi.ResolveState;\nimport com.intellij.psi.stubs.IStubElementType;\n\npublic class GoVarDefinitionImpl extends GoNamedElementImpl<GoVarDefinitionStub> implements GoVarDefinition {\n\n  public GoVarDefinitionImpl(GoVarDefinitionStub stub, IStubElementType nodeType) {\n    super(stub, nodeType);\n  }\n\n  public GoVarDefinitionImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitVarDefinition(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public PsiElement getIdentifier() {\n    return notNullChild(findChildByType(IDENTIFIER));\n  }\n\n  @Nullable\n  public GoType getGoTypeInner(ResolveState context) {\n    return GoPsiImplUtil.getGoTypeInner(this, context);\n  }\n\n  @Nullable\n  public PsiReference getReference() {\n    return GoPsiImplUtil.getReference(this);\n  }\n\n  @Nullable\n  public GoExpression getValue() {\n    return GoPsiImplUtil.getValue(this);\n  }\n\n}\n"
  },
  {
    "path": "gen/com/goide/psi/impl/GoVarSpecImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.goide.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.goide.psi.GoPsiTreeUtil;\nimport static com.goide.GoTypes.*;\nimport com.goide.stubs.GoVarSpecStub;\nimport com.goide.psi.*;\nimport com.intellij.psi.ResolveState;\nimport com.intellij.psi.scope.PsiScopeProcessor;\nimport com.intellij.psi.stubs.IStubElementType;\n\npublic class GoVarSpecImpl extends GoStubbedElementImpl<GoVarSpecStub> implements GoVarSpec {\n\n  public GoVarSpecImpl(GoVarSpecStub stub, IStubElementType nodeType) {\n    super(stub, nodeType);\n  }\n\n  public GoVarSpecImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull GoVisitor visitor) {\n    visitor.visitVarSpec(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof GoVisitor) accept((GoVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public List<GoExpression> getExpressionList() {\n    return GoPsiTreeUtil.getChildrenOfTypeAsList(this, GoExpression.class);\n  }\n\n  @Override\n  @Nullable\n  public GoType getType() {\n    return GoPsiTreeUtil.getStubChildOfType(this, GoType.class);\n  }\n\n  @Override\n  @NotNull\n  public List<GoVarDefinition> getVarDefinitionList() {\n    return GoPsiTreeUtil.getStubChildrenOfTypeAsList(this, GoVarDefinition.class);\n  }\n\n  @Override\n  @Nullable\n  public PsiElement getAssign() {\n    return findChildByType(ASSIGN);\n  }\n\n  public boolean processDeclarations(PsiScopeProcessor processor, ResolveState state, PsiElement lastParent, PsiElement place) {\n    return GoPsiImplUtil.processDeclarations(this, processor, state, lastParent, place);\n  }\n\n  public void deleteDefinition(GoVarDefinition definitionToDelete) {\n    GoPsiImplUtil.deleteDefinition(this, definitionToDelete);\n  }\n\n  @NotNull\n  public List<GoExpression> getRightExpressionsList() {\n    return GoPsiImplUtil.getRightExpressionsList(this);\n  }\n\n}\n"
  },
  {
    "path": "google-app-engine/google-app-engine-yaml/build.gradle",
    "content": "dependencies {\n    compile project(':google-app-engine')\n}"
  },
  {
    "path": "google-app-engine/google-app-engine-yaml/src/yaml/AppEngineYamlCompletionContributor.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage yaml;\n\nimport com.intellij.appengine.AppEngineExtension;\nimport com.intellij.codeInsight.completion.CompletionContributor;\nimport com.intellij.codeInsight.completion.CompletionParameters;\nimport com.intellij.codeInsight.completion.CompletionProvider;\nimport com.intellij.codeInsight.completion.CompletionResultSet;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.util.ProcessingContext;\nimport org.jetbrains.annotations.NotNull;\n\n@SuppressWarnings(\"ALL\")\npublic class AppEngineYamlCompletionContributor extends CompletionContributor {\n  public AppEngineYamlCompletionContributor() {\n    //extend(CompletionType.BASIC, key(), new YamlCompletionProvider());\n    //extend(CompletionType.BASIC, inSequence(), new YamlCompletionProvider());\n  }\n\n  private static class YamlCompletionProvider extends CompletionProvider<CompletionParameters> {\n    @Override\n    protected void addCompletions(@NotNull CompletionParameters completionParameters,\n                                  ProcessingContext processingContext,\n                                  @NotNull CompletionResultSet result) {\n      PsiElement position = completionParameters.getPosition();\n      if (!AppEngineExtension.isAppEngineContext(position)) {\n        return;\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "google-app-engine/google-app-engine-yaml/src/yaml/YamlConstants.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage yaml;\n\nimport java.util.Collections;\nimport java.util.EnumSet;\n\npublic interface YamlConstants {\n  enum Value {\n    REQUIRED, ADMIN, \n    UNAUTHORIZED, REDIRECT, \n    OPTIONAL, NEVER, ALWAYS,\n    TRUE, FALSE\n  }\n\n  enum Key {\n    APPLICATION(true, true),\n    HANDLERS(true, true),\n    VERSION(false, true),\n    RUNTIME(true, true),\n    API_VERSION(true, true),\n    URL(true, false),\n    THREADSAFE(false, true, Value.TRUE, Value.FALSE),\n    DEFAULT_EXPIRATION(false, true),\n    BUILTINS(false, true),\n    INCLUDES(false, true),\n    INBOUND_SERVICES(false, true),\n    ADMIN_CONSOLE(false, true),\n    ERROR_HANDLERS(false, true),\n    MIME_TYPE(false, false),\n    EXPIRATION(false, false),\n    UPLOAD(false, false),\n    AUTH_FAIL_ACTION(false, false, Value.UNAUTHORIZED, Value.REDIRECT),\n    SECURE(false, false, Value.OPTIONAL, Value.NEVER, Value.ALWAYS),\n    LOGIN(false, false, Value.REQUIRED, Value.ADMIN),\n    SKIP_FILES(false, true),\n\n    TYPE_SCRIPT(true, false),\n    TYPE_STATIC_DIR(true, false),\n    TYPE_STATIC_FILES(true, false);\n\n    private final boolean myRequired;\n    private final boolean myTopLevel;\n    private final EnumSet<Value> myValues;\n\n    Key(boolean required, boolean topLevel, Value... values) {\n      myRequired = required;\n      myTopLevel = topLevel;\n      myValues = EnumSet.noneOf(Value.class);\n      Collections.addAll(myValues, values);\n    }\n  }\n}\n"
  },
  {
    "path": "google-app-engine/src/com/intellij/appengine/AppEngineExtension.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.intellij.appengine;\n\nimport com.intellij.openapi.Disposable;\nimport com.intellij.openapi.extensions.ExtensionPointName;\nimport com.intellij.openapi.util.Disposer;\nimport com.intellij.psi.PsiElement;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic abstract class AppEngineExtension {\n  private static final ExtensionPointName<AppEngineExtension> EXTENSION = ExtensionPointName.create(\"ro.redeul.google.go.appengine.Extension\");\n\n  private static boolean ourTestingMode;\n\n  public static void enableTestingMode(@NotNull Disposable disposable) {\n    ourTestingMode = true;\n    Disposer.register(disposable, () -> {\n      //noinspection AssignmentToStaticFieldFromInstanceMethod\n      ourTestingMode = false;\n    });\n  }\n\n  public abstract boolean isAppEngineEnabled(@Nullable PsiElement context);\n\n  public static boolean isAppEngineContext(@Nullable PsiElement context) {\n    for (AppEngineExtension extension : EXTENSION.getExtensions()) {\n      if (extension.isAppEngineEnabled(context)) {\n        return true;\n      }\n    }\n    return ourTestingMode;\n  }\n}"
  },
  {
    "path": "google-app-engine/src/com/intellij/appengine/GoogleAppEngineIcons.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.intellij.appengine;\n\nimport com.intellij.openapi.util.IconLoader;\n\nimport javax.swing.*;\n\npublic class GoogleAppEngineIcons {\n  public static final Icon AppEngine = IconLoader.findIcon(\"/icons/appEngine.png\");\n  public static final Icon AppEngineMark = IconLoader.findIcon(\"/icons/appEngineMark.png\");\n\n  private GoogleAppEngineIcons() {}\n}\n"
  },
  {
    "path": "gradle/wrapper/gradle-wrapper.properties",
    "content": "#\n# Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\n#Wed Jun 22 07:25:55 MSK 2016\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-3.0-milestone-2-all.zip\n"
  },
  {
    "path": "gradle.properties",
    "content": "#\n# Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\nversion = 0.13\nideaVersion = 2016.3\njavaVersion = 1.8\njavaTargetVersion = 1.8\ndelveVersion = 0.11.318\ncustomDlvPath =\nbuildNumber=SNAPSHOT\nisEAP=false\nsources=true\ncustomSinceBuild=\nlocalIdePath=\n\npublishUsername=user\npublishPassword=password\npublishChannel=\norg.gradle.jvmargs=-Xms256m -Xmx1024m\n"
  },
  {
    "path": "gradlew",
    "content": "#!/usr/bin/env bash\n\n##############################################################################\n##\n##  Gradle start up script for UN*X\n##\n##############################################################################\n\n# Attempt to set APP_HOME\n# Resolve links: $0 may be a link\nPRG=\"$0\"\n# Need this for relative symlinks.\nwhile [ -h \"$PRG\" ] ; do\n    ls=`ls -ld \"$PRG\"`\n    link=`expr \"$ls\" : '.*-> \\(.*\\)$'`\n    if expr \"$link\" : '/.*' > /dev/null; then\n        PRG=\"$link\"\n    else\n        PRG=`dirname \"$PRG\"`\"/$link\"\n    fi\ndone\nSAVED=\"`pwd`\"\ncd \"`dirname \\\"$PRG\\\"`/\" >/dev/null\nAPP_HOME=\"`pwd -P`\"\ncd \"$SAVED\" >/dev/null\n\nAPP_NAME=\"Gradle\"\nAPP_BASE_NAME=`basename \"$0\"`\n\n# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nDEFAULT_JVM_OPTS=\"\"\n\n# Use the maximum available, or set MAX_FD != -1 to use that value.\nMAX_FD=\"maximum\"\n\nwarn ( ) {\n    echo \"$*\"\n}\n\ndie ( ) {\n    echo\n    echo \"$*\"\n    echo\n    exit 1\n}\n\n# OS specific support (must be 'true' or 'false').\ncygwin=false\nmsys=false\ndarwin=false\nnonstop=false\ncase \"`uname`\" in\n  CYGWIN* )\n    cygwin=true\n    ;;\n  Darwin* )\n    darwin=true\n    ;;\n  MINGW* )\n    msys=true\n    ;;\n  NONSTOP* )\n    nonstop=true\n    ;;\nesac\n\nCLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar\n\n# Determine the Java command to use to start the JVM.\nif [ -n \"$JAVA_HOME\" ] ; then\n    if [ -x \"$JAVA_HOME/jre/sh/java\" ] ; then\n        # IBM's JDK on AIX uses strange locations for the executables\n        JAVACMD=\"$JAVA_HOME/jre/sh/java\"\n    else\n        JAVACMD=\"$JAVA_HOME/bin/java\"\n    fi\n    if [ ! -x \"$JAVACMD\" ] ; then\n        die \"ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\n    fi\nelse\n    JAVACMD=\"java\"\n    which java >/dev/null 2>&1 || die \"ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\nfi\n\n# Increase the maximum file descriptors if we can.\nif [ \"$cygwin\" = \"false\" -a \"$darwin\" = \"false\" -a \"$nonstop\" = \"false\" ] ; then\n    MAX_FD_LIMIT=`ulimit -H -n`\n    if [ $? -eq 0 ] ; then\n        if [ \"$MAX_FD\" = \"maximum\" -o \"$MAX_FD\" = \"max\" ] ; then\n            MAX_FD=\"$MAX_FD_LIMIT\"\n        fi\n        ulimit -n $MAX_FD\n        if [ $? -ne 0 ] ; then\n            warn \"Could not set maximum file descriptor limit: $MAX_FD\"\n        fi\n    else\n        warn \"Could not query maximum file descriptor limit: $MAX_FD_LIMIT\"\n    fi\nfi\n\n# For Darwin, add options to specify how the application appears in the dock\nif $darwin; then\n    GRADLE_OPTS=\"$GRADLE_OPTS \\\"-Xdock:name=$APP_NAME\\\" \\\"-Xdock:icon=$APP_HOME/media/gradle.icns\\\"\"\nfi\n\n# For Cygwin, switch paths to Windows format before running java\nif $cygwin ; then\n    APP_HOME=`cygpath --path --mixed \"$APP_HOME\"`\n    CLASSPATH=`cygpath --path --mixed \"$CLASSPATH\"`\n    JAVACMD=`cygpath --unix \"$JAVACMD\"`\n\n    # We build the pattern for arguments to be converted via cygpath\n    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`\n    SEP=\"\"\n    for dir in $ROOTDIRSRAW ; do\n        ROOTDIRS=\"$ROOTDIRS$SEP$dir\"\n        SEP=\"|\"\n    done\n    OURCYGPATTERN=\"(^($ROOTDIRS))\"\n    # Add a user-defined pattern to the cygpath arguments\n    if [ \"$GRADLE_CYGPATTERN\" != \"\" ] ; then\n        OURCYGPATTERN=\"$OURCYGPATTERN|($GRADLE_CYGPATTERN)\"\n    fi\n    # Now convert the arguments - kludge to limit ourselves to /bin/sh\n    i=0\n    for arg in \"$@\" ; do\n        CHECK=`echo \"$arg\"|egrep -c \"$OURCYGPATTERN\" -`\n        CHECK2=`echo \"$arg\"|egrep -c \"^-\"`                                 ### Determine if an option\n\n        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition\n            eval `echo args$i`=`cygpath --path --ignore --mixed \"$arg\"`\n        else\n            eval `echo args$i`=\"\\\"$arg\\\"\"\n        fi\n        i=$((i+1))\n    done\n    case $i in\n        (0) set -- ;;\n        (1) set -- \"$args0\" ;;\n        (2) set -- \"$args0\" \"$args1\" ;;\n        (3) set -- \"$args0\" \"$args1\" \"$args2\" ;;\n        (4) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" ;;\n        (5) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" ;;\n        (6) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" ;;\n        (7) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" ;;\n        (8) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" ;;\n        (9) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" \"$args8\" ;;\n    esac\nfi\n\n# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules\nfunction splitJvmOpts() {\n    JVM_OPTS=(\"$@\")\n}\neval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS\nJVM_OPTS[${#JVM_OPTS[*]}]=\"-Dorg.gradle.appname=$APP_BASE_NAME\"\n\n# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong\nif [[ \"$(uname)\" == \"Darwin\" ]] && [[ \"$HOME\" == \"$PWD\" ]]; then\n  cd \"$(dirname \"$0\")\"\nfi\n\nexec \"$JAVACMD\" \"${JVM_OPTS[@]}\" -classpath \"$CLASSPATH\" org.gradle.wrapper.GradleWrapperMain \"$@\"\n"
  },
  {
    "path": "gradlew.bat",
    "content": "@if \"%DEBUG%\" == \"\" @echo off\r\n@rem ##########################################################################\r\n@rem\r\n@rem  Gradle startup script for Windows\r\n@rem\r\n@rem ##########################################################################\r\n\r\n@rem Set local scope for the variables with windows NT shell\r\nif \"%OS%\"==\"Windows_NT\" setlocal\r\n\r\nset DIRNAME=%~dp0\r\nif \"%DIRNAME%\" == \"\" set DIRNAME=.\r\nset APP_BASE_NAME=%~n0\r\nset APP_HOME=%DIRNAME%\r\n\r\n@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\r\nset DEFAULT_JVM_OPTS=\r\n\r\n@rem Find java.exe\r\nif defined JAVA_HOME goto findJavaFromJavaHome\r\n\r\nset JAVA_EXE=java.exe\r\n%JAVA_EXE% -version >NUL 2>&1\r\nif \"%ERRORLEVEL%\" == \"0\" goto init\r\n\r\necho.\r\necho ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\r\necho.\r\necho Please set the JAVA_HOME variable in your environment to match the\r\necho location of your Java installation.\r\n\r\ngoto fail\r\n\r\n:findJavaFromJavaHome\r\nset JAVA_HOME=%JAVA_HOME:\"=%\r\nset JAVA_EXE=%JAVA_HOME%/bin/java.exe\r\n\r\nif exist \"%JAVA_EXE%\" goto init\r\n\r\necho.\r\necho ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%\r\necho.\r\necho Please set the JAVA_HOME variable in your environment to match the\r\necho location of your Java installation.\r\n\r\ngoto fail\r\n\r\n:init\r\n@rem Get command-line arguments, handling Windows variants\r\n\r\nif not \"%OS%\" == \"Windows_NT\" goto win9xME_args\r\n\r\n:win9xME_args\r\n@rem Slurp the command line arguments.\r\nset CMD_LINE_ARGS=\r\nset _SKIP=2\r\n\r\n:win9xME_args_slurp\r\nif \"x%~1\" == \"x\" goto execute\r\n\r\nset CMD_LINE_ARGS=%*\r\n\r\n:execute\r\n@rem Setup the command line\r\n\r\nset CLASSPATH=%APP_HOME%\\gradle\\wrapper\\gradle-wrapper.jar\r\n\r\n@rem Execute Gradle\r\n\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% \"-Dorg.gradle.appname=%APP_BASE_NAME%\" -classpath \"%CLASSPATH%\" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%\r\n\r\n:end\r\n@rem End local scope for the variables with windows NT shell\r\nif \"%ERRORLEVEL%\"==\"0\" goto mainEnd\r\n\r\n:fail\r\nrem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of\r\nrem the _cmd.exe /c_ return code!\r\nif  not \"\" == \"%GRADLE_EXIT_CONSOLE%\" exit 1\r\nexit /b 1\r\n\r\n:mainEnd\r\nif \"%OS%\"==\"Windows_NT\" endlocal\r\n\r\n:omega\r\n"
  },
  {
    "path": "grammars/copyrightHeader.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing."
  },
  {
    "path": "grammars/go.bnf",
    "content": "{\n  parserClass='com.goide.parser.GoParser'\n  classHeader='copyrightHeader.java'\n\n  implements='com.goide.psi.GoCompositeElement'\n  extends='com.goide.psi.impl.GoCompositeElementImpl'\n  \n  elementTypeHolderClass='com.goide.GoTypes'\n  elementTypeClass='com.goide.psi.GoCompositeElementType'\n  tokenTypeClass='com.goide.psi.GoTokenType'\n  psiTreeUtilClass='com.goide.psi.GoPsiTreeUtil'\n  \n  psiClassPrefix='Go'\n  psiImplClassSuffix='Impl'\n  psiPackage='com.goide.psi'\n  psiImplPackage='com.goide.psi.impl'\n  psiImplUtilClass=\"com.goide.psi.impl.GoPsiImplUtil\"\n  parserUtilClass=\"com.goide.parser.GoParserUtil\"\n\n  tokens=[\n    LBRACE               =  '{'\n    RBRACE               =  '}'\n    LBRACK               =  '['\n    RBRACK               =  ']'\n    LPAREN               =  '('\n    RPAREN               =  ')'\n    COLON                =  ':'\n    SEMICOLON            =  ';'\n    COMMA                =  ','\n    EQ                   =  '=='\n    ASSIGN               =  '='\n    NOT_EQ               =  '!='\n    NOT                  =  '!'\n    PLUS_PLUS            =  '++'\n    PLUS_ASSIGN          =  '+='\n    PLUS                 =  '+'\n    MINUS_MINUS          =  '--'\n    MINUS_ASSIGN         =  '-='\n    MINUS                =  '-'\n    COND_OR              =  '||'\n    BIT_OR_ASSIGN        =  '|='\n    BIT_CLEAR_ASSIGN     =  '&^='\n    BIT_CLEAR            =  '&^'\n    COND_AND             =  '&&'\n    BIT_AND_ASSIGN       =  '&='\n    BIT_AND              =  '&'\n    BIT_OR               =  '|'\n    SHIFT_LEFT_ASSIGN    =  '<<='\n    SHIFT_LEFT           =  '<<'\n    SEND_CHANNEL         =  '<-'\n    LESS_OR_EQUAL        =  '<='\n    LESS                 =  '<'\n    BIT_XOR_ASSIGN       =  '^='\n    BIT_XOR              =  '^'\n    MUL_ASSIGN           =  '*='\n    MUL                  =  '*'\n    QUOTIENT_ASSIGN      =  '/='\n    QUOTIENT             =  '/'\n    REMAINDER_ASSIGN     =  '%='\n    REMAINDER            =  '%'\n    SHIFT_RIGHT_ASSIGN   =  '>>='\n    SHIFT_RIGHT          =  '>>'\n    GREATER_OR_EQUAL     =  '>='\n    GREATER              =  '>'\n    VAR_ASSIGN           =  ':='\n    TRIPLE_DOT           =  '...'\n    DOT                  =  '.'\n    SEMICOLON_SYNTHETIC  = '<NL>'\n    TYPE_                = 'type'\n    raw_string           = 'raw_string'\n  ]\n\n  extends(\"(Or|And|Add|Conversion|Mul|Selector|Conditional)Expr\")=BinaryExpr\n  extends(\".*(Expr|Literal|Lit|OperandName)\")=Expression\n\n  implements(\"(Type|Import)Spec|(Var|Const|Param|(Anonymous)?Field|Label)Definition|Receiver\")=\"com.goide.psi.GoNamedElement\"\n  implements(\"FunctionLit\")=\"com.goide.psi.GoSignatureOwner\"\n  implements(\"MethodSpec\")=\"com.goide.psi.GoNamedSignatureOwner\"\n  implements(\"(Function|Method)Declaration\")=\"com.goide.psi.GoFunctionOrMethodDeclaration\"\n  implements(\"(Const|Type|Var)Declaration\")=\"com.goide.psi.GoTopLevelDeclaration\"\n  implements(\".*ReferenceExpression|FieldName\")=\"com.goide.psi.GoReferenceExpressionBase\"\n  extends(\"(Function|Method)Declaration\")=\"com.goide.psi.impl.GoFunctionOrMethodDeclarationImpl<?>\"\n  extends(\"(Type|Import|Method)Spec|(Var|Const|Param|(Anonymous)?Field|Label)Definition|Receiver\")=\"com.goide.psi.impl.GoNamedElementImpl<?>\"\n  extends(\"PackageClause|Parameters|Signature|ParameterDeclaration|Result|Type|(Const|Var|Import)Spec\")=\"com.goide.psi.impl.GoStubbedElementImpl<?>\"\n  elementTypeFactory(\"PackageClause|(Function|Method|Parameter)Declaration|(Type|Import|Method|Const|Var)Spec|RangeClause|RecvStatement|ShortVarDeclaration|(Var|Const|Param|(Anonymous)?Field|Label)Definition|Receiver|Parameters|Signature|Result|.*Type|TypeList.*\")='com.goide.stubs.GoElementTypeFactory.stubFactory'\n  pin(\".*Statement\")=1\n  extends(\".*Statement\")=Statement\n  extends(\".*Type|TypeList\")=Type\n  \n  pin('.*List(?:_\\d.*)?')=1\n\n  generateTokenAccessors=true\n}\n\nFile ::= PackageClause semi ImportList TopLevelDeclaration* {pin(\".*\")=1}\nImportList ::= (ImportDeclaration semi)+|<<emptyImportList>> {\n  methods=[addImport]\n}\nprivate semi ::= '<NL>' | ';' | <<eof>>\n\nPackageClause ::= package identifier {pin=1 methods=[getName] stubClass=\"com.goide.stubs.GoPackageClauseStub\"}\n\nImportDeclaration ::= import ( ImportSpec | '(' ImportSpecs? ')' ) {\n  pin(\".*\")=1\n  methods=[addImportSpec]\n}\nprivate ImportSpecs ::= ImportSpec (semi ImportSpec)* semi? {pin=1}\nImportSpec ::= [ '.' | identifier ] ImportString {\n  stubClass=\"com.goide.stubs.GoImportSpecStub\"\n  methods=[getAlias getLocalPackageName shouldGoDeeper isForSideEffects isDot getPath getName isCImport]\n}\nImportString ::= StringLiteral {methods=[getReferences resolve getPath getPathTextRange]}\n\nType ::= TypeName | TypeLit | ParType {stubClass=\"com.goide.stubs.GoTypeStub\" methods=[getUnderlyingType shouldGoDeeper]}\nParType ::= '(' Type ')' {methods=[getActualType]}\nprivate TypeName ::= TypeReferenceExpression QualifiedTypeReferenceExpression?\nTypeReferenceExpression ::= identifier { methods=[getReference getQualifier resolve resolveType] }\nleft QualifiedTypeReferenceExpression ::= '.' identifier {elementType=TypeReferenceExpression}\n\nprivate TypeLit ::=\n    ArrayOrSliceType\n  | StructType\n  | PointerType\n  | FunctionType\n  | InterfaceType\n  | MapType\n  | ChannelType\n\nArrayOrSliceType ::= '[' ('...'|Expression?) ']' Type {pin=1}\n\nStructType ::= struct '{' Fields? '}' {pin=1}\nprivate Fields ::= FieldDeclaration (semi FieldDeclaration)* semi? {pin=1}\nFieldDeclaration ::= (FieldDefinitionList Type | AnonymousFieldDefinition) Tag?\nTag ::= StringLiteral\nprivate FieldDefinitionList ::= FieldDefinition (',' FieldDefinition)*\nFieldDefinition ::= identifier {\n  stubClass=\"com.goide.stubs.GoFieldDefinitionStub\"\n}\n\nAnonymousFieldDefinition ::= Type {\n  stubClass=\"com.goide.stubs.GoAnonymousFieldDefinitionStub\"\n  methods=[getIdentifier getName getTypeReferenceExpression getGoTypeInner]\n}\n\nPointerType ::= '*' Type {pin=1}\n\nFunctionType ::= func Signature {pin=1 implements=\"com.goide.psi.GoSignatureOwner\"}\nSignature ::= Parameters Result? {\n  pin=1\n  stubClass=\"com.goide.stubs.GoSignatureStub\"\n}\nResult ::= '(' TypeListNoPin ')' | Type | Parameters { // todo: reorder and pin (\n  stubClass=\"com.goide.stubs.GoResultStub\"\n  methods=[isVoid]\n}\nParameters ::= '(' [ (ParameterList ','?| TypeListNoPin) ] ')' {\n  pin=1\n  stubClass=\"com.goide.stubs.GoParametersStub\"\n}\nprivate ParameterList ::= ParameterDeclaration (',' (ParameterDeclaration | &')'))* {pin(\".*\")=1}\nParameterDeclaration ::= ParamDefinitionListNoPin? '...'? Type | Type { // todo: use left rule\n  stubClass=\"com.goide.stubs.GoParameterDeclarationStub\"\n  methods = [isVariadic]\n}\nprivate ParamDefinitionListNoPin ::= ParamDefinition &(!('.' | ')')) (',' ParamDefinition)* // todo\nParamDefinition ::= identifier {\n  stubClass=\"com.goide.stubs.GoParamDefinitionStub\"\n  methods = [isVariadic]\n}\n\nInterfaceType ::= interface '{' MethodSpecs? '}' {\n  pin(\".*\")=1\n  methods=[getMethods getBaseTypesReferences]\n}\nprivate MethodSpecs ::= MethodSpec (semi MethodSpec)* semi? {pin=1}\nMethodSpec ::= TypeName &(!'(') | identifier Signature {\n  stubClass=\"com.goide.stubs.GoMethodSpecStub\"\n  methods=[getGoTypeInner getName]\n}\n\nMapType ::= map '[' Type ']' Type {\n  pin=1\n  methods = [\n    keyType=\"Type[0]\"\n    valueType=\"Type[1]\"\n  ]\n}\nChannelType ::= ChanTypePrefix Type {pin=1}\nprivate ChanTypePrefix ::= chan '<-'? | '<-' chan {pin(\".*\")=1}\n\nBlockWithConsume ::= <<consumeBlock>> | BlockInner {elementType=Block} \nBlock ::= BlockInner {methods=[processDeclarations]} \nprivate BlockInner ::= '{' ('}' | (<<withOff Statements \"BLOCK?\" \"PAR\">> | (!() Statements)) '}') {pin(\".*\")=1}\nprivate Statements ::= StatementWithSemi*\n\nprivate StatementWithSemi ::= Statement (semi|&'}') { pin=1 recoverWhile=StatementRecover }\nStatement ::=\n    ConstDeclaration\n  | TypeDeclaration\n  | VarDeclaration\n  | LabeledStatement\n  | SimpleStatement\n  | GoStatement\n  | ReturnStatement\n  | BreakStatement\n  | ContinueStatement\n  | GotoStatement\n  | FallthroughStatement\n  | Block\n  | IfStatement\n  | SwitchStatement\n  | SelectStatement\n  | ForStatement\n  | DeferStatement {methods=[processDeclarations]}\n\nprivate StatementRecover ::= !('!' | '&' | '(' | '*' | '+' | '-' | ';' | '<-' | '^' | 'type' | '{' | '|' | '|=' | '||' | '}' | break | case | char | const | continue | decimali | default | defer | else | fallthrough | float | floati | for | func | go | goto | hex | identifier | if | int | interface | map | oct | return | select | string | raw_string | struct | switch | var)\n\nSimpleStatement ::=\n    ShortVarDeclaration\n  | IncDecStatement\n  | (LeftHandExprList [AssignmentStatement | SendStatement]) {pin(\".*\")=LeftHandExprList}\n\nprivate TopLevelDeclaration ::= !<<eof>> TopDeclaration semi {pin=1 recoverWhile=TopLevelDeclarationRecover}\nprivate TopDeclaration ::=\n    ConstDeclaration\n  | TypeDeclaration\n  | VarDeclaration\n  | FunctionDeclaration\n  | MethodDeclaration\nprivate TopLevelDeclarationRecover ::= !(';' |'type' | const | func | var)\n\nConstDeclaration ::= const ( ConstSpec | '(' ConstSpecs? ')' ) {pin(\".*\")=1 methods=[addSpec deleteSpec]}\nprivate ConstSpecs ::= ConstSpec (semi ConstSpec)* semi? {pin=1}\nConstSpec ::= ConstDefinitionList [ ('=' ExpressionList | Type '=' ExpressionList) ] {\n  pin(\".*\")=1 \n  stubClass=\"com.goide.stubs.GoConstSpecStub\"\n  methods=[deleteDefinition]\n}\nprivate ConstDefinitionList ::= ConstDefinition ( ',' ConstDefinition )*\nConstDefinition ::= identifier {\n  stubClass=\"com.goide.stubs.GoConstDefinitionStub\"\n  methods=[getGoTypeInner getValue]\n}\n\nLeftHandExprList ::= ExpressionList\nprivate ExpressionArgList ::= ExpressionOrTypeWithRecover2 (',' (ExpressionOrTypeWithRecover2 | &')'))* {pin(\".*\")=1}\nprivate ExpressionOrTypeWithRecover2 ::= <<withOn \"PAR\" ExpressionOrTypeWithRecover>> | (!() ExpressionOrLiteralTypeExpr) {recoverWhile=ExpressionListRecover}\nprivate ExpressionOrTypeWithRecover ::= ExpressionOrLiteralTypeExpr {recoverWhile=ExpressionListRecover}\nprivate ExpressionOrLiteralTypeExpr ::= Expression | LiteralTypeExpr\n\nprivate ExpressionList ::= ExpressionWithRecover (',' (ExpressionWithRecover | &')'))* {pin(\".*\")=1}\nprivate ExpressionWithRecover ::= Expression {recoverWhile=ExpressionListRecover}\nprivate ExpressionListRecover ::= !('!' | '!=' | '%' | '%=' | '&&' | '&' | '&=' | '&^' | '&^=' | '(' | ')' | '*' | '*=' | '+' | '++' | '+=' | ',' | '-' | '--' | '-=' | '...' | '/' | '/=' | ':' | ';' | '<' | '<-' | '<<' | '<<=' | '<=' | '<NL>' | '=' | '==' | '>' | '>=' | '>>' | '>>=' | '[' | ']' | '^' | '^=' | 'type' | '{' | '|' | '|=' | '||' | '}' | break | case | chan | char | const | continue | decimali | default | defer | else | fallthrough | float | floati | for | func | go | goto | hex | identifier | if | int | interface | map | oct | return | select | string | raw_string | struct | switch | var)\n\nTypeDeclaration ::= 'type' ( TypeSpec | '(' TypeSpecs? ')' ) {pin(\".*\")=1}\nprivate TypeSpecs ::= TypeSpec (semi TypeSpec)* semi? {pin=1}\nTypeSpec ::= SpecType {\n  methods=[getGoTypeInner getMethods shouldGoDeeper identifier=\"SpecType/identifier\"]\n  stubClass=\"com.goide.stubs.GoTypeSpecStub\"\n}\nSpecType ::= identifier Type {pin=1 stubClass=\"com.goide.stubs.GoTypeStub\" extends=\"com.goide.psi.impl.GoTypeImpl\" implements=Type}\n\nVarDeclaration ::= var ( VarSpec | '(' VarSpecs? ')' ) {pin(\".*\")=1 methods=[addSpec deleteSpec]}\nprivate VarSpecs ::= VarSpec (semi VarSpec)* semi? {pin=1}\nVarSpec ::= VarDefinitionList ( Type [ '=' ExpressionList ] | '=' ExpressionList ) {\n  pin(\".*\")=1\n  methods=[processDeclarations deleteDefinition getRightExpressionsList]\n  stubClass=\"com.goide.stubs.GoVarSpecStub\"\n}\nprivate VarDefinitionList ::= VarDefinition ( ',' VarDefinition )*\nVarDefinition ::= identifier {\n  methods=[getGoTypeInner getReference getValue]\n  stubClass=\"com.goide.stubs.GoVarDefinitionStub\"\n}\n\nShortVarDeclaration ::= VarDefinitionList ':=' ExpressionList {pin=2 extends=VarSpec}\n\nFunctionDeclaration ::= func identifier Signature BlockWithConsume? {\n  pin=2\n  stubClass=\"com.goide.stubs.GoFunctionDeclarationStub\"\n}\nMethodDeclaration ::= func Receiver identifier Signature BlockWithConsume? {\n  pin=1\n  stubClass=\"com.goide.stubs.GoMethodDeclarationStub\"\n  methods=[getReceiverType]\n}\nReceiver ::= '(' (identifier ReceiverTail | ReceiverTail) ')' {\n  methods=[getGoTypeInner]\n  pin=1\n  stubClass=\"com.goide.stubs.GoReceiverStub\"\n}\nprivate ReceiverTail ::= Type ','?\n\nLiteral ::=\n    int\n  | float\n  | floati\n  | decimali\n  | hex\n  | oct\n  | StringLiteral\n  | char\n\nStringLiteral ::= string | raw_string {\n  implements = \"com.intellij.psi.PsiLanguageInjectionHost\"\n  methods = [isValidHost updateText createLiteralTextEscaper getDecodedText]\n}\nOperandName ::= ReferenceExpression QualifiedReferenceExpression? {elementType=ReferenceExpression}\n\nleft QualifiedReferenceExpression ::= '.' identifier {elementType=ReferenceExpression}\nReferenceExpression ::= identifier { methods=[getReference getQualifier resolve getReadWriteAccess] extends=Expression}\n\nCompositeLit ::= (LiteralTypeExprInner LiteralValue | TypeName LiteralValue) {pin(\".*\")=\"LiteralTypeExprInner\"} // the brackets are valuable\nprivate LiteralTypeExprInner ::= StructType | ArrayOrSliceType | MapType\n  \nLiteralTypeExpr ::= LiteralTypeExprInner | TypeName\n\nLiteralValue ::= (<<isModeOff \"BLOCK?\">> | <<isModeOn \"PAR\">> | <<prevIsType>>) '{' ElementList? '}' {pin=2}\nprivate ElementList  ::= E ( ',' E? )*\nprivate E ::= <<withOn \"PAR\" Element>> | (!() Element) {recoverWhile=E_recover}\nprivate E_recover ::= !('}'|',')\nElement ::= First [':' Value]  {pin(\".*\")=1}\nprivate First ::= Key | <<keyOrValueExpression>>\nKey ::= (FieldName &':') | !() Expression // nullability hack for key without reference inside\nFieldName ::= identifier { methods=[getReference getQualifier resolve] }\nValue ::= Expression | LiteralValue\n\nFunctionLit ::= func Signature Block {pin=1 methods=[processDeclarations]}\n\nExpression ::=\n    OrExpr\n  | AndExpr\n  | ConditionalExpr\n  | AddExpr\n  | MulExpr\n  | UnaryExpr\n  | ConversionExpr\n  | MaxGroup\n  | ParenthesesExpr {methods=[getGoType] implements=\"com.goide.psi.GoTypeOwner\"}\n\nfake BinaryExpr ::= Expression+ {\n  methods=[left=\"Expression[0]\" right=\"Expression[1]\" getOperator]\n}\n\nOrExpr ::= Expression '||' Expression\nAndExpr ::= Expression '&&' Expression\nUnaryExpr ::=  UnaryOp Expression {methods=[getOperator]}\nConditionalExpr ::= Expression RelOp Expression\nAddExpr ::= Expression AddOp Expression\nMulExpr ::= Expression MulOp Expression\nParenthesesExpr ::= '(' <<enterMode \"PAR\">> Expression <<exitModeSafe \"PAR\">>')' {pin=1}\n\nBuiltinCallExpr ::= ReferenceExpression <<isBuiltin>> BuiltinArgumentList {pin=2}\nBuiltinArgumentList ::= '(' [ BuiltinArgsInner ','? ] ')' {pin=1 extends=ArgumentList}\nprivate BuiltinArgsInner ::= Type [ ',' BuiltinArgsTail ] | BuiltinArgsTail\nprivate BuiltinArgsTail ::= ExpressionList '...'?\n\nprivate MaxGroup ::=\n    CompositeLit\n  | OperandName\n  | BuiltinCallExpr\n  | CallExpr\n  | TypeAssertionExpr\n  | SelectorExpr\n  | IndexOrSliceExpr\n  | Literal\n  | FunctionLit\n\nprivate RelOp ::= '==' | '!=' | '<' | '<=' | '>' | '>='\nprivate AddOp ::= '+' | '-' | '|' | '^'\nprivate MulOp ::= '*' | '/' | '%' | '<<' | '>>' | '&' | '&^'\nprivate UnaryOp ::= '+' | '-' | '!' | '^' | '*' | '&' | '<-'\n\nSelectorExpr ::= Expression '.' !('(' 'type') Expression\nIndexOrSliceExpr ::= Expression '[' <<enterMode \"PAR\">> (SliceExprBody | IndexExprBody) <<exitModeSafe \"PAR\">> ']' {pin=2 methods = [getExpression getIndices]}\nprivate IndexExprBody ::= Expression SliceExprBodyInner?\nprivate inner SliceExprBodyInner ::= SliceExprBody\nprivate SliceExprBody ::= &':' (':' Expression ':' Expression) | (':' Expression?)\nTypeAssertionExpr ::= Expression '.' '(' &(!'type') Type ')'\nCallExpr ::= Expression ArgumentList\nArgumentList ::= '(' [ ExpressionArgList '...'? ','? ] ')' {pin=1}\nConversionExpr ::= &ConversionPredicate Type ConversionTail\nprivate ConversionPredicate ::= ConversionStart | '(' ConversionStart\nprivate ConversionTail ::= '(' Expression ','? ')' {pin=1}\nprivate ConversionStart ::= '*' | '<-' | '[' | chan | func | interface | map | struct\n\nLabeledStatement ::= LabelDefinition ':' Statement? {pin=2}\nLabelDefinition ::= identifier {\n  stubClass=\"com.goide.stubs.GoLabelDefinitionStub\" // todo: remove when you'll have some spare time \n}\nleft SendStatement ::= '<-' Expression {pin=1 methods=[getSendExpression]}\nleft AssignmentStatement ::= assign_op ExpressionList {pin=1}\nIncDecStatement ::= Expression ('++' | '--') {pin=2}\nassign_op ::= '=' | '+=' | '-=' | '|=' | '^=' | '*=' | '/=' | '%=' | '<<=' | '>>=' | '&=' | '&^='\nIfStatement ::= if Condition Block ElseStatement?\nElseStatement ::= else (IfStatement | Block)\nSwitchStatement ::= SwitchStart (TypeSwitchStatement | ExprSwitchStatement)\nSwitchStart ::= switch\nleft ExprSwitchStatement ::= Condition '{' ExprCaseClause* '}' {pin=2 extends=SwitchStatement}\n\nprivate Condition ::= <<enterMode \"BLOCK?\">> SimpleStatementOpt Expression? <<exitModeSafe \"BLOCK?\">>\nprivate SimpleStatementOpt ::= [SimpleStatement ';'?] // todo: remove ?\n\nExprCaseClause ::= !'}' ExprSwitchCase ':' Statements? {pin=1 implements=\"com.goide.psi.GoCaseClause\"}\nprivate ExprSwitchCase ::= case ExpressionList | default {pin(\".*\")=1} \nleft TypeSwitchStatement ::= (TypeSwitchGuard | SimpleStatement ';'? TypeSwitchGuard) '{' ( TypeCaseClause )* '}' {pin=1 extends=SwitchStatement}\nTypeSwitchGuard ::= [ VarDefinition ':=' ] Expression '.' TypeGuard\nTypeGuard ::= '(' 'type' ')' {pin=2}\nTypeCaseClause ::= !'}' TypeSwitchCase ':' Statements? {pin=1 implements=\"com.goide.psi.GoCaseClause\"}\nprivate TypeSwitchCase ::= case TypeList | default {pin(\".*\")=1}\nTypeList ::= Type ( ',' Type )* ','?\nTypeListNoPin ::= Type ( ',' Type )* ','? {elementType=TypeList}\nForStatement ::= for <<enterMode \"BLOCK?\">> (ForOrRangeClause Block | Block | Expression Block) <<exitModeSafe \"BLOCK?\">> {pin(\".*\")=\"for|ForOrRangeClause\"}\nprivate ForOrRangeClause ::= (ForClause | RangeClause)\nForClause ::= SimpleStatement? ';' Expression? ';' SimpleStatement? {methods=[processDeclarations]}\nRangeClause ::= range Expression | ExpressionsOrVariables range Expression {pin(\".*\")=1 extends=VarSpec methods=[getRangeExpression getLeftExpressionsList getRightExpressionsList]}\nprivate ExpressionsOrVariables ::= ExpressionList '=' | VarDefinitionList ':='\nGoStatement ::= go Expression\nSelectStatement ::= select '{' CommClause* '}'\nCommClause ::= CommCase ':' Statements? {pin=1}\nCommCase ::= case ( Expression SendStatement | RecvStatement ) | default {pin(\".*\")=\"case\"}\nRecvStatement ::= ExpressionsOrVariables? Expression {pin=0 extends=VarSpec methods=[getRecvExpression getLeftExpressionsList getRightExpressionsList]}\nReturnStatement ::= return ExpressionList?\nLabelRef ::= identifier { methods=[getReference] }\nBreakStatement ::= break LabelRef?\nContinueStatement ::= continue LabelRef?\nGotoStatement ::= goto LabelRef\nFallthroughStatement ::= fallthrough\nDeferStatement ::= defer Expression\n"
  },
  {
    "path": "plan9/build.gradle",
    "content": "//version '0.10.SNAPSHOT'\n//\n//apply plugin: 'java'\n//\n//sourceCompatibility = 1.5\n//\n//repositories {\n//  mavenCentral()\n//}\n//\n//dependencies {\n//  testCompile group: 'junit', name: 'junit', version: '4.11'\n//}\n"
  },
  {
    "path": "plan9/gen/com/plan9/intel/lang/core/lexer/_AsmIntelHighlightingLexer.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* The following code was generated by JFlex 1.4.3 on 3/26/16 7:41 PM */\n\npackage com.plan9.intel.lang.core.lexer;\n\nimport com.intellij.lexer.FlexLexer;\nimport com.intellij.psi.TokenType;\nimport com.intellij.psi.tree.IElementType;\nimport com.intellij.util.text.CharArrayUtil;\n\nimport java.io.IOException;\nimport java.io.Reader;\n\nimport static com.plan9.intel.ide.highlighting.AsmIntelLexerTokens.*;\n\n\n/**\n * This class is a scanner generated by \n * <a href=\"http://www.jflex.de/\">JFlex</a> 1.4.3\n * on 3/26/16 7:41 PM from the specification file\n * <tt>/Users/zolotov/dev/intellij-plugins/intellij-go/plan9/src/com/plan9/intel/ide/highlighting/AsmIntelHighlightingLexer.flex</tt>\n */\npublic class _AsmIntelHighlightingLexer implements FlexLexer {\n  /** initial size of the lookahead buffer */\n  private static final int ZZ_BUFFERSIZE = 16384;\n\n  /** lexical states */\n  public static final int YYINITIAL = 0;\n\n  /**\n   * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l\n   * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l\n   *                  at the beginning of a line\n   * l is of the form l = 2*k, k a non negative integer\n   */\n  private static final int ZZ_LEXSTATE[] = { \n     0, 0\n  };\n\n  /** \n   * Translates characters to character classes\n   */\n  private static final String ZZ_CMAP_PACKED = \n    \"\\11\\0\\1\\3\\1\\1\\1\\0\\1\\2\\1\\1\\22\\0\\1\\3\\1\\0\\1\\5\"+\n    \"\\1\\60\\1\\0\\2\\12\\1\\0\\1\\72\\1\\72\\2\\12\\1\\73\\1\\12\\1\\0\"+\n    \"\\1\\4\\1\\13\\1\\41\\1\\42\\1\\43\\1\\44\\1\\45\\1\\47\\1\\11\\1\\37\"+\n    \"\\1\\40\\1\\16\\1\\0\\1\\74\\1\\0\\1\\75\\2\\0\\1\\26\\1\\24\\1\\30\"+\n    \"\\1\\25\\1\\20\\1\\31\\1\\21\\1\\46\\1\\35\\1\\53\\1\\52\\1\\22\\1\\50\"+\n    \"\\1\\33\\1\\23\\1\\27\\1\\54\\1\\36\\1\\34\\1\\17\\1\\32\\1\\56\\1\\51\"+\n    \"\\1\\15\\1\\55\\1\\57\\3\\0\\1\\12\\1\\6\\1\\0\\2\\10\\1\\63\\1\\66\"+\n    \"\\1\\67\\1\\70\\2\\6\\1\\61\\2\\6\\1\\64\\1\\6\\1\\62\\4\\6\\1\\71\"+\n    \"\\1\\6\\1\\65\\2\\6\\1\\14\\2\\6\\1\\0\\1\\12\\1\\0\\1\\12\\53\\0\"+\n    \"\\1\\6\\12\\0\\1\\6\\1\\0\\1\\6\\2\\0\\1\\6\\5\\0\\27\\6\\1\\0\"+\n    \"\\37\\6\\1\\0\\u01ca\\6\\4\\0\\14\\6\\16\\0\\5\\6\\7\\0\\1\\6\\1\\0\"+\n    \"\\1\\6\\201\\0\\5\\6\\1\\0\\2\\6\\2\\0\\4\\6\\10\\0\\1\\6\\1\\0\"+\n    \"\\3\\6\\1\\0\\1\\6\\1\\0\\24\\6\\1\\0\\123\\6\\1\\0\\213\\6\\10\\0\"+\n    \"\\236\\6\\11\\0\\46\\6\\2\\0\\1\\6\\7\\0\\47\\6\\110\\0\\33\\6\\5\\0\"+\n    \"\\3\\6\\55\\0\\53\\6\\25\\0\\12\\7\\4\\0\\2\\6\\1\\0\\143\\6\\1\\0\"+\n    \"\\1\\6\\17\\0\\2\\6\\7\\0\\2\\6\\12\\7\\3\\6\\2\\0\\1\\6\\20\\0\"+\n    \"\\1\\6\\1\\0\\36\\6\\35\\0\\131\\6\\13\\0\\1\\6\\16\\0\\12\\7\\41\\6\"+\n    \"\\11\\0\\2\\6\\4\\0\\1\\6\\5\\0\\26\\6\\4\\0\\1\\6\\11\\0\\1\\6\"+\n    \"\\3\\0\\1\\6\\27\\0\\31\\6\\107\\0\\1\\6\\1\\0\\13\\6\\127\\0\\66\\6\"+\n    \"\\3\\0\\1\\6\\22\\0\\1\\6\\7\\0\\12\\6\\4\\0\\12\\7\\1\\0\\7\\6\"+\n    \"\\1\\0\\7\\6\\5\\0\\10\\6\\2\\0\\2\\6\\2\\0\\26\\6\\1\\0\\7\\6\"+\n    \"\\1\\0\\1\\6\\3\\0\\4\\6\\3\\0\\1\\6\\20\\0\\1\\6\\15\\0\\2\\6\"+\n    \"\\1\\0\\3\\6\\4\\0\\12\\7\\2\\6\\23\\0\\6\\6\\4\\0\\2\\6\\2\\0\"+\n    \"\\26\\6\\1\\0\\7\\6\\1\\0\\2\\6\\1\\0\\2\\6\\1\\0\\2\\6\\37\\0\"+\n    \"\\4\\6\\1\\0\\1\\6\\7\\0\\12\\7\\2\\0\\3\\6\\20\\0\\11\\6\\1\\0\"+\n    \"\\3\\6\\1\\0\\26\\6\\1\\0\\7\\6\\1\\0\\2\\6\\1\\0\\5\\6\\3\\0\"+\n    \"\\1\\6\\22\\0\\1\\6\\17\\0\\2\\6\\4\\0\\12\\7\\25\\0\\10\\6\\2\\0\"+\n    \"\\2\\6\\2\\0\\26\\6\\1\\0\\7\\6\\1\\0\\2\\6\\1\\0\\5\\6\\3\\0\"+\n    \"\\1\\6\\36\\0\\2\\6\\1\\0\\3\\6\\4\\0\\12\\7\\1\\0\\1\\6\\21\\0\"+\n    \"\\1\\6\\1\\0\\6\\6\\3\\0\\3\\6\\1\\0\\4\\6\\3\\0\\2\\6\\1\\0\"+\n    \"\\1\\6\\1\\0\\2\\6\\3\\0\\2\\6\\3\\0\\3\\6\\3\\0\\14\\6\\26\\0\"+\n    \"\\1\\6\\25\\0\\12\\7\\25\\0\\10\\6\\1\\0\\3\\6\\1\\0\\27\\6\\1\\0\"+\n    \"\\12\\6\\1\\0\\5\\6\\3\\0\\1\\6\\32\\0\\2\\6\\6\\0\\2\\6\\4\\0\"+\n    \"\\12\\7\\25\\0\\10\\6\\1\\0\\3\\6\\1\\0\\27\\6\\1\\0\\12\\6\\1\\0\"+\n    \"\\5\\6\\3\\0\\1\\6\\40\\0\\1\\6\\1\\0\\2\\6\\4\\0\\12\\7\\1\\0\"+\n    \"\\2\\6\\22\\0\\10\\6\\1\\0\\3\\6\\1\\0\\51\\6\\2\\0\\1\\6\\20\\0\"+\n    \"\\1\\6\\21\\0\\2\\6\\4\\0\\12\\7\\12\\0\\6\\6\\5\\0\\22\\6\\3\\0\"+\n    \"\\30\\6\\1\\0\\11\\6\\1\\0\\1\\6\\2\\0\\7\\6\\72\\0\\60\\6\\1\\0\"+\n    \"\\2\\6\\14\\0\\7\\6\\11\\0\\12\\7\\47\\0\\2\\6\\1\\0\\1\\6\\2\\0\"+\n    \"\\2\\6\\1\\0\\1\\6\\2\\0\\1\\6\\6\\0\\4\\6\\1\\0\\7\\6\\1\\0\"+\n    \"\\3\\6\\1\\0\\1\\6\\1\\0\\1\\6\\2\\0\\2\\6\\1\\0\\4\\6\\1\\0\"+\n    \"\\2\\6\\11\\0\\1\\6\\2\\0\\5\\6\\1\\0\\1\\6\\11\\0\\12\\7\\2\\0\"+\n    \"\\4\\6\\40\\0\\1\\6\\37\\0\\12\\7\\26\\0\\10\\6\\1\\0\\44\\6\\33\\0\"+\n    \"\\5\\6\\163\\0\\53\\6\\24\\0\\1\\6\\12\\7\\6\\0\\6\\6\\4\\0\\4\\6\"+\n    \"\\3\\0\\1\\6\\3\\0\\2\\6\\7\\0\\3\\6\\4\\0\\15\\6\\14\\0\\1\\6\"+\n    \"\\1\\0\\12\\7\\6\\0\\46\\6\\1\\0\\1\\6\\5\\0\\1\\6\\2\\0\\53\\6\"+\n    \"\\1\\0\\u014d\\6\\1\\0\\4\\6\\2\\0\\7\\6\\1\\0\\1\\6\\1\\0\\4\\6\"+\n    \"\\2\\0\\51\\6\\1\\0\\4\\6\\2\\0\\41\\6\\1\\0\\4\\6\\2\\0\\7\\6\"+\n    \"\\1\\0\\1\\6\\1\\0\\4\\6\\2\\0\\17\\6\\1\\0\\71\\6\\1\\0\\4\\6\"+\n    \"\\2\\0\\103\\6\\45\\0\\20\\6\\20\\0\\125\\6\\14\\0\\u026c\\6\\2\\0\\21\\6\"+\n    \"\\1\\0\\32\\6\\5\\0\\113\\6\\25\\0\\15\\6\\1\\0\\4\\6\\16\\0\\22\\6\"+\n    \"\\16\\0\\22\\6\\16\\0\\15\\6\\1\\0\\3\\6\\17\\0\\64\\6\\43\\0\\1\\6\"+\n    \"\\4\\0\\1\\6\\3\\0\\12\\7\\46\\0\\12\\7\\6\\0\\130\\6\\10\\0\\51\\6\"+\n    \"\\1\\0\\1\\6\\5\\0\\106\\6\\12\\0\\35\\6\\51\\0\\12\\7\\36\\6\\2\\0\"+\n    \"\\5\\6\\13\\0\\54\\6\\25\\0\\7\\6\\10\\0\\12\\7\\46\\0\\27\\6\\11\\0\"+\n    \"\\65\\6\\53\\0\\12\\7\\6\\0\\12\\7\\15\\0\\1\\6\\135\\0\\57\\6\\21\\0\"+\n    \"\\7\\6\\4\\0\\12\\7\\51\\0\\36\\6\\15\\0\\2\\6\\12\\7\\54\\6\\32\\0\"+\n    \"\\44\\6\\34\\0\\12\\7\\3\\0\\3\\6\\12\\7\\44\\6\\153\\0\\4\\6\\1\\0\"+\n    \"\\4\\6\\3\\0\\2\\6\\11\\0\\300\\6\\100\\0\\u0116\\6\\2\\0\\6\\6\\2\\0\"+\n    \"\\46\\6\\2\\0\\6\\6\\2\\0\\10\\6\\1\\0\\1\\6\\1\\0\\1\\6\\1\\0\"+\n    \"\\1\\6\\1\\0\\37\\6\\2\\0\\65\\6\\1\\0\\7\\6\\1\\0\\1\\6\\3\\0\"+\n    \"\\3\\6\\1\\0\\7\\6\\3\\0\\4\\6\\2\\0\\6\\6\\4\\0\\15\\6\\5\\0\"+\n    \"\\3\\6\\1\\0\\7\\6\\164\\0\\1\\6\\15\\0\\1\\6\\20\\0\\15\\6\\145\\0\"+\n    \"\\1\\6\\4\\0\\1\\6\\2\\0\\12\\6\\1\\0\\1\\6\\3\\0\\5\\6\\6\\0\"+\n    \"\\1\\6\\1\\0\\1\\6\\1\\0\\1\\6\\1\\0\\4\\6\\1\\0\\13\\6\\2\\0\"+\n    \"\\4\\6\\5\\0\\5\\6\\4\\0\\1\\6\\64\\0\\2\\6\\220\\0\\1\\6\\u09ea\\0\"+\n    \"\\57\\6\\1\\0\\57\\6\\1\\0\\205\\6\\6\\0\\4\\6\\3\\0\\2\\6\\14\\0\"+\n    \"\\46\\6\\1\\0\\1\\6\\5\\0\\1\\6\\2\\0\\70\\6\\7\\0\\1\\6\\20\\0\"+\n    \"\\27\\6\\11\\0\\7\\6\\1\\0\\7\\6\\1\\0\\7\\6\\1\\0\\7\\6\\1\\0\"+\n    \"\\7\\6\\1\\0\\7\\6\\1\\0\\7\\6\\1\\0\\7\\6\\120\\0\\1\\6\\u01d5\\0\"+\n    \"\\2\\6\\52\\0\\5\\6\\5\\0\\2\\6\\4\\0\\126\\6\\6\\0\\3\\6\\1\\0\"+\n    \"\\132\\6\\1\\0\\4\\6\\5\\0\\51\\6\\3\\0\\136\\6\\21\\0\\33\\6\\65\\0\"+\n    \"\\20\\6\\u0200\\0\\u19b6\\6\\112\\0\\u51cd\\6\\63\\0\\u048d\\6\\103\\0\\56\\6\\2\\0\"+\n    \"\\u010d\\6\\3\\0\\20\\6\\12\\7\\2\\6\\24\\0\\57\\6\\20\\0\\31\\6\\10\\0\"+\n    \"\\106\\6\\61\\0\\11\\6\\2\\0\\147\\6\\2\\0\\4\\6\\1\\0\\4\\6\\14\\0\"+\n    \"\\13\\6\\115\\0\\12\\6\\1\\0\\3\\6\\1\\0\\4\\6\\1\\0\\27\\6\\35\\0\"+\n    \"\\64\\6\\16\\0\\62\\6\\34\\0\\12\\7\\30\\0\\6\\6\\3\\0\\1\\6\\4\\0\"+\n    \"\\12\\7\\34\\6\\12\\0\\27\\6\\31\\0\\35\\6\\7\\0\\57\\6\\34\\0\\1\\6\"+\n    \"\\12\\7\\46\\0\\51\\6\\27\\0\\3\\6\\1\\0\\10\\6\\4\\0\\12\\7\\6\\0\"+\n    \"\\27\\6\\3\\0\\1\\6\\5\\0\\60\\6\\1\\0\\1\\6\\3\\0\\2\\6\\2\\0\"+\n    \"\\5\\6\\2\\0\\1\\6\\1\\0\\1\\6\\30\\0\\3\\6\\2\\0\\13\\6\\7\\0\"+\n    \"\\3\\6\\14\\0\\6\\6\\2\\0\\6\\6\\2\\0\\6\\6\\11\\0\\7\\6\\1\\0\"+\n    \"\\7\\6\\221\\0\\43\\6\\15\\0\\12\\7\\6\\0\\u2ba4\\6\\14\\0\\27\\6\\4\\0\"+\n    \"\\61\\6\\u2104\\0\\u016e\\6\\2\\0\\152\\6\\46\\0\\7\\6\\14\\0\\5\\6\\5\\0\"+\n    \"\\1\\6\\1\\0\\12\\6\\1\\0\\15\\6\\1\\0\\5\\6\\1\\0\\1\\6\\1\\0\"+\n    \"\\2\\6\\1\\0\\2\\6\\1\\0\\154\\6\\41\\0\\u016b\\6\\22\\0\\100\\6\\2\\0\"+\n    \"\\66\\6\\50\\0\\14\\6\\164\\0\\5\\6\\1\\0\\207\\6\\23\\0\\12\\7\\7\\0\"+\n    \"\\32\\6\\6\\0\\32\\6\\13\\0\\131\\6\\3\\0\\6\\6\\2\\0\\6\\6\\2\\0\"+\n    \"\\6\\6\\2\\0\\3\\6\\43\\0\";\n\n  /** \n   * Translates characters to character classes\n   */\n  private static final char [] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED);\n\n  /** \n   * Translates DFA states to action switch labels.\n   */\n  private static final int [] ZZ_ACTION = zzUnpackAction();\n\n  private static final String ZZ_ACTION_PACKED_0 =\n    \"\\1\\0\\1\\1\\2\\2\\1\\3\\1\\1\\1\\4\\1\\5\\1\\3\"+\n    \"\\1\\5\\27\\4\\1\\1\\1\\6\\1\\7\\2\\1\\1\\10\\1\\0\"+\n    \"\\1\\11\\1\\12\\1\\0\\1\\13\\10\\4\\1\\13\\22\\4\\1\\13\"+\n    \"\\5\\4\\1\\13\\11\\4\\1\\14\\6\\4\\1\\13\\16\\4\\1\\14\"+\n    \"\\4\\4\\1\\13\\2\\4\\1\\13\\10\\4\\1\\14\\1\\4\\1\\14\"+\n    \"\\32\\4\\7\\15\\1\\4\\1\\15\\6\\4\\4\\0\\1\\16\\10\\4\"+\n    \"\\1\\13\\2\\4\\1\\17\\145\\4\\1\\17\\10\\4\\1\\15\\4\\4\"+\n    \"\\1\\17\\1\\15\\22\\4\\5\\0\\3\\4\\1\\20\\3\\4\\1\\15\"+\n    \"\\14\\4\\1\\15\\57\\4\\1\\15\\26\\4\\4\\15\\3\\4\\2\\15\"+\n    \"\\6\\4\\5\\0\\4\\4\\1\\21\\11\\4\\2\\15\\32\\4\\3\\15\"+\n    \"\\1\\4\\1\\15\\2\\4\\1\\15\\23\\4\\3\\0\\1\\22\\1\\4\"+\n    \"\\1\\15\\7\\4\\1\\15\\11\\4\\1\\15\\11\\4\\1\\0\\35\\4\";\n\n  private static int [] zzUnpackAction() {\n    int [] result = new int[570];\n    int offset = 0;\n    offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);\n    return result;\n  }\n\n  private static int zzUnpackAction(String packed, int offset, int [] result) {\n    int i = 0;       /* index in packed string  */\n    int j = offset;  /* index in unpacked array */\n    int l = packed.length();\n    while (i < l) {\n      int count = packed.charAt(i++);\n      int value = packed.charAt(i++);\n      do result[j++] = value; while (--count > 0);\n    }\n    return j;\n  }\n\n\n  /** \n   * Translates a state to a row index in the transition table\n   */\n  private static final int [] ZZ_ROWMAP = zzUnpackRowMap();\n\n  private static final String ZZ_ROWMAP_PACKED_0 =\n    \"\\0\\0\\0\\76\\0\\174\\0\\76\\0\\272\\0\\370\\0\\u0136\\0\\u0174\"+\n    \"\\0\\76\\0\\u01b2\\0\\u01f0\\0\\u022e\\0\\u026c\\0\\u02aa\\0\\u02e8\\0\\u0326\"+\n    \"\\0\\u0364\\0\\u03a2\\0\\u03e0\\0\\u041e\\0\\u045c\\0\\u049a\\0\\u04d8\\0\\u0516\"+\n    \"\\0\\u0554\\0\\u0592\\0\\u05d0\\0\\u060e\\0\\u064c\\0\\u068a\\0\\u06c8\\0\\u0706\"+\n    \"\\0\\u0744\\0\\u0782\\0\\76\\0\\76\\0\\u07c0\\0\\u07fe\\0\\u083c\\0\\370\"+\n    \"\\0\\76\\0\\76\\0\\u087a\\0\\u0136\\0\\u08b8\\0\\u08f6\\0\\u0934\\0\\u0972\"+\n    \"\\0\\u09b0\\0\\u09ee\\0\\u0a2c\\0\\u0a6a\\0\\u0aa8\\0\\u0ae6\\0\\u0b24\\0\\u0b62\"+\n    \"\\0\\u0ba0\\0\\u0bde\\0\\u0c1c\\0\\u0c5a\\0\\u0c98\\0\\u0cd6\\0\\u0d14\\0\\u0d52\"+\n    \"\\0\\u0d90\\0\\u0dce\\0\\u0e0c\\0\\u0e4a\\0\\u0e88\\0\\u0ec6\\0\\u0f04\\0\\u0f42\"+\n    \"\\0\\u0f80\\0\\u0fbe\\0\\u0ffc\\0\\u103a\\0\\u1078\\0\\u10b6\\0\\u10f4\\0\\u1132\"+\n    \"\\0\\u1170\\0\\u11ae\\0\\u11ec\\0\\u122a\\0\\u1268\\0\\u12a6\\0\\u12e4\\0\\u1322\"+\n    \"\\0\\u1360\\0\\u139e\\0\\u13dc\\0\\u141a\\0\\u1458\\0\\u1496\\0\\u14d4\\0\\u1512\"+\n    \"\\0\\u1550\\0\\u158e\\0\\u15cc\\0\\u160a\\0\\u1648\\0\\u1686\\0\\u16c4\\0\\u1702\"+\n    \"\\0\\u1740\\0\\u177e\\0\\u17bc\\0\\u17fa\\0\\u1838\\0\\u1876\\0\\u18b4\\0\\u18f2\"+\n    \"\\0\\u1930\\0\\u196e\\0\\u19ac\\0\\u19ea\\0\\u1a28\\0\\u1a66\\0\\u1aa4\\0\\u1ae2\"+\n    \"\\0\\u1b20\\0\\u1b5e\\0\\u1b9c\\0\\u1bda\\0\\u1c18\\0\\u1c56\\0\\u1c94\\0\\u1cd2\"+\n    \"\\0\\u0f42\\0\\u1d10\\0\\u1d4e\\0\\u1d8c\\0\\u1dca\\0\\u1e08\\0\\u1e46\\0\\u1e84\"+\n    \"\\0\\u1ec2\\0\\u1f00\\0\\u1f3e\\0\\u1f7c\\0\\u1fba\\0\\u1ff8\\0\\u2036\\0\\u2074\"+\n    \"\\0\\u20b2\\0\\u20f0\\0\\u212e\\0\\u216c\\0\\u21aa\\0\\u21e8\\0\\u2226\\0\\u2264\"+\n    \"\\0\\u22a2\\0\\u22e0\\0\\u231e\\0\\u1550\\0\\u235c\\0\\u239a\\0\\u23d8\\0\\u2416\"+\n    \"\\0\\u2454\\0\\u2492\\0\\u24d0\\0\\u0136\\0\\u250e\\0\\u254c\\0\\u258a\\0\\u25c8\"+\n    \"\\0\\u2606\\0\\u2644\\0\\u2682\\0\\u26c0\\0\\u26fe\\0\\u273c\\0\\u087a\\0\\u277a\"+\n    \"\\0\\u27b8\\0\\u27f6\\0\\u2834\\0\\u2872\\0\\u28b0\\0\\u28ee\\0\\u292c\\0\\u296a\"+\n    \"\\0\\u29a8\\0\\u29e6\\0\\u0136\\0\\u2a24\\0\\u2a62\\0\\u2aa0\\0\\u2ade\\0\\u2b1c\"+\n    \"\\0\\u2b5a\\0\\u2b98\\0\\u2bd6\\0\\u2c14\\0\\u2c52\\0\\u2c90\\0\\u2cce\\0\\u2d0c\"+\n    \"\\0\\u2d4a\\0\\u2d88\\0\\u2dc6\\0\\u2e04\\0\\u2416\\0\\u2e42\\0\\u2e80\\0\\u2ebe\"+\n    \"\\0\\u2efc\\0\\u2f3a\\0\\u2f78\\0\\u2fb6\\0\\u2ff4\\0\\u3032\\0\\u3070\\0\\u30ae\"+\n    \"\\0\\u30ec\\0\\u312a\\0\\u3168\\0\\u31a6\\0\\u31e4\\0\\u3222\\0\\u3260\\0\\u329e\"+\n    \"\\0\\u32dc\\0\\u331a\\0\\u3358\\0\\u3396\\0\\u33d4\\0\\u3412\\0\\u3450\\0\\u348e\"+\n    \"\\0\\u34cc\\0\\u350a\\0\\u3548\\0\\u3586\\0\\u35c4\\0\\u3602\\0\\u3640\\0\\u367e\"+\n    \"\\0\\u36bc\\0\\u36fa\\0\\u3738\\0\\u3776\\0\\u37b4\\0\\u37f2\\0\\u3830\\0\\u386e\"+\n    \"\\0\\u38ac\\0\\u38ea\\0\\u3928\\0\\u3966\\0\\u39a4\\0\\u39e2\\0\\u3a20\\0\\u3a5e\"+\n    \"\\0\\u3a9c\\0\\u3ada\\0\\u3b18\\0\\u3b56\\0\\u3b94\\0\\u3bd2\\0\\u3c10\\0\\u3c4e\"+\n    \"\\0\\u3c8c\\0\\u3cca\\0\\u3d08\\0\\u3d46\\0\\u3d84\\0\\u3dc2\\0\\u3e00\\0\\u3e3e\"+\n    \"\\0\\u3e7c\\0\\u3eba\\0\\u3ef8\\0\\u3f36\\0\\u3f74\\0\\u3fb2\\0\\u3ff0\\0\\u402e\"+\n    \"\\0\\u406c\\0\\u40aa\\0\\u40e8\\0\\u4126\\0\\u4164\\0\\u41a2\\0\\u41e0\\0\\u421e\"+\n    \"\\0\\u425c\\0\\u429a\\0\\u42d8\\0\\u4316\\0\\u4354\\0\\u4392\\0\\u43d0\\0\\u440e\"+\n    \"\\0\\u444c\\0\\u16c4\\0\\u448a\\0\\u44c8\\0\\u4506\\0\\u4544\\0\\u4582\\0\\u45c0\"+\n    \"\\0\\u45fe\\0\\u463c\\0\\u467a\\0\\u46b8\\0\\u46f6\\0\\u4734\\0\\u4772\\0\\u47b0\"+\n    \"\\0\\u47ee\\0\\u482c\\0\\u486a\\0\\u48a8\\0\\u48e6\\0\\u4924\\0\\u4962\\0\\u49a0\"+\n    \"\\0\\u49de\\0\\u4a1c\\0\\u4a5a\\0\\u4a98\\0\\u4ad6\\0\\u4b14\\0\\u4b52\\0\\u4b90\"+\n    \"\\0\\u4bce\\0\\u4c0c\\0\\u0136\\0\\u4c4a\\0\\u4c88\\0\\u4cc6\\0\\u4d04\\0\\u4d42\"+\n    \"\\0\\u4d80\\0\\u4dbe\\0\\u4dfc\\0\\u4e3a\\0\\u4e78\\0\\u4eb6\\0\\u4ef4\\0\\u4f32\"+\n    \"\\0\\u4f70\\0\\u4fae\\0\\u4fec\\0\\u502a\\0\\u5068\\0\\u50a6\\0\\u50e4\\0\\u5122\"+\n    \"\\0\\u5160\\0\\u519e\\0\\u51dc\\0\\u521a\\0\\u5258\\0\\u5296\\0\\u52d4\\0\\u5312\"+\n    \"\\0\\u45c0\\0\\u5350\\0\\u538e\\0\\u53cc\\0\\u540a\\0\\u5448\\0\\u5486\\0\\u54c4\"+\n    \"\\0\\u5502\\0\\u5540\\0\\u557e\\0\\u55bc\\0\\u55fa\\0\\u5638\\0\\u5676\\0\\u56b4\"+\n    \"\\0\\u56f2\\0\\u5730\\0\\u576e\\0\\u57ac\\0\\u57ea\\0\\u5828\\0\\u5866\\0\\u58a4\"+\n    \"\\0\\u58e2\\0\\u5920\\0\\u595e\\0\\u599c\\0\\u59da\\0\\u5a18\\0\\u5a56\\0\\u5a94\"+\n    \"\\0\\u5ad2\\0\\u5b10\\0\\u5b4e\\0\\u5b8c\\0\\u5bca\\0\\u5c08\\0\\u5c46\\0\\u5c84\"+\n    \"\\0\\u5cc2\\0\\u5d00\\0\\u5d3e\\0\\u5d7c\\0\\u5dba\\0\\u5df8\\0\\u235c\\0\\u5e36\"+\n    \"\\0\\u23d8\\0\\u5e74\\0\\u5eb2\\0\\u5ef0\\0\\u5f2e\\0\\u5f6c\\0\\u5faa\\0\\u5fe8\"+\n    \"\\0\\u6026\\0\\u6064\\0\\u60a2\\0\\u60e0\\0\\u611e\\0\\u615c\\0\\u619a\\0\\u61d8\"+\n    \"\\0\\u6216\\0\\u6254\\0\\u6292\\0\\u62d0\\0\\u630e\\0\\u634c\\0\\u638a\\0\\u63c8\"+\n    \"\\0\\u6406\\0\\u6444\\0\\u6482\\0\\u64c0\\0\\u64fe\\0\\u653c\\0\\u657a\\0\\u65b8\"+\n    \"\\0\\u65f6\\0\\u6634\\0\\u0136\\0\\u6672\\0\\u66b0\\0\\u66ee\\0\\u672c\\0\\u676a\"+\n    \"\\0\\u67a8\\0\\u67e6\\0\\u6824\\0\\u6862\\0\\u3032\\0\\u68a0\\0\\u68de\\0\\u691c\"+\n    \"\\0\\u695a\\0\\u6998\\0\\u69d6\\0\\u6a14\\0\\u6a52\\0\\u6a90\\0\\u6ace\\0\\u6b0c\"+\n    \"\\0\\u6b4a\\0\\u6b88\\0\\u6bc6\\0\\u6c04\\0\\u6c42\\0\\u6c80\\0\\u6cbe\\0\\u6cfc\"+\n    \"\\0\\u6d3a\\0\\u6d78\\0\\u6db6\\0\\u6df4\\0\\u6e32\\0\\u6e70\\0\\u6eae\\0\\u6eec\"+\n    \"\\0\\u3e7c\\0\\u5c08\\0\\u6f2a\\0\\u6f68\\0\\u6fa6\\0\\u6fe4\\0\\u7022\\0\\u7060\"+\n    \"\\0\\u709e\\0\\u70dc\\0\\u711a\\0\\u7158\\0\\u7196\\0\\u71d4\\0\\u7212\\0\\u7250\"+\n    \"\\0\\u728e\\0\\u72cc\\0\\u730a\\0\\u60e0\\0\\u7348\\0\\u7386\\0\\u73c4\\0\\u7402\"+\n    \"\\0\\u7440\\0\\u747e\\0\\u74bc\\0\\u74fa\\0\\u7538\\0\\u7576\\0\\76\\0\\u75b4\"+\n    \"\\0\\u75f2\\0\\u7630\\0\\u766e\\0\\u76ac\\0\\u76ea\\0\\u7728\\0\\u7766\\0\\u77a4\"+\n    \"\\0\\u5920\\0\\u77e2\\0\\u7820\\0\\u785e\\0\\u789c\\0\\u78da\\0\\u7918\\0\\u7956\"+\n    \"\\0\\u7994\\0\\u79d2\\0\\u7a10\\0\\u7a4e\\0\\u7a8c\\0\\u7aca\\0\\u7b08\\0\\u7b46\"+\n    \"\\0\\u7b84\\0\\u7bc2\\0\\u7c00\\0\\u7c3e\\0\\u7c7c\\0\\u7cba\\0\\u7cf8\\0\\u7d36\"+\n    \"\\0\\u7d74\\0\\u7db2\\0\\u7df0\\0\\u7e2e\\0\\u7e6c\\0\\u7eaa\\0\\u7ee8\\0\\u7f26\"+\n    \"\\0\\u7f64\\0\\u7fa2\\0\\u7fe0\\0\\u801e\\0\\u805c\\0\\u809a\\0\\u80d8\\0\\u8116\"+\n    \"\\0\\u8154\\0\\u8192\\0\\u81d0\\0\\u820e\\0\\u824c\\0\\u828a\\0\\u82c8\\0\\u8306\"+\n    \"\\0\\u8344\\0\\u8382\";\n\n  private static int [] zzUnpackRowMap() {\n    int [] result = new int[570];\n    int offset = 0;\n    offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);\n    return result;\n  }\n\n  private static int zzUnpackRowMap(String packed, int offset, int [] result) {\n    int i = 0;  /* index in packed string  */\n    int j = offset;  /* index in unpacked array */\n    int l = packed.length();\n    while (i < l) {\n      int high = packed.charAt(i++) << 16;\n      result[j++] = high | packed.charAt(i++);\n    }\n    return j;\n  }\n\n  /** \n   * The transition table of the DFA\n   */\n  private static final int [] ZZ_TRANS = zzUnpackTrans();\n\n  private static final String ZZ_TRANS_PACKED_0 =\n    \"\\1\\2\\1\\3\\1\\4\\1\\3\\1\\5\\1\\6\\1\\7\\1\\2\"+\n    \"\\1\\7\\1\\10\\1\\11\\1\\12\\1\\7\\1\\13\\1\\2\\1\\14\"+\n    \"\\1\\15\\1\\16\\1\\17\\1\\20\\1\\21\\1\\22\\1\\23\\1\\24\"+\n    \"\\1\\25\\1\\26\\1\\27\\1\\30\\1\\31\\1\\32\\1\\33\\7\\10\"+\n    \"\\1\\34\\1\\10\\1\\35\\1\\36\\1\\7\\1\\37\\1\\40\\1\\7\"+\n    \"\\1\\41\\1\\7\\1\\42\\11\\7\\1\\43\\1\\44\\1\\45\\1\\46\"+\n    \"\\77\\0\\1\\3\\1\\0\\1\\3\\76\\0\\1\\47\\71\\0\\5\\50\"+\n    \"\\1\\51\\70\\50\\6\\0\\4\\7\\1\\0\\3\\7\\1\\52\\41\\7\"+\n    \"\\1\\0\\11\\7\\15\\0\\1\\10\\1\\0\\1\\10\\23\\0\\7\\10\"+\n    \"\\1\\0\\1\\10\\42\\0\\2\\53\\66\\0\\3\\7\\1\\54\\1\\0\"+\n    \"\\1\\54\\2\\7\\1\\52\\1\\55\\1\\56\\1\\7\\1\\57\\1\\60\"+\n    \"\\1\\61\\1\\7\\1\\62\\1\\7\\1\\63\\5\\7\\1\\64\\2\\54\"+\n    \"\\1\\65\\4\\54\\1\\7\\1\\54\\10\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\1\\7\\1\\66\\1\\7\\1\\67\"+\n    \"\\3\\7\\1\\70\\7\\7\\1\\71\\21\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\14\\7\\1\\72\\1\\54\\13\\7\"+\n    \"\\1\\73\\7\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\3\\7\\1\\74\\2\\7\\1\\75\\6\\7\\1\\54\\23\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\1\\7\"+\n    \"\\1\\76\\2\\7\\1\\77\\1\\7\\1\\100\\1\\101\\2\\7\\1\\102\"+\n    \"\\2\\7\\1\\103\\23\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\13\\7\\1\\104\\3\\7\\1\\105\\21\\7\\1\\0\"+\n    \"\\11\\7\\12\\0\\4\\7\\1\\0\\2\\7\\1\\54\\1\\52\\1\\106\"+\n    \"\\2\\7\\1\\54\\1\\107\\3\\7\\1\\110\\4\\7\\1\\111\\11\\7\"+\n    \"\\1\\54\\6\\7\\1\\112\\2\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\2\\7\\1\\54\\1\\52\\1\\7\\1\\113\\1\\7\\1\\54\"+\n    \"\\3\\7\\1\\114\\3\\7\\1\\115\\1\\7\\1\\54\\1\\116\\1\\71\"+\n    \"\\7\\7\\1\\54\\11\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\2\\7\\1\\54\\1\\52\\1\\7\\1\\117\\1\\7\\1\\54\\2\\7\"+\n    \"\\1\\120\\1\\121\\4\\7\\1\\122\\2\\7\\1\\123\\7\\7\\1\\54\"+\n    \"\\11\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\2\\7\\1\\124\"+\n    \"\\1\\52\\1\\7\\1\\125\\2\\7\\1\\126\\2\\7\\1\\127\\1\\7\"+\n    \"\\1\\130\\1\\131\\1\\132\\1\\7\\1\\133\\1\\134\\1\\135\\11\\7\"+\n    \"\\1\\136\\7\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\2\\7\"+\n    \"\\1\\54\\1\\52\\3\\7\\1\\137\\1\\140\\1\\7\\1\\141\\1\\142\"+\n    \"\\1\\143\\4\\7\\1\\54\\1\\7\\1\\144\\7\\7\\1\\54\\1\\7\"+\n    \"\\1\\145\\1\\146\\2\\7\\1\\147\\1\\7\\1\\150\\1\\7\\1\\0\"+\n    \"\\11\\7\\12\\0\\3\\7\\1\\54\\1\\0\\1\\54\\1\\7\\1\\151\"+\n    \"\\1\\52\\1\\152\\2\\7\\1\\153\\2\\7\\1\\154\\1\\155\\1\\156\"+\n    \"\\1\\157\\1\\160\\1\\161\\1\\162\\1\\163\\1\\164\\1\\165\\2\\7\"+\n    \"\\1\\54\\1\\166\\3\\54\\1\\7\\1\\54\\1\\167\\4\\7\\1\\170\"+\n    \"\\2\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\"+\n    \"\\11\\7\\1\\171\\2\\7\\1\\172\\24\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\1\\7\\1\\173\\2\\7\\1\\174\"+\n    \"\\34\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\"+\n    \"\\1\\175\\1\\176\\3\\7\\1\\177\\1\\7\\1\\200\\1\\201\\1\\202\"+\n    \"\\1\\102\\1\\203\\1\\7\\1\\54\\1\\110\\10\\7\\1\\204\\2\\7\"+\n    \"\\1\\205\\2\\7\\1\\206\\1\\207\\2\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\6\\7\\1\\210\\5\\7\\1\\211\"+\n    \"\\2\\7\\1\\212\\11\\7\\1\\213\\7\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\1\\7\\1\\214\\2\\7\\1\\215\"+\n    \"\\1\\7\\1\\216\\2\\7\\1\\217\\3\\7\\1\\220\\2\\7\\2\\110\"+\n    \"\\1\\221\\16\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\3\\7\\1\\222\\35\\7\\1\\0\\11\\7\\12\\0\\3\\7\"+\n    \"\\1\\54\\1\\0\\1\\54\\2\\7\\1\\52\\4\\7\\1\\223\\2\\7\"+\n    \"\\1\\224\\2\\7\\1\\102\\1\\225\\1\\7\\1\\226\\1\\227\\3\\7\"+\n    \"\\5\\54\\1\\7\\1\\54\\10\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\4\\7\\1\\230\\1\\231\\1\\7\\1\\232\"+\n    \"\\7\\7\\1\\233\\21\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\1\\7\\1\\234\\1\\235\\1\\236\\1\\237\\1\\240\"+\n    \"\\1\\7\\1\\240\\1\\241\\1\\242\\2\\7\\1\\243\\1\\244\\11\\7\"+\n    \"\\1\\245\\1\\7\\1\\246\\6\\7\\1\\244\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\13\\7\\1\\247\\25\\7\\1\\0\"+\n    \"\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\1\\7\\1\\250\"+\n    \"\\6\\7\\1\\251\\27\\7\\1\\252\\1\\0\\11\\7\\65\\0\\1\\253\"+\n    \"\\3\\0\\1\\254\\1\\255\\1\\256\\102\\0\\1\\11\\76\\0\\1\\11\"+\n    \"\\1\\47\\1\\0\\74\\47\\10\\0\\2\\257\\1\\0\\1\\257\\4\\0\"+\n    \"\\1\\257\\3\\0\\3\\257\\1\\0\\2\\257\\5\\0\\7\\257\\1\\0\"+\n    \"\\1\\257\\13\\0\\1\\257\\2\\0\\3\\257\\13\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\1\\7\\1\\152\\37\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\14\\7\\1\\146\\24\\7\\1\\0\"+\n    \"\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\7\\7\\1\\222\"+\n    \"\\31\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\"+\n    \"\\17\\7\\1\\105\\21\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\1\\7\\1\\260\\37\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\5\\7\\1\\261\\1\\262\\2\\7\"+\n    \"\\1\\263\\27\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\27\\7\\1\\264\\11\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\1\\7\\1\\265\\37\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\1\\54\\2\\7\\1\\52\\22\\7\\5\\54\"+\n    \"\\12\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\2\\7\\1\\266\"+\n    \"\\1\\52\\15\\7\\1\\267\\23\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\15\\7\\1\\270\\23\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\15\\7\\1\\271\\23\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\3\\7\\1\\54\\1\\0\\1\\54\\2\\7\"+\n    \"\\1\\52\\22\\7\\5\\54\\1\\7\\1\\54\\10\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\1\\272\\5\\7\\1\\273\"+\n    \"\\32\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\"+\n    \"\\31\\7\\1\\274\\7\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\4\\7\\1\\275\\34\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\1\\276\\40\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\7\\7\\1\\277\\31\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\4\\7\"+\n    \"\\1\\300\\1\\7\\1\\301\\2\\7\\1\\302\\2\\7\\1\\303\\24\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\1\\276\"+\n    \"\\30\\7\\1\\304\\7\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\15\\7\\1\\222\\1\\7\\1\\305\\7\\7\\1\\306\"+\n    \"\\11\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\"+\n    \"\\1\\7\\1\\307\\37\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\3\\7\\1\\305\\35\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\1\\310\\40\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\3\\7\\1\\244\\1\\7\"+\n    \"\\1\\244\\2\\7\\1\\311\\21\\7\\1\\244\\2\\7\\1\\244\\3\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\3\\7\"+\n    \"\\1\\244\\5\\7\\1\\312\\3\\7\\1\\312\\1\\7\\1\\312\\12\\7\"+\n    \"\\1\\244\\2\\7\\1\\244\\3\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\13\\7\\1\\313\\25\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\5\\7\\1\\54\\33\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\12\\7\"+\n    \"\\1\\312\\4\\7\\1\\312\\12\\7\\1\\314\\6\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\1\\315\\40\\7\\1\\0\"+\n    \"\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\11\\7\\1\\316\"+\n    \"\\27\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\"+\n    \"\\1\\317\\6\\7\\1\\244\\5\\7\\1\\244\\23\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\10\\7\\1\\320\\30\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\5\\7\"+\n    \"\\1\\54\\31\\7\\1\\321\\1\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\15\\7\\1\\322\\23\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\6\\7\\1\\321\\2\\7\"+\n    \"\\1\\316\\22\\7\\1\\323\\4\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\6\\7\\2\\244\\5\\7\\1\\244\\13\\7\"+\n    \"\\1\\244\\7\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\6\\7\\1\\324\\32\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\10\\7\\1\\325\\30\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\4\\7\\1\\326\\34\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\2\\7\\1\\327\\1\\52\"+\n    \"\\41\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\"+\n    \"\\10\\7\\1\\330\\6\\7\\1\\244\\21\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\6\\7\\1\\331\\2\\7\\1\\332\"+\n    \"\\1\\7\\1\\333\\1\\334\\22\\7\\1\\335\\1\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\3\\7\\1\\336\\2\\7\"+\n    \"\\1\\337\\22\\7\\1\\340\\7\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\7\\7\\1\\341\\1\\342\\1\\343\\2\\7\"+\n    \"\\1\\344\\1\\345\\1\\7\\1\\346\\3\\7\\1\\347\\5\\7\\1\\350\"+\n    \"\\7\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\"+\n    \"\\14\\7\\1\\351\\1\\352\\23\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\3\\7\\1\\353\\3\\7\\1\\354\\3\\7\"+\n    \"\\1\\355\\3\\7\\1\\356\\7\\7\\1\\357\\2\\7\\1\\360\\6\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\14\\7\"+\n    \"\\1\\361\\6\\7\\1\\362\\15\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\1\\7\\1\\363\\37\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\4\\7\\1\\364\\2\\7\"+\n    \"\\1\\365\\3\\7\\1\\366\\2\\7\\1\\367\\22\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\1\\274\\5\\7\\1\\244\"+\n    \"\\2\\7\\1\\244\\4\\7\\1\\244\\22\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\31\\7\\1\\370\\7\\7\\1\\0\"+\n    \"\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\35\\7\\1\\244\"+\n    \"\\3\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\"+\n    \"\\3\\7\\1\\371\\35\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\13\\7\\1\\372\\25\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\3\\7\\1\\54\\1\\0\\1\\54\\2\\7\\1\\52\\11\\7\\1\\373\"+\n    \"\\6\\7\\2\\54\\1\\65\\4\\54\\1\\7\\1\\54\\10\\7\\1\\0\"+\n    \"\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\4\\7\\1\\374\"+\n    \"\\3\\7\\1\\375\\1\\244\\27\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\6\\7\\1\\244\\32\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\4\\7\\1\\244\\34\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\1\\376\"+\n    \"\\40\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\"+\n    \"\\1\\377\\6\\7\\1\\u0100\\1\\7\\1\\u0101\\3\\7\\1\\u0102\\1\\7\"+\n    \"\\1\\u0103\\21\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\15\\7\\1\\222\\23\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\6\\7\\1\\u0104\\32\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\1\\7\\1\\u0105\\14\\7\"+\n    \"\\1\\u0106\\22\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\5\\7\\1\\274\\1\\u0107\\32\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\1\\u0108\\6\\7\\1\\u0109\\7\\7\"+\n    \"\\1\\u010a\\21\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\3\\7\\1\\u010b\\1\\u010c\\22\\7\\1\\274\\1\\7\\1\\u010d\"+\n    \"\\7\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\"+\n    \"\\17\\7\\1\\u010e\\21\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\11\\7\\1\\u010f\\2\\7\\1\\u0110\\24\\7\\1\\0\"+\n    \"\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\4\\7\\1\\u0111\"+\n    \"\\34\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\"+\n    \"\\1\\u0112\\6\\7\\1\\u0113\\1\\7\\1\\u0114\\1\\7\\1\\u0115\\2\\7\"+\n    \"\\1\\u0116\\16\\7\\1\\u0117\\3\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\14\\7\\1\\u0118\\24\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\14\\7\\1\\u0119\\1\\u011a\"+\n    \"\\23\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\2\\7\\1\\u011b\"+\n    \"\\1\\52\\41\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\4\\7\\1\\u011c\\6\\7\\1\\u011d\\25\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\3\\7\\1\\u011e\\35\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\4\\7\"+\n    \"\\1\\140\\34\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\10\\7\\1\\u011f\\30\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\1\\7\\1\\u0120\\1\\316\\36\\7\\1\\0\"+\n    \"\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\1\\316\\7\\7\"+\n    \"\\1\\u0121\\1\\7\\1\\u0122\\2\\7\\1\\u0123\\23\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\4\\7\\1\\301\\1\\7\"+\n    \"\\1\\244\\2\\7\\1\\244\\4\\7\\1\\244\\12\\7\\1\\304\\7\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\1\\u0124\"+\n    \"\\40\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\"+\n    \"\\5\\7\\1\\316\\33\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\3\\7\\1\\316\\13\\7\\1\\316\\7\\7\\1\\306\"+\n    \"\\11\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\"+\n    \"\\7\\7\\1\\301\\31\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\5\\7\\1\\321\\33\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\3\\7\\1\\316\\7\\7\\1\\u0125\"+\n    \"\\3\\7\\1\\316\\21\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\7\\7\\1\\u0126\\31\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\17\\7\\1\\u0127\\21\\7\\1\\0\"+\n    \"\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\15\\7\\1\\u0128\"+\n    \"\\23\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\"+\n    \"\\1\\276\\15\\7\\1\\u0129\\22\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\1\\u012a\\2\\7\\1\\244\\1\\7\\1\\244\"+\n    \"\\3\\7\\1\\316\\3\\7\\1\\u012b\\14\\7\\1\\244\\4\\7\\1\\u012c\"+\n    \"\\1\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\"+\n    \"\\1\\7\\1\\u012d\\37\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\13\\7\\1\\u012e\\25\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\1\\u012f\\7\\7\\1\\u0130\\30\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\3\\7\"+\n    \"\\1\\316\\2\\7\\1\\u0131\\4\\7\\1\\u0132\\3\\7\\1\\316\\21\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\1\\u0133\"+\n    \"\\7\\7\\1\\u0134\\20\\7\\1\\u0135\\7\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\3\\7\\1\\316\\4\\7\\1\\u0136\"+\n    \"\\6\\7\\1\\316\\21\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\31\\7\\1\\244\\3\\7\\1\\u0137\\3\\7\\1\\0\"+\n    \"\\11\\7\\12\\0\\4\\7\\1\\0\\1\\110\\2\\7\\1\\52\\22\\7\"+\n    \"\\5\\110\\12\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\1\\244\\40\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\6\\7\\1\\315\\30\\7\\1\\u0138\\1\\7\\1\\0\"+\n    \"\\11\\7\\12\\0\\4\\7\\1\\0\\2\\7\\1\\u0139\\1\\52\\15\\7\"+\n    \"\\1\\u013a\\23\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\3\\7\\1\\321\\35\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\32\\7\\1\\54\\6\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\14\\7\\1\\u0139\\24\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\17\\7\"+\n    \"\\1\\146\\21\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\16\\7\\1\\u013b\\22\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\16\\7\\1\\222\\22\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\7\\7\\1\\u013c\\21\\7\"+\n    \"\\1\\u0135\\7\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\2\\244\\37\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\2\\244\\2\\7\\1\\244\\10\\7\\1\\244\\23\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\11\\7\"+\n    \"\\1\\244\\3\\7\\1\\244\\23\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\1\\7\\1\\244\\37\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\1\\7\\1\\244\\1\\7\"+\n    \"\\2\\244\\4\\7\\1\\244\\3\\7\\1\\244\\23\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\2\\7\\1\\u013d\\1\\52\\11\\7\\1\\244\"+\n    \"\\3\\7\\1\\244\\23\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\1\\7\\1\\244\\2\\240\\1\\244\\1\\240\\1\\7\"+\n    \"\\1\\240\\2\\244\\3\\7\\1\\244\\22\\7\\1\\244\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\15\\7\\2\\244\\22\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\10\\7\"+\n    \"\\1\\273\\5\\7\\1\\244\\22\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\7\\7\\1\\146\\31\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\17\\7\\1\\u013e\\21\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\2\\7\\1\\124\\1\\52\"+\n    \"\\1\\55\\4\\7\\1\\u013f\\1\\7\\1\\56\\1\\7\\1\\u0140\\17\\7\"+\n    \"\\1\\u0141\\7\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\1\\7\\1\\u0142\\37\\7\\1\\0\\11\\7\\66\\0\\1\\u0143\"+\n    \"\\5\\0\\1\\u0144\\67\\0\\1\\u0144\\102\\0\\1\\u0145\\70\\0\\1\\u0146\"+\n    \"\\1\\0\\1\\u0147\\17\\0\\4\\7\\1\\0\\3\\7\\1\\52\\2\\7\"+\n    \"\\1\\u0148\\36\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\4\\7\\1\\u0117\\34\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\6\\7\\1\\316\\32\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\35\\7\\1\\u0149\\3\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\2\\7\"+\n    \"\\1\\316\\36\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\3\\7\\1\\u014a\\35\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\1\\u014b\\40\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\1\\316\\40\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\5\\7\\1\\u014c\\33\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\33\\7\"+\n    \"\\1\\54\\5\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\1\\7\\1\\326\\37\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\15\\7\\1\\244\\23\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\5\\7\\1\\u014d\\33\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\17\\7\"+\n    \"\\1\\54\\21\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\3\\7\\1\\244\\26\\7\\1\\244\\2\\7\\1\\244\\1\\7\"+\n    \"\\1\\u014e\\1\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\10\\7\\1\\u014f\\30\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\15\\7\\1\\316\\23\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\33\\7\\1\\244\\5\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\2\\7\"+\n    \"\\1\\244\\36\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\2\\7\"+\n    \"\\1\\u0150\\1\\52\\41\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\3\\7\\1\\244\\26\\7\\1\\244\\6\\7\\1\\0\"+\n    \"\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\12\\7\\1\\244\"+\n    \"\\26\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\"+\n    \"\\14\\7\\1\\u0151\\24\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\3\\7\\1\\244\\1\\7\\1\\244\\7\\7\\1\\u012b\"+\n    \"\\14\\7\\1\\244\\6\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\6\\7\\1\\244\\6\\7\\1\\244\\23\\7\\1\\0\"+\n    \"\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\3\\7\\1\\244\"+\n    \"\\26\\7\\1\\244\\2\\7\\1\\244\\3\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\14\\7\\1\\u0152\\24\\7\\1\\0\"+\n    \"\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\7\\7\\1\\u0153\"+\n    \"\\31\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\"+\n    \"\\3\\7\\1\\244\\1\\7\\1\\244\\24\\7\\1\\244\\2\\7\\1\\244\"+\n    \"\\3\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\"+\n    \"\\7\\7\\1\\u014b\\31\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\4\\7\\1\\u0154\\34\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\3\\7\\1\\244\\1\\7\\1\\244\"+\n    \"\\2\\7\\1\\311\\4\\7\\1\\311\\14\\7\\1\\244\\2\\7\\1\\244\"+\n    \"\\3\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\"+\n    \"\\1\\7\\1\\u0155\\4\\7\\1\\u0156\\7\\7\\1\\u0134\\14\\7\\1\\u0157\"+\n    \"\\5\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\"+\n    \"\\15\\7\\1\\u0111\\23\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\3\\7\\1\\244\\1\\7\\1\\244\\2\\7\\1\\311\"+\n    \"\\3\\7\\1\\u0158\\15\\7\\1\\244\\2\\7\\1\\244\\3\\7\\1\\0\"+\n    \"\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\3\\7\\1\\244\"+\n    \"\\35\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\"+\n    \"\\17\\7\\1\\244\\21\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\1\\u0159\\40\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\3\\7\\1\\244\\3\\7\\1\\305\\2\\7\"+\n    \"\\1\\312\\17\\7\\1\\244\\2\\7\\1\\244\\3\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\6\\7\\1\\u015a\\32\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\33\\7\"+\n    \"\\1\\u015b\\5\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\15\\7\\1\\315\\23\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\6\\7\\1\\u015c\\32\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\2\\7\\1\\u015d\\36\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\31\\7\"+\n    \"\\1\\u015e\\7\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\7\\7\\1\\u015f\\31\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\10\\7\\1\\u0160\\30\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\6\\7\\1\\146\\2\\7\"+\n    \"\\1\\u0161\\27\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\14\\7\\1\\344\\24\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\31\\7\\1\\u0162\\7\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\7\\7\\1\\u0163\\31\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\13\\7\"+\n    \"\\1\\u0164\\25\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\11\\7\\1\\u0165\\3\\7\\1\\u0166\\23\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\16\\7\\1\\u0167\\22\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\7\\7\"+\n    \"\\1\\u0168\\3\\7\\1\\325\\2\\7\\1\\u0169\\22\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\10\\7\\1\\u016a\\30\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\27\\7\"+\n    \"\\1\\330\\11\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\3\\7\\1\\u016b\\35\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\6\\7\\1\\u016c\\32\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\5\\7\\1\\u015a\\33\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\3\\7\"+\n    \"\\1\\u016b\\3\\7\\1\\305\\31\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\13\\7\\1\\u016d\\25\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\7\\7\\1\\123\\31\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\15\\7\"+\n    \"\\1\\u016e\\23\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\12\\7\\1\\u0167\\26\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\12\\7\\1\\u016f\\26\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\37\\7\\1\\u0170\\1\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\2\\7\\1\\u0171\\1\\52\"+\n    \"\\6\\7\\1\\u0172\\32\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\3\\7\\1\\u0173\\35\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\14\\7\\1\\u0171\\24\\7\\1\\0\"+\n    \"\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\16\\7\\1\\u0174\"+\n    \"\\22\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\"+\n    \"\\3\\7\\1\\273\\35\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\16\\7\\1\\146\\22\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\24\\7\\1\\u0175\\14\\7\\1\\0\"+\n    \"\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\37\\7\\1\\u0176\"+\n    \"\\1\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\2\\7\\1\\u0177\"+\n    \"\\1\\52\\3\\7\\1\\244\\1\\7\\1\\244\\2\\7\\1\\311\\4\\7\"+\n    \"\\1\\u0178\\14\\7\\1\\244\\2\\7\\1\\244\\3\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\1\\u0179\\7\\7\\1\\u017a\"+\n    \"\\4\\7\\1\\u017b\\23\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\17\\7\\1\\u017c\\21\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\31\\7\\1\\244\\7\\7\\1\\0\"+\n    \"\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\27\\7\\1\\146\"+\n    \"\\11\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\"+\n    \"\\7\\7\\1\\u017d\\31\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\15\\7\\1\\u017e\\23\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\1\\7\\1\\u017f\\1\\7\\1\\u0180\"+\n    \"\\4\\7\\1\\u0181\\1\\u0182\\10\\7\\1\\244\\15\\7\\1\\244\\1\\0\"+\n    \"\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\11\\7\\1\\u0183\"+\n    \"\\27\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\"+\n    \"\\37\\7\\1\\u0184\\1\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\6\\7\\1\\u0185\\32\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\7\\7\\1\\u0169\\31\\7\\1\\0\"+\n    \"\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\1\\u0108\\40\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\1\\7\"+\n    \"\\1\\u0186\\37\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\1\\7\\1\\u0168\\37\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\15\\7\\1\\244\\13\\7\\1\\u0187\\7\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\4\\7\"+\n    \"\\1\\u0188\\34\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\1\\7\\1\\315\\37\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\4\\7\\1\\u0189\\34\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\11\\7\\1\\u018a\\27\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\10\\7\"+\n    \"\\1\\244\\30\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\1\\7\\1\\u017f\\7\\7\\1\\u0182\\3\\7\\1\\u0182\\23\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\37\\7\"+\n    \"\\1\\315\\1\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\7\\7\\1\\u018b\\31\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\5\\7\\1\\u0184\\33\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\14\\7\\1\\u018c\\24\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\17\\7\"+\n    \"\\1\\222\\21\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\11\\7\\1\\u0183\\4\\7\\1\\222\\22\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\6\\7\\1\\u018d\\32\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\1\\124\"+\n    \"\\40\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\"+\n    \"\\31\\7\\1\\u018e\\7\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\37\\7\\1\\u018f\\1\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\3\\7\\1\\u0185\\35\\7\\1\\0\"+\n    \"\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\23\\7\\1\\u0190\"+\n    \"\\15\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\"+\n    \"\\11\\7\\1\\u0191\\27\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\6\\7\\1\\u0192\\32\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\1\\u0193\\16\\7\\1\\u0194\\21\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\17\\7\"+\n    \"\\1\\u0195\\21\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\10\\7\\1\\u0196\\30\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\1\\7\\1\\141\\1\\u0197\\1\\u0198\\1\\u0199\"+\n    \"\\3\\7\\1\\u019a\\1\\u0199\\2\\7\\1\\315\\12\\7\\1\\u0181\\1\\7\"+\n    \"\\1\\u0181\\7\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\12\\7\\1\\u0158\\26\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\10\\7\\1\\u019b\\30\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\1\\u0139\\40\\7\\1\\0\"+\n    \"\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\11\\7\\1\\u019c\"+\n    \"\\5\\7\\1\\u019d\\21\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\37\\7\\1\\316\\1\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\3\\7\\1\\244\\1\\7\\1\\244\"+\n    \"\\24\\7\\1\\244\\6\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\3\\7\\1\\u019e\\2\\7\\1\\244\\32\\7\\1\\0\"+\n    \"\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\1\\312\\40\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\3\\7\"+\n    \"\\1\\u019f\\35\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\12\\7\\1\\312\\26\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\14\\7\\1\\244\\24\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\7\\7\\1\\u01a0\\31\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\14\\7\"+\n    \"\\1\\u01a1\\24\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\15\\7\\1\\u0161\\23\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\31\\7\\1\\u0161\\7\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\15\\7\\1\\326\\23\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\10\\7\"+\n    \"\\1\\274\\4\\7\\1\\274\\23\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\17\\7\\1\\u01a2\\21\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\3\\7\\1\\u01a3\\1\\u01a4\"+\n    \"\\1\\u01a5\\1\\u01a6\\1\\u0158\\3\\7\\1\\u0158\\1\\u01a7\\1\\u0178\\11\\7\"+\n    \"\\1\\u01a8\\1\\7\\1\\u01a9\\1\\u01aa\\2\\7\\1\\u01ab\\3\\7\\1\\0\"+\n    \"\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\10\\7\\1\\311\"+\n    \"\\4\\7\\1\\311\\23\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\33\\7\\1\\u01ac\\5\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\14\\7\\1\\u01ad\\24\\7\\1\\0\"+\n    \"\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\10\\7\\1\\u01ae\"+\n    \"\\30\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\"+\n    \"\\40\\7\\1\\312\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\17\\7\\1\\244\\12\\7\\1\\244\\6\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\17\\7\\1\\u01af\\21\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\31\\7\"+\n    \"\\1\\u01b0\\7\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\4\\7\\1\\364\\34\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\17\\7\\1\\u01b1\\21\\7\\1\\0\\11\\7\"+\n    \"\\67\\0\\1\\u01b2\\100\\0\\1\\u01b3\\77\\0\\1\\u01b4\\73\\0\\1\\u01b5\"+\n    \"\\100\\0\\1\\u01b6\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\16\\7\"+\n    \"\\1\\u0169\\22\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\13\\7\\1\\u01b7\\25\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\1\\7\\1\\u01b8\\37\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\15\\7\\1\\u01b9\\23\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\3\\7\"+\n    \"\\1\\u014b\\35\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\1\\7\\1\\312\\37\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\1\\7\\1\\141\\12\\7\\1\\315\\24\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\11\\7\"+\n    \"\\1\\u0135\\27\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\11\\7\\1\\315\\27\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\6\\7\\1\\305\\32\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\10\\7\\1\\u01ba\\30\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\33\\7\"+\n    \"\\1\\u01bb\\5\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\14\\7\\1\\u01bc\\24\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\1\\7\\1\\u01bc\\37\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\1\\7\\1\\u01bd\\37\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\10\\7\"+\n    \"\\1\\311\\30\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\17\\7\\1\\u0182\\21\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\3\\7\\1\\244\\1\\7\\1\\244\\5\\7\"+\n    \"\\1\\u01be\\1\\7\\1\\u015d\\14\\7\\1\\244\\2\\7\\1\\244\\3\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\13\\7\"+\n    \"\\1\\u01bf\\1\\7\\1\\u01c0\\23\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\3\\7\\1\\244\\1\\7\\1\\244\\5\\7\"+\n    \"\\1\\u01be\\1\\244\\1\\u015d\\14\\7\\1\\244\\6\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\5\\7\\1\\244\\24\\7\"+\n    \"\\1\\244\\6\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\13\\7\\1\\u01c1\\25\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\1\\317\\40\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\1\\7\\1\\u01c2\\1\\u01c3\\36\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\11\\7\"+\n    \"\\1\\244\\27\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\10\\7\\1\\u01c4\\30\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\11\\7\\1\\u0161\\27\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\5\\7\\1\\u01c5\\33\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\10\\7\"+\n    \"\\1\\u01c6\\30\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\35\\7\\1\\u01c7\\3\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\3\\7\\1\\244\\2\\7\\1\\244\\23\\7\"+\n    \"\\1\\244\\6\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\2\\7\"+\n    \"\\1\\244\\1\\52\\41\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\11\\7\\1\\u01c8\\27\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\3\\7\\2\\244\\1\\7\\1\\141\"+\n    \"\\23\\7\\1\\244\\2\\7\\1\\244\\3\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\5\\7\\1\\u0182\\33\\7\\1\\0\"+\n    \"\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\12\\7\\1\\u01c9\"+\n    \"\\26\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\"+\n    \"\\17\\7\\1\\u01ca\\21\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\1\\7\\1\\u01cb\\37\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\31\\7\\1\\u01cc\\7\\7\\1\\0\"+\n    \"\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\13\\7\\1\\u01cd\"+\n    \"\\1\\7\\1\\u0182\\23\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\6\\7\\1\\u01ce\\32\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\3\\7\\1\\u0182\\7\\7\\1\\u01cf\"+\n    \"\\13\\7\\1\\u01d0\\11\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\15\\7\\1\\311\\23\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\23\\7\\1\\u01d1\\15\\7\\1\\0\"+\n    \"\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\3\\7\\1\\u0124\"+\n    \"\\26\\7\\1\\u0124\\2\\7\\1\\u0124\\3\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\11\\7\\1\\u01d2\\27\\7\\1\\0\"+\n    \"\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\3\\7\\1\\244\"+\n    \"\\1\\7\\2\\244\\6\\7\\1\\244\\14\\7\\1\\244\\2\\7\\1\\244\"+\n    \"\\3\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\"+\n    \"\\10\\7\\1\\u01d3\\4\\7\\1\\u01d4\\23\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\3\\7\\1\\u01d5\\2\\7\\1\\u01d6\"+\n    \"\\6\\7\\1\\u01d7\\23\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\3\\7\\1\\u01d8\\2\\7\\1\\u01d9\\6\\7\\1\\u01da\"+\n    \"\\17\\7\\1\\u01d8\\3\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\7\\7\\1\\u01db\\31\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\37\\7\\1\\u01dc\\1\\7\\1\\0\"+\n    \"\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\1\\u01dd\\40\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\14\\7\"+\n    \"\\1\\u01de\\24\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\2\\7\\1\\u01df\\11\\7\\1\\u01df\\6\\7\\1\\u0197\\15\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\16\\7\"+\n    \"\\1\\244\\22\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\32\\7\\1\\244\\6\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\15\\7\\1\\u01e0\\23\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\3\\7\\1\\244\\2\\7\"+\n    \"\\1\\u01e1\\3\\7\\1\\244\\4\\7\\1\\u0185\\12\\7\\1\\244\\6\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\3\\7\"+\n    \"\\1\\244\\2\\7\\1\\u01e1\\3\\7\\1\\244\\17\\7\\1\\244\\6\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\31\\7\"+\n    \"\\1\\u01e2\\7\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\3\\7\\1\\u01e1\\1\\7\\1\\u01e1\\1\\u01e3\\3\\7\\1\\u01e1\"+\n    \"\\3\\7\\1\\u01e1\\13\\7\\1\\u01e1\\6\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\37\\7\\1\\u01e4\\1\\7\\1\\0\"+\n    \"\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\31\\7\\1\\u01e5\"+\n    \"\\7\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\"+\n    \"\\6\\7\\1\\337\\32\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\3\\7\\1\\315\\35\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\11\\7\\1\\u01e6\\27\\7\\1\\0\"+\n    \"\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\16\\7\\1\\u01e7\"+\n    \"\\22\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\"+\n    \"\\22\\7\\1\\244\\16\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\2\\7\\1\\u01e1\\1\\52\\3\\7\\1\\u01e1\\1\\7\\2\\u01e1\\3\\7\"+\n    \"\\1\\u01e1\\17\\7\\1\\u01e1\\4\\7\\1\\u01e1\\1\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\2\\7\\1\\u01e8\\1\\52\\41\\7\\1\\0\"+\n    \"\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\33\\7\\1\\u01e9\"+\n    \"\\5\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\"+\n    \"\\11\\7\\1\\u01ea\\27\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\17\\7\\1\\u01bb\\21\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\4\\7\\1\\u01eb\\34\\7\\1\\0\"+\n    \"\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\7\\7\\1\\u01ec\"+\n    \"\\31\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\"+\n    \"\\3\\7\\1\\u01ed\\35\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\2\\244\\13\\7\\1\\244\\23\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\3\\7\\1\\244\\5\\7\"+\n    \"\\1\\244\\3\\7\\1\\244\\23\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\2\\7\\1\\274\\36\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\7\\7\\1\\u01ee\\31\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\1\\7\"+\n    \"\\1\\222\\37\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\10\\7\\1\\303\\30\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\3\\7\\1\\244\\1\\7\\1\\244\\16\\7\"+\n    \"\\1\\141\\5\\7\\1\\244\\2\\7\\1\\244\\3\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\1\\u01ef\\40\\7\\1\\0\"+\n    \"\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\6\\7\\1\\u0139\"+\n    \"\\32\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\"+\n    \"\\1\\u0136\\40\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\10\\7\\1\\311\\16\\7\\1\\u01f0\\5\\7\\1\\u01f1\\3\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\7\\7\"+\n    \"\\1\\244\\3\\7\\1\\244\\25\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\3\\7\\1\\u01f1\\26\\7\\1\\u01f1\\2\\7\"+\n    \"\\1\\u01f1\\3\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\35\\7\\1\\u01f2\\3\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\1\\u01f3\\40\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\3\\7\\1\\u01f0\\2\\7\\1\\u01f4\"+\n    \"\\1\\7\\1\\311\\30\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\15\\7\\1\\u01f5\\23\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\3\\7\\1\\u01f1\\31\\7\\1\\u01f1\"+\n    \"\\3\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\"+\n    \"\\3\\7\\1\\244\\1\\u01f6\\34\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\31\\7\\1\\u01f7\\7\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\37\\7\\1\\146\\1\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\10\\7\"+\n    \"\\1\\u01f8\\30\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\4\\7\\1\\u01f9\\34\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\10\\7\\1\\u01fa\\30\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\4\\7\\1\\u01fb\\34\\7\"+\n    \"\\1\\0\\11\\7\\70\\0\\1\\u01fc\\100\\0\\1\\u01fd\\67\\0\\1\\u01fe\"+\n    \"\\75\\0\\1\\u01fd\\103\\0\\1\\u01ff\\14\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\16\\7\\1\\u0200\\22\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\7\\7\\1\\333\\31\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\15\\7\\1\\u01bb\\23\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\3\\7\"+\n    \"\\1\\244\\31\\7\\1\\244\\3\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\11\\7\\1\\u0201\\27\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\36\\7\\1\\u0202\\2\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\15\\7\"+\n    \"\\1\\u015d\\23\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\15\\7\\1\\u0203\\23\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\15\\7\\1\\u0204\\23\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\3\\7\\1\\u0205\\35\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\35\\7\"+\n    \"\\1\\u012b\\3\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\1\\u012b\\40\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\1\\7\\1\\141\\1\\u0197\\36\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\16\\7\\1\\u0206\\22\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\16\\7\"+\n    \"\\1\\u0207\\1\\222\\21\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\33\\7\\1\\u0208\\5\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\3\\7\\1\\u0209\\1\\7\\2\\244\"+\n    \"\\20\\7\\1\\u0182\\2\\7\\1\\244\\6\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\6\\7\\1\\244\\23\\7\\1\\244\"+\n    \"\\2\\7\\1\\244\\3\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\1\\u020a\\40\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\15\\7\\1\\u020b\\23\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\5\\7\\1\\244\\33\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\32\\7\"+\n    \"\\1\\325\\6\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\3\\7\\1\\141\\35\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\13\\7\\1\\u0182\\3\\7\\1\\u0182\\12\\7\"+\n    \"\\1\\244\\6\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\5\\7\\1\\244\\27\\7\\1\\244\\3\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\27\\7\\1\\u020c\\11\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\6\\7\"+\n    \"\\1\\u020d\\6\\7\\1\\u020d\\23\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\6\\7\\1\\u020e\\6\\7\\1\\u020e\\23\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\23\\7\"+\n    \"\\1\\u0158\\15\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\23\\7\\1\\u020f\\15\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\23\\7\\1\\u0210\\15\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\23\\7\\1\\u0174\\15\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\23\\7\"+\n    \"\\1\\u0211\\15\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\23\\7\\1\\u0212\\15\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\11\\7\\1\\222\\27\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\1\\7\\1\\u0213\\37\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\4\\7\"+\n    \"\\1\\u0214\\34\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\37\\7\\1\\244\\1\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\23\\7\\1\\244\\15\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\1\\u0111\\40\\7\\1\\0\"+\n    \"\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\10\\7\\1\\u01e1\"+\n    \"\\30\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\"+\n    \"\\1\\7\\1\\141\\1\\7\\1\\274\\5\\7\\1\\u0199\\1\\7\\1\\u0169\"+\n    \"\\1\\u0215\\12\\7\\1\\u0181\\11\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\10\\7\\1\\u01e1\\5\\7\\1\\u01e1\\22\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\4\\7\"+\n    \"\\1\\274\\34\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\14\\7\\1\\222\\24\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\10\\7\\1\\u018e\\30\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\3\\7\\1\\u0158\\23\\7\"+\n    \"\\1\\u0158\\11\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\1\\u0216\\40\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\12\\7\\1\\u01bb\\26\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\31\\7\\1\\u0217\\7\\7\\1\\0\"+\n    \"\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\16\\7\\1\\u0218\"+\n    \"\\22\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\"+\n    \"\\3\\7\\1\\325\\35\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\7\\7\\1\\u01bb\\31\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\10\\7\\1\\274\\30\\7\\1\\0\"+\n    \"\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\15\\7\\1\\u0168\"+\n    \"\\22\\7\\1\\u0168\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\23\\7\\1\\141\\15\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\4\\7\\1\\244\\1\\7\\1\\141\\1\\7\"+\n    \"\\1\\311\\5\\7\\1\\u01ba\\10\\7\\1\\146\\5\\7\\1\\244\\3\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\33\\7\"+\n    \"\\1\\u0158\\5\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\40\\7\\1\\u0168\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\4\\7\\1\\u0219\\34\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\1\\7\\1\\u0193\\37\\7\\1\\0\"+\n    \"\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\7\\7\\1\\u021a\"+\n    \"\\31\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\"+\n    \"\\1\\7\\1\\u021b\\37\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\13\\7\\1\\u021c\\25\\7\\1\\0\\11\\7\\71\\0\"+\n    \"\\1\\u021d\\100\\0\\1\\u01ff\\67\\0\\1\\u01b6\\21\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\17\\7\\1\\315\\21\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\3\\7\\1\\u021e\\35\\7\\1\\0\"+\n    \"\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\2\\7\\1\\u021f\"+\n    \"\\36\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\"+\n    \"\\32\\7\\1\\u01cd\\6\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\3\\7\\1\\u0182\\26\\7\\1\\u01cd\\6\\7\\1\\0\"+\n    \"\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\35\\7\\1\\u0220\"+\n    \"\\3\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\"+\n    \"\\1\\u018e\\22\\7\\1\\222\\15\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\1\\u018e\\40\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\3\\7\\1\\u0221\\23\\7\\1\\u0221\"+\n    \"\\11\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\"+\n    \"\\11\\7\\1\\u0222\\27\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\33\\7\\1\\u01cd\\5\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\2\\7\\1\\u0223\\36\\7\\1\\0\"+\n    \"\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\23\\7\\1\\123\"+\n    \"\\15\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\"+\n    \"\\23\\7\\1\\u0224\\15\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\10\\7\\1\\u0225\\30\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\10\\7\\1\\u0226\\30\\7\\1\\0\"+\n    \"\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\15\\7\\1\\u0227\"+\n    \"\\23\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\"+\n    \"\\15\\7\\1\\u0228\\23\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\30\\7\\1\\u0229\\10\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\17\\7\\1\\u0213\\21\\7\\1\\0\"+\n    \"\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\1\\7\\1\\244\"+\n    \"\\11\\7\\1\\244\\25\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\2\\7\\1\\u0218\\1\\52\\41\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\1\\7\\1\\u01bb\\37\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\1\\u01bb\\40\\7\\1\\0\"+\n    \"\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\37\\7\\1\\u022a\"+\n    \"\\1\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\"+\n    \"\\6\\7\\1\\u022b\\32\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\35\\7\\1\\u01cd\\3\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\10\\7\\1\\u022c\\30\\7\\1\\0\"+\n    \"\\11\\7\\72\\0\\1\\u01b6\\15\\0\\4\\7\\1\\0\\3\\7\\1\\52\"+\n    \"\\7\\7\\1\\152\\31\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\1\\7\\1\\u022d\\37\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\6\\7\\1\\141\\32\\7\\1\\0\"+\n    \"\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\3\\7\\1\\141\"+\n    \"\\1\\7\\1\\u0182\\24\\7\\1\\325\\2\\7\\1\\u0220\\3\\7\\1\\0\"+\n    \"\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\27\\7\\1\\u022e\"+\n    \"\\11\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\"+\n    \"\\3\\7\\1\\244\\1\\7\\1\\244\\12\\7\\1\\u01cd\\11\\7\\1\\244\"+\n    \"\\2\\7\\1\\244\\3\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\15\\7\\1\\u01ba\\23\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\3\\7\\1\\244\\11\\7\\1\\244\"+\n    \"\\23\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\"+\n    \"\\3\\7\\1\\244\\2\\7\\1\\244\\32\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\3\\7\\1\\244\\11\\7\\1\\244\"+\n    \"\\17\\7\\1\\244\\3\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\3\\7\\1\\244\\2\\7\\1\\244\\26\\7\\1\\244\"+\n    \"\\3\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\"+\n    \"\\25\\7\\1\\244\\13\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\4\\7\\1\\u022f\\1\\7\\1\\u0230\\26\\7\\1\\244\"+\n    \"\\3\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\"+\n    \"\\11\\7\\1\\u0231\\27\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\"+\n    \"\\3\\7\\1\\52\\10\\7\\1\\272\\30\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\14\\7\\1\\u0232\\24\\7\\1\\0\"+\n    \"\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\1\\u0233\\13\\7\"+\n    \"\\1\\u0234\\24\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\13\\7\\1\\244\\25\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\35\\7\\1\\u022f\\3\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\7\\7\\1\\u0235\\31\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\7\\7\"+\n    \"\\1\\u0236\\31\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\1\\244\"+\n    \"\\2\\7\\1\\52\\22\\7\\2\\244\\15\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\1\\u0237\\40\\7\\1\\0\\11\\7\"+\n    \"\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\15\\7\\1\\u0238\\23\\7\"+\n    \"\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\15\\7\"+\n    \"\\1\\u0239\\23\\7\\1\\0\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\"+\n    \"\\1\\52\\7\\7\\1\\244\\31\\7\\1\\0\\11\\7\\12\\0\\4\\7\"+\n    \"\\1\\0\\3\\7\\1\\52\\1\\u01cd\\40\\7\\1\\0\\11\\7\\12\\0\"+\n    \"\\4\\7\\1\\0\\3\\7\\1\\52\\15\\7\\1\\u023a\\23\\7\\1\\0\"+\n    \"\\11\\7\\12\\0\\4\\7\\1\\0\\3\\7\\1\\52\\16\\7\\1\\152\"+\n    \"\\22\\7\\1\\0\\11\\7\\4\\0\";\n\n  private static int [] zzUnpackTrans() {\n    int [] result = new int[33728];\n    int offset = 0;\n    offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);\n    return result;\n  }\n\n  private static int zzUnpackTrans(String packed, int offset, int [] result) {\n    int i = 0;       /* index in packed string  */\n    int j = offset;  /* index in unpacked array */\n    int l = packed.length();\n    while (i < l) {\n      int count = packed.charAt(i++);\n      int value = packed.charAt(i++);\n      value--;\n      do result[j++] = value; while (--count > 0);\n    }\n    return j;\n  }\n\n\n  /* error codes */\n  private static final int ZZ_UNKNOWN_ERROR = 0;\n  private static final int ZZ_NO_MATCH = 1;\n  private static final int ZZ_PUSHBACK_2BIG = 2;\n  private static final char[] EMPTY_BUFFER = new char[0];\n  private static final int YYEOF = -1;\n  private static Reader zzReader; // Fake\n\n  /* error messages for the codes above */\n  private static final String ZZ_ERROR_MSG[] = {\n    \"Unkown internal scanner error\",\n    \"Error: could not match input\",\n    \"Error: pushback value was too large\"\n  };\n\n  /**\n   * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>\n   */\n  private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();\n\n  private static final String ZZ_ATTRIBUTE_PACKED_0 =\n    \"\\1\\0\\1\\11\\1\\1\\1\\11\\4\\1\\1\\11\\31\\1\\2\\11\"+\n    \"\\3\\1\\1\\0\\2\\11\\1\\0\\177\\1\\4\\0\\224\\1\\5\\0\"+\n    \"\\152\\1\\5\\0\\105\\1\\3\\0\\1\\11\\35\\1\\1\\0\\35\\1\";\n\n  private static int [] zzUnpackAttribute() {\n    int [] result = new int[570];\n    int offset = 0;\n    offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);\n    return result;\n  }\n\n  private static int zzUnpackAttribute(String packed, int offset, int [] result) {\n    int i = 0;       /* index in packed string  */\n    int j = offset;  /* index in unpacked array */\n    int l = packed.length();\n    while (i < l) {\n      int count = packed.charAt(i++);\n      int value = packed.charAt(i++);\n      do result[j++] = value; while (--count > 0);\n    }\n    return j;\n  }\n\n  /** the current state of the DFA */\n  private int zzState;\n\n  /** the current lexical state */\n  private int zzLexicalState = YYINITIAL;\n\n  /** this buffer contains the current text to be matched and is\n      the source of the yytext() string */\n  private CharSequence zzBuffer = \"\";\n\n  /** this buffer may contains the current text array to be matched when it is cheap to acquire it */\n  private char[] zzBufferArray;\n\n  /** the textposition at the last accepting state */\n  private int zzMarkedPos;\n\n  /** the textposition at the last state to be included in yytext */\n  private int zzPushbackPos;\n\n  /** the current text position in the buffer */\n  private int zzCurrentPos;\n\n  /** startRead marks the beginning of the yytext() string in the buffer */\n  private int zzStartRead;\n\n  /** endRead marks the last character in the buffer, that has been read\n      from input */\n  private int zzEndRead;\n\n  /**\n   * zzAtBOL == true <=> the scanner is currently at the beginning of a line\n   */\n  private boolean zzAtBOL = true;\n\n  /** zzAtEOF == true <=> the scanner is at the EOF */\n  private boolean zzAtEOF;\n\n  /* user code: */\n  public _AsmIntelHighlightingLexer() {\n    this(null);\n  }\n\n\n  /**\n   * Creates a new scanner\n   *\n   * @param   in  the java.io.Reader to read input from.\n   */\n  public _AsmIntelHighlightingLexer(Reader in) {\n    zzReader = in;\n  }\n\n\n  /** \n   * Unpacks the compressed character translation table.\n   *\n   * @param packed   the packed character translation table\n   * @return         the unpacked character translation table\n   */\n  private static char [] zzUnpackCMap(String packed) {\n    char [] map = new char[0x10000];\n    int i = 0;  /* index in packed string  */\n    int j = 0;  /* index in unpacked array */\n    while (i < 1768) {\n      int  count = packed.charAt(i++);\n      char value = packed.charAt(i++);\n      do map[j++] = value; while (--count > 0);\n    }\n    return map;\n  }\n\n  @Override\n  public final int getTokenStart(){\n    return zzStartRead;\n  }\n\n  @Override\n  public final int getTokenEnd(){\n    return getTokenStart() + yylength();\n  }\n\n  @Override\n  public void reset(CharSequence buffer, int start, int end, int initialState){\n    zzBuffer = buffer;\n    zzBufferArray = CharArrayUtil.fromSequenceWithoutCopying(buffer);\n    zzCurrentPos = zzMarkedPos = zzStartRead = start;\n    zzPushbackPos = 0;\n    zzAtEOF  = false;\n    zzAtBOL = true;\n    zzEndRead = end;\n    yybegin(initialState);\n  }\n\n  /**\n   * Refills the input buffer.\n   *\n   * @return      <code>false</code>, iff there was new input.\n   *\n   * @exception   IOException  if any I/O-Error occurs\n   */\n  private boolean zzRefill() throws IOException {\n    return true;\n  }\n\n\n  /**\n   * Returns the current lexical state.\n   */\n  @Override\n  public final int yystate() {\n    return zzLexicalState;\n  }\n\n\n  /**\n   * Enters a new lexical state\n   *\n   * @param newState the new lexical state\n   */\n  @Override\n  public final void yybegin(int newState) {\n    zzLexicalState = newState;\n  }\n\n\n  /**\n   * Returns the text matched by the current regular expression.\n   */\n  public final CharSequence yytext() {\n    return zzBuffer.subSequence(zzStartRead, zzMarkedPos);\n  }\n\n\n  /**\n   * Returns the character at position <tt>pos</tt> from the\n   * matched text.\n   *\n   * It is equivalent to yytext().charAt(pos), but faster\n   *\n   * @param pos the position of the character to fetch.\n   *            A value from 0 to yylength()-1.\n   *\n   * @return the character at position pos\n   */\n  public final char yycharat(int pos) {\n    return zzBufferArray != null ? zzBufferArray[zzStartRead+pos]:zzBuffer.charAt(zzStartRead+pos);\n  }\n\n\n  /**\n   * Returns the length of the matched text region.\n   */\n  public final int yylength() {\n    return zzMarkedPos-zzStartRead;\n  }\n\n\n  /**\n   * Reports an error that occured while scanning.\n   *\n   * In a wellformed scanner (no or only correct usage of\n   * yypushback(int) and a match-all fallback rule) this method\n   * will only be called with things that \"Can't Possibly Happen\".\n   * If this method is called, something is seriously wrong\n   * (e.g. a JFlex bug producing a faulty scanner etc.).\n   *\n   * Usual syntax/scanner level error handling should be done\n   * in error fallback rules.\n   *\n   * @param   errorCode  the code of the errormessage to display\n   */\n  private void zzScanError(int errorCode) {\n    String message;\n    try {\n      message = ZZ_ERROR_MSG[errorCode];\n    }\n    catch (ArrayIndexOutOfBoundsException e) {\n      message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];\n    }\n\n    throw new Error(message);\n  }\n\n\n  /**\n   * Pushes the specified amount of characters back into the input stream.\n   *\n   * They will be read again by then next call of the scanning method\n   *\n   * @param number  the number of characters to be read again.\n   *                This number must not be greater than yylength()!\n   */\n  public void yypushback(int number)  {\n    if ( number > yylength() )\n      zzScanError(ZZ_PUSHBACK_2BIG);\n\n    zzMarkedPos -= number;\n  }\n\n\n  /**\n   * Resumes scanning until the next regular expression is matched,\n   * the end of input is encountered or an I/O-Error occurs.\n   *\n   * @return      the next token\n   * @exception   IOException  if any I/O-Error occurs\n   */\n  @Override\n  public IElementType advance() throws IOException {\n    int zzInput;\n    int zzAction;\n\n    // cached fields:\n    int zzCurrentPosL;\n    int zzMarkedPosL;\n    int zzEndReadL = zzEndRead;\n    CharSequence zzBufferL = zzBuffer;\n    char[] zzBufferArrayL = zzBufferArray;\n    char [] zzCMapL = ZZ_CMAP;\n\n    int [] zzTransL = ZZ_TRANS;\n    int [] zzRowMapL = ZZ_ROWMAP;\n    int [] zzAttrL = ZZ_ATTRIBUTE;\n\n    while (true) {\n      zzMarkedPosL = zzMarkedPos;\n\n      zzAction = -1;\n\n      zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;\n\n      zzState = ZZ_LEXSTATE[zzLexicalState];\n\n\n      zzForAction: {\n        while (true) {\n\n          if (zzCurrentPosL < zzEndReadL)\n            zzInput = zzBufferArrayL != null ? zzBufferArrayL[zzCurrentPosL++] : zzBufferL.charAt(zzCurrentPosL++);\n          else if (zzAtEOF) {\n            zzInput = YYEOF;\n            break zzForAction;\n          }\n          else {\n            // store back cached positions\n            zzCurrentPos  = zzCurrentPosL;\n            zzMarkedPos   = zzMarkedPosL;\n            boolean eof = zzRefill();\n            // get translated positions and possibly new buffer\n            zzCurrentPosL  = zzCurrentPos;\n            zzMarkedPosL   = zzMarkedPos;\n            zzBufferL      = zzBuffer;\n            zzEndReadL     = zzEndRead;\n            if (eof) {\n              zzInput = YYEOF;\n              break zzForAction;\n            }\n            else {\n              zzInput = zzBufferArrayL != null ? zzBufferArrayL[zzCurrentPosL++] : zzBufferL.charAt(zzCurrentPosL++);\n            }\n          }\n          int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ];\n          if (zzNext == -1) break zzForAction;\n          zzState = zzNext;\n\n          int zzAttributes = zzAttrL[zzState];\n          if ( (zzAttributes & 1) == 1 ) {\n            zzAction = zzState;\n            zzMarkedPosL = zzCurrentPosL;\n            if ( (zzAttributes & 8) == 8 ) break zzForAction;\n          }\n\n        }\n      }\n\n      // store back cached position\n      zzMarkedPos = zzMarkedPosL;\n\n      switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {\n        case 17:\n          return FLAG;\n        case 19: break;\n        case 7:\n          return COMMA;\n        case 20: break;\n        case 5:\n          return INT;\n        case 21: break;\n        case 8:\n          return LINE_COMMENT;\n        case 22: break;\n        case 11:\n          return REGISTER;\n        case 23: break;\n        case 4:\n          return IDENTIFIER;\n        case 24: break;\n        case 10:\n          return LABEL;\n        case 25: break;\n        case 1:\n          return TokenType.BAD_CHARACTER;\n        case 26: break;\n        case 14:\n          return HEX;\n        case 27: break;\n        case 18:\n          return PREPROCESSOR;\n        case 28: break;\n        case 2:\n          return TokenType.WHITE_SPACE;\n        case 29: break;\n        case 3:\n          return OPERATOR;\n        case 30: break;\n        case 16:\n          return DIRECTIVE;\n        case 31: break;\n        case 15:\n          return PSEUDO_INS;\n        case 32: break;\n        case 9:\n          return STRING;\n        case 33: break;\n        case 6:\n          return PAREN;\n        case 34: break;\n        case 13:\n          return INSTRUCTION;\n        case 35: break;\n        case 12:\n          return PSEUDO_REG;\n        case 36: break;\n        default:\n          if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {\n            zzAtEOF = true;\n            return null;\n          }\n          else {\n            zzScanError(ZZ_NO_MATCH);\n          }\n      }\n    }\n  }\n\n\n}\n"
  },
  {
    "path": "plan9/gen/com/plan9/intel/lang/core/lexer/_AsmIntelLexer.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* The following code was generated by JFlex 1.4.3 on 3/26/16 7:42 PM */\n\npackage com.plan9.intel.lang.core.lexer;\n\nimport com.intellij.lexer.FlexLexer;\nimport com.intellij.psi.TokenType;\nimport com.intellij.psi.tree.IElementType;\nimport com.intellij.util.text.CharArrayUtil;\nimport com.plan9.intel.lang.core.psi.AsmIntelTypes;\n\nimport java.io.IOException;\nimport java.io.Reader;\n\nimport static com.plan9.intel.lang.core.AsmIntelParserDefinition.LINE_COMMENT;\n\n\n/**\n * This class is a scanner generated by \n * <a href=\"http://www.jflex.de/\">JFlex</a> 1.4.3\n * on 3/26/16 7:42 PM from the specification file\n * <tt>/Users/zolotov/dev/intellij-plugins/intellij-go/plan9/src/com/plan9/intel/lang/core/lexer/AsmIntelLexer.flex</tt>\n */\npublic class _AsmIntelLexer implements FlexLexer, AsmIntelTypes {\n  /** initial size of the lookahead buffer */\n  private static final int ZZ_BUFFERSIZE = 16384;\n\n  /** lexical states */\n  public static final int YYINITIAL = 0;\n\n  /**\n   * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l\n   * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l\n   *                  at the beginning of a line\n   * l is of the form l = 2*k, k a non negative integer\n   */\n  private static final int ZZ_LEXSTATE[] = { \n     0, 0\n  };\n\n  /** \n   * Translates characters to character classes\n   */\n  private static final String ZZ_CMAP_PACKED = \n    \"\\11\\0\\1\\3\\1\\1\\1\\0\\1\\2\\1\\1\\22\\0\\1\\3\\1\\0\\1\\5\"+\n    \"\\1\\55\\4\\0\\1\\64\\1\\65\\2\\0\\1\\66\\2\\0\\1\\4\\1\\12\\1\\50\"+\n    \"\\1\\47\\1\\54\\1\\53\\1\\11\\1\\52\\1\\11\\1\\51\\1\\11\\1\\15\\6\\0\"+\n    \"\\1\\23\\1\\22\\1\\20\\1\\24\\1\\37\\1\\16\\1\\45\\1\\43\\1\\40\\1\\30\"+\n    \"\\1\\46\\1\\26\\1\\25\\1\\31\\1\\33\\1\\17\\1\\41\\1\\32\\1\\21\\1\\35\"+\n    \"\\1\\34\\1\\42\\1\\27\\1\\14\\1\\36\\1\\44\\4\\0\\1\\6\\1\\0\\6\\10\"+\n    \"\\2\\6\\1\\56\\3\\6\\1\\57\\1\\6\\1\\61\\1\\60\\1\\6\\1\\62\\1\\6\"+\n    \"\\1\\63\\3\\6\\1\\13\\2\\6\\1\\0\\1\\67\\55\\0\\1\\6\\12\\0\\1\\6\"+\n    \"\\4\\0\\1\\6\\5\\0\\27\\6\\1\\0\\37\\6\\1\\0\\u01ca\\6\\4\\0\\14\\6\"+\n    \"\\16\\0\\5\\6\\7\\0\\1\\6\\1\\0\\1\\6\\201\\0\\5\\6\\1\\0\\2\\6\"+\n    \"\\2\\0\\4\\6\\10\\0\\1\\6\\1\\0\\3\\6\\1\\0\\1\\6\\1\\0\\24\\6\"+\n    \"\\1\\0\\123\\6\\1\\0\\213\\6\\10\\0\\236\\6\\11\\0\\46\\6\\2\\0\\1\\6\"+\n    \"\\7\\0\\47\\6\\110\\0\\33\\6\\5\\0\\3\\6\\55\\0\\53\\6\\25\\0\\12\\7\"+\n    \"\\4\\0\\2\\6\\1\\0\\143\\6\\1\\0\\1\\6\\17\\0\\2\\6\\7\\0\\2\\6\"+\n    \"\\12\\7\\3\\6\\2\\0\\1\\6\\20\\0\\1\\6\\1\\0\\36\\6\\35\\0\\131\\6\"+\n    \"\\13\\0\\1\\6\\16\\0\\12\\7\\41\\6\\11\\0\\2\\6\\4\\0\\1\\6\\5\\0\"+\n    \"\\26\\6\\4\\0\\1\\6\\11\\0\\1\\6\\3\\0\\1\\6\\27\\0\\31\\6\\107\\0\"+\n    \"\\1\\6\\1\\0\\13\\6\\127\\0\\66\\6\\3\\0\\1\\6\\22\\0\\1\\6\\7\\0\"+\n    \"\\12\\6\\4\\0\\12\\7\\1\\0\\7\\6\\1\\0\\7\\6\\5\\0\\10\\6\\2\\0\"+\n    \"\\2\\6\\2\\0\\26\\6\\1\\0\\7\\6\\1\\0\\1\\6\\3\\0\\4\\6\\3\\0\"+\n    \"\\1\\6\\20\\0\\1\\6\\15\\0\\2\\6\\1\\0\\3\\6\\4\\0\\12\\7\\2\\6\"+\n    \"\\23\\0\\6\\6\\4\\0\\2\\6\\2\\0\\26\\6\\1\\0\\7\\6\\1\\0\\2\\6\"+\n    \"\\1\\0\\2\\6\\1\\0\\2\\6\\37\\0\\4\\6\\1\\0\\1\\6\\7\\0\\12\\7\"+\n    \"\\2\\0\\3\\6\\20\\0\\11\\6\\1\\0\\3\\6\\1\\0\\26\\6\\1\\0\\7\\6\"+\n    \"\\1\\0\\2\\6\\1\\0\\5\\6\\3\\0\\1\\6\\22\\0\\1\\6\\17\\0\\2\\6\"+\n    \"\\4\\0\\12\\7\\25\\0\\10\\6\\2\\0\\2\\6\\2\\0\\26\\6\\1\\0\\7\\6\"+\n    \"\\1\\0\\2\\6\\1\\0\\5\\6\\3\\0\\1\\6\\36\\0\\2\\6\\1\\0\\3\\6\"+\n    \"\\4\\0\\12\\7\\1\\0\\1\\6\\21\\0\\1\\6\\1\\0\\6\\6\\3\\0\\3\\6\"+\n    \"\\1\\0\\4\\6\\3\\0\\2\\6\\1\\0\\1\\6\\1\\0\\2\\6\\3\\0\\2\\6\"+\n    \"\\3\\0\\3\\6\\3\\0\\14\\6\\26\\0\\1\\6\\25\\0\\12\\7\\25\\0\\10\\6\"+\n    \"\\1\\0\\3\\6\\1\\0\\27\\6\\1\\0\\12\\6\\1\\0\\5\\6\\3\\0\\1\\6\"+\n    \"\\32\\0\\2\\6\\6\\0\\2\\6\\4\\0\\12\\7\\25\\0\\10\\6\\1\\0\\3\\6\"+\n    \"\\1\\0\\27\\6\\1\\0\\12\\6\\1\\0\\5\\6\\3\\0\\1\\6\\40\\0\\1\\6\"+\n    \"\\1\\0\\2\\6\\4\\0\\12\\7\\1\\0\\2\\6\\22\\0\\10\\6\\1\\0\\3\\6\"+\n    \"\\1\\0\\51\\6\\2\\0\\1\\6\\20\\0\\1\\6\\21\\0\\2\\6\\4\\0\\12\\7\"+\n    \"\\12\\0\\6\\6\\5\\0\\22\\6\\3\\0\\30\\6\\1\\0\\11\\6\\1\\0\\1\\6\"+\n    \"\\2\\0\\7\\6\\72\\0\\60\\6\\1\\0\\2\\6\\14\\0\\7\\6\\11\\0\\12\\7\"+\n    \"\\47\\0\\2\\6\\1\\0\\1\\6\\2\\0\\2\\6\\1\\0\\1\\6\\2\\0\\1\\6\"+\n    \"\\6\\0\\4\\6\\1\\0\\7\\6\\1\\0\\3\\6\\1\\0\\1\\6\\1\\0\\1\\6\"+\n    \"\\2\\0\\2\\6\\1\\0\\4\\6\\1\\0\\2\\6\\11\\0\\1\\6\\2\\0\\5\\6\"+\n    \"\\1\\0\\1\\6\\11\\0\\12\\7\\2\\0\\4\\6\\40\\0\\1\\6\\37\\0\\12\\7\"+\n    \"\\26\\0\\10\\6\\1\\0\\44\\6\\33\\0\\5\\6\\163\\0\\53\\6\\24\\0\\1\\6\"+\n    \"\\12\\7\\6\\0\\6\\6\\4\\0\\4\\6\\3\\0\\1\\6\\3\\0\\2\\6\\7\\0\"+\n    \"\\3\\6\\4\\0\\15\\6\\14\\0\\1\\6\\1\\0\\12\\7\\6\\0\\46\\6\\1\\0\"+\n    \"\\1\\6\\5\\0\\1\\6\\2\\0\\53\\6\\1\\0\\u014d\\6\\1\\0\\4\\6\\2\\0\"+\n    \"\\7\\6\\1\\0\\1\\6\\1\\0\\4\\6\\2\\0\\51\\6\\1\\0\\4\\6\\2\\0\"+\n    \"\\41\\6\\1\\0\\4\\6\\2\\0\\7\\6\\1\\0\\1\\6\\1\\0\\4\\6\\2\\0\"+\n    \"\\17\\6\\1\\0\\71\\6\\1\\0\\4\\6\\2\\0\\103\\6\\45\\0\\20\\6\\20\\0\"+\n    \"\\125\\6\\14\\0\\u026c\\6\\2\\0\\21\\6\\1\\0\\32\\6\\5\\0\\113\\6\\25\\0\"+\n    \"\\15\\6\\1\\0\\4\\6\\16\\0\\22\\6\\16\\0\\22\\6\\16\\0\\15\\6\\1\\0\"+\n    \"\\3\\6\\17\\0\\64\\6\\43\\0\\1\\6\\4\\0\\1\\6\\3\\0\\12\\7\\46\\0\"+\n    \"\\12\\7\\6\\0\\130\\6\\10\\0\\51\\6\\1\\0\\1\\6\\5\\0\\106\\6\\12\\0\"+\n    \"\\35\\6\\51\\0\\12\\7\\36\\6\\2\\0\\5\\6\\13\\0\\54\\6\\25\\0\\7\\6\"+\n    \"\\10\\0\\12\\7\\46\\0\\27\\6\\11\\0\\65\\6\\53\\0\\12\\7\\6\\0\\12\\7\"+\n    \"\\15\\0\\1\\6\\135\\0\\57\\6\\21\\0\\7\\6\\4\\0\\12\\7\\51\\0\\36\\6\"+\n    \"\\15\\0\\2\\6\\12\\7\\54\\6\\32\\0\\44\\6\\34\\0\\12\\7\\3\\0\\3\\6\"+\n    \"\\12\\7\\44\\6\\153\\0\\4\\6\\1\\0\\4\\6\\3\\0\\2\\6\\11\\0\\300\\6\"+\n    \"\\100\\0\\u0116\\6\\2\\0\\6\\6\\2\\0\\46\\6\\2\\0\\6\\6\\2\\0\\10\\6\"+\n    \"\\1\\0\\1\\6\\1\\0\\1\\6\\1\\0\\1\\6\\1\\0\\37\\6\\2\\0\\65\\6\"+\n    \"\\1\\0\\7\\6\\1\\0\\1\\6\\3\\0\\3\\6\\1\\0\\7\\6\\3\\0\\4\\6\"+\n    \"\\2\\0\\6\\6\\4\\0\\15\\6\\5\\0\\3\\6\\1\\0\\7\\6\\164\\0\\1\\6\"+\n    \"\\15\\0\\1\\6\\20\\0\\15\\6\\145\\0\\1\\6\\4\\0\\1\\6\\2\\0\\12\\6\"+\n    \"\\1\\0\\1\\6\\3\\0\\5\\6\\6\\0\\1\\6\\1\\0\\1\\6\\1\\0\\1\\6\"+\n    \"\\1\\0\\4\\6\\1\\0\\13\\6\\2\\0\\4\\6\\5\\0\\5\\6\\4\\0\\1\\6\"+\n    \"\\64\\0\\2\\6\\u0a7b\\0\\57\\6\\1\\0\\57\\6\\1\\0\\205\\6\\6\\0\\4\\6\"+\n    \"\\3\\0\\2\\6\\14\\0\\46\\6\\1\\0\\1\\6\\5\\0\\1\\6\\2\\0\\70\\6\"+\n    \"\\7\\0\\1\\6\\20\\0\\27\\6\\11\\0\\7\\6\\1\\0\\7\\6\\1\\0\\7\\6\"+\n    \"\\1\\0\\7\\6\\1\\0\\7\\6\\1\\0\\7\\6\\1\\0\\7\\6\\1\\0\\7\\6\"+\n    \"\\120\\0\\1\\6\\u01d5\\0\\2\\6\\52\\0\\5\\6\\5\\0\\2\\6\\4\\0\\126\\6\"+\n    \"\\6\\0\\3\\6\\1\\0\\132\\6\\1\\0\\4\\6\\5\\0\\51\\6\\3\\0\\136\\6\"+\n    \"\\21\\0\\33\\6\\65\\0\\20\\6\\u0200\\0\\u19b6\\6\\112\\0\\u51cd\\6\\63\\0\\u048d\\6\"+\n    \"\\103\\0\\56\\6\\2\\0\\u010d\\6\\3\\0\\20\\6\\12\\7\\2\\6\\24\\0\\57\\6\"+\n    \"\\20\\0\\31\\6\\10\\0\\106\\6\\61\\0\\11\\6\\2\\0\\147\\6\\2\\0\\4\\6\"+\n    \"\\1\\0\\4\\6\\14\\0\\13\\6\\115\\0\\12\\6\\1\\0\\3\\6\\1\\0\\4\\6\"+\n    \"\\1\\0\\27\\6\\35\\0\\64\\6\\16\\0\\62\\6\\34\\0\\12\\7\\30\\0\\6\\6\"+\n    \"\\3\\0\\1\\6\\4\\0\\12\\7\\34\\6\\12\\0\\27\\6\\31\\0\\35\\6\\7\\0\"+\n    \"\\57\\6\\34\\0\\1\\6\\12\\7\\46\\0\\51\\6\\27\\0\\3\\6\\1\\0\\10\\6\"+\n    \"\\4\\0\\12\\7\\6\\0\\27\\6\\3\\0\\1\\6\\5\\0\\60\\6\\1\\0\\1\\6\"+\n    \"\\3\\0\\2\\6\\2\\0\\5\\6\\2\\0\\1\\6\\1\\0\\1\\6\\30\\0\\3\\6\"+\n    \"\\2\\0\\13\\6\\7\\0\\3\\6\\14\\0\\6\\6\\2\\0\\6\\6\\2\\0\\6\\6\"+\n    \"\\11\\0\\7\\6\\1\\0\\7\\6\\221\\0\\43\\6\\15\\0\\12\\7\\6\\0\\u2ba4\\6\"+\n    \"\\14\\0\\27\\6\\4\\0\\61\\6\\u2104\\0\\u016e\\6\\2\\0\\152\\6\\46\\0\\7\\6\"+\n    \"\\14\\0\\5\\6\\5\\0\\1\\6\\1\\0\\12\\6\\1\\0\\15\\6\\1\\0\\5\\6\"+\n    \"\\1\\0\\1\\6\\1\\0\\2\\6\\1\\0\\2\\6\\1\\0\\154\\6\\41\\0\\u016b\\6\"+\n    \"\\22\\0\\100\\6\\2\\0\\66\\6\\50\\0\\14\\6\\164\\0\\5\\6\\1\\0\\207\\6\"+\n    \"\\23\\0\\12\\7\\7\\0\\32\\6\\6\\0\\32\\6\\13\\0\\131\\6\\3\\0\\6\\6\"+\n    \"\\2\\0\\6\\6\\2\\0\\6\\6\\2\\0\\3\\6\\43\\0\";\n\n  /** \n   * Translates characters to character classes\n   */\n  private static final char [] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED);\n\n  /** \n   * Translates DFA states to action switch labels.\n   */\n  private static final int [] ZZ_ACTION = zzUnpackAction();\n\n  private static final String ZZ_ACTION_PACKED_0 =\n    \"\\1\\0\\1\\1\\2\\2\\2\\1\\1\\3\\2\\4\\1\\3\\1\\5\"+\n    \"\\25\\3\\1\\1\\1\\6\\1\\7\\1\\10\\1\\11\\1\\12\\1\\0\"+\n    \"\\1\\13\\1\\14\\1\\0\\12\\3\\1\\15\\17\\3\\1\\15\\22\\3\"+\n    \"\\1\\15\\1\\3\\1\\15\\101\\3\\1\\0\\1\\16\\102\\3\\1\\17\"+\n    \"\\64\\3\\1\\17\\13\\3\\1\\17\\7\\3\\1\\0\\17\\3\\1\\17\"+\n    \"\\25\\3\\1\\17\\36\\3\\1\\17\\1\\3\\2\\17\\1\\3\\2\\17\"+\n    \"\\1\\3\\1\\17\\15\\3\\1\\20\\5\\3\\1\\0\\5\\3\\1\\17\"+\n    \"\\1\\3\\2\\17\\5\\3\\2\\17\\1\\3\\2\\17\\36\\3\\1\\21\"+\n    \"\\22\\3\\1\\0\\1\\3\\1\\17\\5\\3\\1\\17\\14\\3\\1\\17\"+\n    \"\\10\\3\\1\\0\\17\\3\\1\\22\\15\\3\";\n\n  private static int [] zzUnpackAction() {\n    int [] result = new int[522];\n    int offset = 0;\n    offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);\n    return result;\n  }\n\n  private static int zzUnpackAction(String packed, int offset, int [] result) {\n    int i = 0;       /* index in packed string  */\n    int j = offset;  /* index in unpacked array */\n    int l = packed.length();\n    while (i < l) {\n      int count = packed.charAt(i++);\n      int value = packed.charAt(i++);\n      do result[j++] = value; while (--count > 0);\n    }\n    return j;\n  }\n\n\n  /** \n   * Translates a state to a row index in the transition table\n   */\n  private static final int [] ZZ_ROWMAP = zzUnpackRowMap();\n\n  private static final String ZZ_ROWMAP_PACKED_0 =\n    \"\\0\\0\\0\\70\\0\\160\\0\\70\\0\\250\\0\\340\\0\\u0118\\0\\u0150\"+\n    \"\\0\\u0188\\0\\u01c0\\0\\70\\0\\u01f8\\0\\u0230\\0\\u0268\\0\\u02a0\\0\\u02d8\"+\n    \"\\0\\u0310\\0\\u0348\\0\\u0380\\0\\u03b8\\0\\u03f0\\0\\u0428\\0\\u0460\\0\\u0498\"+\n    \"\\0\\u04d0\\0\\u0508\\0\\u0540\\0\\u0578\\0\\u05b0\\0\\u05e8\\0\\u0620\\0\\u0658\"+\n    \"\\0\\u0690\\0\\70\\0\\70\\0\\70\\0\\70\\0\\u06c8\\0\\340\\0\\70\"+\n    \"\\0\\70\\0\\u0700\\0\\u0738\\0\\u0770\\0\\u07a8\\0\\u07e0\\0\\u0818\\0\\u0850\"+\n    \"\\0\\u0888\\0\\u08c0\\0\\u08f8\\0\\u0930\\0\\u0968\\0\\u09a0\\0\\u09d8\\0\\u0a10\"+\n    \"\\0\\u0a48\\0\\u0a80\\0\\u0ab8\\0\\u0af0\\0\\u0b28\\0\\u0b60\\0\\u0b98\\0\\u0bd0\"+\n    \"\\0\\u0c08\\0\\u0c40\\0\\u0c78\\0\\u0cb0\\0\\u0ce8\\0\\u0d20\\0\\u0d58\\0\\u0d90\"+\n    \"\\0\\u0dc8\\0\\u0e00\\0\\u0e38\\0\\u0e70\\0\\u0ea8\\0\\u0ee0\\0\\u0f18\\0\\u0f50\"+\n    \"\\0\\u0f88\\0\\u0fc0\\0\\u0ff8\\0\\u1030\\0\\u1068\\0\\u10a0\\0\\u10d8\\0\\u0118\"+\n    \"\\0\\u1110\\0\\u1148\\0\\u1180\\0\\u11b8\\0\\u11f0\\0\\u1228\\0\\u1260\\0\\u1298\"+\n    \"\\0\\u12d0\\0\\u1308\\0\\u1340\\0\\u1378\\0\\u13b0\\0\\u13e8\\0\\u1420\\0\\u1458\"+\n    \"\\0\\u1490\\0\\u14c8\\0\\u1500\\0\\u1538\\0\\u1570\\0\\u15a8\\0\\u15e0\\0\\u1618\"+\n    \"\\0\\u1650\\0\\u1688\\0\\u16c0\\0\\u16f8\\0\\u1730\\0\\u1768\\0\\u17a0\\0\\u17d8\"+\n    \"\\0\\u1810\\0\\u1848\\0\\u1880\\0\\u18b8\\0\\u18f0\\0\\u1928\\0\\u1960\\0\\u1998\"+\n    \"\\0\\u19d0\\0\\u1a08\\0\\u1a40\\0\\u1a78\\0\\u1ab0\\0\\u1ae8\\0\\u1b20\\0\\u1b58\"+\n    \"\\0\\u1b90\\0\\u1bc8\\0\\u1c00\\0\\u1c38\\0\\u1c70\\0\\u1ca8\\0\\u1ce0\\0\\u1d18\"+\n    \"\\0\\u1d50\\0\\u1d88\\0\\u1dc0\\0\\u1df8\\0\\u1e30\\0\\u1e68\\0\\u1ea0\\0\\u1ed8\"+\n    \"\\0\\u1f10\\0\\u1f48\\0\\u1f80\\0\\u1fb8\\0\\u0700\\0\\u1ff0\\0\\u2028\\0\\u2060\"+\n    \"\\0\\u2098\\0\\u20d0\\0\\u2108\\0\\u2140\\0\\u2178\\0\\u21b0\\0\\u21e8\\0\\u2220\"+\n    \"\\0\\u2258\\0\\u2290\\0\\u22c8\\0\\u2300\\0\\u2338\\0\\u2370\\0\\u23a8\\0\\u23e0\"+\n    \"\\0\\u2418\\0\\u2450\\0\\u2488\\0\\u24c0\\0\\u24f8\\0\\u2530\\0\\u2568\\0\\u25a0\"+\n    \"\\0\\u25d8\\0\\u2610\\0\\u2648\\0\\u2680\\0\\u26b8\\0\\u26f0\\0\\u2728\\0\\u2760\"+\n    \"\\0\\u2798\\0\\u27d0\\0\\u2808\\0\\u2840\\0\\u2878\\0\\u28b0\\0\\u28e8\\0\\u2920\"+\n    \"\\0\\u2958\\0\\u2990\\0\\u29c8\\0\\u2a00\\0\\u2a38\\0\\u2a70\\0\\u2aa8\\0\\u2ae0\"+\n    \"\\0\\u2b18\\0\\u2b50\\0\\u2b88\\0\\u2bc0\\0\\u2bf8\\0\\u2c30\\0\\u2c68\\0\\u2ca0\"+\n    \"\\0\\u2cd8\\0\\u2d10\\0\\u2d48\\0\\u2d80\\0\\u2db8\\0\\u2df0\\0\\u2e28\\0\\u0118\"+\n    \"\\0\\u2e60\\0\\u2e98\\0\\u2ed0\\0\\u2f08\\0\\u2f40\\0\\u2f78\\0\\u2fb0\\0\\u2fe8\"+\n    \"\\0\\u3020\\0\\u3058\\0\\u3090\\0\\u30c8\\0\\u3100\\0\\u3138\\0\\u3170\\0\\u31a8\"+\n    \"\\0\\u31e0\\0\\u3218\\0\\u3250\\0\\u3288\\0\\u32c0\\0\\u32f8\\0\\u3330\\0\\u3368\"+\n    \"\\0\\u33a0\\0\\u33d8\\0\\u3410\\0\\u3448\\0\\u3480\\0\\u34b8\\0\\u34f0\\0\\u3528\"+\n    \"\\0\\u3560\\0\\u3598\\0\\u35d0\\0\\u3608\\0\\u3640\\0\\u3678\\0\\u36b0\\0\\u36e8\"+\n    \"\\0\\u3720\\0\\u3758\\0\\u3790\\0\\u37c8\\0\\u3800\\0\\u3838\\0\\u3870\\0\\u38a8\"+\n    \"\\0\\u38e0\\0\\u3918\\0\\u3950\\0\\u3988\\0\\u39c0\\0\\u39f8\\0\\u3a30\\0\\u3a68\"+\n    \"\\0\\u3aa0\\0\\u3ad8\\0\\u3b10\\0\\u3b48\\0\\u3b80\\0\\u3bb8\\0\\u3bf0\\0\\u3c28\"+\n    \"\\0\\u1068\\0\\u3c60\\0\\u3c98\\0\\u3cd0\\0\\u3d08\\0\\u3d40\\0\\u3d78\\0\\u3db0\"+\n    \"\\0\\u3de8\\0\\u3e20\\0\\u3e58\\0\\u3e90\\0\\u3ec8\\0\\u3f00\\0\\u3f38\\0\\u3f70\"+\n    \"\\0\\u39c0\\0\\u3fa8\\0\\u3fe0\\0\\u4018\\0\\u4050\\0\\u4088\\0\\u40c0\\0\\u40f8\"+\n    \"\\0\\u4130\\0\\u4168\\0\\u41a0\\0\\u41d8\\0\\u4210\\0\\u4248\\0\\u4280\\0\\u42b8\"+\n    \"\\0\\u42f0\\0\\u4328\\0\\u4360\\0\\u4398\\0\\u43d0\\0\\u4408\\0\\u4440\\0\\u4478\"+\n    \"\\0\\u44b0\\0\\u44e8\\0\\u4520\\0\\u4558\\0\\u4590\\0\\u45c8\\0\\u4600\\0\\u4638\"+\n    \"\\0\\u4670\\0\\u46a8\\0\\u46e0\\0\\u4718\\0\\u4750\\0\\u4788\\0\\u47c0\\0\\u47f8\"+\n    \"\\0\\u4830\\0\\u4868\\0\\u48a0\\0\\u48d8\\0\\u4910\\0\\u4948\\0\\u4980\\0\\u49b8\"+\n    \"\\0\\u49f0\\0\\u4a28\\0\\u4a60\\0\\u4a98\\0\\u4ad0\\0\\u4b08\\0\\u4b40\\0\\u4b78\"+\n    \"\\0\\u4bb0\\0\\u4be8\\0\\u4c20\\0\\u4c58\\0\\u4c90\\0\\u4cc8\\0\\u4d00\\0\\u4d38\"+\n    \"\\0\\u4d70\\0\\u4da8\\0\\u4de0\\0\\u4e18\\0\\u4e50\\0\\u4e88\\0\\u4ec0\\0\\u4ef8\"+\n    \"\\0\\u4f30\\0\\u4f68\\0\\u4fa0\\0\\u4fd8\\0\\u5010\\0\\u5048\\0\\u5080\\0\\u50b8\"+\n    \"\\0\\u50f0\\0\\u5128\\0\\u5160\\0\\u0118\\0\\u5198\\0\\u51d0\\0\\u5208\\0\\u5240\"+\n    \"\\0\\u5278\\0\\u52b0\\0\\u52e8\\0\\u5320\\0\\u5358\\0\\u5390\\0\\u53c8\\0\\u42f0\"+\n    \"\\0\\u5400\\0\\u26b8\\0\\u5438\\0\\u5470\\0\\u54a8\\0\\u54e0\\0\\u5518\\0\\u5550\"+\n    \"\\0\\u5588\\0\\u55c0\\0\\u55f8\\0\\u2840\\0\\u5630\\0\\u5668\\0\\u56a0\\0\\u56d8\"+\n    \"\\0\\u5710\\0\\u5748\\0\\u5780\\0\\u57b8\\0\\u57f0\\0\\u5828\\0\\u5860\\0\\u5898\"+\n    \"\\0\\u58d0\\0\\u5908\\0\\u5940\\0\\u5978\\0\\u59b0\\0\\u59e8\\0\\u5a20\\0\\u5a58\"+\n    \"\\0\\u5a90\\0\\u5ac8\\0\\u5b00\\0\\u5b38\\0\\u5b70\\0\\u5ba8\\0\\u5be0\\0\\u5c18\"+\n    \"\\0\\u5c50\\0\\u5c88\\0\\u5cc0\\0\\u0118\\0\\u5cf8\\0\\u5d30\\0\\u5d68\\0\\u5da0\"+\n    \"\\0\\u5dd8\\0\\u5e10\\0\\u5e48\\0\\u5e80\\0\\u5eb8\\0\\u5ef0\\0\\u5f28\\0\\u5f60\"+\n    \"\\0\\u5f98\\0\\u5fd0\\0\\u6008\\0\\u6040\\0\\u6078\\0\\u60b0\\0\\u60e8\\0\\u6120\"+\n    \"\\0\\u6158\\0\\u6190\\0\\u61c8\\0\\u6200\\0\\u6238\\0\\u6270\\0\\u40c0\\0\\u62a8\"+\n    \"\\0\\u62e0\\0\\u6318\\0\\u6350\\0\\u6388\\0\\u63c0\\0\\u63f8\\0\\u6430\\0\\u6468\"+\n    \"\\0\\u64a0\\0\\u64d8\\0\\u6510\\0\\u6548\\0\\u6580\\0\\u65b8\\0\\u65f0\\0\\u6628\"+\n    \"\\0\\u6660\\0\\u6698\\0\\u66d0\\0\\u6708\\0\\u6740\\0\\u6778\\0\\u67b0\\0\\u67e8\"+\n    \"\\0\\u6820\\0\\u6858\\0\\u6890\\0\\u68c8\\0\\u6900\\0\\u6938\\0\\u6970\\0\\u69a8\"+\n    \"\\0\\u69e0\\0\\u6a18\\0\\u6a50\\0\\u6a88\\0\\70\\0\\u6ac0\\0\\u6af8\\0\\u4de0\"+\n    \"\\0\\u6b30\\0\\u6b68\\0\\u6ba0\\0\\u6bd8\\0\\u6c10\\0\\u6c48\\0\\u6c80\\0\\u6cb8\"+\n    \"\\0\\u6cf0\\0\\u6d28\";\n\n  private static int [] zzUnpackRowMap() {\n    int [] result = new int[522];\n    int offset = 0;\n    offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);\n    return result;\n  }\n\n  private static int zzUnpackRowMap(String packed, int offset, int [] result) {\n    int i = 0;  /* index in packed string  */\n    int j = offset;  /* index in unpacked array */\n    int l = packed.length();\n    while (i < l) {\n      int high = packed.charAt(i++) << 16;\n      result[j++] = high | packed.charAt(i++);\n    }\n    return j;\n  }\n\n  /** \n   * The transition table of the DFA\n   */\n  private static final int [] ZZ_TRANS = zzUnpackTrans();\n\n  private static final String ZZ_TRANS_PACKED_0 =\n    \"\\1\\2\\1\\3\\1\\4\\1\\3\\1\\5\\1\\6\\1\\7\\1\\2\"+\n    \"\\1\\7\\1\\10\\1\\11\\1\\7\\1\\12\\1\\13\\1\\14\\1\\15\"+\n    \"\\1\\16\\1\\17\\1\\20\\1\\21\\1\\22\\1\\23\\1\\24\\1\\25\"+\n    \"\\1\\26\\1\\27\\1\\30\\1\\31\\1\\32\\1\\33\\1\\7\\1\\34\"+\n    \"\\1\\35\\1\\36\\1\\37\\1\\40\\3\\7\\6\\10\\1\\41\\6\\7\"+\n    \"\\1\\42\\1\\43\\1\\44\\1\\45\\71\\0\\1\\3\\1\\0\\1\\3\"+\n    \"\\70\\0\\1\\46\\63\\0\\5\\47\\1\\50\\62\\47\\6\\0\\7\\7\"+\n    \"\\1\\51\\37\\7\\1\\0\\6\\7\\15\\0\\2\\10\\34\\0\\6\\10\"+\n    \"\\26\\0\\2\\52\\61\\0\\7\\7\\1\\51\\2\\7\\1\\53\\1\\7\"+\n    \"\\1\\54\\1\\55\\2\\7\\1\\56\\3\\7\\1\\57\\1\\60\\1\\7\"+\n    \"\\1\\61\\1\\7\\1\\62\\15\\7\\1\\0\\6\\7\\12\\0\\6\\7\"+\n    \"\\1\\63\\1\\51\\1\\64\\1\\65\\1\\66\\1\\67\\1\\7\\1\\70\"+\n    \"\\1\\71\\1\\72\\1\\73\\2\\7\\1\\74\\1\\75\\1\\7\\1\\76\"+\n    \"\\1\\77\\1\\100\\1\\7\\1\\101\\6\\7\\1\\102\\5\\7\\1\\0\"+\n    \"\\6\\7\\12\\0\\6\\7\\1\\103\\1\\51\\1\\104\\1\\7\\1\\105\"+\n    \"\\1\\106\\1\\7\\1\\107\\1\\7\\1\\110\\4\\7\\1\\111\\1\\112\"+\n    \"\\1\\113\\2\\7\\1\\114\\1\\115\\14\\7\\1\\0\\6\\7\\12\\0\"+\n    \"\\7\\7\\1\\51\\1\\7\\1\\116\\4\\7\\1\\117\\1\\120\\1\\121\"+\n    \"\\1\\122\\2\\7\\1\\123\\1\\124\\5\\7\\1\\125\\1\\126\\12\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\1\\127\\1\\130\\1\\131\"+\n    \"\\1\\7\\1\\132\\1\\133\\3\\7\\1\\134\\4\\7\\1\\135\\1\\136\"+\n    \"\\1\\137\\1\\140\\1\\7\\1\\141\\1\\7\\1\\142\\11\\7\\1\\0\"+\n    \"\\6\\7\\12\\0\\7\\7\\1\\51\\3\\7\\1\\143\\11\\7\\1\\144\"+\n    \"\\1\\7\\1\\145\\1\\146\\16\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\5\\7\\1\\147\\1\\150\\4\\7\\1\\151\\1\\152\\4\\7\"+\n    \"\\1\\153\\15\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\5\\7\"+\n    \"\\1\\154\\10\\7\\1\\155\\2\\7\\1\\156\\1\\157\\14\\7\\1\\0\"+\n    \"\\6\\7\\12\\0\\7\\7\\1\\51\\1\\127\\4\\7\\1\\160\\7\\7\"+\n    \"\\1\\161\\1\\162\\3\\7\\1\\163\\14\\7\\1\\0\\6\\7\\12\\0\"+\n    \"\\7\\7\\1\\51\\1\\127\\2\\7\\1\\164\\1\\7\\1\\165\\1\\166\"+\n    \"\\6\\7\\1\\167\\3\\7\\1\\170\\15\\7\\1\\0\\6\\7\\12\\0\"+\n    \"\\7\\7\\1\\51\\4\\7\\1\\171\\1\\172\\6\\7\\1\\173\\1\\174\"+\n    \"\\21\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\1\\7\\1\\175\"+\n    \"\\1\\176\\4\\7\\1\\177\\1\\200\\2\\7\\1\\201\\1\\7\\1\\202\"+\n    \"\\3\\7\\1\\117\\3\\7\\1\\177\\1\\7\\1\\203\\7\\7\\1\\0\"+\n    \"\\6\\7\\12\\0\\7\\7\\1\\51\\15\\7\\1\\204\\3\\7\\1\\205\"+\n    \"\\15\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\2\\7\\1\\206\"+\n    \"\\1\\207\\2\\7\\1\\210\\6\\7\\1\\211\\3\\7\\1\\212\\15\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\14\\7\\1\\213\\1\\7\"+\n    \"\\1\\214\\20\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\2\\7\"+\n    \"\\1\\215\\10\\7\\1\\216\\23\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\10\\7\\1\\217\\10\\7\\1\\220\\15\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\7\\7\\1\\221\\3\\7\\1\\222\\23\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\6\\7\\1\\223\\1\\224\"+\n    \"\\3\\7\\1\\225\\1\\226\\22\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\16\\7\\1\\227\\20\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\1\\7\\1\\230\\17\\7\\1\\231\\4\\7\\1\\232\\10\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\10\\7\\1\\233\\26\\7\"+\n    \"\\1\\0\\6\\7\\62\\0\\1\\234\\11\\0\\1\\46\\1\\0\\66\\46\"+\n    \"\\10\\0\\3\\235\\3\\0\\1\\235\\1\\0\\1\\235\\1\\0\\3\\235\"+\n    \"\\12\\0\\1\\235\\7\\0\\6\\235\\21\\0\\7\\7\\1\\51\\25\\7\"+\n    \"\\1\\236\\11\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\21\\7\"+\n    \"\\1\\237\\15\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\2\\7\"+\n    \"\\1\\240\\1\\7\\1\\241\\1\\7\\1\\242\\30\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\5\\7\\1\\233\\31\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\21\\7\\1\\243\\15\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\14\\7\\1\\213\\22\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\21\\7\\1\\77\\15\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\13\\7\\1\\122\\23\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\2\\7\\1\\244\\1\\245\\1\\7\\1\\246\"+\n    \"\\6\\7\\1\\247\\2\\7\\1\\250\\17\\7\\1\\0\\6\\7\\12\\0\"+\n    \"\\7\\7\\1\\51\\14\\7\\1\\251\\22\\7\\1\\0\\6\\7\\12\\0\"+\n    \"\\7\\7\\1\\51\\5\\7\\1\\252\\6\\7\\1\\253\\2\\7\\1\\254\"+\n    \"\\17\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\7\\7\\1\\255\"+\n    \"\\1\\256\\4\\7\\1\\257\\7\\7\\1\\260\\11\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\2\\7\\1\\261\\2\\7\\1\\262\\10\\7\"+\n    \"\\1\\263\\1\\264\\2\\7\\1\\265\\1\\266\\13\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\4\\7\\1\\260\\1\\7\\1\\267\\30\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\21\\7\\1\\270\\1\\271\"+\n    \"\\14\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\15\\7\\1\\272\"+\n    \"\\1\\273\\20\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\6\\7\"+\n    \"\\1\\274\\30\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\15\\7\"+\n    \"\\1\\275\\21\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\3\\7\"+\n    \"\\1\\276\\7\\7\\1\\277\\23\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\2\\7\\1\\300\\34\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\3\\7\\1\\233\\33\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\10\\7\\1\\301\\26\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\13\\7\\1\\302\\23\\7\\1\\0\\6\\7\\12\\0\\6\\7\"+\n    \"\\1\\303\\1\\51\\37\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\15\\7\\1\\304\\21\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\1\\7\\1\\305\\1\\306\\1\\307\\1\\7\\1\\310\\1\\7\\1\\311\"+\n    \"\\3\\7\\1\\312\\1\\313\\14\\7\\1\\314\\5\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\7\\7\\1\\315\\1\\316\\26\\7\\1\\0\"+\n    \"\\6\\7\\12\\0\\7\\7\\1\\51\\5\\7\\1\\317\\2\\7\\1\\320\"+\n    \"\\1\\321\\2\\7\\1\\322\\1\\7\\1\\323\\6\\7\\1\\324\\11\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\2\\7\\1\\325\\3\\7\"+\n    \"\\1\\326\\4\\7\\1\\327\\2\\7\\1\\330\\5\\7\\1\\331\\12\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\5\\7\\1\\332\\7\\7\"+\n    \"\\1\\333\\1\\334\\3\\7\\1\\335\\14\\7\\1\\0\\6\\7\\12\\0\"+\n    \"\\7\\7\\1\\51\\21\\7\\1\\336\\15\\7\\1\\0\\6\\7\\12\\0\"+\n    \"\\7\\7\\1\\51\\1\\7\\1\\337\\12\\7\\1\\340\\22\\7\\1\\0\"+\n    \"\\6\\7\\12\\0\\7\\7\\1\\51\\3\\7\\1\\341\\7\\7\\1\\342\"+\n    \"\\23\\7\\1\\0\\6\\7\\12\\0\\6\\7\\1\\343\\1\\51\\37\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\13\\7\\1\\344\\15\\7\"+\n    \"\\1\\345\\5\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\16\\7\"+\n    \"\\1\\346\\20\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\23\\7\"+\n    \"\\1\\340\\13\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\1\\7\"+\n    \"\\1\\347\\1\\340\\12\\7\\1\\350\\21\\7\\1\\0\\6\\7\\12\\0\"+\n    \"\\7\\7\\1\\51\\2\\7\\1\\340\\3\\7\\1\\340\\10\\7\\1\\260\"+\n    \"\\2\\7\\1\\340\\14\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\6\\7\\1\\340\\30\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\2\\7\\1\\351\\34\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\7\\7\\1\\352\\27\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\15\\7\\1\\340\\21\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\17\\7\\1\\353\\17\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\21\\7\\1\\354\\15\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\5\\7\\1\\355\\31\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\4\\7\\1\\356\\32\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\10\\7\\1\\356\\3\\7\\1\\356\\10\\7\\1\\357\\11\\7\\1\\0\"+\n    \"\\6\\7\\12\\0\\7\\7\\1\\51\\5\\7\\1\\360\\31\\7\\1\\0\"+\n    \"\\6\\7\\12\\0\\7\\7\\1\\51\\4\\7\\1\\361\\32\\7\\1\\0\"+\n    \"\\6\\7\\12\\0\\7\\7\\1\\51\\2\\7\\1\\340\\3\\7\\1\\340\"+\n    \"\\1\\362\\5\\7\\1\\355\\4\\7\\1\\340\\14\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\3\\7\\1\\363\\33\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\17\\7\\1\\364\\17\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\14\\7\\1\\365\\22\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\10\\7\\1\\356\\3\\7\\1\\356\\1\\7\"+\n    \"\\1\\366\\20\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\1\\367\"+\n    \"\\10\\7\\1\\370\\2\\7\\1\\367\\22\\7\\1\\0\\6\\7\\12\\0\"+\n    \"\\7\\7\\1\\51\\16\\7\\1\\371\\20\\7\\1\\0\\6\\7\\12\\0\"+\n    \"\\7\\7\\1\\51\\2\\7\\2\\367\\4\\7\\2\\340\\2\\7\\1\\367\"+\n    \"\\6\\7\\1\\340\\13\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\17\\7\\1\\201\\17\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\3\\7\\1\\340\\1\\7\\3\\340\\27\\7\\1\\0\\6\\7\\12\\0\"+\n    \"\\7\\7\\1\\51\\2\\7\\1\\356\\3\\7\\1\\361\\3\\7\\1\\372\"+\n    \"\\24\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\6\\7\\1\\373\"+\n    \"\\30\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\1\\7\\1\\374\"+\n    \"\\35\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\3\\7\\1\\375\"+\n    \"\\33\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\3\\7\\1\\340\"+\n    \"\\1\\7\\1\\340\\31\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\1\\7\\1\\376\\35\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\2\\7\\1\\356\\34\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\24\\7\\1\\361\\12\\7\\1\\0\\6\\7\\12\\0\\6\\7\\1\\377\"+\n    \"\\1\\51\\3\\7\\1\\u0100\\33\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\6\\7\\1\\201\\15\\7\\1\\u0101\\12\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\10\\7\\1\\361\\26\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\13\\7\\1\\377\\23\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\10\\7\\1\\u0102\\26\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\3\\7\\1\\233\\10\\7\\1\\u0102\\10\\7\"+\n    \"\\1\\357\\11\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\7\\7\"+\n    \"\\1\\362\\27\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\2\\7\"+\n    \"\\1\\u0103\\3\\7\\1\\355\\4\\7\\1\\u0104\\1\\7\\1\\u0105\\21\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\5\\7\\1\\u0106\\31\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\22\\7\\1\\u0107\\14\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\22\\7\\1\\233\\14\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\5\\7\\1\\u0108\\1\\7\"+\n    \"\\1\\u0109\\27\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\14\\7\"+\n    \"\\1\\122\\22\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\2\\7\"+\n    \"\\2\\340\\4\\7\\1\\340\\26\\7\\1\\0\\6\\7\\12\\0\\6\\7\"+\n    \"\\1\\u010a\\1\\51\\2\\7\\2\\340\\33\\7\\1\\0\\6\\7\\12\\0\"+\n    \"\\7\\7\\1\\51\\22\\7\\1\\340\\14\\7\\1\\0\\6\\7\\12\\0\"+\n    \"\\7\\7\\1\\51\\3\\7\\1\\340\\13\\7\\1\\340\\1\\7\\1\\340\"+\n    \"\\15\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\21\\7\\1\\340\"+\n    \"\\15\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\2\\7\\2\\340\"+\n    \"\\33\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\17\\7\\1\\340\"+\n    \"\\1\\7\\1\\340\\15\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\1\\u010b\\1\\u010c\\1\\7\\1\\u010d\\13\\7\\1\\356\\17\\7\\1\\0\"+\n    \"\\6\\7\\12\\0\\7\\7\\1\\51\\21\\7\\1\\u010e\\5\\7\\1\\356\"+\n    \"\\7\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\1\\7\\1\\u010f\"+\n    \"\\6\\7\\1\\356\\3\\7\\1\\356\\22\\7\\1\\0\\6\\7\\12\\0\"+\n    \"\\7\\7\\1\\51\\7\\7\\1\\340\\13\\7\\1\\u0110\\13\\7\\1\\0\"+\n    \"\\6\\7\\12\\0\\7\\7\\1\\51\\1\\7\\1\\u0111\\5\\7\\1\\u0109\"+\n    \"\\7\\7\\1\\u0112\\17\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\6\\7\\1\\u0113\\1\\7\\1\\356\\3\\7\\1\\356\\1\\7\\1\\u0114\"+\n    \"\\20\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\1\\7\\1\\u0115\"+\n    \"\\15\\7\\1\\u0116\\17\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\1\\7\\1\\u0117\\2\\7\\1\\340\\3\\7\\2\\340\\11\\7\\1\\340\"+\n    \"\\13\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\17\\7\\1\\u0118\"+\n    \"\\17\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\15\\7\\1\\124\"+\n    \"\\21\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\1\\7\\1\\u0119\"+\n    \"\\35\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\3\\7\\1\\u011a\"+\n    \"\\33\\7\\1\\0\\6\\7\\12\\0\\6\\7\\1\\u011b\\1\\51\\3\\7\"+\n    \"\\1\\u011c\\33\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\7\\7\"+\n    \"\\1\\260\\27\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\17\\7\"+\n    \"\\1\\u011d\\17\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\22\\7\"+\n    \"\\1\\u011e\\14\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\16\\7\"+\n    \"\\1\\u011f\\20\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\2\\7\"+\n    \"\\1\\356\\1\\u0120\\1\\340\\3\\7\\2\\340\\5\\7\\1\\u0121\\4\\7\"+\n    \"\\1\\u0122\\12\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\21\\7\"+\n    \"\\1\\u0123\\15\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\5\\7\"+\n    \"\\1\\122\\31\\7\\1\\0\\6\\7\\12\\0\\6\\7\\1\\103\\1\\51\"+\n    \"\\2\\7\\1\\u0124\\1\\7\\1\\u0125\\1\\62\\1\\7\\1\\u0126\\7\\7\"+\n    \"\\1\\61\\17\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\14\\7\"+\n    \"\\1\\u0127\\22\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\21\\7\"+\n    \"\\1\\u0128\\15\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\17\\7\"+\n    \"\\1\\340\\17\\7\\1\\0\\6\\7\\63\\0\\1\\u0129\\16\\0\\7\\7\"+\n    \"\\1\\51\\27\\7\\1\\356\\7\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\27\\7\\1\\u012a\\7\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\23\\7\\1\\u012b\\13\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\15\\7\\1\\266\\21\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\6\\7\\1\\356\\30\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\10\\7\\1\\u012c\\26\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\25\\7\\1\\122\\11\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\5\\7\\1\\u012d\\31\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\7\\7\\1\\340\\27\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\3\\7\\1\\u012e\\33\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\14\\7\\1\\u012f\\22\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\21\\7\\1\\201\\15\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\17\\7\\1\\254\\17\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\21\\7\\1\\u0130\\15\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\5\\7\\1\\u0131\\31\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\15\\7\\1\\u0132\\21\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\21\\7\\1\\u0133\\15\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\3\\7\\1\\340\\3\\7\\1\\u0134\\27\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\3\\7\\1\\340\\33\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\5\\7\\1\\u0135\\31\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\24\\7\\1\\201\\12\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\4\\7\\1\\u0136\\32\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\2\\7\\2\\u0137\\15\\7\\1\\u0138\\15\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\13\\7\\1\\u0139\\23\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\14\\7\\1\\233\\22\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\6\\7\\1\\u013a\\30\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\2\\7\\1\\u013b\\34\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\24\\7\\1\\u0136\\12\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\24\\7\\1\\u013c\\12\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\10\\7\\1\\u013a\\26\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\1\\7\\1\\177\\1\\u0137\"+\n    \"\\5\\7\\1\\u013d\\10\\7\\1\\u0138\\4\\7\\1\\340\\3\\7\\1\\340\"+\n    \"\\4\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\1\\7\\1\\340\"+\n    \"\\35\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\17\\7\\1\\103\"+\n    \"\\17\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\6\\7\\1\\u013e\"+\n    \"\\30\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\15\\7\\1\\u013f\"+\n    \"\\21\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\31\\7\\1\\u0140\"+\n    \"\\5\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\2\\7\\1\\u013b\"+\n    \"\\17\\7\\1\\233\\14\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\7\\7\\1\\u0141\\27\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\14\\7\\1\\340\\22\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\13\\7\\1\\312\\23\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\7\\7\\1\\u0142\\27\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\16\\7\\1\\u0143\\20\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\2\\7\\1\\u0144\\3\\7\\1\\122\\30\\7\\1\\0\\6\\7\\12\\0\"+\n    \"\\7\\7\\1\\51\\5\\7\\1\\u0133\\10\\7\\1\\374\\3\\7\\1\\u0131\"+\n    \"\\14\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\5\\7\\1\\u0145\"+\n    \"\\31\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\2\\7\\1\\u0146\"+\n    \"\\1\\u0147\\33\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\22\\7\"+\n    \"\\1\\u0102\\14\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\1\\7\"+\n    \"\\1\\u0148\\35\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\7\\7\"+\n    \"\\1\\u0149\\27\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\6\\7\"+\n    \"\\1\\u014a\\30\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\10\\7\"+\n    \"\\1\\u014b\\26\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\5\\7\"+\n    \"\\1\\152\\31\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\5\\7\"+\n    \"\\1\\u0102\\2\\7\\1\\u014b\\26\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\4\\7\\1\\u014c\\32\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\16\\7\\1\\u014d\\20\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\30\\7\\1\\u014e\\6\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\6\\7\\1\\u014c\\30\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\6\\7\\1\\u014f\\30\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\3\\7\\1\\201\\33\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\27\\7\\1\\u0150\\7\\7\\1\\0\\6\\7\\12\\0\\6\\7\"+\n    \"\\1\\u0151\\1\\51\\6\\7\\1\\u0152\\30\\7\\1\\0\\6\\7\\12\\0\"+\n    \"\\7\\7\\1\\51\\24\\7\\1\\u0153\\12\\7\\1\\0\\6\\7\\12\\0\"+\n    \"\\7\\7\\1\\51\\10\\7\\1\\u0154\\26\\7\\1\\0\\6\\7\\12\\0\"+\n    \"\\7\\7\\1\\51\\13\\7\\1\\u0151\\23\\7\\1\\0\\6\\7\\12\\0\"+\n    \"\\7\\7\\1\\51\\1\\u0155\\36\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\1\\367\\4\\7\\1\\u0102\\2\\7\\2\\340\\11\\7\\1\\340\"+\n    \"\\13\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\25\\7\\1\\337\"+\n    \"\\11\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\1\\7\\1\\u0156\"+\n    \"\\35\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\17\\7\\1\\u0157\"+\n    \"\\17\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\3\\7\\1\\u0158\"+\n    \"\\33\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\1\\u0102\\36\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\22\\7\\1\\122\\14\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\6\\7\\1\\u0159\\1\\51\\1\\7\\1\\u0117\"+\n    \"\\1\\7\\1\\u015a\\1\\340\\3\\7\\2\\340\\11\\7\\1\\340\\13\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\24\\7\\1\\u015b\\12\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\36\\7\\1\\u015c\\1\\0\"+\n    \"\\6\\7\\12\\0\\7\\7\\1\\51\\22\\7\\1\\u015d\\14\\7\\1\\0\"+\n    \"\\6\\7\\12\\0\\7\\7\\1\\51\\1\\7\\1\\u015e\\1\\7\\1\\u015f\"+\n    \"\\13\\7\\1\\u0160\\17\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\13\\7\\1\\u0161\\23\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\3\\7\\1\\356\\33\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\4\\7\\1\\340\\3\\7\\2\\340\\11\\7\\1\\340\\13\\7\\1\\0\"+\n    \"\\6\\7\\12\\0\\7\\7\\1\\51\\1\\340\\36\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\1\\7\\1\\u0162\\35\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\1\\7\\1\\u0117\\1\\7\\1\\u0117\\1\\340\"+\n    \"\\3\\7\\2\\340\\11\\7\\1\\340\\13\\7\\1\\0\\6\\7\\12\\0\"+\n    \"\\6\\7\\1\\u0163\\1\\51\\37\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\2\\7\\1\\u0164\\11\\7\\1\\u0165\\22\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\1\\7\\1\\175\\1\\202\\4\\7\\1\\177\"+\n    \"\\1\\200\\2\\7\\1\\201\\1\\7\\1\\202\\3\\7\\1\\117\\3\\7\"+\n    \"\\1\\177\\1\\7\\1\\203\\7\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\17\\7\\1\\377\\17\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\1\\u0166\\36\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\10\\7\\2\\340\\11\\7\\1\\340\\13\\7\\1\\0\\6\\7\\12\\0\"+\n    \"\\7\\7\\1\\51\\5\\7\\1\\u0167\\31\\7\\1\\0\\6\\7\\12\\0\"+\n    \"\\7\\7\\1\\51\\13\\7\\1\\u0168\\23\\7\\1\\0\\6\\7\\12\\0\"+\n    \"\\7\\7\\1\\51\\3\\7\\1\\275\\33\\7\\1\\0\\6\\7\\12\\0\"+\n    \"\\7\\7\\1\\51\\1\\7\\1\\u0117\\2\\7\\1\\340\\3\\7\\2\\340\"+\n    \"\\1\\7\\1\\u0166\\7\\7\\1\\340\\13\\7\\1\\0\\6\\7\\12\\0\"+\n    \"\\7\\7\\1\\51\\10\\7\\1\\340\\26\\7\\1\\0\\6\\7\\12\\0\"+\n    \"\\7\\7\\1\\51\\6\\7\\1\\u0169\\12\\7\\1\\u016a\\1\\u0111\\5\\7\"+\n    \"\\1\\u016b\\6\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\15\\7\"+\n    \"\\1\\u016c\\21\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\1\\7\"+\n    \"\\1\\u0117\\1\\7\\1\\u0117\\33\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\30\\7\\1\\u016d\\6\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\3\\7\\1\\u015a\\1\\u016e\\1\\u0166\\1\\7\\1\\u016f\\1\\u0170\"+\n    \"\\1\\u0171\\1\\7\\1\\u0172\\1\\7\\1\\u0173\\1\\u0166\\4\\7\\1\\u0174\"+\n    \"\\1\\7\\1\\u0175\\11\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\10\\7\\2\\340\\25\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\30\\7\\1\\340\\6\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\27\\7\\1\\340\\7\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\1\\7\\1\\u0176\\35\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\10\\7\\2\\340\\11\\7\\1\\340\\1\\u0177\\12\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\13\\7\\1\\u0178\\23\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\1\\7\\1\\u0179\\35\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\3\\7\\1\\304\\33\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\26\\7\\1\\367\\10\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\14\\7\\1\\u017a\\22\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\14\\7\\1\\u017b\\2\\7\\1\\u017c\\17\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\1\\7\\1\\u017d\\35\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\6\\7\\1\\u017e\\30\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\1\\7\\1\\260\\1\\7\"+\n    \"\\1\\260\\33\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\14\\7\"+\n    \"\\1\\u017f\\22\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\7\\7\"+\n    \"\\1\\u0144\\27\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\3\\7\"+\n    \"\\1\\u0144\\33\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\5\\7\"+\n    \"\\1\\u0180\\31\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\13\\7\"+\n    \"\\1\\u0181\\23\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\13\\7\"+\n    \"\\1\\340\\23\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\1\\367\"+\n    \"\\36\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\3\\7\\1\\340\"+\n    \"\\2\\7\\1\\340\\30\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\3\\7\\1\\u0120\\1\\340\\3\\7\\2\\340\\25\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\2\\7\\1\\u0182\\34\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\4\\7\\1\\u0183\\32\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\17\\7\\1\\u0184\\17\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\17\\7\\1\\356\\17\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\21\\7\\1\\304\\15\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\24\\7\\1\\356\\12\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\10\\7\\1\\u0185\\26\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\4\\7\\1\\340\\3\\7\\2\\340\\25\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\6\\7\\1\\340\\1\\7\"+\n    \"\\1\\u0186\\26\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\17\\7\"+\n    \"\\1\\367\\17\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\7\\7\"+\n    \"\\1\\u0187\\27\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\14\\7\"+\n    \"\\1\\u0188\\22\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\15\\7\"+\n    \"\\1\\333\\21\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\11\\7\"+\n    \"\\1\\340\\2\\7\\1\\340\\22\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\14\\7\\1\\u0189\\22\\7\\1\\0\\6\\7\\64\\0\\1\\u018a\"+\n    \"\\15\\0\\7\\7\\1\\51\\22\\7\\1\\u0131\\14\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\16\\7\\1\\u018b\\20\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\21\\7\\1\\u018c\\15\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\24\\7\\1\\u018d\\12\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\17\\7\\1\\u018e\\17\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\5\\7\\1\\u018f\\31\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\7\\7\\1\\u0190\\27\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\24\\7\\1\\u0191\\12\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\6\\7\\1\\340\\1\\51\\37\\7\\1\\0\\6\\7\\12\\0\"+\n    \"\\7\\7\\1\\51\\1\\u0192\\3\\7\\1\\u0192\\1\\7\\1\\u0193\\1\\7\"+\n    \"\\2\\u0192\\10\\7\\1\\u0192\\14\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\10\\7\\1\\201\\26\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\1\\340\\5\\7\\1\\u0192\\1\\7\\2\\340\\2\\7\\1\\u013a\"+\n    \"\\22\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\11\\7\\1\\340\"+\n    \"\\25\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\13\\7\\1\\u0194\"+\n    \"\\23\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\2\\7\\1\\u0195\"+\n    \"\\34\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\1\\340\\5\\7\"+\n    \"\\1\\u0192\\1\\7\\2\\340\\25\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\3\\7\\1\\u0196\\33\\7\\1\\0\\6\\7\\12\\0\\6\\7\"+\n    \"\\1\\u0192\\1\\51\\1\\u0192\\3\\7\\1\\u0192\\1\\7\\1\\u0192\\1\\7\"+\n    \"\\2\\u0192\\12\\7\\1\\u0192\\12\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\13\\7\\1\\u0197\\13\\7\\1\\u0197\\1\\7\\1\\203\\5\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\22\\7\\1\\u0198\\14\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\7\\7\\1\\u0199\\27\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\6\\7\\1\\u019a\\1\\51\\37\\7\\1\\0\"+\n    \"\\6\\7\\12\\0\\7\\7\\1\\51\\32\\7\\1\\340\\4\\7\\1\\0\"+\n    \"\\6\\7\\12\\0\\7\\7\\1\\51\\1\\7\\1\\u019b\\35\\7\\1\\0\"+\n    \"\\6\\7\\12\\0\\7\\7\\1\\51\\4\\7\\1\\u019c\\32\\7\\1\\0\"+\n    \"\\6\\7\\12\\0\\7\\7\\1\\51\\2\\7\\1\\340\\34\\7\\1\\0\"+\n    \"\\6\\7\\12\\0\\7\\7\\1\\51\\2\\7\\1\\u0144\\34\\7\\1\\0\"+\n    \"\\6\\7\\12\\0\\7\\7\\1\\51\\1\\7\\1\\u019d\\35\\7\\1\\0\"+\n    \"\\6\\7\\12\\0\\7\\7\\1\\51\\23\\7\\1\\u019e\\13\\7\\1\\0\"+\n    \"\\6\\7\\12\\0\\7\\7\\1\\51\\21\\7\\1\\u019f\\5\\7\\1\\u01a0\"+\n    \"\\7\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\16\\7\\1\\u01a1\"+\n    \"\\20\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\4\\7\\1\\u0137\"+\n    \"\\32\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\10\\7\\2\\340\"+\n    \"\\3\\7\\1\\340\\5\\7\\1\\340\\13\\7\\1\\0\\6\\7\\12\\0\"+\n    \"\\7\\7\\1\\51\\3\\7\\1\\u0150\\1\\340\\3\\7\\2\\340\\4\\7\"+\n    \"\\1\\u01a2\\4\\7\\1\\340\\13\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\1\\u01a3\\36\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\3\\7\\1\\u01a4\\12\\7\\1\\u01a5\\20\\7\\1\\0\\6\\7\\12\\0\"+\n    \"\\7\\7\\1\\51\\3\\7\\1\\u0150\\1\\340\\3\\7\\2\\340\\1\\7\"+\n    \"\\1\\340\\2\\7\\1\\u01a2\\20\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\4\\7\\1\\340\\4\\7\\1\\340\\25\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\3\\7\\1\\u0137\\12\\7\\1\\u01a6\\20\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\6\\7\\1\\u01a7\\30\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\7\\7\\1\\u01a8\\27\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\10\\7\\1\\u0137\\5\\7\"+\n    \"\\1\\u01a9\\6\\7\\1\\u01aa\\11\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\21\\7\\1\\u01ab\\15\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\2\\7\\1\\u01ac\\34\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\14\\7\\1\\u0137\\22\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\14\\7\\1\\u01ad\\22\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\2\\7\\1\\u01ae\\34\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\3\\7\\2\\340\\1\\7\\1\\340\\1\\7\\2\\340\\11\\7\"+\n    \"\\1\\340\\13\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\10\\7\"+\n    \"\\2\\364\\11\\7\\1\\364\\13\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\31\\7\\1\\u01af\\5\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\3\\7\\1\\u0117\\33\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\3\\7\\1\\u01b0\\2\\7\\1\\u01b1\\1\\7\\1\\u01b2\\26\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\3\\7\\1\\u01b3\\2\\7\"+\n    \"\\1\\u01b4\\1\\7\\1\\u01b5\\12\\7\\1\\u01b5\\13\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\1\\7\\1\\u01b6\\1\\7\\1\\u01b7\\33\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\2\\7\\1\\201\\34\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\27\\7\\1\\260\\7\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\2\\7\\1\\u0109\\34\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\5\\7\\1\\u01b8\\31\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\21\\7\\1\\233\\15\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\1\\7\\1\\u0117\\35\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\1\\7\\1\\u01b9\\35\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\6\\7\\1\\u0102\\30\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\21\\7\\1\\u01ba\\15\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\13\\7\\1\\u01ba\\23\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\21\\7\\1\\u01bb\\15\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\30\\7\\1\\u01bc\\6\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\7\\7\\1\\u01bd\\27\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\10\\7\\2\\u01be\\11\\7\"+\n    \"\\1\\u01be\\13\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\3\\7\"+\n    \"\\1\\u01bf\\33\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\1\\7\"+\n    \"\\1\\u0117\\21\\7\\1\\u01be\\1\\7\\1\\u01c0\\11\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\10\\7\\1\\u01be\\12\\7\\1\\u01be\\13\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\17\\7\\1\\u01c1\\17\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\16\\7\\1\\340\\20\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\10\\7\\1\\340\\4\\7\"+\n    \"\\1\\u01c2\\21\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\1\\7\"+\n    \"\\1\\u0117\\4\\7\\1\\u01c3\\1\\7\\1\\u01c0\\26\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\13\\7\\1\\201\\5\\7\\1\\117\\15\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\21\\7\\1\\367\\15\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\24\\7\\1\\122\\12\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\1\\7\\1\\u01c4\\35\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\5\\7\\1\\u01c5\\31\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\15\\7\\1\\u01c6\\21\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\14\\7\\1\\u01bc\\22\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\10\\7\\1\\u01c7\\26\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\2\\7\\1\\u01c8\\34\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\17\\7\\1\\u010f\\17\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\17\\7\\1\\u01c9\\17\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\6\\7\\1\\377\\30\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\30\\7\\1\\u01ca\\6\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\3\\7\\1\\u01cb\\33\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\4\\7\\1\\340\\3\\7\"+\n    \"\\2\\340\\11\\7\\1\\340\\12\\7\\1\\117\\1\\0\\6\\7\\12\\0\"+\n    \"\\7\\7\\1\\51\\1\\7\\1\\u0104\\35\\7\\1\\0\\6\\7\\12\\0\"+\n    \"\\7\\7\\1\\51\\1\\7\\1\\u01cc\\35\\7\\1\\0\\6\\7\\12\\0\"+\n    \"\\7\\7\\1\\51\\15\\7\\1\\u01cd\\21\\7\\1\\0\\6\\7\\12\\0\"+\n    \"\\7\\7\\1\\51\\15\\7\\1\\u01ce\\21\\7\\1\\0\\6\\7\\65\\0\"+\n    \"\\1\\u01cf\\14\\0\\7\\7\\1\\51\\22\\7\\1\\u01d0\\14\\7\\1\\0\"+\n    \"\\6\\7\\12\\0\\7\\7\\1\\51\\5\\7\\1\\330\\31\\7\\1\\0\"+\n    \"\\6\\7\\12\\0\\7\\7\\1\\51\\21\\7\\1\\u01d1\\15\\7\\1\\0\"+\n    \"\\6\\7\\12\\0\\7\\7\\1\\51\\15\\7\\1\\u01d2\\21\\7\\1\\0\"+\n    \"\\6\\7\\12\\0\\7\\7\\1\\51\\2\\7\\1\\233\\34\\7\\1\\0\"+\n    \"\\6\\7\\12\\0\\7\\7\\1\\51\\2\\7\\1\\202\\5\\7\\1\\260\"+\n    \"\\2\\7\\1\\u01d3\\2\\7\\1\\u0131\\2\\7\\1\\117\\3\\7\\1\\177\"+\n    \"\\11\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\1\\7\\1\\u0192\"+\n    \"\\35\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\24\\7\\1\\340\"+\n    \"\\12\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\15\\7\\1\\260\"+\n    \"\\21\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\17\\7\\1\\275\"+\n    \"\\17\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\31\\7\\1\\340\"+\n    \"\\5\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\13\\7\\1\\233\"+\n    \"\\23\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\1\\7\\1\\u0192\"+\n    \"\\20\\7\\1\\u0192\\14\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\1\\7\\1\\u0141\\35\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\21\\7\\1\\117\\5\\7\\1\\203\\7\\7\\1\\0\\6\\7\\12\\0\"+\n    \"\\7\\7\\1\\51\\22\\7\\1\\u01d4\\14\\7\\1\\0\\6\\7\\12\\0\"+\n    \"\\7\\7\\1\\51\\14\\7\\1\\233\\5\\7\\1\\u01d5\\14\\7\\1\\0\"+\n    \"\\6\\7\\12\\0\\7\\7\\1\\51\\23\\7\\1\\u0120\\13\\7\\1\\0\"+\n    \"\\6\\7\\12\\0\\7\\7\\1\\51\\17\\7\\1\\u0120\\17\\7\\1\\0\"+\n    \"\\6\\7\\12\\0\\7\\7\\1\\51\\10\\7\\1\\u01d6\\26\\7\\1\\0\"+\n    \"\\6\\7\\12\\0\\7\\7\\1\\51\\3\\7\\1\\u0150\\33\\7\\1\\0\"+\n    \"\\6\\7\\12\\0\\7\\7\\1\\51\\4\\7\\1\\340\\1\\7\\1\\340\"+\n    \"\\1\\7\\1\\u01d7\\1\\340\\13\\7\\1\\u0137\\11\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\3\\7\\1\\u01d8\\33\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\3\\7\\1\\u01d9\\33\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\4\\7\\1\\340\\32\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\11\\7\\1\\374\\25\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\3\\7\\1\\u01da\\33\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\10\\7\\1\\117\\26\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\11\\7\\1\\340\\2\\7\\1\\u0137\\1\\7\"+\n    \"\\1\\u0137\\20\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\17\\7\"+\n    \"\\1\\u01db\\17\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\30\\7\"+\n    \"\\1\\u01dc\\6\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\6\\7\"+\n    \"\\1\\340\\2\\7\\1\\340\\11\\7\\1\\340\\13\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\25\\7\\1\\u01dd\\11\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\4\\7\\1\\340\\16\\7\\1\\340\\13\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\31\\7\\1\\u01de\\5\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\31\\7\\1\\u01df\\5\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\31\\7\\1\\u0166\\5\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\31\\7\\1\\u01e0\\5\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\31\\7\\1\\u01e1\\5\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\31\\7\\1\\u015d\\5\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\3\\7\\1\\u01e2\\2\\7\"+\n    \"\\1\\u01e2\\30\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\3\\7\"+\n    \"\\1\\u01e3\\2\\7\\1\\u01e3\\30\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\10\\7\\1\\374\\26\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\10\\7\\1\\340\\12\\7\\1\\340\\13\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\2\\7\\1\\u01e4\\34\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\20\\7\\1\\u01e5\\16\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\15\\7\\1\\u01e6\\21\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\3\\7\\1\\u0133\\22\\7\\1\\u0133\\10\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\30\\7\\1\\u0166\\6\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\1\\7\\1\\260\\35\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\1\\7\\1\\u0117\\13\\7\"+\n    \"\\1\\340\\4\\7\\1\\u01b9\\1\\340\\1\\7\\1\\122\\11\\7\\1\\0\"+\n    \"\\6\\7\\12\\0\\7\\7\\1\\51\\26\\7\\1\\u0133\\10\\7\\1\\0\"+\n    \"\\6\\7\\12\\0\\7\\7\\1\\51\\5\\7\\1\\340\\10\\7\\1\\340\"+\n    \"\\20\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\21\\7\\1\\u017c\"+\n    \"\\15\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\7\\7\\1\\u01e7\"+\n    \"\\27\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\1\\u01bc\\36\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\22\\7\\1\\u01e8\\14\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\17\\7\\1\\u01e9\\17\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\5\\7\\1\\u01bc\\31\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\10\\7\\1\\u0166\\14\\7\"+\n    \"\\1\\u0166\\11\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\3\\7\"+\n    \"\\1\\u01bc\\33\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\21\\7\"+\n    \"\\1\\u01ea\\15\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\5\\7\"+\n    \"\\1\\u01eb\\31\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\16\\7\"+\n    \"\\1\\u01ec\\20\\7\\1\\0\\6\\7\\66\\0\\1\\u01ed\\13\\0\\7\\7\"+\n    \"\\1\\51\\14\\7\\1\\201\\22\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\34\\7\\1\\u01ee\\2\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\14\\7\\1\\u01d1\\22\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\16\\7\\1\\340\\2\\7\\1\\340\\15\\7\\1\\0\\6\\7\"+\n    \"\\12\\0\\7\\7\\1\\51\\17\\7\\1\\u0141\\11\\7\\1\\233\\5\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\17\\7\\1\\u0141\\17\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\23\\7\\1\\u01ef\\13\\7\"+\n    \"\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\10\\7\\1\\u0137\\1\\u01a6\"+\n    \"\\25\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\11\\7\\1\\u01a6\"+\n    \"\\25\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\30\\7\\1\\u01a6\"+\n    \"\\6\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\2\\7\\1\\u01f0\"+\n    \"\\34\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\10\\7\\1\\u01f1\"+\n    \"\\14\\7\\1\\u01f1\\11\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\27\\7\\1\\u01f2\\7\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\1\\7\\1\\u01f3\\35\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\1\\7\\1\\u01f4\\35\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\3\\7\\1\\u01f5\\33\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\3\\7\\1\\u01f6\\33\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\31\\7\\1\\152\\5\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\31\\7\\1\\u01f7\\5\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\10\\7\\1\\u01f8\\26\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\27\\7\\1\\u01f9\\7\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\24\\7\\1\\u01fa\\12\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\21\\7\\1\\u01bc\\15\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\17\\7\\1\\u01bc\\17\\7\\1\\0\\6\\7\\12\\0\\6\\7\\1\\u01e8\"+\n    \"\\1\\51\\37\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\23\\7\"+\n    \"\\1\\u01a6\\13\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\6\\7\"+\n    \"\\1\\u01fb\\30\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\1\\7\"+\n    \"\\1\\u01fc\\35\\7\\1\\0\\6\\7\\67\\0\\1\\u01fd\\12\\0\\7\\7\"+\n    \"\\1\\51\\35\\7\\1\\340\\1\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\6\\7\\1\\117\\30\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\25\\7\\1\\u01fe\\11\\7\\1\\0\\6\\7\\12\\0\\7\\7\"+\n    \"\\1\\51\\4\\7\\1\\u0137\\3\\7\\1\\117\\1\\374\\11\\7\\1\\u01ef\"+\n    \"\\13\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\4\\7\\1\\340\"+\n    \"\\3\\7\\2\\340\\11\\7\\1\\340\\7\\7\\1\\u01a6\\3\\7\\1\\0\"+\n    \"\\6\\7\\12\\0\\7\\7\\1\\51\\6\\7\\1\\340\\1\\7\\1\\340\"+\n    \"\\26\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\3\\7\\1\\340\"+\n    \"\\4\\7\\1\\340\\26\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\6\\7\\1\\340\\1\\7\\1\\340\\12\\7\\1\\340\\13\\7\\1\\0\"+\n    \"\\6\\7\\12\\0\\7\\7\\1\\51\\3\\7\\1\\340\\4\\7\\1\\340\"+\n    \"\\12\\7\\1\\340\\13\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\3\\7\\1\\u01b9\\33\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\5\\7\\1\\77\\31\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\21\\7\\1\\u01ff\\15\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\"+\n    \"\\15\\7\\1\\u0200\\5\\7\\1\\340\\13\\7\\1\\0\\6\\7\\12\\0\"+\n    \"\\7\\7\\1\\51\\2\\7\\1\\u0201\\34\\7\\1\\0\\6\\7\\12\\0\"+\n    \"\\7\\7\\1\\51\\1\\7\\1\\u011d\\35\\7\\1\\0\\6\\7\\12\\0\"+\n    \"\\7\\7\\1\\51\\13\\7\\1\\u0202\\3\\7\\1\\u0203\\17\\7\\1\\0\"+\n    \"\\6\\7\\12\\0\\7\\7\\1\\51\\13\\7\\1\\u0204\\23\\7\\1\\0\"+\n    \"\\6\\7\\12\\0\\7\\7\\1\\51\\5\\7\\1\\u0205\\31\\7\\1\\0\"+\n    \"\\6\\7\\12\\0\\7\\7\\1\\51\\17\\7\\1\\u0206\\17\\7\\1\\0\"+\n    \"\\6\\7\\12\\0\\4\\7\\1\\340\\2\\7\\1\\51\\31\\7\\2\\340\"+\n    \"\\4\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\5\\7\\1\\u0207\"+\n    \"\\31\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\3\\7\\1\\u0208\"+\n    \"\\33\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\5\\7\\1\\340\"+\n    \"\\31\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\3\\7\\1\\u0209\"+\n    \"\\33\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\17\\7\\1\\u01a6\"+\n    \"\\17\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\3\\7\\1\\u020a\"+\n    \"\\33\\7\\1\\0\\6\\7\\12\\0\\7\\7\\1\\51\\22\\7\\1\\77\"+\n    \"\\14\\7\\1\\0\\6\\7\\4\\0\";\n\n  private static int [] zzUnpackTrans() {\n    int [] result = new int[28000];\n    int offset = 0;\n    offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);\n    return result;\n  }\n\n  private static int zzUnpackTrans(String packed, int offset, int [] result) {\n    int i = 0;       /* index in packed string  */\n    int j = offset;  /* index in unpacked array */\n    int l = packed.length();\n    while (i < l) {\n      int count = packed.charAt(i++);\n      int value = packed.charAt(i++);\n      value--;\n      do result[j++] = value; while (--count > 0);\n    }\n    return j;\n  }\n\n\n  /* error codes */\n  private static final int ZZ_UNKNOWN_ERROR = 0;\n  private static final int ZZ_NO_MATCH = 1;\n  private static final int ZZ_PUSHBACK_2BIG = 2;\n  private static final char[] EMPTY_BUFFER = new char[0];\n  private static final int YYEOF = -1;\n  private static Reader zzReader; // Fake\n\n  /* error messages for the codes above */\n  private static final String ZZ_ERROR_MSG[] = {\n    \"Unkown internal scanner error\",\n    \"Error: could not match input\",\n    \"Error: pushback value was too large\"\n  };\n\n  /**\n   * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>\n   */\n  private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();\n\n  private static final String ZZ_ATTRIBUTE_PACKED_0 =\n    \"\\1\\0\\1\\11\\1\\1\\1\\11\\6\\1\\1\\11\\26\\1\\4\\11\"+\n    \"\\1\\1\\1\\0\\2\\11\\1\\0\\161\\1\\1\\0\\214\\1\\1\\0\"+\n    \"\\140\\1\\1\\0\\104\\1\\1\\0\\35\\1\\1\\0\\17\\1\\1\\11\"+\n    \"\\15\\1\";\n\n  private static int [] zzUnpackAttribute() {\n    int [] result = new int[522];\n    int offset = 0;\n    offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);\n    return result;\n  }\n\n  private static int zzUnpackAttribute(String packed, int offset, int [] result) {\n    int i = 0;       /* index in packed string  */\n    int j = offset;  /* index in unpacked array */\n    int l = packed.length();\n    while (i < l) {\n      int count = packed.charAt(i++);\n      int value = packed.charAt(i++);\n      do result[j++] = value; while (--count > 0);\n    }\n    return j;\n  }\n\n  /** the current state of the DFA */\n  private int zzState;\n\n  /** the current lexical state */\n  private int zzLexicalState = YYINITIAL;\n\n  /** this buffer contains the current text to be matched and is\n      the source of the yytext() string */\n  private CharSequence zzBuffer = \"\";\n\n  /** this buffer may contains the current text array to be matched when it is cheap to acquire it */\n  private char[] zzBufferArray;\n\n  /** the textposition at the last accepting state */\n  private int zzMarkedPos;\n\n  /** the textposition at the last state to be included in yytext */\n  private int zzPushbackPos;\n\n  /** the current text position in the buffer */\n  private int zzCurrentPos;\n\n  /** startRead marks the beginning of the yytext() string in the buffer */\n  private int zzStartRead;\n\n  /** endRead marks the last character in the buffer, that has been read\n      from input */\n  private int zzEndRead;\n\n  /**\n   * zzAtBOL == true <=> the scanner is currently at the beginning of a line\n   */\n  private boolean zzAtBOL = true;\n\n  /** zzAtEOF == true <=> the scanner is at the EOF */\n  private boolean zzAtEOF;\n\n  /* user code: */\n  public _AsmIntelLexer() {\n    this(null);\n  }\n\n\n  /**\n   * Creates a new scanner\n   *\n   * @param   in  the java.io.Reader to read input from.\n   */\n  public _AsmIntelLexer(Reader in) {\n    zzReader = in;\n  }\n\n\n  /** \n   * Unpacks the compressed character translation table.\n   *\n   * @param packed   the packed character translation table\n   * @return         the unpacked character translation table\n   */\n  private static char [] zzUnpackCMap(String packed) {\n    char [] map = new char[0x10000];\n    int i = 0;  /* index in packed string  */\n    int j = 0;  /* index in unpacked array */\n    while (i < 1734) {\n      int  count = packed.charAt(i++);\n      char value = packed.charAt(i++);\n      do map[j++] = value; while (--count > 0);\n    }\n    return map;\n  }\n\n  @Override\n  public final int getTokenStart(){\n    return zzStartRead;\n  }\n\n  @Override\n  public final int getTokenEnd(){\n    return getTokenStart() + yylength();\n  }\n\n  @Override\n  public void reset(CharSequence buffer, int start, int end, int initialState){\n    zzBuffer = buffer;\n    zzBufferArray = CharArrayUtil.fromSequenceWithoutCopying(buffer);\n    zzCurrentPos = zzMarkedPos = zzStartRead = start;\n    zzPushbackPos = 0;\n    zzAtEOF  = false;\n    zzAtBOL = true;\n    zzEndRead = end;\n    yybegin(initialState);\n  }\n\n  /**\n   * Refills the input buffer.\n   *\n   * @return      <code>false</code>, iff there was new input.\n   *\n   * @exception   IOException  if any I/O-Error occurs\n   */\n  private boolean zzRefill() throws IOException {\n    return true;\n  }\n\n\n  /**\n   * Returns the current lexical state.\n   */\n  @Override\n  public final int yystate() {\n    return zzLexicalState;\n  }\n\n\n  /**\n   * Enters a new lexical state\n   *\n   * @param newState the new lexical state\n   */\n  @Override\n  public final void yybegin(int newState) {\n    zzLexicalState = newState;\n  }\n\n\n  /**\n   * Returns the text matched by the current regular expression.\n   */\n  public final CharSequence yytext() {\n    return zzBuffer.subSequence(zzStartRead, zzMarkedPos);\n  }\n\n\n  /**\n   * Returns the character at position <tt>pos</tt> from the\n   * matched text.\n   *\n   * It is equivalent to yytext().charAt(pos), but faster\n   *\n   * @param pos the position of the character to fetch.\n   *            A value from 0 to yylength()-1.\n   *\n   * @return the character at position pos\n   */\n  public final char yycharat(int pos) {\n    return zzBufferArray != null ? zzBufferArray[zzStartRead+pos]:zzBuffer.charAt(zzStartRead+pos);\n  }\n\n\n  /**\n   * Returns the length of the matched text region.\n   */\n  public final int yylength() {\n    return zzMarkedPos-zzStartRead;\n  }\n\n\n  /**\n   * Reports an error that occured while scanning.\n   *\n   * In a wellformed scanner (no or only correct usage of\n   * yypushback(int) and a match-all fallback rule) this method\n   * will only be called with things that \"Can't Possibly Happen\".\n   * If this method is called, something is seriously wrong\n   * (e.g. a JFlex bug producing a faulty scanner etc.).\n   *\n   * Usual syntax/scanner level error handling should be done\n   * in error fallback rules.\n   *\n   * @param   errorCode  the code of the errormessage to display\n   */\n  private void zzScanError(int errorCode) {\n    String message;\n    try {\n      message = ZZ_ERROR_MSG[errorCode];\n    }\n    catch (ArrayIndexOutOfBoundsException e) {\n      message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];\n    }\n\n    throw new Error(message);\n  }\n\n\n  /**\n   * Pushes the specified amount of characters back into the input stream.\n   *\n   * They will be read again by then next call of the scanning method\n   *\n   * @param number  the number of characters to be read again.\n   *                This number must not be greater than yylength()!\n   */\n  public void yypushback(int number)  {\n    if ( number > yylength() )\n      zzScanError(ZZ_PUSHBACK_2BIG);\n\n    zzMarkedPos -= number;\n  }\n\n\n  /**\n   * Resumes scanning until the next regular expression is matched,\n   * the end of input is encountered or an I/O-Error occurs.\n   *\n   * @return      the next token\n   * @exception   IOException  if any I/O-Error occurs\n   */\n  @Override\n  public IElementType advance() throws IOException {\n    int zzInput;\n    int zzAction;\n\n    // cached fields:\n    int zzCurrentPosL;\n    int zzMarkedPosL;\n    int zzEndReadL = zzEndRead;\n    CharSequence zzBufferL = zzBuffer;\n    char[] zzBufferArrayL = zzBufferArray;\n    char [] zzCMapL = ZZ_CMAP;\n\n    int [] zzTransL = ZZ_TRANS;\n    int [] zzRowMapL = ZZ_ROWMAP;\n    int [] zzAttrL = ZZ_ATTRIBUTE;\n\n    while (true) {\n      zzMarkedPosL = zzMarkedPos;\n\n      zzAction = -1;\n\n      zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;\n\n      zzState = ZZ_LEXSTATE[zzLexicalState];\n\n\n      zzForAction: {\n        while (true) {\n\n          if (zzCurrentPosL < zzEndReadL)\n            zzInput = zzBufferArrayL != null ? zzBufferArrayL[zzCurrentPosL++] : zzBufferL.charAt(zzCurrentPosL++);\n          else if (zzAtEOF) {\n            zzInput = YYEOF;\n            break zzForAction;\n          }\n          else {\n            // store back cached positions\n            zzCurrentPos  = zzCurrentPosL;\n            zzMarkedPos   = zzMarkedPosL;\n            boolean eof = zzRefill();\n            // get translated positions and possibly new buffer\n            zzCurrentPosL  = zzCurrentPos;\n            zzMarkedPosL   = zzMarkedPos;\n            zzBufferL      = zzBuffer;\n            zzEndReadL     = zzEndRead;\n            if (eof) {\n              zzInput = YYEOF;\n              break zzForAction;\n            }\n            else {\n              zzInput = zzBufferArrayL != null ? zzBufferArrayL[zzCurrentPosL++] : zzBufferL.charAt(zzCurrentPosL++);\n            }\n          }\n          int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ];\n          if (zzNext == -1) break zzForAction;\n          zzState = zzNext;\n\n          int zzAttributes = zzAttrL[zzState];\n          if ( (zzAttributes & 1) == 1 ) {\n            zzAction = zzState;\n            zzMarkedPosL = zzCurrentPosL;\n            if ( (zzAttributes & 8) == 8 ) break zzForAction;\n          }\n\n        }\n      }\n\n      // store back cached position\n      zzMarkedPos = zzMarkedPosL;\n\n      switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {\n        case 17:\n          return FLAG;\n        case 19: break;\n        case 8:\n          return COMMA;\n        case 20: break;\n        case 4:\n          return INT;\n        case 21: break;\n        case 10:\n          return LINE_COMMENT;\n        case 22: break;\n        case 3:\n          return IDENTIFIER;\n        case 23: break;\n        case 12:\n          return LABEL;\n        case 24: break;\n        case 1:\n          return TokenType.BAD_CHARACTER;\n        case 25: break;\n        case 14:\n          return HEX;\n        case 26: break;\n        case 2:\n          return TokenType.WHITE_SPACE;\n        case 27: break;\n        case 5:\n          return COLON;\n        case 28: break;\n        case 6:\n          return LPAREN;\n        case 29: break;\n        case 7:\n          return RPAREN;\n        case 30: break;\n        case 16:\n          return TEXT;\n        case 31: break;\n        case 11:\n          return STRING;\n        case 32: break;\n        case 9:\n          return BIT_OR;\n        case 33: break;\n        case 18:\n          return IMPORT;\n        case 34: break;\n        case 15:\n          return INSTRUCTION;\n        case 35: break;\n        case 13:\n          return PSEUDO_REG;\n        case 36: break;\n        default:\n          if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {\n            zzAtEOF = true;\n            return null;\n          }\n          else {\n            zzScanError(ZZ_NO_MATCH);\n          }\n      }\n    }\n  }\n\n\n}\n"
  },
  {
    "path": "plan9/gen/com/plan9/intel/lang/core/parser/AsmIntelParser.java",
    "content": "// This is a generated file. Not intended for manual editing.\npackage com.plan9.intel.lang.core.parser;\n\nimport com.intellij.lang.PsiBuilder;\nimport com.intellij.lang.PsiBuilder.Marker;\nimport static com.plan9.intel.lang.core.psi.AsmIntelTypes.*;\nimport static com.intellij.lang.parser.GeneratedParserUtilBase.*;\nimport com.intellij.psi.tree.IElementType;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.tree.TokenSet;\nimport com.intellij.lang.PsiParser;\nimport com.intellij.lang.LightPsiParser;\n\n@SuppressWarnings({\"SimplifiableIfStatement\", \"UnusedAssignment\"})\npublic class AsmIntelParser implements PsiParser, LightPsiParser {\n\n  public ASTNode parse(IElementType t, PsiBuilder b) {\n    parseLight(t, b);\n    return b.getTreeBuilt();\n  }\n\n  public void parseLight(IElementType t, PsiBuilder b) {\n    boolean r;\n    b = adapt_builder_(t, b, this, null);\n    Marker m = enter_section_(b, 0, _COLLAPSE_, null);\n    if (t == FRAME_SIZE) {\n      r = FrameSize(b, 0);\n    }\n    else if (t == FUNCTION) {\n      r = Function(b, 0);\n    }\n    else if (t == FUNCTION_BODY) {\n      r = FunctionBody(b, 0);\n    }\n    else if (t == FUNCTION_FLAGS) {\n      r = FunctionFlags(b, 0);\n    }\n    else if (t == FUNCTION_HEADER) {\n      r = FunctionHeader(b, 0);\n    }\n    else if (t == INSTRUCTION_STMT) {\n      r = InstructionStmt(b, 0);\n    }\n    else if (t == LITERAL) {\n      r = Literal(b, 0);\n    }\n    else if (t == OPERANDS) {\n      r = Operands(b, 0);\n    }\n    else if (t == PREPROCESSOR_DIRECTIVE) {\n      r = PreprocessorDirective(b, 0);\n    }\n    else if (t == STATEMENT) {\n      r = Statement(b, 0);\n    }\n    else {\n      r = parse_root_(t, b, 0);\n    }\n    exit_section_(b, 0, m, t, r, true, TRUE_CONDITION);\n  }\n\n  protected boolean parse_root_(IElementType t, PsiBuilder b, int l) {\n    return File(b, l + 1);\n  }\n\n  /* ********************************************************** */\n  // Statement*\n  static boolean File(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"File\")) return false;\n    int c = current_position_(b);\n    while (true) {\n      if (!Statement(b, l + 1)) break;\n      if (!empty_element_parsed_guard_(b, \"File\", c)) break;\n      c = current_position_(b);\n    }\n    return true;\n  }\n\n  /* ********************************************************** */\n  // '$' Literal ['-' Literal]\n  public static boolean FrameSize(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"FrameSize\")) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _NONE_, FRAME_SIZE, \"<frame size>\");\n    r = consumeToken(b, \"$\");\n    r = r && Literal(b, l + 1);\n    r = r && FrameSize_2(b, l + 1);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  // ['-' Literal]\n  private static boolean FrameSize_2(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"FrameSize_2\")) return false;\n    FrameSize_2_0(b, l + 1);\n    return true;\n  }\n\n  // '-' Literal\n  private static boolean FrameSize_2_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"FrameSize_2_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = consumeToken(b, \"-\");\n    r = r && Literal(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // FunctionHeader FunctionBody\n  public static boolean Function(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"Function\")) return false;\n    if (!nextTokenIs(b, TEXT)) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = FunctionHeader(b, l + 1);\n    r = r && FunctionBody(b, l + 1);\n    exit_section_(b, m, FUNCTION, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // ( InstructionStmt | LABEL )*\n  public static boolean FunctionBody(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"FunctionBody\")) return false;\n    Marker m = enter_section_(b, l, _NONE_, FUNCTION_BODY, \"<function body>\");\n    int c = current_position_(b);\n    while (true) {\n      if (!FunctionBody_0(b, l + 1)) break;\n      if (!empty_element_parsed_guard_(b, \"FunctionBody\", c)) break;\n      c = current_position_(b);\n    }\n    exit_section_(b, l, m, true, false, null);\n    return true;\n  }\n\n  // InstructionStmt | LABEL\n  private static boolean FunctionBody_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"FunctionBody_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = InstructionStmt(b, l + 1);\n    if (!r) r = consumeToken(b, LABEL);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // FLAG | '(' FLAG ( '|' FLAG )* ')'\n  public static boolean FunctionFlags(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"FunctionFlags\")) return false;\n    if (!nextTokenIs(b, \"<function flags>\", LPAREN, FLAG)) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _NONE_, FUNCTION_FLAGS, \"<function flags>\");\n    r = consumeToken(b, FLAG);\n    if (!r) r = FunctionFlags_1(b, l + 1);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  // '(' FLAG ( '|' FLAG )* ')'\n  private static boolean FunctionFlags_1(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"FunctionFlags_1\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = consumeToken(b, LPAREN);\n    r = r && consumeToken(b, FLAG);\n    r = r && FunctionFlags_1_2(b, l + 1);\n    r = r && consumeToken(b, RPAREN);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  // ( '|' FLAG )*\n  private static boolean FunctionFlags_1_2(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"FunctionFlags_1_2\")) return false;\n    int c = current_position_(b);\n    while (true) {\n      if (!FunctionFlags_1_2_0(b, l + 1)) break;\n      if (!empty_element_parsed_guard_(b, \"FunctionFlags_1_2\", c)) break;\n      c = current_position_(b);\n    }\n    return true;\n  }\n\n  // '|' FLAG\n  private static boolean FunctionFlags_1_2_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"FunctionFlags_1_2_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = consumeToken(b, BIT_OR);\n    r = r && consumeToken(b, FLAG);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // TEXT identifier '(' PSEUDO_REG ')' ',' FunctionFlags [',' FrameSize]\n  public static boolean FunctionHeader(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"FunctionHeader\")) return false;\n    if (!nextTokenIs(b, TEXT)) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = consumeTokens(b, 0, TEXT, IDENTIFIER);\n    r = r && consumeToken(b, LPAREN);\n    r = r && consumeToken(b, PSEUDO_REG);\n    r = r && consumeToken(b, RPAREN);\n    r = r && consumeToken(b, COMMA);\n    r = r && FunctionFlags(b, l + 1);\n    r = r && FunctionHeader_7(b, l + 1);\n    exit_section_(b, m, FUNCTION_HEADER, r);\n    return r;\n  }\n\n  // [',' FrameSize]\n  private static boolean FunctionHeader_7(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"FunctionHeader_7\")) return false;\n    FunctionHeader_7_0(b, l + 1);\n    return true;\n  }\n\n  // ',' FrameSize\n  private static boolean FunctionHeader_7_0(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"FunctionHeader_7_0\")) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = consumeToken(b, COMMA);\n    r = r && FrameSize(b, l + 1);\n    exit_section_(b, m, null, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // INSTRUCTION Operands\n  public static boolean InstructionStmt(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"InstructionStmt\")) return false;\n    if (!nextTokenIs(b, INSTRUCTION)) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = consumeToken(b, INSTRUCTION);\n    r = r && Operands(b, l + 1);\n    exit_section_(b, m, INSTRUCTION_STMT, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // int | hex\n  public static boolean Literal(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"Literal\")) return false;\n    if (!nextTokenIs(b, \"<literal>\", HEX, INT)) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _NONE_, LITERAL, \"<literal>\");\n    r = consumeToken(b, INT);\n    if (!r) r = consumeToken(b, HEX);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n  /* ********************************************************** */\n  public static boolean Operands(PsiBuilder b, int l) {\n    Marker m = enter_section_(b);\n    exit_section_(b, m, OPERANDS, true);\n    return true;\n  }\n\n  /* ********************************************************** */\n  // import STRING\n  public static boolean PreprocessorDirective(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"PreprocessorDirective\")) return false;\n    if (!nextTokenIs(b, IMPORT)) return false;\n    boolean r;\n    Marker m = enter_section_(b);\n    r = consumeTokens(b, 0, IMPORT, STRING);\n    exit_section_(b, m, PREPROCESSOR_DIRECTIVE, r);\n    return r;\n  }\n\n  /* ********************************************************** */\n  // PreprocessorDirective | Function\n  public static boolean Statement(PsiBuilder b, int l) {\n    if (!recursion_guard_(b, l, \"Statement\")) return false;\n    if (!nextTokenIs(b, \"<statement>\", TEXT, IMPORT)) return false;\n    boolean r;\n    Marker m = enter_section_(b, l, _NONE_, STATEMENT, \"<statement>\");\n    r = PreprocessorDirective(b, l + 1);\n    if (!r) r = Function(b, l + 1);\n    exit_section_(b, l, m, r, false, null);\n    return r;\n  }\n\n}\n"
  },
  {
    "path": "plan9/gen/com/plan9/intel/lang/core/psi/AsmIntelFrameSize.java",
    "content": "// This is a generated file. Not intended for manual editing.\npackage com.plan9.intel.lang.core.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface AsmIntelFrameSize extends PsiElement {\n\n  @NotNull\n  List<AsmIntelLiteral> getLiteralList();\n\n}\n"
  },
  {
    "path": "plan9/gen/com/plan9/intel/lang/core/psi/AsmIntelFunction.java",
    "content": "// This is a generated file. Not intended for manual editing.\npackage com.plan9.intel.lang.core.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface AsmIntelFunction extends PsiElement {\n\n  @NotNull\n  AsmIntelFunctionBody getFunctionBody();\n\n  @NotNull\n  AsmIntelFunctionHeader getFunctionHeader();\n\n}\n"
  },
  {
    "path": "plan9/gen/com/plan9/intel/lang/core/psi/AsmIntelFunctionBody.java",
    "content": "// This is a generated file. Not intended for manual editing.\npackage com.plan9.intel.lang.core.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface AsmIntelFunctionBody extends PsiElement {\n\n  @NotNull\n  List<AsmIntelInstructionStmt> getInstructionStmtList();\n\n}\n"
  },
  {
    "path": "plan9/gen/com/plan9/intel/lang/core/psi/AsmIntelFunctionFlags.java",
    "content": "// This is a generated file. Not intended for manual editing.\npackage com.plan9.intel.lang.core.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface AsmIntelFunctionFlags extends PsiElement {\n\n}\n"
  },
  {
    "path": "plan9/gen/com/plan9/intel/lang/core/psi/AsmIntelFunctionHeader.java",
    "content": "// This is a generated file. Not intended for manual editing.\npackage com.plan9.intel.lang.core.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface AsmIntelFunctionHeader extends PsiElement {\n\n  @Nullable\n  AsmIntelFrameSize getFrameSize();\n\n  @NotNull\n  AsmIntelFunctionFlags getFunctionFlags();\n\n}\n"
  },
  {
    "path": "plan9/gen/com/plan9/intel/lang/core/psi/AsmIntelInstructionStmt.java",
    "content": "// This is a generated file. Not intended for manual editing.\npackage com.plan9.intel.lang.core.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface AsmIntelInstructionStmt extends PsiElement {\n\n  @NotNull\n  AsmIntelOperands getOperands();\n\n}\n"
  },
  {
    "path": "plan9/gen/com/plan9/intel/lang/core/psi/AsmIntelLiteral.java",
    "content": "// This is a generated file. Not intended for manual editing.\npackage com.plan9.intel.lang.core.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface AsmIntelLiteral extends PsiElement {\n\n}\n"
  },
  {
    "path": "plan9/gen/com/plan9/intel/lang/core/psi/AsmIntelOperands.java",
    "content": "// This is a generated file. Not intended for manual editing.\npackage com.plan9.intel.lang.core.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface AsmIntelOperands extends PsiElement {\n\n}\n"
  },
  {
    "path": "plan9/gen/com/plan9/intel/lang/core/psi/AsmIntelPreprocessorDirective.java",
    "content": "// This is a generated file. Not intended for manual editing.\npackage com.plan9.intel.lang.core.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface AsmIntelPreprocessorDirective extends PsiElement {\n\n}\n"
  },
  {
    "path": "plan9/gen/com/plan9/intel/lang/core/psi/AsmIntelStatement.java",
    "content": "// This is a generated file. Not intended for manual editing.\npackage com.plan9.intel.lang.core.psi;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElement;\n\npublic interface AsmIntelStatement extends PsiElement {\n\n  @Nullable\n  AsmIntelFunction getFunction();\n\n  @Nullable\n  AsmIntelPreprocessorDirective getPreprocessorDirective();\n\n}\n"
  },
  {
    "path": "plan9/gen/com/plan9/intel/lang/core/psi/AsmIntelTypes.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This is a generated file. Not intended for manual editing.\npackage com.plan9.intel.lang.core.psi;\n\nimport com.intellij.psi.tree.IElementType;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.lang.ASTNode;\nimport com.plan9.intel.lang.core.lexer.AsmIntelTokenType;\nimport com.plan9.intel.lang.core.psi.impl.*;\n\npublic interface AsmIntelTypes {\n\n  IElementType FRAME_SIZE = new AsmIntelElementType(\"FRAME_SIZE\");\n  IElementType FUNCTION = new AsmIntelElementType(\"FUNCTION\");\n  IElementType FUNCTION_BODY = new AsmIntelElementType(\"FUNCTION_BODY\");\n  IElementType FUNCTION_FLAGS = new AsmIntelElementType(\"FUNCTION_FLAGS\");\n  IElementType FUNCTION_HEADER = new AsmIntelElementType(\"FUNCTION_HEADER\");\n  IElementType INSTRUCTION_STMT = new AsmIntelElementType(\"INSTRUCTION_STMT\");\n  IElementType LITERAL = new AsmIntelElementType(\"LITERAL\");\n  IElementType OPERANDS = new AsmIntelElementType(\"OPERANDS\");\n  IElementType PREPROCESSOR_DIRECTIVE = new AsmIntelElementType(\"PREPROCESSOR_DIRECTIVE\");\n  IElementType STATEMENT = new AsmIntelElementType(\"STATEMENT\");\n\n  IElementType BIT_OR = new AsmIntelTokenType(\"|\");\n  IElementType COLON = new AsmIntelTokenType(\":\");\n  IElementType COMMA = new AsmIntelTokenType(\",\");\n  IElementType FLAG = new AsmIntelTokenType(\"FLAG\");\n  IElementType HEX = new AsmIntelTokenType(\"hex\");\n  IElementType IDENTIFIER = new AsmIntelTokenType(\"identifier\");\n  IElementType IMPORT = new AsmIntelTokenType(\"import\");\n  IElementType INSTRUCTION = new AsmIntelTokenType(\"INSTRUCTION\");\n  IElementType INT = new AsmIntelTokenType(\"int\");\n  IElementType LABEL = new AsmIntelTokenType(\"LABEL\");\n  IElementType LPAREN = new AsmIntelTokenType(\"(\");\n  IElementType PSEUDO_REG = new AsmIntelTokenType(\"PSEUDO_REG\");\n  IElementType RPAREN = new AsmIntelTokenType(\")\");\n  IElementType STRING = new AsmIntelTokenType(\"STRING\");\n  IElementType TEXT = new AsmIntelTokenType(\"TEXT\");\n\n  class Factory {\n    public static PsiElement createElement(ASTNode node) {\n      IElementType type = node.getElementType();\n       if (type == FRAME_SIZE) {\n        return new AsmIntelFrameSizeImpl(node);\n      }\n      else if (type == FUNCTION) {\n        return new AsmIntelFunctionImpl(node);\n      }\n      else if (type == FUNCTION_BODY) {\n        return new AsmIntelFunctionBodyImpl(node);\n      }\n      else if (type == FUNCTION_FLAGS) {\n        return new AsmIntelFunctionFlagsImpl(node);\n      }\n      else if (type == FUNCTION_HEADER) {\n        return new AsmIntelFunctionHeaderImpl(node);\n      }\n      else if (type == INSTRUCTION_STMT) {\n        return new AsmIntelInstructionStmtImpl(node);\n      }\n      else if (type == LITERAL) {\n        return new AsmIntelLiteralImpl(node);\n      }\n      else if (type == OPERANDS) {\n        return new AsmIntelOperandsImpl(node);\n      }\n      else if (type == PREPROCESSOR_DIRECTIVE) {\n        return new AsmIntelPreprocessorDirectiveImpl(node);\n      }\n      else if (type == STATEMENT) {\n        return new AsmIntelStatementImpl(node);\n      }\n      throw new AssertionError(\"Unknown element type: \" + type);\n    }\n  }\n}\n"
  },
  {
    "path": "plan9/gen/com/plan9/intel/lang/core/psi/AsmIntelVisitor.java",
    "content": "// This is a generated file. Not intended for manual editing.\npackage com.plan9.intel.lang.core.psi;\n\nimport org.jetbrains.annotations.*;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.intellij.psi.PsiElement;\n\npublic class AsmIntelVisitor extends PsiElementVisitor {\n\n  public void visitFrameSize(@NotNull AsmIntelFrameSize o) {\n    visitPsiElement(o);\n  }\n\n  public void visitFunction(@NotNull AsmIntelFunction o) {\n    visitPsiElement(o);\n  }\n\n  public void visitFunctionBody(@NotNull AsmIntelFunctionBody o) {\n    visitPsiElement(o);\n  }\n\n  public void visitFunctionFlags(@NotNull AsmIntelFunctionFlags o) {\n    visitPsiElement(o);\n  }\n\n  public void visitFunctionHeader(@NotNull AsmIntelFunctionHeader o) {\n    visitPsiElement(o);\n  }\n\n  public void visitInstructionStmt(@NotNull AsmIntelInstructionStmt o) {\n    visitPsiElement(o);\n  }\n\n  public void visitLiteral(@NotNull AsmIntelLiteral o) {\n    visitPsiElement(o);\n  }\n\n  public void visitOperands(@NotNull AsmIntelOperands o) {\n    visitPsiElement(o);\n  }\n\n  public void visitPreprocessorDirective(@NotNull AsmIntelPreprocessorDirective o) {\n    visitPsiElement(o);\n  }\n\n  public void visitStatement(@NotNull AsmIntelStatement o) {\n    visitPsiElement(o);\n  }\n\n  public void visitPsiElement(@NotNull PsiElement o) {\n    visitElement(o);\n  }\n\n}\n"
  },
  {
    "path": "plan9/gen/com/plan9/intel/lang/core/psi/impl/AsmIntelFrameSizeImpl.java",
    "content": "// This is a generated file. Not intended for manual editing.\npackage com.plan9.intel.lang.core.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport static com.plan9.intel.lang.core.psi.AsmIntelTypes.*;\nimport com.plan9.intel.lang.core.psi.*;\n\npublic class AsmIntelFrameSizeImpl extends AsmIntelElementImpl implements AsmIntelFrameSize {\n\n  public AsmIntelFrameSizeImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull AsmIntelVisitor visitor) {\n    visitor.visitFrameSize(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof AsmIntelVisitor) accept((AsmIntelVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public List<AsmIntelLiteral> getLiteralList() {\n    return PsiTreeUtil.getChildrenOfTypeAsList(this, AsmIntelLiteral.class);\n  }\n\n}\n"
  },
  {
    "path": "plan9/gen/com/plan9/intel/lang/core/psi/impl/AsmIntelFunctionBodyImpl.java",
    "content": "// This is a generated file. Not intended for manual editing.\npackage com.plan9.intel.lang.core.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport static com.plan9.intel.lang.core.psi.AsmIntelTypes.*;\nimport com.plan9.intel.lang.core.psi.*;\n\npublic class AsmIntelFunctionBodyImpl extends AsmIntelElementImpl implements AsmIntelFunctionBody {\n\n  public AsmIntelFunctionBodyImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull AsmIntelVisitor visitor) {\n    visitor.visitFunctionBody(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof AsmIntelVisitor) accept((AsmIntelVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public List<AsmIntelInstructionStmt> getInstructionStmtList() {\n    return PsiTreeUtil.getChildrenOfTypeAsList(this, AsmIntelInstructionStmt.class);\n  }\n\n}\n"
  },
  {
    "path": "plan9/gen/com/plan9/intel/lang/core/psi/impl/AsmIntelFunctionFlagsImpl.java",
    "content": "// This is a generated file. Not intended for manual editing.\npackage com.plan9.intel.lang.core.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport static com.plan9.intel.lang.core.psi.AsmIntelTypes.*;\nimport com.plan9.intel.lang.core.psi.*;\n\npublic class AsmIntelFunctionFlagsImpl extends AsmIntelElementImpl implements AsmIntelFunctionFlags {\n\n  public AsmIntelFunctionFlagsImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull AsmIntelVisitor visitor) {\n    visitor.visitFunctionFlags(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof AsmIntelVisitor) accept((AsmIntelVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n}\n"
  },
  {
    "path": "plan9/gen/com/plan9/intel/lang/core/psi/impl/AsmIntelFunctionHeaderImpl.java",
    "content": "// This is a generated file. Not intended for manual editing.\npackage com.plan9.intel.lang.core.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport static com.plan9.intel.lang.core.psi.AsmIntelTypes.*;\nimport com.plan9.intel.lang.core.psi.*;\n\npublic class AsmIntelFunctionHeaderImpl extends AsmIntelElementImpl implements AsmIntelFunctionHeader {\n\n  public AsmIntelFunctionHeaderImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull AsmIntelVisitor visitor) {\n    visitor.visitFunctionHeader(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof AsmIntelVisitor) accept((AsmIntelVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @Nullable\n  public AsmIntelFrameSize getFrameSize() {\n    return findChildByClass(AsmIntelFrameSize.class);\n  }\n\n  @Override\n  @NotNull\n  public AsmIntelFunctionFlags getFunctionFlags() {\n    return findNotNullChildByClass(AsmIntelFunctionFlags.class);\n  }\n\n}\n"
  },
  {
    "path": "plan9/gen/com/plan9/intel/lang/core/psi/impl/AsmIntelFunctionImpl.java",
    "content": "// This is a generated file. Not intended for manual editing.\npackage com.plan9.intel.lang.core.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport static com.plan9.intel.lang.core.psi.AsmIntelTypes.*;\nimport com.plan9.intel.lang.core.psi.*;\n\npublic class AsmIntelFunctionImpl extends AsmIntelElementImpl implements AsmIntelFunction {\n\n  public AsmIntelFunctionImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull AsmIntelVisitor visitor) {\n    visitor.visitFunction(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof AsmIntelVisitor) accept((AsmIntelVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public AsmIntelFunctionBody getFunctionBody() {\n    return findNotNullChildByClass(AsmIntelFunctionBody.class);\n  }\n\n  @Override\n  @NotNull\n  public AsmIntelFunctionHeader getFunctionHeader() {\n    return findNotNullChildByClass(AsmIntelFunctionHeader.class);\n  }\n\n}\n"
  },
  {
    "path": "plan9/gen/com/plan9/intel/lang/core/psi/impl/AsmIntelInstructionStmtImpl.java",
    "content": "// This is a generated file. Not intended for manual editing.\npackage com.plan9.intel.lang.core.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport static com.plan9.intel.lang.core.psi.AsmIntelTypes.*;\nimport com.plan9.intel.lang.core.psi.*;\n\npublic class AsmIntelInstructionStmtImpl extends AsmIntelElementImpl implements AsmIntelInstructionStmt {\n\n  public AsmIntelInstructionStmtImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull AsmIntelVisitor visitor) {\n    visitor.visitInstructionStmt(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof AsmIntelVisitor) accept((AsmIntelVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @NotNull\n  public AsmIntelOperands getOperands() {\n    return findNotNullChildByClass(AsmIntelOperands.class);\n  }\n\n}\n"
  },
  {
    "path": "plan9/gen/com/plan9/intel/lang/core/psi/impl/AsmIntelLiteralImpl.java",
    "content": "// This is a generated file. Not intended for manual editing.\npackage com.plan9.intel.lang.core.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport static com.plan9.intel.lang.core.psi.AsmIntelTypes.*;\nimport com.plan9.intel.lang.core.psi.*;\n\npublic class AsmIntelLiteralImpl extends AsmIntelElementImpl implements AsmIntelLiteral {\n\n  public AsmIntelLiteralImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull AsmIntelVisitor visitor) {\n    visitor.visitLiteral(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof AsmIntelVisitor) accept((AsmIntelVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n}\n"
  },
  {
    "path": "plan9/gen/com/plan9/intel/lang/core/psi/impl/AsmIntelOperandsImpl.java",
    "content": "// This is a generated file. Not intended for manual editing.\npackage com.plan9.intel.lang.core.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport static com.plan9.intel.lang.core.psi.AsmIntelTypes.*;\nimport com.plan9.intel.lang.core.psi.*;\n\npublic class AsmIntelOperandsImpl extends AsmIntelElementImpl implements AsmIntelOperands {\n\n  public AsmIntelOperandsImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull AsmIntelVisitor visitor) {\n    visitor.visitOperands(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof AsmIntelVisitor) accept((AsmIntelVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n}\n"
  },
  {
    "path": "plan9/gen/com/plan9/intel/lang/core/psi/impl/AsmIntelPreprocessorDirectiveImpl.java",
    "content": "// This is a generated file. Not intended for manual editing.\npackage com.plan9.intel.lang.core.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport static com.plan9.intel.lang.core.psi.AsmIntelTypes.*;\nimport com.plan9.intel.lang.core.psi.*;\n\npublic class AsmIntelPreprocessorDirectiveImpl extends AsmIntelElementImpl implements AsmIntelPreprocessorDirective {\n\n  public AsmIntelPreprocessorDirectiveImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull AsmIntelVisitor visitor) {\n    visitor.visitPreprocessorDirective(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof AsmIntelVisitor) accept((AsmIntelVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n}\n"
  },
  {
    "path": "plan9/gen/com/plan9/intel/lang/core/psi/impl/AsmIntelStatementImpl.java",
    "content": "// This is a generated file. Not intended for manual editing.\npackage com.plan9.intel.lang.core.psi.impl;\n\nimport java.util.List;\nimport org.jetbrains.annotations.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport static com.plan9.intel.lang.core.psi.AsmIntelTypes.*;\nimport com.plan9.intel.lang.core.psi.*;\n\npublic class AsmIntelStatementImpl extends AsmIntelElementImpl implements AsmIntelStatement {\n\n  public AsmIntelStatementImpl(ASTNode node) {\n    super(node);\n  }\n\n  public void accept(@NotNull AsmIntelVisitor visitor) {\n    visitor.visitStatement(this);\n  }\n\n  public void accept(@NotNull PsiElementVisitor visitor) {\n    if (visitor instanceof AsmIntelVisitor) accept((AsmIntelVisitor)visitor);\n    else super.accept(visitor);\n  }\n\n  @Override\n  @Nullable\n  public AsmIntelFunction getFunction() {\n    return findChildByClass(AsmIntelFunction.class);\n  }\n\n  @Override\n  @Nullable\n  public AsmIntelPreprocessorDirective getPreprocessorDirective() {\n    return findChildByClass(AsmIntelPreprocessorDirective.class);\n  }\n\n}\n"
  },
  {
    "path": "plan9/resources/colorscheme/AsmIntelDarcula.xml",
    "content": "<?xml version='1.0'?>\n<list>\n  <option name=\"com.plan9.IDENTIFIER\">\n    <value>\n      <option name=\"FOREGROUND\" value=\"20999D\"/>\n    </value>\n  </option>\n  <option name=\"com.plan9.PSEUDO_INSTRUCTION\">\n    <value>\n      <option name=\"FOREGROUND\" value=\"8A799B\"/>\n      <option name=\"FONT_TYPE\" value=\"1\" />\n    </value>\n  </option>\n  <option name=\"com.plan9.INSTRUCTION\">\n    <value>\n      <option name=\"FOREGROUND\" value=\"CDA3E6\"/>\n    </value>\n  </option>\n  <option name=\"com.plan9.REGISTER\">\n    <value>\n      <option name=\"FOREGROUND\" value=\"9E6128\"/>\n    </value>\n  </option>\n  <option name=\"com.plan9.LABEL\">\n    <value>\n      <option name=\"FOREGROUND\" value=\"4EADE5\"/>\n      <option name=\"EFFECT_TYPE\" value=\"1\" />\n    </value>\n  </option>\n</list>"
  },
  {
    "path": "plan9/resources/colorscheme/AsmIntelDefault.xml",
    "content": "<?xml version='1.0'?>\n<list>\n  <option name=\"com.plan9.INSTRUCTION\">\n    <value>\n      <option name=\"FOREGROUND\" value=\"20999d\"/>\n    </value>\n  </option>\n  <option name=\"com.plan9.LABEL\">\n    <value>\n      <option name=\"FOREGROUND\" value=\"DD6718\"/>\n      <option name=\"EFFECT_TYPE\" value=\"1\" />\n    </value>\n  </option>\n</list>"
  },
  {
    "path": "plan9/resources/colorscheme/highlighterDemoText.s",
    "content": "// a line comment\nTEXT foo(SB),NOSPLIT,$24-8\n\nlabel:\n\tMOVB\t(SI)(BX*1), CX\n\tXORL\t$0xffff, BX\t// convert EQ to NE\n\tANDL\t$0x0f0f >> 1, CX\n\tCLD\n\tCALL\truntime·args(SB)\n\tRET\n\nDATA\tbad_proc_msg<>+0x00(SB)/8, $\"This pro\"\nDATA\tbad_proc_msg<>+0x08(SB)/8, $\"gram can\"\n"
  },
  {
    "path": "plan9/src/com/plan9/intel/AsmIntelFileType.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan, Stuart Carnie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.plan9.intel;\n\nimport com.plan9.intel.lang.AsmIntelLanguage;\nimport com.intellij.openapi.fileTypes.LanguageFileType;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport javax.swing.*;\n\npublic class AsmIntelFileType extends LanguageFileType {\n\n  public static final AsmIntelFileType INSTANCE = new AsmIntelFileType();\n\n  private AsmIntelFileType() {\n    super(AsmIntelLanguage.INSTANCE);\n  }\n\n  @NotNull\n  @Override\n  public String getName() {\n    return \"x86 Plan9 Assembly\";\n  }\n\n  @NotNull\n  @Override\n  public String getDescription() {\n    return \"x86 Plan9 Assembly file\";\n  }\n\n  @NotNull\n  @Override\n  public String getDefaultExtension() {\n    return \"s\";\n  }\n\n  @Nullable\n  @Override\n  public Icon getIcon() {\n    return Icons.FILE;\n  }\n}\n"
  },
  {
    "path": "plan9/src/com/plan9/intel/AsmIntelFileTypeFactory.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan, Stuart Carnie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.plan9.intel;\n\nimport com.intellij.openapi.fileTypes.FileTypeConsumer;\nimport com.intellij.openapi.fileTypes.FileTypeFactory;\nimport com.intellij.openapi.fileTypes.WildcardFileNameMatcher;\nimport org.jetbrains.annotations.NotNull;\n\npublic class AsmIntelFileTypeFactory extends FileTypeFactory {\n  @Override\n  public void createFileTypes(@NotNull FileTypeConsumer consumer) {\n    consumer.consume(AsmIntelFileType.INSTANCE,\n                     new WildcardFileNameMatcher(\"*_amd64.s\"),\n                     new WildcardFileNameMatcher(\"*_amd64p32.s\"),\n                     new WildcardFileNameMatcher(\"*_386.s\"));\n  }\n}\n"
  },
  {
    "path": "plan9/src/com/plan9/intel/Icons.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.plan9.intel;\n\nimport com.intellij.openapi.util.IconLoader;\n\nimport javax.swing.*;\n\npublic class Icons {\n  public static final Icon FILE = IconLoader.getIcon(\"/icons/CPU.png\");\n\n  private Icons() {}\n}\n"
  },
  {
    "path": "plan9/src/com/plan9/intel/ide/highlighting/AsmIntelColorsAndFontsPage.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.plan9.intel.ide.highlighting;\n\nimport com.intellij.openapi.editor.colors.TextAttributesKey;\nimport com.intellij.openapi.fileTypes.SyntaxHighlighter;\nimport com.intellij.openapi.options.colors.AttributesDescriptor;\nimport com.intellij.openapi.options.colors.ColorDescriptor;\nimport com.intellij.openapi.options.colors.ColorSettingsPage;\nimport com.intellij.util.ResourceUtil;\nimport com.plan9.intel.Icons;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport javax.swing.*;\nimport java.io.IOException;\nimport java.net.URL;\nimport java.util.Map;\n\nimport static com.plan9.intel.ide.highlighting.AsmIntelSyntaxHighlightingColors.*;\n\npublic class AsmIntelColorsAndFontsPage implements ColorSettingsPage {\n  private static final AttributesDescriptor[] DESCRIPTORS = new AttributesDescriptor[]{\n    new AttributesDescriptor(\"Keyword\", KEYWORD),\n    new AttributesDescriptor(\"Line Comment\", LINE_COMMENT),\n    new AttributesDescriptor(\"Instruction\", INSTRUCTION),\n    new AttributesDescriptor(\"Pseudo Instruction\", PSEUDO_INSTRUCTION),\n    new AttributesDescriptor(\"String\", STRING),\n    new AttributesDescriptor(\"Label\", LABEL),\n    new AttributesDescriptor(\"Flags\", FLAG),\n    new AttributesDescriptor(\"Registers\", REGISTER),\n    new AttributesDescriptor(\"Parenthesis\", PARENTHESIS),\n    new AttributesDescriptor(\"Operator\", OPERATOR),\n    new AttributesDescriptor(\"Identifier\", IDENTIFIER),\n  };\n\n  @Nullable\n  @Override\n  public Icon getIcon() {\n    return Icons.FILE;\n  }\n\n  @NotNull\n  @Override\n  public SyntaxHighlighter getHighlighter() {\n    return new AsmIntelSyntaxHighlighter();\n  }\n\n  private String DEMO_TEXT;\n\n  @NotNull\n  @Override\n  public String getDemoText() {\n    if (DEMO_TEXT == null) {\n      try {\n        URL resource = getClass().getClassLoader().getResource(\"colorscheme/highlighterDemoText.s\");\n        DEMO_TEXT = resource != null ? ResourceUtil.loadText(resource) : \"\";\n      }\n      catch (IOException e) {\n        DEMO_TEXT = \"\";\n      }\n    }\n\n    return DEMO_TEXT;\n  }\n\n  @Nullable\n  @Override\n  public Map<String, TextAttributesKey> getAdditionalHighlightingTagToDescriptorMap() {\n    return null;\n  }\n\n  @NotNull\n  @Override\n  public AttributesDescriptor[] getAttributeDescriptors() {\n    return DESCRIPTORS;\n  }\n\n  @NotNull\n  @Override\n  public ColorDescriptor[] getColorDescriptors() {\n    return ColorDescriptor.EMPTY_ARRAY;\n  }\n\n  @NotNull\n  @Override\n  public String getDisplayName() {\n    return \"x86 Assembler\";\n  }\n}\n"
  },
  {
    "path": "plan9/src/com/plan9/intel/ide/highlighting/AsmIntelHighlightingLexer.flex",
    "content": "package com.plan9.intel.lang.core.lexer;\n\nimport com.intellij.lexer.FlexLexer;\nimport com.intellij.psi.tree.IElementType;\nimport com.intellij.psi.TokenType;\nimport static com.plan9.intel.ide.highlighting.AsmIntelLexerTokens.*;\n\n%%\n\n%public \n%class _AsmIntelHighlightingLexer\n%implements FlexLexer\n%unicode\n%function advance\n%type IElementType\n\n%{\n  public _AsmIntelHighlightingLexer() {\n    this((java.io.Reader)null);\n  }\n%}\n\nWSNL          = [ \\r\\n\\t]+\nWS            = [ \\t\\f]\nLINE_COMMENT  = \"//\" [^\\r\\n]*\nSTR           = \"\\\"\"\nLETTER        = [:letter:] | \"_\" | \\u00B7 | \\u2215\nDIGIT         = [:digit:]\n\nHEX_DIGIT     = [0-9A-Fa-f]\nINT_DIGIT     = [0-9]\nOPERATOR      = [*/%&|+~\\^-]\n\nNUM_INT       = \"0\" | ([1-9] {INT_DIGIT}*)\nNUM_HEX       = (\"0x\" | \"0X\") {HEX_DIGIT}+\n\nIDENT         = {LETTER} ( {LETTER} | {DIGIT} )*\n\nLABEL         = {IDENT} \":\"\n\nDIRECTIVE     = \"TEXT\" | \"GLOBL\" | \"DATA\" | \"PCDATA\" | \"FUNCDATA\"\n\nPSEUDO_REG    = \"FP\" | \"PC\" | \"SB\" | \"SP\"\n\nREG           = \"AL\" | \"CL\" | \"DL\" | \"BL\" | \"SPB\" | \"BPB\" | \"SIB\" | \"DIB\" | \"R8B\" | \"R9B\" | \"R10B\" | \"R11B\" | \"R12B\" | \"R13B\" | \"R14B\" | \"R15B\" | \"AX\" |\n                \"CX\" | \"DX\" | \"BX\" | \"SP\" | \"BP\" | \"SI\" | \"DI\" | \"R8\" | \"R9\" | \"R10\" | \"R11\" | \"R12\" | \"R13\" | \"R14\" | \"R15\" | \"AH\" | \"CH\" | \"DH\" | \"BH\" |\n                \"F0\" | \"F1\" | \"F2\" | \"F3\" | \"F4\" | \"F5\" | \"F6\" | \"F7\" | \"M0\" | \"M1\" | \"M2\" | \"M3\" | \"M4\" | \"M5\" | \"M6\" | \"M7\" | \"X0\" | \"X1\" | \"X2\" | \"X3\" |\n                \"X4\" | \"X5\" | \"X6\" | \"X7\" | \"X8\" | \"X9\" | \"X10\" | \"X11\" | \"X12\" | \"X13\" | \"X14\" | \"X15\" | \"CS\" | \"SS\" | \"DS\" | \"ES\" | \"FS\" | \"GS\" | \"GDTR\" |\n                \"IDTR\" | \"LDTR\" | \"MSW\" | \"TASK\" | \"CR0\" | \"CR1\" | \"CR2\" | \"CR3\" | \"CR4\" | \"CR5\" | \"CR6\" | \"CR7\" | \"CR8\" | \"CR9\" | \"CR10\" | \"CR11\" | \"CR12\"\n                | \"CR13\" | \"CR14\" | \"CR15\" | \"DR0\" | \"DR1\" | \"DR2\" | \"DR3\" | \"DR4\" | \"DR5\" | \"DR6\" | \"DR7\" | \"TR0\" | \"TR1\" | \"TR2\" | \"TR3\" | \"TR4\" | \"TR5\" |\n                \"TR6\" | \"TR7\" | \"TLS\"\n\nPSEUDO_INS    = \"CALL\" | \"END\" | \"JMP\" | \"NOP\" | \"RET\"\n\n// all instructions, including alternates per https://github.com/golang/go/blob/8db371b3d58a1c139f0854738f9962de05ca5d7a/src/cmd/asm/internal/arch/arch.go#L114\nINS           = \"AAA\" | \"AAD\" | \"AAM\" | \"AAS\" | \"ADCB\" | \"ADCL\" | \"ADCQ\" | \"ADCW\" | \"ADDB\" | \"ADDL\" | \"ADDPD\" | \"ADDPS\" | \"ADDQ\" | \"ADDSD\" | \"ADDSS\" |\n                \"ADDW\" | \"ADJSP\" | \"AESDEC\" | \"AESDECLAST\" | \"AESENC\" | \"AESENCLAST\" | \"AESIMC\" | \"AESKEYGENASSIST\" | \"ANDB\" | \"ANDL\" | \"ANDNPD\" | \"ANDNPS\"\n                | \"ANDPD\" | \"ANDPS\" | \"ANDQ\" | \"ANDW\" | \"ARPL\" | \"BOUNDL\" | \"BOUNDW\" | \"BSFL\" | \"BSFQ\" | \"BSFW\" | \"BSRL\" | \"BSRQ\" | \"BSRW\" | \"BSWAPL\" |\n                \"BSWAPQ\" | \"BTCL\" | \"BTCQ\" | \"BTCW\" | \"BTL\" | \"BTQ\" | \"BTRL\" | \"BTRQ\" | \"BTRW\" | \"BTSL\" | \"BTSQ\" | \"BTSW\" | \"BTW\" | \"BYTE\" | \"CDQ\" | \"CLC\" |\n                \"CLD\" | \"CLI\" | \"CLTS\" | \"CMC\" | \"CMOVLCC\" | \"CMOVLCS\" | \"CMOVLEQ\" | \"CMOVLGE\" | \"CMOVLGT\" | \"CMOVLHI\" | \"CMOVLLE\" | \"CMOVLLS\" | \"CMOVLLT\" |\n                \"CMOVLMI\" | \"CMOVLNE\" | \"CMOVLOC\" | \"CMOVLOS\" | \"CMOVLPC\" | \"CMOVLPL\" | \"CMOVLPS\" | \"CMOVQCC\" | \"CMOVQCS\" | \"CMOVQEQ\" | \"CMOVQGE\" |\n                \"CMOVQGT\" | \"CMOVQHI\" | \"CMOVQLE\" | \"CMOVQLS\" | \"CMOVQLT\" | \"CMOVQMI\" | \"CMOVQNE\" | \"CMOVQOC\" | \"CMOVQOS\" | \"CMOVQPC\" | \"CMOVQPL\" |\n                \"CMOVQPS\" | \"CMOVWCC\" | \"CMOVWCS\" | \"CMOVWEQ\" | \"CMOVWGE\" | \"CMOVWGT\" | \"CMOVWHI\" | \"CMOVWLE\" | \"CMOVWLS\" | \"CMOVWLT\" | \"CMOVWMI\" |\n                \"CMOVWNE\" | \"CMOVWOC\" | \"CMOVWOS\" | \"CMOVWPC\" | \"CMOVWPL\" | \"CMOVWPS\" | \"CMPB\" | \"CMPL\" | \"CMPPD\" | \"CMPPS\" | \"CMPQ\" | \"CMPSB\" | \"CMPSD\" |\n                \"CMPSL\" | \"CMPSQ\" | \"CMPSS\" | \"CMPSW\" | \"CMPW\" | \"CMPXCHG8B\" | \"CMPXCHGB\" | \"CMPXCHGL\" | \"CMPXCHGQ\" | \"CMPXCHGW\" | \"COMISD\" | \"COMISS\" |\n                \"CPUID\" | \"CQO\" | \"CRC32B\" | \"CRC32Q\" | \"CVTPD2PL\" | \"CVTPD2PS\" | \"CVTPL2PD\" | \"CVTPL2PS\" | \"CVTPS2PD\" | \"CVTPS2PL\" | \"CVTSD2SL\" |\n                \"CVTSD2SQ\" | \"CVTSD2SS\" | \"CVTSL2SD\" | \"CVTSL2SS\" | \"CVTSQ2SD\" | \"CVTSQ2SS\" | \"CVTSS2SD\" | \"CVTSS2SL\" | \"CVTSS2SQ\" | \"CVTTPD2PL\" |\n                \"CVTTPS2PL\" | \"CVTTSD2SL\" | \"CVTTSD2SQ\" | \"CVTTSS2SL\" | \"CVTTSS2SQ\" | \"CWD\" | \"DAA\" | \"DAS\" | \"DECB\" | \"DECL\" | \"DECQ\" | \"DECW\" | \"DIVB\" |\n                \"DIVL\" | \"DIVPD\" | \"DIVPS\" | \"DIVQ\" | \"DIVSD\" | \"DIVSS\" | \"DIVW\" | \"EMMS\" | \"ENTER\" | \"F2XM1\" | \"FABS\" | \"FADDD\" | \"FADDDP\" | \"FADDF\" |\n                \"FADDL\" | \"FADDW\" | \"FCHS\" | \"FCLEX\" | \"FCMOVCC\" | \"FCMOVCS\" | \"FCMOVEQ\" | \"FCMOVHI\" | \"FCMOVLS\" | \"FCMOVNE\" | \"FCMOVNU\" | \"FCMOVUN\" |\n                \"FCOMB\" | \"FCOMBP\" | \"FCOMD\" | \"FCOMDP\" | \"FCOMDPP\" | \"FCOMF\" | \"FCOMFP\" | \"FCOMI\" | \"FCOMIP\" | \"FCOML\" | \"FCOMLP\" | \"FCOMW\" | \"FCOMWP\" |\n                \"FCOS\" | \"FDECSTP\" | \"FDIVD\" | \"FDIVDP\" | \"FDIVF\" | \"FDIVL\" | \"FDIVRD\" | \"FDIVRDP\" | \"FDIVRF\" | \"FDIVRL\" | \"FDIVRW\" | \"FDIVW\" | \"FFREE\" |\n                \"FINCSTP\" | \"FINIT\" | \"FLD1\" | \"FLDCW\" | \"FLDENV\" | \"FLDL2E\" | \"FLDL2T\" | \"FLDLG2\" | \"FLDLN2\" | \"FLDPI\" | \"FLDZ\" | \"FMOVB\" | \"FMOVBP\" |\n                \"FMOVD\" | \"FMOVDP\" | \"FMOVF\" | \"FMOVFP\" | \"FMOVL\" | \"FMOVLP\" | \"FMOVV\" | \"FMOVVP\" | \"FMOVW\" | \"FMOVWP\" | \"FMOVX\" | \"FMOVXP\" | \"FMULD\" |\n                \"FMULDP\" | \"FMULF\" | \"FMULL\" | \"FMULW\" | \"FNOP\" | \"FPATAN\" | \"FPREM\" | \"FPREM1\" | \"FPTAN\" | \"FRNDINT\" | \"FRSTOR\" | \"FSAVE\" | \"FSCALE\" |\n                \"FSIN\" | \"FSINCOS\" | \"FSQRT\" | \"FSTCW\" | \"FSTENV\" | \"FSTSW\" | \"FSUBD\" | \"FSUBDP\" | \"FSUBF\" | \"FSUBL\" | \"FSUBRD\" | \"FSUBRDP\" | \"FSUBRF\" |\n                \"FSUBRL\" | \"FSUBRW\" | \"FSUBW\" | \"FTST\" | \"FUCOM\" | \"FUCOMI\" | \"FUCOMIP\" | \"FUCOMP\" | \"FUCOMPP\" | \"FXAM\" | \"FXCHD\" | \"FXRSTOR\" | \"FXRSTOR64\"\n                | \"FXSAVE\" | \"FXSAVE64\" | \"FXTRACT\" | \"FYL2X\" | \"FYL2XP1\" | \"HLT\" | \"IDIVB\" | \"IDIVL\" | \"IDIVQ\" | \"IDIVW\" | \"IMUL3Q\" | \"IMULB\" | \"IMULL\" |\n                \"IMULQ\" | \"IMULW\" | \"INB\" | \"INCB\" | \"INCL\" | \"INCQ\" | \"INCW\" | \"INL\" | \"INSB\" | \"INSL\" | \"INSW\" | \"INT\" | \"INTO\" | \"INVD\" | \"INVLPG\" |\n                \"INW\" | \"IRETL\" | \"IRETQ\" | \"IRETW\" | \"JA\" | \"JAE\" | \"JB\" | \"JBE\" | \"JC\" | \"JCC\" | \"JCS\" | \"JCXZL\" | \"JCXZQ\" | \"JCXZW\" | \"JE\" | \"JEQ\" | \"JG\"\n                | \"JGE\" | \"JGT\" | \"JHI\" | \"JHS\" | \"JL\" | \"JLE\" | \"JLO\" | \"JLS\" | \"JLT\" | \"JMI\" | \"JNA\" | \"JNAE\" | \"JNB\" | \"JNBE\" | \"JNC\" | \"JNE\" | \"JNG\" |\n                \"JNGE\" | \"JNL\" | \"JNLE\" | \"JNO\" | \"JNP\" | \"JNS\" | \"JNZ\" | \"JO\" | \"JOC\" | \"JOS\" | \"JP\" | \"JPC\" | \"JPE\" | \"JPL\" | \"JPO\" | \"JPS\" | \"JS\" | \"JZ\"\n                | \"LAHF\" | \"LARL\" | \"LARW\" | \"LAST\" | \"LDMXCSR\" | \"LEAL\" | \"LEAQ\" | \"LEAVEL\" | \"LEAVEQ\" | \"LEAVEW\" | \"LEAW\" | \"LFENCE\" | \"LOCK\" | \"LODSB\" |\n                \"LODSL\" | \"LODSQ\" | \"LODSW\" | \"LONG\" | \"LOOP\" | \"LOOPEQ\" | \"LOOPNE\" | \"LSLL\" | \"LSLW\" | \"MASKMOVDQU\" | \"MASKMOVOU\" | \"MASKMOVQ\" | \"MAXPD\" |\n                \"MAXPS\" | \"MAXSD\" | \"MAXSS\" | \"MFENCE\" | \"MINPD\" | \"MINPS\" | \"MINSD\" | \"MINSS\" | \"MODE\" | \"MOVAPD\" | \"MOVAPS\" | \"MOVB\" | \"MOVBLSX\" |\n                \"MOVBLZX\" | \"MOVBQSX\" | \"MOVBQZX\" | \"MOVBWSX\" | \"MOVBWZX\" | \"MOVD\" | \"MOVDQ2Q\" | \"MOVHDA\" | \"MOVHDU\" | \"MOVHLPS\" | \"MOVHPD\" | \"MOVHPS\" |\n                \"MOVL\" | \"MOVLHPS\" | \"MOVLPD\" | \"MOVLPS\" | \"MOVLQSX\" | \"MOVLQZX\" | \"MOVMSKPD\" | \"MOVMSKPS\" | \"MOVNTDQ\" | \"MOVNTHD\" | \"MOVNTIL\" | \"MOVNTIQ\" |\n                \"MOVNTO\" | \"MOVNTPD\" | \"MOVNTPS\" | \"MOVNTQ\" | \"MOVO\" | \"MOVOA\" | \"MOVOU\" | \"MOVQ\" | \"MOVQL\" | \"MOVQOZX\" | \"MOVSB\" | \"MOVSD\" | \"MOVSL\" |\n                \"MOVSQ\" | \"MOVSS\" | \"MOVSW\" | \"MOVUPD\" | \"MOVUPS\" | \"MOVW\" | \"MOVWLSX\" | \"MOVWLZX\" | \"MOVWQSX\" | \"MOVWQZX\" | \"MULB\" | \"MULL\" | \"MULPD\" |\n                \"MULPS\" | \"MULQ\" | \"MULSD\" | \"MULSS\" | \"MULW\" | \"NEGB\" | \"NEGL\" | \"NEGQ\" | \"NEGW\" | \"NOTB\" | \"NOTL\" | \"NOTQ\" | \"NOTW\" | \"ORB\" | \"ORL\" |\n                \"ORPD\" | \"ORPS\" | \"ORQ\" | \"ORW\" | \"OUTB\" | \"OUTL\" | \"OUTSB\" | \"OUTSL\" | \"OUTSW\" | \"OUTW\" | \"PACKSSLW\" | \"PACKSSWB\" | \"PACKUSWB\" | \"PADDB\" |\n                \"PADDL\" | \"PADDQ\" | \"PADDSB\" | \"PADDSW\" | \"PADDUSB\" | \"PADDUSW\" | \"PADDW\" | \"PAND\" | \"PANDB\" | \"PANDL\" | \"PANDN\" | \"PANDSB\" | \"PANDSW\" |\n                \"PANDUSB\" | \"PANDUSW\" | \"PANDW\" | \"PAUSE\" | \"PAVGB\" | \"PAVGW\" | \"PCLMULQDQ\" | \"PCMPEQB\" | \"PCMPEQL\" | \"PCMPEQW\" | \"PCMPGTB\" | \"PCMPGTL\" |\n                \"PCMPGTW\" | \"PEXTRW\" | \"PF2ID\" | \"PF2IL\" | \"PF2IW\" | \"PFACC\" | \"PFADD\" | \"PFCMPEQ\" | \"PFCMPGE\" | \"PFCMPGT\" | \"PFMAX\" | \"PFMIN\" | \"PFMUL\" |\n                \"PFNACC\" | \"PFPNACC\" | \"PFRCP\" | \"PFRCPI2T\" | \"PFRCPIT1\" | \"PFRSQIT1\" | \"PFRSQRT\" | \"PFSUB\" | \"PFSUBR\" | \"PI2FD\" | \"PI2FL\" | \"PI2FW\" |\n                \"PINSRD\" | \"PINSRQ\" | \"PINSRW\" | \"PMADDWL\" | \"PMAXSW\" | \"PMAXUB\" | \"PMINSW\" | \"PMINUB\" | \"PMOVMSKB\" | \"PMULHRW\" | \"PMULHUW\" | \"PMULHW\" |\n                \"PMULLW\" | \"PMULULQ\" | \"POPAL\" | \"POPAW\" | \"POPFL\" | \"POPFQ\" | \"POPFW\" | \"POPL\" | \"POPQ\" | \"POPW\" | \"POR\" | \"PREFETCHNTA\" | \"PREFETCHT0\" |\n                \"PREFETCHT1\" | \"PREFETCHT2\" | \"PSADBW\" | \"PSHUFB\" | \"PSHUFD\" | \"PSHUFHW\" | \"PSHUFL\" | \"PSHUFLW\" | \"PSHUFW\" | \"PSLLDQ\" | \"PSLLL\" | \"PSLLO\" |\n                \"PSLLQ\" | \"PSLLW\" | \"PSRAL\" | \"PSRAW\" | \"PSRLDQ\" | \"PSRLL\" | \"PSRLO\" | \"PSRLQ\" | \"PSRLW\" | \"PSUBB\" | \"PSUBL\" | \"PSUBQ\" | \"PSUBSB\" | \"PSUBSW\"\n                | \"PSUBUSB\" | \"PSUBUSW\" | \"PSUBW\" | \"PSWAPL\" | \"PUNPCKHBW\" | \"PUNPCKHLQ\" | \"PUNPCKHQDQ\" | \"PUNPCKHWL\" | \"PUNPCKLBW\" | \"PUNPCKLLQ\" |\n                \"PUNPCKLQDQ\" | \"PUNPCKLWL\" | \"PUSHAL\" | \"PUSHAW\" | \"PUSHFL\" | \"PUSHFQ\" | \"PUSHFW\" | \"PUSHL\" | \"PUSHQ\" | \"PUSHW\" | \"PXOR\" | \"QUAD\" | \"RCLB\" |\n                \"RCLL\" | \"RCLQ\" | \"RCLW\" | \"RCPPS\" | \"RCPSS\" | \"RCRB\" | \"RCRL\" | \"RCRQ\" | \"RCRW\" | \"RDMSR\" | \"RDPMC\" | \"RDTSC\" | \"REP\" | \"REPN\" | \"RETFL\" |\n                \"RETFQ\" | \"RETFW\" | \"ROLB\" | \"ROLL\" | \"ROLQ\" | \"ROLW\" | \"RORB\" | \"RORL\" | \"RORQ\" | \"RORW\" | \"ROUNDPD\" | \"ROUNDPS\" | \"ROUNDSD\" | \"ROUNDSS\" |\n                \"RSM\" | \"RSQRTPS\" | \"RSQRTSS\" | \"SAHF\" | \"SALB\" | \"SALL\" | \"SALQ\" | \"SALW\" | \"SARB\" | \"SARL\" | \"SARQ\" | \"SARW\" | \"SBBB\" | \"SBBL\" | \"SBBQ\" |\n                \"SBBW\" | \"SCASB\" | \"SCASL\" | \"SCASQ\" | \"SCASW\" | \"SETCC\" | \"SETCS\" | \"SETEQ\" | \"SETGE\" | \"SETGT\" | \"SETHI\" | \"SETLE\" | \"SETLS\" | \"SETLT\" |\n                \"SETMI\" | \"SETNE\" | \"SETOC\" | \"SETOS\" | \"SETPC\" | \"SETPL\" | \"SETPS\" | \"SFENCE\" | \"SHLB\" | \"SHLL\" | \"SHLQ\" | \"SHLW\" | \"SHRB\" | \"SHRL\" |\n                \"SHRQ\" | \"SHRW\" | \"SHUFPD\" | \"SHUFPS\" | \"SQRTPD\" | \"SQRTPS\" | \"SQRTSD\" | \"SQRTSS\" | \"STC\" | \"STD\" | \"STI\" | \"STMXCSR\" | \"STOSB\" | \"STOSL\" |\n                \"STOSQ\" | \"STOSW\" | \"SUBB\" | \"SUBL\" | \"SUBPD\" | \"SUBPS\" | \"SUBQ\" | \"SUBSD\" | \"SUBSS\" | \"SUBW\" | \"SWAPGS\" | \"SYSCALL\" | \"SYSRET\" | \"TESTB\" |\n                \"TESTL\" | \"TESTQ\" | \"TESTW\" | \"UCOMISD\" | \"UCOMISS\" | \"UNPCKHPD\" | \"UNPCKHPS\" | \"UNPCKLPD\" | \"UNPCKLPS\" | \"VERR\" | \"VERW\" | \"VPAND\" |\n                \"VPBROADCASTB\" | \"VPCMPEQB\" | \"VPMOVMSKB\" | \"VPTEST\" | \"VPXOR\" | \"VZEROUPPER\" | \"WAIT\" | \"WBINVD\" | \"WORD\" | \"WRMSR\" | \"XABORT\" | \"XACQUIRE\"\n                | \"XADDB\" | \"XADDL\" | \"XADDQ\" | \"XADDW\" | \"XBEGIN\" | \"XCHGB\" | \"XCHGL\" | \"XCHGQ\" | \"XCHGW\" | \"XEND\" | \"XLAT\" | \"XORB\" | \"XORL\" | \"XORPD\" |\n                \"XORPS\" | \"XORQ\" | \"XORW\" | \"XRELEASE\" | \"XTEST\"\n\nPREPROCESSOR  = \"#include\" | \"#define\" | \"#ifdef\" | \"#else\" | \"#endif\" | \"#undef\"\n\nFLAG          = \"NOPROF\" | \"DUPOK\" | \"NOSPLIT\" | \"RODATA\" | \"NOPTR\" | \"WRAPPER\" | \"NEEDCTXT\" | \"TLSBSS\" | \"NOFRAME\"\n\n%%\n\n{PREPROCESSOR}        { return PREPROCESSOR; }\n{DIRECTIVE}           { return DIRECTIVE; }\n\n{FLAG}                { return FLAG; }\n{PSEUDO_REG}          { return PSEUDO_REG; }\n{REG}                 { return REGISTER; }\n{PSEUDO_INS}          { return PSEUDO_INS; }\n{INS}                 { return INSTRUCTION; }\n{LINE_COMMENT}        { return LINE_COMMENT; }\n{WS}                  { return TokenType.WHITE_SPACE; }\n{WSNL}                { return TokenType.WHITE_SPACE; }\n{LABEL}               { return LABEL; }\n\"(\"                   { return PAREN; }\n\")\"                   { return PAREN; }\n\",\"                   { return COMMA; }\n{OPERATOR}            { return OPERATOR; }\n\"<<\" | \">>\"           { return OPERATOR; }\n\n{NUM_HEX}             { return HEX; }\n{NUM_INT}             { return INT; }\n\n{IDENT}               { return IDENTIFIER; }\n\n{STR} [^\\\"]* {STR}    { return STRING; }\n\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Catch All\n///////////////////////////////////////////////////////////////////////////////////////////////////\n\n[^] { return com.intellij.psi.TokenType.BAD_CHARACTER; }"
  },
  {
    "path": "plan9/src/com/plan9/intel/ide/highlighting/AsmIntelHighlightingLexer.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.plan9.intel.ide.highlighting;\n\nimport com.intellij.lexer.FlexAdapter;\nimport com.plan9.intel.lang.core.lexer._AsmIntelHighlightingLexer;\n\npublic class AsmIntelHighlightingLexer extends FlexAdapter {\n  public AsmIntelHighlightingLexer() {\n    super(new _AsmIntelHighlightingLexer());\n  }\n}\n"
  },
  {
    "path": "plan9/src/com/plan9/intel/ide/highlighting/AsmIntelLexerTokens.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.plan9.intel.ide.highlighting;\n\nimport com.intellij.psi.tree.IElementType;\nimport com.intellij.psi.tree.TokenSet;\nimport com.plan9.intel.lang.core.lexer.AsmIntelTokenType;\n\npublic class AsmIntelLexerTokens {\n  public static final IElementType LINE_COMMENT = new AsmIntelTokenType(\"LINE_COMMENT\");\n\n  public static final IElementType OPERATOR = new AsmIntelTokenType(\"operator\");\n  public static final IElementType PAREN = new AsmIntelTokenType(\"PAREN\");\n  public static final IElementType COLON = new AsmIntelTokenType(\":\");\n  public static final IElementType COMMA = new AsmIntelTokenType(\",\");\n\n  public static final IElementType FLAG = new AsmIntelTokenType(\"FLAG\");\n\n  public static final IElementType HEX = new AsmIntelTokenType(\"hex\");\n  public static final IElementType INT = new AsmIntelTokenType(\"int\");\n\n  public static final IElementType IDENTIFIER = new AsmIntelTokenType(\"identifier\");\n  public static final IElementType PREPROCESSOR = new AsmIntelTokenType(\"PREPROCESSOR\");\n  public static final IElementType PSEUDO_INS = new AsmIntelTokenType(\"PSEUDO_INS\");\n  public static final IElementType INSTRUCTION = new AsmIntelTokenType(\"INSTRUCTION\");\n  public static final IElementType LABEL = new AsmIntelTokenType(\"LABEL\");\n  public static final IElementType PSEUDO_REG = new AsmIntelTokenType(\"PSEUDO_REG\");\n  public static final IElementType REGISTER = new AsmIntelTokenType(\"REGISTER\");\n  public static final IElementType STRING = new AsmIntelTokenType(\"STRING\");\n\n  public static final IElementType DIRECTIVE = new AsmIntelTokenType(\"DIRECTIVE\");\n\n  public static final TokenSet KEYWORDS = TokenSet.create(DIRECTIVE);\n  public static final TokenSet NUMBERS = TokenSet.create(HEX, INT);\n  public static final TokenSet REGISTERS = TokenSet.create(PSEUDO_REG, REGISTER);\n\n  private AsmIntelLexerTokens() {}\n}\n"
  },
  {
    "path": "plan9/src/com/plan9/intel/ide/highlighting/AsmIntelSyntaxHighlighter.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.plan9.intel.ide.highlighting;\n\nimport com.intellij.lexer.Lexer;\nimport com.intellij.openapi.editor.colors.TextAttributesKey;\nimport com.intellij.openapi.fileTypes.SyntaxHighlighterBase;\nimport com.intellij.psi.tree.IElementType;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.Map;\n\nimport static com.plan9.intel.ide.highlighting.AsmIntelSyntaxHighlightingColors.*;\n\npublic class AsmIntelSyntaxHighlighter extends SyntaxHighlighterBase {\n\n  private static final Map<IElementType, TextAttributesKey> ATTRIBUTES = ContainerUtil.newHashMap();\n\n  static {\n    fillMap(ATTRIBUTES, LINE_COMMENT, AsmIntelLexerTokens.LINE_COMMENT);\n    fillMap(ATTRIBUTES, INSTRUCTION, AsmIntelLexerTokens.INSTRUCTION);\n    fillMap(ATTRIBUTES, PSEUDO_INSTRUCTION, AsmIntelLexerTokens.PSEUDO_INS);\n    fillMap(ATTRIBUTES, STRING, AsmIntelLexerTokens.STRING);\n    fillMap(ATTRIBUTES, LABEL, AsmIntelLexerTokens.LABEL);\n    fillMap(ATTRIBUTES, FLAG, AsmIntelLexerTokens.FLAG);\n    fillMap(ATTRIBUTES, OPERATOR, AsmIntelLexerTokens.OPERATOR);\n    fillMap(ATTRIBUTES, PARENTHESIS, AsmIntelLexerTokens.PAREN);\n    fillMap(ATTRIBUTES, IDENTIFIER, AsmIntelLexerTokens.IDENTIFIER);\n    fillMap(ATTRIBUTES, PREPROCESSOR, AsmIntelLexerTokens.PREPROCESSOR);\n\n    fillMap(ATTRIBUTES, AsmIntelLexerTokens.KEYWORDS, KEYWORD);\n    fillMap(ATTRIBUTES, AsmIntelLexerTokens.NUMBERS, NUMBER);\n    fillMap(ATTRIBUTES, AsmIntelLexerTokens.REGISTERS, REGISTER);\n  }\n\n  @NotNull\n  @Override\n  public Lexer getHighlightingLexer() {\n    return new AsmIntelHighlightingLexer();\n  }\n\n  @Override\n  @NotNull\n  public TextAttributesKey[] getTokenHighlights(IElementType tokenType) {\n    return pack(ATTRIBUTES.get(tokenType));\n  }\n}\n"
  },
  {
    "path": "plan9/src/com/plan9/intel/ide/highlighting/AsmIntelSyntaxHighlighterFactory.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan, Stuart Carnie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.plan9.intel.ide.highlighting;\n\nimport com.intellij.openapi.fileTypes.SyntaxHighlighter;\nimport com.intellij.openapi.fileTypes.SyntaxHighlighterFactory;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class AsmIntelSyntaxHighlighterFactory extends SyntaxHighlighterFactory {\n  @NotNull\n  @Override\n  public SyntaxHighlighter getSyntaxHighlighter(@Nullable Project project, @Nullable VirtualFile file) {\n    return new AsmIntelSyntaxHighlighter();\n  }\n}\n"
  },
  {
    "path": "plan9/src/com/plan9/intel/ide/highlighting/AsmIntelSyntaxHighlightingColors.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan, Stuart Carnie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.plan9.intel.ide.highlighting;\n\nimport com.intellij.openapi.editor.DefaultLanguageHighlighterColors;\nimport com.intellij.openapi.editor.colors.TextAttributesKey;\n\nimport static com.intellij.openapi.editor.colors.TextAttributesKey.createTextAttributesKey;\n\npublic class AsmIntelSyntaxHighlightingColors {\n  public static final TextAttributesKey LINE_COMMENT = createTextAttributesKey(\"com.plan9.LINE_COMMENT\", DefaultLanguageHighlighterColors.LINE_COMMENT);\n  public static final TextAttributesKey INSTRUCTION = createTextAttributesKey(\"com.plan9.INSTRUCTION\", DefaultLanguageHighlighterColors.PREDEFINED_SYMBOL);\n  public static final TextAttributesKey PSEUDO_INSTRUCTION = createTextAttributesKey(\"com.plan9.PSEUDO_INSTRUCTION\", INSTRUCTION);\n  public static final TextAttributesKey KEYWORD = createTextAttributesKey(\"com.plan9.KEYWORD\", DefaultLanguageHighlighterColors.KEYWORD);\n  public static final TextAttributesKey STRING = createTextAttributesKey(\"com.plan9.STRING\", DefaultLanguageHighlighterColors.STRING);\n  public static final TextAttributesKey NUMBER = createTextAttributesKey(\"com.plan9.NUMBER\", DefaultLanguageHighlighterColors.NUMBER);\n  public static final TextAttributesKey LABEL = createTextAttributesKey(\"com.plan9.LABEL\", DefaultLanguageHighlighterColors.LABEL);\n  public static final TextAttributesKey FLAG = createTextAttributesKey(\"com.plan9.FLAG\", DefaultLanguageHighlighterColors.GLOBAL_VARIABLE);\n  public static final TextAttributesKey REGISTER = createTextAttributesKey(\"com.plan9.REGISTER\", DefaultLanguageHighlighterColors.PARAMETER);\n  public static final TextAttributesKey PARENTHESIS = createTextAttributesKey(\"com.plan9.PARENTHESIS\", DefaultLanguageHighlighterColors.PARENTHESES);\n  public static final TextAttributesKey OPERATOR = createTextAttributesKey(\"com.plan9.OPERATOR\", DefaultLanguageHighlighterColors.OPERATION_SIGN);\n  public static final TextAttributesKey DIRECTIVE = createTextAttributesKey(\"com.plan9.DIRECTIVE\", DefaultLanguageHighlighterColors.KEYWORD);\n  public static final TextAttributesKey IDENTIFIER = createTextAttributesKey(\"com.plan9.IDENTIFIER\", DefaultLanguageHighlighterColors.IDENTIFIER);\n  public static final TextAttributesKey PREPROCESSOR = createTextAttributesKey(\"com.plan9.PREPROCESSOR\", DefaultLanguageHighlighterColors.KEYWORD);\n\n}\n"
  },
  {
    "path": "plan9/src/com/plan9/intel/lang/AsmIntelLanguage.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan, Stuart Carnie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.plan9.intel.lang;\n\nimport com.intellij.lang.Language;\n\npublic class AsmIntelLanguage extends Language {\n  public static final AsmIntelLanguage INSTANCE = new AsmIntelLanguage();\n\n  private AsmIntelLanguage() {\n    super(\"plan9_x86\");\n  }\n}\n"
  },
  {
    "path": "plan9/src/com/plan9/intel/lang/core/AsmIntelParserDefinition.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.plan9.intel.lang.core;\n\nimport com.intellij.lang.ASTNode;\nimport com.intellij.lang.Language;\nimport com.intellij.lang.ParserDefinition;\nimport com.intellij.lang.PsiParser;\nimport com.intellij.lexer.Lexer;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.psi.FileViewProvider;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.TokenType;\nimport com.intellij.psi.tree.IElementType;\nimport com.intellij.psi.tree.IFileElementType;\nimport com.intellij.psi.tree.TokenSet;\nimport com.plan9.intel.lang.AsmIntelLanguage;\nimport com.plan9.intel.lang.core.lexer.AsmIntelLexer;\nimport com.plan9.intel.lang.core.lexer.AsmIntelTokenType;\nimport com.plan9.intel.lang.core.parser.AsmIntelParser;\nimport com.plan9.intel.lang.core.psi.AsmIntelFile;\nimport org.jetbrains.annotations.NotNull;\n\nimport static com.plan9.intel.lang.core.psi.AsmIntelTypes.*;\n\npublic class AsmIntelParserDefinition implements ParserDefinition {\n\n  public static final IElementType LINE_COMMENT = new AsmIntelTokenType(\"LINE_COMMENT\");\n\n  private static final TokenSet WHITE_SPACES = TokenSet.create(TokenType.WHITE_SPACE);\n\n  private static final TokenSet COMMENTS = TokenSet.create(LINE_COMMENT);\n  public static final TokenSet KEYWORDS = TokenSet.create(TEXT);\n  public static final TokenSet NUMBERS = TokenSet.create(HEX, INT);\n  public static final TokenSet REGISTERS = TokenSet.create(PSEUDO_REG);\n\n  public static final IFileElementType FILE = new IFileElementType(Language.findInstance(AsmIntelLanguage.class));\n\n  @NotNull\n  @Override\n  public Lexer createLexer(Project project) {\n    return new AsmIntelLexer();\n  }\n\n  @Override\n  @NotNull\n  public TokenSet getWhitespaceTokens() {\n    return WHITE_SPACES;\n  }\n\n  @Override\n  @NotNull\n  public TokenSet getCommentTokens() {\n    return COMMENTS;\n  }\n\n  @Override\n  @NotNull\n  public TokenSet getStringLiteralElements() {\n    return TokenSet.EMPTY;\n  }\n\n  @Override\n  @NotNull\n  public PsiParser createParser(Project project) {\n    return new AsmIntelParser();\n  }\n\n  @Override\n  public IFileElementType getFileNodeType() {\n    return FILE;\n  }\n\n  @Override\n  public PsiFile createFile(FileViewProvider viewProvider) {\n    return new AsmIntelFile(viewProvider);\n  }\n\n  @Override\n  public SpaceRequirements spaceExistanceTypeBetweenTokens(ASTNode left, ASTNode right) {\n    return SpaceRequirements.MAY;\n  }\n\n  @Override\n  @NotNull\n  public PsiElement createElement(ASTNode node) {\n    return Factory.createElement(node);\n  }\n}\n"
  },
  {
    "path": "plan9/src/com/plan9/intel/lang/core/grammar/x86.bnf",
    "content": "{\n  parserClass=\"com.plan9.intel.lang.core.parser.AsmIntelParser\"\n\n  extends='com.plan9.intel.lang.core.psi.impl.AsmIntelElementImpl'\n  extends=\"com.intellij.extapi.psi.ASTWrapperPsiElement\"\n\n  psiClassPrefix=\"AsmIntel\"\n  psiImplClassSuffix=\"Impl\"\n  psiPackage=\"com.plan9.intel.lang.core.psi\"\n  psiImplPackage=\"com.plan9.intel.lang.core.psi.impl\"\n\n  elementTypeHolderClass=\"com.plan9.intel.lang.core.psi.AsmIntelTypes\"\n  elementTypeClass=\"com.plan9.intel.lang.core.psi.AsmIntelElementType\"\n  tokenTypeClass=\"com.plan9.intel.lang.core.lexer.AsmIntelTokenType\"\n\n  tokens = [\n    COLON               = ':'\n    LPAREN              = '('\n    RPAREN              = ')'\n    COMMA               = ','\n    COMMA               = ','\n    BIT_OR              = '|'\n  ]\n}\n\nFile ::= Statement*\nStatement ::= PreprocessorDirective | Function\nPreprocessorDirective ::= import STRING\nFunction ::= FunctionHeader FunctionBody\nFunctionHeader ::= TEXT identifier '(' PSEUDO_REG ')' ',' FunctionFlags [',' FrameSize]\nFunctionFlags ::= FLAG | '(' FLAG ( '|' FLAG )* ')'\nFrameSize ::= '$' Literal ['-' Literal]\nFunctionBody ::= ( InstructionStmt | LABEL )*\nInstructionStmt ::= INSTRUCTION Operands\nOperands ::=\nLiteral ::= int | hex\n"
  },
  {
    "path": "plan9/src/com/plan9/intel/lang/core/lexer/AsmIntelLexer.flex",
    "content": "package com.plan9.intel.lang.core.lexer;\n\nimport com.intellij.lexer.FlexLexer;\nimport com.intellij.psi.tree.IElementType;\nimport com.plan9.intel.lang.core.psi.AsmIntelTypes;\nimport com.intellij.psi.TokenType;\nimport static com.plan9.intel.lang.core.AsmIntelParserDefinition.*;\n\n%%\n\n%public\n%class _AsmIntelLexer\n%implements FlexLexer, AsmIntelTypes\n%unicode\n%function advance\n%type IElementType\n\n%{\n  public _AsmIntelLexer() {\n    this((java.io.Reader)null);\n  }\n%}\n\nWSNL          = [ \\r\\n\\t]+\nWS            = [ \\t\\f]\nLINE_COMMENT  = \"//\" [^\\r\\n]*\nSTR           = \"\\\"\"\nLETTER        = [:letter:] | \"_\"\nDIGIT         = [:digit:]\n\nHEX_DIGIT     = [0-9A-Fa-f]\nINT_DIGIT     = [0-9]\n\nNUM_INT       = \"0\" | ([1-9] {INT_DIGIT}*)\nNUM_HEX       = (\"0x\" | \"0X\") {HEX_DIGIT}+\n\nIDENT         = {LETTER} ( {LETTER} | {DIGIT} )*\n\nLABEL         = {IDENT} \":\"\n\nPSEUDO_REG    = \"FP\" | \"PC\" | \"SB\" | \"SP\"\n\nINS           = \"AAA\" | \"AAD\" | \"AAM\" | \"AAS\" | \"ADCB\" | \"ADCL\" | \"ADCW\" | \"ADDB\" | \"ADDL\" | \"ADDW\" | \"ADJSP\" | \"ANDB\" | \"ANDL\" | \"ANDW\" | \"ARPL\" | \"BOUNDL\"\n                | \"BOUNDW\" | \"BSFL\" | \"BSFW\" | \"BSRL\" | \"BSRW\" | \"BTL\" | \"BTW\" | \"BTCL\" | \"BTCW\" | \"BTRL\" | \"BTRW\" | \"BTSL\" | \"BTSW\" | \"BYTE\" | \"CLC\" |\n                \"CLD\" | \"CLI\" | \"CLTS\" | \"CMC\" | \"CMPB\" | \"CMPL\" | \"CMPW\" | \"CMPSB\" | \"CMPSL\" | \"CMPSW\" | \"DAA\" | \"DAS\" | \"DECB\" | \"DECL\" | \"DECQ\" | \"DECW\"\n                | \"DIVB\" | \"DIVL\" | \"DIVW\" | \"ENTER\" | \"HLT\" | \"IDIVB\" | \"IDIVL\" | \"IDIVW\" | \"IMULB\" | \"IMULL\" | \"IMULW\" | \"INB\" | \"INL\" | \"INW\" | \"INCB\" |\n                \"INCL\" | \"INCQ\" | \"INCW\" | \"INSB\" | \"INSL\" | \"INSW\" | \"INT\" | \"INTO\" | \"IRETL\" | \"IRETW\" | \"JCC\" | \"JCS\" | \"JCXZL\" | \"JEQ\" | \"JGE\" | \"JGT\" |\n                \"JHI\" | \"JLE\" | \"JLS\" | \"JLT\" | \"JMI\" | \"JNE\" | \"JOC\" | \"JOS\" | \"JPC\" | \"JPL\" | \"JPS\" | \"LAHF\" | \"LARL\" | \"LARW\" | \"LEAL\" | \"LEAW\" |\n                \"LEAVEL\" | \"LEAVEW\" | \"LOCK\" | \"LODSB\" | \"LODSL\" | \"LODSW\" | \"LONG\" | \"LOOP\" | \"LOOPEQ\" | \"LOOPNE\" | \"LSLL\" | \"LSLW\" | \"MOVB\" | \"MOVL\" |\n                \"MOVW\" | \"MOVBLSX\" | \"MOVBLZX\" | \"MOVBQSX\" | \"MOVBQZX\" | \"MOVBWSX\" | \"MOVBWZX\" | \"MOVWLSX\" | \"MOVWLZX\" | \"MOVWQSX\" | \"MOVWQZX\" | \"MOVSB\" |\n                \"MOVSL\" | \"MOVSW\" | \"MULB\" | \"MULL\" | \"MULW\" | \"NEGB\" | \"NEGL\" | \"NEGW\" | \"NOTB\" | \"NOTL\" | \"NOTW\" | \"ORB\" | \"ORL\" | \"ORW\" | \"OUTB\" | \"OUTL\"\n                | \"OUTW\" | \"OUTSB\" | \"OUTSL\" | \"OUTSW\" | \"PAUSE\" | \"POPAL\" | \"POPAW\" | \"POPFL\" | \"POPFW\" | \"POPL\" | \"POPW\" | \"PUSHAL\" | \"PUSHAW\" | \"PUSHFL\"\n                | \"PUSHFW\" | \"PUSHL\" | \"PUSHW\" | \"RCLB\" | \"RCLL\" | \"RCLW\" | \"RCRB\" | \"RCRL\" | \"RCRW\" | \"REP\" | \"REPN\" | \"ROLB\" | \"ROLL\" | \"ROLW\" | \"RORB\" |\n                \"RORL\" | \"RORW\" | \"SAHF\" | \"SALB\" | \"SALL\" | \"SALW\" | \"SARB\" | \"SARL\" | \"SARW\" | \"SBBB\" | \"SBBL\" | \"SBBW\" | \"SCASB\" | \"SCASL\" | \"SCASW\" |\n                \"SETCC\" | \"SETCS\" | \"SETEQ\" | \"SETGE\" | \"SETGT\" | \"SETHI\" | \"SETLE\" | \"SETLS\" | \"SETLT\" | \"SETMI\" | \"SETNE\" | \"SETOC\" | \"SETOS\" | \"SETPC\" |\n                \"SETPL\" | \"SETPS\" | \"CDQ\" | \"CWD\" | \"SHLB\" | \"SHLL\" | \"SHLW\" | \"SHRB\" | \"SHRL\" | \"SHRW\" | \"STC\" | \"STD\" | \"STI\" | \"STOSB\" | \"STOSL\" |\n                \"STOSW\" | \"SUBB\" | \"SUBL\" | \"SUBW\" | \"SYSCALL\" | \"TESTB\" | \"TESTL\" | \"TESTW\" | \"VERR\" | \"VERW\" | \"WAIT\" | \"WORD\" | \"XCHGB\" | \"XCHGL\" |\n                \"XCHGW\" | \"XLAT\" | \"XORB\" | \"XORL\" | \"XORW\" | \"FMOVB\" | \"FMOVBP\" | \"FMOVD\" | \"FMOVDP\" | \"FMOVF\" | \"FMOVFP\" | \"FMOVL\" | \"FMOVLP\" | \"FMOVV\" |\n                \"FMOVVP\" | \"FMOVW\" | \"FMOVWP\" | \"FMOVX\" | \"FMOVXP\" | \"FCOMB\" | \"FCOMBP\" | \"FCOMD\" | \"FCOMDP\" | \"FCOMDPP\" | \"FCOMF\" | \"FCOMFP\" | \"FCOML\" |\n                \"FCOMLP\" | \"FCOMW\" | \"FCOMWP\" | \"FUCOM\" | \"FUCOMP\" | \"FUCOMPP\" | \"FADDDP\" | \"FADDW\" | \"FADDL\" | \"FADDF\" | \"FADDD\" | \"FMULDP\" | \"FMULW\" |\n                \"FMULL\" | \"FMULF\" | \"FMULD\" | \"FSUBDP\" | \"FSUBW\" | \"FSUBL\" | \"FSUBF\" | \"FSUBD\" | \"FSUBRDP\" | \"FSUBRW\" | \"FSUBRL\" | \"FSUBRF\" | \"FSUBRD\" |\n                \"FDIVDP\" | \"FDIVW\" | \"FDIVL\" | \"FDIVF\" | \"FDIVD\" | \"FDIVRDP\" | \"FDIVRW\" | \"FDIVRL\" | \"FDIVRF\" | \"FDIVRD\" | \"FXCHD\" | \"FFREE\" | \"FLDCW\" |\n                \"FLDENV\" | \"FRSTOR\" | \"FSAVE\" | \"FSTCW\" | \"FSTENV\" | \"FSTSW\" | \"F2XM1\" | \"FABS\" | \"FCHS\" | \"FCLEX\" | \"FCOS\" | \"FDECSTP\" | \"FINCSTP\" |\n                \"FINIT\" | \"FLD1\" | \"FLDL2E\" | \"FLDL2T\" | \"FLDLG2\" | \"FLDLN2\" | \"FLDPI\" | \"FLDZ\" | \"FNOP\" | \"FPATAN\" | \"FPREM\" | \"FPREM1\" | \"FPTAN\" |\n                \"FRNDINT\" | \"FSCALE\" | \"FSIN\" | \"FSINCOS\" | \"FSQRT\" | \"FTST\" | \"FXAM\" | \"FXTRACT\" | \"FYL2X\" | \"FYL2XP1\" | \"CMPXCHGB\" | \"CMPXCHGL\" |\n                \"CMPXCHGW\" | \"CMPXCHG8B\" | \"CPUID\" | \"INVD\" | \"INVLPG\" | \"LFENCE\" | \"MFENCE\" | \"MOVNTIL\" | \"RDMSR\" | \"RDPMC\" | \"RDTSC\" | \"RSM\" | \"SFENCE\" |\n                \"SYSRET\" | \"WBINVD\" | \"WRMSR\" | \"XADDB\" | \"XADDL\" | \"XADDW\" | \"CMOVLCC\" | \"CMOVLCS\" | \"CMOVLEQ\" | \"CMOVLGE\" | \"CMOVLGT\" | \"CMOVLHI\" |\n                \"CMOVLLE\" | \"CMOVLLS\" | \"CMOVLLT\" | \"CMOVLMI\" | \"CMOVLNE\" | \"CMOVLOC\" | \"CMOVLOS\" | \"CMOVLPC\" | \"CMOVLPL\" | \"CMOVLPS\" | \"CMOVQCC\" |\n                \"CMOVQCS\" | \"CMOVQEQ\" | \"CMOVQGE\" | \"CMOVQGT\" | \"CMOVQHI\" | \"CMOVQLE\" | \"CMOVQLS\" | \"CMOVQLT\" | \"CMOVQMI\" | \"CMOVQNE\" | \"CMOVQOC\" |\n                \"CMOVQOS\" | \"CMOVQPC\" | \"CMOVQPL\" | \"CMOVQPS\" | \"CMOVWCC\" | \"CMOVWCS\" | \"CMOVWEQ\" | \"CMOVWGE\" | \"CMOVWGT\" | \"CMOVWHI\" | \"CMOVWLE\" |\n                \"CMOVWLS\" | \"CMOVWLT\" | \"CMOVWMI\" | \"CMOVWNE\" | \"CMOVWOC\" | \"CMOVWOS\" | \"CMOVWPC\" | \"CMOVWPL\" | \"CMOVWPS\" | \"ADCQ\" | \"ADDQ\" | \"ANDQ\" |\n                \"BSFQ\" | \"BSRQ\" | \"BTCQ\" | \"BTQ\" | \"BTRQ\" | \"BTSQ\" | \"CMPQ\" | \"CMPSQ\" | \"CMPXCHGQ\" | \"CQO\" | \"DIVQ\" | \"IDIVQ\" | \"IMULQ\" | \"IRETQ\" | \"JCXZQ\"\n                | \"LEAQ\" | \"LEAVEQ\" | \"LODSQ\" | \"MOVQ\" | \"MOVLQSX\" | \"MOVLQZX\" | \"MOVNTIQ\" | \"MOVSQ\" | \"MULQ\" | \"NEGQ\" | \"NOTQ\" | \"ORQ\" | \"POPFQ\" | \"POPQ\" |\n                \"PUSHFQ\" | \"PUSHQ\" | \"RCLQ\" | \"RCRQ\" | \"ROLQ\" | \"RORQ\" | \"QUAD\" | \"SALQ\" | \"SARQ\" | \"SBBQ\" | \"SCASQ\" | \"SHLQ\" | \"SHRQ\" | \"STOSQ\" | \"SUBQ\" |\n                \"TESTQ\" | \"XADDQ\" | \"XCHGQ\" | \"XORQ\" | \"ADDPD\" | \"ADDPS\" | \"ADDSD\" | \"ADDSS\" | \"ANDNPD\" | \"ANDNPS\" | \"ANDPD\" | \"ANDPS\" | \"CMPPD\" | \"CMPPS\" |\n                \"CMPSD\" | \"CMPSS\" | \"COMISD\" | \"COMISS\" | \"CVTPD2PL\" | \"CVTPD2PS\" | \"CVTPL2PD\" | \"CVTPL2PS\" | \"CVTPS2PD\" | \"CVTPS2PL\" | \"CVTSD2SL\" |\n                \"CVTSD2SQ\" | \"CVTSD2SS\" | \"CVTSL2SD\" | \"CVTSL2SS\" | \"CVTSQ2SD\" | \"CVTSQ2SS\" | \"CVTSS2SD\" | \"CVTSS2SL\" | \"CVTSS2SQ\" | \"CVTTPD2PL\" |\n                \"CVTTPS2PL\" | \"CVTTSD2SL\" | \"CVTTSD2SQ\" | \"CVTTSS2SL\" | \"CVTTSS2SQ\" | \"DIVPD\" | \"DIVPS\" | \"DIVSD\" | \"DIVSS\" | \"EMMS\" | \"FXRSTOR\" |\n                \"FXRSTOR64\" | \"FXSAVE\" | \"FXSAVE64\" | \"LDMXCSR\" | \"MASKMOVOU\" | \"MASKMOVQ\" | \"MAXPD\" | \"MAXPS\" | \"MAXSD\" | \"MAXSS\" | \"MINPD\" | \"MINPS\" |\n                \"MINSD\" | \"MINSS\" | \"MOVAPD\" | \"MOVAPS\" | \"MOVOU\" | \"MOVHLPS\" | \"MOVHPD\" | \"MOVHPS\" | \"MOVLHPS\" | \"MOVLPD\" | \"MOVLPS\" | \"MOVMSKPD\" |\n                \"MOVMSKPS\" | \"MOVNTO\" | \"MOVNTPD\" | \"MOVNTPS\" | \"MOVNTQ\" | \"MOVO\" | \"MOVQOZX\" | \"MOVSD\" | \"MOVSS\" | \"MOVUPD\" | \"MOVUPS\" | \"MULPD\" | \"MULPS\"\n                | \"MULSD\" | \"MULSS\" | \"ORPD\" | \"ORPS\" | \"PACKSSLW\" | \"PACKSSWB\" | \"PACKUSWB\" | \"PADDB\" | \"PADDL\" | \"PADDQ\" | \"PADDSB\" | \"PADDSW\" | \"PADDUSB\"\n                | \"PADDUSW\" | \"PADDW\" | \"PANDB\" | \"PANDL\" | \"PANDSB\" | \"PANDSW\" | \"PANDUSB\" | \"PANDUSW\" | \"PANDW\" | \"PAND\" | \"PANDN\" | \"PAVGB\" | \"PAVGW\" |\n                \"PCMPEQB\" | \"PCMPEQL\" | \"PCMPEQW\" | \"PCMPGTB\" | \"PCMPGTL\" | \"PCMPGTW\" | \"PEXTRW\" | \"PFACC\" | \"PFADD\" | \"PFCMPEQ\" | \"PFCMPGE\" | \"PFCMPGT\" |\n                \"PFMAX\" | \"PFMIN\" | \"PFMUL\" | \"PFNACC\" | \"PFPNACC\" | \"PFRCP\" | \"PFRCPIT1\" | \"PFRCPI2T\" | \"PFRSQIT1\" | \"PFRSQRT\" | \"PFSUB\" | \"PFSUBR\" |\n                \"PINSRW\" | \"PINSRD\" | \"PINSRQ\" | \"PMADDWL\" | \"PMAXSW\" | \"PMAXUB\" | \"PMINSW\" | \"PMINUB\" | \"PMOVMSKB\" | \"PMULHRW\" | \"PMULHUW\" | \"PMULHW\" |\n                \"PMULLW\" | \"PMULULQ\" | \"POR\" | \"PSADBW\" | \"PSHUFHW\" | \"PSHUFL\" | \"PSHUFLW\" | \"PSHUFW\" | \"PSHUFB\" | \"PSLLO\" | \"PSLLL\" | \"PSLLQ\" | \"PSLLW\" |\n                \"PSRAL\" | \"PSRAW\" | \"PSRLO\" | \"PSRLL\" | \"PSRLQ\" | \"PSRLW\" | \"PSUBB\" | \"PSUBL\" | \"PSUBQ\" | \"PSUBSB\" | \"PSUBSW\" | \"PSUBUSB\" | \"PSUBUSW\" |\n                \"PSUBW\" | \"PSWAPL\" | \"PUNPCKHBW\" | \"PUNPCKHLQ\" | \"PUNPCKHQDQ\" | \"PUNPCKHWL\" | \"PUNPCKLBW\" | \"PUNPCKLLQ\" | \"PUNPCKLQDQ\" | \"PUNPCKLWL\" |\n                \"PXOR\" | \"RCPPS\" | \"RCPSS\" | \"RSQRTPS\" | \"RSQRTSS\" | \"SHUFPD\" | \"SHUFPS\" | \"SQRTPD\" | \"SQRTPS\" | \"SQRTSD\" | \"SQRTSS\" | \"STMXCSR\" | \"SUBPD\" |\n                \"SUBPS\" | \"SUBSD\" | \"SUBSS\" | \"UCOMISD\" | \"UCOMISS\" | \"UNPCKHPD\" | \"UNPCKHPS\" | \"UNPCKLPD\" | \"UNPCKLPS\" | \"XORPD\" | \"XORPS\" | \"PF2IW\" |\n                \"PF2IL\" | \"PI2FW\" | \"PI2FL\" | \"RETFW\" | \"RETFL\" | \"RETFQ\" | \"SWAPGS\" | \"MODE\" | \"CRC32B\" | \"CRC32Q\" | \"IMUL3Q\" | \"PREFETCHT0\" | \"PREFETCHT1\"\n                | \"PREFETCHT2\" | \"PREFETCHNTA\" | \"MOVQL\" | \"BSWAPL\" | \"BSWAPQ\" | \"AESENC\" | \"AESENCLAST\" | \"AESDEC\" | \"AESDECLAST\" | \"AESIMC\" |\n                \"AESKEYGENASSIST\" | \"ROUNDPS\" | \"ROUNDSS\" | \"ROUNDPD\" | \"ROUNDSD\" | \"PSHUFD\" | \"PCLMULQDQ\" | \"VZEROUPPER\" | \"MOVHDU\" | \"MOVNTHD\" | \"MOVHDA\"\n                | \"VPCMPEQB\" | \"VPXOR\" | \"VPMOVMSKB\" | \"VPAND\" | \"VPTEST\" | \"VPBROADCASTB\" | \"JCXZW\" | \"FCMOVCC\" | \"FCMOVCS\" | \"FCMOVEQ\" | \"FCMOVHI\" |\n                \"FCMOVLS\" | \"FCMOVNE\" | \"FCMOVNU\" | \"FCMOVUN\" | \"FCOMI\" | \"FCOMIP\" | \"FUCOMI\" | \"FUCOMIP\" | \"XACQUIRE\" | \"XRELEASE\" | \"XBEGIN\" | \"XEND\" |\n                \"XABORT\" | \"XTEST\" | \"LAST\"\n\nFLAG          = \"NOPROF\" | \"DUPOK\" | \"NOSPLIT\" | \"RODATA\" | \"NOPTR\" | \"WRAPPER\" | \"NEEDCTXT\" | \"TLSBSS\" | \"NOFRAME\"\n\n%%\n\n\"#import\"             { return IMPORT; }\n\"TEXT\"                { return TEXT; }\n\n{FLAG}                { return FLAG; }\n{PSEUDO_REG}          { return PSEUDO_REG; }\n{INS}                 { return INSTRUCTION; }\n{LINE_COMMENT}        { return LINE_COMMENT; }\n{WS}                  { return TokenType.WHITE_SPACE; }\n{WSNL}                { return TokenType.WHITE_SPACE; }\n{LABEL}               { return LABEL; }\n\":\"                   { return COLON; }\n\"(\"                   { return LPAREN; }\n\")\"                   { return RPAREN; }\n\",\"                   { return COMMA; }\n\"|\"                   { return BIT_OR; }\n\n{NUM_HEX}             { return HEX; }\n{NUM_INT}             { return INT; }\n\n{IDENT}               { return IDENTIFIER; }\n\n{STR} [^\\\"]* {STR}    { return STRING; }\n\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Catch All\n///////////////////////////////////////////////////////////////////////////////////////////////////\n\n[^] { return com.intellij.psi.TokenType.BAD_CHARACTER; }"
  },
  {
    "path": "plan9/src/com/plan9/intel/lang/core/lexer/AsmIntelLexer.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.plan9.intel.lang.core.lexer;\n\nimport com.intellij.lexer.FlexAdapter;\n\npublic class AsmIntelLexer extends FlexAdapter {\n  public AsmIntelLexer() {\n    super(new _AsmIntelLexer());\n  }\n}\n"
  },
  {
    "path": "plan9/src/com/plan9/intel/lang/core/lexer/AsmIntelTokenType.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan, Stuart Carnie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.plan9.intel.lang.core.lexer;\n\nimport com.plan9.intel.lang.AsmIntelLanguage;\nimport com.intellij.psi.tree.IElementType;\nimport org.jetbrains.annotations.NonNls;\nimport org.jetbrains.annotations.NotNull;\n\npublic class AsmIntelTokenType extends IElementType {\n  public AsmIntelTokenType(@NotNull @NonNls String debugName) {\n    super(debugName, AsmIntelLanguage.INSTANCE);\n  }\n}\n"
  },
  {
    "path": "plan9/src/com/plan9/intel/lang/core/psi/AsmIntelElementType.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan, Stuart Carnie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.plan9.intel.lang.core.psi;\n\nimport com.plan9.intel.lang.AsmIntelLanguage;\nimport com.intellij.psi.tree.IElementType;\nimport org.jetbrains.annotations.NonNls;\nimport org.jetbrains.annotations.NotNull;\n\npublic class AsmIntelElementType extends IElementType {\n  public AsmIntelElementType(@NotNull @NonNls String debugName) {\n    super(debugName, AsmIntelLanguage.INSTANCE);\n  }\n}\n"
  },
  {
    "path": "plan9/src/com/plan9/intel/lang/core/psi/AsmIntelFile.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.plan9.intel.lang.core.psi;\n\nimport com.intellij.extapi.psi.PsiFileBase;\nimport com.intellij.openapi.fileTypes.FileType;\nimport com.intellij.psi.FileViewProvider;\nimport com.plan9.intel.AsmIntelFileType;\nimport com.plan9.intel.lang.AsmIntelLanguage;\nimport org.jetbrains.annotations.NotNull;\n\npublic class AsmIntelFile extends PsiFileBase {\n  public AsmIntelFile(@NotNull FileViewProvider viewProvider) {\n    super(viewProvider, AsmIntelLanguage.INSTANCE);\n  }\n\n  @NotNull\n  @Override\n  public FileType getFileType() {\n    return AsmIntelFileType.INSTANCE;\n  }\n\n  @Override\n  public String toString() {\n    return \"x86 File\";\n  }\n}\n"
  },
  {
    "path": "plan9/src/com/plan9/intel/lang/core/psi/impl/AsmIntelElementImpl.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan, Stuart Carnie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.plan9.intel.lang.core.psi.impl;\n\nimport com.intellij.extapi.psi.ASTWrapperPsiElement;\nimport com.intellij.lang.ASTNode;\nimport org.jetbrains.annotations.NotNull;\n\npublic class AsmIntelElementImpl extends ASTWrapperPsiElement {\n  public AsmIntelElementImpl(@NotNull ASTNode node) {\n    super(node);\n  }\n\n  @Override\n  public String toString() {\n    return getNode().getElementType().toString();\n  }\n}\n"
  },
  {
    "path": "plan9/testData/intel/lexer/commentsAndWhitespace.s",
    "content": "// a comment line\n\n#import \"a-file.h\"\n\n// another comment line\n"
  },
  {
    "path": "plan9/testData/intel/lexer/commentsAndWhitespace.txt",
    "content": "LINE_COMMENT ('// a comment line')\nWHITE_SPACE ('\\n\\n')\nimport ('#import')\nWHITE_SPACE (' ')\nSTRING ('\"a-file.h\"')\nWHITE_SPACE ('\\n\\n')\nLINE_COMMENT ('// another comment line')\n"
  },
  {
    "path": "plan9/testData/intel/lexer/identifiers.s",
    "content": "loop:\n"
  },
  {
    "path": "plan9/testData/intel/lexer/identifiers.txt",
    "content": "LABEL ('loop:')"
  },
  {
    "path": "plan9/testData/intel/lexer/simpleFile.s",
    "content": "// Copyright 2015 The Go Authors.  All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// This input was created by taking the instruction productions in\n// the old assembler's (6a's) grammar and hand-writing complete\n// instructions for each rule, to guarantee we cover the same space.\n\n#import \"a-file.h\"\n\nTEXT\tfoo(SB), 0, $0\n\n// LTYPE1 nonrem\t{ outcode($1, &$2); }\n\tNEGQ\tR11\n\tNEGQ\t4(R11)\n\tNEGQ\tfoo+4(SB)\n\n// LTYPE2 rimnon\t{ outcode($1, &$2); }\n\tINT\t$4\n\tDIVB\tR11\n\tDIVB\t4(R11)\n\tDIVB\tfoo+4(SB)\n\n// LTYPE3 rimrem\t{ outcode($1, &$2); }\n\tSUBQ $4, DI\n\tSUBQ R11, DI\n\tSUBQ 4(R11), DI\n\tSUBQ foo+4(SB), DI\n\tSUBQ $4, 8(R12)\n\tSUBQ R11, 8(R12)\n\tSUBQ R11, foo+4(SB)\n\n// LTYPE4 remrim\t{ outcode($1, &$2); }\n\tCMPB\tCX, $4\n\n// LTYPER nonrel\t{ outcode($1, &$2); }\nlabel:\n\tJB\t-4(PC)\n\tJB\tlabel\n\n// LTYPEC spec3\t{ outcode($1, &$2); }\n\tJMP\t-4(PC)\n\tJMP\tlabel\n\tJMP\tfoo+4(SB)\n\tJMP\tbar<>+4(SB)\n\tJMP\tbar<>+4(SB)(R11*4)\n\tJMP\t*4(SP)\n\tJMP\t*(R12)\n\tJMP\t*(R12*4)\n\tJMP\t*(R12)(R13*4)\n\tJMP\t*(AX)\n\tJMP\t*(SP)\n\tJMP\t*(AX*4)\n\tJMP\t*(AX)(AX*4)\n\tJMP\t4(SP)\n\tJMP\t(R12)\n\tJMP\t(R12*4)\n\tJMP\t(R12)(R13*4)\n\tJMP\t(AX)\n\tJMP\t(SP)\n\tJMP\t(AX*4)\n\tJMP\t(AX)(AX*4)\n\tJMP\tR13\n\n// LTYPEN spec4\t{ outcode($1, &$2); }\n\tNOP\n\tNOP\tAX\n\tNOP\tfoo+4(SB)\n\n// LTYPES spec5\t{ outcode($1, &$2); }\n\tSHLL\tR11, R12\n\tSHLL\tR11, foo+4(SB)\n\tSHLL\tR11, R11:AX // Old syntax, still accepted.\n\n// LTYPEM spec6\t{ outcode($1, &$2); }\n\tMOVL\tAX, R11\n\tMOVL\t$4, R11\n\tMOVL\tAX, AX:CS\n\n// LTYPEI spec7\t{ outcode($1, &$2); }\n\tIMULB\t$4\n\tIMULB\tR11\n\tIMULB\t$4, R11\n\tIMULB\tR11, R12\n\tIMULB\tR11, foo+4(SB)\n\n// LTYPEXC spec8\t{ outcode($1, &$2); }\n\tCMPPD\tR11, R12, 4\n\tCMPPD\tR11, foo+4(SB), 4\n\n// LTYPEX spec9\t{ outcode($1, &$2); }\n\tPINSRW\t$4, R11, AX\n\tPINSRW\t$4, foo+4(SB), AX\n\n// LTYPERT spec10\t{ outcode($1, &$2); }\n\tRETFL\t$4\n\n// Was bug: LOOP is a branch instruction.\nloop:\n\tLOOP\tloop\n\n// LTYPE0 nonnon\t{ outcode($1, &$2); }\n\tRET\n"
  },
  {
    "path": "plan9/testData/intel/lexer/simpleFile.txt",
    "content": "var ('var')\nGO_WHITESPACE (' ')\n( ('(')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nidentifier ('ToBe')\nGO_WHITESPACE ('   ')\nidentifier ('bool')\nGO_WHITESPACE ('       ')\n= ('=')\nGO_WHITESPACE (' ')\nidentifier ('false')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nidentifier ('MaxInt')\nGO_WHITESPACE (' ')\nidentifier ('uint64')\nGO_WHITESPACE ('     ')\n= ('=')\nGO_WHITESPACE (' ')\nint ('1')\n<< ('<<')\nint ('64')\nGO_WHITESPACE (' ')\n- ('-')\nGO_WHITESPACE (' ')\nint ('1')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nidentifier ('z')\nGO_WHITESPACE ('      ')\nidentifier ('complex128')\nGO_WHITESPACE (' ')\n= ('=')\nGO_WHITESPACE (' ')\nidentifier ('cmplx')\n. ('.')\nidentifier ('Sqrt')\n( ('(')\n- ('-')\nint ('5')\nGO_WHITESPACE (' ')\n+ ('+')\nGO_WHITESPACE (' ')\ndecimali ('12i')\n) (')')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\n) (')')\n"
  },
  {
    "path": "plan9/testData/intel/parser/SingleFunction.s",
    "content": "\n// foo()\nTEXT foo(SB),(NOSPLIT|NOPROF)\n\nloop:\n  MOVL\n\n"
  },
  {
    "path": "plan9/testData/intel/parser/SingleFunction.txt",
    "content": "x86 File\n  PsiComment(LINE_COMMENT)('// foo()')\n  STATEMENT\n    FUNCTION\n      FUNCTION_HEADER\n        PsiElement(TEXT)('TEXT')\n        PsiElement(identifier)('foo')\n        PsiElement(()('(')\n        PsiElement(PSEUDO_REG)('SB')\n        PsiElement())(')')\n        PsiElement(,)(',')\n        FUNCTION_FLAGS\n          PsiElement(()('(')\n          PsiElement(FLAG)('NOSPLIT')\n          PsiElement(|)('|')\n          PsiElement(FLAG)('NOPROF')\n          PsiElement())(')')\n      FUNCTION_BODY\n        PsiElement(LABEL)('loop:')\n        INSTRUCTION_STMT\n          PsiElement(INSTRUCTION)('MOVL')\n          OPERANDS\n            <empty list>"
  },
  {
    "path": "plan9/tests/com/plan9/intel/lang/core/lexer/AsmIntelLexerTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.plan9.intel.lang.core.lexer;\n\nimport com.intellij.lexer.Lexer;\nimport com.intellij.openapi.util.io.FileUtil;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.testFramework.LexerTestCase;\n\nimport java.io.File;\nimport java.io.IOException;\n\npublic class AsmIntelLexerTest extends LexerTestCase {\n  private static final String PATH = \"testData/intel/lexer\";\n\n  public void _testSimpleFile()           { doTest(); }\n  public void testCommentsAndWhitespace() { doTest(); }\n  public void testIdentifiers()           { doTest(); }\n\n  private void doTest() {\n    try {\n      String text = FileUtil.loadFile(new File(\"./\" + PATH + \"/\" + getTestName(true) + \".s\"));\n      String actual = printTokens(StringUtil.convertLineSeparators(text.trim()), 0);\n      assertSameLinesWithFile(new File(PATH + \"/\" + getTestName(true) + \".txt\").getAbsolutePath(), actual);\n    } catch (IOException e) {\n      throw new RuntimeException(e);\n    }\n  }\n\n  @Override\n  protected Lexer createLexer() {\n    return new AsmIntelLexer();\n  }\n\n  @Override\n  protected String getDirPath() {\n    return \"../\" + PATH;\n  }\n}"
  },
  {
    "path": "plan9/tests/com/plan9/intel/lang/core/parser/AsmIntelParserTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.plan9.intel.lang.core.parser;\n\nimport com.intellij.testFramework.ParsingTestCase;\nimport com.plan9.intel.lang.core.AsmIntelParserDefinition;\nimport org.jetbrains.annotations.NotNull;\n\npublic class AsmIntelParserTest extends ParsingTestCase {\n  public AsmIntelParserTest() {\n    super(\"parser\", \"s\", new AsmIntelParserDefinition());\n  }\n\n  @NotNull\n  @Override\n  protected String getTestDataPath() {\n    return \"testData/intel\";\n  }\n\n  @Override\n  protected boolean skipSpaces() {\n    return true;\n  }\n\n  @Override\n  protected void doTest(boolean checkErrors) {\n    super.doTest(true);\n    if (checkErrors) {\n      assertFalse(\n        \"PsiFile contains error elements\",\n        toParseTreeText(myFile, skipSpaces(), includeRanges()).contains(\"PsiErrorElement\")\n      );\n    }\n  }\n\n  public void testSingleFunction() { doTest(false); }\n}\n"
  },
  {
    "path": "pluginResources/META-INF/plugin.xml",
    "content": "<!--\n  ~ Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<idea-plugin version=\"2\" xmlns:xi=\"http://www.w3.org/2001/XInclude\">\n  <id>ro.redeul.google.go</id>\n  <name>Go language (golang.org) support plugin</name>\n  <version>1.0</version>\n  <vendor url=\"https://github.com/go-lang-plugin-org\"/>\n  <category>Custom Languages</category>\n\n  <description><![CDATA[\n    Support for Go programming language.\n\n    Please note, that the following features are available in GoLand but not in this plugin:\n    <ul>\n      <li>Navigation</li>\n      <ul>\n        <li>Go to inheritor structures</li>\n        <li>Go to super interfaces</li>\n      </ul>\n      <li>Type-aware completion (aka Smart completion)</li>\n      <li>Extract function refactoring</li>\n      <li>Implement type</li>\n      <li>Inspections and quick-fixes</li>\n      <ul>\n        <li>Introduce method</li>\n        <li>Introduce field</li>\n        <li>Delete unused parameter</li>\n        <li>Show symbol duplicates</li>\n        <li>Add/delete missing/redundant expressions in case of assignment count mismatch</li>\n        <li>Properly implemented Duplicated symbols inspection</li>\n        <li>Recursive type detection</li>\n        <li>Invalid const initialization</li>\n      </ul>\n      <li>Tests and coverage</li>\n      <ul>\n        <li>Sub-tests support (runner, navigation, gutter actions)</li>\n        <li>Debugging tests</li>\n      </ul>\n      <li>Debugger</li>\n      <ul>\n        <li>Step out</li>\n        <li>100x faster performance</li>\n      </ul>\n      <li>General</li>\n      <ul>\n        <li>Highlighting of go:generate comments</li>\n        <li>Quick documentation for struct fields</li>\n        <li>Semantic highlighting</li>\n        <li>Parameter name hints</li>\n        <li>SQL auto-injection</li>\n      </ul>\n    </ul>\n    ]]></description>\n\n  <change-notes>\n    <![CDATA[\n    ]]>\n  </change-notes>\n\n  <depends>com.intellij.modules.lang</depends>\n  <depends optional=\"true\" config-file=\"java-deps.xml\">com.intellij.modules.java</depends>\n  <depends optional=\"true\" config-file=\"coverage.xml\">com.intellij.modules.coverage</depends>\n  <xi:include href=\"gogland.xml\" xpointer=\"xpointer(/idea-plugin/*)\">\n    <xi:fallback>\n      <xi:include href=\"/META-INF/gogland.xml\" xpointer=\"xpointer(/idea-plugin/*)\"/>\n    </xi:fallback>\n  </xi:include>\n\n  <application-components>\n    <component>\n      <implementation-class>com.goide.UpdateComponent</implementation-class>\n    </component>\n  </application-components>\n</idea-plugin>\n"
  },
  {
    "path": "resources/META-INF/app-engine.xml",
    "content": "<!--\n  ~ Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<idea-plugin version=\"2\">\n  <extensions defaultExtensionNs=\"ro.redeul.google.go\">\n    <appengine.Extension implementation=\"com.goide.appengine.GoAppEngineExtension\"/>\n  </extensions>\n  <extensions defaultExtensionNs=\"com.intellij\">\n    <projectService serviceImplementation=\"com.goide.appengine.YamlFilesModificationTracker\"/>\n    <library.presentationProvider implementation=\"com.goide.appengine.GoAppEngineLibraryPresentationProvider\"/>\n    \n    <!-- run application -->\n    <configurationType implementation=\"com.goide.appengine.run.GoAppEngineRunConfigurationType\"/>\n    \n    <!-- app engine remoteServer.type extension here -->\n  </extensions>\n\n</idea-plugin>\n\n"
  },
  {
    "path": "resources/META-INF/coverage.xml",
    "content": "<idea-plugin version=\"2\">\n  <extensions defaultExtensionNs=\"com.intellij\">\n    <programRunner implementation=\"com.goide.runconfig.testing.coverage.GoCoverageProgramRunner\"/>\n    <coverageEngine implementation=\"com.goide.runconfig.testing.coverage.GoCoverageEngine\"/>\n    <coverageRunner implementation=\"com.goide.runconfig.testing.coverage.GoCoverageRunner\"/>\n    <projectService serviceImplementation=\"com.goide.runconfig.testing.coverage.GoCoverageAnnotator\"/>\n  </extensions>\n</idea-plugin>\n\n"
  },
  {
    "path": "resources/META-INF/gogland.xml",
    "content": "<!--\n  ~ Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<idea-plugin version=\"2\" xmlns:xi=\"http://www.w3.org/2001/XInclude\">\n  <xi:include href=\"app-engine.xml\" xpointer=\"xpointer(/idea-plugin/*)\"/>\n  <!-- plan9 assembler -->\n  <xi:include href=\"plan9.xml\" xpointer=\"xpointer(/idea-plugin/*)\"/>\n  <module-components>\n    <component>\n      <implementation-class>com.goide.project.GoModuleLibrariesInitializer</implementation-class>\n    </component>\n  </module-components>\n\n  <extensions defaultExtensionNs=\"com.intellij\">\n    <stubIndex implementation=\"com.goide.stubs.index.GoAllPublicNamesIndex\"/>\n    <stubIndex implementation=\"com.goide.stubs.index.GoAllPrivateNamesIndex\"/>\n    <stubIndex implementation=\"com.goide.stubs.index.GoFunctionIndex\"/>\n    <stubIndex implementation=\"com.goide.stubs.index.GoTypesIndex\"/>\n    <stubIndex implementation=\"com.goide.stubs.index.GoPackagesIndex\"/>\n    <stubIndex implementation=\"com.goide.stubs.index.GoMethodIndex\"/>\n    <stubIndex implementation=\"com.goide.stubs.index.GoMethodFingerprintIndex\"/>\n    <stubElementTypeHolder class=\"com.goide.GoTypes\"/>\n    <indexPatternBuilder implementation=\"com.goide.GoIndexPatternBuilder\"/>\n\n    <internalFileTemplate name=\"Go Application\"/>\n    <internalFileTemplate name=\"Go File\"/>\n    <defaultTemplatePropertiesProvider implementation=\"com.goide.actions.file.GoTemplatePropertiesProvider\"/>\n    <createFromTemplateHandler implementation=\"com.goide.actions.file.GoCreateFromTemplateHandler\"/>\n\n    <!-- project -->\n    <project.converterProvider implementation=\"com.goide.project.migration.GoProjectModelConverterProvider\"/>\n    <project.converterProvider implementation=\"com.goide.project.migration.GoBuildTagsSettingsConverterProvider\"/>\n\n    <applicationService serviceImplementation=\"com.goide.project.GoApplicationLibrariesService\"/>\n    <projectService serviceImplementation=\"com.goide.project.GoProjectLibrariesService\"/>\n    <moduleService serviceImplementation=\"com.goide.project.GoModuleLibrariesService\"/>\n    <projectConfigurable id=\"go\" groupId=\"language\" provider=\"com.goide.configuration.GoConfigurableProvider\"\n                         dynamic=\"true\" bundle=\"com.goide.GoBundle\"/>\n\n    <moduleService serviceImplementation=\"com.goide.project.GoModuleSettings\"/>\n    <projectService serviceImplementation=\"com.goide.project.GoExcludedPathsSettings\"/>\n    <applicationService serviceImplementation=\"com.goide.codeInsight.imports.GoCodeInsightSettings\"/>\n\n    <defaultLiveTemplatesProvider implementation=\"com.goide.template.GoLiveTemplatesProvider\"/>\n    <liveTemplateContext implementation=\"com.goide.template.GoEverywhereContextType\"/>\n    <liveTemplateContext implementation=\"com.goide.template.GoLiveTemplateContextType$File\"/>\n    <liveTemplateContext implementation=\"com.goide.template.GoLiveTemplateContextType$Block\"/>\n    <liveTemplateContext implementation=\"com.goide.template.GoLiveTemplateContextType$Type\"/>\n    <liveTemplateContext implementation=\"com.goide.template.GoLiveTemplateContextType$Expression\"/>\n    <liveTemplateContext implementation=\"com.goide.template.GoLiveTemplateContextType$Tag\"/>\n    <liveTemplateContext implementation=\"com.goide.template.GoLiveTemplateContextType$TagLiteral\"/>\n    <liveTemplateContext implementation=\"com.goide.template.GoLiveTemplateContextType$Statement\"/>\n    <liveTemplateMacro implementation=\"com.goide.template.GoFieldNameMacro\"/>\n\n    <lang.elementManipulator forClass=\"com.goide.psi.GoImportString\"\n                             implementationClass=\"com.goide.psi.impl.manipulator.GoImportStringManipulator\"/>\n\n    <errorHandler implementation=\"com.intellij.diagnostic.ITNReporter\"/>\n    <extendWordSelectionHandler implementation=\"com.goide.editor.GoWordSelectioner\"/>\n    <annotator language=\"go\" implementationClass=\"com.goide.highlighting.GoHighlightingAnnotator\"/>\n    <annotator language=\"go\" implementationClass=\"com.goide.highlighting.GoAnnotator\"/>\n\n    <lang.importOptimizer language=\"go\" implementationClass=\"com.goide.codeInsight.imports.GoImportOptimizer\"/>\n    <referenceImporter implementation=\"com.goide.psi.impl.imports.GoReferenceImporter\"/>\n\n    <lang.parserDefinition language=\"go\" implementationClass=\"com.goide.GoParserDefinition\"/>\n    <fileTypeFactory implementation=\"com.goide.GoFileTypeFactory\"/>\n    <lang.syntaxHighlighterFactory language=\"go\" implementationClass=\"com.goide.highlighting.GoSyntaxHighlighterFactory\"/>\n    <lang.psiStructureViewFactory language=\"go\" implementationClass=\"com.goide.tree.GoStructureViewFactory\"/>\n    <colorSettingsPage implementation=\"com.goide.highlighting.GoColorsAndFontsPage\"/>\n    <lang.braceMatcher language=\"go\" implementationClass=\"com.goide.editor.GoBraceMatcher\"/>\n    <quoteHandler fileType=\"Go\" className=\"com.goide.editor.GoQuoteHandler\"/>\n    <editorTypedHandler implementationClass=\"com.goide.editor.GoTypedHandler\"/>\n    <lang.commenter language=\"go\" implementationClass=\"com.goide.GoCommenter\"/>\n    <lang.elementManipulator forClass=\"com.goide.psi.impl.GoStringLiteralImpl\"\n                             implementationClass=\"com.goide.psi.impl.manipulator.GoStringManipulator\"/>\n\n    <languageInjector implementation=\"com.goide.regexp.GoRegexInjector\"/>\n    <regExpLanguageHost forClass=\"com.goide.psi.GoStringLiteral\" implementationClass=\"com.goide.regexp.GoRegexHost\"/>\n    <lang.parserDefinition language=\"GoRegExp\" implementationClass=\"com.goide.regexp.GoRegExpParserDefinition\"/>\n\n    <completion.contributor language=\"go\" implementationClass=\"com.goide.completion.GoCompletionContributor\"/>\n    <completion.contributor language=\"go\" implementationClass=\"com.goide.completion.GoKeywordCompletionContributor\"/>\n    <completion.contributor language=\"go\" order=\"last\" implementationClass=\"com.goide.completion.GoAutoImportCompletionContributor\"/>\n    <completion.confidence language=\"go\" order=\"last\" implementationClass=\"com.goide.completion.GoCompletionConfidence\"/>\n    <lookup.charFilter implementation=\"com.goide.completion.GoCharFilter\"/>\n    <lookup.actionProvider implementation=\"com.goide.codeInsight.imports.GoExcludePathLookupActionProvider\"/>\n\n    <lang.refactoringSupport language=\"go\" implementationClass=\"com.goide.refactor.GoRefactoringSupportProvider\"/>\n    <spellchecker.support language=\"go\" implementationClass=\"com.goide.inspections.GoSpellcheckingStrategy\"/>\n    <elementDescriptionProvider implementation=\"com.goide.refactor.GoDescriptionProvider\"/>\n    <lang.namesValidator language=\"go\" implementationClass=\"com.goide.GoNamesValidator\"/>\n    <lang.findUsagesProvider language=\"go\" implementationClass=\"com.goide.usages.GoFindUsagesProvider\"/>\n    <readWriteAccessDetector implementation=\"com.goide.usages.GoReadWriteAccessDetector\" id=\"go\"/>\n    <fileStructureGroupRuleProvider implementation=\"com.goide.usages.GoFileStructureGroupRuleProvider\"/>\n    <lang.documentationProvider language=\"go\" implementationClass=\"com.goide.GoDocumentationProvider\"/>\n    <lang.foldingBuilder language=\"go\" implementationClass=\"com.goide.editor.GoFoldingBuilder\"/>\n    <typeDeclarationProvider implementation=\"com.goide.editor.GoTypeDeclarationProvider\"/>\n    <codeInsight.typeInfo language=\"go\" implementationClass=\"com.goide.codeInsight.GoExpressionTypeProvider\"/>\n    <codeInsight.parameterInfo language=\"go\" implementationClass=\"com.goide.editor.GoParameterInfoHandler\"/>\n    <lang.smartEnterProcessor language=\"go\" implementationClass=\"com.goide.editor.smart.GoSmartEnterProcessor\"/>\n    <highlightUsagesHandlerFactory implementation=\"com.goide.highlighting.exitpoint.GoHighlightExitPointsHandlerFactory\"/>\n    <problemFileHighlightFilter implementation=\"com.goide.highlighting.GoProblemFileHighlightFilter\"/>\n    <codeInsight.lineMarkerProvider language=\"go\" implementationClass=\"com.goide.editor.marker.GoMethodSeparatorProvider\"/>\n    <analyzeStacktraceFilter implementation=\"com.goide.runconfig.GoConsoleFilter\"/>\n    <lang.implementationTextSelectioner language=\"go\" implementationClass=\"com.goide.editor.GoImplementationTextSelectioner\"/>\n    <lang.surroundDescriptor language=\"go\" implementationClass=\"com.goide.editor.surround.GoExpressionSurroundDescriptor\"/>\n    <lang.surroundDescriptor language=\"go\" implementationClass=\"com.goide.editor.surround.GoStatementsSurroundDescriptor\"/>\n    <iconProvider implementation=\"com.goide.GoIconProvider\"/>\n    <codeInsight.lineMarkerProvider language=\"go\" implementationClass=\"com.goide.marker.GoRecursiveCallMarkerProvider\"/>\n    <statementUpDownMover implementation=\"com.goide.editor.GoStatementMover\"/>\n\n    <lang.unwrapDescriptor language=\"go\" implementationClass=\"com.goide.codeInsight.unwrap.GoUnwrapDescriptor\"/>\n\n    <directoryProjectGenerator implementation=\"com.goide.GoProjectGenerator\"/> <!-- for small IDEs-->\n\n    <renamePsiElementProcessor implementation=\"com.goide.refactor.GoRenameImportSpecProcessor\"/>\n\n    <!--formatter-->\n    <lang.formatter language=\"go\" implementationClass=\"com.goide.formatter.GoFormattingModelBuilder\"/>\n    <codeStyleSettingsProvider implementation=\"com.goide.formatter.settings.GoCodeStyleSettingsProvider\"/>\n    <langCodeStyleSettingsProvider implementation=\"com.goide.formatter.settings.GoLanguageCodeStyleSettingsProvider\"/>\n\n    <renamePsiElementProcessor implementation=\"com.goide.refactor.GoAnonymousFieldProcessor\"/>\n\n    <gotoSymbolContributor implementation=\"com.goide.go.GoSymbolContributor\"/>\n    <gotoClassContributor implementation=\"com.goide.go.GoTypeContributor\"/>\n\n    <!-- sdk -->\n    <sdkType implementation=\"com.goide.sdk.GoSdkType\"/>\n    <applicationService serviceImplementation=\"com.goide.sdk.GoEnvironmentGoPathModificationTracker\"/>\n    <projectService serviceInterface=\"com.goide.sdk.GoSdkService\" serviceImplementation=\"com.goide.sdk.GoSmallIDEsSdkService\"\n                    overrides=\"false\"/>\n    <library.presentationProvider implementation=\"com.goide.sdk.GoSdkLibraryPresentationProvider\"/>\n    <editorNotificationProvider implementation=\"com.goide.inspections.WrongSdkConfigurationNotificationProvider\"/>\n    <editorNotificationProvider implementation=\"com.goide.inspections.GoFileIgnoredByBuildToolNotificationProvider\"/>\n\n    <stepsBeforeRunProvider implementation=\"com.goide.runconfig.before.GoBeforeRunTaskProvider\"/>\n    <!-- run single file -->\n    <configurationType implementation=\"com.goide.runconfig.file.GoRunFileConfigurationType\"/>\n    <runConfigurationProducer implementation=\"com.goide.runconfig.file.GoRunFileConfigurationProducer\"/>\n\n    <!-- run application -->\n    <programRunner implementation=\"com.goide.runconfig.GoBuildingRunner\" order=\"before goRunner\"/>\n    <programRunner id=\"goRunner\" implementation=\"com.goide.runconfig.GoRunner\"/>\n    <runConfigurationProducer implementation=\"com.goide.runconfig.application.GoApplicationRunConfigurationProducer\"/>\n    <configurationType implementation=\"com.goide.runconfig.application.GoApplicationRunConfigurationType\"/>\n\n    <!-- test -->\n    <runConfigurationProducer implementation=\"com.goide.runconfig.testing.frameworks.gotest.GotestRunConfigurationProducer\"/>\n    <runConfigurationProducer implementation=\"com.goide.runconfig.testing.frameworks.gocheck.GocheckRunConfigurationProducer\"/>\n    <runConfigurationProducer implementation=\"com.goide.runconfig.testing.frameworks.gobench.GobenchRunConfigurationProducer\"/>\n    <configurationType implementation=\"com.goide.runconfig.testing.GoTestRunConfigurationType\"/>\n    <testFinder implementation=\"com.goide.runconfig.testing.GoTestFinder\"/>\n    <runLineMarkerContributor language=\"go\" implementationClass=\"com.goide.runconfig.testing.GoTestRunLineMarkerProvider\"/>\n    <runLineMarkerContributor language=\"go\" implementationClass=\"com.goide.runconfig.GoRunLineMarkerProvider\"/>\n\n    <!-- debugger -->\n    <xdebugger.breakpointType implementation=\"com.goide.dlv.breakpoint.DlvBreakpointType\"/>\n\n    <checkinHandlerFactory implementation=\"com.goide.actions.tool.GoFmtCheckinFactory\" order=\"last\"/>\n\n    <lang.inspectionSuppressor language=\"go\" implementationClass=\"com.goide.inspections.suppression.GoInspectionSuppressor\"/>\n\n    <!-- intentions -->\n    <intentionAction>\n      <bundleName>com.goide.GoBundle</bundleName>\n      <categoryKey>go.intentions.category</categoryKey>\n      <className>com.goide.intentions.GoAddFunctionBlockIntention</className>\n    </intentionAction>\n    <intentionAction>\n      <bundleName>com.goide.GoBundle</bundleName>\n      <categoryKey>go.intentions.category</categoryKey>\n      <className>com.goide.intentions.GoMoveToStructInitializationIntention</className>\n    </intentionAction>\n    <!-- unused inspections -->\n    <localInspection language=\"go\" displayName=\"Unused import inspection\" groupPath=\"Go\"\n                     groupName=\"Declaration redundancy\" enabledByDefault=\"true\" level=\"ERROR\"\n                     implementationClass=\"com.goide.inspections.GoUnusedImportInspection\"/>\n    <localInspection language=\"go\" displayName=\"Unused label inspection\" groupPath=\"Go\"\n                     groupName=\"Declaration redundancy\" enabledByDefault=\"true\" level=\"ERROR\"\n                     implementationClass=\"com.goide.inspections.unresolved.GoUnusedLabelInspection\"/>\n    <localInspection language=\"go\" displayName=\"Unused variable inspection\" groupPath=\"Go\"\n                     groupName=\"Declaration redundancy\" enabledByDefault=\"true\" level=\"ERROR\"\n                     implementationClass=\"com.goide.inspections.unresolved.GoUnusedVariableInspection\"/>\n    <localInspection language=\"go\" displayName=\"Unused constant inspection\" groupPath=\"Go\"\n                     groupName=\"Declaration redundancy\" enabledByDefault=\"true\" level=\"WARNING\"\n                     implementationClass=\"com.goide.inspections.unresolved.GoUnusedConstInspection\"/>\n    <localInspection language=\"go\" displayName=\"Unused global variable inspection\" groupPath=\"Go\"\n                     groupName=\"Declaration redundancy\" enabledByDefault=\"true\" level=\"WARNING\"\n                     implementationClass=\"com.goide.inspections.unresolved.GoUnusedGlobalVariableInspection\"/>\n    <localInspection language=\"go\" displayName=\"Unused exported function inspection\" groupPath=\"Go\"\n                     groupName=\"Declaration redundancy\" enabledByDefault=\"true\" level=\"WARNING\"\n                     implementationClass=\"com.goide.inspections.unresolved.GoUnusedExportedFunctionInspection\"/>\n    <localInspection language=\"go\" displayName=\"Unused function inspection\" groupPath=\"Go\"\n                     groupName=\"Declaration redundancy\" enabledByDefault=\"true\" level=\"WARNING\"\n                     implementationClass=\"com.goide.inspections.unresolved.GoUnusedFunctionInspection\"/>\n    <localInspection language=\"go\" displayName=\"Unused parameter inspection\" groupPath=\"Go\"\n                     groupName=\"Declaration redundancy\" enabledByDefault=\"true\" level=\"WARNING\"\n                     implementationClass=\"com.goide.inspections.unresolved.GoUnusedParameterInspection\"/>\n    <localInspection language=\"go\" displayName=\"Bool condition inspection\" groupPath=\"Go\"\n                     groupName=\"Declaration redundancy\" enabledByDefault=\"true\" level=\"WARNING\"\n                     implementationClass=\"com.goide.inspections.GoBoolExpressionsInspection\"/>\n\n    <localInspection language=\"go\" displayName=\"Empty declaration inspection\" groupPath=\"Go\"\n                     groupName=\"Declaration redundancy\" enabledByDefault=\"true\" level=\"WARNING\"\n                     implementationClass=\"com.goide.inspections.GoEmptyDeclarationInspection\" cleanupTool=\"true\"/>\n    <localInspection language=\"go\" displayName=\"Redundant second index in slices inspection\" groupPath=\"Go\"\n                     groupName=\"Declaration redundancy\" enabledByDefault=\"true\" level=\"WARNING\"\n                     implementationClass=\"com.goide.inspections.GoRedundantSecondIndexInSlicesInspection\" cleanupTool=\"true\"/>\n    <localInspection language=\"go\" displayName=\"Redundant blank argument in range inspection\" groupPath=\"Go\"\n                     groupName=\"Declaration redundancy\" enabledByDefault=\"true\" level=\"WARNING\"\n                     implementationClass=\"com.goide.inspections.GoRedundantBlankArgInRangeInspection\" cleanupTool=\"true\"/>\n    <localInspection language=\"go\" displayName=\"Redundant type declaration in composite literals\" groupPath=\"Go\"\n                     groupName=\"Declaration redundancy\" enabledByDefault=\"true\" level=\"WARNING\"\n                     implementationClass=\"com.goide.inspections.GoRedundantTypeDeclInCompositeLit\" cleanupTool=\"true\"/>\n    <!-- /unused inspections -->\n\n    <!-- redeclare inspections -->\n    <localInspection language=\"go\" displayName=\"Duplicate fields and methods inspection\" groupPath=\"Go\"\n                     groupName=\"Redeclared symbols\" enabledByDefault=\"true\" level=\"ERROR\"\n                     implementationClass=\"com.goide.inspections.GoDuplicateFieldsOrMethodsInspection\"/>\n    <localInspection language=\"go\" displayName=\"Duplicate functions and methods inspection\" groupPath=\"Go\"\n                     groupName=\"Redeclared symbols\" enabledByDefault=\"true\" level=\"ERROR\"\n                     implementationClass=\"com.goide.inspections.GoDuplicateFunctionOrMethodInspection\"/>\n    <localInspection language=\"go\" displayName=\"Duplicate argument\" groupPath=\"Go\"\n                     groupName=\"Redeclared symbols\" enabledByDefault=\"true\" level=\"ERROR\"\n                     implementationClass=\"com.goide.inspections.GoDuplicateArgumentInspection\"/>\n    <localInspection language=\"go\" displayName=\"Duplicate return argument\" groupPath=\"Go\"\n                     groupName=\"Redeclared symbols\" enabledByDefault=\"true\" level=\"ERROR\"\n                     implementationClass=\"com.goide.inspections.GoDuplicateReturnArgumentInspection\"/>\n    <localInspection language=\"go\" displayName=\"Redeclare import as function\" groupPath=\"Go\"\n                     groupName=\"Redeclared symbols\" enabledByDefault=\"true\" level=\"ERROR\"\n                     implementationClass=\"com.goide.inspections.GoRedeclareImportAsFunctionInspection\"/>\n    <!-- /redeclare inspections -->\n\n    <!-- code style issues -->\n    <localInspection language=\"go\" displayName=\"Comment of exported element starts with incorrect name\" groupPath=\"Go\"\n                     groupName=\"Code style issues\" enabledByDefault=\"false\" level=\"WEAK WARNING\"\n                     implementationClass=\"com.goide.inspections.GoCommentStartInspection\"/>\n    <localInspection language=\"go\" displayName=\"Exported element should have its own declaration\" groupPath=\"Go\"\n                     groupName=\"Code style issues\" enabledByDefault=\"true\" level=\"WEAK WARNING\"\n                     implementationClass=\"com.goide.inspections.GoExportedOwnDeclarationInspection\"/>\n    <localInspection language=\"go\" displayName=\"Struct initialization without field names\" groupPath=\"Go\"\n                     groupName=\"Code style issues\" enabledByDefault=\"true\" level=\"WEAK WARNING\"\n                     implementationClass=\"com.goide.inspections.GoStructInitializationInspection\"/>\n    <localInspection language=\"go\" displayName=\"Receiver has generic name\" groupPath=\"Go\"\n                     groupName=\"Code style issues\" enabledByDefault=\"true\" level=\"WEAK WARNING\"\n                     implementationClass=\"com.goide.inspections.GoReceiverNamesInspection\"/>\n    <!-- /code style issues -->\n\n    <!-- probable bugs -->\n    <localInspection language=\"go\" displayName=\"Reserved word used as name\" groupPath=\"Go\"\n                     groupName=\"Probable bugs\" enabledByDefault=\"true\" level=\"WARNING\"\n                     implementationClass=\"com.goide.inspections.GoReservedWordUsedAsNameInspection\"/>\n    <localInspection language=\"go\" displayName=\"Imported package name as name identifier\" groupPath=\"Go\"\n                     groupName=\"Probable bugs\" enabledByDefault=\"true\" level=\"WARNING\"\n                     implementationClass=\"com.goide.inspections.GoImportUsedAsNameInspection\"/>\n    <localInspection language=\"go\" displayName=\"Malformed struct tag\" groupPath=\"Go\"\n                     groupName=\"Probable bugs\" enabledByDefault=\"true\" level=\"WARNING\"\n                     implementationClass=\"com.goide.inspections.GoStructTagInspection\"/>\n    <localInspection language=\"go\" displayName=\"Printf/Logf placeholder handler\" groupPath=\"Go\"\n                     groupName=\"Probable bugs\" enabledByDefault=\"true\" level=\"WARNING\"\n                     implementationClass=\"com.goide.inspections.GoPlaceholderCountInspection\"/>\n    <!-- /probable bugs -->\n\n    <!-- control flow issues -->\n    <localInspection language=\"go\" displayName=\"Missing return at end of function\" groupPath=\"Go\"\n                     groupName=\"Control flow issues\" enabledByDefault=\"true\" level=\"ERROR\"\n                     implementationClass=\"com.goide.inspections.GoMissingReturnInspection\"/>\n    <localInspection language=\"go\" displayName=\"Used as value in condition\" groupPath=\"Go\"\n                     groupName=\"Control flow issues\" enabledByDefault=\"true\" level=\"ERROR\"\n                     implementationClass=\"com.goide.inspections.GoUsedAsValueInCondition\"/>\n    <localInspection language=\"go\" displayName=\"Infinite for loop\" groupPath=\"Go\"\n                     groupName=\"Control flow issues\" enabledByDefault=\"true\" level=\"ERROR\"\n                     implementationClass=\"com.goide.inspections.GoInfiniteForInspection\"/>\n    <localInspection language=\"go\" displayName=\"Defer in loop\" groupPath=\"Go\"\n                     groupName=\"Control flow issues\" enabledByDefault=\"true\" level=\"WEAK WARNING\"\n                     implementationClass=\"com.goide.inspections.GoDeferInLoopInspection\"/>\n    <localInspection language=\"go\" displayName=\"Range iteration on illegal type\" groupPath=\"Go\"\n                     groupName=\"Control flow issues\" enabledByDefault=\"true\" level=\"ERROR\"\n                     implementationClass=\"com.goide.inspections.GoRangeIterationOnIllegalTypeInspection\"/>\n    <localInspection language=\"go\" displayName=\"Assignment to receiver\" groupPath=\"Go\"\n                     groupName=\"Control flow issues\" enabledByDefault=\"true\" level=\"WEAK WARNING\"\n                     implementationClass=\"com.goide.inspections.GoAssignmentToReceiverInspection\"/>\n    <localInspection language=\"go\" displayName=\"Direct assignment to struct field in map\" groupPath=\"Go\"\n                     groupName=\"Control flow issues\" enabledByDefault=\"true\" level=\"ERROR\"\n                     implementationClass=\"com.goide.inspections.GoDirectAssignToStructFieldInMapInspection\"/>\n    <!-- /control flow issues -->\n\n    <!-- general -->\n    <localInspection language=\"go\" displayName=\"Unresolved reference inspection\" groupPath=\"Go\"\n                     groupName=\"General\" enabledByDefault=\"true\" level=\"ERROR\"\n                     implementationClass=\"com.goide.inspections.unresolved.GoUnresolvedReferenceInspection\"/>\n    <localInspection language=\"go\" displayName=\"Assignment to constant\" groupPath=\"Go\"\n                     groupName=\"General\" enabledByDefault=\"true\" level=\"ERROR\"\n                     implementationClass=\"com.goide.inspections.unresolved.GoAssignmentToConstantInspection\"/>\n    <localInspection language=\"go\" displayName=\"Assignment nil without explicit type\" groupPath=\"Go\"\n                     groupName=\"General\" enabledByDefault=\"true\" level=\"ERROR\"\n                     implementationClass=\"com.goide.inspections.GoAssignmentNilWithoutExplicitTypeInspection\"/>\n    <localInspection language=\"go\" displayName=\"Incorrect variadic parameter\" groupPath=\"Go\"\n                     groupName=\"General\" enabledByDefault=\"true\" level=\"ERROR\"\n                     implementationClass=\"com.goide.inspections.GoFunctionVariadicParameterInspection\"/>\n    <localInspection language=\"go\" displayName=\"Incorrect variable declaration\" groupPath=\"Go\"\n                     groupName=\"General\" enabledByDefault=\"true\" level=\"ERROR\"\n                     implementationClass=\"com.goide.inspections.GoVarDeclarationInspection\"/>\n    <localInspection language=\"go\" displayName=\"No new variables on left side of :=\" groupPath=\"Go\"\n                     groupName=\"General\" enabledByDefault=\"true\" level=\"ERROR\"\n                     implementationClass=\"com.goide.inspections.GoNoNewVariablesInspection\"/>\n    <localInspection language=\"go\" displayName=\"Function call inspection\" groupPath=\"Go\"\n                     groupName=\"General\" enabledByDefault=\"true\" level=\"ERROR\"\n                     implementationClass=\"com.goide.inspections.GoFunctionCallInspection\"/>\n    <localInspection language=\"go\" displayName=\"Defer/go statements check\" groupPath=\"Go\"\n                     groupName=\"General\" enabledByDefault=\"true\" level=\"ERROR\"\n                     implementationClass=\"com.goide.inspections.GoDeferGoInspection\"/>\n    <localInspection language=\"go\" displayName=\"Multiple packages in directory declaration\" groupPath=\"Go\"\n                     groupName=\"General\" enabledByDefault=\"true\" level=\"ERROR\"\n                     implementationClass=\"com.goide.inspections.GoMultiplePackagesInspection\"/>\n    <localInspection language=\"go\" displayName=\"Usage of cgo in tests is not supported\" groupPath=\"Go\"\n                     groupName=\"General\" enabledByDefault=\"true\" level=\"ERROR\"\n                     implementationClass=\"com.goide.inspections.GoCgoInTestInspection\"/>\n    <localInspection language=\"go\" displayName=\"Wrong test declaration\" groupPath=\"Go\"\n                     groupName=\"General\" enabledByDefault=\"true\" level=\"ERROR\"\n                     implementationClass=\"com.goide.inspections.GoTestSignaturesInspection\"/>\n    <localInspection language=\"go\" displayName=\"Self import\" groupPath=\"Go\"\n                     groupName=\"General\" enabledByDefault=\"true\" level=\"ERROR\"\n                     implementationClass=\"com.goide.inspections.GoSelfImportInspection\"/>\n    <localInspection language=\"go\" displayName=\"Invalid package import\" groupPath=\"Go\"\n                     groupName=\"General\" enabledByDefault=\"true\" level=\"ERROR\"\n                     implementationClass=\"com.goide.inspections.GoInvalidPackageImportInspection\"/>\n    <localInspection language=\"go\" displayName=\"Embedded interface pointer\" groupPath=\"Go\"\n                     groupName=\"General\" enabledByDefault=\"true\" level=\"ERROR\"\n                     implementationClass=\"com.goide.inspections.GoEmbeddedInterfacePointerInspection\"/>\n    <localInspection language=\"go\" displayName=\"Need trailing comma before newline in composite literal\" groupPath=\"Go\"\n                     groupName=\"General\" enabledByDefault=\"true\" level=\"ERROR\"\n                     implementationClass=\"com.goide.inspections.GoAddTrailingCommaInspection\"/>\n    <localInspection language=\"go\" displayName=\"Underscore used as value\" groupPath=\"Go\"\n                     groupName=\"General\" enabledByDefault=\"true\" level=\"ERROR\"\n                     implementationClass=\"com.goide.inspections.GoUnderscoreUsedAsValueInspection\"/>\n    <localInspection language=\"go\" displayName=\"Invalid strings and runes\" groupPath=\"Go\"\n                     groupName=\"General\" enabledByDefault=\"true\" level=\"ERROR\"\n                     implementationClass=\"com.goide.inspections.GoInvalidStringOrCharInspection\"/>\n    <localInspection language=\"go\" displayName=\"Invalid anonymous field definition type \" groupPath=\"Go\"\n                     groupName=\"General\" enabledByDefault=\"true\" level=\"ERROR\"\n                     implementationClass=\"com.goide.inspections.GoAnonymousFieldDefinitionTypeInspection\"/>\n    <localInspection language=\"go\" displayName=\"Mixed named and unnamed parameters\" groupPath=\"Go\"\n                     groupName=\"General\" enabledByDefault=\"true\" level=\"ERROR\"\n                     implementationClass=\"com.goide.inspections.GoMixedNamedUnnamedParametersInspection\"/>\n    <localInspection language=\"go\" displayName=\"Mismatched types: byte and string\" groupPath=\"Go\"\n                     groupName=\"General\" enabledByDefault=\"true\" level=\"ERROR\"\n                     implementationClass=\"com.goide.inspections.GoStringAndByteTypeMismatchInspection\"/>\n    <!-- /general -->\n\n    <!-- color schemes -->\n    <bundledColorScheme path=\"colorscheme/Darcula - dlsniper\"/>\n    <!-- /color schemes -->\n  </extensions>\n  <actions>\n    <action id=\"Go.NewGoFile\" class=\"com.goide.actions.file.GoCreateFileAction\"\n            text=\"Go File\" description=\"Create new Go file\">\n      <add-to-group group-id=\"NewGroup\" anchor=\"before\" relative-to-action=\"NewFile\"/>\n    </action>\n    <group id=\"GoTestGenerateGroup\" class=\"com.goide.generate.GoGenerateTestMethodActionGroup\">\n      <add-to-group group-id=\"GenerateGroup\" anchor=\"first\"/>\n    </group>\n    <group id=\"GoTools\" text=\"Go Tools\" description=\"Go External Tools\" icon=\"/icons/go.png\" popup=\"true\">\n      <action id=\"GoFmtFileAction\" class=\"com.goide.actions.tool.GoFmtFileAction\" text=\"Go fmt file\"\n              description=\"Format selected file with go fmt util\">\n        <keyboard-shortcut keymap=\"$default\" first-keystroke=\"shift ctrl alt F\"/>\n      </action>\n      <action id=\"GoFmtProjectAction\" class=\"com.goide.actions.tool.GoFmtProjectAction\" text=\"Go fmt project\"\n              description=\"Format project with go fmt util\">\n        <keyboard-shortcut keymap=\"$default\" first-keystroke=\"shift ctrl alt P\"/>\n      </action>\n      <action id=\"GoImportsFileAction\" class=\"com.goide.actions.tool.GoImportsFileAction\" text=\"Goimports file\"\n              description=\"Optimizes imports for selected file with goimports util\">\n      </action>\n      <action id=\"GoTypeFileAction\" class=\"com.goide.actions.tool.GoTypeFileAction\" text=\"Gotype directory\"\n              description=\"Analyze types for current directory with gotype util\">\n      </action>\n      <action id=\"GoVetFileAction\" class=\"com.goide.actions.tool.GoVetFileAction\" text=\"Go vet file\"\n              description=\"Lint selected file or directory with go vet tool\">\n      </action>\n      <add-to-group group-id=\"CodeMenu\" anchor=\"last\"/>\n      <add-to-group group-id=\"ProjectViewPopupMenu\" anchor=\"last\"/>\n      <add-to-group group-id=\"EditorLangPopupMenu\" anchor=\"last\"/>\n    </group>\n  </actions>\n\n  <application-components>\n    <component>\n      <implementation-class>com.goide.ui.ProjectTutorialNotification</implementation-class>\n    </component>\n  </application-components>\n\n  <!-- GAE -->\n\n  <!-- START plugin.xml of future GAE module -->\n  <!-- todo[IDEA 17] It's supposed that GAE-core module will be moved to IDEA source and bundled in IDEA 17 -->\n  <!--<id>com.intellij.appengine</id>-->\n  <depends optional=\"true\" config-file=\"google-app-engine-core-yaml.xml\">org.jetbrains.plugins.yaml</depends>\n  <extensionPoints>\n    <extensionPoint name=\"appengine.Extension\" interface=\"com.intellij.appengine.AppEngineExtension\"/>\n  </extensionPoints>\n  <!-- END plugin.xml of future GAE module -->\n</idea-plugin>"
  },
  {
    "path": "resources/META-INF/google-app-engine-core-yaml.xml",
    "content": "<!--\n  ~ Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<!-- todo[IDEA 17] It's supposed that GAE-core module will be moved to IDEA source and bundled in IDEA 17 -->\n<idea-plugin version=\"2\">\n  <extensions defaultExtensionNs=\"com.intellij\">\n    <completion.contributor language=\"yaml\" implementationClass=\"yaml.AppEngineYamlCompletionContributor\"/>\n  </extensions>\n</idea-plugin>"
  },
  {
    "path": "resources/META-INF/java-deps.xml",
    "content": "<!--\n  ~ Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<idea-plugin version=\"2\">\n  <extensions defaultExtensionNs=\"com.intellij\">\n    <moduleType id=\"GO_MODULE\" implementationClass=\"com.goide.GoModuleType\"/>\n    <moduleConfigurationEditorProvider implementation=\"com.goide.configuration.GoModuleEditorsProvider\" order=\"first\"/>\n    <editorNotificationProvider implementation=\"com.goide.inspections.WrongModuleTypeNotificationProvider\"/>\n\n    <projectStructureDetector implementation=\"com.goide.project.GoProjectStructureDetector\"/>\n\n    <projectService serviceInterface=\"com.goide.sdk.GoSdkService\" serviceImplementation=\"com.goide.sdk.GoIdeaSdkService\" overrides=\"true\"/>\n\n  </extensions>\n</idea-plugin>\n"
  },
  {
    "path": "resources/META-INF/plan9.xml",
    "content": "<!--\n  ~ Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<idea-plugin version=\"2\">\n  <extensions defaultExtensionNs=\"com.intellij\">\n    <additionalTextAttributes scheme=\"Default\" file=\"colorscheme/AsmIntelDefault.xml\"/>\n    <additionalTextAttributes scheme=\"Darcula\" file=\"colorscheme/AsmIntelDarcula.xml\"/>\n\n    <!--<lang.parserDefinition language=\"plan9_x86\" implementationClass=\"com.plan9.intel.lang.core.AsmIntelParserDefinition\"/>-->\n    <fileTypeFactory implementation=\"com.plan9.intel.AsmIntelFileTypeFactory\"/>\n    <lang.syntaxHighlighterFactory language=\"plan9_x86\" implementationClass=\"com.plan9.intel.ide.highlighting.AsmIntelSyntaxHighlighterFactory\"/>\n    <colorSettingsPage implementation=\"com.plan9.intel.ide.highlighting.AsmIntelColorsAndFontsPage\"/>\n  </extensions>\n</idea-plugin>"
  },
  {
    "path": "resources/colorscheme/Darcula - dlsniper.xml",
    "content": "<scheme name=\"Darcula - dlsniper\" version=\"142\" parent_scheme=\"Darcula\">\n  <option name=\"LINE_SPACING\" value=\"1.0\" />\n  <option name=\"EDITOR_FONT_SIZE\" value=\"14\" />\n  <option name=\"EDITOR_FONT_NAME\" value=\"Source Code Pro\" />\n  <attributes>\n    <option name=\"GO_EXPORTED_FUNCTION\">\n      <value>\n        <option name=\"FOREGROUND\" value=\"ffe37b\" />\n      </value>\n    </option>\n    <option name=\"GO_FUNCTION_PARAMETER\">\n      <value>\n        <option name=\"FOREGROUND\" value=\"9077c6\" />\n      </value>\n    </option>\n    <option name=\"GO_IDENTIFIER\">\n      <value>\n        <option name=\"FOREGROUND\" value=\"9077c6\" />\n      </value>\n    </option>\n    <option name=\"GO_LOCAL_CONSTANT\">\n      <value>\n        <option name=\"FOREGROUND\" value=\"9876aa\" />\n      </value>\n    </option>\n    <option name=\"GO_LOCAL_FUNCTION\">\n      <value>\n        <option name=\"FOREGROUND\" value=\"ff7b00\" />\n      </value>\n    </option>\n    <option name=\"GO_LOCAL_VARIABLE\">\n      <value>\n        <option name=\"FOREGROUND\" value=\"6598c6\" />\n      </value>\n    </option>\n    <option name=\"GO_METHOD_RECEIVER\">\n      <value>\n        <option name=\"FOREGROUND\" value=\"ffff00\" />\n      </value>\n    </option>\n    <option name=\"GO_PACKAGE_EXPORTED_CONSTANT\">\n      <value>\n        <option name=\"FOREGROUND\" value=\"9876aa\" />\n      </value>\n    </option>\n    <option name=\"GO_PACKAGE_EXPORTED_INTERFACE\">\n      <value>\n        <option name=\"FOREGROUND\" value=\"c6a469\" />\n      </value>\n    </option>\n    <option name=\"GO_PACKAGE_EXPORTED_STRUCT\">\n      <value>\n        <option name=\"FOREGROUND\" value=\"c67f58\" />\n      </value>\n    </option>\n    <option name=\"GO_PACKAGE_EXPORTED_VARIABLE\">\n      <value>\n        <option name=\"FOREGROUND\" value=\"9077c6\" />\n      </value>\n    </option>\n    <option name=\"GO_PACKAGE_LOCAL_CONSTANT\">\n      <value>\n        <option name=\"FOREGROUND\" value=\"be93d0\" />\n      </value>\n    </option>\n    <option name=\"GO_PACKAGE_LOCAL_INTERFACE\">\n      <value>\n        <option name=\"FOREGROUND\" value=\"7d91c6\" />\n      </value>\n    </option>\n    <option name=\"GO_PACKAGE_LOCAL_STRUCT\">\n      <value>\n        <option name=\"FOREGROUND\" value=\"8996a5\" />\n      </value>\n    </option>\n    <option name=\"GO_PACKAGE_LOCAL_VARIABLE\">\n      <value>\n        <option name=\"FOREGROUND\" value=\"816093\" />\n      </value>\n    </option>\n    <option name=\"GO_SCOPE_VARIABLE\">\n      <value>\n        <option name=\"FOREGROUND\" value=\"c6c0\" />\n      </value>\n    </option>\n    <option name=\"GO_STRING\">\n      <value>\n        <option name=\"FOREGROUND\" value=\"30be47\" />\n      </value>\n    </option>\n    <option name=\"GO_STRUCT_EXPORTED_MEMBER\">\n      <value>\n        <option name=\"FOREGROUND\" value=\"5bc600\" />\n      </value>\n    </option>\n    <option name=\"GO_STRUCT_LOCAL_MEMBER\">\n      <value>\n        <option name=\"FOREGROUND\" value=\"c62b\" />\n      </value>\n    </option>\n    <option name=\"GO_TYPE_SPECIFICATION\">\n      <value>\n        <option name=\"FOREGROUND\" value=\"51c688\" />\n      </value>\n    </option>\n  </attributes>\n</scheme>"
  },
  {
    "path": "resources/com/goide/GoBundle.properties",
    "content": "#\n# Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\n\n# suppress inspection \"UnusedProperty\" – the property is required for showing list of links to nested configurables on root Go-configurable\ngo.settings.description=\ngo.intentions.category=Go"
  },
  {
    "path": "resources/fileTemplates/internal/Go Application.go.ft",
    "content": "package main\n\nfunc main() {\n}\n"
  },
  {
    "path": "resources/fileTemplates/internal/Go Application.go.html",
    "content": "<html>\n    <body>\n        This is Go application file template.\n        Contains main function.\n    </body>\n</html>"
  },
  {
    "path": "resources/fileTemplates/internal/Go File.go.ft",
    "content": "package ${GO_PACKAGE_NAME}\n"
  },
  {
    "path": "resources/fileTemplates/internal/Go File.go.html",
    "content": "<html>\n<body>\n<table width=\"100%\" border=\"0\" cellpadding=\"5\" cellspacing=\"0\" style=\"border-collapse: collapse\">\n  <tr>\n    <td><font face=\"verdana\" size=\"-1\">This is a built-in template used each time you create\n      a new Go file, by selecting <i>New | Go | Go File</i> from the popup menu in one of the project views.<br>\n      The template is editable. Here you can use predefined variables (listed below) that will then be expanded\n      like macros into the corresponding values.<br>\n      It is also possible to specify an arbitrary number of custom variables in the format\n      <b>${&lt;VARIABLE_NAME&gt;}</b>. In this case, before the new\n      file is created, you will be prompted with a dialog where you can define particular values for all\n      custom variables.<br>\n      Using the <b>#parse</b> directive, you can include templates from the <i>Includes</i>\n      tab, by specifying the full name of the desired template as a parameter in quotation marks.\n      For example:<br>\n      <b>#parse(\"File Header.go\")</b>\n    </font></td>\n  </tr>\n</table>\n<table width=\"100%\" border=\"0\" cellpadding=\"5\" cellspacing=\"0\" style=\"border-collapse: collapse\">\n  <tr>\n    <td colspan=\"3\"><font face=\"verdana\" size=\"-1\">Predefined variables will take the following values:</font></td>\n  </tr>\n  <tr>\n    <td valign=\"top\">\n      <nobr><font face=\"verdana\" size=\"-2\"><b>${GO_PACKAGE_NAME_WITH_TEST_SUFFIX}</b></font></nobr>\n    </td>\n    <td width=\"10\">&nbsp;</td>\n    <td width=\"100%\" valign=\"top\"><font face=\"verdana\" size=\"-1\">name of the package in which the new file is created if it's just regular\n      file and package + '_test' suffix if the new file is a test file</font></td>\n  </tr>\n  <tr>\n    <td valign=\"top\">\n      <nobr><font face=\"verdana\" size=\"-2\"><b>${GO_PACKAGE_NAME}</b></font></nobr>\n    </td>\n    <td width=\"10\">&nbsp;</td>\n    <td width=\"100%\" valign=\"top\"><font face=\"verdana\" size=\"-1\">name of the package in which the new file is created</font></td>\n  </tr>\n  <tr>\n    <td valign=\"top\">\n      <nobr><font face=\"verdana\" size=\"-2\"><b>${USER}</b></font></nobr>\n    </td>\n    <td width=\"10\">&nbsp;</td>\n    <td width=\"100%\" valign=\"top\"><font face=\"verdana\" size=\"-1\">current user system login name</font></td>\n  </tr>\n  <tr>\n    <td valign=\"top\">\n      <nobr><font face=\"verdana\" size=\"-2\"><b>${DATE}</b></font></nobr>\n    </td>\n    <td width=\"10\">&nbsp;</td>\n    <td width=\"100%\" valign=\"top\"><font face=\"verdana\" size=\"-1\">current system date</font></td>\n  </tr>\n  <tr>\n    <td valign=\"top\">\n      <nobr><font face=\"verdana\" size=\"-2\"><b>${TIME}</b></font></nobr>\n    </td>\n    <td width=\"10\">&nbsp;</td>\n    <td width=\"100%\" valign=\"top\"><font face=\"verdana\" size=\"-1\">current system time</font></td>\n  </tr>\n  <tr>\n    <td valign=\"top\">\n      <nobr><font face=\"verdana\" size=\"-2\"><b>${YEAR}</b></font></nobr>\n    </td>\n    <td width=\"10\">&nbsp;</td>\n    <td width=\"100%\" valign=\"top\"><font face=\"verdana\" size=\"-1\">current year</font></td>\n  </tr>\n  <tr>\n    <td valign=\"top\">\n      <nobr><font face=\"verdana\" size=\"-2\"><b>${MONTH}</b></font></nobr>\n    </td>\n    <td width=\"10\">&nbsp;</td>\n    <td width=\"100%\" valign=\"top\"><font face=\"verdana\" size=\"-1\">current month</font></td>\n  </tr>\n  <tr>\n    <td valign=\"top\">\n      <nobr><font face=\"verdana\" size=\"-2\"><b>${MONTH_NAME_SHORT}</b></font></nobr>\n    </td>\n    <td width=\"10\">&nbsp;</td>\n    <td width=\"100%\" valign=\"top\"><font face=\"verdana\" size=\"-1\">first 3 letters of the current month name. Example: Jan, Feb, etc.</font>\n    </td>\n  </tr>\n  <tr>\n    <td valign=\"top\">\n      <nobr><font face=\"verdana\" size=\"-2\"><b>${MONTH_NAME_FULL}</b></font></nobr>\n    </td>\n    <td width=\"10\">&nbsp;</td>\n    <td width=\"100%\" valign=\"top\"><font face=\"verdana\" size=\"-1\">full name of the current month. Example: January, February, etc.</font>\n    </td>\n  </tr>\n  <tr>\n    <td valign=\"top\">\n      <nobr><font face=\"verdana\" size=\"-2\"><b>${DAY}</b></font></nobr>\n    </td>\n    <td width=\"10\">&nbsp;</td>\n    <td width=\"100%\" valign=\"top\"><font face=\"verdana\" size=\"-1\">current day of the month</font></td>\n  </tr>\n  <tr>\n    <td valign=\"top\">\n      <nobr><font face=\"verdana\" size=\"-2\"><b>${HOUR}</b></font></nobr>\n    </td>\n    <td width=\"10\">&nbsp;</td>\n    <td width=\"100%\" valign=\"top\"><font face=\"verdana\" size=\"-1\">current hour</font></td>\n  </tr>\n  <tr>\n    <td valign=\"top\">\n      <nobr><font face=\"verdana\" size=\"-2\"><b>${MINUTE}</b></font></nobr>\n    </td>\n    <td width=\"10\">&nbsp;</td>\n    <td width=\"100%\" valign=\"top\"><font face=\"verdana\" size=\"-1\">current minute</font></td>\n  </tr>\n  <tr>\n    <td valign=\"top\">\n      <nobr><font face=\"verdana\" size=\"-2\"><b>${PROJECT_NAME}</b></font></nobr>\n    </td>\n    <td width=\"10\">&nbsp;</td>\n    <td width=\"100%\" valign=\"top\"><font face=\"verdana\" size=\"-1\">the name of the current project</font></td>\n  </tr>\n</table>\n</body>\n</html>"
  },
  {
    "path": "resources/inspectionDescriptions/GoAddTrailingComma.html",
    "content": "<!--\n  ~ Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<html>\n<body>\nNeed trailing comma before newline in composite literal.\n</body>\n</html>"
  },
  {
    "path": "resources/inspectionDescriptions/GoAnonymousFieldDefinitionType.html",
    "content": "<!--\n  ~ Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<html>\n<body>\nChecks that type in pointer is type name\n<!-- tooltip end -->\n</body>\n</html>"
  },
  {
    "path": "resources/inspectionDescriptions/GoAssignmentNilWithoutExplicitType.html",
    "content": "<html>\n<body>\nCheck assignment nil without explicit type.\n</body>\n</html>"
  },
  {
    "path": "resources/inspectionDescriptions/GoAssignmentToConstant.html",
    "content": "<html>\n<body>\nChecks assignment to constants.\n</body>\n</html>"
  },
  {
    "path": "resources/inspectionDescriptions/GoAssignmentToReceiver.html",
    "content": "<!--\n  ~ Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<html>\n<body>\nChecks for assignments to method receiver\n</body>\n</html>"
  },
  {
    "path": "resources/inspectionDescriptions/GoBoolExpressions.html",
    "content": "<!--\n  ~ Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<html>\n<body>\nChecks bool expressions for redundant and suspect parts\n<!-- tooltip end -->\n</body>\n</html>"
  },
  {
    "path": "resources/inspectionDescriptions/GoCgoInTest.html",
    "content": "<!--\n  ~ Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<html>\n<body>\nInspects cgo import in test files.\n</body>\n</html>"
  },
  {
    "path": "resources/inspectionDescriptions/GoCommentStart.html",
    "content": "<!--\n  ~ Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<html>\n<body>\nCheck if the comment starts with the correct name for exported elements.\n</body>\n</html>"
  },
  {
    "path": "resources/inspectionDescriptions/GoDeferGo.html",
    "content": "<html>\n<body>\nChecks defer/go statements: argument to go/defer must be function call.\n</body>\n</html>"
  },
  {
    "path": "resources/inspectionDescriptions/GoDeferInLoop.html",
    "content": "<!--\n  ~ Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<html>\n<body>\nChecks if there are no calls to defer in loops.\n</body>\n</html>"
  },
  {
    "path": "resources/inspectionDescriptions/GoDirectAssignToStructFieldInMap.html",
    "content": "<!--\n  ~ Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<html>\n<body>\nCheck if an assignment is made directly to a struct field of a map\n</body>\n</html>"
  },
  {
    "path": "resources/inspectionDescriptions/GoDuplicateArgument.html",
    "content": "<html>\n<body>\nInspects function declaration for duplicate parameters.\n</body>\n</html>"
  },
  {
    "path": "resources/inspectionDescriptions/GoDuplicateFieldsOrMethods.html",
    "content": "<html>\n<body>\nChecks duplicates: fields in struct types and method in interface types.\n</body>\n</html>"
  },
  {
    "path": "resources/inspectionDescriptions/GoDuplicateFunctionOrMethod.html",
    "content": "<html>\n<body>\nChecks function and method duplicates.\n</body>\n</html>"
  },
  {
    "path": "resources/inspectionDescriptions/GoDuplicateReturnArgument.html",
    "content": "<!--\n  ~ Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<html>\n<body>\nThis inspection checks function declaration for parameters redeclared in function return.\n</body>\n</html>"
  },
  {
    "path": "resources/inspectionDescriptions/GoEmbeddedInterfacePointer.html",
    "content": "<!--\n  ~ Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<html>\n<body>\nThis inspection checks if the embedded type is a pointer to an interface.\n</body>\n</html>"
  },
  {
    "path": "resources/inspectionDescriptions/GoEmptyDeclaration.html",
    "content": "<!--\n  ~ Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<html>\n<body>\nEmpty declaration inspection.\n</body>\n</html>"
  },
  {
    "path": "resources/inspectionDescriptions/GoExportedOwnDeclaration.html",
    "content": "<!--\n  ~ Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<html>\n<body>\nThis inspection checks whether exported var/const have its own declaration.\n</body>\n</html>\n"
  },
  {
    "path": "resources/inspectionDescriptions/GoFunctionCall.html",
    "content": "<!--\n  ~ Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<html>\n<body>\nThis inspection checks function calls.\n</body>\n</html>"
  },
  {
    "path": "resources/inspectionDescriptions/GoFunctionVariadicParameter.html",
    "content": "<!--\n  ~ Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<html>\n<body>\nInspects functions with variadic parameters for possible issues.\n</body>\n</html>"
  },
  {
    "path": "resources/inspectionDescriptions/GoImportUsedAsName.html",
    "content": "<!--\n  ~ Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<html>\n<body>\nInspects for declarations of variables, arguments or functions that overlap with the used import.\n<!-- tooltip end -->\nIf you receive this error then your code might not be as explicit as possible\nand might confuse other users.\n</body>\n</html>"
  },
  {
    "path": "resources/inspectionDescriptions/GoInfiniteFor.html",
    "content": "<!--\n  ~ Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<html>\n<body>\nChecks empty for loops\n</body>\n</html>"
  },
  {
    "path": "resources/inspectionDescriptions/GoInvalidPackageImport.html",
    "content": "<!--\n  ~ Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<html>\n<body>\nThis inspection highlights invalid imports.\n</body>\n</html>"
  },
  {
    "path": "resources/inspectionDescriptions/GoInvalidStringOrChar.html",
    "content": "<!--\n  ~ Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<html>\n<body>\nChecks not correctly formed string and rune literals. \n</body>\n</html>"
  },
  {
    "path": "resources/inspectionDescriptions/GoMissingReturn.html",
    "content": "<!--\n  ~ Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<html>\n<body>\nMissing return at end of function.\n</body>\n</html>"
  },
  {
    "path": "resources/inspectionDescriptions/GoMixedNamedUnnamedParameters.html",
    "content": "<!--\n  ~ Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<html>\n<body>\nCheck if the function declares named and unnamed return parameters for\n</body>\n</html>"
  },
  {
    "path": "resources/inspectionDescriptions/GoMultiplePackages.html",
    "content": "<html>\n<body>\nChecks multiple packages in directory declaration.\n</body>\n</html>"
  },
  {
    "path": "resources/inspectionDescriptions/GoNoNewVariables.html",
    "content": "<!--\n  ~ Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<html>\n<body>\nNo new variables on left side of :=.\n</body>\n</html>"
  },
  {
    "path": "resources/inspectionDescriptions/GoPlaceholderCount.html",
    "content": "<!--\n  ~ Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<html>\n<body>\nChecks the placeholders count in functions / methods.\n<!-- tooltip end -->\n<br/><br/>\nKnown functions are (case-insensitive):<br/>\n<ul>\n  <li>fmt.Printf</li>\n  <li>fmt.Sprintf</li>\n  <li>fmt.Errorf</li>\n  <li>fmt.Fprintf</li>\n  <li>fmt.Fscanf</li>\n  <li>fmt.Scanf</li>\n  <li>fmt.Sscanf</li>\n  <li>log.Printf</li>\n  <li>log.Fatalf</li>\n  <li>log.Panicf</li>\n</ul>\n</body>\n</html>"
  },
  {
    "path": "resources/inspectionDescriptions/GoRangeIterationOnIllegalType.html",
    "content": "<!--\n  ~ Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<html>\n<body>\nThis checks if the range iteration happens on a permitted type\n</body>\n</html>"
  },
  {
    "path": "resources/inspectionDescriptions/GoReceiverNames.html",
    "content": "<!--\n  ~ Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<html>\n<body>\nInspection checks that names like <code>me</code>, <code>this</code>, <code>self</code> are not used in receiver names.\n<!-- tooltip end -->\n<p>See <a href=\"https://github.com/golang/go/wiki/CodeReviewComments#receiver-names\">https://github.com/golang/go/wiki/CodeReviewComments#receiver-names</a>\nfor details</p>\n</body>\n</html>"
  },
  {
    "path": "resources/inspectionDescriptions/GoRedeclareImportAsFunction.html",
    "content": "<!--\n  ~ Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<html>\n<body>\nThis inspection checks if a function is named in the same way as an existing import.\n</body>\n</html>"
  },
  {
    "path": "resources/inspectionDescriptions/GoRedundantBlankArgInRange.html",
    "content": "<!--\n  ~ Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<html>\n<body>\nThis inspection checks whether expression of range clause is redundant and can be deleted\n<!-- tooltip end -->\n<p>For example following for statements can be simplified.</p>\n<br>\n<p>for _ = range v</p>\n<p>for _, _ = range v</p>\n<p>for a, _ = range v</p>\n</body>\n</html>"
  },
  {
    "path": "resources/inspectionDescriptions/GoRedundantSecondIndexInSlices.html",
    "content": "<!--\n  ~ Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<html>\n<body>\nRedundant second index in slices inspection <br>\n<!-- tooltip end -->\nExample: a[0:len(a)]\n</body>\n</html>"
  },
  {
    "path": "resources/inspectionDescriptions/GoRedundantTypeDeclInCompositeLit.html",
    "content": "<!--\n\n  ~ Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<html>\n<body>\nInspection checks redundant type declaration in composite literals\n<!-- tooltip end -->\nExample: []int { int{1}, int{2}}\n</body>\n</html>"
  },
  {
    "path": "resources/inspectionDescriptions/GoReservedWordUsedAsName.html",
    "content": "<html>\n<body>\nInspects for declarations of variables, arguments or functions that overlap with the built-in or reserved keyword.\n<!-- tooltip end -->\nIf you receive this error then your code might not be as explicit as possible\nand might confuse other users.\n</body>\n</html>\n"
  },
  {
    "path": "resources/inspectionDescriptions/GoSelfImport.html",
    "content": "<!--\n  ~ Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<html>\n<body>\nInspects file for own path imports.\n</body>\n</html>"
  },
  {
    "path": "resources/inspectionDescriptions/GoStringAndByteTypeMismatch.html",
    "content": "<!--\n  ~ Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<html>\n<body>\nReports comparisons of string index with a single-byte string instead of byte.\n</body>\n</html>"
  },
  {
    "path": "resources/inspectionDescriptions/GoStructInitialization.html",
    "content": "<!--\n  ~ Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<html>\n<body>\nThis inspection checks if the structures are initialized without specifying their field names.\n<!-- tooltip end -->\nWhen initializing a structure, it's better to explicitly state the name of the fields in order\nto ensure that in case of changes in the order of the fields or the name of the fields they\nwill correctly continue to be addressed.\n</body>\n</html>"
  },
  {
    "path": "resources/inspectionDescriptions/GoStructTag.html",
    "content": "<!--\n  ~ Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<html>\n<body>\nVerifies that struct tags conform to <a href=\"https://golang.org/pkg/reflect/#StructTag\">Go conventions</a>.\n\n<p>\nAccording to these conventions, tag strings are a concatenation of optionally space-separated key:\"value\" pairs. Each\nkey is a non-empty string consisting of non-control characters other than space (U+0020 ' '), quote (U+0022 '\"'), and\ncolon (U+003A ':'). Each value is quoted using U+0022 '\"' characters and Go string literal syntax.\n</p>\n</body>\n</html>"
  },
  {
    "path": "resources/inspectionDescriptions/GoTestSignatures.html",
    "content": "<html>\n<body>\nChecks test functions signatures.\n</body>\n</html>"
  },
  {
    "path": "resources/inspectionDescriptions/GoUnderscoreUsedAsValue.html",
    "content": "<!--\n  ~ Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<html>\n<body>\nChecks if underscore is used as value.\n</body>\n</html>"
  },
  {
    "path": "resources/inspectionDescriptions/GoUnresolvedReference.html",
    "content": "<html>\n<body>\nChecks references.\n</body>\n</html>"
  },
  {
    "path": "resources/inspectionDescriptions/GoUnusedConst.html",
    "content": "<!--\n  ~ Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<html>\n<body>\nChecks for unused constants.\n</body>\n</html>"
  },
  {
    "path": "resources/inspectionDescriptions/GoUnusedExportedFunction.html",
    "content": "<html>\n<body>\nChecks unused exported functions.\n</body>\n</html>"
  },
  {
    "path": "resources/inspectionDescriptions/GoUnusedFunction.html",
    "content": "<html>\n<body>\nChecks unused unexported functions.\n</body>\n</html>"
  },
  {
    "path": "resources/inspectionDescriptions/GoUnusedGlobalVariable.html",
    "content": "<html>\n<body>\nChecks for unused global variables.\n</body>\n</html>"
  },
  {
    "path": "resources/inspectionDescriptions/GoUnusedImport.html",
    "content": "<!--\n  ~ Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<html>\n<body>\nReports any import statements that are unused. \n</body>\n</html>"
  },
  {
    "path": "resources/inspectionDescriptions/GoUnusedLabel.html",
    "content": "<!--\n  ~ Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<html>\n<body>\nChecks for unused label definitions.\n</body>\n</html>"
  },
  {
    "path": "resources/inspectionDescriptions/GoUnusedParameter.html",
    "content": "<!--\n  ~ Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<html>\n<body>\nCheck for unused function parameters\n</body>\n</html>"
  },
  {
    "path": "resources/inspectionDescriptions/GoUnusedVariable.html",
    "content": "<html>\n<body>\nChecks for unused variables.\n</body>\n</html>"
  },
  {
    "path": "resources/inspectionDescriptions/GoUsedAsValueInCondition.html",
    "content": "<!--\n  ~ Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<html>\n<body>\nCheck if assignment is used as value.\n</body>\n</html>"
  },
  {
    "path": "resources/inspectionDescriptions/GoVarDeclaration.html",
    "content": "<html>\n<body>\nChecks variable declarations.\n</body>\n</html>"
  },
  {
    "path": "resources/intentionDescriptions/GoAddFunctionBlockIntention/after.go.template",
    "content": "func functionName() <spot>{\n\n}</spot>"
  },
  {
    "path": "resources/intentionDescriptions/GoAddFunctionBlockIntention/before.go.template",
    "content": "func functionName()"
  },
  {
    "path": "resources/intentionDescriptions/GoAddFunctionBlockIntention/description.html",
    "content": "<!--\n  ~ Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<html>\n<body>\nThis intention adds braces to function or method without a block.<br>\n</body>\n</html>"
  },
  {
    "path": "resources/intentionDescriptions/GoMoveToStructInitializationIntention/after.go.template",
    "content": "s := S{<spot>foo: `bar`</spot>}"
  },
  {
    "path": "resources/intentionDescriptions/GoMoveToStructInitializationIntention/before.go.template",
    "content": "s := S{}\n<spot>s.foo = `bar`</spot>"
  },
  {
    "path": "resources/intentionDescriptions/GoMoveToStructInitializationIntention/description.html",
    "content": "<!--\n  ~ Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<html>\n<body>\nThis intention moves struct field assignment to struct initialization block.\n</body>\n</html>"
  },
  {
    "path": "resources/liveTemplates/go.xml",
    "content": "<?xml version='1.0' encoding='UTF-8'?>\n<!--\n  ~ Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<templateSet group=\"Go\">\n  <template description='Import declaration' name='imp' toReformat='true' toShortenFQNames='true'\n            value='import (&#10;\t\"$END$\"&#10;)&#10;'>\n    <context>\n      <option name='GO_FILE' value='true'/>\n    </context>\n  </template>\n  <template description='Package declaration' name='p' toReformat='true' toShortenFQNames='true'\n            value='package $NAME$'>\n    <variable alwaysStopAt='true' defaultValue='' expression='complete()' name='NAME'/>\n    <context>\n      <option name='GO_FILE' value='true'/>\n    </context>\n  </template>\n  <template description='Constant declaration' name='con' toReformat='true' toShortenFQNames='true' value='const $NAME$ $TYPE$ = $VALUE$'>\n    <variable alwaysStopAt='true' defaultValue='&quot;name&quot;' expression='' name='NAME'/>\n    <variable alwaysStopAt='true' defaultValue='' expression='complete()' name='TYPE'/>\n    <variable alwaysStopAt='true' defaultValue='' expression='complete()' name='VALUE'/>\n    <context>\n      <option name='GO_FILE' value='true'/>\n      <option name='GO_STATEMENT' value='true'/>\n    </context>\n  </template>\n  <template description='Iota constant declaration' name='iota' toReformat='true' toShortenFQNames='true'\n            value='const $NAME$ $TYPE$ = iota'>\n    <variable alwaysStopAt='true' defaultValue='&quot;name&quot;' expression='' name='NAME'/>\n    <variable alwaysStopAt='true' defaultValue='' expression='complete()' name='TYPE'/>\n    <context>\n      <option name='GO_FILE' value='true'/>\n      <option name='GO_STATEMENT' value='true'/>\n    </context>\n  </template>\n\n  <!--STATEMENTS-->\n  <template description='For loop' name='for' toReformat='true' toShortenFQNames='true'\n            value='for $VAR0$; $VAR1$; $VAR2$ {&#10;\t$END$&#10;}'>\n    <variable alwaysStopAt='true' defaultValue='&quot;&quot;' expression='' name='VAR0'/>\n    <variable alwaysStopAt='true' defaultValue='&quot;&quot;' expression='' name='VAR1'/>\n    <variable alwaysStopAt='true' defaultValue='&quot;&quot;' expression='' name='VAR2'/>\n    <context>\n      <option name='GO_STATEMENT' value='true'/>\n    </context>\n  </template>\n  <template description='For range loop' name='forr' toReformat='true' toShortenFQNames='true'\n            value='for $KEY$, $VALUE$ := range $COLLECTION$ {&#10;\t$END$&#10;}'>\n    <variable alwaysStopAt='true' defaultValue='&quot;collection&quot;' expression='' name='COLLECTION'/>\n    <variable alwaysStopAt='true' defaultValue='&quot;value&quot;' expression='' name='VALUE'/>\n    <variable alwaysStopAt='true' defaultValue='&quot;key&quot;' expression='' name='KEY'/>\n    <context>\n      <option name='GO_STATEMENT' value='true'/>\n    </context>\n  </template>\n  <template description='Interface or struct' name='type' toReformat='true' toShortenFQNames='true' value='type $NAME$ $TYPE$'>\n    <variable alwaysStopAt='true' defaultValue='&quot;name&quot;' expression='' name='NAME'/>\n    <variable alwaysStopAt='true' defaultValue='' expression='complete' name='TYPE'/>\n    <context>\n      <option name='GO_FILE' value='true'/>\n      <option name='GO_STATEMENT' value='true'/>\n    </context>\n  </template>\n  <template description='printf' name='printf' toReformat='true' toShortenFQNames='true'\n            value='fmt.Printf(\"$END$\",$VAR$)'>\n    <variable alwaysStopAt='true' defaultValue='' expression='complete()' name='VAR'/>\n    <context>\n      <option name='GO_STATEMENT' value='true'/>\n    </context>\n  </template>\n  <template description='If error' name='err' toReformat='true' toShortenFQNames='true'\n            value='if err != nil {&#10;\t$END$&#10;}'>\n    <context>\n      <option name='GO_STATEMENT' value='true'/>\n    </context>\n  </template>\n\n  <!-- TAGS -->\n  <template description='xml:\"\"' name='xml' toReformat='true' toShortenFQNames='true' value='xml:\"$FIELD_NAME$\"'>\n    <variable alwaysStopAt='true' defaultValue='' expression='snakeCase(fieldName())' name='FIELD_NAME'/>\n    <context>\n      <option name='GO_TAG_LITERAL' value='true'/>\n    </context>\n  </template>\n  <template description='json:\"\"' name='json' toReformat='true' toShortenFQNames='true' value='json:\"$FIELD_NAME$\"'>\n    <variable alwaysStopAt='true' defaultValue='' expression='snakeCase(fieldName())' name='FIELD_NAME'/>\n    <context>\n      <option name='GO_TAG_LITERAL' value='true'/>\n    </context>\n  </template>\n\n  <!--FUNCTIONS-->\n  <template description='Main function' name='main' toReformat='true' toShortenFQNames='true'\n            value='func main() {&#10;\t$END$&#10;}'>\n    <context>\n      <option name='GO_FILE' value='true'/>\n    </context>\n  </template>\n  <template description='Init function' name='init' toReformat='true' toShortenFQNames='true'\n            value='func init() {&#10;\t$END$&#10;}'>\n    <context>\n      <option name='GO_FILE' value='true'/>\n    </context>\n  </template>\n  <template description='Method' name='meth' toReformat='true' toShortenFQNames='true'\n            value='func ($RECEIVER$ $TYPE_1$) $NAME$($PARAMS$) $TYPE_2$ {   &#10;\t$END$&#10;}'>\n    <variable alwaysStopAt='true' defaultValue='&quot;receiver&quot;' expression='' name='RECEIVER'/>\n    <variable alwaysStopAt='true' defaultValue='' expression='complete()' name='TYPE_1'/>\n    <variable alwaysStopAt='true' defaultValue='&quot;name&quot;' expression='' name='NAME'/>\n    <variable alwaysStopAt='true' defaultValue='&quot;params&quot;' expression='' name='PARAMS'/>\n    <variable alwaysStopAt='true' defaultValue='' expression='complete()' name='TYPE_2'/>\n    <context>\n      <option name='GO_FILE' value='true'/>\n    </context>\n  </template>\n  <template description='Test' name='test' toReformat='true' toShortenFQNames='true'\n            value='func Test$NAME$(t *testing.T) {&#10;\t$END$&#10;}'>\n    <variable alwaysStopAt='true' defaultValue='&quot;Name&quot;' expression='' name='NAME'/>\n    <context>\n      <option name='GO_FILE' value='true'/>\n    </context>\n  </template>\n  <template description='Benchmark' name='bench' toReformat='true' toShortenFQNames='true'\n            value='func Benchmark$NAME$(b *testing.B) {&#10;\tfor i := 0; i &lt; b.N; i++ {&#10;\t$END$&#10;\t}&#10;}'>\n    <variable alwaysStopAt='true' defaultValue='&quot;Name&quot;' expression='' name='NAME'/>\n    <context>\n      <option name='GO_FILE' value='true'/>\n    </context>\n  </template>\n\n  <!--TYPES AND VARIABLES-->\n  <template description='Map type' name='map' toReformat='true' toShortenFQNames='true'\n            value='map[$KEY_TYPE$]$VALUE_TYPE$'>\n    <variable alwaysStopAt='true' defaultValue='' expression='complete()' name='KEY_TYPE'/>\n    <variable alwaysStopAt='true' defaultValue='' expression='complete()' name='VALUE_TYPE'/>\n    <context>\n      <option name='GO_TYPE' value='true'/>\n    </context>\n  </template>\n  <template description='Variable declaration :=' name=':' toReformat='true' toShortenFQNames='true'\n            value='$NAME$ := $VALUE$'>\n    <variable alwaysStopAt='true' defaultValue='&quot;name&quot;' expression='' name='NAME'/>\n    <variable alwaysStopAt='true' defaultValue='' expression='complete()' name='VALUE'/>\n    <context>\n      <option name='GO_STATEMENT' value='true'/>\n    </context>\n  </template>\n</templateSet>"
  },
  {
    "path": "resources/liveTemplates/goHidden.xml",
    "content": "<?xml version='1.0' encoding='UTF-8'?>\n<!--\n  ~ Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<templateSet group=\"GoHiddenTemplate\">\n  <!-- KEYWORDS -->\n  <template description='Package declaration' id='go_lang_package' name='go_lang_package' toReformat='true' toShortenFQNames='true'\n            value='package $NAME$'>\n    <variable alwaysStopAt='true' defaultValue='' expression='complete()' name='NAME'/>\n    <context>\n      <option name='GO' value='true'/>\n    </context>\n  </template>\n  <template description='Import declaration' id='go_lang_import' name='go_lang_import' toReformat='true' toShortenFQNames='true'\n            value='import \"$END$\"'>\n    <context>\n      <option name='GO' value='true'/>\n    </context>\n  </template>\n  <template description='Defer declaration' id='go_lang_break' name='go_lang_break' toReformat='true' toShortenFQNames='true'\n            value='break'>\n    <context>\n      <option name='GO' value='true'/>\n    </context>\n  </template>\n  <template description='Defer declaration' id='go_lang_continue' name='go_lang_continue' toReformat='true' toShortenFQNames='true'\n            value='continue'>\n    <context>\n      <option name='GO' value='true'/>\n    </context>\n  </template>\n  <template description='Constant declaration' id='go_lang_const' name='go_lang_const' toReformat='true' toShortenFQNames='true'\n            value='const $NAME$ $TYPE$ = $VALUE$'>\n    <variable alwaysStopAt='true' defaultValue='&quot;name&quot;' expression='' name='NAME'/>\n    <variable alwaysStopAt='true' defaultValue='' expression='complete()' name='TYPE'/>\n    <variable alwaysStopAt='true' defaultValue='' expression='complete()' name='VALUE'/>\n    <context>\n      <option name='GO' value='true'/>\n    </context>\n  </template>\n  <template description='For loop' id='go_lang_for' name='go_lang_for' toReformat='true' toShortenFQNames='true'\n            value='for $CONDITION$ {&#10;\t$END$&#10;}'>\n    <variable alwaysStopAt='true' defaultValue='' expression='complete()' name='CONDITION'/>\n    <context>\n      <option name='GO' value='true'/>\n    </context>\n  </template>\n  <template description='If statement' id='go_lang_if' name='go_lang_if' toReformat='true' toShortenFQNames='true'\n            value='if $CONDITION$ {&#10;\t$END$&#10;}'>\n    <variable alwaysStopAt='true' defaultValue='' expression='complete()' name='CONDITION'/>\n    <context>\n      <option name='GO' value='true'/>\n    </context>\n  </template>\n  <template description=\"Switch statement\" id='go_lang_switch' name=\"go_lang_switch\" toReformat=\"true\" toShortenFQNames=\"true\"\n            value=\"switch $EXPRESSION$ {&#10;\t$END$&#10;}\">\n    <variable alwaysStopAt='true' defaultValue='&quot;expr&quot;' expression='' name='EXPRESSION'/>\n    <context>\n      <option name='GO' value='true'/>\n    </context>\n  </template>\n  <template description='Case clause' id='go_lang_case' name='go_lang_case' toReformat='true' toShortenFQNames='true'\n            value='case $CONDITION$:&#10;\t$END$'>\n    <variable alwaysStopAt='true' defaultValue='' expression='complete()' name='CONDITION'/>\n    <context>\n      <option name='GO' value='true'/>\n    </context>\n  </template>\n  <template description='Default clause' id='go_lang_default' name='go_lang_default' toReformat='true' toShortenFQNames='true'\n            value='default:&#10;\t$END$'>\n    <context>\n      <option name='GO' value='true'/>\n    </context>\n  </template>\n  <template description='Function or method' id='go_lang_func' name='go_lang_func' toReformat='true' toShortenFQNames='true'\n            value='func $NAME$($PARAMETERS$) $RETURN$ {&#10;\t$END$&#10;}'>\n    <variable alwaysStopAt='true' defaultValue='' expression='' name='NAME'/>\n    <variable alwaysStopAt='true' defaultValue='' expression='' name='PARAMETERS'/>\n    <variable alwaysStopAt='true' defaultValue='' expression='' name='RETURN'/>\n    <context>\n      <option name='GO' value='true'/>\n    </context>\n  </template>\n  <template description='Anonymous function' id='go_lang_anonymous_func' name='go_lang_anonymous_func' toReformat='true' toShortenFQNames='true'\n            value='func() {$END$}'>\n    <context>\n      <option name='GO' value='true'/>\n    </context>\n  </template>\n  <template description='Anonymous struct' id='go_lang_anonymous_struct' name='go_lang_anonymous_struct' toReformat='true' toShortenFQNames='true'\n            value='struct {&#10;\t$END$&#10;}{}'>\n    <context>\n      <option name='GO' value='true'/>\n    </context>\n  </template>\n  <template description='Variable declaration' id='go_lang_var' name='go_lang_var' toReformat='true' toShortenFQNames='true'\n            value='var $NAME$ $TYPE$ = $VALUE$'>\n    <variable alwaysStopAt='true' defaultValue='&quot;name&quot;' expression='' name='NAME'/>\n    <variable alwaysStopAt='true' defaultValue='' expression='complete()' name='TYPE'/>\n    <variable alwaysStopAt='true' defaultValue='' expression='complete()' name='VALUE'/>\n    <context>\n      <option name='GO' value='true'/>\n    </context>\n  </template>\n  <template description='Interface or struct' id='go_lang_type' name='go_lang_type' toReformat='true' toShortenFQNames='true'\n            value='type $NAME$ $TYPE$'>\n    <variable alwaysStopAt='true' defaultValue='&quot;name&quot;' expression='' name='NAME'/>\n    <variable alwaysStopAt='true' defaultValue='' expression='complete' name='TYPE'/>\n    <context>\n      <option name='GO' value='true'/>\n    </context>\n  </template>\n  <template description='Type quick fix' id='go_lang_type_qf' name='type_qf' toReformat='true' toShortenFQNames='true'\n            value='type $NAME$$END$ $TYPE$&#10;&#10;'>\n    <variable alwaysStopAt='true' defaultValue='' expression='complete' name='TYPE'/>\n    <context>\n      <option name='GO' value='true'/>\n    </context>\n  </template>\n  <template description='Local variable quick fix' id='go_lang_local_var_qf' name='go_lang_var_qf' toReformat='true' toShortenFQNames='true'\n            value='$NAME$$END$ := $VALUE$&#10;'>\n    <variable alwaysStopAt='true' defaultValue='' expression='complete()' name='VALUE'/>\n    <context>\n      <option name='GO' value='true'/>\n    </context>\n  </template>\n  <template description='Global variable quick fix' id='go_lang_global_var_qf' name='global_var_qf' toReformat='true' toShortenFQNames='true'\n            value='var $NAME$$END$ = $VALUE$&#10;&#10;'>\n    <variable alwaysStopAt='true' defaultValue='' expression='complete()' name='VALUE'/>\n    <context>\n      <option name='GO' value='true'/>\n    </context>\n  </template>\n  <template description='Global constant quick fix' id='go_lang_const_qf' name='global_const_qf' toReformat='true' toShortenFQNames='true'\n            value='const $NAME$$END$ = $VALUE$&#10;'>\n    <variable alwaysStopAt='true' defaultValue='' expression='complete()' name='VALUE'/>\n    <context>\n      <option name='GO' value='true'/>\n    </context>\n  </template>\n  <template description='Add return' id='go_lang_add_return' name='add_return' toReformat='true' toShortenFQNames='true'\n            value='return $VALUE$$END$&#10;'>\n    <variable alwaysStopAt='true' defaultValue='' expression='' name='VALUE'/>\n    <context>\n      <option name='GO' value='true'/>\n    </context>\n  </template>\n</templateSet>\n"
  },
  {
    "path": "resources/liveTemplates/goTags.xml",
    "content": "<?xml version='1.0' encoding='UTF-8'?>\n<!--\n  ~ Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<templateSet group=\"Go Struct Tags\">\n  <template description='`xml:\"\"`' name='xml' toReformat='true' toShortenFQNames='true' value='`xml:\"$FIELD_NAME$\"$END$`'>\n    <variable alwaysStopAt='true' defaultValue='' expression='snakeCase(fieldName())' name='FIELD_NAME'/>\n    <context>\n      <option name='GO_TAG' value='true'/>\n    </context>\n  </template>\n  <template description='`json:\"\"`' name='json' toReformat='true' toShortenFQNames='true' value='`json:\"$FIELD_NAME$\"$END$`'>\n    <variable alwaysStopAt='true' defaultValue='' expression='snakeCase(fieldName())' name='FIELD_NAME'/>\n    <context>\n      <option name='GO_TAG' value='true'/>\n    </context>\n  </template>\n</templateSet>"
  },
  {
    "path": "settings.gradle",
    "content": "rootProject.name = 'intellij-go'\ninclude 'utils', 'google-app-engine', 'google-app-engine:google-app-engine-yaml', 'plan9'"
  },
  {
    "path": "src/com/goide/GoCommenter.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide;\n\nimport com.intellij.lang.CodeDocumentationAwareCommenter;\nimport com.intellij.psi.PsiComment;\nimport com.intellij.psi.tree.IElementType;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoCommenter implements CodeDocumentationAwareCommenter {\n  @Nullable\n  @Override\n  public String getLineCommentPrefix() {\n    return \"//\";\n  }\n\n  @Nullable\n  @Override\n  public String getBlockCommentPrefix() {\n    return \"/*\";\n  }\n\n  @Nullable\n  @Override\n  public String getBlockCommentSuffix() {\n    return \"*/\";\n  }\n\n  @Nullable\n  @Override\n  public String getCommentedBlockCommentPrefix() {\n    return null;\n  }\n\n  @Nullable\n  @Override\n  public String getCommentedBlockCommentSuffix() {\n    return null;\n  }\n\n  @Nullable\n  @Override\n  public IElementType getLineCommentTokenType() {\n    return GoParserDefinition.LINE_COMMENT;\n  }\n\n  @Nullable\n  @Override\n  public IElementType getBlockCommentTokenType() {\n    return GoParserDefinition.MULTILINE_COMMENT;\n  }\n\n  @Nullable\n  @Override\n  public IElementType getDocumentationCommentTokenType() {\n    return null;\n  }\n\n  @Nullable\n  @Override\n  public String getDocumentationCommentPrefix() {\n    return null;\n  }\n\n  @Nullable\n  @Override\n  public String getDocumentationCommentLinePrefix() {\n    return null;\n  }\n\n  @Nullable\n  @Override\n  public String getDocumentationCommentSuffix() {\n    return null;\n  }\n\n  @Override\n  public boolean isDocumentationComment(PsiComment comment) {\n    return false;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/GoCommentsConverter.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide;\n\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.psi.PsiComment;\nimport com.intellij.psi.tree.IElementType;\nimport com.intellij.util.containers.ContainerUtil;\nimport com.intellij.util.io.URLUtil;\nimport com.intellij.xml.util.XmlStringUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.Collections;\nimport java.util.Iterator;\nimport java.util.List;\nimport java.util.regex.Matcher;\nimport java.util.regex.Pattern;\n\n/**\n * See https://golang.org/src/go/doc/comment.go\n */\npublic class GoCommentsConverter {\n  private static final Pattern LEADING_TAB = Pattern.compile(\"^\\\\t\", Pattern.MULTILINE);\n  \n  @NotNull\n  public String toText(@NotNull List<PsiComment> comments) {\n    return StringUtil.join(getStrings(comments), \"\\n\");\n  }\n\n  @NotNull\n  public String toHtml(@NotNull List<PsiComment> comments) {\n    return textToHtml(getStrings(comments));\n  }\n\n  @NotNull\n  private static List<String> getStrings(@NotNull List<PsiComment> comments) {\n    List<String> strings = ContainerUtil.newArrayList();\n    for (PsiComment comment : comments) {\n      IElementType type = comment.getTokenType();\n      if (type == GoParserDefinition.LINE_COMMENT) {\n        strings.add(StringUtil.trimStart(StringUtil.trimStart(comment.getText(), \"//\"), \" \"));\n      }\n      else if (type == GoParserDefinition.MULTILINE_COMMENT) {\n        String text = StringUtil.trimEnd(comment.getText(), \"*/\");\n        text = StringUtil.trimStart(text, \"/*\");\n        text = LEADING_TAB.matcher(text).replaceAll(\"\");\n        Collections.addAll(strings, StringUtil.splitByLines(text, false));\n      }\n    }\n    return strings;\n  }\n\n  @NotNull\n  public String textToHtml(@NotNull List<String> strings) {\n    State state = new State(strings.iterator());\n    while (state.hasNext()) {\n      state.next();\n      if (state.indented()) {\n        state.flushBlock(\"p\");\n        processIndentedBlock(state);\n      }\n      processSimpleBlock(state);\n    }\n    state.flushBlock(\"p\");\n    return state.result();\n  }\n\n  private static void processSimpleBlock(@NotNull State state) {\n    if (state.isBlank()) {\n      state.flushBlock(\"p\");\n    }\n    else {\n      state.append(state.text, true);\n      state.append(\"\\n\"); // just for prettier testdata\n    }\n  }\n\n  private static void processIndentedBlock(@NotNull State state) {\n    state.append(state.text);\n    int emptyLines = 1;\n    String text;\n    while ((text = state.next()) != null) {\n      if (state.isBlank()) {\n        emptyLines++;\n      }\n      else if (state.indented()) {\n        state.append(StringUtil.repeatSymbol('\\n', emptyLines)).append(text);\n        emptyLines = 1;\n      }\n      else {\n        break;\n      }\n    }\n    state.flushBlock(\"pre\");\n  }\n\n  private static class State {\n    @NotNull private final StringBuilder currentBlock = new StringBuilder();\n    @NotNull private final StringBuilder result = new StringBuilder();\n    @NotNull private final Iterator<String> iterator;\n    @Nullable private String text;\n\n    public State(@NotNull Iterator<String> iterator) {\n      this.iterator = iterator;\n    }\n\n    String next() {\n      return text = iterator.hasNext() ? iterator.next() : null;\n    }\n\n    boolean isBlank() {\n      return text != null && text.trim().isEmpty();\n    }\n\n    boolean hasNext() {\n      return iterator.hasNext();\n    }\n\n    boolean indented() {\n      return text != null && (StringUtil.startsWithChar(text, ' ') || StringUtil.startsWithChar(text, '\\t'));\n    }\n\n    State append(@Nullable String text, boolean nice) {\n      if (StringUtil.isNotEmpty(text)) {\n        currentBlock.append(emphasize(text, nice));\n      }\n      return this;\n    }\n\n    State append(@Nullable String text) {\n      return append(text, false);\n    }\n\n    /**\n     * Escape comment text for HTML. If nice is set, also turn `` into &ldquo; and '' into &rdquo;.\n     */\n    private static String emphasize(@NotNull String text, boolean nice) {\n      text = XmlStringUtil.escapeString(text);\n      StringBuilder textWithLinks = null;\n      Matcher matcher = URLUtil.URL_PATTERN.matcher(text);\n      while (matcher.find()) {\n        if (textWithLinks == null) {\n          textWithLinks = new StringBuilder();\n        }\n        textWithLinks.append(text.substring(0, matcher.start()))\n          .append(\"<a href=\\\"\").append(matcher.group()).append(\"\\\">\").append(matcher.group()).append(\"</a>\");\n      }\n      if (textWithLinks != null) {\n        text = textWithLinks.toString();\n      }\n      \n      return nice ? StringUtil.replace(text, new String[]{\"``\", \"''\"}, new String[]{\"&ldquo;\", \"&rdquo;\"}) : text;\n    }\n\n    void flushBlock(@NotNull String wrapTag) {\n      if (currentBlock.length() > 0) {\n        result.append('<').append(wrapTag).append(\">\").append(currentBlock).append(\"</\").append(wrapTag).append(\">\\n\");\n        currentBlock.setLength(0);\n      }\n    }\n\n    String result() {\n      return result.toString();\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/GoDocumentationProvider.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide;\n\nimport com.goide.editor.GoParameterInfoHandler;\nimport com.goide.project.GoVendoringUtil;\nimport com.goide.psi.*;\nimport com.goide.psi.impl.GoCType;\nimport com.goide.psi.impl.GoLightType;\nimport com.goide.psi.impl.GoPsiImplUtil;\nimport com.goide.sdk.GoPackageUtil;\nimport com.goide.sdk.GoSdkUtil;\nimport com.goide.stubs.index.GoAllPrivateNamesIndex;\nimport com.goide.stubs.index.GoAllPublicNamesIndex;\nimport com.goide.stubs.index.GoIdFilter;\nimport com.goide.util.GoUtil;\nimport com.intellij.codeInsight.documentation.DocumentationManagerProtocol;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.lang.documentation.AbstractDocumentationProvider;\nimport com.intellij.openapi.diagnostic.Logger;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.module.ModuleUtilCore;\nimport com.intellij.openapi.project.DumbService;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.Comparing;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.psi.*;\nimport com.intellij.psi.search.GlobalSearchScope;\nimport com.intellij.psi.stubs.StubIndex;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport com.intellij.util.Function;\nimport com.intellij.util.containers.ContainerUtil;\nimport com.intellij.util.indexing.IdFilter;\nimport com.intellij.xml.util.XmlStringUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.Collections;\nimport java.util.List;\n\npublic class GoDocumentationProvider extends AbstractDocumentationProvider {\n  private static final Logger LOG = Logger.getInstance(GoDocumentationProvider.class);\n  private static final GoCommentsConverter COMMENTS_CONVERTER = new GoCommentsConverter();\n\n  @NotNull\n  public static String getCommentText(@NotNull List<PsiComment> comments, boolean withHtml) {\n    return withHtml ? COMMENTS_CONVERTER.toHtml(comments) : COMMENTS_CONVERTER.toText(comments);\n  }\n\n  @NotNull\n  public static List<PsiComment> getCommentsForElement(@Nullable PsiElement element) {\n    List<PsiComment> comments = getCommentsInner(element);\n    if (comments.isEmpty()) {\n      if (element instanceof GoVarDefinition || element instanceof GoConstDefinition) {\n        PsiElement parent = element.getParent(); // spec\n        comments = getCommentsInner(parent);\n        if (comments.isEmpty() && parent != null) {\n          return getCommentsInner(parent.getParent()); // declaration\n        }\n      }\n      else if (element instanceof GoTypeSpec) {\n        return getCommentsInner(element.getParent()); // type declaration\n      }\n    }\n    return comments;\n  }\n\n  @NotNull\n  private static List<PsiComment> getCommentsInner(@Nullable PsiElement element) {\n    if (element == null) {\n      return ContainerUtil.emptyList();\n    }\n    List<PsiComment> result = ContainerUtil.newArrayList();\n    PsiElement e;\n    for (e = element.getPrevSibling(); e != null; e = e.getPrevSibling()) {\n      if (e instanceof PsiWhiteSpace) {\n        if (e.getText().contains(\"\\n\\n\")) return result;\n        continue;\n      }\n      if (e instanceof PsiComment) {\n        result.add(0, (PsiComment)e);\n      }\n      else {\n        return result;\n      }\n    }\n    return result;\n  }\n\n  @Nullable\n  private static GoFile findDocFileForDirectory(@NotNull PsiDirectory directory) {\n    PsiFile file = directory.findFile(\"doc.go\");\n    if (file instanceof GoFile) {\n      return (GoFile)file;\n    }\n    PsiFile directoryFile = directory.findFile(GoUtil.suggestPackageForDirectory(directory) + \".go\");\n    return directoryFile instanceof GoFile ? (GoFile)directoryFile : null;\n  }\n\n  @Nullable\n  private static String getPackageComment(@Nullable GoFile file) {\n    if (file != null) {\n      boolean vendoringEnabled = GoVendoringUtil.isVendoringEnabled(ModuleUtilCore.findModuleForPsiElement(file));\n      // todo: remove after correct stubbing (comments needed in stubs)\n      GoPackageClause pack = PsiTreeUtil.findChildOfType(file, GoPackageClause.class);\n      String title = \"<b>Package \" + GoUtil.suggestPackageForDirectory(file.getParent()) + \"</b>\\n\";\n      String importPath = \"<p><code>import \\\"\" + StringUtil.notNullize(file.getImportPath(vendoringEnabled)) + \"\\\"</code></p>\\n\";\n      return title + importPath + getCommentText(getCommentsForElement(pack), true);\n    }\n    return null;\n  }\n\n  @Nullable\n  private static PsiElement adjustDocElement(@Nullable PsiElement element) {\n    return element instanceof GoImportSpec ? ((GoImportSpec)element).getImportString().resolve() : element;\n  }\n\n  @NotNull\n  private static String getSignature(PsiElement element, PsiElement context) {\n    if (element instanceof GoTypeSpec) {\n      String name = ((GoTypeSpec)element).getName();\n      return StringUtil.isNotEmpty(name) ? \"type \" + name : \"\";\n    }\n    GoDocumentationPresentationFunction presentationFunction = new GoDocumentationPresentationFunction(getImportPathForElement(element));\n    if (element instanceof GoConstDefinition) {\n      String name = ((GoConstDefinition)element).getName();\n      if (StringUtil.isNotEmpty(name)) {\n        String type = getTypePresentation(((GoConstDefinition)element).getGoType(null), presentationFunction);\n        GoExpression value = ((GoConstDefinition)element).getValue();\n        return \"const \" + name + (!type.isEmpty() ? \" \" + type : \"\") + (value != null ? \" = \" + value.getText() : \"\");\n      }\n    }\n    if (element instanceof GoVarDefinition) {\n      String name = ((GoVarDefinition)element).getName();\n      if (StringUtil.isNotEmpty(name)) {\n        String type = getTypePresentation(((GoVarDefinition)element).getGoType(GoPsiImplUtil.createContextOnElement(context)), presentationFunction);\n        GoExpression value = ((GoVarDefinition)element).getValue();\n        return \"var \" + name + (!type.isEmpty() ? \" \" + type : \"\") + (value != null ? \" = \" + value.getText() : \"\");\n      }\n    }\n    if (element instanceof GoParamDefinition) {\n      String name = ((GoParamDefinition)element).getName();\n      if (StringUtil.isNotEmpty(name)) {\n        String type = getTypePresentation(((GoParamDefinition)element).getGoType(GoPsiImplUtil.createContextOnElement(context)), presentationFunction);\n        return \"var \" + name + (!type.isEmpty() ? \" \" + type : \"\");\n      }\n    }\n    if (element instanceof GoReceiver) {\n      String name = ((GoReceiver)element).getName();\n      if (StringUtil.isNotEmpty(name)) {\n        String type = getTypePresentation(((GoReceiver)element).getGoType(GoPsiImplUtil.createContextOnElement(context)), presentationFunction);\n        return \"var \" + name + (!type.isEmpty() ? \" \" + type : \"\");\n      }\n    }\n\n\n    return element instanceof GoSignatureOwner ? getSignatureOwnerTypePresentation((GoSignatureOwner)element, presentationFunction) : \"\";\n  }\n\n  @NotNull\n  private static String getSignatureOwnerTypePresentation(@NotNull GoSignatureOwner signatureOwner,\n                                                          @NotNull Function<PsiElement, String> presentationFunction) {\n    PsiElement identifier = null;\n    if (signatureOwner instanceof GoNamedSignatureOwner) {\n      identifier = ((GoNamedSignatureOwner)signatureOwner).getIdentifier();\n    }\n    GoSignature signature = signatureOwner.getSignature();\n\n    if (identifier == null && signature == null) {\n      return \"\";\n    }\n\n    StringBuilder builder = new StringBuilder(\"func \").append(identifier != null ? identifier.getText() : \"\").append('(');\n    if (signature != null) {\n      builder.append(getParametersAsString(signature.getParameters()));\n    }\n    builder.append(')');\n\n    GoResult result = signature != null ? signature.getResult() : null;\n    GoParameters parameters = result != null ? result.getParameters() : null;\n    GoType type = result != null ? result.getType() : null;\n\n    if (parameters != null) {\n      String signatureParameters = getParametersAsString(parameters);\n      if (!signatureParameters.isEmpty()) {\n        builder.append(\" (\").append(signatureParameters).append(')');\n      }\n    }\n    else if (type != null) {\n      builder.append(' ').append(getTypePresentation(type, presentationFunction));\n    }\n    return builder.toString();\n  }\n\n  @NotNull\n  private static String getParametersAsString(@NotNull GoParameters parameters) {\n    String contextImportPath = getImportPathForElement(parameters);\n    return StringUtil.join(GoParameterInfoHandler.getParameterPresentations(parameters, element -> getTypePresentation(element, new GoDocumentationPresentationFunction(contextImportPath))), \", \");\n  }\n\n  @Nullable\n  private static String getImportPathForElement(@Nullable PsiElement element) {\n    PsiFile file = element != null ? element.getContainingFile() : null;\n    return file instanceof GoFile ? ((GoFile)file).getImportPath(false) : null;\n  }\n\n  @NotNull\n  public static String getTypePresentation(@Nullable PsiElement element, @NotNull Function<PsiElement, String> presentationFunction) {\n    if (element instanceof GoType) {\n      GoType type = (GoType)element;\n      if (type instanceof GoMapType) {\n        GoType keyType = ((GoMapType)type).getKeyType();\n        GoType valueType = ((GoMapType)type).getValueType();\n        return \"map[\" + getTypePresentation(keyType, presentationFunction) + \"]\" +\n               getTypePresentation(valueType, presentationFunction);\n      }\n      if (type instanceof GoChannelType) {\n        ASTNode typeNode = type.getNode();\n        GoType innerType = ((GoChannelType)type).getType();\n        ASTNode innerTypeNode = innerType != null ? innerType.getNode() : null;\n        if (typeNode != null && innerTypeNode != null) {\n          StringBuilder result = new StringBuilder();\n          for (ASTNode node : typeNode.getChildren(null)) {\n            if (node.equals(innerTypeNode)) {\n              break;\n            }\n            if (node.getElementType() != TokenType.WHITE_SPACE) {\n              result.append(XmlStringUtil.escapeString(node.getText()));\n            }\n          }\n          result.append(\" \").append(getTypePresentation(innerType, presentationFunction));\n          return result.toString();\n        }\n      }\n      if (type instanceof GoParType) {\n        return \"(\" + getTypePresentation(((GoParType)type).getActualType(), presentationFunction) + \")\";\n      }\n      if (type instanceof GoArrayOrSliceType) {\n        return \"[]\" + getTypePresentation(((GoArrayOrSliceType)type).getType(), presentationFunction);\n      }\n      if (type instanceof GoPointerType) {\n        GoType inner = ((GoPointerType)type).getType();\n        return inner instanceof GoSpecType ? getTypePresentation(inner, presentationFunction)\n                                           : \"*\" + getTypePresentation(inner, presentationFunction);\n      }\n      if (type instanceof GoTypeList) {\n        return \"(\" + StringUtil.join(((GoTypeList)type).getTypeList(), element1 -> getTypePresentation(element1, presentationFunction), \", \") + \")\";\n      }\n      if (type instanceof GoFunctionType) {\n        return getSignatureOwnerTypePresentation((GoFunctionType)type, presentationFunction);\n      }\n      if (type instanceof GoSpecType) {\n        return getTypePresentation(GoPsiImplUtil.getTypeSpecSafe(type), presentationFunction);\n      }\n      if (type instanceof GoCType) {\n        return \"C\";\n      }\n      if (type instanceof GoLightType) {\n        LOG.error(\"Cannot build presentable text for type: \" + type.getClass().getSimpleName() + \" - \" + type.getText());\n        return \"\";\n      }\n      if (type instanceof GoStructType) {\n        StringBuilder result = new StringBuilder(\"struct {\");\n        result.append(StringUtil.join(((GoStructType)type).getFieldDeclarationList(), declaration -> {\n          GoAnonymousFieldDefinition anon = declaration.getAnonymousFieldDefinition();\n          String fieldString = anon != null ? getTypePresentation(anon.getGoTypeInner(null), presentationFunction)\n                                            : StringUtil.join(declaration.getFieldDefinitionList(), PsiElement::getText, \", \") +\n                                              \" \" + getTypePresentation(declaration.getType(), presentationFunction);\n          GoTag tag = declaration.getTag();\n          return fieldString + (tag != null ? tag.getText() : \"\");\n        }, \"; \"));\n        return result.append(\"}\").toString();\n      }\n      GoTypeReferenceExpression typeRef = GoPsiImplUtil.getTypeReference(type);\n      if (typeRef != null) {\n        PsiElement resolve = typeRef.resolve();\n        if (resolve != null) {\n          return getTypePresentation(resolve, presentationFunction);\n        }\n      }\n    }\n\n    return presentationFunction.fun(element);\n  }\n\n  @Nullable\n  public static String getLocalUrlToElement(@NotNull PsiElement element) {\n    if (element instanceof GoTypeSpec || element instanceof PsiDirectory) {\n      return getReferenceText(element, true);\n    }\n    return null;\n  }\n\n  @Nullable\n  private static String getReferenceText(@Nullable PsiElement element, boolean includePackageName) {\n    if (element instanceof GoNamedElement) {\n      PsiFile file = element.getContainingFile();\n      if (file instanceof GoFile) {\n        String importPath = ((GoFile)file).getImportPath(false);\n        if (element instanceof GoFunctionDeclaration || element instanceof GoTypeSpec) {\n          String name = ((GoNamedElement)element).getName();\n          if (StringUtil.isNotEmpty(name)) {\n            String fqn = getElementFqn((GoNamedElement)element, name, includePackageName);\n            return String.format(\"%s#%s\", StringUtil.notNullize(importPath), fqn);\n          }\n        }\n        else if (element instanceof GoMethodDeclaration) {\n          GoType receiverType = ((GoMethodDeclaration)element).getReceiverType();\n          String receiver = getReceiverTypeText(receiverType);\n          String name = ((GoMethodDeclaration)element).getName();\n          if (StringUtil.isNotEmpty(receiver) && StringUtil.isNotEmpty(name)) {\n            String fqn = getElementFqn((GoNamedElement)element, name, includePackageName);\n            return String.format(\"%s#%s.%s\", StringUtil.notNullize(importPath), receiver, fqn);\n          }\n        }\n      }\n    }\n    else if (element instanceof PsiDirectory && findDocFileForDirectory((PsiDirectory)element) != null) {\n      return GoSdkUtil.getImportPath((PsiDirectory)element, false);\n    }\n\n    return null;\n  }\n\n  private static String getReceiverTypeText(@Nullable GoType type) {\n    if (type == null) return null;\n    if (type instanceof GoPointerType) {\n      GoType inner = ((GoPointerType)type).getType();\n      if (inner != null) return inner.getText();\n    }\n    return type.getText();\n  }\n\n  @NotNull\n  private static String getElementFqn(@NotNull GoNamedElement element, @NotNull String name, boolean includePackageName) {\n    if (includePackageName) {\n      String packageName = element.getContainingFile().getPackageName();\n      if (!StringUtil.isEmpty(packageName)) {\n        return packageName + \".\" + name;\n      }\n    }\n    return name;\n  }\n\n  @Override\n  public String generateDoc(PsiElement element, PsiElement originalElement) {\n    element = adjustDocElement(element);\n    if (element instanceof GoNamedElement) {\n      String signature = getSignature(element, originalElement);\n      signature = StringUtil.isNotEmpty(signature) ? \"<b>\" + signature + \"</b>\\n\" : signature;\n      return StringUtil.nullize(signature + getCommentText(getCommentsForElement(element), true));\n    }\n    if (element instanceof PsiDirectory) {\n      return getPackageComment(findDocFileForDirectory((PsiDirectory)element));\n    }\n    return null;\n  }\n\n  @Override\n  public List<String> getUrlFor(PsiElement element, PsiElement originalElement) {\n    String referenceText = getReferenceText(adjustDocElement(element), false);\n    if (StringUtil.isNotEmpty(referenceText)) {\n      return Collections.singletonList(\"https://godoc.org/\" + referenceText);\n    }\n    return super.getUrlFor(element, originalElement);\n  }\n\n  @Nullable\n  @Override\n  public String getQuickNavigateInfo(PsiElement element, PsiElement originalElement) {\n    if (element instanceof GoNamedElement) {\n      String result = getSignature(element, originalElement);\n      if (StringUtil.isNotEmpty(result)) return result;\n    }\n    return super.getQuickNavigateInfo(element, originalElement);\n  }\n\n  @Override\n  public PsiElement getDocumentationElementForLink(PsiManager psiManager, String link, PsiElement context) {\n    if (context != null && !DumbService.isDumb(psiManager.getProject())) {\n      // it's important to ask module on file, otherwise module won't be found for elements in libraries files [zolotov]\n      Module module = ModuleUtilCore.findModuleForPsiElement(context.getContainingFile());\n      int hash = link.indexOf('#');\n      String importPath = hash >= 0 ? link.substring(0, hash) : link;\n      Project project = psiManager.getProject();\n      VirtualFile directory = GoPackageUtil.findByImportPath(importPath, project, module);\n      PsiDirectory psiDirectory = directory != null ? psiManager.findDirectory(directory) : null;\n      String anchor = hash >= 0 ? link.substring(Math.min(hash + 1, link.length())) : null;\n      if (StringUtil.isNotEmpty(anchor)) {\n        GlobalSearchScope scope = psiDirectory != null ? GoPackageUtil.packageScope(psiDirectory, null)\n                                                       : GlobalSearchScope.projectScope(project);\n        IdFilter idFilter = GoIdFilter.getFilesFilter(scope);\n        GoNamedElement element = ContainerUtil.getFirstItem(StubIndex.getElements(GoAllPublicNamesIndex.ALL_PUBLIC_NAMES, anchor, project,\n                                                                                  scope, idFilter, GoNamedElement.class));\n        if (element != null) {\n          return element;\n        }\n        return ContainerUtil.getFirstItem(StubIndex.getElements(GoAllPrivateNamesIndex.ALL_PRIVATE_NAMES, anchor, project, scope, idFilter,\n                                                                GoNamedElement.class));\n      }\n      else {\n        return psiDirectory;\n      }\n    }\n    return super.getDocumentationElementForLink(psiManager, link, context);\n  }\n\n  private static class GoDocumentationPresentationFunction implements Function<PsiElement, String> {\n    private final String myContextImportPath;\n\n    public GoDocumentationPresentationFunction(@Nullable String contextImportPath) {\n      myContextImportPath = contextImportPath;\n    }\n\n    @Override\n    public String fun(PsiElement element) {\n      if (element instanceof GoTypeSpec) {\n        String localUrl = getLocalUrlToElement(element);\n        String name = ((GoTypeSpec)element).getName();\n        if (StringUtil.isNotEmpty(name)) {\n          String importPath = getImportPathForElement(element);\n          GoFile file = ((GoTypeSpec)element).getContainingFile();\n          String packageName = file.getPackageName();\n          if (StringUtil.isNotEmpty(packageName) &&\n              !GoPsiImplUtil.isBuiltinFile(file) &&\n              !Comparing.equal(importPath, myContextImportPath)) {\n            return String.format(\"<a href=\\\"%s%s\\\">%s</a>.<a href=\\\"%s%s\\\">%s</a>\",\n                                 DocumentationManagerProtocol.PSI_ELEMENT_PROTOCOL, StringUtil.notNullize(importPath), packageName,\n                                 DocumentationManagerProtocol.PSI_ELEMENT_PROTOCOL, localUrl, name);\n          }\n          return String.format(\"<a href=\\\"%s%s\\\">%s</a>\", DocumentationManagerProtocol.PSI_ELEMENT_PROTOCOL, localUrl, name);\n        }\n      }\n      return element != null ? element.getText() : \"\";\n    }\n  }\n}"
  },
  {
    "path": "src/com/goide/GoFileElementType.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide;\n\nimport com.goide.psi.GoFile;\nimport com.goide.stubs.GoFileStub;\nimport com.goide.stubs.index.GoPackagesIndex;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.StubBuilder;\nimport com.intellij.psi.stubs.*;\nimport com.intellij.psi.tree.IStubFileElementType;\nimport com.intellij.util.io.StringRef;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.io.IOException;\n\npublic class GoFileElementType extends IStubFileElementType<GoFileStub> {\n  public static final IStubFileElementType INSTANCE = new GoFileElementType();\n  public static final int VERSION = 21;\n\n  private GoFileElementType() {\n    super(\"GO_FILE\", GoLanguage.INSTANCE);\n  }\n\n  @Override\n  public int getStubVersion() {\n    return VERSION;\n  }\n\n  @NotNull\n  @Override\n  public StubBuilder getBuilder() {\n    return new DefaultStubBuilder() {\n      @NotNull\n      @Override\n      protected StubElement createStubForFile(@NotNull PsiFile file) {\n        if (file instanceof GoFile) {\n          return new GoFileStub((GoFile)file);\n        }\n        return super.createStubForFile(file);\n      }\n    };\n  }\n\n  @Override\n  public void indexStub(@NotNull GoFileStub stub, @NotNull IndexSink sink) {\n    super.indexStub(stub, sink);\n    String packageName = stub.getPackageName();\n    if (StringUtil.isNotEmpty(packageName)) {\n      sink.occurrence(GoPackagesIndex.KEY, packageName);\n    }\n  }\n\n  @Override\n  public void serialize(@NotNull GoFileStub stub, @NotNull StubOutputStream dataStream) throws IOException {\n    dataStream.writeUTF(StringUtil.notNullize(stub.getBuildFlags()));\n  }\n\n  @NotNull\n  @Override\n  public GoFileStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {\n    return new GoFileStub(null, StringRef.fromNullableString(StringUtil.nullize(dataStream.readUTF())));\n  }\n\n  @NotNull\n  @Override\n  public String getExternalId() {\n    return \"go.FILE\";\n  }\n}\n"
  },
  {
    "path": "src/com/goide/GoFileType.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide;\n\nimport com.intellij.openapi.fileTypes.LanguageFileType;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.vfs.CharsetToolkit;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport javax.swing.*;\nimport java.nio.charset.Charset;\n\npublic class GoFileType extends LanguageFileType {\n  public static final LanguageFileType INSTANCE = new GoFileType();\n\n  protected GoFileType() {\n    super(GoLanguage.INSTANCE);\n  }\n\n  @NotNull\n  @Override\n  public String getName() {\n    return GoConstants.GO;\n  }\n\n  @NotNull\n  @Override\n  public String getDescription() {\n    return \"Go files\";\n  }\n\n  @NotNull\n  @Override\n  public String getDefaultExtension() {\n    return \"go\";\n  }\n\n  @Nullable\n  @Override\n  public Icon getIcon() {\n    return GoIcons.ICON;\n  }\n\n  @Override\n  public String getCharset(@NotNull VirtualFile file, @NotNull byte[] content) {\n    return CharsetToolkit.UTF8;\n  }\n\n  @Override\n  public Charset extractCharsetFromFileContent(@Nullable Project project, @Nullable VirtualFile file, @NotNull CharSequence content) {\n    return CharsetToolkit.UTF8_CHARSET;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/GoFileTypeFactory.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide;\n\nimport com.intellij.openapi.fileTypes.FileTypeConsumer;\nimport com.intellij.openapi.fileTypes.FileTypeFactory;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoFileTypeFactory extends FileTypeFactory {\n  @Override\n  public void createFileTypes(@NotNull FileTypeConsumer consumer) {\n    consumer.consume(GoFileType.INSTANCE, GoFileType.INSTANCE.getDefaultExtension());\n  }\n}\n"
  },
  {
    "path": "src/com/goide/GoIconProvider.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide;\n\nimport com.goide.psi.GoFile;\nimport com.goide.runconfig.testing.GoTestFinder;\nimport com.intellij.ide.IconProvider;\nimport com.intellij.openapi.project.DumbAware;\nimport com.intellij.openapi.util.Iconable;\nimport com.intellij.psi.PsiElement;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport javax.swing.*;\n\npublic class GoIconProvider extends IconProvider implements DumbAware {\n  @Nullable\n  @Override\n  public Icon getIcon(@NotNull PsiElement e, @Iconable.IconFlags int flags) {\n    return e instanceof GoFile && e.isValid() && GoTestFinder.isTestFile((GoFile)e) ? GoIcons.TEST_RUN : null;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/GoIcons.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide;\n\nimport com.intellij.icons.AllIcons;\nimport com.intellij.openapi.util.IconLoader;\nimport com.intellij.ui.LayeredIcon;\nimport com.intellij.util.PlatformIcons;\nimport org.jetbrains.annotations.NotNull;\n\nimport javax.swing.*;\n\n@SuppressWarnings(\"ConstantConditions\")\npublic interface GoIcons {\n  Icon ICON = IconLoader.findIcon(\"/icons/go.png\");\n  Icon TYPE = IconLoader.findIcon(\"/icons/type.png\");\n  Icon APPLICATION_RUN = Helper.createIconWithShift(ICON, AllIcons.Nodes.RunnableMark);\n  Icon TEST_RUN = Helper.createIconWithShift(ICON, AllIcons.Nodes.JunitTestMark);\n  Icon METHOD = AllIcons.Nodes.Method;\n  Icon FUNCTION = AllIcons.Nodes.Function;\n  Icon VARIABLE = AllIcons.Nodes.Variable;\n  Icon CONSTANT = IconLoader.findIcon(\"/icons/constant.png\");\n  Icon PARAMETER = AllIcons.Nodes.Parameter;\n  Icon FIELD = AllIcons.Nodes.Field;\n  Icon LABEL = null; // todo: we need an icon here!\n  Icon RECEIVER = AllIcons.Nodes.Parameter;\n  Icon PACKAGE = AllIcons.Nodes.Package;\n  Icon MODULE_ICON = IconLoader.findIcon(\"/icons/goModule.png\");\n  Icon DEBUG = ICON;\n  Icon DIRECTORY = PlatformIcons.DIRECTORY_CLOSED_ICON;\n\n  class Helper {\n    private Helper() {}\n\n    @NotNull\n    public static LayeredIcon createIconWithShift(@NotNull Icon base, Icon mark) {\n      LayeredIcon icon = new LayeredIcon(2) {\n        @Override\n        public int getIconHeight() {\n          return base.getIconHeight();\n        }\n      };\n      icon.setIcon(base, 0);\n      icon.setIcon(mark, 1, 0, base.getIconWidth() / 2);\n      return icon;\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/GoIndexPatternBuilder.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide;\n\nimport com.goide.psi.GoFile;\nimport com.intellij.lexer.Lexer;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.impl.search.IndexPatternBuilder;\nimport com.intellij.psi.tree.IElementType;\nimport com.intellij.psi.tree.TokenSet;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoIndexPatternBuilder implements IndexPatternBuilder {\n  @Nullable\n  @Override\n  public Lexer getIndexingLexer(@NotNull PsiFile file) {\n    return file instanceof GoFile ? ((GoFile)file).getParserDefinition().createLexer(file.getProject()) : null;\n  }\n\n  @Nullable\n  @Override\n  public TokenSet getCommentTokenSet(@NotNull PsiFile file) {\n    return GoParserDefinition.COMMENTS;\n  }\n\n  @Override\n  public int getCommentStartDelta(IElementType tokenType) {\n    return 0;\n  }\n\n  @Override\n  public int getCommentEndDelta(IElementType tokenType) {\n    return tokenType == GoParserDefinition.MULTILINE_COMMENT ? 2 : 0;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/GoLanguage.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide;\n\nimport com.intellij.lang.Language;\nimport com.intellij.openapi.fileTypes.LanguageFileType;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoLanguage extends Language {\n  public static final Language INSTANCE = new GoLanguage();\n\n  private GoLanguage() {\n    super(\"go\", \"text/go\", \"text/x-go\", \"application/x-go\");\n  }\n\n  @NotNull\n  @Override\n  public String getDisplayName() {\n    return GoConstants.GO;\n  }\n\n  @Nullable\n  @Override\n  public LanguageFileType getAssociatedFileType() {\n    return GoFileType.INSTANCE;\n  }\n\n  @Override\n  public boolean isCaseSensitive() {\n    return true;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/GoModuleBuilder.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide;\n\nimport com.goide.sdk.GoSdkType;\nimport com.intellij.compiler.CompilerWorkspaceConfiguration;\nimport com.intellij.ide.util.projectWizard.JavaModuleBuilder;\nimport com.intellij.ide.util.projectWizard.ModuleBuilderListener;\nimport com.intellij.ide.util.projectWizard.SourcePathsBuilder;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.module.ModuleType;\nimport com.intellij.openapi.options.ConfigurationException;\nimport com.intellij.openapi.projectRoots.SdkTypeId;\nimport com.intellij.openapi.roots.ModifiableRootModel;\nimport com.intellij.openapi.util.Pair;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.List;\n\npublic class GoModuleBuilder extends JavaModuleBuilder implements SourcePathsBuilder, ModuleBuilderListener {\n  @Override\n  public void setupRootModel(ModifiableRootModel modifiableRootModel) throws ConfigurationException {\n    addListener(this);\n    super.setupRootModel(modifiableRootModel);\n  }\n\n  @Override\n  public List<Pair<String, String>> getSourcePaths() {\n    return ContainerUtil.emptyList();\n  }\n\n  @NotNull\n  @Override\n  public ModuleType getModuleType() {\n    return GoModuleType.getInstance();\n  }\n\n  @Override\n  public boolean isSuitableSdkType(SdkTypeId sdkType) {\n    return sdkType == GoSdkType.getInstance();\n  }\n\n  @Override\n  public void moduleCreated(@NotNull Module module) {\n    CompilerWorkspaceConfiguration.getInstance(module.getProject()).CLEAR_OUTPUT_DIRECTORY = false;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/GoModuleType.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide;\n\nimport com.goide.sdk.GoSdkType;\nimport com.intellij.ide.util.projectWizard.ModuleWizardStep;\nimport com.intellij.ide.util.projectWizard.ProjectJdkForModuleStep;\nimport com.intellij.ide.util.projectWizard.WizardContext;\nimport com.intellij.openapi.module.ModuleType;\nimport com.intellij.openapi.module.ModuleTypeManager;\nimport com.intellij.openapi.roots.ui.configuration.ModulesProvider;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport javax.swing.*;\n\npublic class GoModuleType extends ModuleType<GoModuleBuilder> {\n  public GoModuleType() {\n    super(GoConstants.MODULE_TYPE_ID);\n  }\n\n  @NotNull\n  public static GoModuleType getInstance() {\n    return (GoModuleType)ModuleTypeManager.getInstance().findByID(GoConstants.MODULE_TYPE_ID);\n  }\n\n  @NotNull\n  @Override\n  public GoModuleBuilder createModuleBuilder() {\n    return new GoModuleBuilder();\n  }\n\n  @NotNull\n  @Override\n  public String getName() {\n    return \"Go Module\";\n  }\n\n  @NotNull\n  @Override\n  public String getDescription() {\n    return \"Go modules are used for developing <b>Go</b> applications.\";\n  }\n\n  @Nullable\n  @Override\n  public Icon getBigIcon() {\n    return GoIcons.MODULE_ICON;\n  }\n\n  @Nullable\n  @Override\n  public Icon getNodeIcon(boolean isOpened) {\n    return GoIcons.ICON;\n  }\n\n  @NotNull\n  @Override\n  public ModuleWizardStep[] createWizardSteps(@NotNull WizardContext wizardContext,\n                                              @NotNull GoModuleBuilder moduleBuilder,\n                                              @NotNull ModulesProvider modulesProvider) {\n    return new ModuleWizardStep[]{new ProjectJdkForModuleStep(wizardContext, GoSdkType.getInstance()) {\n      @Override\n      public void updateDataModel() {\n        super.updateDataModel();\n        moduleBuilder.setModuleJdk(getJdk());\n      }\n    }};\n  }\n}\n"
  },
  {
    "path": "src/com/goide/GoNamesValidator.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide;\n\nimport com.goide.lexer.GoLexer;\nimport com.intellij.lang.refactoring.NamesValidator;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.psi.tree.IElementType;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoNamesValidator implements NamesValidator {\n  @Override\n  public boolean isKeyword(@NotNull String name, Project project) {\n    return GoParserDefinition.KEYWORDS.contains(getLexerType(name));\n  }\n\n  @Override\n  public boolean isIdentifier(@NotNull String name, Project project) {\n    return getLexerType(name) == GoTypes.IDENTIFIER;\n  }\n\n  @Nullable\n  private static IElementType getLexerType(@NotNull String text) {\n    GoLexer lexer = new GoLexer();\n    lexer.start(text);\n    return lexer.getTokenEnd() == text.length() ? lexer.getTokenType() : null;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/GoParserDefinition.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide;\n\nimport com.goide.lexer.GoLexer;\nimport com.goide.parser.GoParser;\nimport com.goide.psi.GoFile;\nimport com.goide.psi.GoTokenType;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.lang.ParserDefinition;\nimport com.intellij.lang.PsiParser;\nimport com.intellij.lexer.Lexer;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.psi.FileViewProvider;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.tree.IElementType;\nimport com.intellij.psi.tree.IFileElementType;\nimport com.intellij.psi.tree.TokenSet;\nimport org.jetbrains.annotations.NotNull;\n\nimport static com.goide.GoTypes.*;\n\npublic class GoParserDefinition implements ParserDefinition {\n  public static final IElementType LINE_COMMENT = new GoTokenType(\"GO_LINE_COMMENT\");\n  public static final IElementType MULTILINE_COMMENT = new GoTokenType(\"GO_MULTILINE_COMMENT\");\n\n  public static final IElementType WS = new GoTokenType(\"GO_WHITESPACE\");\n  public static final IElementType NLS = new GoTokenType(\"GO_WS_NEW_LINES\");\n\n  public static final TokenSet WHITESPACES = TokenSet.create(WS, NLS);\n  public static final TokenSet COMMENTS = TokenSet.create(LINE_COMMENT, MULTILINE_COMMENT);\n  public static final TokenSet STRING_LITERALS = TokenSet.create(STRING, RAW_STRING, CHAR);\n  public static final TokenSet NUMBERS = TokenSet.create(INT, FLOAT, FLOATI, DECIMALI, FLOATI); // todo: HEX, OCT,\n  public static final TokenSet KEYWORDS = TokenSet.create(\n    BREAK, CASE, CHAN, CONST, CONTINUE, DEFAULT, DEFER, ELSE, FALLTHROUGH, FOR, FUNC, GO, GOTO, IF, IMPORT,\n    INTERFACE, MAP, PACKAGE, RANGE, RETURN, SELECT, STRUCT, SWITCH, TYPE_, VAR);\n  public static final TokenSet OPERATORS = TokenSet.create(\n    EQ, ASSIGN, NOT_EQ, NOT, PLUS_PLUS, PLUS_ASSIGN, PLUS, MINUS_MINUS, MINUS_ASSIGN, MINUS, COND_OR, BIT_OR_ASSIGN, BIT_OR,\n    BIT_CLEAR_ASSIGN, BIT_CLEAR, COND_AND, BIT_AND_ASSIGN, BIT_AND, SHIFT_LEFT_ASSIGN, SHIFT_LEFT, SEND_CHANNEL, LESS_OR_EQUAL,\n    LESS, BIT_XOR_ASSIGN, BIT_XOR, MUL_ASSIGN, MUL, QUOTIENT_ASSIGN, QUOTIENT, REMAINDER_ASSIGN, REMAINDER, SHIFT_RIGHT_ASSIGN,\n    SHIFT_RIGHT, GREATER_OR_EQUAL, GREATER, VAR_ASSIGN);\n\n  @NotNull\n  @Override\n  public Lexer createLexer(Project project) {\n    return new GoLexer();\n  }\n\n  @NotNull\n  @Override\n  public PsiParser createParser(Project project) {\n    return new GoParser();\n  }\n\n  @NotNull\n  @Override\n  public IFileElementType getFileNodeType() {\n    return GoFileElementType.INSTANCE;\n  }\n\n  @NotNull\n  @Override\n  public TokenSet getWhitespaceTokens() {\n    return WHITESPACES;\n  }\n\n  @NotNull\n  @Override\n  public TokenSet getCommentTokens() {\n    return COMMENTS;\n  }\n\n  @NotNull\n  @Override\n  public TokenSet getStringLiteralElements() {\n    return STRING_LITERALS;\n  }\n\n  @NotNull\n  @Override\n  public PsiElement createElement(ASTNode node) {\n    return Factory.createElement(node);\n  }\n\n  @NotNull\n  @Override\n  public PsiFile createFile(@NotNull FileViewProvider viewProvider) {\n    return new GoFile(viewProvider);\n  }\n\n  @NotNull\n  @Override\n  public SpaceRequirements spaceExistanceTypeBetweenTokens(ASTNode left, ASTNode right) {\n    return SpaceRequirements.MAY;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/GoProjectGenerator.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide;\n\nimport com.intellij.facet.ui.ValidationResult;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.progress.ProcessCanceledException;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.platform.DirectoryProjectGenerator;\nimport org.jetbrains.annotations.Nls;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport javax.swing.*;\n\npublic class GoProjectGenerator implements DirectoryProjectGenerator {\n  @Nls\n  @NotNull\n  @Override\n  public String getName() {\n    return GoConstants.GO;\n  }\n\n  @Nullable\n  @Override\n  public Object showGenerationSettings(VirtualFile baseDir) throws ProcessCanceledException {\n    return null;\n  }\n\n  @Nullable\n  @Override\n  public Icon getLogo() {\n    return GoIcons.ICON;\n  }\n\n  @Override\n  public void generateProject(@NotNull Project project, @NotNull VirtualFile baseDir, @Nullable Object settings, @NotNull Module module) {\n\n  }\n\n  @NotNull\n  @Override\n  public ValidationResult validate(@NotNull String baseDirPath) {\n    return ValidationResult.OK;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/UpdateComponent.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide;\n\nimport com.intellij.ide.plugins.IdeaPluginDescriptor;\nimport com.intellij.ide.util.PropertiesComponent;\nimport com.intellij.openapi.Disposable;\nimport com.intellij.openapi.application.ApplicationInfo;\nimport com.intellij.openapi.application.ApplicationManager;\nimport com.intellij.openapi.application.PermanentInstallationID;\nimport com.intellij.openapi.components.ApplicationComponent;\nimport com.intellij.openapi.diagnostic.Logger;\nimport com.intellij.openapi.editor.Document;\nimport com.intellij.openapi.editor.EditorFactory;\nimport com.intellij.openapi.editor.event.EditorFactoryAdapter;\nimport com.intellij.openapi.editor.event.EditorFactoryEvent;\nimport com.intellij.openapi.fileEditor.FileDocumentManager;\nimport com.intellij.openapi.util.JDOMUtil;\nimport com.intellij.openapi.util.SystemInfo;\nimport com.intellij.openapi.vfs.CharsetToolkit;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.util.io.HttpRequests;\nimport org.jdom.JDOMException;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.io.IOException;\nimport java.net.URLEncoder;\nimport java.net.UnknownHostException;\nimport java.util.concurrent.TimeUnit;\n\nimport static com.goide.util.GoUtil.getPlugin;\n\npublic class UpdateComponent implements ApplicationComponent, Disposable {\n  private static final Logger LOG = Logger.getInstance(UpdateComponent.class);\n  private static final String KEY = \"go.last.update.timestamp\";\n  private final EditorFactoryAdapter myListener = new EditorFactoryAdapter() {\n    @Override\n    public void editorCreated(@NotNull EditorFactoryEvent event) {\n      Document document = event.getEditor().getDocument();\n      VirtualFile file = FileDocumentManager.getInstance().getFile(document);\n      if (file != null && file.getFileType() == GoFileType.INSTANCE) {\n        checkForUpdates();\n      }\n    }\n  };\n\n  @Override\n  public void initComponent() {\n    if (!ApplicationManager.getApplication().isUnitTestMode()) {\n      EditorFactory.getInstance().addEditorFactoryListener(myListener, this);\n    }\n  }\n\n  private static void checkForUpdates() {\n    PropertiesComponent propertiesComponent = PropertiesComponent.getInstance();\n    long lastUpdate = propertiesComponent.getOrInitLong(KEY, 0);\n    if (lastUpdate == 0 || System.currentTimeMillis() - lastUpdate > TimeUnit.DAYS.toMillis(1)) {\n      ApplicationManager.getApplication().executeOnPooledThread(() -> {\n        try {\n          String buildNumber = ApplicationInfo.getInstance().getBuild().asString();\n          IdeaPluginDescriptor plugin = getPlugin();\n          String pluginVersion = plugin.getVersion();\n          String pluginId = plugin.getPluginId().getIdString();\n          String os = URLEncoder.encode(SystemInfo.OS_NAME + \" \" + SystemInfo.OS_VERSION, CharsetToolkit.UTF8);\n          String uid = PermanentInstallationID.get();\n          String url =\n            \"https://plugins.jetbrains.com/plugins/list\" +\n            \"?pluginId=\" + pluginId +\n            \"&build=\" + buildNumber +\n            \"&pluginVersion=\" + pluginVersion +\n            \"&os=\" + os +\n            \"&uuid=\" + uid;\n          PropertiesComponent.getInstance().setValue(KEY, String.valueOf(System.currentTimeMillis()));\n          HttpRequests.request(url).connect(\n            request -> {\n              try {\n                JDOMUtil.load(request.getReader());\n                LOG.info((request.isSuccessful() ? \"Successful\" : \"Unsuccessful\") + \" update: \" + url);\n              }\n              catch (JDOMException e) {\n                LOG.warn(e);\n              }\n              return null;\n            }\n          );\n        }\n        catch (UnknownHostException ignored) {\n        }\n        catch (IOException e) {\n          LOG.warn(e);\n        }\n      });\n    }\n  }\n\n  @Override\n  public void disposeComponent() {\n  }\n\n  @NotNull\n  @Override\n  public String getComponentName() {\n    return getClass().getName();\n  }\n\n  @Override\n  public void dispose() {\n    disposeComponent();\n  }\n}"
  },
  {
    "path": "src/com/goide/actions/file/GoCreateFileAction.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.actions.file;\n\nimport com.goide.GoIcons;\nimport com.goide.psi.GoFile;\nimport com.goide.psi.GoPackageClause;\nimport com.intellij.ide.actions.CreateFileFromTemplateAction;\nimport com.intellij.ide.actions.CreateFileFromTemplateDialog;\nimport com.intellij.openapi.editor.Editor;\nimport com.intellij.openapi.fileEditor.FileDocumentManager;\nimport com.intellij.openapi.fileEditor.FileEditorManager;\nimport com.intellij.openapi.project.DumbAware;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.psi.PsiDirectory;\nimport com.intellij.psi.PsiFile;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.Map;\n\npublic class GoCreateFileAction extends CreateFileFromTemplateAction implements DumbAware {\n  public static final String FILE_TEMPLATE = \"Go File\";\n  public static final String APPLICATION_TEMPLATE = \"Go Application\";\n\n  private static final String NEW_GO_FILE = \"New Go File\";\n  private static final String DEFAULT_GO_TEMPLATE_PROPERTY = \"DefaultGoTemplateProperty\";\n\n  public GoCreateFileAction() {\n    super(NEW_GO_FILE, \"\", GoIcons.ICON);\n  }\n\n  @Override\n  protected void buildDialog(Project project, PsiDirectory directory, @NotNull CreateFileFromTemplateDialog.Builder builder) {\n    builder.setTitle(NEW_GO_FILE)\n      .addKind(\"Empty file\", GoIcons.ICON, FILE_TEMPLATE)\n      .addKind(\"Simple Application\", GoIcons.ICON, APPLICATION_TEMPLATE);\n  }\n\n  @Nullable\n  @Override\n  protected String getDefaultTemplateProperty() {\n    return DEFAULT_GO_TEMPLATE_PROPERTY;\n  }\n\n  @NotNull\n  @Override\n  protected String getActionName(PsiDirectory directory, String newName, String templateName) {\n    return NEW_GO_FILE;\n  }\n\n\n  @Override\n  protected void postProcess(PsiFile createdElement, String templateName, Map<String, String> customProperties) {\n    if (createdElement instanceof GoFile) {\n      GoPackageClause packageClause = ((GoFile)createdElement).getPackage();\n      if (packageClause == null) {\n        return;\n      }\n      Project project = createdElement.getProject();\n      Editor editor = FileEditorManager.getInstance(project).getSelectedTextEditor();\n      if (editor == null) {\n        return;\n      }\n      VirtualFile virtualFile = createdElement.getContainingFile().getVirtualFile();\n      if (virtualFile == null) {\n        return;\n      }\n      if (FileDocumentManager.getInstance().getDocument(virtualFile) == editor.getDocument()) {\n        editor.getCaretModel().moveToOffset(packageClause.getTextRange().getEndOffset());\n      }\n    }\n  }\n\n  @Override\n  public int hashCode() {\n    return getClass().hashCode();\n  }\n\n  @Override\n  public boolean equals(Object obj) {\n    return obj instanceof GoCreateFileAction;\n  }\n}"
  },
  {
    "path": "src/com/goide/actions/file/GoCreateFromTemplateHandler.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.actions.file;\n\nimport com.goide.GoConstants;\nimport com.goide.GoFileType;\nimport com.intellij.ide.fileTemplates.DefaultCreateFromTemplateHandler;\nimport com.intellij.ide.fileTemplates.FileTemplate;\n\nimport java.util.Map;\n\npublic class GoCreateFromTemplateHandler extends DefaultCreateFromTemplateHandler {\n  @Override\n  public boolean handlesTemplate(FileTemplate template) {\n    return template.isTemplateOfType(GoFileType.INSTANCE);\n  }\n\n  @Override\n  public void prepareProperties(Map<String, Object> props) {\n    Object name = props.get(FileTemplate.ATTRIBUTE_NAME);\n    Object packageName = props.get(GoTemplatePropertiesProvider.GO_PACKAGE_NAME);\n    if (name instanceof String && packageName instanceof String) {\n      if (((String)name).endsWith(GoConstants.TEST_SUFFIX) || ((String)name).endsWith(GoConstants.TEST_SUFFIX_WITH_EXTENSION)) {\n        props.put(GoTemplatePropertiesProvider.GO_PACKAGE_NAME_WITH_TEST_SUFFIX, packageName + GoConstants.TEST_SUFFIX);\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/actions/file/GoTemplatePropertiesProvider.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.actions.file;\n\nimport com.goide.util.GoUtil;\nimport com.intellij.ide.fileTemplates.DefaultTemplatePropertiesProvider;\nimport com.intellij.ide.fileTemplates.FileTemplate;\nimport com.intellij.psi.PsiDirectory;\n\nimport java.util.Properties;\n\npublic class GoTemplatePropertiesProvider implements DefaultTemplatePropertiesProvider {\n  public static final String GO_PACKAGE_NAME = \"GO_\" + FileTemplate.ATTRIBUTE_PACKAGE_NAME;\n  public static final String GO_PACKAGE_NAME_WITH_TEST_SUFFIX = GO_PACKAGE_NAME + \"_WITH_TEST_SUFFIX\";\n\n  @Override\n  public void fillProperties(PsiDirectory directory, Properties props) {\n    String packageForDirectory = GoUtil.suggestPackageForDirectory(directory);\n    props.setProperty(GO_PACKAGE_NAME, packageForDirectory);\n    props.setProperty(GO_PACKAGE_NAME_WITH_TEST_SUFFIX, packageForDirectory);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/actions/tool/GoDownloadableFileAction.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.actions.tool;\n\nimport com.goide.GoConstants;\nimport com.goide.codeInsight.imports.GoGetPackageFix;\nimport com.goide.sdk.GoSdkUtil;\nimport com.intellij.execution.ExecutionException;\nimport com.intellij.notification.Notification;\nimport com.intellij.notification.NotificationListener;\nimport com.intellij.notification.NotificationType;\nimport com.intellij.notification.Notifications;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport javax.swing.event.HyperlinkEvent;\n\npublic abstract class GoDownloadableFileAction extends GoExternalToolsAction {\n  private static final String GO_GET_LINK = \"goGetLink\";\n  @NotNull private final String myGoGetImportPath;\n  @NotNull private final String myExecutableName;\n\n  public GoDownloadableFileAction(@NotNull String executableName, @NotNull String goGetImportPath) {\n    myExecutableName = executableName;\n    myGoGetImportPath = goGetImportPath;\n  }\n\n  @Override\n  protected boolean doSomething(@NotNull VirtualFile virtualFile, @Nullable Module module, @NotNull Project project, @NotNull String title)\n    throws ExecutionException {\n    VirtualFile executable = getExecutable(project, module);\n    if (executable == null) {\n      String message = \"Can't find `\" + myExecutableName + \"` in GOPATH. Try to invoke <a href=\\\"\" + GO_GET_LINK + \"\\\">go get \" +\n                       myExecutableName + \"</a>\";\n      NotificationListener listener = new MyNotificationListener(project, module);\n      Notifications.Bus.notify(GoConstants.GO_NOTIFICATION_GROUP.createNotification(title, message, NotificationType.WARNING, listener),\n                               project);\n      return false;\n    }\n    return super.doSomething(virtualFile, module, project, title);\n  }\n\n  @Nullable\n  protected VirtualFile getExecutable(@NotNull Project project, @Nullable Module module) {\n    return GoSdkUtil.findExecutableInGoPath(myExecutableName, project, module);\n  }\n\n  private class MyNotificationListener implements NotificationListener {\n    private final Project myProject;\n    private final Module myModule;\n\n    private MyNotificationListener(@NotNull Project project, @Nullable Module module) {\n      myProject = project;\n      myModule = module;\n    }\n\n    @Override\n    public void hyperlinkUpdate(@NotNull Notification notification, @NotNull HyperlinkEvent event) {\n      if (event.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {\n        String description = event.getDescription();\n        if (GO_GET_LINK.equals(description)) {\n          GoGetPackageFix.applyFix(myProject, myModule, myGoGetImportPath, false);\n          notification.expire();\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/actions/tool/GoExternalToolsAction.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.actions.tool;\n\nimport com.goide.GoConstants;\nimport com.goide.GoFileType;\nimport com.goide.sdk.GoSdkService;\nimport com.goide.util.GoExecutor;\nimport com.intellij.execution.ExecutionException;\nimport com.intellij.notification.NotificationType;\nimport com.intellij.notification.Notifications;\nimport com.intellij.openapi.actionSystem.AnActionEvent;\nimport com.intellij.openapi.actionSystem.CommonDataKeys;\nimport com.intellij.openapi.diagnostic.Logger;\nimport com.intellij.openapi.editor.Document;\nimport com.intellij.openapi.fileEditor.FileDocumentManager;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.module.ModuleUtilCore;\nimport com.intellij.openapi.project.DumbAwareAction;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.openapi.vfs.VfsUtil;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.util.Consumer;\nimport com.intellij.util.ExceptionUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic abstract class GoExternalToolsAction extends DumbAwareAction {\n  private static final Logger LOG = Logger.getInstance(GoExternalToolsAction.class);\n\n  private static void error(@NotNull String title, @NotNull Project project, @Nullable Exception ex) {\n    String message = ex == null ? \"\" : ExceptionUtil.getUserStackTrace(ex, LOG);\n    NotificationType type = NotificationType.ERROR;\n    Notifications.Bus.notify(GoConstants.GO_EXECUTION_NOTIFICATION_GROUP.createNotification(title, message, type, null), project);\n  }\n\n  @Override\n  public void update(@NotNull AnActionEvent e) {\n    super.update(e);\n    Project project = e.getProject();\n    VirtualFile file = e.getData(CommonDataKeys.VIRTUAL_FILE);\n    if (project == null || file == null || !file.isInLocalFileSystem() || !isAvailableOnFile(file)) {\n      e.getPresentation().setEnabled(false);\n      return;\n    }\n    Module module = ModuleUtilCore.findModuleForFile(file, project);\n    e.getPresentation().setEnabled(GoSdkService.getInstance(project).isGoModule(module));\n  }\n\n  protected boolean isAvailableOnFile(VirtualFile file) {\n    return file.getFileType() == GoFileType.INSTANCE;\n  }\n\n  @Override\n  public void actionPerformed(@NotNull AnActionEvent e) {\n    Project project = e.getProject();\n    VirtualFile file = e.getRequiredData(CommonDataKeys.VIRTUAL_FILE);\n    assert project != null;\n    String title = StringUtil.notNullize(e.getPresentation().getText());\n\n    Module module = ModuleUtilCore.findModuleForFile(file, project);\n    try {\n      doSomething(file, module, project, title);\n    }\n    catch (ExecutionException ex) {\n      error(title, project, ex);\n      LOG.error(ex);\n    }\n  }\n\n  protected boolean doSomething(@NotNull VirtualFile virtualFile,\n                                @Nullable Module module,\n                                @NotNull Project project,\n                                @NotNull String title) throws ExecutionException {\n    return doSomething(virtualFile, module, project, title, false);\n  }\n\n  private boolean doSomething(@NotNull VirtualFile virtualFile,\n                              @Nullable Module module,\n                              @NotNull Project project,\n                              @NotNull String title,\n                              boolean withProgress) {\n    //noinspection unchecked\n    return doSomething(virtualFile, module, project, title, withProgress, Consumer.EMPTY_CONSUMER);\n  }\n\n  protected boolean doSomething(@NotNull VirtualFile virtualFile,\n                                @Nullable Module module,\n                                @NotNull Project project,\n                                @NotNull String title,\n                                boolean withProgress,\n                                @NotNull Consumer<Boolean> consumer) {\n    Document document = FileDocumentManager.getInstance().getDocument(virtualFile);\n    if (document != null) {\n      FileDocumentManager.getInstance().saveDocument(document);\n    }\n    else {\n      FileDocumentManager.getInstance().saveAllDocuments();\n    }\n\n    createExecutor(project, module, title, virtualFile).executeWithProgress(withProgress, result -> {\n      consumer.consume(result);\n      VfsUtil.markDirtyAndRefresh(true, true, true, virtualFile);\n    });\n    return true;\n  }\n\n  protected GoExecutor createExecutor(@NotNull Project project,\n                                      @Nullable Module module,\n                                      @NotNull String title,\n                                      @NotNull VirtualFile virtualFile) {\n    String filePath = virtualFile.getCanonicalPath();\n    assert filePath != null;\n    return createExecutor(project, module, title, filePath);\n  }\n\n  @NotNull\n  protected abstract GoExecutor createExecutor(@NotNull Project project,\n                                               @Nullable Module module,\n                                               @NotNull String title,\n                                               @NotNull String filePath);\n}\n"
  },
  {
    "path": "src/com/goide/actions/tool/GoFmtCheckinFactory.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.actions.tool;\n\nimport com.goide.psi.GoFile;\nimport com.intellij.CommonBundle;\nimport com.intellij.ide.util.PropertiesComponent;\nimport com.intellij.openapi.fileEditor.FileDocumentManager;\nimport com.intellij.openapi.module.ModuleUtilCore;\nimport com.intellij.openapi.ui.Messages;\nimport com.intellij.openapi.util.Ref;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.openapi.vcs.CheckinProjectPanel;\nimport com.intellij.openapi.vcs.changes.CommitContext;\nimport com.intellij.openapi.vcs.changes.CommitExecutor;\nimport com.intellij.openapi.vcs.checkin.CheckinHandler;\nimport com.intellij.openapi.vcs.checkin.CheckinHandlerFactory;\nimport com.intellij.openapi.vcs.ui.RefreshableOnComponent;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.PsiManager;\nimport com.intellij.util.PairConsumer;\nimport com.intellij.util.containers.ContainerUtil;\nimport com.intellij.util.ui.UIUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport javax.swing.*;\nimport java.awt.*;\nimport java.util.Collection;\nimport java.util.List;\n\npublic class GoFmtCheckinFactory extends CheckinHandlerFactory {\n  private static final String GO_FMT = \"GO_FMT\";\n\n  @Override\n  @NotNull\n  public CheckinHandler createHandler(@NotNull CheckinProjectPanel panel, @NotNull CommitContext commitContext) {\n    return new CheckinHandler() {\n      @Override\n      public RefreshableOnComponent getBeforeCheckinConfigurationPanel() {\n        JCheckBox checkBox = new JCheckBox(\"Go fmt\");\n        return new RefreshableOnComponent() {\n          @Override\n          @NotNull\n          public JComponent getComponent() {\n            JPanel panel = new JPanel(new BorderLayout());\n            panel.add(checkBox, BorderLayout.WEST);\n            return panel;\n          }\n\n          @Override\n          public void refresh() {\n          }\n\n          @Override\n          public void saveState() {\n            PropertiesComponent.getInstance(panel.getProject()).setValue(GO_FMT, Boolean.toString(checkBox.isSelected()));\n          }\n\n          @Override\n          public void restoreState() {\n            checkBox.setSelected(enabled(panel));\n          }\n        };\n      }\n\n      @Override\n      public ReturnResult beforeCheckin(@Nullable CommitExecutor executor, PairConsumer<Object, Object> additionalDataConsumer) {\n        if (enabled(panel)) {\n          Ref<Boolean> success = Ref.create(true);\n          FileDocumentManager.getInstance().saveAllDocuments();\n          for (PsiFile file : getPsiFiles()) {\n            VirtualFile virtualFile = file.getVirtualFile();\n            new GoFmtFileAction().doSomething(virtualFile, ModuleUtilCore.findModuleForPsiElement(file), file.getProject(), \"Go fmt\", true,\n                                              result -> {\n                                                if (!result) success.set(false);\n                                              });\n          }\n          if (!success.get()) {\n            return showErrorMessage(executor);\n          }\n        }\n        return super.beforeCheckin();\n      }\n\n      @NotNull\n      private ReturnResult showErrorMessage(@Nullable CommitExecutor executor) {\n        String[] buttons = new String[]{\"&Details...\", commitButtonMessage(executor, panel), CommonBundle.getCancelButtonText()};\n        int answer = Messages.showDialog(panel.getProject(),\n                                         \"<html><body>GoFmt returned non-zero code on some of the files.<br/>\" +\n                                         \"Would you like to commit anyway?</body></html>\\n\",\n                                         \"Go Fmt\", null, buttons, 0, 1, UIUtil.getWarningIcon());\n        if (answer == Messages.OK) {\n          return ReturnResult.CLOSE_WINDOW;\n        }\n        if (answer == Messages.NO) {\n          return ReturnResult.COMMIT;\n        }\n        return ReturnResult.CANCEL;\n      }\n\n      @NotNull\n      private List<PsiFile> getPsiFiles() {\n        Collection<VirtualFile> files = panel.getVirtualFiles();\n        List<PsiFile> psiFiles = ContainerUtil.newArrayList();\n        PsiManager manager = PsiManager.getInstance(panel.getProject());\n        for (VirtualFile file : files) {\n          PsiFile psiFile = manager.findFile(file);\n          if (psiFile instanceof GoFile) {\n            psiFiles.add(psiFile);\n          }\n        }\n        return psiFiles;\n      }\n    };\n  }\n\n  @NotNull\n  private static String commitButtonMessage(@Nullable CommitExecutor executor, @NotNull CheckinProjectPanel panel) {\n    return StringUtil.trimEnd(executor != null ? executor.getActionText() : panel.getCommitActionName(), \"...\");\n  }\n\n  private static boolean enabled(@NotNull CheckinProjectPanel panel) {\n    return PropertiesComponent.getInstance(panel.getProject()).getBoolean(GO_FMT, false);\n  }\n}"
  },
  {
    "path": "src/com/goide/actions/tool/GoFmtFileAction.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.actions.tool;\n\nimport com.goide.util.GoExecutor;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.project.Project;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoFmtFileAction extends GoExternalToolsAction {\n  @Override\n  @NotNull\n  protected GoExecutor createExecutor(@NotNull Project project, @Nullable Module module, @NotNull String title, @NotNull String filePath) {\n    return GoExecutor.in(project, module).withPresentableName(title).withParameters(\"fmt\", filePath).showOutputOnError();\n  }\n}\n"
  },
  {
    "path": "src/com/goide/actions/tool/GoFmtProjectAction.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.actions.tool;\n\nimport com.goide.sdk.GoSdkService;\nimport com.goide.sdk.GoSdkUtil;\nimport com.goide.util.GoExecutor;\nimport com.intellij.openapi.actionSystem.AnActionEvent;\nimport com.intellij.openapi.fileEditor.FileDocumentManager;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.project.DumbAwareAction;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.roots.ModuleRootManager;\nimport com.intellij.openapi.vfs.VfsUtil;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoFmtProjectAction extends DumbAwareAction {\n  @Override\n  public void update(@NotNull AnActionEvent e) {\n    Project project = e.getProject();\n    e.getPresentation().setEnabled(project != null && GoSdkService.getInstance(project).getSdkHomePath(null) != null);\n  }\n\n  @Override\n  public void actionPerformed(@NotNull AnActionEvent e) {\n    Project project = e.getProject();\n    assert project != null;\n\n    FileDocumentManager.getInstance().saveAllDocuments();\n    for (Module module : GoSdkUtil.getGoModules(project)) {\n      for (VirtualFile file : ModuleRootManager.getInstance(module).getContentRoots()) {\n        fmt(project, module, \"go fmt \" + file.getPath(), file);\n      }\n    }\n  }\n\n  private static void fmt(@NotNull Project project, @Nullable Module module, @NotNull String presentation, @NotNull VirtualFile dir) {\n    GoExecutor.in(project, module).withPresentableName(presentation).withWorkDirectory(dir.getPath())\n      .withParameters(\"fmt\", \"./...\").showOutputOnError().executeWithProgress(false,\n                                                                              result -> VfsUtil.markDirtyAndRefresh(true, true, true, dir));\n  }\n}\n"
  },
  {
    "path": "src/com/goide/actions/tool/GoImportsFileAction.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.actions.tool;\n\nimport com.goide.util.GoExecutor;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoImportsFileAction extends GoDownloadableFileAction {\n  public GoImportsFileAction() {\n    super(\"goimports\", \"golang.org/x/tools/cmd/goimports\");\n  }\n\n  @NotNull\n  @Override\n  protected GoExecutor createExecutor(@NotNull Project project, @Nullable Module module, @NotNull String title, @NotNull String filePath) {\n    VirtualFile executable = getExecutable(project, module);\n    assert executable != null;\n    return GoExecutor.in(project, module).withExePath(executable.getPath()).withParameters(\"-w\", filePath).showOutputOnError();\n  }\n}\n"
  },
  {
    "path": "src/com/goide/actions/tool/GoTypeFileAction.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.actions.tool;\n\nimport com.goide.util.GoExecutor;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoTypeFileAction extends GoDownloadableFileAction {\n  public GoTypeFileAction() {\n    super(\"gotype\", \"golang.org/x/tools/cmd/gotype\");\n  }\n\n  @Override\n  protected boolean isAvailableOnFile(VirtualFile file) {\n    return super.isAvailableOnFile(file) || file.isDirectory();\n  }\n\n  @NotNull\n  @Override\n  protected GoExecutor createExecutor(@NotNull Project project, @Nullable Module module, @NotNull String title, @NotNull VirtualFile file) {\n    return super.createExecutor(project, module, title, file.isDirectory() ? file : file.getParent());\n  }\n\n  @NotNull\n  @Override\n  protected GoExecutor createExecutor(@NotNull Project project, @Nullable Module module, @NotNull String title, @NotNull String filePath) {\n    VirtualFile executable = getExecutable(project, module);\n    assert executable != null;\n\n    return GoExecutor.in(project, module).withExePath(executable.getPath()).withParameters(\"-e\", \"-a\", \"-v\", filePath )\n      .showNotifications(false, true).showOutputOnError();\n  }\n}\n"
  },
  {
    "path": "src/com/goide/actions/tool/GoVetFileAction.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.actions.tool;\n\nimport com.goide.util.GoExecutor;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoVetFileAction extends GoExternalToolsAction {\n  @Override\n  protected boolean isAvailableOnFile(VirtualFile file) {\n    return super.isAvailableOnFile(file) || file.isDirectory();\n  }\n\n  @Override\n  @NotNull\n  protected GoExecutor createExecutor(@NotNull Project project, @Nullable Module module, @NotNull String title, @NotNull String filePath) {\n    return GoExecutor.in(project, module).withPresentableName(title).withParameters(\"tool\", \"vet\", filePath)\n      .showNotifications(false, true).showOutputOnError();\n  }\n}\n"
  },
  {
    "path": "src/com/goide/appengine/GoAppEngineExtension.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.appengine;\n\nimport com.goide.sdk.GoSdkService;\nimport com.intellij.appengine.AppEngineExtension;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.module.ModuleUtilCore;\nimport com.intellij.psi.PsiElement;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoAppEngineExtension extends AppEngineExtension {\n  @Override\n  public boolean isAppEngineEnabled(@Nullable PsiElement context) {\n    if (context != null) {\n      // it's important to ask module on file, otherwise module won't be found for elements in libraries files [zolotov]\n      Module module = ModuleUtilCore.findModuleForPsiElement(context.getContainingFile());\n      if (GoSdkService.getInstance(context.getProject()).isAppEngineSdk(module)) {\n        return true;\n      }\n    }\n    return false;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/appengine/GoAppEngineIcons.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.appengine;\n\nimport com.goide.GoIcons;\nimport com.intellij.appengine.GoogleAppEngineIcons;\nimport com.intellij.ui.LayeredIcon;\n\nimport javax.swing.*;\n\npublic interface GoAppEngineIcons {\n  Icon ICON = new LayeredIcon(GoIcons.ICON, GoogleAppEngineIcons.AppEngineMark);\n}\n"
  },
  {
    "path": "src/com/goide/appengine/GoAppEngineLibraryPresentationProvider.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.appengine;\n\nimport com.goide.sdk.GoSdkService;\nimport com.goide.sdk.GoSmallIDEsSdkService;\nimport com.intellij.openapi.roots.libraries.DummyLibraryProperties;\nimport com.intellij.openapi.roots.libraries.LibraryKind;\nimport com.intellij.openapi.roots.libraries.LibraryPresentationProvider;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport javax.swing.*;\nimport java.util.List;\n\npublic class GoAppEngineLibraryPresentationProvider extends LibraryPresentationProvider<DummyLibraryProperties> {\n  private static final LibraryKind KIND = LibraryKind.create(\"go_gae\");\n\n  public GoAppEngineLibraryPresentationProvider() {\n    super(KIND);\n  }\n\n  @Nullable\n  @Override\n  public Icon getIcon() {\n    return GoAppEngineIcons.ICON;\n  }\n\n  @Nullable\n  @Override\n  public DummyLibraryProperties detect(@NotNull List<VirtualFile> classesRoots) {\n    for (VirtualFile root : classesRoots) {\n      if (GoSmallIDEsSdkService.isGoSdkLibRoot(root) && GoSdkService.isAppEngineSdkPath(GoSdkService.libraryRootToSdkPath(root))) {\n        return DummyLibraryProperties.INSTANCE;\n      }\n    }\n    return null;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/appengine/YamlFilesModificationTracker.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.appengine;\n\nimport com.goide.util.GoUtil;\nimport com.intellij.openapi.application.ApplicationManager;\nimport com.intellij.openapi.components.ServiceManager;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.Computable;\nimport com.intellij.openapi.util.SimpleModificationTracker;\nimport com.intellij.openapi.util.UserDataHolder;\nimport com.intellij.openapi.vfs.*;\nimport com.intellij.psi.search.FilenameIndex;\nimport com.intellij.psi.util.CachedValueProvider;\nimport com.intellij.psi.util.CachedValuesManager;\nimport com.intellij.util.ObjectUtils;\nimport com.intellij.util.PathUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.Collection;\n\npublic class YamlFilesModificationTracker extends SimpleModificationTracker {\n  public YamlFilesModificationTracker(@NotNull Project project) {\n    VirtualFileManager.getInstance().addVirtualFileListener(new VirtualFileAdapter() {\n      @Override\n      public void fileCreated(@NotNull VirtualFileEvent event) {\n        handleEvent(event);\n      }\n\n      @Override\n      public void fileDeleted(@NotNull VirtualFileEvent event) {\n        handleEvent(event);\n      }\n\n      @Override\n      public void fileMoved(@NotNull VirtualFileMoveEvent event) {\n        handleEvent(event);\n      }\n\n      @Override\n      public void fileCopied(@NotNull VirtualFileCopyEvent event) {\n        handleEvent(event);\n      }\n\n      private void handleEvent(@NotNull VirtualFileEvent event) {\n        if (\"yaml\".equals(PathUtil.getFileExtension(event.getFileName()))) {\n          incModificationCount();\n        }\n      }\n    }, project);\n  }\n\n  public static YamlFilesModificationTracker getInstance(@NotNull Project project) {\n    return ServiceManager.getService(project, YamlFilesModificationTracker.class);\n  }\n\n  @NotNull\n  public static Collection<VirtualFile> getYamlFiles(@NotNull Project project, @Nullable Module module) {\n    UserDataHolder dataHolder = ObjectUtils.notNull(module, project);\n    return CachedValuesManager.getManager(project).getCachedValue(dataHolder, () -> {\n      Collection<VirtualFile> yamlFiles = ApplicationManager.getApplication().runReadAction(new Computable<Collection<VirtualFile>>() {\n        @Override\n        public Collection<VirtualFile> compute() {\n          return FilenameIndex.getAllFilesByExt(project, \"yaml\", GoUtil.moduleScopeWithoutLibraries(project, module));\n        }\n      });\n      return CachedValueProvider.Result.create(yamlFiles, getInstance(project));\n    });\n  }\n}\n"
  },
  {
    "path": "src/com/goide/appengine/run/GoAppEngineRunConfiguration.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.appengine.run;\n\nimport com.goide.runconfig.GoModuleBasedConfiguration;\nimport com.goide.runconfig.GoRunConfigurationBase;\nimport com.goide.sdk.GoSdkService;\nimport com.intellij.execution.configurations.*;\nimport com.intellij.execution.runners.ExecutionEnvironment;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.options.SettingsEditor;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.InvalidDataException;\nimport com.intellij.openapi.util.JDOMExternalizerUtil;\nimport com.intellij.openapi.util.WriteExternalException;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.util.PathUtil;\nimport org.jdom.Element;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoAppEngineRunConfiguration extends GoRunConfigurationBase<GoAppEngineRunningState> {\n  private static final String HOST_NAME = \"HOST\";\n  private static final String PORT_NAME = \"PORT\";\n  private static final String ADMIN_PORT_NAME = \"ADMIN_PORT\";\n  private static final String CONFIG_FILE = \"CONFIG\";\n\n  @Nullable private String myHost;\n  @Nullable private String myPort;\n  @Nullable private String myAdminPort;\n  @Nullable private String myConfigFile;\n\n  public GoAppEngineRunConfiguration(@NotNull Project project, String name, @NotNull ConfigurationType configurationType) {\n    super(name, new GoModuleBasedConfiguration(project), configurationType.getConfigurationFactories()[0]);\n  }\n\n  @Nullable\n  public String getHost() {\n    return myHost;\n  }\n\n  public void setHost(@Nullable String host) {\n    myHost = host;\n  }\n\n  @Nullable\n  public String getPort() {\n    return myPort;\n  }\n\n  public void setPort(@Nullable String port) {\n    myPort = port;\n  }\n  \n  @Nullable\n  public String getAdminPort() {\n    return myAdminPort;\n  }\n\n  public void setAdminPort(@Nullable String adminPort) {\n    myAdminPort = adminPort;\n  }\n  \n  @Nullable\n  public String getConfigFile() {\n    return myConfigFile;\n  }\n\n  public void setConfigFile(@Nullable String configFile) {\n    myConfigFile = configFile;\n  }\n\n  @Override\n  public void readExternal(@NotNull Element element) throws InvalidDataException {\n    super.readExternal(element);\n    myHost = JDOMExternalizerUtil.getFirstChildValueAttribute(element, HOST_NAME);\n    myPort = JDOMExternalizerUtil.getFirstChildValueAttribute(element, PORT_NAME);\n    myAdminPort = JDOMExternalizerUtil.getFirstChildValueAttribute(element, ADMIN_PORT_NAME);\n    myConfigFile = JDOMExternalizerUtil.getFirstChildValueAttribute(element, CONFIG_FILE);\n  }\n\n  @Override\n  public void writeExternal(Element element) throws WriteExternalException {\n    super.writeExternal(element);\n    addNonEmptyElement(element, HOST_NAME, myHost);\n    addNonEmptyElement(element, PORT_NAME, myPort);\n    addNonEmptyElement(element, ADMIN_PORT_NAME, myAdminPort);\n    addNonEmptyElement(element, CONFIG_FILE, myConfigFile);\n  }\n\n  @Override\n  public void checkConfiguration() throws RuntimeConfigurationException {\n    super.checkConfiguration();\n\n    Module module = getConfigurationModule().getModule();\n    if (module != null) {\n      if (!GoSdkService.getInstance(module.getProject()).isAppEngineSdk(module)) {\n        throw new RuntimeConfigurationWarning(\"Go SDK is not specified for module '\" + module.getName() + \"'\");\n      }\n    }\n\n    checkPortValue(myPort, \"Invalid port\");\n    checkPortValue(myAdminPort, \"Invalid admin port\");\n    if (myConfigFile != null && !\"yaml\".equals(PathUtil.getFileExtension(myConfigFile))) {\n      throw new RuntimeConfigurationException(\"Config file is not YAML\");\n    }\n  }\n\n  private static void checkPortValue(@Nullable String port, @NotNull String errorMessage) throws RuntimeConfigurationError {\n    if (StringUtil.isNotEmpty(port)) {\n      int intPort = StringUtil.parseInt(port, -1);\n      if (intPort < 0 || intPort > Short.MAX_VALUE * 2) {\n        throw new RuntimeConfigurationError(errorMessage);\n      }\n    }\n  }\n\n  @NotNull\n  @Override\n  public SettingsEditor<? extends RunConfiguration> getConfigurationEditor() {\n    return new GoAppEngineRunConfigurationEditor(getProject());\n  }\n\n  @NotNull\n  @Override\n  protected GoAppEngineRunningState newRunningState(@NotNull ExecutionEnvironment env, @NotNull Module module) {\n    return new GoAppEngineRunningState(env, module, this);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/appengine/run/GoAppEngineRunConfigurationEditor.form",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<form xmlns=\"http://www.intellij.com/uidesigner/form/\" version=\"1\" bind-to-class=\"com.goide.appengine.run.GoAppEngineRunConfigurationEditor\">\n  <grid id=\"27dc6\" binding=\"myComponent\" layout-manager=\"GridLayoutManager\" row-count=\"3\" column-count=\"1\" same-size-horizontally=\"false\" same-size-vertically=\"false\" hgap=\"-1\" vgap=\"-1\">\n    <margin top=\"0\" left=\"0\" bottom=\"0\" right=\"0\"/>\n    <constraints>\n      <xy x=\"20\" y=\"20\" width=\"657\" height=\"278\"/>\n    </constraints>\n    <properties/>\n    <border type=\"none\"/>\n    <children>\n      <grid id=\"487df\" layout-manager=\"GridLayoutManager\" row-count=\"2\" column-count=\"6\" same-size-horizontally=\"false\" same-size-vertically=\"false\" hgap=\"-1\" vgap=\"-1\">\n        <margin top=\"0\" left=\"0\" bottom=\"0\" right=\"0\"/>\n        <constraints>\n          <grid row=\"0\" column=\"0\" row-span=\"1\" col-span=\"1\" vsize-policy=\"3\" hsize-policy=\"3\" anchor=\"0\" fill=\"3\" indent=\"0\" use-parent-layout=\"true\"/>\n        </constraints>\n        <properties/>\n        <border type=\"none\"/>\n        <children>\n          <component id=\"be44b\" class=\"javax.swing.JLabel\">\n            <constraints>\n              <grid row=\"0\" column=\"0\" row-span=\"1\" col-span=\"1\" vsize-policy=\"0\" hsize-policy=\"0\" anchor=\"8\" fill=\"0\" indent=\"0\" use-parent-layout=\"false\"/>\n            </constraints>\n            <properties>\n              <labelFor value=\"f19ee\"/>\n              <text value=\"&amp;Host:\"/>\n            </properties>\n          </component>\n          <component id=\"f19ee\" class=\"com.intellij.ui.components.JBTextField\" binding=\"myHostField\">\n            <constraints>\n              <grid row=\"0\" column=\"1\" row-span=\"1\" col-span=\"1\" vsize-policy=\"3\" hsize-policy=\"3\" anchor=\"0\" fill=\"1\" indent=\"0\" use-parent-layout=\"false\"/>\n            </constraints>\n            <properties/>\n          </component>\n          <component id=\"b5f27\" class=\"javax.swing.JLabel\">\n            <constraints>\n              <grid row=\"0\" column=\"2\" row-span=\"1\" col-span=\"1\" vsize-policy=\"0\" hsize-policy=\"0\" anchor=\"4\" fill=\"0\" indent=\"0\" use-parent-layout=\"false\"/>\n            </constraints>\n            <properties>\n              <labelFor value=\"5f40f\"/>\n              <text value=\"&amp;Port:\"/>\n            </properties>\n          </component>\n          <component id=\"5f40f\" class=\"com.intellij.ui.components.JBTextField\" binding=\"myPortField\">\n            <constraints>\n              <grid row=\"0\" column=\"3\" row-span=\"1\" col-span=\"1\" vsize-policy=\"0\" hsize-policy=\"0\" anchor=\"4\" fill=\"0\" indent=\"0\" use-parent-layout=\"false\">\n                <preferred-size width=\"75\" height=\"-1\"/>\n              </grid>\n            </constraints>\n            <properties/>\n          </component>\n          <component id=\"af102\" class=\"javax.swing.JLabel\">\n            <constraints>\n              <grid row=\"0\" column=\"4\" row-span=\"1\" col-span=\"1\" vsize-policy=\"0\" hsize-policy=\"0\" anchor=\"4\" fill=\"0\" indent=\"0\" use-parent-layout=\"false\"/>\n            </constraints>\n            <properties>\n              <labelFor value=\"e12c4\"/>\n              <text value=\"A&amp;dmin port:\"/>\n            </properties>\n          </component>\n          <component id=\"e12c4\" class=\"com.intellij.ui.components.JBTextField\" binding=\"myAdminPortField\">\n            <constraints>\n              <grid row=\"0\" column=\"5\" row-span=\"1\" col-span=\"1\" vsize-policy=\"0\" hsize-policy=\"0\" anchor=\"4\" fill=\"0\" indent=\"0\" use-parent-layout=\"false\">\n                <preferred-size width=\"75\" height=\"-1\"/>\n              </grid>\n            </constraints>\n            <properties/>\n          </component>\n          <component id=\"935c8\" class=\"javax.swing.JLabel\">\n            <constraints>\n              <grid row=\"1\" column=\"0\" row-span=\"1\" col-span=\"1\" vsize-policy=\"0\" hsize-policy=\"0\" anchor=\"8\" fill=\"0\" indent=\"0\" use-parent-layout=\"false\"/>\n            </constraints>\n            <properties>\n              <labelFor value=\"ecfdf\"/>\n              <text value=\"&amp;Config file:\"/>\n            </properties>\n          </component>\n          <component id=\"ecfdf\" class=\"com.intellij.ui.TextFieldWithHistoryWithBrowseButton\" binding=\"myConfigFileField\">\n            <constraints>\n              <grid row=\"1\" column=\"1\" row-span=\"1\" col-span=\"5\" vsize-policy=\"3\" hsize-policy=\"3\" anchor=\"0\" fill=\"1\" indent=\"0\" use-parent-layout=\"false\"/>\n            </constraints>\n            <properties/>\n          </component>\n        </children>\n      </grid>\n      <vspacer id=\"632bf\">\n        <constraints>\n          <grid row=\"2\" column=\"0\" row-span=\"1\" col-span=\"1\" vsize-policy=\"6\" hsize-policy=\"1\" anchor=\"0\" fill=\"2\" indent=\"0\" use-parent-layout=\"false\"/>\n        </constraints>\n      </vspacer>\n      <nested-form id=\"b9fff\" form-file=\"com/goide/runconfig/ui/GoCommonSettingsPanel.form\" binding=\"myCommonSettingsPanel\">\n        <constraints>\n          <grid row=\"1\" column=\"0\" row-span=\"1\" col-span=\"1\" vsize-policy=\"3\" hsize-policy=\"3\" anchor=\"1\" fill=\"1\" indent=\"0\" use-parent-layout=\"false\"/>\n        </constraints>\n      </nested-form>\n    </children>\n  </grid>\n</form>\n"
  },
  {
    "path": "src/com/goide/appengine/run/GoAppEngineRunConfigurationEditor.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.appengine.run;\n\nimport com.goide.appengine.YamlFilesModificationTracker;\nimport com.goide.runconfig.GoRunUtil;\nimport com.goide.runconfig.ui.GoCommonSettingsPanel;\nimport com.intellij.openapi.options.ConfigurationException;\nimport com.intellij.openapi.options.SettingsEditor;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.ui.TextFieldWithHistoryWithBrowseButton;\nimport com.intellij.ui.components.JBTextField;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\n\nimport javax.swing.*;\n\npublic class GoAppEngineRunConfigurationEditor extends SettingsEditor<GoAppEngineRunConfiguration> {\n  private JPanel myComponent;\n  private JBTextField myHostField;\n  private JBTextField myPortField;\n  private GoCommonSettingsPanel myCommonSettingsPanel;\n  private JBTextField myAdminPortField;\n  private TextFieldWithHistoryWithBrowseButton myConfigFileField;\n\n  public GoAppEngineRunConfigurationEditor(@NotNull Project project) {\n    super(null);\n    initConfigFileField(project);\n    myCommonSettingsPanel.init(project);\n  }\n\n  @Override\n  protected void resetEditorFrom(@NotNull GoAppEngineRunConfiguration configuration) {\n    myHostField.setText(StringUtil.notNullize(configuration.getHost()));\n    myPortField.setText(StringUtil.notNullize(configuration.getPort()));\n    myAdminPortField.setText(StringUtil.notNullize(configuration.getAdminPort()));\n    myConfigFileField.getChildComponent().setText(StringUtil.notNullize(configuration.getConfigFile()));\n    myCommonSettingsPanel.resetEditorFrom(configuration);\n  }\n\n  @Override\n  protected void applyEditorTo(@NotNull GoAppEngineRunConfiguration configuration) throws ConfigurationException {\n    configuration.setHost(StringUtil.nullize(myHostField.getText().trim()));\n    configuration.setPort(StringUtil.nullize(myPortField.getText().trim()));\n    configuration.setAdminPort(StringUtil.nullize(myAdminPortField.getText().trim()));\n    configuration.setConfigFile(StringUtil.nullize(myConfigFileField.getText().trim()));\n    myCommonSettingsPanel.applyEditorTo(configuration);\n  }\n\n  @NotNull\n  @Override\n  protected JComponent createEditor() {\n    return myComponent;\n  }\n\n  @Override\n  protected void disposeEditor() {\n    myComponent.setVisible(false);\n  }\n\n  private void initConfigFileField(@NotNull Project project) {\n    GoRunUtil.installFileChooser(project, myConfigFileField, false, false, file -> \"yaml\".equals(file.getExtension()));\n    myConfigFileField.getChildComponent().setHistory(ContainerUtil.map2List(\n      YamlFilesModificationTracker.getYamlFiles(project, null), VirtualFile::getPath));\n  }\n}\n"
  },
  {
    "path": "src/com/goide/appengine/run/GoAppEngineRunConfigurationType.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.appengine.run;\n\nimport com.goide.appengine.GoAppEngineIcons;\nimport com.goide.runconfig.GoConfigurationFactoryBase;\nimport com.intellij.execution.configurations.ConfigurationTypeBase;\nimport com.intellij.execution.configurations.RunConfiguration;\nimport com.intellij.openapi.extensions.Extensions;\nimport com.intellij.openapi.project.Project;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoAppEngineRunConfigurationType extends ConfigurationTypeBase {\n\n  public GoAppEngineRunConfigurationType() {\n    super(\"GoAppEngineRunConfiguration\", \"Go App Engine\", \"Go app engine web server runner\", GoAppEngineIcons.ICON);\n    addFactory(new GoConfigurationFactoryBase(this) {\n      @Override\n      @NotNull\n      public RunConfiguration createTemplateConfiguration(@NotNull Project project) {\n        return new GoAppEngineRunConfiguration(project, \"Go App Engine\", getInstance());\n      }\n    });\n  }\n\n  @NotNull\n  public static GoAppEngineRunConfigurationType getInstance() {\n    return Extensions.findExtension(CONFIGURATION_TYPE_EP, GoAppEngineRunConfigurationType.class);\n  }\n}"
  },
  {
    "path": "src/com/goide/appengine/run/GoAppEngineRunningState.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.appengine.run;\n\nimport com.goide.runconfig.GoRunningState;\nimport com.goide.util.GoExecutor;\nimport com.intellij.execution.ExecutionException;\nimport com.intellij.execution.runners.ExecutionEnvironment;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.util.text.StringUtil;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoAppEngineRunningState extends GoRunningState<GoAppEngineRunConfiguration> {\n  public GoAppEngineRunningState(@NotNull ExecutionEnvironment env,\n                                 @NotNull Module module,\n                                 @NotNull GoAppEngineRunConfiguration configuration) {\n    super(env, module, configuration);\n  }\n\n  @Override\n  protected GoExecutor patchExecutor(@NotNull GoExecutor executor) throws ExecutionException {\n    executor.withParameters(\"serve\");\n    executor.withParameterString(myConfiguration.getGoToolParams());\n    String host = myConfiguration.getHost();\n    String port = myConfiguration.getPort();\n    String adminPort = myConfiguration.getAdminPort();\n    if (StringUtil.isNotEmpty(host)) {\n      executor.withParameters(\"-host\", host);\n    }\n    if (StringUtil.isNotEmpty(port)) {\n      executor.withParameters(\"-port\", port);\n    }\n    if (StringUtil.isNotEmpty(adminPort)) {\n      executor.withParameters(\"-admin_port\", adminPort);\n    }\n    executor.withParameters(StringUtil.notNullize(myConfiguration.getConfigFile(), \".\"));\n    return executor;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/codeInsight/GoExpressionTypeProvider.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.codeInsight;\n\nimport com.goide.psi.GoTopLevelDeclaration;\nimport com.goide.psi.GoType;\nimport com.goide.psi.GoTypeOwner;\nimport com.intellij.lang.ExpressionTypeProvider;\nimport com.intellij.openapi.util.Conditions;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiWhiteSpace;\nimport com.intellij.psi.SyntaxTraverser;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.List;\n\npublic class GoExpressionTypeProvider extends ExpressionTypeProvider<GoTypeOwner> {\n  @NotNull\n  @Override\n  public String getInformationHint(@NotNull GoTypeOwner element) {\n    GoType type = element.getGoType(null);\n    return StringUtil.escapeXml(StringUtil.notNullize(type != null ? type.getText() : null, \"<unknown>\"));\n  }\n\n  @NotNull\n  @Override\n  public String getErrorHint() {\n    return \"Selection doesn't contain a Go expression\";\n  }\n\n  @NotNull\n  @Override\n  public List<GoTypeOwner> getExpressionsAt(@NotNull PsiElement at) {\n    if (at instanceof PsiWhiteSpace && at.textMatches(\"\\n\")) {\n      at = PsiTreeUtil.prevLeaf(at);\n    }\n    return SyntaxTraverser.psiApi().parents(at).takeWhile(Conditions.notInstanceOf(GoTopLevelDeclaration.class))\n      .filter(GoTypeOwner.class).toList();\n  }\n}"
  },
  {
    "path": "src/com/goide/codeInsight/imports/GoAutoImportConfigurable.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.codeInsight.imports;\n\nimport com.goide.project.GoExcludedPathsSettings;\nimport com.intellij.openapi.application.ApplicationBundle;\nimport com.intellij.openapi.options.ConfigurationException;\nimport com.intellij.openapi.options.SearchableConfigurable;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.ui.Messages;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.ui.*;\nimport com.intellij.ui.components.JBList;\nimport com.intellij.util.ui.FormBuilder;\nimport com.intellij.util.ui.UIUtil;\nimport org.jetbrains.annotations.Nls;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport javax.swing.*;\nimport java.awt.*;\nimport java.util.Arrays;\n\npublic class GoAutoImportConfigurable implements SearchableConfigurable {\n  private JCheckBox myCbShowImportPopup;\n  private JCheckBox myCbAddUnambiguousImports;\n  private JBList myExcludePackagesList;\n  private DefaultListModel myExcludePackagesModel;\n\n  @NotNull private final GoCodeInsightSettings myCodeInsightSettings;\n  @NotNull private final GoExcludedPathsSettings myExcludedSettings;\n  private final boolean myIsDefaultProject;\n  private final boolean myIsDialog;\n\n  public GoAutoImportConfigurable(@NotNull Project project, boolean dialogMode) {\n    myCodeInsightSettings = GoCodeInsightSettings.getInstance();\n    myExcludedSettings = GoExcludedPathsSettings.getInstance(project);\n    myIsDefaultProject = project.isDefault();\n    myIsDialog = dialogMode;\n  }\n\n  @Nullable\n  @Override\n  public JComponent createComponent() {\n    FormBuilder builder = FormBuilder.createFormBuilder();\n    myCbShowImportPopup = new JCheckBox(ApplicationBundle.message(\"checkbox.show.import.popup\"));\n    myCbAddUnambiguousImports = new JCheckBox(ApplicationBundle.message(\"checkbox.add.unambiguous.imports.on.the.fly\"));\n    builder.addComponent(myCbShowImportPopup);\n    builder.addComponent(myCbAddUnambiguousImports);\n\n    myExcludePackagesList = new JBList();\n    JComponent excludedPanel = new JPanel(new BorderLayout());\n    excludedPanel.add(ToolbarDecorator.createDecorator(myExcludePackagesList)\n                        .setAddAction(new AddImportExclusionAction()).disableUpDownActions().createPanel(), BorderLayout.CENTER);\n    excludedPanel.setBorder(IdeBorderFactory.createTitledBorder(ApplicationBundle.message(\"exclude.from.completion.group\"), true));\n    if (!myIsDefaultProject) {\n      builder.addComponent(excludedPanel);\n    }\n\n    JPanel result = new JPanel(new BorderLayout());\n    result.add(builder.getPanel(), BorderLayout.NORTH);\n    if (myIsDialog) result.setPreferredSize(new Dimension(300, -1));\n    return result;\n  }\n\n  public void focusList() {\n    myExcludePackagesList.setSelectedIndex(0);\n    myExcludePackagesList.requestFocus();\n  }\n\n  private String[] getExcludedPackages() {\n    String[] excludedPackages = new String[myExcludePackagesModel.size()];\n    for (int i = 0; i < myExcludePackagesModel.size(); i++) {\n      excludedPackages[i] = (String)myExcludePackagesModel.elementAt(i);\n    }\n    Arrays.sort(excludedPackages);\n    return excludedPackages;\n  }\n\n  @Override\n  public boolean isModified() {\n    return myCodeInsightSettings.isShowImportPopup() != myCbShowImportPopup.isSelected() ||\n           myCodeInsightSettings.isAddUnambiguousImportsOnTheFly() != myCbAddUnambiguousImports.isSelected() ||\n           !Arrays.equals(getExcludedPackages(), myExcludedSettings.getExcludedPackages());\n  }\n\n  @Override\n  public void apply() throws ConfigurationException {\n    myCodeInsightSettings.setShowImportPopup(myCbShowImportPopup.isSelected());\n    myCodeInsightSettings.setAddUnambiguousImportsOnTheFly(myCbAddUnambiguousImports.isSelected());\n    myExcludedSettings.setExcludedPackages(getExcludedPackages());\n  }\n\n  @Override\n  public void reset() {\n    myCbShowImportPopup.setSelected(myCodeInsightSettings.isShowImportPopup());\n    myCbAddUnambiguousImports.setSelected(myCodeInsightSettings.isAddUnambiguousImportsOnTheFly());\n\n    myExcludePackagesModel = new DefaultListModel();\n    for (String name : myExcludedSettings.getExcludedPackages()) {\n      myExcludePackagesModel.add(myExcludePackagesModel.size(), name);\n    }\n    myExcludePackagesList.setModel(myExcludePackagesModel);\n  }\n\n  @NotNull\n  @Override\n  public String getId() {\n    return \"go.autoimport\";\n  }\n\n  @Nullable\n  @Override\n  public Runnable enableSearch(String option) {\n    return null;\n  }\n\n  @Nls\n  @Override\n  public String getDisplayName() {\n    return \"Auto Import\";\n  }\n\n  @Nullable\n  @Override\n  public String getHelpTopic() {\n    return null;\n  }\n\n  @Override\n  public void disposeUIResources() {\n    UIUtil.dispose(myCbShowImportPopup);\n    UIUtil.dispose(myCbAddUnambiguousImports);\n    UIUtil.dispose(myExcludePackagesList);\n    myCbShowImportPopup = null;\n    myCbAddUnambiguousImports = null;\n    myExcludePackagesList = null;\n    myExcludePackagesModel.removeAllElements();\n    myExcludePackagesModel = null;\n  }\n\n  private class AddImportExclusionAction implements AnActionButtonRunnable {\n    @Override\n    public void run(AnActionButton button) {\n      String packageName =\n        Messages.showInputDialog(\"Enter the import path to exclude from auto-import and completion:\",\n                                 \"Exclude Import Path\",\n                                 Messages.getWarningIcon());\n      addExcludedPackage(packageName);\n    }\n\n    private void addExcludedPackage(@Nullable String packageName) {\n      if (StringUtil.isEmpty(packageName)) return;\n      int index = -Arrays.binarySearch(myExcludePackagesModel.toArray(), packageName) - 1;\n      if (index >= 0) {\n        myExcludePackagesModel.add(index, packageName);\n        ScrollingUtil.ensureIndexIsVisible(myExcludePackagesList, index, 0);\n      }\n      myExcludePackagesList.clearSelection();\n      myExcludePackagesList.setSelectedValue(packageName, true);\n      myExcludePackagesList.requestFocus();\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/codeInsight/imports/GoCodeInsightSettings.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.codeInsight.imports;\n\nimport com.goide.GoConstants;\nimport com.intellij.openapi.components.*;\nimport com.intellij.util.xmlb.XmlSerializerUtil;\nimport org.jetbrains.annotations.Nullable;\n\n@State(\n  name = GoConstants.GO,\n  storages = @Storage(file = StoragePathMacros.APP_CONFIG + \"/editor.codeinsight.xml\")\n)\npublic class GoCodeInsightSettings implements PersistentStateComponent<GoCodeInsightSettings> {\n  private boolean myShowImportPopup = true;\n  private boolean myAddUnambiguousImportsOnTheFly = true;\n\n  public static GoCodeInsightSettings getInstance() {\n    return ServiceManager.getService(GoCodeInsightSettings.class);\n  }\n\n  @Nullable\n  @Override\n  public GoCodeInsightSettings getState() {\n    return this;\n  }\n\n  @Override\n  public void loadState(GoCodeInsightSettings state) {\n    XmlSerializerUtil.copyBean(state, this);\n  }\n\n  public boolean isShowImportPopup() {\n    return myShowImportPopup;\n  }\n\n  public void setShowImportPopup(boolean showImportPopup) {\n    myShowImportPopup = showImportPopup;\n  }\n\n  public boolean isAddUnambiguousImportsOnTheFly() {\n    return myAddUnambiguousImportsOnTheFly;\n  }\n\n  public void setAddUnambiguousImportsOnTheFly(boolean addUnambiguousImportsOnTheFly) {\n    myAddUnambiguousImportsOnTheFly = addUnambiguousImportsOnTheFly;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/codeInsight/imports/GoExcludePathLookupActionProvider.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.codeInsight.imports;\n\nimport com.goide.project.GoExcludedPathsSettings;\nimport com.goide.psi.GoFile;\nimport com.intellij.codeInsight.lookup.Lookup;\nimport com.intellij.codeInsight.lookup.LookupActionProvider;\nimport com.intellij.codeInsight.lookup.LookupElement;\nimport com.intellij.codeInsight.lookup.LookupElementAction;\nimport com.intellij.icons.AllIcons;\nimport com.intellij.openapi.application.ApplicationManager;\nimport com.intellij.openapi.options.ShowSettingsUtil;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.util.Consumer;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.List;\n\npublic class GoExcludePathLookupActionProvider implements LookupActionProvider {\n  @Override\n  public void fillActions(LookupElement element, Lookup lookup, Consumer<LookupElementAction> consumer) {\n    PsiElement psiElement = element.getPsiElement();\n    PsiFile file = psiElement != null && psiElement.isValid() ? psiElement.getContainingFile() : null;\n    String importPath = file instanceof GoFile ? ((GoFile)file).getImportPath(false) : null;\n    if (importPath != null) {\n      Project project = psiElement.getProject();\n      for (String path : getPaths(importPath)) {\n        consumer.consume(new ExcludePathAction(project, path));\n      }\n      consumer.consume(new EditExcludedAction(project));\n    }\n  }\n\n  private static List<String> getPaths(String importPath) {\n    List<String> result = ContainerUtil.newArrayList(importPath);\n    int i;\n    while ((i = importPath.lastIndexOf('/')) > 0) {\n      importPath = importPath.substring(0, i);\n      result.add(importPath);\n    }\n    return result;\n  }\n\n  private static class EditExcludedAction extends LookupElementAction {\n    @NotNull Project myProject;\n\n    protected EditExcludedAction(@NotNull Project project) {\n      super(AllIcons.Actions.Edit, \"Edit auto import settings\");\n      myProject = project;\n    }\n\n    @Override\n    public Result performLookupAction() {\n      ApplicationManager.getApplication().invokeLater(() -> {\n        GoAutoImportConfigurable configurable = new GoAutoImportConfigurable(myProject, true);\n        ShowSettingsUtil.getInstance().editConfigurable(myProject, configurable, configurable::focusList);\n      });\n      return Result.HIDE_LOOKUP;\n    }\n  }\n\n  private static class ExcludePathAction extends LookupElementAction {\n    private Project myProject;\n    private String myImportPath;\n\n    protected ExcludePathAction(@NotNull Project project, @NotNull String importPath) {\n      super(AllIcons.Actions.Exclude, \"Exclude '\" + importPath + \"'\");\n      myProject = project;\n      myImportPath = importPath;\n    }\n\n    @Override\n    public Result performLookupAction() {\n      GoExcludedPathsSettings.getInstance(myProject).excludePath(myImportPath);\n      return Result.HIDE_LOOKUP;\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/codeInsight/imports/GoGetPackageFix.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.codeInsight.imports;\n\nimport com.goide.sdk.GoSdkService;\nimport com.goide.util.GoExecutor;\nimport com.intellij.codeInsight.intention.HighPriorityAction;\nimport com.intellij.codeInspection.LocalQuickFixBase;\nimport com.intellij.codeInspection.ProblemDescriptor;\nimport com.intellij.openapi.command.CommandProcessor;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.module.ModuleUtilCore;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.openapi.vfs.VirtualFileManager;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.util.Consumer;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoGetPackageFix extends LocalQuickFixBase implements HighPriorityAction {\n  @NotNull private final String myPackage;\n\n  public GoGetPackageFix(@NotNull String packageName) {\n    super(\"go get -t \" + packageName + \"/...\", \"go get\");\n    myPackage = packageName;\n  }\n\n  public static void applyFix(@NotNull Project project,\n                              @Nullable Module module,\n                              @NotNull String packageName,\n                              boolean startInBackground) {\n    String sdkPath = GoSdkService.getInstance(project).getSdkHomePath(module);\n    if (StringUtil.isEmpty(sdkPath)) return;\n    CommandProcessor.getInstance().runUndoTransparentAction(() -> {\n      Consumer<Boolean> consumer = aBoolean -> VirtualFileManager.getInstance().asyncRefresh(null);\n      GoExecutor.in(project, module).withPresentableName(\"go get -t \" + packageName + \"/...\")\n        .withParameters(\"get\", \"-t\", packageName+\"/...\").showNotifications(false, true).showOutputOnError()\n        .executeWithProgress(!startInBackground, consumer);\n    });\n  }\n\n  @Override\n  public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {\n    PsiElement element = descriptor.getPsiElement();\n    if (element != null) {\n      applyFix(project, ModuleUtilCore.findModuleForPsiElement(element.getContainingFile()), myPackage, true);\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/codeInsight/imports/GoImportOptimizer.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.codeInsight.imports;\n\nimport com.goide.GoTypes;\nimport com.goide.psi.*;\nimport com.goide.psi.impl.GoReferenceBase;\nimport com.intellij.lang.ImportOptimizer;\nimport com.intellij.openapi.editor.Document;\nimport com.intellij.openapi.progress.ProgressManager;\nimport com.intellij.openapi.util.Comparing;\nimport com.intellij.openapi.util.EmptyRunnable;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.psi.*;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport com.intellij.util.containers.ContainerUtil;\nimport com.intellij.util.containers.MultiMap;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.Collection;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Set;\n\npublic class GoImportOptimizer implements ImportOptimizer {\n  @Override\n  public boolean supports(PsiFile file) {\n    return file instanceof GoFile;\n  }\n\n  @NotNull\n  @Override\n  public Runnable processFile(@NotNull PsiFile file) {\n    if (!(file instanceof GoFile)) {\n      return EmptyRunnable.getInstance();\n    }\n    MultiMap<String, GoImportSpec> importMap = ((GoFile)file).getImportMap();\n    Set<PsiElement> importEntriesToDelete = ContainerUtil.newLinkedHashSet();\n    Set<PsiElement> importIdentifiersToDelete = findRedundantImportIdentifiers(importMap);\n\n    importEntriesToDelete.addAll(findDuplicatedEntries(importMap));\n    importEntriesToDelete.addAll(filterUnusedImports(file, importMap).values());\n    if (importEntriesToDelete.isEmpty() && importIdentifiersToDelete.isEmpty()) {\n      return EmptyRunnable.getInstance();\n    }\n\n    return new CollectingInfoRunnable() {\n      @Nullable\n      @Override\n      public String getUserNotificationInfo() {\n        int entriesToDelete = importEntriesToDelete.size();\n        int identifiersToDelete = importIdentifiersToDelete.size();\n        String result = \"\";\n        if (entriesToDelete > 0) {\n          result = \"Removed \" + entriesToDelete + \" import\" + (entriesToDelete > 1 ? \"s\" : \"\");\n        } \n        if (identifiersToDelete > 0) {\n          result += result.isEmpty() ? \"Removed \" : \" and \";\n          result += identifiersToDelete + \" alias\" + (identifiersToDelete > 1 ? \"es\" : \"\");\n        }\n        return StringUtil.nullize(result);\n      }\n\n      @Override\n      public void run() {\n        if (!importEntriesToDelete.isEmpty() || !importIdentifiersToDelete.isEmpty()) {\n          PsiDocumentManager manager = PsiDocumentManager.getInstance(file.getProject());\n          Document document = manager.getDocument(file);\n          if (document != null) {\n            manager.commitDocument(document);\n          }\n        }\n\n        for (PsiElement importEntry : importEntriesToDelete) {\n          if (importEntry != null && importEntry.isValid()) {\n            deleteImportSpec(getImportSpec(importEntry));\n          }\n        }\n\n        for (PsiElement identifier : importIdentifiersToDelete) {\n          if (identifier != null && identifier.isValid()) {\n            identifier.delete();\n          }\n        }\n      }\n    };\n  }\n\n  @NotNull\n  public static Set<PsiElement> findRedundantImportIdentifiers(@NotNull MultiMap<String, GoImportSpec> importMap) {\n    Set<PsiElement> importIdentifiersToDelete = ContainerUtil.newLinkedHashSet();\n    for (PsiElement importEntry : importMap.values()) {\n      GoImportSpec importSpec = getImportSpec(importEntry);\n      if (importSpec != null) {\n        String localPackageName = importSpec.getLocalPackageName();\n        if (!StringUtil.isEmpty(localPackageName)) {\n          if (Comparing.equal(importSpec.getAlias(), localPackageName)) {\n            importIdentifiersToDelete.add(importSpec.getIdentifier());\n          }\n        }\n      }\n    }\n    return importIdentifiersToDelete;\n  }\n\n  public static MultiMap<String, GoImportSpec> filterUnusedImports(@NotNull PsiFile file, \n                                                                   @NotNull MultiMap<String, GoImportSpec> importMap) {\n    MultiMap<String, GoImportSpec> result = MultiMap.create();\n    result.putAllValues(importMap);\n    result.remove(\"_\"); // imports for side effects are always used\n    \n    Collection<GoImportSpec> implicitImports = ContainerUtil.newArrayList(result.get(\".\"));\n    for (GoImportSpec importEntry : implicitImports) {\n      GoImportSpec spec = getImportSpec(importEntry);\n      if (spec != null && spec.isDot() && hasImportUsers(spec)) {\n        result.remove(\".\", importEntry);\n      }\n    }\n    \n    file.accept(new GoRecursiveVisitor() {\n      @Override\n      public void visitTypeReferenceExpression(@NotNull GoTypeReferenceExpression o) {\n        GoTypeReferenceExpression lastQualifier = o.getQualifier();\n        if (lastQualifier != null) {\n          GoTypeReferenceExpression previousQualifier;\n          while ((previousQualifier = lastQualifier.getQualifier()) != null) {\n            lastQualifier = previousQualifier;\n          }\n          markAsUsed(lastQualifier.getIdentifier(), lastQualifier.getReference());\n        }\n      }\n\n      @Override\n      public void visitReferenceExpression(@NotNull GoReferenceExpression o) {\n        GoReferenceExpression lastQualifier = o.getQualifier();\n        if (lastQualifier != null) {\n          GoReferenceExpression previousQualifier;\n          while ((previousQualifier = lastQualifier.getQualifier()) != null) {\n            lastQualifier = previousQualifier;\n          }\n          markAsUsed(lastQualifier.getIdentifier(), lastQualifier.getReference());\n        }\n      }\n\n      private void markAsUsed(@NotNull PsiElement qualifier, @NotNull PsiReference reference) {\n        String qualifierText = qualifier.getText();\n        if (!result.containsKey(qualifierText)) {\n          // already marked\n          return;\n        }\n        PsiElement resolve = reference.resolve();\n        if (!(resolve instanceof PsiDirectory || resolve instanceof GoImportSpec || resolve instanceof PsiDirectoryContainer)) {\n          return;\n        }\n        Collection<String> qualifiersToDelete = ContainerUtil.newHashSet();\n        for (GoImportSpec spec : result.get(qualifierText)) {\n          for (Map.Entry<String, Collection<GoImportSpec>> entry : result.entrySet()) {\n            for (GoImportSpec importSpec : entry.getValue()) {\n              if (importSpec == spec) {\n                qualifiersToDelete.add(entry.getKey());\n              }\n            }\n          }\n        }\n        for (String qualifierToDelete : qualifiersToDelete) {\n          result.remove(qualifierToDelete);\n        }\n      }\n    });\n    return result;\n  }\n\n  private static boolean hasImportUsers(@NotNull GoImportSpec spec) {\n    //noinspection SynchronizationOnLocalVariableOrMethodParameter\n    synchronized (spec) {\n      List<PsiElement> list = spec.getUserData(GoReferenceBase.IMPORT_USERS);\n      if (list != null) {\n        for (PsiElement e : list) {\n          if (e.isValid()) {\n            return true;\n          }\n          ProgressManager.checkCanceled();\n        }\n      }\n    }\n    return false;\n  }\n\n  @NotNull\n  public static Set<GoImportSpec> findDuplicatedEntries(@NotNull MultiMap<String, GoImportSpec> importMap) {\n    Set<GoImportSpec> duplicatedEntries = ContainerUtil.newLinkedHashSet();\n    for (Map.Entry<String, Collection<GoImportSpec>> imports : importMap.entrySet()) {\n      Collection<GoImportSpec> importsWithSameName = imports.getValue();\n      if (importsWithSameName.size() > 1) {\n        MultiMap<String, GoImportSpec> importsWithSameString = collectImportsWithSameString(importsWithSameName);\n\n        for (Map.Entry<String, Collection<GoImportSpec>> importWithSameString : importsWithSameString.entrySet()) {\n          List<GoImportSpec> duplicates = ContainerUtil.newArrayList(importWithSameString.getValue());\n          if (duplicates.size() > 1) {\n            duplicatedEntries.addAll(duplicates.subList(1, duplicates.size()));\n          }\n        }\n      }\n    }\n    return duplicatedEntries;\n  }\n\n  private static void deleteImportSpec(@Nullable GoImportSpec importSpec) {\n    GoImportDeclaration importDeclaration = PsiTreeUtil.getParentOfType(importSpec, GoImportDeclaration.class);\n    if (importSpec != null && importDeclaration != null) {\n      PsiElement startElementToDelete = importSpec;\n      PsiElement endElementToDelete = importSpec;\n      if (importDeclaration.getImportSpecList().size() == 1) {\n        startElementToDelete = importDeclaration;\n        endElementToDelete = importDeclaration;\n        \n        PsiElement nextSibling = endElementToDelete.getNextSibling();\n        if (nextSibling != null && nextSibling.getNode().getElementType() == GoTypes.SEMICOLON) {\n          endElementToDelete = nextSibling;\n        }\n      }\n      // todo: delete after proper formatter implementation\n      PsiElement nextSibling = endElementToDelete.getNextSibling();\n      if (nextSibling instanceof PsiWhiteSpace && nextSibling.textContains('\\n')) {\n        endElementToDelete = nextSibling;\n      }\n      startElementToDelete.getParent().deleteChildRange(startElementToDelete, endElementToDelete);\n    }\n  }\n\n  @NotNull\n  private static MultiMap<String, GoImportSpec> collectImportsWithSameString(@NotNull Collection<GoImportSpec> importsWithSameName) {\n    MultiMap<String, GoImportSpec> importsWithSameString = MultiMap.create();\n    for (PsiElement duplicateCandidate : importsWithSameName) {\n      GoImportSpec importSpec = getImportSpec(duplicateCandidate);\n      if (importSpec != null) {\n        importsWithSameString.putValue(importSpec.getPath(), importSpec);\n      }\n    }\n    return importsWithSameString;\n  }\n\n  @Nullable\n  public static GoImportSpec getImportSpec(@NotNull PsiElement importEntry) {\n    return PsiTreeUtil.getNonStrictParentOfType(importEntry, GoImportSpec.class);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/codeInsight/imports/GoImportPackageQuickFix.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.codeInsight.imports;\n\nimport com.goide.GoIcons;\nimport com.goide.completion.GoCompletionUtil;\nimport com.goide.project.GoVendoringUtil;\nimport com.goide.psi.GoFile;\nimport com.goide.psi.GoReferenceExpression;\nimport com.goide.psi.GoTypeReferenceExpression;\nimport com.goide.psi.impl.GoPsiImplUtil;\nimport com.goide.psi.impl.GoReference;\nimport com.goide.psi.impl.GoTypeReference;\nimport com.goide.runconfig.testing.GoTestFinder;\nimport com.goide.stubs.index.GoPackagesIndex;\nimport com.goide.util.GoUtil;\nimport com.intellij.codeInsight.FileModificationService;\nimport com.intellij.codeInsight.daemon.impl.DaemonListeners;\nimport com.intellij.codeInsight.daemon.impl.ShowAutoImportPass;\nimport com.intellij.codeInsight.hint.HintManager;\nimport com.intellij.codeInsight.intention.HighPriorityAction;\nimport com.intellij.codeInspection.HintAction;\nimport com.intellij.codeInspection.LocalQuickFixAndIntentionActionOnPsiElement;\nimport com.intellij.openapi.application.ApplicationManager;\nimport com.intellij.openapi.application.impl.LaterInvocator;\nimport com.intellij.openapi.command.CommandProcessor;\nimport com.intellij.openapi.editor.Editor;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.module.ModuleUtilCore;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.ui.popup.JBPopup;\nimport com.intellij.openapi.ui.popup.JBPopupFactory;\nimport com.intellij.openapi.ui.popup.PopupChooserBuilder;\nimport com.intellij.openapi.util.Comparing;\nimport com.intellij.openapi.util.TextRange;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.psi.PsiDirectory;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.PsiReference;\nimport com.intellij.psi.search.GlobalSearchScope;\nimport com.intellij.psi.stubs.StubIndex;\nimport com.intellij.ui.IdeBorderFactory;\nimport com.intellij.ui.components.JBLabel;\nimport com.intellij.ui.components.JBList;\nimport com.intellij.util.IncorrectOperationException;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport javax.swing.*;\nimport java.util.*;\n\nimport static com.intellij.util.containers.ContainerUtil.*;\n\npublic class GoImportPackageQuickFix extends LocalQuickFixAndIntentionActionOnPsiElement implements HintAction, HighPriorityAction {\n  @NotNull private final String myPackageName;\n  @Nullable private List<String> myPackagesToImport;\n\n  public GoImportPackageQuickFix(@NotNull PsiElement element, @NotNull String importPath) {\n    super(element);\n    myPackageName = \"\";\n    myPackagesToImport = Collections.singletonList(importPath);\n  }\n\n  public GoImportPackageQuickFix(@NotNull PsiReference reference) {\n    super(reference.getElement());\n    myPackageName = reference.getCanonicalText();\n  }\n\n  @Nullable\n  public PsiReference getReference(PsiElement element) {\n    if (element != null && element.isValid()) {\n      for (PsiReference reference : element.getReferences()) {\n        if (isSupportedReference(reference)) {\n          return reference;\n        }\n      }\n    }\n    return null;\n  }\n\n  private static boolean isSupportedReference(@Nullable PsiReference reference) {\n    return reference instanceof GoReference || reference instanceof GoTypeReference;\n  }\n\n  @Override\n  public boolean showHint(@NotNull Editor editor) {\n    return doAutoImportOrShowHint(editor, true);\n  }\n\n  @NotNull\n  @Override\n  public String getText() {\n    PsiElement element = getStartElement();\n    if (element != null) {\n      return \"Import \" + getText(getImportPathVariantsToImport(element));\n    }\n    return \"Import package\";\n  }\n\n  @NotNull\n  private static String getText(@NotNull Collection<String> packagesToImport) {\n    return getFirstItem(packagesToImport, \"\") + \"? \" + (packagesToImport.size() > 1 ? \"(multiple choices...) \" : \"\");\n  }\n\n  @NotNull\n  @Override\n  public String getFamilyName() {\n    return \"Import package\";\n  }\n\n  @Override\n  public void invoke(@NotNull Project project, @NotNull PsiFile file, @Nullable(\"is null when called from inspection\") Editor editor,\n                     @NotNull PsiElement startElement, @NotNull PsiElement endElement) {\n    if (!FileModificationService.getInstance().prepareFileForWrite(file)) return;\n    perform(getImportPathVariantsToImport(startElement), file, editor);\n  }\n\n  @Override\n  public boolean isAvailable(@NotNull Project project,\n                             @NotNull PsiFile file,\n                             @NotNull PsiElement startElement,\n                             @NotNull PsiElement endElement) {\n    PsiReference reference = getReference(startElement);\n    return file instanceof GoFile && file.getManager().isInProject(file)\n           && reference != null && reference.resolve() == null\n           && !getImportPathVariantsToImport(startElement).isEmpty() && notQualified(startElement);\n  }\n\n  private static boolean notQualified(@Nullable PsiElement startElement) {\n    return startElement instanceof GoReferenceExpression && ((GoReferenceExpression)startElement).getQualifier() == null ||\n      startElement instanceof GoTypeReferenceExpression && ((GoTypeReferenceExpression)startElement).getQualifier() == null;\n  }\n\n  @NotNull\n  private List<String> getImportPathVariantsToImport(@NotNull PsiElement element) {\n    if (myPackagesToImport == null) {\n      myPackagesToImport = getImportPathVariantsToImport(myPackageName, element);\n    }\n    return myPackagesToImport;\n  }\n\n  @NotNull\n  public static List<String> getImportPathVariantsToImport(@NotNull String packageName, @NotNull PsiElement context) {\n    PsiFile contextFile = context.getContainingFile();\n    Set<String> imported = contextFile instanceof GoFile \n                           ? ((GoFile)contextFile).getImportedPackagesMap().keySet() : Collections.emptySet();\n    Project project = context.getProject();\n    PsiDirectory parentDirectory = contextFile != null ? contextFile.getParent() : null;\n    String testTargetPackage = GoTestFinder.getTestTargetPackage(contextFile);\n    Module module = contextFile != null ? ModuleUtilCore.findModuleForPsiElement(contextFile) : null;\n    boolean vendoringEnabled = GoVendoringUtil.isVendoringEnabled(module);\n    GlobalSearchScope scope = GoUtil.goPathResolveScope(context);\n    Collection<GoFile> packages = StubIndex.getElements(GoPackagesIndex.KEY, packageName, project, scope, GoFile.class);\n    return sorted(skipNulls(map2Set(\n      packages,\n      file -> {\n        if (parentDirectory != null && parentDirectory.isEquivalentTo(file.getParent())) {\n          if (testTargetPackage == null || !testTargetPackage.equals(file.getPackageName())) {\n            return null;\n          }\n        }\n        if (!GoPsiImplUtil.canBeAutoImported(file, false, module)) {\n          return null;\n        }\n        String importPath = file.getImportPath(vendoringEnabled);\n        return !imported.contains(importPath) ? importPath : null;\n      }\n    )), new MyImportsComparator(context, vendoringEnabled));\n  }\n\n  public boolean doAutoImportOrShowHint(@NotNull Editor editor, boolean showHint) {\n    PsiElement element = getStartElement();\n    if (element == null || !element.isValid()) return false;\n\n    PsiReference reference = getReference(element);\n    if (reference == null || reference.resolve() != null) return false;\n\n    List<String> packagesToImport = getImportPathVariantsToImport(element);\n    if (packagesToImport.isEmpty()) {\n      return false;\n    }\n\n    PsiFile file = element.getContainingFile();\n    String firstPackageToImport = getFirstItem(packagesToImport);\n\n    // autoimport on trying to fix\n    if (packagesToImport.size() == 1) {\n      if (GoCodeInsightSettings.getInstance().isAddUnambiguousImportsOnTheFly() && !LaterInvocator.isInModalContext() &&\n          (ApplicationManager.getApplication().isUnitTestMode() || DaemonListeners.canChangeFileSilently(file))) {\n        CommandProcessor.getInstance().runUndoTransparentAction(() -> perform(file, firstPackageToImport));\n        return true;\n      }\n    }\n\n    // show hint on failed autoimport\n    if (showHint) {\n      if (ApplicationManager.getApplication().isUnitTestMode()) return false;\n      if (HintManager.getInstance().hasShownHintsThatWillHideByOtherHint(true)) return false;\n      if (!GoCodeInsightSettings.getInstance().isShowImportPopup()) return false;\n      TextRange referenceRange = reference.getRangeInElement().shiftRight(element.getTextRange().getStartOffset());\n      HintManager.getInstance().showQuestionHint(\n        editor,\n        ShowAutoImportPass.getMessage(packagesToImport.size() > 1, getFirstItem(packagesToImport)),\n        referenceRange.getStartOffset(),\n        referenceRange.getEndOffset(),\n        () -> {\n          if (file.isValid() && !editor.isDisposed()) {\n            perform(packagesToImport, file, editor);\n          }\n          return true;\n        }\n      );\n      return true;\n    }\n    return false;\n  }\n\n  private void perform(@NotNull List<String> packagesToImport, @NotNull PsiFile file, @Nullable Editor editor) {\n    LOG.assertTrue(editor != null || packagesToImport.size() == 1, \"Cannot invoke fix with ambiguous imports on null editor\");\n    if (packagesToImport.size() > 1 && editor != null) {\n      JBList list = new JBList(packagesToImport);\n      list.installCellRenderer(o -> {\n        JBLabel label = new JBLabel(o.toString(), GoIcons.PACKAGE, SwingConstants.LEFT);\n        label.setBorder(IdeBorderFactory.createEmptyBorder(2, 4, 2, 4));\n        return label;\n      });\n      PopupChooserBuilder builder = JBPopupFactory.getInstance().createListPopupBuilder(list).setRequestFocus(true)\n        .setTitle(\"Package to import\")\n        .setItemChoosenCallback(\n          () -> {\n            int i = list.getSelectedIndex();\n            if (i < 0) return;\n            perform(file, packagesToImport.get(i));\n          })\n        .setFilteringEnabled(o -> o instanceof String ? (String)o : o.toString());\n      JBPopup popup = builder.createPopup();\n      builder.getScrollPane().setBorder(null);\n      builder.getScrollPane().setViewportBorder(null);\n      popup.showInBestPositionFor(editor);\n    }\n    else if (packagesToImport.size() == 1) {\n      perform(file, getFirstItem(packagesToImport));\n    }\n    else {\n      String packages = StringUtil.join(packagesToImport, \",\");\n      throw new IncorrectOperationException(\"Cannot invoke fix with ambiguous imports on editor ()\" + editor + \". Packages: \" + packages);\n    }\n  }\n\n  private void perform(@NotNull PsiFile file, @Nullable String pathToImport) {\n    if (file instanceof GoFile && pathToImport != null) {\n      Project project = file.getProject();\n      CommandProcessor.getInstance().executeCommand(project, () -> ApplicationManager.getApplication().runWriteAction(() -> {\n        if (!isAvailable()) return;\n        if (((GoFile)file).getImportedPackagesMap().containsKey(pathToImport)) return;\n        ((GoFile)file).addImport(pathToImport, null);\n      }), \"Add import\", null);\n    }\n  }\n\n  private static class MyImportsComparator implements Comparator<String> {\n    @Nullable\n    private final String myContextImportPath;\n\n    public MyImportsComparator(@Nullable PsiElement context, boolean vendoringEnabled) {\n      myContextImportPath = GoCompletionUtil.getContextImportPath(context, vendoringEnabled);\n    }\n\n    @Override\n    public int compare(@NotNull String s1, @NotNull String s2) {\n      int result = Comparing.compare(GoCompletionUtil.calculatePackagePriority(s2, myContextImportPath),\n                                     GoCompletionUtil.calculatePackagePriority(s1, myContextImportPath));\n      return result != 0 ? result : Comparing.compare(s1, s2);\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/codeInsight/unwrap/GoBracesUnwrapper.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.codeInsight.unwrap;\n\nimport com.goide.psi.GoStatement;\nimport com.goide.psi.impl.GoStatementImpl;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.util.IncorrectOperationException;\n\npublic class GoBracesUnwrapper extends GoUnwrapper {\n  public GoBracesUnwrapper() {\n    super(\"Unwrap braces\");\n  }\n\n  @Override\n  public boolean isApplicableTo(PsiElement e) {\n    return e.getClass().equals(GoStatementImpl.class) && ((GoStatement)e).getBlock() != null;\n  }\n\n  @Override\n  protected void doUnwrap(PsiElement element, Context context) throws IncorrectOperationException {\n    context.extractFromBlock(((GoStatement)element).getBlock(), element);\n    context.delete(element);\n  }\n}"
  },
  {
    "path": "src/com/goide/codeInsight/unwrap/GoElseRemover.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.codeInsight.unwrap;\n\nimport com.intellij.psi.PsiElement;\nimport com.intellij.util.IncorrectOperationException;\n\npublic class GoElseRemover extends GoElseUnwrapperBase {\n  public GoElseRemover() {\n    super(\"Remove else\");\n  }\n\n  @Override\n  protected void doUnwrap(PsiElement element, Context context) throws IncorrectOperationException {\n    context.delete(element);\n  }\n}"
  },
  {
    "path": "src/com/goide/codeInsight/unwrap/GoElseUnwrapper.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.codeInsight.unwrap;\n\nimport com.goide.psi.GoElseStatement;\nimport com.goide.psi.GoIfStatement;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.util.IncorrectOperationException;\n\npublic class GoElseUnwrapper extends GoElseUnwrapperBase {\n  public GoElseUnwrapper() {\n    super(\"Unwrap else\");\n  }\n\n  @Override\n  protected void doUnwrap(PsiElement element, Context context) throws IncorrectOperationException {\n    GoElseStatement elseStatement = (GoElseStatement)element;\n    GoIfStatement elseIf = elseStatement.getIfStatement();\n\n    context.extractNewLine(elseStatement);\n    if (elseIf != null) {\n      context.extractElement(elseIf, elseStatement);\n    }\n    context.extractFromBlock(elseStatement.getBlock(), elseStatement);\n    context.delete(elseStatement);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/codeInsight/unwrap/GoElseUnwrapperBase.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.codeInsight.unwrap;\n\nimport com.goide.psi.GoElseStatement;\nimport com.goide.psi.GoIfStatement;\nimport com.intellij.psi.PsiElement;\n\nimport java.util.Set;\n\npublic abstract class GoElseUnwrapperBase extends GoUnwrapper {\n  public GoElseUnwrapperBase(String description) {\n    super(description);\n  }\n\n  @Override\n  public void collectElementsToIgnore(PsiElement element, Set<PsiElement> result) {\n    PsiElement parent = element.getParent();\n    if (parent instanceof GoIfStatement) {\n      result.add(parent);\n    }\n  }\n\n  @Override\n  public boolean isApplicableTo(PsiElement e) {\n    return e instanceof GoElseStatement;\n  }\n}"
  },
  {
    "path": "src/com/goide/codeInsight/unwrap/GoForUnwrapper.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.codeInsight.unwrap;\n\nimport com.goide.psi.GoForClause;\nimport com.goide.psi.GoForStatement;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.util.IncorrectOperationException;\nimport com.intellij.util.containers.ContainerUtil;\n\npublic class GoForUnwrapper extends GoUnwrapper {\n  public GoForUnwrapper() {\n    super(\"Unwrap for\");\n  }\n\n  @Override\n  public boolean isApplicableTo(PsiElement e) {\n    return e instanceof GoForStatement;\n  }\n\n  @Override\n  protected void doUnwrap(PsiElement element, Context context) throws IncorrectOperationException {\n    GoForStatement forStatement = (GoForStatement)element;\n    GoForClause forClause = forStatement.getForClause();\n    if (forClause != null) {\n      context.extractElement(ContainerUtil.getFirstItem(forClause.getStatementList()), forStatement);\n    }\n    context.extractFromBlock(forStatement.getBlock(), forStatement);\n    context.delete(forStatement);\n  }\n}"
  },
  {
    "path": "src/com/goide/codeInsight/unwrap/GoFunctionArgumentUnwrapper.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.codeInsight.unwrap;\n\nimport com.goide.psi.GoArgumentList;\nimport com.goide.psi.GoCallExpr;\nimport com.goide.psi.GoExpression;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.util.IncorrectOperationException;\nimport com.intellij.util.ObjectUtils;\n\nimport java.util.List;\n\npublic class GoFunctionArgumentUnwrapper extends GoUnwrapper {\n  public GoFunctionArgumentUnwrapper() {\n    super(\"Unwrap argument\");\n  }\n\n  @Override\n  public boolean isApplicableTo(PsiElement e) {\n    return e instanceof GoExpression && e.getParent() instanceof GoArgumentList && e.getParent().getParent() instanceof GoCallExpr;\n  }\n\n  @Override\n  protected void doUnwrap(PsiElement element, Context context) throws IncorrectOperationException {\n    PsiElement parent = element.getParent();\n    GoCallExpr call = parent != null ? ObjectUtils.tryCast(parent.getParent(), GoCallExpr.class) : null;\n    if (call != null) {\n      context.extractElement(element, call);\n      context.delete(call);\n    }\n  }\n\n  @Override\n  public String getDescription(PsiElement e) {\n    String text = e.getText();\n    if (text.length() > 20) text = text.substring(0, 17) + \"...\";\n    return \"Unwrap \" + text;\n  }\n\n  @Override\n  public PsiElement collectAffectedElements(PsiElement e, List<PsiElement> toExtract) {\n    super.collectAffectedElements(e, toExtract);\n    return e.getParent().getParent();\n  }\n}\n"
  },
  {
    "path": "src/com/goide/codeInsight/unwrap/GoIfUnwrapper.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.codeInsight.unwrap;\n\nimport com.goide.psi.GoElseStatement;\nimport com.goide.psi.GoIfStatement;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.util.IncorrectOperationException;\n\npublic class GoIfUnwrapper extends GoUnwrapper {\n  public GoIfUnwrapper() {\n    super(\"Unwrap if\");\n  }\n\n  @Override\n  public boolean isApplicableTo(PsiElement e) {\n    return e instanceof GoIfStatement && !(e.getParent() instanceof GoElseStatement);\n  }\n\n  @Override\n  protected void doUnwrap(PsiElement element, Context context) throws IncorrectOperationException {\n    GoIfStatement ifStatement = (GoIfStatement)element;\n    context.extractFromBlock(ifStatement.getBlock(), ifStatement);\n    context.delete(ifStatement);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/codeInsight/unwrap/GoUnwrapDescriptor.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.codeInsight.unwrap;\n\nimport com.intellij.codeInsight.unwrap.UnwrapDescriptorBase;\nimport com.intellij.codeInsight.unwrap.Unwrapper;\n\npublic class GoUnwrapDescriptor extends UnwrapDescriptorBase {\n  @Override\n  protected Unwrapper[] createUnwrappers() {\n    return new Unwrapper[]{\n      new GoElseRemover(),\n      new GoElseUnwrapper(),\n      new GoIfUnwrapper(),\n      new GoForUnwrapper(),\n      new GoBracesUnwrapper(),\n      new GoFunctionArgumentUnwrapper()\n    };\n  }\n}\n"
  },
  {
    "path": "src/com/goide/codeInsight/unwrap/GoUnwrapper.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.codeInsight.unwrap;\n\nimport com.goide.psi.GoBlock;\nimport com.goide.psi.GoStatement;\nimport com.goide.psi.impl.GoElementFactory;\nimport com.intellij.codeInsight.unwrap.AbstractUnwrapper;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiWhiteSpace;\nimport com.intellij.psi.impl.source.codeStyle.CodeEditUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic abstract class GoUnwrapper extends AbstractUnwrapper<GoUnwrapper.Context> {\n  protected GoUnwrapper(String description) {\n    super(description);\n  }\n\n  @Override\n  protected Context createContext() {\n    return new Context();\n  }\n\n  protected static class Context extends AbstractUnwrapper.AbstractContext {\n    public void extractNewLine(PsiElement from) {\n      PsiElement newLine = GoElementFactory.createNewLine(from.getProject());\n      if (myIsEffective) {\n        newLine = from.getParent().addBefore(newLine, from);\n      }\n      if (newLine != null) {\n        addElementToExtract(newLine);\n      }\n    }\n\n    public void extractFromBlock(@Nullable GoBlock block, @NotNull PsiElement from) {\n      if (block != null) {\n        for (GoStatement statement : block.getStatementList()) {\n          extractElement(statement, from);\n        }\n      }\n    }\n\n    @Override\n    public void addElementToExtract(PsiElement e) {\n      super.addElementToExtract(e);\n      CodeEditUtil.markToReformat(e.getNode(), true);\n    }\n\n    @Override\n    protected boolean isWhiteSpace(PsiElement element) {\n      return element instanceof PsiWhiteSpace;\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/completion/AddBracketsInsertHandler.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.completion;\n\nimport com.intellij.codeInsight.completion.InsertionContext;\nimport com.intellij.codeInsight.completion.util.ParenthesesInsertHandler;\nimport com.intellij.codeInsight.lookup.LookupElement;\nimport com.intellij.openapi.editor.Document;\nimport com.intellij.openapi.editor.Editor;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.psi.PsiElement;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class AddBracketsInsertHandler extends ParenthesesInsertHandler<LookupElement> {\n  @Override\n  protected boolean placeCaretInsideParentheses(InsertionContext context, LookupElement element) {\n    return true;\n  }\n\n  @Override\n  public void handleInsert(@NotNull InsertionContext context, LookupElement item) {\n    Editor editor = context.getEditor();\n    Document document = editor.getDocument();\n    context.commitDocument();\n    PsiElement element = findNextToken(context);\n    char completionChar = context.getCompletionChar();\n    boolean putCaretInside = completionChar == '[' || placeCaretInsideParentheses(context, item);\n    if (completionChar == '[') {\n      context.setAddCompletionChar(false);\n    }\n\n    int tail;\n    if (isToken(element, \"[\")) {\n      tail = element.getTextRange().getStartOffset();\n      if (completionChar != '[' && completionChar != '\\t') {\n        editor.getCaretModel().moveToOffset(context.getTailOffset());\n      }\n      else {\n        editor.getCaretModel().moveToOffset(tail + 1);\n      }\n\n      context.setTailOffset(tail + 1);\n      PsiElement list = element.getParent();\n      PsiElement last = list.getLastChild();\n      if (isToken(last, \"]\")) {\n        int rparenthOffset = last.getTextRange().getStartOffset();\n        context.setTailOffset(rparenthOffset + 1);\n        if (!putCaretInside) {\n          for (int i = tail + 1; i < rparenthOffset; ++i) {\n            if (!Character.isWhitespace(document.getCharsSequence().charAt(i))) {\n              return;\n            }\n          }\n\n          editor.getCaretModel().moveToOffset(context.getTailOffset());\n        }\n        else {\n          editor.getCaretModel().moveToOffset(tail + 1);\n        }\n\n        return;\n      }\n    }\n    else {\n      document.insertString(context.getTailOffset(), \"[\");\n      editor.getCaretModel().moveToOffset(context.getTailOffset());\n    }\n\n\n    if (context.getCompletionChar() == '[') {\n      tail = context.getTailOffset();\n      if (tail < document.getTextLength() && StringUtil.isJavaIdentifierPart(document.getCharsSequence().charAt(tail))) {\n        return;\n      }\n    }\n\n    document.insertString(context.getTailOffset(), \"]\");\n    if (!putCaretInside) {\n      editor.getCaretModel().moveToOffset(context.getTailOffset());\n    }\n  }\n\n  private static boolean isToken(@Nullable PsiElement element, @NotNull String text) {\n    return element != null && element.textMatches(text);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/completion/BracesInsertHandler.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.completion;\n\nimport com.intellij.codeInsight.completion.InsertHandler;\nimport com.intellij.codeInsight.completion.InsertionContext;\nimport com.intellij.codeInsight.lookup.LookupElement;\nimport com.intellij.codeInsight.template.Template;\nimport com.intellij.codeInsight.template.TemplateManager;\nimport com.intellij.openapi.actionSystem.IdeActions;\nimport com.intellij.openapi.application.ApplicationManager;\nimport com.intellij.openapi.editor.Editor;\nimport com.intellij.openapi.editor.actionSystem.EditorActionHandler;\nimport com.intellij.openapi.editor.actionSystem.EditorActionManager;\nimport com.intellij.openapi.editor.ex.EditorEx;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.text.StringUtil;\nimport org.jetbrains.annotations.NotNull;\n\npublic class BracesInsertHandler implements InsertHandler<LookupElement> {\n  public static final BracesInsertHandler ONE_LINER = new BracesInsertHandler(true);\n  public static final BracesInsertHandler INSTANCE = new BracesInsertHandler(false);\n  \n  private final boolean myOneLine;\n\n  private BracesInsertHandler(boolean oneLine) {\n    myOneLine = oneLine;\n  }\n\n  @Override\n  public void handleInsert(@NotNull InsertionContext context, LookupElement item) {\n    Editor editor = context.getEditor();\n    CharSequence documentText = context.getDocument().getImmutableCharSequence();\n    int offset = skipWhiteSpaces(editor.getCaretModel().getOffset(), documentText);\n    if (documentText.charAt(offset) != '{') {\n      Project project = context.getProject();\n      Template template = TemplateManager.getInstance(project).createTemplate(\"braces\", \"go\", myOneLine ? \"{$END$}\" : \" {\\n$END$\\n}\");\n      template.setToReformat(true);\n      TemplateManager.getInstance(project).startTemplate(editor, template);\n    }\n    else {\n      editor.getCaretModel().moveToOffset(offset);\n      ApplicationManager.getApplication().runWriteAction(() -> {\n        EditorActionHandler enterAction = EditorActionManager.getInstance().getActionHandler(IdeActions.ACTION_EDITOR_START_NEW_LINE);\n        enterAction.execute(editor, editor.getCaretModel().getCurrentCaret(), ((EditorEx)editor).getDataContext());\n      });\n    }\n  }\n\n  private static int skipWhiteSpaces(int offset, @NotNull CharSequence documentText) {\n    while (offset < documentText.length() && StringUtil.isWhiteSpace(documentText.charAt(offset))) {\n      offset += 1;\n    }\n    return Math.min(documentText.length() - 1, offset);\n  }\n}"
  },
  {
    "path": "src/com/goide/completion/CancellableCollectProcessor.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.completion;\n\nimport com.intellij.openapi.progress.ProgressManager;\nimport com.intellij.util.CommonProcessors;\n\nimport java.util.Collection;\n\npublic class CancellableCollectProcessor<T> extends CommonProcessors.CollectProcessor<T> {\n  public CancellableCollectProcessor(Collection<T> collection) {\n    super(collection);\n  }\n\n  @Override\n  public boolean process(T s) {\n    ProgressManager.checkCanceled();\n    return super.process(s);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/completion/GoAutoImportCompletionContributor.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.completion;\n\nimport com.goide.project.GoVendoringUtil;\nimport com.goide.psi.*;\nimport com.goide.psi.impl.GoPsiImplUtil;\nimport com.goide.psi.impl.GoTypeReference;\nimport com.goide.runconfig.testing.GoTestFinder;\nimport com.goide.stubs.index.GoIdFilter;\nimport com.goide.util.GoUtil;\nimport com.intellij.codeInsight.completion.*;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.module.ModuleUtilCore;\nimport com.intellij.openapi.progress.ProgressManager;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.TextRange;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.patterns.PsiElementPattern;\nimport com.intellij.patterns.StandardPatterns;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.PsiReference;\nimport com.intellij.psi.search.GlobalSearchScope;\nimport com.intellij.psi.stubs.StubIndex;\nimport com.intellij.util.ProcessingContext;\nimport com.intellij.util.Processor;\nimport com.intellij.util.containers.ContainerUtil;\nimport com.intellij.util.indexing.IdFilter;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.*;\n\nimport static com.goide.completion.GoCompletionUtil.createPrefixMatcher;\nimport static com.goide.psi.impl.GoPsiImplUtil.prevDot;\nimport static com.goide.stubs.index.GoAllPublicNamesIndex.ALL_PUBLIC_NAMES;\nimport static com.intellij.patterns.PlatformPatterns.psiElement;\n\npublic class GoAutoImportCompletionContributor extends CompletionContributor {\n  public GoAutoImportCompletionContributor() {\n    extend(CompletionType.BASIC, inGoFile(), new CompletionProvider<CompletionParameters>() {\n      @Override\n      protected void addCompletions(@NotNull CompletionParameters parameters,\n                                    ProcessingContext context,\n                                    @NotNull CompletionResultSet result) {\n        PsiElement position = parameters.getPosition();\n        PsiElement parent = position.getParent();\n        if (prevDot(parent)) return;\n        PsiFile psiFile = parameters.getOriginalFile();\n        if (!(psiFile instanceof GoFile && parent instanceof GoReferenceExpressionBase)) return;\n        GoFile file = (GoFile)psiFile;\n\n        result = adjustMatcher(parameters, result, parent);\n        PrefixMatcher matcher = result.getPrefixMatcher();\n        if (parameters.getInvocationCount() < 2 && matcher.getPrefix().isEmpty()) {\n          result.restartCompletionOnPrefixChange(StandardPatterns.string().longerThan(0));\n          return;\n        }\n\n        GoReferenceExpressionBase qualifier = ((GoReferenceExpressionBase)parent).getQualifier();\n        if (qualifier != null && qualifier.getReference() != null && qualifier.getReference().resolve() != null) return;\n\n        ArrayList<ElementProcessor> processors = ContainerUtil.newArrayList();\n        if (parent instanceof GoReferenceExpression && !GoPsiImplUtil.isUnaryBitAndExpression(parent)) {\n          processors.add(new FunctionsProcessor());\n          processors.add(new VariablesAndConstantsProcessor());\n        }\n        if (parent instanceof GoReferenceExpression || parent instanceof GoTypeReferenceExpression) {\n          processors.add(new TypesProcessor(parent));\n        }\n        if (processors.isEmpty()) return;\n\n        Module module = ModuleUtilCore.findModuleForPsiElement(psiFile);\n        NamedElementProcessor processor = new NamedElementProcessor(processors, file, result, module);\n        Project project = position.getProject();\n        GlobalSearchScope scope = new GoUtil.ExceptTestsScope(GoUtil.goPathResolveScope(file));\n        VirtualFile containingDirectory = file.getVirtualFile().getParent();\n        if (containingDirectory != null) {\n          scope = new GoUtil.ExceptChildOfDirectory(containingDirectory, scope, GoTestFinder.getTestTargetPackage(file));\n        }\n        IdFilter idFilter = GoIdFilter.getProductionFilter(project);\n        Set<String> sortedKeys = collectAndSortAllPublicProductionNames(matcher, scope, idFilter, file);\n        for (String name : sortedKeys) {\n          processor.setName(name);\n          for (GoNamedElement element : StubIndex.getElements(ALL_PUBLIC_NAMES, name, project, scope, idFilter, GoNamedElement.class)) {\n            if (!processor.process(element)) {\n              break;\n            }\n          }\n        }\n      }\n\n      private CompletionResultSet adjustMatcher(@NotNull CompletionParameters parameters,\n                                                @NotNull CompletionResultSet result,\n                                                @NotNull PsiElement parent) {\n        int startOffset = parent.getTextRange().getStartOffset();\n        String newPrefix = parameters.getEditor().getDocument().getText(TextRange.create(startOffset, parameters.getOffset()));\n        return result.withPrefixMatcher(createPrefixMatcher(newPrefix));\n      }\n    });\n  }\n\n  @NotNull\n  private static Set<String> collectAndSortAllPublicProductionNames(@NotNull PrefixMatcher matcher,\n                                                                    @NotNull GlobalSearchScope scope, \n                                                                    @Nullable IdFilter idFilter,\n                                                                    @NotNull GoFile file) {\n    String prefix = matcher.getPrefix();\n    boolean emptyPrefix = prefix.isEmpty();\n\n    Set<String> packagesWithAliases = ContainerUtil.newHashSet();\n    if (!emptyPrefix) {\n      for (Map.Entry<String, Collection<GoImportSpec>> entry : file.getImportMap().entrySet()) {\n        for (GoImportSpec spec : entry.getValue()) {\n          String alias = spec.getAlias();\n          if (spec.isDot() || alias != null) {\n            packagesWithAliases.add(entry.getKey());\n            break;\n          }\n        }\n      }\n    }\n\n    Set<String> allNames = ContainerUtil.newTroveSet();\n    StubIndex.getInstance().processAllKeys(ALL_PUBLIC_NAMES, new CancellableCollectProcessor<String>(allNames) {\n      @Override\n      protected boolean accept(String s) {\n        return emptyPrefix || matcher.prefixMatches(s) || packagesWithAliases.contains(substringBefore(s, '.'));\n      }\n    }, scope, idFilter);\n\n    if (emptyPrefix) {\n      return allNames;\n    }\n\n    List<String> sorted = ContainerUtil.sorted(allNames, String.CASE_INSENSITIVE_ORDER);\n    ProgressManager.checkCanceled();\n\n    LinkedHashSet<String> result = ContainerUtil.newLinkedHashSet();\n    for (String name : sorted) {\n      ProgressManager.checkCanceled();\n      if (matcher.isStartMatch(name)) {\n        result.add(name);\n      }\n    }\n    result.addAll(sorted);\n    return result;\n  }\n\n  private static PsiElementPattern.Capture<PsiElement> inGoFile() {\n    return psiElement().inFile(psiElement(GoFile.class));\n  }\n\n  @NotNull\n  private static String substringBefore(@NotNull String s, char c) {\n    int i = s.indexOf(c);\n    if (i == -1) return s;\n    return s.substring(0, i);\n  }\n\n  private static String substringAfter(@NotNull String s, char c) {\n    int i = s.indexOf(c);\n    if (i == -1) return \"\";\n    return s.substring(i + 1);\n  }\n\n  @NotNull\n  private static String replacePackageWithAlias(@NotNull String qualifiedName, @Nullable String alias) {\n    return alias != null ? alias + \".\" + substringAfter(qualifiedName, '.') : qualifiedName;\n  }\n\n  private interface ElementProcessor {\n    boolean process(@NotNull String name,\n                    @NotNull GoNamedElement element,\n                    @NotNull ExistingImportData importData,\n                    @NotNull CompletionResultSet result);\n    boolean isMine(@NotNull String name, @NotNull GoNamedElement element);\n  }\n\n  private static class VariablesAndConstantsProcessor implements ElementProcessor {\n    @Override\n    public boolean process(@NotNull String name,\n                           @NotNull GoNamedElement element,\n                           @NotNull ExistingImportData importData,\n                           @NotNull CompletionResultSet result) {\n      double priority = importData.exists ? GoCompletionUtil.VAR_PRIORITY : GoCompletionUtil.NOT_IMPORTED_VAR_PRIORITY;\n      result.addElement(GoCompletionUtil.createVariableLikeLookupElement(element, replacePackageWithAlias(name, importData.alias),\n                                                                         GoAutoImportInsertHandler.SIMPLE_INSERT_HANDLER, priority));\n      return true;\n    }\n\n    @Override\n    public boolean isMine(@NotNull String name, @NotNull GoNamedElement element) {\n      return element instanceof GoVarDefinition || element instanceof GoConstDefinition;\n    }\n  }\n\n  private static class FunctionsProcessor implements ElementProcessor {\n    @Override\n    public boolean process(@NotNull String name,\n                           @NotNull GoNamedElement element,\n                           @NotNull ExistingImportData importData,\n                           @NotNull CompletionResultSet result) {\n      GoFunctionDeclaration function = (GoFunctionDeclaration)element;\n      double priority = importData.exists ? GoCompletionUtil.FUNCTION_PRIORITY : GoCompletionUtil.NOT_IMPORTED_FUNCTION_PRIORITY;\n      result.addElement(GoCompletionUtil.createFunctionOrMethodLookupElement(function, replacePackageWithAlias(name, importData.alias),\n                                                                             GoAutoImportInsertHandler.FUNCTION_INSERT_HANDLER, priority));\n      return true;\n    }\n\n    @Override\n    public boolean isMine(@NotNull String name, @NotNull GoNamedElement element) {\n      return element instanceof GoFunctionDeclaration;\n    }\n  }\n\n  private static class TypesProcessor implements ElementProcessor {\n    @Nullable private final PsiElement myParent;\n\n    public TypesProcessor(@Nullable PsiElement parent) {\n      myParent = parent;\n    }\n\n    @Override\n    public boolean process(@NotNull String name,\n                           @NotNull GoNamedElement element,\n                           @NotNull ExistingImportData importData,\n                           @NotNull CompletionResultSet result) {\n      GoTypeSpec spec = (GoTypeSpec)element;\n      boolean forTypes = myParent instanceof GoTypeReferenceExpression;\n      double priority;\n      if (importData.exists) {\n        priority = forTypes ? GoCompletionUtil.TYPE_PRIORITY : GoCompletionUtil.TYPE_CONVERSION;\n      }\n      else {\n        priority = forTypes ? GoCompletionUtil.NOT_IMPORTED_TYPE_PRIORITY : GoCompletionUtil.NOT_IMPORTED_TYPE_CONVERSION;\n      }\n\n      String lookupString = replacePackageWithAlias(name, importData.alias);\n      if (forTypes) {\n        result.addElement(GoCompletionUtil.createTypeLookupElement(spec, lookupString, GoAutoImportInsertHandler.SIMPLE_INSERT_HANDLER,\n                                                                   importData.importPath, priority));\n      }\n      else {\n        result.addElement(GoCompletionUtil.createTypeConversionLookupElement(spec, lookupString,\n                                                                             GoAutoImportInsertHandler.TYPE_CONVERSION_INSERT_HANDLER,\n                                                                             importData.importPath, priority));\n      }\n      return true;\n    }\n\n    @Override\n    public boolean isMine(@NotNull String name, @NotNull GoNamedElement element) {\n      if (myParent != null && element instanceof GoTypeSpec) {\n        PsiReference reference = myParent.getReference();\n        return !(reference instanceof GoTypeReference) || ((GoTypeReference)reference).allowed((GoTypeSpec)element);\n      }\n      return false;\n    }\n  }\n\n  private static class NamedElementProcessor implements Processor<GoNamedElement> {\n    @NotNull private final Collection<ElementProcessor> myProcessors;\n    @NotNull private final CompletionResultSet myResult;\n    @NotNull private String myName = \"\";\n    @NotNull private final Map<String, GoImportSpec> myImportedPackages;\n    @Nullable private final Module myModule;\n    private final boolean myVendoringEnabled;\n\n    public NamedElementProcessor(@NotNull Collection<ElementProcessor> processors,\n                                 @NotNull GoFile contextFile,\n                                 @NotNull CompletionResultSet result,\n                                 @Nullable Module module) {\n      myProcessors = processors;\n      myVendoringEnabled = GoVendoringUtil.isVendoringEnabled(module);\n      myImportedPackages = contextFile.getImportedPackagesMap();\n      myModule = module;\n      myResult = result;\n    }\n\n    public void setName(@NotNull String name) {\n      myName = name;\n    }\n\n    @Override\n    public boolean process(@NotNull GoNamedElement element) {\n      ProgressManager.checkCanceled();\n      Boolean allowed = null;\n      ExistingImportData importData = null;\n      for (ElementProcessor processor : myProcessors) {\n        if (processor.isMine(myName, element)) {\n          importData = cachedImportData(element, importData);\n          allowed = cachedAllowed(element, allowed);\n          if (allowed == Boolean.FALSE || importData.isDot) break;\n          if (!processor.process(myName, element, importData, myResult)) {\n            return false;\n          }\n        }\n      }\n      return true;\n    }\n\n    @NotNull\n    private Boolean cachedAllowed(@NotNull GoNamedElement element, @Nullable Boolean existingValue) {\n      if (existingValue != null) return existingValue;\n      return GoPsiImplUtil.canBeAutoImported(element.getContainingFile(), false, myModule);\n    }\n\n    @NotNull\n    private ExistingImportData cachedImportData(@NotNull GoNamedElement element, @Nullable ExistingImportData existingValue) {\n      if (existingValue != null) return existingValue;\n\n      GoFile declarationFile = element.getContainingFile();\n      String importPath = declarationFile.getImportPath(myVendoringEnabled);\n      GoImportSpec existingImport = myImportedPackages.get(importPath);\n\n      boolean exists = existingImport != null;\n      boolean isDot = exists && existingImport.isDot();\n      String alias = existingImport != null ? existingImport.getAlias() : null;\n      return new ExistingImportData(exists, isDot, alias, importPath);\n    }\n  }\n\n  private static class ExistingImportData {\n    public final boolean exists;\n    public final boolean isDot;\n    public final String alias;\n    public final String importPath;\n\n    private ExistingImportData(boolean exists, boolean isDot, String packageName, String importPath) {\n      this.exists = exists;\n      this.isDot = isDot;\n      alias = packageName;\n      this.importPath = importPath;\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/completion/GoAutoImportInsertHandler.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.completion;\n\nimport com.goide.codeInsight.imports.GoImportPackageQuickFix;\nimport com.goide.project.GoVendoringUtil;\nimport com.goide.psi.GoFunctionDeclaration;\nimport com.goide.psi.GoNamedElement;\nimport com.goide.psi.GoTypeSpec;\nimport com.intellij.codeInsight.completion.InsertHandler;\nimport com.intellij.codeInsight.completion.InsertionContext;\nimport com.intellij.codeInsight.lookup.LookupElement;\nimport com.intellij.openapi.module.ModuleUtilCore;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.psi.PsiDocumentManager;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.PsiReference;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoAutoImportInsertHandler<T extends GoNamedElement> implements InsertHandler<LookupElement> {\n  public static final InsertHandler<LookupElement> SIMPLE_INSERT_HANDLER = new GoAutoImportInsertHandler<>();\n  public static final InsertHandler<LookupElement> TYPE_CONVERSION_INSERT_HANDLER = new GoAutoImportInsertHandler<>(\n    GoCompletionUtil.Lazy.TYPE_CONVERSION_INSERT_HANDLER, GoTypeSpec.class);\n  public static final InsertHandler<LookupElement> FUNCTION_INSERT_HANDLER = new GoAutoImportInsertHandler<>(\n    GoCompletionUtil.Lazy.VARIABLE_OR_FUNCTION_INSERT_HANDLER, GoFunctionDeclaration.class);\n\n  @Nullable private final InsertHandler<LookupElement> myDelegate;\n  @Nullable private final Class<T> myClass;\n\n  private GoAutoImportInsertHandler() {\n    this(null, null);\n  }\n\n  private GoAutoImportInsertHandler(@Nullable InsertHandler<LookupElement> delegate, @Nullable Class<T> clazz) {\n    myDelegate = delegate;\n    myClass = clazz;\n  }\n\n  @Override\n  public void handleInsert(@NotNull InsertionContext context, @NotNull LookupElement item) {\n    PsiElement element = item.getPsiElement();\n    if (element instanceof GoNamedElement) {\n      if (myClass != null && myDelegate != null && myClass.isInstance(element)) {\n        myDelegate.handleInsert(context, item);\n      }\n      autoImport(context, (GoNamedElement)element);\n    }\n  }\n\n  private static void autoImport(@NotNull InsertionContext context, @NotNull GoNamedElement element) {\n    PsiFile file = context.getFile();\n    boolean vendoringEnabled = GoVendoringUtil.isVendoringEnabled(ModuleUtilCore.findModuleForPsiElement(file));\n    String importPath = element.getContainingFile().getImportPath(vendoringEnabled);\n    if (StringUtil.isEmpty(importPath)) return;\n\n    PsiDocumentManager.getInstance(context.getProject()).commitDocument(context.getEditor().getDocument());\n    PsiReference reference = file.findReferenceAt(context.getStartOffset());\n    if (reference != null) {\n      PsiElement referenceElement = reference.getElement();\n      GoImportPackageQuickFix fix = new GoImportPackageQuickFix(referenceElement, importPath);\n      fix.invoke(context.getProject(), file, context.getEditor(), referenceElement, referenceElement);\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/completion/GoCharFilter.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.completion;\n\nimport com.goide.psi.GoImportString;\nimport com.intellij.codeInsight.lookup.CharFilter;\nimport com.intellij.codeInsight.lookup.Lookup;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoCharFilter extends CharFilter {\n  @Nullable\n  @Override\n  public Result acceptChar(char c, int prefixLength, @NotNull Lookup lookup) {\n    if (lookup.isCompletion() && '/' == c && PsiTreeUtil.getParentOfType(lookup.getPsiElement(), GoImportString.class) != null) {\n      return Result.ADD_TO_PREFIX;\n    }\n    return null;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/completion/GoCompletionConfidence.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.completion;\n\nimport com.goide.psi.GoNamedElement;\nimport com.intellij.codeInsight.completion.CompletionConfidence;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.util.ThreeState;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoCompletionConfidence extends CompletionConfidence {\n  @NotNull\n  @Override\n  public ThreeState shouldSkipAutopopup(@NotNull PsiElement context, @NotNull PsiFile psiFile, int offset) {\n    return context instanceof GoNamedElement && ((GoNamedElement)context).isBlank() ? ThreeState.YES : ThreeState.UNSURE;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/completion/GoCompletionContributor.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.completion;\n\nimport com.goide.GoConstants;\nimport com.goide.GoParserDefinition;\nimport com.goide.GoTypes;\nimport com.goide.psi.*;\nimport com.goide.psi.impl.GoCachedReference;\nimport com.goide.psi.impl.GoPsiImplUtil;\nimport com.goide.runconfig.testing.GoTestFinder;\nimport com.goide.sdk.GoPackageUtil;\nimport com.intellij.codeInsight.completion.CompletionContributor;\nimport com.intellij.codeInsight.completion.CompletionParameters;\nimport com.intellij.codeInsight.completion.CompletionResultSet;\nimport com.intellij.codeInsight.completion.CompletionType;\nimport com.intellij.codeInsight.lookup.AutoCompletionPolicy;\nimport com.intellij.codeInsight.lookup.LookupElement;\nimport com.intellij.codeInsight.lookup.LookupElementBuilder;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.openapi.util.Conditions;\nimport com.intellij.patterns.PatternCondition;\nimport com.intellij.patterns.PsiElementPattern;\nimport com.intellij.psi.PsiDirectory;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.util.ProcessingContext;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.Collection;\n\nimport static com.intellij.codeInsight.completion.PrioritizedLookupElement.withPriority;\nimport static com.intellij.patterns.PlatformPatterns.psiElement;\n\npublic class GoCompletionContributor extends CompletionContributor {\n  public GoCompletionContributor() {\n    extend(CompletionType.BASIC, importString(), new GoImportPathsCompletionProvider());\n    extend(CompletionType.BASIC, referenceExpression(), new GoReferenceCompletionProvider());\n    extend(CompletionType.BASIC, goReference(), new GoReferenceCompletionProvider());\n    extend(CompletionType.BASIC, testFunctionSignature(), new GoTestFunctionCompletionProvider());\n  }\n\n  private static PsiElementPattern.Capture<PsiElement> testFunctionSignature() {\n    return psiElement(GoTypes.IDENTIFIER).with(new GoTestFilePattern()).withParent(GoFunctionDeclaration.class)\n      .afterLeaf(psiElement().withElementType(GoTypes.FUNC));\n  }\n\n  private static PsiElementPattern.Capture<PsiElement> goReference() {\n    return psiElement().withParent(psiElement().withReference(GoCachedReference.class));\n  }\n\n  @Override\n  public void fillCompletionVariants(@NotNull CompletionParameters parameters, @NotNull CompletionResultSet result) {\n    PsiElement position = parameters.getPosition();\n    PsiFile file = parameters.getOriginalFile();\n    ASTNode node = position.getNode();\n    if (file instanceof GoFile && position.getParent() instanceof GoPackageClause && node.getElementType() == GoTypes.IDENTIFIER) {\n      boolean isTestFile = GoTestFinder.isTestFile(file);\n      PsiDirectory directory = file.getParent();\n      String currentPackageName = ((GoFile)file).getPackageName();\n      Collection<String> packagesInDirectory = GoPackageUtil.getAllPackagesInDirectory(directory, null, true);\n      for (String packageName : packagesInDirectory) {\n        if (!packageName.equals(currentPackageName)) {\n          result.addElement(packageLookup(packageName, GoCompletionUtil.PACKAGE_PRIORITY - 1));\n        }\n        if (isTestFile) {\n          result.addElement(packageLookup(packageName + GoConstants.TEST_SUFFIX, GoCompletionUtil.PACKAGE_PRIORITY));\n        }\n      }\n\n      if (directory != null && ContainerUtil.filter(directory.getFiles(), Conditions.instanceOf(GoFile.class)).size() == 1) {\n        String packageFromDirectory = GoPsiImplUtil.getLocalPackageName(directory.getName());\n        if (!packageFromDirectory.isEmpty()) {\n          result.addElement(packageLookup(packageFromDirectory, GoCompletionUtil.PACKAGE_PRIORITY - 1));\n        }\n      }\n      result.addElement(packageLookup(GoConstants.MAIN, GoCompletionUtil.PACKAGE_PRIORITY - 2));\n    }\n    super.fillCompletionVariants(parameters, result);\n  }\n\n  @NotNull\n  private static LookupElement packageLookup(@NotNull String packageName, int priority) {\n    LookupElement element = withPriority(LookupElementBuilder.create(packageName), priority);\n    return AutoCompletionPolicy.NEVER_AUTOCOMPLETE.applyPolicy(element);\n  }\n\n  private static PsiElementPattern.Capture<PsiElement> importString() {\n    return psiElement().withElementType(GoParserDefinition.STRING_LITERALS).withParent(GoStringLiteral.class)\n      .withSuperParent(2, GoImportString.class);\n  }\n\n  private static PsiElementPattern.Capture<PsiElement> referenceExpression() {\n    return psiElement().withParent(GoReferenceExpressionBase.class);\n  }\n\n  private static class GoTestFilePattern extends PatternCondition<PsiElement> {\n    public GoTestFilePattern() {\n      super(\"in go test file\");\n    }\n\n    @Override\n    public boolean accepts(@NotNull PsiElement element, ProcessingContext context) {\n      return GoTestFinder.isTestFile(element.getContainingFile());\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/completion/GoCompletionUtil.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.completion;\n\nimport com.goide.GoIcons;\nimport com.goide.psi.*;\nimport com.goide.psi.impl.GoPsiImplUtil;\nimport com.goide.sdk.GoSdkUtil;\nimport com.goide.stubs.GoFieldDefinitionStub;\nimport com.intellij.codeInsight.AutoPopupController;\nimport com.intellij.codeInsight.completion.InsertHandler;\nimport com.intellij.codeInsight.completion.InsertionContext;\nimport com.intellij.codeInsight.completion.PrefixMatcher;\nimport com.intellij.codeInsight.completion.PrioritizedLookupElement;\nimport com.intellij.codeInsight.completion.impl.CamelHumpMatcher;\nimport com.intellij.codeInsight.completion.util.ParenthesesInsertHandler;\nimport com.intellij.codeInsight.lookup.LookupElement;\nimport com.intellij.codeInsight.lookup.LookupElementBuilder;\nimport com.intellij.codeInsight.lookup.LookupElementPresentation;\nimport com.intellij.codeInsight.lookup.LookupElementRenderer;\nimport com.intellij.openapi.Disposable;\nimport com.intellij.openapi.util.Disposer;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.psi.PsiDirectory;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport com.intellij.util.ObjectUtils;\nimport com.intellij.util.ui.UIUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\nimport org.jetbrains.annotations.TestOnly;\n\nimport javax.swing.*;\n\npublic class GoCompletionUtil {\n  public static final int KEYWORD_PRIORITY = 20;\n  public static final int CONTEXT_KEYWORD_PRIORITY = 25;\n  public static final int NOT_IMPORTED_FUNCTION_PRIORITY = 3;\n  public static final int FUNCTION_PRIORITY = NOT_IMPORTED_FUNCTION_PRIORITY + 10;\n  public static final int NOT_IMPORTED_TYPE_PRIORITY = 5;\n  public static final int TYPE_PRIORITY = NOT_IMPORTED_TYPE_PRIORITY + 10;\n  public static final int NOT_IMPORTED_TYPE_CONVERSION = 1;\n  public static final int TYPE_CONVERSION = NOT_IMPORTED_TYPE_CONVERSION + 10;\n  public static final int NOT_IMPORTED_VAR_PRIORITY = 5;\n  public static final int VAR_PRIORITY = NOT_IMPORTED_VAR_PRIORITY + 10;\n  private static final int FIELD_PRIORITY = CONTEXT_KEYWORD_PRIORITY + 1;\n  private static final int LABEL_PRIORITY = 15;\n  public static final int PACKAGE_PRIORITY = 5;\n\n  public static class Lazy {\n    private static final SingleCharInsertHandler DIR_INSERT_HANDLER = new SingleCharInsertHandler('/');\n    private static final SingleCharInsertHandler PACKAGE_INSERT_HANDLER = new SingleCharInsertHandler('.');\n\n    public static final InsertHandler<LookupElement> VARIABLE_OR_FUNCTION_INSERT_HANDLER = new InsertHandler<LookupElement>() {\n      @Override\n      public void handleInsert(InsertionContext context, @NotNull LookupElement item) {\n        PsiElement e = item.getPsiElement();\n        if (e instanceof GoSignatureOwner) {\n          doInsert(context, item, ((GoSignatureOwner)e).getSignature());\n        }\n        else if (e instanceof GoNamedElement) {\n          GoType type = ((GoNamedElement)e).getGoType(null);\n          if (type instanceof GoFunctionType) {\n            doInsert(context, item, ((GoFunctionType)type).getSignature());\n          }\n        }\n      }\n\n      private void doInsert(InsertionContext context, @NotNull LookupElement item, @Nullable GoSignature signature) {\n        int paramsCount = signature != null ? signature.getParameters().getParameterDeclarationList().size() : 0;\n        InsertHandler<LookupElement> handler = paramsCount == 0 ? ParenthesesInsertHandler.NO_PARAMETERS : ParenthesesInsertHandler.WITH_PARAMETERS;\n        handler.handleInsert(context, item);\n        if (signature != null) {\n          AutoPopupController.getInstance(context.getProject()).autoPopupParameterInfo(context.getEditor(), null);\n        }\n      }\n    };\n    public static final InsertHandler<LookupElement> TYPE_CONVERSION_INSERT_HANDLER = (context, item) -> {\n      PsiElement element = item.getPsiElement();\n      if (element instanceof GoTypeSpec) {\n        GoType type = ((GoTypeSpec)element).getSpecType().getType();\n        if (type instanceof GoStructType || type instanceof GoArrayOrSliceType || type instanceof GoMapType) {\n          BracesInsertHandler.ONE_LINER.handleInsert(context, item);\n        }\n        else {\n          ParenthesesInsertHandler.WITH_PARAMETERS.handleInsert(context, item);\n        }\n      }\n    };\n    private static final SingleCharInsertHandler FIELD_DEFINITION_INSERT_HANDLER = new SingleCharInsertHandler(':') {\n      @Override\n      public void handleInsert(@NotNull InsertionContext context, LookupElement item) {\n        PsiFile file = context.getFile();\n        if (!(file instanceof GoFile)) return;\n        context.commitDocument();\n        int offset = context.getStartOffset();\n        PsiElement at = file.findElementAt(offset);\n        GoCompositeElement ref = PsiTreeUtil.getParentOfType(at, GoValue.class, GoReferenceExpression.class);\n        if (ref instanceof GoReferenceExpression && (((GoReferenceExpression)ref).getQualifier() != null || GoPsiImplUtil.prevDot(ref))) {\n          return;\n        }\n        GoValue value = PsiTreeUtil.getParentOfType(at, GoValue.class);\n        if (value == null || PsiTreeUtil.getPrevSiblingOfType(value, GoKey.class) != null) return;\n        super.handleInsert(context, item);\n      }\n    };\n    private static final LookupElementRenderer<LookupElement> FUNCTION_RENDERER = new LookupElementRenderer<LookupElement>() {\n      @Override\n      public void renderElement(@NotNull LookupElement element, @NotNull LookupElementPresentation p) {\n        PsiElement o = element.getPsiElement();\n        if (!(o instanceof GoNamedSignatureOwner)) return;\n        GoNamedSignatureOwner f = (GoNamedSignatureOwner)o;\n        Icon icon = f instanceof GoMethodDeclaration || f instanceof GoMethodSpec ? GoIcons.METHOD : GoIcons.FUNCTION;\n        String typeText = \"\";\n        GoSignature signature = f.getSignature();\n        String paramText = \"\";\n        if (signature != null) {\n          GoResult result = signature.getResult();\n          paramText = signature.getParameters().getText();\n          if (result != null) typeText = result.getText();\n        }\n\n        p.setIcon(icon);\n        p.setTypeText(typeText);\n        p.setTypeGrayed(true);\n        p.setTailText(calcTailText(f), true);\n        p.setItemText(element.getLookupString() + paramText);\n      }\n    };\n    private static final LookupElementRenderer<LookupElement> VARIABLE_RENDERER = new LookupElementRenderer<LookupElement>() {\n      @Override\n      public void renderElement(@NotNull LookupElement element, @NotNull LookupElementPresentation p) {\n        PsiElement o = element.getPsiElement();\n        if (!(o instanceof GoNamedElement)) return;\n        GoNamedElement v = (GoNamedElement)o;\n        GoType type = typesDisabled ? null : v.getGoType(null);\n        String text = GoPsiImplUtil.getText(type);\n        Icon icon = v instanceof GoVarDefinition ? GoIcons.VARIABLE :\n                    v instanceof GoParamDefinition ? GoIcons.PARAMETER :\n                    v instanceof GoFieldDefinition ? GoIcons.FIELD :\n                    v instanceof GoReceiver ? GoIcons.RECEIVER :\n                    v instanceof GoConstDefinition ? GoIcons.CONSTANT :\n                    v instanceof GoAnonymousFieldDefinition ? GoIcons.FIELD :\n                    null;\n\n        p.setIcon(icon);\n        p.setTailText(calcTailTextForFields(v), true);\n        p.setTypeText(text);\n        p.setTypeGrayed(true);\n        p.setItemText(element.getLookupString());\n      }\n    };\n  }\n\n  private static boolean typesDisabled;\n\n  @TestOnly\n  public static void disableTypeInfoInLookup(@NotNull Disposable disposable) {\n    typesDisabled = true;\n    Disposer.register(disposable, () -> {\n      //noinspection AssignmentToStaticFieldFromInstanceMethod\n      typesDisabled = false;\n    });\n  }\n\n  private GoCompletionUtil() {\n\n  }\n\n  @NotNull\n  public static CamelHumpMatcher createPrefixMatcher(@NotNull PrefixMatcher original) {\n    return createPrefixMatcher(original.getPrefix());\n  }\n\n  @NotNull\n  public static CamelHumpMatcher createPrefixMatcher(@NotNull String prefix) {\n    return new CamelHumpMatcher(prefix, false);\n  }\n\n  @NotNull\n  public static LookupElement createFunctionOrMethodLookupElement(@NotNull GoNamedSignatureOwner f,\n                                                                  @NotNull String lookupString,\n                                                                  @Nullable InsertHandler<LookupElement> h,\n                                                                  double priority) {\n    return PrioritizedLookupElement.withPriority(LookupElementBuilder\n                                                   .createWithSmartPointer(lookupString, f)\n                                                   .withRenderer(Lazy.FUNCTION_RENDERER)\n                                                   .withInsertHandler(h != null ? h : Lazy.VARIABLE_OR_FUNCTION_INSERT_HANDLER), priority);\n  }\n\n  @Nullable\n  private static String calcTailText(GoSignatureOwner m) {\n    if (typesDisabled) {\n      return null;\n    }\n    String text = \"\";\n    if (m instanceof GoMethodDeclaration) {\n      text = GoPsiImplUtil.getText(((GoMethodDeclaration)m).getReceiverType());\n    }\n    else if (m instanceof GoMethodSpec) {\n      PsiElement parent = m.getParent();\n      if (parent instanceof GoInterfaceType) {\n        text = GoPsiImplUtil.getText((GoInterfaceType)parent);\n      }\n    }\n    return StringUtil.isNotEmpty(text) ? \" \" + UIUtil.rightArrow() + \" \" + text : null;\n  }\n\n  @NotNull\n  public static LookupElement createTypeLookupElement(@NotNull GoTypeSpec t) {\n    return createTypeLookupElement(t, StringUtil.notNullize(t.getName()), null, null, TYPE_PRIORITY);\n  }\n\n  @NotNull\n  public static LookupElement createTypeLookupElement(@NotNull GoTypeSpec t,\n                                                      @NotNull String lookupString,\n                                                      @Nullable InsertHandler<LookupElement> handler,\n                                                      @Nullable String importPath,\n                                                      double priority) {\n    LookupElementBuilder builder = LookupElementBuilder.createWithSmartPointer(lookupString, t)\n      .withInsertHandler(handler).withIcon(GoIcons.TYPE);\n    if (importPath != null) builder = builder.withTailText(\" \" + importPath, true);\n    return PrioritizedLookupElement.withPriority(builder, priority);\n  }\n\n  @NotNull\n  public static LookupElement createLabelLookupElement(@NotNull GoLabelDefinition l, @NotNull String lookupString) {\n    return PrioritizedLookupElement.withPriority(LookupElementBuilder.createWithSmartPointer(lookupString, l).withIcon(GoIcons.LABEL),\n                                                 LABEL_PRIORITY);\n  }\n\n  @NotNull\n  public static LookupElement createTypeConversionLookupElement(@NotNull GoTypeSpec t) {\n    return createTypeConversionLookupElement(t, StringUtil.notNullize(t.getName()), null, null, TYPE_CONVERSION);\n  }\n\n  @NotNull\n  public static LookupElement createTypeConversionLookupElement(@NotNull GoTypeSpec t,\n                                                                @NotNull String lookupString,\n                                                                @Nullable InsertHandler<LookupElement> insertHandler,\n                                                                @Nullable String importPath,\n                                                                double priority) {\n    // todo: check context and place caret in or outside {}\n    InsertHandler<LookupElement> handler = ObjectUtils.notNull(insertHandler, Lazy.TYPE_CONVERSION_INSERT_HANDLER);\n    return createTypeLookupElement(t, lookupString, handler, importPath, priority);\n  }\n\n  @Nullable\n  public static LookupElement createFieldLookupElement(@NotNull GoFieldDefinition v) {\n    String name = v.getName();\n    if (StringUtil.isEmpty(name)) return null;\n    return createVariableLikeLookupElement(v, name, Lazy.FIELD_DEFINITION_INSERT_HANDLER, FIELD_PRIORITY);\n  }\n\n  @Nullable\n  public static LookupElement createVariableLikeLookupElement(@NotNull GoNamedElement v) {\n    String name = v.getName();\n    if (StringUtil.isEmpty(name)) return null;\n    return createVariableLikeLookupElement(v, name, Lazy.VARIABLE_OR_FUNCTION_INSERT_HANDLER, VAR_PRIORITY);\n  }\n\n  @NotNull\n  public static LookupElement createVariableLikeLookupElement(@NotNull GoNamedElement v, @NotNull String lookupString,\n                                                              @Nullable InsertHandler<LookupElement> insertHandler,\n                                                              double priority) {\n    return PrioritizedLookupElement.withPriority(LookupElementBuilder.createWithSmartPointer(lookupString, v)\n                                                   .withRenderer(Lazy.VARIABLE_RENDERER)\n                                                   .withInsertHandler(insertHandler), priority);\n  }\n\n  @Nullable\n  private static String calcTailTextForFields(@NotNull GoNamedElement v) {\n    String name = null;\n    if (v instanceof GoFieldDefinition) {\n      GoFieldDefinitionStub stub = ((GoFieldDefinition)v).getStub();\n      GoTypeSpec spec = stub != null ? stub.getParentStubOfType(GoTypeSpec.class) : PsiTreeUtil.getParentOfType(v, GoTypeSpec.class);\n      name = spec != null ? spec.getName() : null;\n    }\n    return StringUtil.isNotEmpty(name) ? \" \" + UIUtil.rightArrow() + \" \" + name : null;\n  }\n\n  @Nullable\n  public static LookupElement createPackageLookupElement(@NotNull GoImportSpec spec, @Nullable String name, boolean vendoringEnabled) {\n    name = name != null ? name : ObjectUtils.notNull(spec.getAlias(), spec.getLocalPackageName());\n    return createPackageLookupElement(name, spec.getImportString().resolve(), spec, vendoringEnabled, true);\n  }\n\n  @NotNull\n  public static LookupElement createPackageLookupElement(@NotNull String importPath,\n                                                         @Nullable PsiDirectory directory,\n                                                         @Nullable PsiElement context,\n                                                         boolean vendoringEnabled,\n                                                         boolean forType) {\n    return createPackageLookupElement(importPath, getContextImportPath(context, vendoringEnabled), directory, forType);\n  }\n\n  @NotNull\n  public static LookupElement createPackageLookupElement(@NotNull String importPath, @Nullable String contextImportPath,\n                                                         @Nullable PsiDirectory directory, boolean forType) {\n    LookupElementBuilder builder = directory != null\n                                   ? LookupElementBuilder.create(directory, importPath)\n                                   : LookupElementBuilder.create(importPath);\n    return PrioritizedLookupElement.withPriority(builder.withLookupString(importPath.substring(Math.max(0, importPath.lastIndexOf('/'))))\n                                                   .withIcon(GoIcons.PACKAGE)\n                                                   .withInsertHandler(forType ? Lazy.PACKAGE_INSERT_HANDLER : null),\n                                                 calculatePackagePriority(importPath, contextImportPath));\n  }\n\n  public static int calculatePackagePriority(@NotNull String importPath, @Nullable String currentPath) {\n    int priority = PACKAGE_PRIORITY;\n    if (StringUtil.isNotEmpty(currentPath)) {\n      String[] givenSplit = importPath.split(\"/\");\n      String[] contextSplit = currentPath.split(\"/\");\n      for (int i = 0; i < contextSplit.length && i < givenSplit.length; i++) {\n        if (contextSplit[i].equals(givenSplit[i])) {\n          priority++;\n        }\n        else {\n          break;\n        }\n      }\n    }\n    return priority - StringUtil.countChars(importPath, '/') - StringUtil.countChars(importPath, '.');\n  }\n\n  @Nullable\n  public static String getContextImportPath(@Nullable PsiElement context, boolean vendoringEnabled) {\n    if (context == null) return null;\n    String currentPath = null;\n    if (context instanceof PsiDirectory) {\n      currentPath = GoSdkUtil.getImportPath((PsiDirectory)context, vendoringEnabled);\n    }\n    else {\n      PsiFile file = context.getContainingFile();\n      if (file instanceof GoFile) {\n        currentPath = ((GoFile)file).getImportPath(vendoringEnabled);\n      }\n    }\n    return currentPath;\n  }\n\n  @NotNull\n  public static LookupElementBuilder createDirectoryLookupElement(@NotNull PsiDirectory dir) {\n    return LookupElementBuilder.createWithSmartPointer(dir.getName(), dir).withIcon(GoIcons.DIRECTORY)\n      .withInsertHandler(dir.getFiles().length == 0 ? Lazy.DIR_INSERT_HANDLER : null);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/completion/GoImportPathsCompletionProvider.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.completion;\n\nimport com.goide.GoFileType;\nimport com.goide.project.GoExcludedPathsSettings;\nimport com.goide.project.GoVendoringUtil;\nimport com.goide.psi.GoFile;\nimport com.goide.psi.GoImportString;\nimport com.goide.psi.impl.GoPsiImplUtil;\nimport com.goide.runconfig.testing.GoTestFinder;\nimport com.goide.util.GoUtil;\nimport com.intellij.codeInsight.completion.CompletionParameters;\nimport com.intellij.codeInsight.completion.CompletionProvider;\nimport com.intellij.codeInsight.completion.CompletionResultSet;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.module.ModuleUtilCore;\nimport com.intellij.openapi.progress.ProgressManager;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.TextRange;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.psi.PsiDirectory;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.PsiManager;\nimport com.intellij.psi.search.FileTypeIndex;\nimport com.intellij.psi.search.GlobalSearchScope;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport com.intellij.util.ProcessingContext;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoImportPathsCompletionProvider extends CompletionProvider<CompletionParameters> {\n  @Override\n  protected void addCompletions(@NotNull CompletionParameters parameters, ProcessingContext context, @NotNull CompletionResultSet result) {\n    GoImportString importString = PsiTreeUtil.getParentOfType(parameters.getPosition(), GoImportString.class);\n    if (importString == null) return;\n    String path = importString.getPath();\n    if (path.startsWith(\"./\") || path.startsWith(\"../\")) return;\n\n    TextRange pathRange = importString.getPathTextRange().shiftRight(importString.getTextRange().getStartOffset());\n    String newPrefix = parameters.getEditor().getDocument().getText(TextRange.create(pathRange.getStartOffset(), parameters.getOffset()));\n    result = result.withPrefixMatcher(result.getPrefixMatcher().cloneWithPrefix(newPrefix));\n\n    Module module = ModuleUtilCore.findModuleForPsiElement(parameters.getOriginalFile());\n    if (module != null) {\n      addCompletions(result, module, parameters.getOriginalFile(), GoUtil.goPathResolveScope(module, parameters.getOriginalFile()), false);\n    }\n  }\n\n  public static void addCompletions(@NotNull CompletionResultSet result,\n                                    @NotNull Module module,\n                                    @Nullable PsiElement context,\n                                    @NotNull GlobalSearchScope scope,\n                                    boolean allowMain) {\n    Project project = module.getProject();\n    boolean vendoringEnabled = GoVendoringUtil.isVendoringEnabled(module);\n    String contextImportPath = GoCompletionUtil.getContextImportPath(context, vendoringEnabled);\n    GoExcludedPathsSettings excludedSettings = GoExcludedPathsSettings.getInstance(project);\n    PsiFile contextFile = context != null ? context.getContainingFile() : null;\n    boolean testFileWithTestPackage = GoTestFinder.isTestFileWithTestPackage(contextFile);\n    for (VirtualFile file : FileTypeIndex.getFiles(GoFileType.INSTANCE, scope)) {\n      ProgressManager.checkCanceled();\n      PsiFile psiFile = PsiManager.getInstance(project).findFile(file);\n      if (!(psiFile instanceof GoFile)) continue;\n      \n      PsiDirectory directory = psiFile.getContainingDirectory();\n      if (directory == null) continue;\n\n      GoFile goFile = (GoFile)psiFile;\n      if (!GoPsiImplUtil.canBeAutoImported(goFile, allowMain, module)) continue;\n      \n      String importPath = goFile.getImportPath(vendoringEnabled);\n      if (StringUtil.isNotEmpty(importPath) && !excludedSettings.isExcluded(importPath) \n          && (testFileWithTestPackage || !importPath.equals(contextImportPath))) {\n        result.addElement(GoCompletionUtil.createPackageLookupElement(importPath, contextImportPath, directory, false));\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/completion/GoKeywordCompletionContributor.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.completion;\n\nimport com.goide.GoTypes;\nimport com.goide.psi.*;\nimport com.goide.psi.impl.GoPsiImplUtil;\nimport com.goide.template.GoLiveTemplateContextType;\nimport com.intellij.codeInsight.completion.*;\nimport com.intellij.codeInsight.lookup.AutoCompletionPolicy;\nimport com.intellij.codeInsight.lookup.LookupElement;\nimport com.intellij.openapi.project.DumbAware;\nimport com.intellij.patterns.*;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiErrorElement;\nimport com.intellij.psi.tree.IElementType;\nimport com.intellij.psi.tree.TokenSet;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport com.intellij.util.ProcessingContext;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.Collection;\n\nimport static com.goide.completion.GoCompletionUtil.CONTEXT_KEYWORD_PRIORITY;\nimport static com.goide.completion.GoCompletionUtil.KEYWORD_PRIORITY;\nimport static com.goide.completion.GoKeywordCompletionProvider.EMPTY_INSERT_HANDLER;\nimport static com.intellij.patterns.PlatformPatterns.psiElement;\nimport static com.intellij.patterns.PlatformPatterns.psiFile;\nimport static com.intellij.patterns.StandardPatterns.*;\n\npublic class GoKeywordCompletionContributor extends CompletionContributor implements DumbAware {\n  private static final InsertHandler<LookupElement> ADD_BRACKETS_INSERT_HANDLER = new AddBracketsInsertHandler();\n\n  public GoKeywordCompletionContributor() {\n    extend(CompletionType.BASIC, packagePattern(), new GoKeywordCompletionProvider(KEYWORD_PRIORITY,\n                                                                                   AutoCompletionPolicy.ALWAYS_AUTOCOMPLETE, \"package\"));\n    extend(CompletionType.BASIC, importPattern(), new GoKeywordCompletionProvider(KEYWORD_PRIORITY, \"import\"));\n    extend(CompletionType.BASIC, topLevelPattern(), new GoKeywordCompletionProvider(KEYWORD_PRIORITY, \"const\", \"var\", \"func\", \"type\"));\n    extend(CompletionType.BASIC, insideBlockPattern(GoTypes.IDENTIFIER),\n           new GoKeywordCompletionProvider(KEYWORD_PRIORITY, \"type\", \"for\", \"const\", \"var\", \"return\", \"if\", \"switch\", \"go\", \"defer\",\n                                           \"goto\"));\n    extend(CompletionType.BASIC, insideBlockPattern(GoTypes.IDENTIFIER),\n           new GoKeywordCompletionProvider(KEYWORD_PRIORITY, EMPTY_INSERT_HANDLER, \"fallthrough\"));\n    extend(CompletionType.BASIC, insideBlockPattern(GoTypes.IDENTIFIER),\n           new GoKeywordCompletionProvider(KEYWORD_PRIORITY, BracesInsertHandler.INSTANCE, \"select\"));\n    extend(CompletionType.BASIC, typeDeclaration(),\n           new GoKeywordCompletionProvider(KEYWORD_PRIORITY, BracesInsertHandler.INSTANCE, \"interface\", \"struct\"));\n    extend(CompletionType.BASIC, typeExpression(),\n           new GoKeywordCompletionProvider(KEYWORD_PRIORITY, BracesInsertHandler.ONE_LINER, \"interface\", \"struct\"));\n    extend(CompletionType.BASIC, insideForStatement(GoTypes.IDENTIFIER),\n           new GoKeywordCompletionProvider(CONTEXT_KEYWORD_PRIORITY, EMPTY_INSERT_HANDLER, \"continue\"));\n    extend(CompletionType.BASIC, insideBreakStatementOwner(GoTypes.IDENTIFIER),\n           new GoKeywordCompletionProvider(CONTEXT_KEYWORD_PRIORITY, EMPTY_INSERT_HANDLER, \"break\"));\n    extend(CompletionType.BASIC, typeExpression(), new GoKeywordCompletionProvider(CONTEXT_KEYWORD_PRIORITY, \"chan\"));\n    extend(CompletionType.BASIC, typeExpression(), new GoKeywordCompletionProvider(CONTEXT_KEYWORD_PRIORITY,\n                                                                                   ADD_BRACKETS_INSERT_HANDLER, \"map\"));\n\n    extend(CompletionType.BASIC, referenceExpression(), new GoKeywordCompletionProvider(CONTEXT_KEYWORD_PRIORITY,\n                                                                                        ADD_BRACKETS_INSERT_HANDLER, \"map\"));\n\n    extend(CompletionType.BASIC, afterIfBlock(GoTypes.IDENTIFIER), new GoKeywordCompletionProvider(CONTEXT_KEYWORD_PRIORITY, \"else\"));\n    extend(CompletionType.BASIC, afterElseKeyword(), new GoKeywordCompletionProvider(CONTEXT_KEYWORD_PRIORITY, \"if\"));\n    extend(CompletionType.BASIC, insideSwitchStatement(), new GoKeywordCompletionProvider(CONTEXT_KEYWORD_PRIORITY, \"case\", \"default\"));\n    extend(CompletionType.BASIC, rangeClause(), new GoKeywordCompletionProvider(CONTEXT_KEYWORD_PRIORITY,\n                                                                                AddSpaceInsertHandler.INSTANCE_WITH_AUTO_POPUP, \"range\"));\n  }\n\n  @Override\n  public void fillCompletionVariants(@NotNull CompletionParameters parameters, @NotNull CompletionResultSet result) {\n    super.fillCompletionVariants(parameters, result);\n    PsiElement position = parameters.getPosition();\n    if (insideGoOrDeferStatements().accepts(position) || anonymousFunction().accepts(position)) {\n      InsertHandler<LookupElement> insertHandler = GoKeywordCompletionProvider.createTemplateBasedInsertHandler(\"go_lang_anonymous_func\");\n      result.addElement(GoKeywordCompletionProvider.createKeywordLookupElement(\"func\", CONTEXT_KEYWORD_PRIORITY, insertHandler));\n    }\n    if (referenceExpression().accepts(position)) {\n      InsertHandler<LookupElement> insertHandler = GoKeywordCompletionProvider.createTemplateBasedInsertHandler(\"go_lang_anonymous_struct\");\n      result.addElement(GoKeywordCompletionProvider.createKeywordLookupElement(\"struct\", CONTEXT_KEYWORD_PRIORITY, insertHandler));\n    }\n  }\n\n  private static ElementPattern<? extends PsiElement> afterIfBlock(@NotNull IElementType tokenType) {\n    PsiElementPattern.Capture<GoStatement> statement =\n      psiElement(GoStatement.class).afterSiblingSkipping(psiElement().whitespaceCommentEmptyOrError(), psiElement(GoIfStatement.class));\n    PsiElementPattern.Capture<GoLeftHandExprList> lh = psiElement(GoLeftHandExprList.class).withParent(statement);\n    return psiElement(tokenType).withParent(psiElement(GoReferenceExpressionBase.class).with(new GoNonQualifiedReference()).withParent(lh))\n      .andNot(afterElseKeyword()).afterLeaf(psiElement(GoTypes.RBRACE));\n  }\n\n  private static ElementPattern<? extends PsiElement> rangeClause() {\n    return psiElement(GoTypes.IDENTIFIER).andOr(\n      // for a := ran<caret> | for a = ran<caret>\n      psiElement().withParent(psiElement(GoReferenceExpression.class).withParent(GoRangeClause.class).afterLeaf(\"=\", \":=\")),\n      // for ran<caret>\n      psiElement().afterLeaf(psiElement(GoTypes.FOR))\n    );\n  }\n\n  private static ElementPattern<? extends PsiElement> afterElseKeyword() {\n    return psiElement(GoTypes.IDENTIFIER).afterLeafSkipping(psiElement().whitespaceCommentEmptyOrError(), psiElement(GoTypes.ELSE));\n  }\n\n  private static ElementPattern<? extends PsiElement> insideForStatement(@NotNull IElementType tokenType) {\n    return insideBlockPattern(tokenType).inside(false, psiElement(GoForStatement.class), psiElement(GoFunctionLit.class));\n  }\n  \n  private static ElementPattern<? extends PsiElement> insideBreakStatementOwner(@NotNull IElementType tokenType) {\n    return insideBlockPattern(tokenType).with(new InsideBreakStatementOwner());\n  }\n\n  private static ElementPattern<? extends PsiElement> insideConstSpec() {\n    return psiElement().inside(false, psiElement(GoConstSpec.class), psiElement(GoStatement.class));\n  }\n\n  private static PsiElementPattern.Capture<PsiElement> insideSelectorExpression() {\n    return psiElement().inside(true, psiElement(GoSelectorExpr.class), psiElement(GoStatement.class));\n  }\n\n  private static ElementPattern<? extends PsiElement> typeExpression() {\n    return psiElement(GoTypes.IDENTIFIER).withParent(\n      psiElement(GoTypeReferenceExpression.class)\n        .with(new GoNonQualifiedReference())\n        .with(new GoNotInsideReceiver()));\n  }\n\n  private static ElementPattern<? extends PsiElement> referenceExpression() {\n    return psiElement(GoTypes.IDENTIFIER).withParent(\n      psiElement(GoReferenceExpression.class)\n        .andNot(insideConstSpec())\n        .andNot(insideSelectorExpression())\n        .without(new FieldNameInStructLiteral())\n        .withParent(not(psiElement(GoSelectorExpr.class))).with(new GoNonQualifiedReference()));\n  }\n\n  private static ElementPattern<? extends PsiElement> insideSwitchStatement() {\n    return onStatementBeginning(GoTypes.IDENTIFIER, GoTypes.CASE, GoTypes.DEFAULT)\n      .inside(false, psiElement(GoCaseClause.class), psiElement(GoFunctionLit.class));\n  }\n\n  private static ElementPattern<? extends PsiElement> typeDeclaration() {\n    return psiElement(GoTypes.IDENTIFIER)\n      .withParent(psiElement(GoTypeReferenceExpression.class).withParent(psiElement(GoType.class).withParent(GoSpecType.class)));\n  }\n\n  private static PsiElementPattern.Capture<PsiElement> insideGoOrDeferStatements() {\n    return psiElement(GoTypes.IDENTIFIER)\n      .withParent(psiElement(GoExpression.class).withParent(or(psiElement(GoDeferStatement.class), psiElement(GoGoStatement.class))));\n  }\n\n  private static ElementPattern<? extends PsiElement> anonymousFunction() {\n    return and(referenceExpression(),\n               psiElement().withParent(psiElement(GoReferenceExpression.class)\n                                         .withParent(or(psiElement(GoArgumentList.class), not(psiElement(GoLeftHandExprList.class))))));\n  }\n\n  private static PsiElementPattern.Capture<PsiElement> insideBlockPattern(@NotNull IElementType tokenType) {\n    return onStatementBeginning(tokenType)\n      .withParent(psiElement(GoExpression.class).withParent(psiElement(GoLeftHandExprList.class).withParent(\n        psiElement(GoStatement.class).inside(GoBlock.class))));\n  }\n\n  private static PsiElementPattern.Capture<PsiElement> topLevelPattern() {\n    return onStatementBeginning(GoTypes.IDENTIFIER).withParent(\n      or(psiElement(PsiErrorElement.class).withParent(goFileWithPackage()), psiElement(GoFile.class)));\n  }\n\n  private static PsiElementPattern.Capture<PsiElement> importPattern() {\n    return onStatementBeginning(GoTypes.IDENTIFIER).withParent(psiElement(GoFile.class))\n      .afterSiblingSkipping(psiElement().whitespaceCommentOrError(), psiElement(GoImportList.class));\n  }\n\n  private static PsiElementPattern.Capture<PsiElement> packagePattern() {\n    return psiElement(GoTypes.IDENTIFIER)\n      .withParent(psiElement(PsiErrorElement.class).withParent(goFileWithoutPackage()).isFirstAcceptedChild(psiElement()));\n  }\n\n  private static PsiElementPattern.Capture<PsiElement> onStatementBeginning(@NotNull IElementType... tokenTypes) {\n    return psiElement().withElementType(TokenSet.create(tokenTypes)).with(new OnStatementBeginning());\n  }\n\n  private static PsiFilePattern.Capture<GoFile> goFileWithPackage() {\n    CollectionPattern<PsiElement> collection = collection(PsiElement.class);\n    CollectionPattern<PsiElement> packageIsFirst = collection.first(psiElement(GoTypes.PACKAGE_CLAUSE));\n    return psiFile(GoFile.class).withChildren(collection.filter(not(psiElement().whitespaceCommentEmptyOrError()),\n                                                                packageIsFirst));\n  }\n\n  private static PsiFilePattern.Capture<GoFile> goFileWithoutPackage() {\n    CollectionPattern<PsiElement> collection = collection(PsiElement.class);\n    ElementPattern<Collection<PsiElement>> emptyOrPackageIsNotFirst = or(collection.empty(),\n                                                                         collection.first(not(psiElement(GoTypes.PACKAGE_CLAUSE))));\n    return psiFile(GoFile.class).withChildren(collection.filter(not(psiElement().whitespaceCommentEmptyOrError()),\n                                                                emptyOrPackageIsNotFirst));\n  }\n\n  private static class GoNonQualifiedReference extends PatternCondition<GoReferenceExpressionBase> {\n    public GoNonQualifiedReference() {\n      super(\"non qualified type\");\n    }\n\n    @Override\n    public boolean accepts(@NotNull GoReferenceExpressionBase element, ProcessingContext context) {\n      return element.getQualifier() == null;\n    }\n  }\n\n  private static class GoNotInsideReceiver extends PatternCondition<GoReferenceExpressionBase> {\n    public GoNotInsideReceiver() {\n      super(\"noi inside receiver\");\n    }\n\n    @Override\n    public boolean accepts(@NotNull GoReferenceExpressionBase element, ProcessingContext context) {\n      return PsiTreeUtil.getParentOfType(element, GoReceiver.class) == null;\n    }\n  }\n  \n  private static class FieldNameInStructLiteral extends PatternCondition<GoReferenceExpression> {\n    public FieldNameInStructLiteral() {\n      super(\"field name in struct literal\");\n    }\n\n    @Override\n    public boolean accepts(@NotNull GoReferenceExpression expression, ProcessingContext context) {\n      GoStructLiteralCompletion.Variants variants = GoStructLiteralCompletion.allowedVariants(expression);\n      return variants == GoStructLiteralCompletion.Variants.FIELD_NAME_ONLY;\n    }\n  }\n\n  private static class OnStatementBeginning extends PatternCondition<PsiElement> {\n    public OnStatementBeginning() {\n      super(\"on statement beginning\");\n    }\n\n    @Override\n    public boolean accepts(@NotNull PsiElement psiElement, ProcessingContext context) {\n      return GoLiveTemplateContextType.Statement.onStatementBeginning(psiElement);   \n    }\n  }\n\n  private static class InsideBreakStatementOwner extends PatternCondition<PsiElement> {\n    public InsideBreakStatementOwner() {super(\"inside break statement owner\");}\n\n    @Override\n    public boolean accepts(@NotNull PsiElement element, ProcessingContext context) {\n      return GoPsiImplUtil.getBreakStatementOwner(element) != null;\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/completion/GoKeywordCompletionProvider.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.completion;\n\nimport com.intellij.codeInsight.completion.*;\nimport com.intellij.codeInsight.lookup.AutoCompletionPolicy;\nimport com.intellij.codeInsight.lookup.LookupElement;\nimport com.intellij.codeInsight.lookup.LookupElementBuilder;\nimport com.intellij.codeInsight.template.Template;\nimport com.intellij.codeInsight.template.TemplateManager;\nimport com.intellij.codeInsight.template.impl.TemplateSettings;\nimport com.intellij.openapi.editor.Editor;\nimport com.intellij.openapi.editor.EditorModificationUtil;\nimport com.intellij.util.ObjectUtils;\nimport com.intellij.util.ProcessingContext;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoKeywordCompletionProvider extends CompletionProvider<CompletionParameters> {\n  public static final InsertHandler<LookupElement> EMPTY_INSERT_HANDLER = (context, element) -> {\n\n  };\n\n  private final int myPriority;\n  @Nullable private final InsertHandler<LookupElement> myInsertHandler;\n  @Nullable private final AutoCompletionPolicy myCompletionPolicy;\n  @NotNull private final String[] myKeywords;\n\n  public GoKeywordCompletionProvider(int priority, String... keywords) {\n    this(priority, null, null, keywords);\n  }\n\n  public GoKeywordCompletionProvider(int priority, @Nullable AutoCompletionPolicy completionPolicy, @NotNull String... keywords) {\n    this(priority, null, completionPolicy, keywords);\n  }\n\n  public GoKeywordCompletionProvider(int priority, @Nullable InsertHandler<LookupElement> insertHandler, @NotNull String... keywords) {\n    this(priority, insertHandler, null, keywords);\n  }\n\n  private GoKeywordCompletionProvider(int priority,\n                                      @Nullable InsertHandler<LookupElement> insertHandler,\n                                      @Nullable AutoCompletionPolicy completionPolicy,\n                                      @NotNull String... keywords) {\n    myPriority = priority;\n    myInsertHandler = insertHandler;\n    myCompletionPolicy = completionPolicy;\n    myKeywords = keywords;\n  }\n\n  @Override\n  protected void addCompletions(@NotNull CompletionParameters parameters, ProcessingContext context, @NotNull CompletionResultSet result) {\n    for (String keyword : myKeywords) {\n      result.addElement(createKeywordLookupElement(keyword));\n    }\n  }\n\n  @NotNull\n  private LookupElement createKeywordLookupElement(@NotNull String keyword) {\n    InsertHandler<LookupElement> insertHandler = ObjectUtils.chooseNotNull(myInsertHandler,\n                                                                                 createTemplateBasedInsertHandler(\"go_lang_\" + keyword));\n    LookupElement result = createKeywordLookupElement(keyword, myPriority, insertHandler);\n    return myCompletionPolicy != null ? myCompletionPolicy.applyPolicy(result) : result;\n  }\n\n  public static LookupElement createKeywordLookupElement(@NotNull String keyword,\n                                                         int priority,\n                                                         @Nullable InsertHandler<LookupElement> insertHandler) {\n    LookupElementBuilder builder = LookupElementBuilder.create(keyword).withBoldness(true).withInsertHandler(insertHandler);\n    return PrioritizedLookupElement.withPriority(builder, priority);\n  }\n\n  @Nullable\n  public static InsertHandler<LookupElement> createTemplateBasedInsertHandler(@NotNull String templateId) {\n    return (context, item) -> {\n      Template template = TemplateSettings.getInstance().getTemplateById(templateId);\n      Editor editor = context.getEditor();\n      if (template != null) {\n        editor.getDocument().deleteString(context.getStartOffset(), context.getTailOffset());\n        TemplateManager.getInstance(context.getProject()).startTemplate(editor, template);\n      }\n      else {\n        int currentOffset = editor.getCaretModel().getOffset();\n        CharSequence documentText = editor.getDocument().getImmutableCharSequence();\n        if (documentText.length() <= currentOffset || documentText.charAt(currentOffset) != ' ') {\n          EditorModificationUtil.insertStringAtCaret(editor, \" \");\n        }\n        else {\n          EditorModificationUtil.moveCaretRelatively(editor, 1);\n        }\n      }\n    };\n  }\n}\n"
  },
  {
    "path": "src/com/goide/completion/GoReferenceCompletionProvider.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.completion;\n\nimport com.goide.project.GoVendoringUtil;\nimport com.goide.psi.*;\nimport com.goide.psi.impl.*;\nimport com.intellij.codeInsight.completion.CompletionParameters;\nimport com.intellij.codeInsight.completion.CompletionProvider;\nimport com.intellij.codeInsight.completion.CompletionResultSet;\nimport com.intellij.codeInsight.lookup.LookupElement;\nimport com.intellij.openapi.module.ModuleUtilCore;\nimport com.intellij.psi.*;\nimport com.intellij.psi.impl.source.resolve.reference.impl.PsiMultiReference;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport com.intellij.util.ArrayUtil;\nimport com.intellij.util.ObjectUtils;\nimport com.intellij.util.ProcessingContext;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.Set;\n\nimport static com.goide.completion.GoCompletionUtil.createPrefixMatcher;\n\npublic class GoReferenceCompletionProvider extends CompletionProvider<CompletionParameters> {\n  @Override\n  protected void addCompletions(@NotNull CompletionParameters parameters, ProcessingContext context, @NotNull CompletionResultSet set) {\n    GoReferenceExpressionBase expression = PsiTreeUtil.getParentOfType(parameters.getPosition(), GoReferenceExpressionBase.class);\n    PsiFile originalFile = parameters.getOriginalFile();\n    if (expression != null) {\n      fillVariantsByReference(expression.getReference(), originalFile, set.withPrefixMatcher(createPrefixMatcher(set.getPrefixMatcher())));\n    }\n    PsiElement parent = parameters.getPosition().getParent();\n    if (parent != null) {\n      fillVariantsByReference(parent.getReference(), originalFile, set.withPrefixMatcher(createPrefixMatcher(set.getPrefixMatcher())));\n    }\n  }\n\n  private static void fillVariantsByReference(@Nullable PsiReference reference,\n                                              @NotNull PsiFile file,\n                                              @NotNull CompletionResultSet result) {\n    if (reference == null) return;\n    if (reference instanceof PsiMultiReference) {\n      PsiReference[] references = ((PsiMultiReference)reference).getReferences();\n      ContainerUtil.sort(references, PsiMultiReference.COMPARATOR);\n      fillVariantsByReference(ArrayUtil.getFirstElement(references), file, result);\n    }\n    else if (reference instanceof GoReference) {\n      GoReferenceExpression refExpression = ObjectUtils.tryCast(reference.getElement(), GoReferenceExpression.class);\n      GoStructLiteralCompletion.Variants variants = GoStructLiteralCompletion.allowedVariants(refExpression);\n\n      fillStructFieldNameVariants(file, result, variants, refExpression);\n\n      if (variants != GoStructLiteralCompletion.Variants.FIELD_NAME_ONLY) {\n        ((GoReference)reference).processResolveVariants(new MyGoScopeProcessor(result, file, false));\n      }\n    }\n    else if (reference instanceof GoTypeReference) {\n      PsiElement element = reference.getElement();\n      PsiElement spec = PsiTreeUtil.getParentOfType(element, GoFieldDeclaration.class, GoTypeSpec.class);\n      boolean insideParameter = PsiTreeUtil.getParentOfType(element, GoParameterDeclaration.class) != null;\n      ((GoTypeReference)reference).processResolveVariants(new MyGoScopeProcessor(result, file, true) {\n        @Override\n        protected boolean accept(@NotNull PsiElement e) {\n          return e != spec && !(insideParameter &&\n                                (e instanceof GoNamedSignatureOwner || e instanceof GoVarDefinition || e instanceof GoConstDefinition));\n        }\n      });\n    }\n    else if (reference instanceof GoCachedReference) {\n      ((GoCachedReference)reference).processResolveVariants(new MyGoScopeProcessor(result, file, false));\n    }\n  }\n\n  private static void fillStructFieldNameVariants(@NotNull PsiFile file,\n                                                  @NotNull CompletionResultSet result,\n                                                  @NotNull GoStructLiteralCompletion.Variants variants,\n                                                  @Nullable GoReferenceExpression refExpression) {\n    if (refExpression == null ||\n        variants != GoStructLiteralCompletion.Variants.FIELD_NAME_ONLY &&\n        variants != GoStructLiteralCompletion.Variants.BOTH) {\n      return;\n    }\n\n    GoLiteralValue literal = PsiTreeUtil.getParentOfType(refExpression, GoLiteralValue.class);\n    new GoFieldNameReference(refExpression).processResolveVariants(new MyGoScopeProcessor(result, file, false) {\n      final Set<String> alreadyAssignedFields = GoStructLiteralCompletion.alreadyAssignedFields(literal);\n\n      @Override\n      public boolean execute(@NotNull PsiElement o, @NotNull ResolveState state) {\n        String structFieldName = o instanceof GoFieldDefinition ? ((GoFieldDefinition)o).getName() :\n                                 o instanceof GoAnonymousFieldDefinition ? ((GoAnonymousFieldDefinition)o).getName() : null;\n        if (structFieldName != null && alreadyAssignedFields.contains(structFieldName)) {\n          return true;\n        }\n        return super.execute(o, state);\n      }\n    });\n  }\n\n  private static void addElement(@NotNull PsiElement o,\n                                 @NotNull ResolveState state,\n                                 boolean forTypes,\n                                 boolean vendoringEnabled,\n                                 @NotNull Set<String> processedNames,\n                                 @NotNull CompletionResultSet set) {\n    LookupElement lookup = createLookupElement(o, state, forTypes, vendoringEnabled);\n    if (lookup != null) {\n      String lookupString = lookup.getLookupString();\n      if (!processedNames.contains(lookupString)) {\n        set.addElement(lookup);\n        processedNames.add(lookupString);\n      }\n    }\n  }\n\n  @Nullable\n  private static LookupElement createLookupElement(@NotNull PsiElement o,\n                                                   @NotNull ResolveState state,\n                                                   boolean forTypes,\n                                                   boolean vendoringEnabled) {\n    if (o instanceof GoNamedElement && !((GoNamedElement)o).isBlank() || o instanceof GoImportSpec && !((GoImportSpec)o).isDot()) {\n      if (o instanceof GoImportSpec) {\n        return GoCompletionUtil.createPackageLookupElement((GoImportSpec)o, state.get(GoReferenceBase.ACTUAL_NAME), vendoringEnabled);\n      }\n      else if (o instanceof GoNamedSignatureOwner && ((GoNamedSignatureOwner)o).getName() != null) {\n        String name = ((GoNamedSignatureOwner)o).getName();\n        if (name != null) {\n          return GoCompletionUtil.createFunctionOrMethodLookupElement((GoNamedSignatureOwner)o, name, null,\n                                                                      GoCompletionUtil.FUNCTION_PRIORITY);\n        }\n      }\n      else if (o instanceof GoTypeSpec) {\n        return forTypes\n               ? GoCompletionUtil.createTypeLookupElement((GoTypeSpec)o)\n               : GoCompletionUtil.createTypeConversionLookupElement((GoTypeSpec)o);\n      }\n      else if (o instanceof PsiDirectory) {\n        return GoCompletionUtil.createPackageLookupElement(((PsiDirectory)o).getName(), (PsiDirectory)o, o, vendoringEnabled, true);\n      }\n      else if (o instanceof GoLabelDefinition) {\n        String name = ((GoLabelDefinition)o).getName();\n        if (name != null) return GoCompletionUtil.createLabelLookupElement((GoLabelDefinition)o, name);\n      }\n      else if (o instanceof GoFieldDefinition) {\n        return GoCompletionUtil.createFieldLookupElement((GoFieldDefinition)o);\n      }\n      else {\n        return GoCompletionUtil.createVariableLikeLookupElement((GoNamedElement)o);\n      }\n    }\n    return null;\n  }\n\n  private static class MyGoScopeProcessor extends GoScopeProcessor {\n    @NotNull private final CompletionResultSet myResult;\n    private final boolean myForTypes;\n    private final boolean myVendoringEnabled;\n    private final Set<String> myProcessedNames = ContainerUtil.newHashSet();\n\n    public MyGoScopeProcessor(@NotNull CompletionResultSet result, @NotNull PsiFile originalFile, boolean forTypes) {\n      myResult = result;\n      myForTypes = forTypes;\n      myVendoringEnabled = GoVendoringUtil.isVendoringEnabled(ModuleUtilCore.findModuleForPsiElement(originalFile));\n    }\n\n    @Override\n    public boolean execute(@NotNull PsiElement o, @NotNull ResolveState state) {\n      if (accept(o)) {\n        addElement(o, state, myForTypes, myVendoringEnabled, myProcessedNames, myResult);\n      }\n      return true;\n    }\n\n    protected boolean accept(@NotNull PsiElement e) {\n      return true;\n    }\n\n    @Override\n    public boolean isCompletion() {\n      return true;\n    }\n  }\n}\n                                                      "
  },
  {
    "path": "src/com/goide/completion/GoStructLiteralCompletion.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.completion;\n\nimport com.goide.psi.*;\nimport com.goide.psi.impl.GoPsiImplUtil;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.util.ObjectUtils;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.Contract;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.Collections;\nimport java.util.List;\nimport java.util.Set;\n\nclass GoStructLiteralCompletion {\n  /**\n   * Describes struct literal completion variants that should be suggested.\n   */\n  enum Variants {\n    /**\n     * Only struct field names should be suggested.\n     * Indicates that field:value initializers are used in this struct literal.\n     * For example, {@code Struct{field1: \"\", caret}}.\n     */\n    FIELD_NAME_ONLY,\n    /**\n     * Only values should be suggested.\n     * Indicates that value initializers are used in this struct literal.\n     * For example, {@code Struct{\"\", caret}}.\n     */\n    VALUE_ONLY,\n    /**\n     * Both struct field names and values should be suggested.\n     * Indicates that there's no reliable way to determine whether field:value or value initializers are used.\n     * Example 1: {@code Struct{caret}}.\n     * Example 2: {@code Struct{field1:\"\", \"\", caret}}\n     */\n    BOTH,\n    /**\n     * Indicates that struct literal completion should not be available.\n     */\n    NONE\n  }\n\n  @NotNull\n  static Variants allowedVariants(@Nullable GoReferenceExpression structFieldReference) {\n    GoValue value = parent(structFieldReference, GoValue.class);\n    GoElement element = parent(value, GoElement.class);\n    if (element != null && element.getKey() != null) {\n      return Variants.NONE;\n    }\n\n    GoType type = GoPsiImplUtil.getLiteralType(element, true);\n    if (!(type instanceof GoStructType)) {\n      return Variants.NONE;\n    }\n\n    boolean hasValueInitializers = false;\n    boolean hasFieldValueInitializers = false;\n\n    GoLiteralValue literalValue = parent(element, GoLiteralValue.class);\n    List<GoElement> fieldInitializers = literalValue != null ? literalValue.getElementList() : Collections.emptyList();\n    for (GoElement initializer : fieldInitializers) {\n      if (initializer == element) {\n        continue;\n      }\n\n      PsiElement colon = initializer.getColon();\n      hasFieldValueInitializers |= colon != null;\n      hasValueInitializers |= colon == null;\n    }\n\n    return hasFieldValueInitializers && !hasValueInitializers ? Variants.FIELD_NAME_ONLY :\n           !hasFieldValueInitializers && hasValueInitializers ? Variants.VALUE_ONLY :\n           Variants.BOTH;\n  }\n\n  @NotNull\n  static Set<String> alreadyAssignedFields(@Nullable GoLiteralValue literal) {\n    if (literal == null) {\n      return Collections.emptySet();\n    }\n\n    return ContainerUtil.map2SetNotNull(literal.getElementList(), element -> {\n      GoKey key = element.getKey();\n      GoFieldName fieldName = key != null ? key.getFieldName() : null;\n      PsiElement identifier = fieldName != null ? fieldName.getIdentifier() : null;\n      return identifier != null ? identifier.getText() : null;\n    });\n  }\n\n  @Contract(\"null,_->null\")\n  private static <T> T parent(@Nullable PsiElement of, @NotNull Class<T> parentClass) {\n    return ObjectUtils.tryCast(of != null ? of.getParent() : null, parentClass);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/completion/GoTestFunctionCompletionProvider.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.completion;\n\nimport com.goide.GoConstants;\nimport com.goide.psi.*;\nimport com.goide.psi.impl.GoElementFactory;\nimport com.goide.runconfig.testing.GoTestFunctionType;\nimport com.goide.runconfig.testing.frameworks.gotest.GotestGenerateAction;\nimport com.goide.sdk.GoPackageUtil;\nimport com.goide.stubs.index.GoFunctionIndex;\nimport com.goide.stubs.index.GoIdFilter;\nimport com.goide.stubs.index.GoMethodIndex;\nimport com.goide.stubs.types.GoMethodDeclarationStubElementType;\nimport com.goide.util.GoUtil;\nimport com.intellij.codeInsight.completion.*;\nimport com.intellij.codeInsight.completion.impl.CamelHumpMatcher;\nimport com.intellij.codeInsight.lookup.LookupElement;\nimport com.intellij.codeInsight.lookup.LookupElementBuilder;\nimport com.intellij.openapi.editor.Document;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.psi.PsiDirectory;\nimport com.intellij.psi.PsiDocumentManager;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.codeStyle.CodeStyleManager;\nimport com.intellij.psi.search.GlobalSearchScope;\nimport com.intellij.psi.stubs.StubIndex;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport com.intellij.util.ProcessingContext;\nimport com.intellij.util.Processor;\nimport com.intellij.util.containers.ContainerUtil;\nimport com.intellij.util.indexing.IdFilter;\nimport com.intellij.util.text.UniqueNameGenerator;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.Collection;\nimport java.util.Set;\n\npublic class GoTestFunctionCompletionProvider extends CompletionProvider<CompletionParameters> {\n  @Override\n  protected void addCompletions(@NotNull CompletionParameters parameters, ProcessingContext context, @NotNull CompletionResultSet result) {\n    Project project = parameters.getPosition().getProject();\n    PsiFile file = parameters.getOriginalFile();\n    PsiDirectory containingDirectory = file.getContainingDirectory();\n    if (file instanceof GoFile && containingDirectory != null) {\n      CompletionResultSet resultSet = result.withPrefixMatcher(new CamelHumpMatcher(result.getPrefixMatcher().getPrefix(), false));\n\n      Collection<String> allPackageFunctionNames = collectAllFunctionNames(containingDirectory);      \n      Set<String> allTestFunctionNames = collectAllTestNames(allPackageFunctionNames, project, (GoFile)file);\n      \n      String fileNameWithoutTestPrefix = StringUtil.trimEnd(file.getName(), GoConstants.TEST_SUFFIX_WITH_EXTENSION) + \".go\";\n      GlobalSearchScope packageScope = GoPackageUtil.packageScope(containingDirectory, ((GoFile)file).getCanonicalPackageName());\n      GlobalSearchScope scope = new GoUtil.ExceptTestsScope(packageScope);\n      IdFilter idFilter = GoIdFilter.getFilesFilter(scope);\n      for (String functionName : allPackageFunctionNames) {\n        GoFunctionIndex.process(functionName, project, scope, idFilter, declaration -> {\n          addVariants(declaration, functionName, fileNameWithoutTestPrefix, allTestFunctionNames, resultSet);\n          return false;\n        });\n      }\n\n      Collection<String> methodKeys = ContainerUtil.newTroveSet();\n      StubIndex.getInstance().processAllKeys(GoMethodIndex.KEY, new CancellableCollectProcessor<>(methodKeys), scope, idFilter);\n      for (String key : methodKeys) {\n        Processor<GoMethodDeclaration> processor = declaration -> {\n          GoMethodDeclarationStubElementType.calcTypeText(declaration);\n          String typeText = key.substring(Math.min(key.indexOf('.') + 1, key.length()));\n          String methodName = declaration.getName();\n          if (methodName != null) {\n            if (!declaration.isPublic() || declaration.isBlank()) {\n              return true;\n            }\n            String lookupString = !typeText.isEmpty() ? StringUtil.capitalize(typeText) + \"_\" + methodName : methodName;\n            addVariants(declaration, lookupString, fileNameWithoutTestPrefix, allTestFunctionNames, resultSet);\n          }\n          return true;\n        };\n        GoMethodIndex.process(key, project, scope, idFilter, processor);\n      }\n    }\n  }\n\n  private static void addVariants(@NotNull GoFunctionOrMethodDeclaration declaration,\n                                  @NotNull String functionName,\n                                  @NotNull String fileNameWithoutTestPrefix,\n                                  @NotNull Set<String> allTestFunctionNames,\n                                  @NotNull CompletionResultSet resultSet) {\n    int priority = fileNameWithoutTestPrefix.equals(declaration.getContainingFile().getName()) ? 5 : 0;\n    addLookupElement(GoConstants.TEST_PREFIX + functionName, priority, allTestFunctionNames, resultSet);\n    addLookupElement(GoConstants.BENCHMARK_PREFIX + functionName, priority, allTestFunctionNames, resultSet);\n    addLookupElement(GoConstants.EXAMPLE_PREFIX + functionName, priority, allTestFunctionNames, resultSet);\n  }\n\n  private static void addLookupElement(@NotNull String lookupString,\n                                       int initialPriority,\n                                       @NotNull Set<String> allTestFunctionNames,\n                                       @NotNull CompletionResultSet result) {\n    int priority = initialPriority;\n    if (allTestFunctionNames.contains(lookupString)) {\n      priority -= 5;\n      lookupString = UniqueNameGenerator.generateUniqueName(lookupString, allTestFunctionNames);\n    }\n    result.addElement(PrioritizedLookupElement.withPriority(LookupElementBuilder.create(lookupString)\n                                                              .withInsertHandler(GenerateTestInsertHandler.INSTANCE), priority));\n  }\n\n  @NotNull\n  private static Set<String> collectAllFunctionNames(@NotNull PsiDirectory directory) {\n    GlobalSearchScope packageScope = GoPackageUtil.packageScope(directory, null);\n    IdFilter packageIdFilter = GoIdFilter.getFilesFilter(packageScope);\n    \n    Set<String> result = ContainerUtil.newHashSet();\n    StubIndex.getInstance().processAllKeys(GoFunctionIndex.KEY, new CancellableCollectProcessor<String>(result) {\n      @Override\n      protected boolean accept(String s) {\n        return !\"_\".equals(s) && StringUtil.isCapitalized(s);\n      }\n    }, packageScope, packageIdFilter);\n    return result;\n  }\n\n  @NotNull\n  private static Set<String> collectAllTestNames(@NotNull Collection<String> names, @NotNull Project project, @NotNull GoFile file) {\n    Set<String> result = ContainerUtil.newHashSet();\n    GlobalSearchScope packageScope = GoPackageUtil.packageScope(file);\n    GlobalSearchScope scope = new GoUtil.TestsScope(packageScope);\n    IdFilter idFilter = GoIdFilter.getFilesFilter(packageScope);\n    for (String name : names) {\n      if (GoTestFunctionType.fromName(name) != null) {\n        GoFunctionIndex.process(name, project, scope, idFilter, declaration -> {\n          result.add(name);\n          return false;\n        });\n      }\n    }\n    return result;\n  }\n\n  private static class GenerateTestInsertHandler implements InsertHandler<LookupElement> {\n    public static final InsertHandler<LookupElement> INSTANCE = new GenerateTestInsertHandler();\n\n    @Override\n    public void handleInsert(InsertionContext context, LookupElement item) {\n      PsiElement elementAt = context.getFile().findElementAt(context.getStartOffset());\n      GoFunctionOrMethodDeclaration declaration = PsiTreeUtil.getNonStrictParentOfType(elementAt, GoFunctionOrMethodDeclaration.class);\n      if (declaration != null) {\n        GoTestFunctionType testingType = GoTestFunctionType.fromName(declaration.getName());\n        if (testingType != null) {\n          String testingQualifier = null;\n          if (testingType.getParamType() != null) {\n            testingQualifier = GotestGenerateAction.importTestingPackageIfNeeded(declaration.getContainingFile());\n          }\n\n          GoBlock block = declaration.getBlock();\n          if (block == null) {\n            block = (GoBlock)declaration.add(GoElementFactory.createBlock(context.getProject()));\n          }\n          else if (block.getStatementList().isEmpty()) {\n            block = (GoBlock)block.replace(GoElementFactory.createBlock(context.getProject()));\n          }\n\n          GoSignature newSignature = GoElementFactory.createFunctionSignatureFromText(context.getProject(),\n                                                                                      testingType.getSignature(testingQualifier));\n          GoSignature signature = declaration.getSignature();\n          if (signature == null) {\n            declaration.addBefore(newSignature, block);\n          }\n          else if (signature.getParameters().getParameterDeclarationList().isEmpty()) {\n            signature.replace(newSignature);\n          }\n\n          Document document = context.getDocument();\n          PsiDocumentManager.getInstance(context.getProject()).doPostponedOperationsAndUnblockDocument(document);\n          GoStatement firstStatement = ContainerUtil.getFirstItem(block.getStatementList());\n          if (firstStatement != null) {\n            context.getEditor().getCaretModel().moveToOffset(firstStatement.getTextRange().getStartOffset());\n          }\n          else {\n            PsiElement lbrace = block.getLbrace();\n            PsiElement rbrace = block.getRbrace();\n            int lbraceEndOffset = lbrace.getTextRange().getEndOffset();\n            int startLine = document.getLineNumber(lbraceEndOffset);\n            int endLine = rbrace != null ? document.getLineNumber(rbrace.getTextRange().getStartOffset()) : startLine;\n            int lineDiff = endLine - startLine;\n            if (lineDiff < 2) {\n              document.insertString(lbraceEndOffset, StringUtil.repeat(\"\\n\", 2 - lineDiff));\n            }\n            int offsetToMove = document.getLineStartOffset(startLine + 1);\n            context.getEditor().getCaretModel().moveToOffset(offsetToMove);\n            CodeStyleManager.getInstance(context.getProject()).adjustLineIndent(document, offsetToMove);\n          }\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/completion/SingleCharInsertHandler.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.completion;\n\nimport com.intellij.codeInsight.AutoPopupController;\nimport com.intellij.codeInsight.completion.BasicInsertHandler;\nimport com.intellij.codeInsight.completion.InsertionContext;\nimport com.intellij.codeInsight.lookup.LookupElement;\nimport com.intellij.openapi.editor.Document;\nimport com.intellij.openapi.editor.Editor;\nimport org.jetbrains.annotations.NotNull;\n\npublic class SingleCharInsertHandler extends BasicInsertHandler<LookupElement> {\n  private final char myChar;\n\n  public SingleCharInsertHandler(char aChar) {\n    myChar = aChar;\n  }\n\n  @Override\n  public void handleInsert(@NotNull InsertionContext context, LookupElement item) {\n    Editor editor = context.getEditor();\n    int tailOffset = context.getTailOffset();\n    Document document = editor.getDocument();\n    context.commitDocument();\n    boolean staysAtChar = document.getTextLength() > tailOffset &&\n                          document.getCharsSequence().charAt(tailOffset) == myChar;\n\n    context.setAddCompletionChar(false);\n    if (!staysAtChar) {\n      document.insertString(tailOffset, String.valueOf(myChar));\n    }\n    editor.getCaretModel().moveToOffset(tailOffset + 1);\n\n    AutoPopupController.getInstance(context.getProject()).scheduleAutoPopup(editor);\n  }\n}"
  },
  {
    "path": "src/com/goide/configuration/GoBuildTagsUI.form",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<form xmlns=\"http://www.intellij.com/uidesigner/form/\" version=\"1\" bind-to-class=\"com.goide.configuration.GoBuildTagsUI\">\n  <grid id=\"27dc6\" binding=\"myPanel\" layout-manager=\"GridLayoutManager\" row-count=\"7\" column-count=\"3\" same-size-horizontally=\"false\" same-size-vertically=\"false\" hgap=\"-1\" vgap=\"-1\">\n    <margin top=\"0\" left=\"0\" bottom=\"0\" right=\"0\"/>\n    <constraints>\n      <xy x=\"20\" y=\"20\" width=\"878\" height=\"400\"/>\n    </constraints>\n    <properties/>\n    <border type=\"none\" title=\"Build tags\"/>\n    <children>\n      <component id=\"13ac7\" class=\"com.intellij.ui.components.JBLabel\">\n        <constraints>\n          <grid row=\"1\" column=\"0\" row-span=\"1\" col-span=\"1\" vsize-policy=\"3\" hsize-policy=\"3\" anchor=\"8\" fill=\"0\" indent=\"0\" use-parent-layout=\"false\"/>\n        </constraints>\n        <properties>\n          <text value=\"OS\"/>\n        </properties>\n      </component>\n      <hspacer id=\"f2e29\">\n        <constraints>\n          <grid row=\"1\" column=\"2\" row-span=\"1\" col-span=\"1\" vsize-policy=\"1\" hsize-policy=\"6\" anchor=\"0\" fill=\"1\" indent=\"0\" use-parent-layout=\"false\"/>\n        </constraints>\n      </hspacer>\n      <component id=\"6e929\" class=\"com.intellij.ui.components.JBLabel\">\n        <constraints>\n          <grid row=\"2\" column=\"0\" row-span=\"1\" col-span=\"1\" vsize-policy=\"3\" hsize-policy=\"3\" anchor=\"8\" fill=\"0\" indent=\"0\" use-parent-layout=\"false\"/>\n        </constraints>\n        <properties>\n          <text value=\"Arch\"/>\n        </properties>\n      </component>\n      <component id=\"b989\" class=\"com.intellij.openapi.ui.ComboBox\" binding=\"myOSCombo\">\n        <constraints>\n          <grid row=\"1\" column=\"1\" row-span=\"1\" col-span=\"1\" vsize-policy=\"3\" hsize-policy=\"3\" anchor=\"8\" fill=\"0\" indent=\"0\" use-parent-layout=\"false\">\n            <preferred-size width=\"250\" height=\"-1\"/>\n          </grid>\n        </constraints>\n        <properties/>\n      </component>\n      <component id=\"6e593\" class=\"com.intellij.openapi.ui.ComboBox\" binding=\"myArchCombo\">\n        <constraints>\n          <grid row=\"2\" column=\"1\" row-span=\"1\" col-span=\"1\" vsize-policy=\"3\" hsize-policy=\"3\" anchor=\"8\" fill=\"0\" indent=\"0\" use-parent-layout=\"false\">\n            <preferred-size width=\"250\" height=\"-1\"/>\n          </grid>\n        </constraints>\n        <properties/>\n      </component>\n      <component id=\"abf3\" class=\"com.intellij.ui.components.JBLabel\">\n        <constraints>\n          <grid row=\"5\" column=\"0\" row-span=\"1\" col-span=\"1\" vsize-policy=\"3\" hsize-policy=\"3\" anchor=\"8\" fill=\"0\" indent=\"0\" use-parent-layout=\"false\"/>\n        </constraints>\n        <properties>\n          <text value=\"CGO support\"/>\n        </properties>\n      </component>\n      <component id=\"49324\" class=\"com.intellij.ui.components.JBLabel\">\n        <constraints>\n          <grid row=\"4\" column=\"0\" row-span=\"1\" col-span=\"1\" vsize-policy=\"3\" hsize-policy=\"3\" anchor=\"8\" fill=\"0\" indent=\"0\" use-parent-layout=\"false\"/>\n        </constraints>\n        <properties>\n          <text value=\"Compiler\"/>\n        </properties>\n      </component>\n      <component id=\"1fbe4\" class=\"com.intellij.ui.components.JBLabel\">\n        <constraints>\n          <grid row=\"3\" column=\"0\" row-span=\"1\" col-span=\"1\" vsize-policy=\"3\" hsize-policy=\"3\" anchor=\"8\" fill=\"0\" indent=\"0\" use-parent-layout=\"false\"/>\n        </constraints>\n        <properties>\n          <text value=\"Go version\"/>\n        </properties>\n      </component>\n      <component id=\"b5c97\" class=\"com.intellij.ui.components.JBLabel\">\n        <constraints>\n          <grid row=\"6\" column=\"0\" row-span=\"1\" col-span=\"1\" vsize-policy=\"3\" hsize-policy=\"3\" anchor=\"8\" fill=\"0\" indent=\"0\" use-parent-layout=\"false\"/>\n        </constraints>\n        <properties>\n          <text value=\"Custom tags\"/>\n        </properties>\n      </component>\n      <component id=\"63b80\" class=\"com.intellij.openapi.ui.ComboBox\" binding=\"myGoVersionCombo\">\n        <constraints>\n          <grid row=\"3\" column=\"1\" row-span=\"1\" col-span=\"1\" vsize-policy=\"3\" hsize-policy=\"3\" anchor=\"8\" fill=\"0\" indent=\"0\" use-parent-layout=\"false\">\n            <preferred-size width=\"250\" height=\"-1\"/>\n          </grid>\n        </constraints>\n        <properties/>\n      </component>\n      <component id=\"b0689\" class=\"com.intellij.openapi.ui.ComboBox\" binding=\"myCompilerCombo\">\n        <constraints>\n          <grid row=\"4\" column=\"1\" row-span=\"1\" col-span=\"1\" vsize-policy=\"3\" hsize-policy=\"3\" anchor=\"8\" fill=\"0\" indent=\"0\" use-parent-layout=\"false\">\n            <preferred-size width=\"250\" height=\"-1\"/>\n          </grid>\n        </constraints>\n        <properties/>\n      </component>\n      <component id=\"91ec4\" class=\"com.intellij.openapi.ui.ComboBox\" binding=\"myCgoCombo\">\n        <constraints>\n          <grid row=\"5\" column=\"1\" row-span=\"1\" col-span=\"1\" vsize-policy=\"3\" hsize-policy=\"3\" anchor=\"8\" fill=\"0\" indent=\"0\" use-parent-layout=\"false\">\n            <preferred-size width=\"250\" height=\"-1\"/>\n          </grid>\n        </constraints>\n        <properties/>\n      </component>\n      <component id=\"50a45\" class=\"javax.swing.JTextPane\" binding=\"myDescriptionPane\" custom-create=\"true\">\n        <constraints>\n          <grid row=\"0\" column=\"0\" row-span=\"1\" col-span=\"3\" vsize-policy=\"6\" hsize-policy=\"6\" anchor=\"0\" fill=\"3\" indent=\"0\" use-parent-layout=\"false\">\n            <preferred-size width=\"150\" height=\"50\"/>\n          </grid>\n        </constraints>\n        <properties>\n          <contentType value=\"text/html\"/>\n          <editable value=\"false\"/>\n          <opaque value=\"false\"/>\n          <text value=\"&lt;html&gt;&#10;  &lt;head&gt;&#10;    &#10;  &lt;/head&gt;&#10;  &lt;body&gt;&#10;    &lt;p&gt;&#10;      Following options describe target system for the project. IDE will use &#10;      these values to decide which files should be ignored during validation, &#10;      resolving and suggesting symbols. See &lt;a href=&quot;https://golang.org/pkg/go/build/#hdr-Build_Constraints&quot;&gt;Go &#10;      Constraint documentation&lt;/a&gt; for details.&#10;    &lt;/p&gt;&#10;  &lt;/body&gt;&#10;&lt;/html&gt;&#10;\"/>\n        </properties>\n      </component>\n      <component id=\"f45ad\" class=\"com.intellij.ui.RawCommandLineEditor\" binding=\"myCustomTagsField\">\n        <constraints>\n          <grid row=\"6\" column=\"1\" row-span=\"1\" col-span=\"1\" vsize-policy=\"3\" hsize-policy=\"3\" anchor=\"0\" fill=\"1\" indent=\"0\" use-parent-layout=\"false\"/>\n        </constraints>\n        <properties/>\n      </component>\n    </children>\n  </grid>\n</form>\n"
  },
  {
    "path": "src/com/goide/configuration/GoBuildTagsUI.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.configuration;\n\nimport com.goide.GoConstants;\nimport com.goide.project.GoBuildTargetSettings;\nimport com.goide.sdk.GoSdkService;\nimport com.goide.util.GoUtil;\nimport com.intellij.ProjectTopics;\nimport com.intellij.openapi.Disposable;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.roots.ModuleRootAdapter;\nimport com.intellij.openapi.roots.ModuleRootEvent;\nimport com.intellij.openapi.ui.ComboBox;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.ui.IdeBorderFactory;\nimport com.intellij.ui.MutableCollectionComboBoxModel;\nimport com.intellij.ui.RawCommandLineEditor;\nimport com.intellij.util.ArrayUtil;\nimport com.intellij.util.ThreeState;\nimport com.intellij.util.containers.ContainerUtil;\nimport com.intellij.util.messages.MessageBusConnection;\nimport com.intellij.util.ui.UIUtil;\nimport org.jetbrains.annotations.NotNull;\n\nimport javax.swing.*;\nimport java.awt.event.ActionListener;\nimport java.util.Arrays;\nimport java.util.Collection;\nimport java.util.List;\n\npublic class GoBuildTagsUI implements Disposable {\n  private static final String ENABLED = \"Enabled\";\n  private static final String DISABLED = \"Disabled\";\n\n  private JPanel myPanel;\n  private ComboBox myOSCombo;\n  private ComboBox myArchCombo;\n  private ComboBox myGoVersionCombo;\n  private ComboBox myCompilerCombo;\n  private ComboBox myCgoCombo;\n  private RawCommandLineEditor myCustomTagsField;\n  @SuppressWarnings(\"unused\") \n  private JTextPane myDescriptionPane;\n\n  @NotNull private final MutableCollectionComboBoxModel<String> myCgoComboModel;\n\n  @NotNull private final String myDefaultOSValue;\n  @NotNull private final String myDefaultArchValue;\n  @NotNull private String myDefaultCgo;\n  @NotNull private String myDefaultGoVersion = \"\";\n\n  @SuppressWarnings(\"unchecked\")\n  public GoBuildTagsUI() {\n    myPanel.setBorder(IdeBorderFactory.createTitledBorder(\"Build tags\"));\n    \n    myDefaultOSValue = \"Default (\" + GoUtil.systemOS() + \")\";\n    myDefaultArchValue = \"Default (\" + GoUtil.systemArch() + \")\";\n    myDefaultCgo = \"Default (\" + cgo(GoUtil.systemCgo(myDefaultOSValue, myDefaultArchValue)) + \")\";\n    myCustomTagsField.setDialogCaption(\"Custom Build Tags\");\n\n    myOSCombo.setModel(createModel(GoConstants.KNOWN_OS, myDefaultOSValue));\n    myArchCombo.setModel(createModel(GoConstants.KNOWN_ARCH, myDefaultArchValue));\n    myCgoComboModel = createModel(ContainerUtil.newArrayList(ENABLED, DISABLED), myDefaultCgo);\n    myCgoCombo.setModel(myCgoComboModel);\n    myCompilerCombo.setModel(createModel(GoConstants.KNOWN_COMPILERS, GoBuildTargetSettings.ANY_COMPILER));\n\n    ActionListener updateCgoListener = event -> {\n      String selected = StringUtil.notNullize(myCgoComboModel.getSelected(), myDefaultCgo);\n      String oldDefault = myDefaultCgo;\n      String os = expandDefault(selected(myOSCombo, myDefaultOSValue), GoUtil.systemOS());\n      String arch = expandDefault(selected(myArchCombo, myDefaultArchValue), GoUtil.systemArch());\n\n      myDefaultCgo = \"Default (\" + cgo(GoUtil.systemCgo(os, arch)) + \")\";\n      myCgoComboModel.update(ContainerUtil.newArrayList(myDefaultCgo, ENABLED, DISABLED));\n      myCgoComboModel.setSelectedItem(oldDefault.equals(selected) ? myDefaultCgo : selected);\n    };\n    myOSCombo.addActionListener(updateCgoListener);\n    myArchCombo.addActionListener(updateCgoListener);\n  }\n\n  public void initPanel(@NotNull Module module) {\n    if (!module.isDisposed()) {\n      MessageBusConnection connection = module.getMessageBus().connect(this);\n      connection.subscribe(ProjectTopics.PROJECT_ROOTS, new ModuleRootAdapter() {\n        @Override\n        public void rootsChanged(ModuleRootEvent event) {\n          initComboValues(module);\n        }\n      });\n      initComboValues(module);\n    }\n  }\n\n  private void initComboValues(@NotNull Module module) {\n    if (!module.isDisposed()) {\n      String sdkVersion = GoSdkService.getInstance(module.getProject()).getSdkVersion(module);\n      myDefaultGoVersion = \"Project SDK (\" + StringUtil.notNullize(sdkVersion, \"any\") + \")\";\n      //noinspection unchecked\n      myGoVersionCombo.setModel(createModel(GoConstants.KNOWN_VERSIONS, myDefaultGoVersion));\n    }\n  }\n\n  @NotNull\n  private String selectedCompiler() {\n    Object item = myCompilerCombo.getSelectedItem();\n    return item instanceof String ? (String)item : GoBuildTargetSettings.ANY_COMPILER;\n  }\n\n  @NotNull\n  private String[] selectedCustomTags() {\n    return ArrayUtil.toStringArray(StringUtil.split(myCustomTagsField.getText(), \" \"));\n  }\n\n  @NotNull\n  private ThreeState selectedCgo() {\n    String string = myCgoComboModel.getSelected();\n    if (ENABLED.equals(string)) {\n      return ThreeState.YES;\n    }\n    if (DISABLED.equals(string)) {\n      return ThreeState.NO;\n    }\n    return ThreeState.UNSURE;\n  }\n\n  @NotNull\n  private static String selected(@NotNull ComboBox comboBox, @NotNull String defaultValue) {\n    Object item = comboBox.getSelectedItem();\n    if (item instanceof String) {\n      return defaultValue.equals(item) ? GoBuildTargetSettings.DEFAULT : (String)item;\n    }\n    return GoBuildTargetSettings.DEFAULT;\n  }\n\n  @NotNull\n  private static String expandDefault(@NotNull String value, @NotNull String defaultValue) {\n    return GoBuildTargetSettings.DEFAULT.equals(value) ? defaultValue : value;\n  }\n\n  @NotNull\n  private static MutableCollectionComboBoxModel<String> createModel(@NotNull Collection<String> values, @NotNull String defaultValue) {\n    List<String> items = ContainerUtil.newArrayList(defaultValue);\n    items.addAll(ContainerUtil.sorted(values));\n    return new MutableCollectionComboBoxModel<>(items, defaultValue);\n  }\n\n  public boolean isModified(@NotNull GoBuildTargetSettings buildTargetSettings) {\n    return !buildTargetSettings.os.equals(selected(myOSCombo, myDefaultOSValue)) ||\n           !buildTargetSettings.arch.equals(selected(myArchCombo, myDefaultArchValue)) ||\n           !buildTargetSettings.goVersion.equals(selected(myGoVersionCombo, myDefaultGoVersion)) ||\n           buildTargetSettings.cgo != selectedCgo() ||\n           !buildTargetSettings.compiler.equals(selectedCompiler()) ||\n           !Arrays.equals(buildTargetSettings.customFlags, selectedCustomTags());\n  }\n\n  public void apply(@NotNull GoBuildTargetSettings buildTargetSettings) {\n    buildTargetSettings.os = selected(myOSCombo, myDefaultOSValue);\n    buildTargetSettings.arch = selected(myArchCombo, myDefaultArchValue);\n    buildTargetSettings.goVersion = selected(myGoVersionCombo, myDefaultGoVersion);\n    buildTargetSettings.compiler = selectedCompiler();\n    buildTargetSettings.cgo = selectedCgo();\n    buildTargetSettings.customFlags = selectedCustomTags();\n  }\n\n  public void reset(@NotNull GoBuildTargetSettings buildTargetSettings) {\n    myOSCombo.setSelectedItem(expandDefault(buildTargetSettings.os, myDefaultOSValue));\n    myArchCombo.setSelectedItem(expandDefault(buildTargetSettings.arch, myDefaultArchValue));\n    myGoVersionCombo.setSelectedItem(expandDefault(buildTargetSettings.goVersion, myDefaultGoVersion));\n    myCgoCombo.setSelectedItem(expandDefault(cgo(buildTargetSettings.cgo), myDefaultCgo));\n    myCompilerCombo.setSelectedItem(buildTargetSettings.compiler);\n    myCustomTagsField.setText(StringUtil.join(buildTargetSettings.customFlags, \" \"));\n  }\n\n  @NotNull\n  public JPanel getPanel() {\n    return myPanel;\n  }\n\n  @Override\n  public void dispose() {\n    UIUtil.dispose(myPanel);\n    UIUtil.dispose(myOSCombo);\n    UIUtil.dispose(myArchCombo);\n    UIUtil.dispose(myGoVersionCombo);\n    UIUtil.dispose(myCompilerCombo);\n    UIUtil.dispose(myCgoCombo);\n    UIUtil.dispose(myCustomTagsField);\n  }\n\n  @NotNull\n  private static String cgo(@NotNull ThreeState threeState) {\n    if (threeState == ThreeState.YES) {\n      return ENABLED;\n    }\n    if (threeState == ThreeState.NO) {\n      return DISABLED;\n    }\n    return GoBuildTargetSettings.DEFAULT;\n  }\n\n  private void createUIComponents() {\n    myDescriptionPane = GoUIUtil.createDescriptionPane();\n  }\n}\n"
  },
  {
    "path": "src/com/goide/configuration/GoConfigurableProvider.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.configuration;\n\nimport com.goide.GoConstants;\nimport com.goide.codeInsight.imports.GoAutoImportConfigurable;\nimport com.goide.sdk.GoSdkService;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.options.Configurable;\nimport com.intellij.openapi.options.ConfigurableProvider;\nimport com.intellij.openapi.options.SearchableConfigurable;\nimport com.intellij.openapi.options.UnnamedConfigurable;\nimport com.intellij.openapi.project.Project;\nimport org.jetbrains.annotations.Nls;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoConfigurableProvider extends ConfigurableProvider {\n  @NotNull private final Project myProject;\n\n  public GoConfigurableProvider(@NotNull Project project) {\n    myProject = project;\n  }\n\n  @Nullable\n  @Override\n  public Configurable createConfigurable() {\n    Configurable projectSettingsConfigurable = new GoProjectSettingsConfigurable(myProject);\n    Configurable librariesConfigurable = new GoLibrariesConfigurableProvider(myProject).createConfigurable();\n    Configurable sdkConfigurable = GoSdkService.getInstance(myProject).createSdkConfigurable();\n    Configurable autoImportConfigurable = new GoAutoImportConfigurable(myProject, false);\n    return sdkConfigurable != null\n           ? new GoCompositeConfigurable(sdkConfigurable, projectSettingsConfigurable, librariesConfigurable, autoImportConfigurable)\n           : new GoCompositeConfigurable(projectSettingsConfigurable, librariesConfigurable, autoImportConfigurable);\n  }\n\n  private static class GoCompositeConfigurable extends SearchableConfigurable.Parent.Abstract {\n    private Configurable[] myConfigurables;\n\n    public GoCompositeConfigurable(Configurable... configurables) {\n      myConfigurables = configurables;\n    }\n\n    @Override\n    protected Configurable[] buildConfigurables() {\n      return myConfigurables;\n    }\n\n    @NotNull\n    @Override\n    public String getId() {\n      return \"go\";\n    }\n\n    @Nls\n    @Override\n    public String getDisplayName() {\n      return GoConstants.GO;\n    }\n\n    @Nullable\n    @Override\n    public String getHelpTopic() {\n      return null;\n    }\n\n    @Override\n    public void disposeUIResources() {\n      super.disposeUIResources();\n      myConfigurables = null;\n    }\n  }\n\n  public static class GoProjectSettingsConfigurable extends GoModuleAwareConfigurable {\n    public GoProjectSettingsConfigurable(@NotNull Project project) {\n      super(project, \"Project Settings\", null);\n    }\n\n    @NotNull\n    @Override\n    protected UnnamedConfigurable createModuleConfigurable(Module module) {\n      return new GoModuleSettingsConfigurable(module, false);\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/configuration/GoLibrariesConfigurable.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.configuration;\n\nimport com.goide.project.GoApplicationLibrariesService;\nimport com.goide.project.GoLibrariesService;\nimport com.intellij.openapi.fileChooser.FileChooserDialog;\nimport com.intellij.openapi.fileChooser.FileChooserFactory;\nimport com.intellij.openapi.options.Configurable;\nimport com.intellij.openapi.options.ConfigurationException;\nimport com.intellij.openapi.options.SearchableConfigurable;\nimport com.intellij.openapi.util.Iconable;\nimport com.intellij.openapi.vfs.VfsUtilCore;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.openapi.vfs.VirtualFileManager;\nimport com.intellij.ui.CollectionListModel;\nimport com.intellij.ui.ColoredListCellRenderer;\nimport com.intellij.ui.SimpleTextAttributes;\nimport com.intellij.ui.ToolbarDecorator;\nimport com.intellij.ui.components.JBCheckBox;\nimport com.intellij.ui.components.JBList;\nimport com.intellij.util.IconUtil;\nimport com.intellij.util.containers.ContainerUtil;\nimport com.intellij.util.ui.UIUtil;\nimport org.jetbrains.annotations.Nls;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport javax.swing.*;\nimport java.awt.*;\nimport java.util.Collection;\nimport java.util.List;\nimport java.util.stream.Collectors;\n\nimport static com.intellij.openapi.fileChooser.FileChooserDescriptorFactory.createMultipleFoldersDescriptor;\n\npublic class GoLibrariesConfigurable implements SearchableConfigurable, Configurable.NoScroll {\n  @NotNull private final String myDisplayName;\n  private final GoLibrariesService<?> myLibrariesService;\n  private final String[] myReadOnlyPaths;\n  private final JBCheckBox myUseEnvGoPathCheckBox = new JBCheckBox(\"Use GOPATH that's defined in system environment\");\n  private final JPanel myPanel = new JPanel(new BorderLayout());\n  private final CollectionListModel<ListItem> myListModel = new CollectionListModel<>();\n\n  public GoLibrariesConfigurable(@NotNull String displayName, @NotNull GoLibrariesService librariesService, String... urls) {\n    myDisplayName = displayName;\n    myLibrariesService = librariesService;\n    myReadOnlyPaths = urls;\n\n    JBList filesList = new JBList(myListModel);\n    filesList.setCellRenderer(new ColoredListCellRenderer() {\n      @Override\n      protected void customizeCellRenderer(@NotNull JList list, Object value, int index, boolean selected, boolean hasFocus) {\n        ListItem item = (ListItem)value;\n        String url = item.url;\n        if (item.readOnly) {\n          append(\"[GOPATH] \", SimpleTextAttributes.GRAY_ATTRIBUTES);\n        }\n        VirtualFile file = VirtualFileManager.getInstance().findFileByUrl(url);\n        if (file != null) {\n          append(file.getPresentableUrl(), item.readOnly ? SimpleTextAttributes.GRAY_ATTRIBUTES : SimpleTextAttributes.REGULAR_ATTRIBUTES);\n          setIcon(IconUtil.getIcon(file, Iconable.ICON_FLAG_READ_STATUS, null));\n        }\n        else {\n          append(VfsUtilCore.urlToPath(url), SimpleTextAttributes.ERROR_ATTRIBUTES);\n        }\n      }\n    });\n\n    ToolbarDecorator decorator = ToolbarDecorator.createDecorator(filesList)\n      .setAddAction(button -> {\n        FileChooserDialog fileChooser = FileChooserFactory.getInstance()\n          .createFileChooser(createMultipleFoldersDescriptor(), null, filesList);\n\n        VirtualFile fileToSelect = null;\n        ListItem lastItem = ContainerUtil.getLastItem(myListModel.getItems());\n        if (lastItem != null) {\n          fileToSelect = VirtualFileManager.getInstance().findFileByUrl(lastItem.url);\n        }\n\n        VirtualFile[] newDirectories = fileChooser.choose(null, fileToSelect);\n        if (newDirectories.length > 0) {\n          for (VirtualFile newDirectory : newDirectories) {\n            String newDirectoryUrl = newDirectory.getUrl();\n            boolean alreadyAdded = false;\n            for (ListItem item : myListModel.getItems()) {\n              if (newDirectoryUrl.equals(item.url) && !item.readOnly) {\n                filesList.clearSelection();\n                filesList.setSelectedValue(item, true);\n                scrollToSelection(filesList);\n                alreadyAdded = true;\n                break;\n              }\n            }\n            if (!alreadyAdded) {\n              myListModel.add(new ListItem(newDirectoryUrl, false));\n            }\n          }\n        }\n      })\n      .setRemoveActionUpdater(event -> {\n        for (Object selectedValue : filesList.getSelectedValuesList()) {\n          if (((ListItem)selectedValue).readOnly) {\n            return false;\n          }\n        }\n        return true;\n      })\n      .setRemoveAction(button -> {\n        for (Object selectedValue : filesList.getSelectedValuesList()) {\n          myListModel.remove((ListItem)selectedValue);\n        }\n      });\n    myPanel.add(decorator.createPanel(), BorderLayout.CENTER);\n    if (librariesService instanceof GoApplicationLibrariesService) {\n      myUseEnvGoPathCheckBox.addActionListener(event -> {\n        if (myUseEnvGoPathCheckBox.isSelected()) {\n          addReadOnlyPaths();\n        }\n        else {\n          removeReadOnlyPaths();\n        }\n      });\n      myPanel.add(myUseEnvGoPathCheckBox, BorderLayout.SOUTH);\n    }\n  }\n\n  private static void scrollToSelection(JList list) {\n    int selectedRow = list.getSelectedIndex();\n    if (selectedRow >= 0) {\n      list.scrollRectToVisible(list.getCellBounds(selectedRow, 0));\n    }\n  }\n\n  @Nullable\n  @Override\n  public JComponent createComponent() {\n    return myPanel;\n  }\n\n  @Override\n  public boolean isModified() {\n    return !getUserDefinedUrls().equals(myLibrariesService.getLibraryRootUrls()) ||\n           myLibrariesService instanceof GoApplicationLibrariesService &&\n           ((GoApplicationLibrariesService)myLibrariesService).isUseGoPathFromSystemEnvironment() !=\n           myUseEnvGoPathCheckBox.isSelected();\n  }\n\n  @Override\n  public void apply() throws ConfigurationException {\n    myLibrariesService.setLibraryRootUrls(getUserDefinedUrls());\n    if (myLibrariesService instanceof GoApplicationLibrariesService) {\n      ((GoApplicationLibrariesService)myLibrariesService).setUseGoPathFromSystemEnvironment(myUseEnvGoPathCheckBox.isSelected());\n    }\n  }\n\n  @Override\n  public void reset() {\n    myListModel.removeAll();\n    resetLibrariesFromEnvironment();\n    for (String url : myLibrariesService.getLibraryRootUrls()) {\n      myListModel.add(new ListItem(url, false));\n    }\n  }\n\n  private void resetLibrariesFromEnvironment() {\n    if (myLibrariesService instanceof GoApplicationLibrariesService) {\n      myUseEnvGoPathCheckBox.setSelected(((GoApplicationLibrariesService)myLibrariesService).isUseGoPathFromSystemEnvironment());\n      if (((GoApplicationLibrariesService)myLibrariesService).isUseGoPathFromSystemEnvironment()) {\n        addReadOnlyPaths();\n      }\n      else {\n        removeReadOnlyPaths();\n      }\n    }\n  }\n\n  private void addReadOnlyPaths() {\n    for (String url : myReadOnlyPaths) {\n      myListModel.add(new ListItem(url, true));\n    }\n  }\n\n  private void removeReadOnlyPaths() {\n    List<ListItem> toRemove = myListModel.getItems().stream().filter(item -> item.readOnly).collect(Collectors.toList());\n    for (ListItem item : toRemove) {\n      myListModel.remove(item);\n    }\n  }\n\n  @Override\n  public void disposeUIResources() {\n    UIUtil.dispose(myUseEnvGoPathCheckBox);\n    UIUtil.dispose(myPanel);\n    myListModel.removeAll();\n  }\n\n  @NotNull\n  @Nls\n  @Override\n  public String getDisplayName() {\n    return myDisplayName;\n  }\n\n  @Nullable\n  @Override\n  public String getHelpTopic() {\n    return null;\n  }\n\n  @NotNull\n  private Collection<String> getUserDefinedUrls() {\n    Collection<String> libraryUrls = ContainerUtil.newArrayList();\n    for (ListItem item : myListModel.getItems()) {\n      if (!item.readOnly) {\n        libraryUrls.add(item.url);\n      }\n    }\n    return libraryUrls;\n  }\n\n  @NotNull\n  @Override\n  public String getId() {\n    return \"go.libraries\";\n  }\n\n  @Nullable\n  @Override\n  public Runnable enableSearch(String option) {\n    return null;\n  }\n\n  private static class ListItem {\n    final boolean readOnly;\n    final String url;\n\n    public ListItem(String url, boolean readOnly) {\n      this.readOnly = readOnly;\n      this.url = url;\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/configuration/GoLibrariesConfigurableProvider.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.configuration;\n\nimport com.goide.project.GoApplicationLibrariesService;\nimport com.goide.project.GoModuleLibrariesService;\nimport com.goide.project.GoProjectLibrariesService;\nimport com.goide.sdk.GoSdkUtil;\nimport com.intellij.ide.util.PropertiesComponent;\nimport com.intellij.openapi.application.ApplicationManager;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.options.*;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.ui.HideableDecorator;\nimport com.intellij.uiDesigner.core.GridConstraints;\nimport com.intellij.uiDesigner.core.GridLayoutManager;\nimport com.intellij.uiDesigner.core.Spacer;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.Nls;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport javax.swing.*;\nimport java.awt.*;\nimport java.util.Collection;\nimport java.util.List;\nimport java.util.Locale;\n\npublic class GoLibrariesConfigurableProvider extends ConfigurableProvider {\n  @NotNull private final Project myProject;\n\n  public GoLibrariesConfigurableProvider(@NotNull Project project) {\n    myProject = project;\n  }\n\n  @Nullable\n  @Override\n  public Configurable createConfigurable() {\n    return createConfigurable(false);\n  }\n\n  @Nullable\n  private Configurable createConfigurable(boolean dialogMode) {\n    return new CompositeConfigurable<UnnamedConfigurable>() {\n\n      @Nullable\n      @Override\n      public JComponent createComponent() {\n        List<UnnamedConfigurable> configurables = getConfigurables();\n        Collection<HideableDecorator> hideableDecorators = ContainerUtil.newHashSet();\n\n        GridLayoutManager layoutManager = new GridLayoutManager(configurables.size() + 1, 1, new Insets(0, 0, 0, 0), -1, -1);\n        JPanel rootPanel = new JPanel(layoutManager);\n        Spacer spacer = new Spacer();\n        rootPanel.add(spacer, new GridConstraints(configurables.size(), 0, 1, 1, GridConstraints.ANCHOR_SOUTH,\n                                                  GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,\n                                                  GridConstraints.SIZEPOLICY_FIXED, null, null, null));\n\n        for (int i = 0; i < configurables.size(); i++) {\n          UnnamedConfigurable configurable = configurables.get(i);\n          JComponent configurableComponent = configurable.createComponent();\n          assert configurableComponent != null;\n          JPanel hideablePanel = new JPanel(new BorderLayout());\n\n          rootPanel.add(hideablePanel, configurableConstrains(i));\n\n          if (configurable instanceof Configurable) {\n            String displayName = ((Configurable)configurable).getDisplayName();\n            ListenableHideableDecorator decorator = new ListenableHideableDecorator(hideablePanel, displayName, configurableComponent);\n            decorator.addListener(new MyHideableDecoratorListener(layoutManager, hideablePanel,\n                                                                  spacer, hideableDecorators,\n                                                                  configurableExpandedPropertyKey((Configurable)configurable)\n            ));\n            hideableDecorators.add(decorator);\n            decorator.setOn(isConfigurableExpanded(i, (Configurable)configurable));\n          }\n        }\n        if (dialogMode) {\n          rootPanel.setPreferredSize(new Dimension(400, 600));\n        }\n        rootPanel.revalidate();\n        return rootPanel;\n      }\n\n      @NotNull\n      @Override\n      protected List<UnnamedConfigurable> createConfigurables() {\n        List<UnnamedConfigurable> result = ContainerUtil.newArrayList();\n        String[] urlsFromEnv = ContainerUtil.map2Array(GoSdkUtil.getGoPathsRootsFromEnvironment(), String.class, VirtualFile::getUrl);\n        result.add(new GoLibrariesConfigurable(\"Global libraries\", GoApplicationLibrariesService.getInstance(), urlsFromEnv));\n        if (!myProject.isDefault()) {\n          result.add(new GoLibrariesConfigurable(\"Project libraries\", GoProjectLibrariesService.getInstance(myProject)));\n          result.add(new GoModuleAwareConfigurable(myProject, \"Module libraries\", null) {\n            @NotNull\n            @Override\n            protected UnnamedConfigurable createModuleConfigurable(@NotNull Module module) {\n              return new GoLibrariesConfigurable(\"Module libraries\", GoModuleLibrariesService.getInstance(module));\n            }\n          });\n        }\n        return result;\n      }\n\n      @NotNull\n      @Nls\n      @Override\n      public String getDisplayName() {\n        return \"Go Libraries\";\n      }\n\n      @Nullable\n      @Override\n      public String getHelpTopic() {\n        return null;\n      }\n\n      @NotNull\n      private GridConstraints configurableConstrains(int i) {\n        return new GridConstraints(i, 0, 1, 1, GridConstraints.ANCHOR_NORTHEAST, GridConstraints.FILL_BOTH,\n                                   GridConstraints.SIZEPOLICY_CAN_GROW | GridConstraints.SIZEPOLICY_WANT_GROW |\n                                   GridConstraints.SIZEPOLICY_CAN_SHRINK,\n                                   GridConstraints.SIZEPOLICY_CAN_GROW | GridConstraints.SIZEPOLICY_CAN_SHRINK,\n                                   null, null, null);\n      }\n\n      private boolean isConfigurableExpanded(int index, @NotNull Configurable configurable) {\n        return PropertiesComponent.getInstance(myProject).getBoolean(configurableExpandedPropertyKey(configurable), index < 2);\n      }\n\n      private void storeConfigurableExpandedProperty(@NotNull String storeKey, @NotNull Boolean value) {\n        PropertiesComponent.getInstance(myProject).setValue(storeKey, value.toString());\n      }\n\n      private String configurableExpandedPropertyKey(@NotNull Configurable configurable) {\n        String keyName = \"configurable \" + configurable.getDisplayName() + \" is expanded\".toLowerCase(Locale.US);\n        return StringUtil.replaceChar(keyName, ' ', '.');\n      }\n\n      class MyHideableDecoratorListener extends ListenableHideableDecorator.MyListener {\n        private final GridLayoutManager myLayoutManager;\n        private final JPanel myHideablePanel;\n        @NotNull private final String myStoreKey;\n        private final Spacer mySpacer;\n        private final Collection<HideableDecorator> myHideableDecorators;\n\n        public MyHideableDecoratorListener(@NotNull GridLayoutManager layoutManager,\n                                           @NotNull JPanel hideablePanel,\n                                           @NotNull Spacer spacer,\n                                           @NotNull Collection<HideableDecorator> hideableDecorators,\n                                           @NotNull String storeKey) {\n          myLayoutManager = layoutManager;\n          myHideablePanel = hideablePanel;\n          myStoreKey = storeKey;\n          mySpacer = spacer;\n          myHideableDecorators = hideableDecorators;\n        }\n\n        @Override\n        public void on() {\n          GridConstraints c = myLayoutManager.getConstraintsForComponent(myHideablePanel);\n          c.setVSizePolicy(c.getVSizePolicy() | GridConstraints.SIZEPOLICY_WANT_GROW);\n\n          GridConstraints spacerConstraints = myLayoutManager.getConstraintsForComponent(mySpacer);\n          spacerConstraints.setVSizePolicy(spacerConstraints.getVSizePolicy() & ~GridConstraints.SIZEPOLICY_WANT_GROW);\n\n          storeConfigurableExpandedProperty(myStoreKey, Boolean.TRUE);\n        }\n\n\n        @Override\n        public void beforeOff() {\n          GridConstraints c = myLayoutManager.getConstraintsForComponent(myHideablePanel);\n          c.setVSizePolicy(c.getVSizePolicy() & ~GridConstraints.SIZEPOLICY_WANT_GROW);\n        }\n\n        @Override\n        public void afterOff() {\n          if (isAllDecoratorsCollapsed()) {\n            GridConstraints c = myLayoutManager.getConstraintsForComponent(mySpacer);\n            c.setVSizePolicy(c.getVSizePolicy() | GridConstraints.SIZEPOLICY_WANT_GROW);\n          }\n\n          storeConfigurableExpandedProperty(myStoreKey, Boolean.FALSE);\n        }\n\n        private boolean isAllDecoratorsCollapsed() {\n          for (HideableDecorator hideableDecorator : myHideableDecorators) {\n            if (hideableDecorator.isExpanded()) {\n              return false;\n            }\n          }\n          return true;\n        }\n      }\n    };\n  }\n\n  public static void showModulesConfigurable(@NotNull Project project) {\n    ApplicationManager.getApplication().assertIsDispatchThread();\n    if (!project.isDisposed()) {\n      Configurable configurable = new GoLibrariesConfigurableProvider(project).createConfigurable(true);\n      ShowSettingsUtil.getInstance().editConfigurable(project, configurable);\n    }\n  }\n}"
  },
  {
    "path": "src/com/goide/configuration/GoModuleAwareConfigurable.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.configuration;\n\nimport com.goide.sdk.GoSdkService;\nimport com.intellij.application.options.ModuleAwareProjectConfigurable;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.project.Project;\nimport org.jetbrains.annotations.NotNull;\n\npublic abstract class GoModuleAwareConfigurable extends ModuleAwareProjectConfigurable {\n  public GoModuleAwareConfigurable(@NotNull Project project, String displayName, String helpTopic) {\n    super(project, displayName, helpTopic);\n  }\n\n  @Override\n  protected boolean isSuitableForModule(@NotNull Module module) {\n    if (module.isDisposed()) {\n      return false;\n    }\n    Project project = module.getProject();\n    return !project.isDisposed() && GoSdkService.getInstance(project).isGoModule(module);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/configuration/GoModuleEditorsProvider.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.configuration;\n\nimport com.goide.GoModuleType;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.module.ModuleConfigurationEditor;\nimport com.intellij.openapi.module.ModuleType;\nimport com.intellij.openapi.roots.ModifiableRootModel;\nimport com.intellij.openapi.roots.ui.configuration.*;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\n\nimport javax.swing.*;\nimport java.util.List;\n\npublic class GoModuleEditorsProvider implements ModuleConfigurationEditorProvider {\n  @Override\n  public ModuleConfigurationEditor[] createEditors(@NotNull ModuleConfigurationState state) {\n    ModifiableRootModel rootModel = state.getRootModel();\n    Module module = rootModel.getModule();\n    if (!(ModuleType.get(module) instanceof GoModuleType)) {\n      return ModuleConfigurationEditor.EMPTY;\n    }\n\n    String moduleName = module.getName();\n    List<ModuleConfigurationEditor> editors = ContainerUtil.newArrayList();\n    editors.add(new ContentEntriesEditor(moduleName, state));\n    editors.add(new OutputEditorEx(state));\n    editors.add(new ClasspathEditor(state));\n    return editors.toArray(new ModuleConfigurationEditor[editors.size()]);\n  }\n\n  static class OutputEditorEx extends OutputEditor {\n    protected OutputEditorEx(ModuleConfigurationState state) {\n      super(state);\n    }\n\n    @Override\n    protected JComponent createComponentImpl() {\n      JComponent component = super.createComponentImpl();\n      component.remove(1); // todo: looks ugly\n      return component;\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/configuration/GoModuleSettingsConfigurable.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.configuration;\n\nimport com.goide.project.GoModuleSettings;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.options.ConfigurableBase;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoModuleSettingsConfigurable extends ConfigurableBase<GoModuleSettingsUI, GoModuleSettings> {\n  @NotNull private final Module myModule;\n  private final boolean myDialogMode;\n\n  public GoModuleSettingsConfigurable(@NotNull Module module, boolean dialogMode) {\n    super(\"go.project.settings\", \"Go Project Settings\", null);\n    myModule = module;\n    myDialogMode = dialogMode;\n  }\n\n  @NotNull\n  @Override\n  protected GoModuleSettings getSettings() {\n    return GoModuleSettings.getInstance(myModule);\n  }\n\n  @Override\n  protected GoModuleSettingsUI createUi() {\n    return new GoModuleSettingsUI(myModule, myDialogMode);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/configuration/GoModuleSettingsUI.form",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<form xmlns=\"http://www.intellij.com/uidesigner/form/\" version=\"1\" bind-to-class=\"com.goide.configuration.GoModuleSettingsUI\">\n  <grid id=\"27dc6\" binding=\"myPanel\" layout-manager=\"GridLayoutManager\" row-count=\"3\" column-count=\"1\" same-size-horizontally=\"false\" same-size-vertically=\"false\" hgap=\"-1\" vgap=\"-1\">\n    <margin top=\"0\" left=\"0\" bottom=\"0\" right=\"0\"/>\n    <constraints>\n      <xy x=\"20\" y=\"20\" width=\"500\" height=\"400\"/>\n    </constraints>\n    <properties/>\n    <border type=\"none\"/>\n    <children>\n      <vspacer id=\"96ffa\">\n        <constraints>\n          <grid row=\"2\" column=\"0\" row-span=\"1\" col-span=\"1\" vsize-policy=\"6\" hsize-policy=\"1\" anchor=\"0\" fill=\"2\" indent=\"0\" use-parent-layout=\"false\"/>\n        </constraints>\n      </vspacer>\n      <grid id=\"67cfc\" binding=\"myVendoringPanel\" custom-create=\"true\" layout-manager=\"GridLayoutManager\" row-count=\"1\" column-count=\"1\" same-size-horizontally=\"false\" same-size-vertically=\"false\" hgap=\"-1\" vgap=\"-1\">\n        <margin top=\"0\" left=\"0\" bottom=\"0\" right=\"0\"/>\n        <constraints>\n          <grid row=\"0\" column=\"0\" row-span=\"1\" col-span=\"1\" vsize-policy=\"3\" hsize-policy=\"3\" anchor=\"0\" fill=\"3\" indent=\"0\" use-parent-layout=\"false\"/>\n        </constraints>\n        <properties/>\n        <border type=\"none\"/>\n        <children/>\n      </grid>\n      <grid id=\"e2238\" binding=\"myBuildTagsPanel\" custom-create=\"true\" layout-manager=\"GridLayoutManager\" row-count=\"1\" column-count=\"1\" same-size-horizontally=\"false\" same-size-vertically=\"false\" hgap=\"-1\" vgap=\"-1\">\n        <margin top=\"0\" left=\"0\" bottom=\"0\" right=\"0\"/>\n        <constraints>\n          <grid row=\"1\" column=\"0\" row-span=\"1\" col-span=\"1\" vsize-policy=\"3\" hsize-policy=\"3\" anchor=\"0\" fill=\"3\" indent=\"0\" use-parent-layout=\"false\"/>\n        </constraints>\n        <properties/>\n        <border type=\"none\"/>\n        <children/>\n      </grid>\n    </children>\n  </grid>\n</form>\n"
  },
  {
    "path": "src/com/goide/configuration/GoModuleSettingsUI.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.configuration;\n\nimport com.goide.project.GoBuildTargetSettings;\nimport com.goide.project.GoModuleSettings;\nimport com.intellij.openapi.Disposable;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.options.ConfigurableUi;\nimport com.intellij.openapi.options.ConfigurationException;\nimport com.intellij.openapi.util.Disposer;\nimport com.intellij.util.ui.UIUtil;\nimport org.jetbrains.annotations.NotNull;\n\nimport javax.swing.*;\nimport java.awt.*;\n\npublic class GoModuleSettingsUI implements ConfigurableUi<GoModuleSettings>, Disposable {\n  private JPanel myPanel;\n  private JPanel myBuildTagsPanel;\n  private JPanel myVendoringPanel;\n  private GoVendoringUI myVendoringUI;\n  private GoBuildTagsUI myBuildTagsUI;\n\n  public GoModuleSettingsUI(@NotNull Module module, boolean dialogMode) {\n    if (dialogMode) {\n      myPanel.setPreferredSize(new Dimension(400, -1));\n    }\n    \n    myVendoringUI.initPanel(module);\n    myBuildTagsUI.initPanel(module);\n  }\n\n  @Override\n  public void reset(@NotNull GoModuleSettings settings) {\n    myBuildTagsUI.reset(settings.getBuildTargetSettings());\n    myVendoringUI.reset(settings);\n  }\n\n  @Override\n  public boolean isModified(@NotNull GoModuleSettings settings) {\n    return myVendoringUI.isModified(settings) || myBuildTagsUI.isModified(settings.getBuildTargetSettings());\n  }\n\n  @Override\n  public void apply(@NotNull GoModuleSettings settings) throws ConfigurationException {\n    myVendoringUI.apply(settings);\n\n    GoBuildTargetSettings newBuildTargetSettings = new GoBuildTargetSettings();\n    myBuildTagsUI.apply(newBuildTargetSettings);\n    settings.setBuildTargetSettings(newBuildTargetSettings);\n  }\n\n  @NotNull\n  @Override\n  public JComponent getComponent() {\n    return myPanel;\n  }\n\n  private void createUIComponents() {\n    myVendoringUI = new GoVendoringUI();\n    myBuildTagsUI = new GoBuildTagsUI();\n    \n    myVendoringPanel = myVendoringUI.getPanel();\n    myBuildTagsPanel = myBuildTagsUI.getPanel();\n  }\n\n  @Override\n  public void dispose() {\n    Disposer.dispose(myVendoringUI);\n    Disposer.dispose(myBuildTagsUI);\n    UIUtil.dispose(myPanel);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/configuration/GoSdkConfigurable.form",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<form xmlns=\"http://www.intellij.com/uidesigner/form/\" version=\"1\" bind-to-class=\"com.goide.configuration.GoSdkConfigurable\">\n  <grid id=\"27dc6\" binding=\"myComponent\" layout-manager=\"GridLayoutManager\" row-count=\"3\" column-count=\"2\" same-size-horizontally=\"false\" same-size-vertically=\"false\" hgap=\"-1\" vgap=\"-1\">\n    <margin top=\"0\" left=\"0\" bottom=\"0\" right=\"0\"/>\n    <constraints>\n      <xy x=\"20\" y=\"20\" width=\"500\" height=\"400\"/>\n    </constraints>\n    <properties/>\n    <border type=\"none\"/>\n    <children>\n      <component id=\"4690c\" class=\"com.intellij.openapi.ui.TextFieldWithBrowseButton\" binding=\"mySdkPathField\">\n        <constraints>\n          <grid row=\"0\" column=\"1\" row-span=\"1\" col-span=\"1\" vsize-policy=\"3\" hsize-policy=\"3\" anchor=\"0\" fill=\"1\" indent=\"0\" use-parent-layout=\"false\"/>\n        </constraints>\n        <properties/>\n      </component>\n      <vspacer id=\"4e6d1\">\n        <constraints>\n          <grid row=\"2\" column=\"1\" row-span=\"1\" col-span=\"1\" vsize-policy=\"6\" hsize-policy=\"1\" anchor=\"0\" fill=\"2\" indent=\"0\" use-parent-layout=\"false\"/>\n        </constraints>\n      </vspacer>\n      <component id=\"b5fea\" class=\"javax.swing.JLabel\">\n        <constraints>\n          <grid row=\"0\" column=\"0\" row-span=\"1\" col-span=\"1\" vsize-policy=\"0\" hsize-policy=\"0\" anchor=\"4\" fill=\"0\" indent=\"0\" use-parent-layout=\"false\"/>\n        </constraints>\n        <properties>\n          <text value=\"Path:\"/>\n        </properties>\n      </component>\n      <component id=\"ba37e\" class=\"javax.swing.JLabel\">\n        <constraints>\n          <grid row=\"1\" column=\"0\" row-span=\"1\" col-span=\"1\" vsize-policy=\"0\" hsize-policy=\"0\" anchor=\"4\" fill=\"0\" indent=\"0\" use-parent-layout=\"false\"/>\n        </constraints>\n        <properties>\n          <text value=\"Version:\"/>\n        </properties>\n      </component>\n      <grid id=\"4a0f5\" binding=\"myVersionPanel\" custom-create=\"true\" layout-manager=\"GridLayoutManager\" row-count=\"1\" column-count=\"1\" same-size-horizontally=\"false\" same-size-vertically=\"false\" hgap=\"-1\" vgap=\"-1\">\n        <margin top=\"0\" left=\"0\" bottom=\"0\" right=\"0\"/>\n        <constraints>\n          <grid row=\"1\" column=\"1\" row-span=\"1\" col-span=\"1\" vsize-policy=\"3\" hsize-policy=\"3\" anchor=\"0\" fill=\"3\" indent=\"0\" use-parent-layout=\"false\"/>\n        </constraints>\n        <properties/>\n        <border type=\"none\"/>\n        <children/>\n      </grid>\n    </children>\n  </grid>\n</form>\n"
  },
  {
    "path": "src/com/goide/configuration/GoSdkConfigurable.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.configuration;\n\nimport com.goide.sdk.GoSdkService;\nimport com.goide.sdk.GoSdkUtil;\nimport com.goide.sdk.GoSmallIDEsSdkService;\nimport com.intellij.openapi.Disposable;\nimport com.intellij.openapi.application.ApplicationManager;\nimport com.intellij.openapi.application.ModalityState;\nimport com.intellij.openapi.fileChooser.FileChooserDescriptor;\nimport com.intellij.openapi.fileChooser.FileChooserDescriptorFactory;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.module.ModuleManager;\nimport com.intellij.openapi.options.Configurable;\nimport com.intellij.openapi.options.ConfigurationException;\nimport com.intellij.openapi.options.SearchableConfigurable;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.roots.*;\nimport com.intellij.openapi.roots.libraries.Library;\nimport com.intellij.openapi.roots.libraries.LibraryTable;\nimport com.intellij.openapi.roots.libraries.LibraryTablesRegistrar;\nimport com.intellij.openapi.ui.ComponentWithBrowseButton;\nimport com.intellij.openapi.ui.TextComponentAccessor;\nimport com.intellij.openapi.ui.TextFieldWithBrowseButton;\nimport com.intellij.openapi.util.Disposer;\nimport com.intellij.openapi.util.Ref;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.ui.DocumentAdapter;\nimport com.intellij.ui.JBCardLayout;\nimport com.intellij.ui.JBColor;\nimport com.intellij.ui.components.JBLabel;\nimport com.intellij.util.Alarm;\nimport com.intellij.util.ArrayUtil;\nimport com.intellij.util.ObjectUtils;\nimport com.intellij.util.ui.AsyncProcessIcon;\nimport com.intellij.util.ui.UIUtil;\nimport org.jetbrains.annotations.Nls;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport javax.swing.*;\nimport javax.swing.event.DocumentEvent;\nimport java.awt.*;\n\npublic class GoSdkConfigurable implements SearchableConfigurable, Configurable.NoScroll {\n  private static final String VERSION_GETTING = \"VERSION_GETTING_CARD\";\n  private static final String VERSION_RESULT = \"VERSION_RESULT_CARD\";\n\n  @NotNull private final Project myProject;\n  @NotNull private final Disposable myDisposable = Disposer.newDisposable();\n  @NotNull private final Alarm myAlarm = new Alarm(Alarm.ThreadToUse.POOLED_THREAD, myDisposable);\n  private JPanel myComponent;\n  private TextFieldWithBrowseButton mySdkPathField;\n  private JPanel myVersionPanel;\n  private JBLabel myVersionLabel;\n  private Color myDefaultLabelColor;\n\n  public GoSdkConfigurable(@NotNull Project project, boolean dialogMode) {\n    myProject = project;\n    if (dialogMode) {\n      myComponent.setPreferredSize(new Dimension(400, -1));\n    }\n    FileChooserDescriptor chooserDescriptor = FileChooserDescriptorFactory.createSingleFolderDescriptor().withTitle(\"Select GOROOT\");\n    mySdkPathField.addBrowseFolderListener(myProject, new MyBrowseFolderListener(chooserDescriptor));\n    listenForPathUpdate();\n    Disposer.register(myDisposable, mySdkPathField);\n  }\n\n  @Override\n  public void apply() throws ConfigurationException {\n    ApplicationManager.getApplication().runWriteAction(() -> {\n      if (myProject.isDefault() || myProject.isDisposed()) {\n        return;\n      }\n\n      LibraryTable table = LibraryTablesRegistrar.getInstance().getLibraryTable(myProject);\n      Library get = table.getLibraryByName(GoSmallIDEsSdkService.LIBRARY_NAME);\n      Library lib = get != null ? get : table.createLibrary(GoSmallIDEsSdkService.LIBRARY_NAME);\n\n      Library.ModifiableModel libraryModel = lib.getModifiableModel();\n      String libUrl = ArrayUtil.getFirstElement(lib.getUrls(OrderRootType.CLASSES));\n      if (libUrl != null) {\n        libraryModel.removeRoot(libUrl, OrderRootType.CLASSES);\n      }\n\n      String sdkPath = GoSdkUtil.adjustSdkPath(mySdkPathField.getText());\n      String versionString = GoSdkUtil.retrieveGoVersion(sdkPath);\n      boolean toRemove = StringUtil.isEmpty(sdkPath) || versionString == null;\n\n      if (!toRemove) {\n        for (VirtualFile file : GoSdkUtil.getSdkDirectoriesToAttach(sdkPath, versionString)) {\n          libraryModel.addRoot(file, OrderRootType.CLASSES);\n        }\n      }\n      libraryModel.commit();\n\n      if (toRemove) {\n        updateModules(myProject, lib, true);\n        table.removeLibrary(lib);\n      }\n\n      table.getModifiableModel().commit();\n\n      if (!toRemove) {\n        updateModules(myProject, lib, false);\n      }\n      GoSdkService.getInstance(myProject).incModificationCount();\n    });\n  }\n\n  @Override\n  public void reset() {\n    mySdkPathField.setText(StringUtil.notNullize(GoSdkService.getInstance(myProject).getSdkHomePath(null)));\n  }\n\n  @Override\n  public boolean isModified() {\n    String currentPath = StringUtil.notNullize(GoSdkService.getInstance(myProject).getSdkHomePath(null));\n    return !GoSdkUtil.adjustSdkPath(mySdkPathField.getText()).equals(currentPath);\n  }\n\n  @NotNull\n  @Override\n  public String getId() {\n    return \"go.sdk\";\n  }\n\n  @Nullable\n  @Override\n  public Runnable enableSearch(String option) {\n    return null;\n  }\n\n  @Nls\n  @Override\n  public String getDisplayName() {\n    return \"Go SDK\";\n  }\n\n  @Nullable\n  @Override\n  public String getHelpTopic() {\n    return null;\n  }\n\n  @Nullable\n  @Override\n  public JComponent createComponent() {\n    return myComponent;\n  }\n\n  private static void updateModules(@NotNull Project project, @NotNull Library lib, boolean remove) {\n    Module[] modules = ModuleManager.getInstance(project).getModules();\n    for (Module module : modules) {\n      ModifiableRootModel model = ModuleRootManager.getInstance(module).getModifiableModel();\n      if (!remove) {\n        if (model.findLibraryOrderEntry(lib) == null) {\n          LibraryOrderEntry entry = model.addLibraryEntry(lib);\n          entry.setScope(DependencyScope.PROVIDED);\n        }\n      }\n      else {\n        LibraryOrderEntry entry = model.findLibraryOrderEntry(lib);\n        if (entry != null) {\n          model.removeOrderEntry(entry);\n        }\n      }\n      model.commit();\n    }\n  }\n\n  private void asyncUpdateSdkVersion(@NotNull String sdkPath) {\n    ApplicationManager.getApplication().assertIsDispatchThread();\n    ((CardLayout)myVersionPanel.getLayout()).show(myVersionPanel, VERSION_GETTING);\n\n    if (!myAlarm.isDisposed()) {\n      myAlarm.cancelAllRequests();\n      myAlarm.addRequest(() -> {\n        String version = GoSdkUtil.retrieveGoVersion(GoSdkUtil.adjustSdkPath(sdkPath));\n        ApplicationManager.getApplication().invokeLater(() -> {\n          if (!Disposer.isDisposed(myDisposable)) {\n            setVersion(version);\n          }\n        }, ModalityState.any());\n      }, 100);\n    }\n  }\n\n  private void setVersion(@Nullable String version) {\n    if (version == null) {\n      myVersionLabel.setText(\"N/A\");\n      myVersionLabel.setForeground(JBColor.RED);\n    }\n    else {\n      myVersionLabel.setText(version);\n      myVersionLabel.setForeground(myDefaultLabelColor);\n    }\n    ((CardLayout)myVersionPanel.getLayout()).show(myVersionPanel, VERSION_RESULT);\n  }\n\n  private void createUIComponents() {\n    myVersionLabel = new JBLabel();\n    myDefaultLabelColor = myVersionLabel.getForeground();\n\n    myVersionPanel = new JPanel(new JBCardLayout());\n    JPanel gettingVersionPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 5, 0));\n    AsyncProcessIcon gettingVersionIcon = new AsyncProcessIcon(\"Getting Go version\");\n    gettingVersionPanel.add(gettingVersionIcon);\n    gettingVersionPanel.add(new JLabel(\"Getting...\"));\n    myVersionPanel.add(gettingVersionPanel, VERSION_GETTING);\n    myVersionPanel.add(myVersionLabel, VERSION_RESULT);\n\n    setVersion(null);\n  }\n\n  @Override\n  public void disposeUIResources() {\n    UIUtil.dispose(myVersionLabel);\n    UIUtil.dispose(myVersionPanel);\n    UIUtil.dispose(myComponent);\n    myVersionLabel = null;\n    myVersionPanel = null;\n    myDefaultLabelColor = null;\n    Disposer.dispose(myDisposable);\n  }\n\n  private class MyBrowseFolderListener extends ComponentWithBrowseButton.BrowseFolderActionListener<JTextField> {\n    public MyBrowseFolderListener(@NotNull FileChooserDescriptor descriptor) {\n      super(\"Select Go SDK Path\", \"\", mySdkPathField, myProject, descriptor, TextComponentAccessor.TEXT_FIELD_WHOLE_TEXT);\n    }\n\n    @Nullable\n    @Override\n    protected VirtualFile getInitialFile() {\n      return ObjectUtils.chooseNotNull(super.getInitialFile(), GoSdkUtil.suggestSdkDirectory());\n    }\n  }\n\n  private void listenForPathUpdate() {\n    JTextField textField = mySdkPathField.getTextField();\n    Ref<String> prevPathRef = Ref.create(StringUtil.notNullize(textField.getText()));\n    textField.getDocument().addDocumentListener(new DocumentAdapter() {\n      @Override\n      protected void textChanged(DocumentEvent e) {\n        String sdkPath = StringUtil.notNullize(textField.getText());\n        String prevPath = prevPathRef.get();\n        if (!prevPath.equals(sdkPath)) {\n          asyncUpdateSdkVersion(sdkPath);\n          prevPathRef.set(sdkPath);\n        }\n      }\n    });\n  }\n}\n"
  },
  {
    "path": "src/com/goide/configuration/GoUIUtil.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.configuration;\n\nimport com.intellij.ui.BrowserHyperlinkListener;\nimport com.intellij.ui.ColorUtil;\nimport com.intellij.util.ui.UIUtil;\nimport org.jetbrains.annotations.NotNull;\n\nimport javax.swing.*;\nimport javax.swing.text.html.HTMLEditorKit;\nimport java.awt.*;\n\npublic class GoUIUtil {\n  private GoUIUtil() {}\n\n  @NotNull\n  public static JTextPane createDescriptionPane() {\n    JTextPane result = new JTextPane();\n    result.addHyperlinkListener(new BrowserHyperlinkListener());\n    result.setContentType(\"text/html\");\n    Font descriptionFont = UIUtil.getLabelFont(UIUtil.FontSize.SMALL);\n    HTMLEditorKit editorKit = UIUtil.getHTMLEditorKit();\n    editorKit.getStyleSheet().addRule(\"body, p {\" +\n                                      \"color:#\" + ColorUtil.toHex(UIUtil.getLabelFontColor(UIUtil.FontColor.BRIGHTER)) + \";\" +\n                                      \"font-family:\" + descriptionFont.getFamily() + \";\" +\n                                      \"font-size:\" + descriptionFont.getSize() + \"pt;}\");\n    result.setHighlighter(null);\n    result.setEditorKit(editorKit);\n    return result;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/configuration/GoVendoringUI.form",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<form xmlns=\"http://www.intellij.com/uidesigner/form/\" version=\"1\" bind-to-class=\"com.goide.configuration.GoVendoringUI\">\n  <grid id=\"27dc6\" binding=\"myPanel\" layout-manager=\"GridLayoutManager\" row-count=\"3\" column-count=\"3\" same-size-horizontally=\"false\" same-size-vertically=\"false\" hgap=\"-1\" vgap=\"-1\">\n    <margin top=\"0\" left=\"0\" bottom=\"0\" right=\"0\"/>\n    <constraints>\n      <xy x=\"20\" y=\"20\" width=\"865\" height=\"329\"/>\n    </constraints>\n    <properties/>\n    <border type=\"none\" title=\"Vendor experiment\"/>\n    <children>\n      <component id=\"36138\" class=\"com.intellij.openapi.ui.ComboBox\" binding=\"myVendoringEnabledCombo\">\n        <constraints>\n          <grid row=\"1\" column=\"1\" row-span=\"1\" col-span=\"1\" vsize-policy=\"3\" hsize-policy=\"3\" anchor=\"8\" fill=\"0\" indent=\"0\" use-parent-layout=\"false\">\n            <preferred-size width=\"250\" height=\"-1\"/>\n          </grid>\n        </constraints>\n        <properties/>\n      </component>\n      <component id=\"ddda9\" class=\"javax.swing.JLabel\">\n        <constraints>\n          <grid row=\"1\" column=\"0\" row-span=\"1\" col-span=\"1\" vsize-policy=\"0\" hsize-policy=\"0\" anchor=\"8\" fill=\"0\" indent=\"0\" use-parent-layout=\"false\"/>\n        </constraints>\n        <properties>\n          <text value=\"Enable vendoring\"/>\n        </properties>\n      </component>\n      <hspacer id=\"1b8a0\">\n        <constraints>\n          <grid row=\"1\" column=\"2\" row-span=\"1\" col-span=\"1\" vsize-policy=\"1\" hsize-policy=\"6\" anchor=\"0\" fill=\"1\" indent=\"0\" use-parent-layout=\"false\"/>\n        </constraints>\n      </hspacer>\n      <component id=\"2307f\" class=\"com.intellij.ui.components.JBLabel\" binding=\"myErrorMessageLabel\">\n        <constraints>\n          <grid row=\"2\" column=\"1\" row-span=\"1\" col-span=\"1\" vsize-policy=\"3\" hsize-policy=\"3\" anchor=\"8\" fill=\"0\" indent=\"0\" use-parent-layout=\"false\"/>\n        </constraints>\n        <properties>\n          <componentStyle value=\"SMALL\"/>\n          <fontColor value=\"BRIGHTER\"/>\n        </properties>\n      </component>\n      <component id=\"904a5\" class=\"javax.swing.JTextPane\" binding=\"myDescriptionPane\" custom-create=\"true\" default-binding=\"true\">\n        <constraints>\n          <grid row=\"0\" column=\"0\" row-span=\"1\" col-span=\"3\" vsize-policy=\"6\" hsize-policy=\"6\" anchor=\"0\" fill=\"3\" indent=\"0\" use-parent-layout=\"false\">\n            <preferred-size width=\"150\" height=\"50\"/>\n          </grid>\n        </constraints>\n        <properties>\n          <contentType value=\"text/html\"/>\n          <editable value=\"false\"/>\n          <opaque value=\"false\"/>\n          <text value=\"&lt;html&gt;&#10;  &lt;head&gt;&#10;    &#10;  &lt;/head&gt;&#10;  &lt;body&gt;&#10;    &lt;p&gt;&#10;      With this option enabled IDE will resolve and complete symbols according &#10;      to &lt;a href=&quot;https://golang.org/s/go15vendor&quot;&gt;Go Vendoring Experiment &#10;      Proposal&lt;/a&gt;.&#10;    &lt;/p&gt;&#10;    &lt;p&gt;&#10;      Also corrensponding value of &lt;strong&gt;GO15VENDOREXPERIMENT&lt;/strong&gt; &#10;      environment variable will be set for all go executions from IDE.&#10;    &lt;/p&gt;&#10;  &lt;/body&gt;&#10;&lt;/html&gt;&#10;\"/>\n        </properties>\n      </component>\n    </children>\n  </grid>\n</form>\n"
  },
  {
    "path": "src/com/goide/configuration/GoVendoringUI.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.configuration;\n\nimport com.goide.project.GoModuleSettings;\nimport com.goide.project.GoVendoringUtil;\nimport com.goide.sdk.GoSdkService;\nimport com.intellij.ProjectTopics;\nimport com.intellij.icons.AllIcons;\nimport com.intellij.openapi.Disposable;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.roots.ModuleRootAdapter;\nimport com.intellij.openapi.roots.ModuleRootEvent;\nimport com.intellij.openapi.ui.ComboBox;\nimport com.intellij.ui.IdeBorderFactory;\nimport com.intellij.ui.MutableCollectionComboBoxModel;\nimport com.intellij.ui.components.JBLabel;\nimport com.intellij.util.ThreeState;\nimport com.intellij.util.containers.ContainerUtil;\nimport com.intellij.util.messages.MessageBusConnection;\nimport com.intellij.util.ui.UIUtil;\nimport org.jetbrains.annotations.NotNull;\n\nimport javax.swing.*;\n\nimport static com.intellij.util.ThreeState.UNSURE;\n\npublic class GoVendoringUI implements Disposable {\n  private static final String ENABLED = \"Enabled\";\n  private static final String DISABLED = \"Disabled\";\n\n  @NotNull\n  private final MutableCollectionComboBoxModel myVendoringEnabledComboModel = new MutableCollectionComboBoxModel<String>();\n  @NotNull\n  private String myDefaultComboText = \"\";\n\n  private JPanel myPanel;\n  private JBLabel myErrorMessageLabel;\n  private ComboBox myVendoringEnabledCombo;\n  @SuppressWarnings(\"unused\") \n  private JTextPane myDescriptionPane;\n\n  public GoVendoringUI() {\n    myPanel.setBorder(IdeBorderFactory.createTitledBorder(\"Vendor experiment\"));\n  }\n\n  public void initPanel(@NotNull Module module) {\n    if (!module.isDisposed()) {\n      MessageBusConnection connection = module.getMessageBus().connect(this);\n      //noinspection unchecked\n      myVendoringEnabledCombo.setModel(myVendoringEnabledComboModel);\n      connection.subscribe(ProjectTopics.PROJECT_ROOTS, new ModuleRootAdapter() {\n        @Override\n        public void rootsChanged(ModuleRootEvent event) {\n          initComboValues(module);\n        }\n      });\n\n      initComboValues(module);\n    }\n  } \n\n  private void initComboValues(@NotNull Module module) {\n    if (!module.isDisposed()) {\n      String sdkVersion = GoSdkService.getInstance(module.getProject()).getSdkVersion(module);\n      if (!GoVendoringUtil.vendoringCanBeDisabled(sdkVersion)) {\n        myErrorMessageLabel.setIcon(AllIcons.General.BalloonWarning);\n        myErrorMessageLabel.setText(\"Go \" + sdkVersion + \" doesn't support disabling vendor experiment\");\n        myErrorMessageLabel.setVisible(true);\n        myVendoringEnabledCombo.setEnabled(false);\n      }\n      else if (!GoVendoringUtil.supportsVendoring(sdkVersion) && sdkVersion != null) {\n        myErrorMessageLabel.setIcon(AllIcons.General.BalloonWarning);\n        myErrorMessageLabel.setText(\"Go \" + sdkVersion + \" doesn't support vendor experiment\");\n        myErrorMessageLabel.setVisible(true);\n        myVendoringEnabledCombo.setEnabled(true);\n      }\n      else {\n        myErrorMessageLabel.setVisible(false);\n        myVendoringEnabledCombo.setEnabled(true);\n      }\n      myDefaultComboText = \"Default for SDK (\" + (GoVendoringUtil.supportsVendoringByDefault(sdkVersion) ? ENABLED : DISABLED) + \")\";\n      //noinspection unchecked\n      myVendoringEnabledComboModel.update(ContainerUtil.newArrayList(myDefaultComboText, ENABLED, DISABLED));\n    }\n  }\n\n  public void reset(@NotNull GoModuleSettings settings) {\n    switch (settings.getVendoringEnabled()) {\n      case YES:\n        myVendoringEnabledComboModel.setSelectedItem(ENABLED);\n        break;\n      case NO:\n        myVendoringEnabledComboModel.setSelectedItem(DISABLED);\n        break;\n      case UNSURE:\n        myVendoringEnabledComboModel.setSelectedItem(myDefaultComboText);\n        break;\n    }\n  }\n\n  public boolean isModified(@NotNull GoModuleSettings settings) {\n    Object item = myVendoringEnabledComboModel.getSelectedItem();\n    switch (settings.getVendoringEnabled()) {\n      case YES:\n        return !ENABLED.equals(item);\n      case NO:\n        return !DISABLED.equals(item);\n      case UNSURE:\n        return !myDefaultComboText.equals(item);\n    }\n    return true;\n  }\n\n\n  public void apply(@NotNull GoModuleSettings settings) {\n    Object item = myVendoringEnabledComboModel.getSelectedItem();\n    if (ENABLED.equals(item)) {\n      settings.setVendoringEnabled(ThreeState.YES);\n    }\n    else if (DISABLED.equals(item)) {\n      settings.setVendoringEnabled(ThreeState.NO);\n    }\n    else {\n      settings.setVendoringEnabled(UNSURE);\n    }\n  }\n\n  public JPanel getPanel() {\n    return myPanel;\n  }\n\n  @Override\n  public void dispose() {\n    UIUtil.dispose(myPanel);\n    UIUtil.dispose(myVendoringEnabledCombo);\n  }\n\n  private void createUIComponents() {\n    myDescriptionPane = GoUIUtil.createDescriptionPane(); \n  }\n}\n"
  },
  {
    "path": "src/com/goide/configuration/ListenableHideableDecorator.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.configuration;\n\nimport com.intellij.ui.HideableDecorator;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\n\nimport javax.swing.*;\nimport java.util.Collection;\n\nclass ListenableHideableDecorator extends HideableDecorator {\n  private final Collection<MyListener> myListeners = ContainerUtil.newSmartList();\n\n  public ListenableHideableDecorator(@NotNull JPanel panel, @NotNull String displayName, @NotNull JComponent content) {\n    super(panel, displayName, false);\n    setContentComponent(content);\n  }\n\n  public void addListener(@NotNull MyListener listener) {\n    myListeners.add(listener);\n  }\n\n  @Override\n  protected void on() {\n    for (MyListener listener : myListeners) {\n      listener.on();\n    }\n    super.on();\n  }\n\n  @Override\n  protected void off() {\n    for (MyListener listener : myListeners) {\n      listener.beforeOff();\n    }\n    super.off();\n    for (MyListener listener : myListeners) {\n      listener.afterOff();\n    }\n  }\n\n  public static class MyListener {\n    public void on() {\n\n    }\n\n    public void beforeOff() {\n\n    }\n\n    public void afterOff() {\n\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/dlv/DlvCommandProcessor.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.dlv;\n\nimport com.goide.dlv.protocol.DlvRequest;\nimport com.goide.dlv.protocol.DlvResponse;\nimport com.google.gson.GsonBuilder;\nimport com.google.gson.stream.JsonReader;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\nimport org.jetbrains.concurrency.Promise;\nimport org.jetbrains.rpc.CommandProcessor;\nimport org.jetbrains.rpc.CommandProcessorKt;\nimport org.jetbrains.rpc.RequestCallback;\n\nimport java.lang.reflect.ParameterizedType;\nimport java.lang.reflect.Type;\nimport java.util.List;\n\npublic abstract class DlvCommandProcessor extends CommandProcessor<JsonReaderEx, DlvResponse, DlvResponse> {\n  @Nullable\n  @Override\n  public DlvResponse readIfHasSequence(@NotNull JsonReaderEx message) {\n    return new DlvResponse.CommandResponseImpl(message, null);\n  }\n\n  @Override\n  public int getSequence(@NotNull DlvResponse response) {\n    return response.id();\n  }\n\n  @Override\n  public void acceptNonSequence(JsonReaderEx message) {\n  }\n\n  public void processIncomingJson(@NotNull JsonReaderEx reader) {\n    getMessageManager().processIncoming(reader);\n  }\n\n  @Override\n  public void call(@NotNull DlvResponse response, @NotNull RequestCallback<DlvResponse> callback) {\n    if (response.result() != null) {\n      callback.onSuccess(response, this);\n    }\n    else {\n      callback.onError(Promise.createError(createMessage(response)));\n    }\n  }\n\n  @NotNull\n  private static String createMessage(@NotNull DlvResponse r) {\n    DlvResponse.ErrorInfo e = r.error();\n    if (e == null) return \"Internal messaging error\";\n    List<String> data = e.data();\n    String message = e.message();\n    if (ContainerUtil.isEmpty(data)) return StringUtil.defaultIfEmpty(message, \"<null>\");\n    List<String> list = ContainerUtil.newSmartList(message);\n    list.addAll(data);\n    return list.toString();\n  }\n\n  @NotNull\n  @Override\n  public <RESULT> RESULT readResult(@NotNull String method, @NotNull DlvResponse successResponse) {\n    JsonReaderEx result = successResponse.result();\n    assert result != null : \"success result should be not null\";\n    JsonReader reader = result.asGson();\n    Object o = new GsonBuilder().create().fromJson(reader, getResultType(method.replaceFirst(\"RPCServer\\\\.\", \"\")));\n    //noinspection unchecked\n    return (RESULT)o;\n  }\n\n  @NotNull\n  private static Type getResultType(@NotNull String method) {\n    for (Class<?> c : DlvRequest.class.getDeclaredClasses()) {\n      if (method.equals(c.getSimpleName())) {\n        Type s = c.getGenericSuperclass();\n        assert s instanceof ParameterizedType : c.getCanonicalName() + \" should have a generic parameter for correct callback processing\";\n        Type[] arguments = ((ParameterizedType)s).getActualTypeArguments();\n        assert arguments.length == 1 : c.getCanonicalName() + \" should have only one generic argument for correct callback processing\";\n        return arguments[0];\n      }\n    }\n    CommandProcessorKt.getLOG().error(\"Unknown response \" + method + \", please register an appropriate request into com.goide.dlv.protocol.DlvRequest\");\n    return Object.class;\n  }\n}"
  },
  {
    "path": "src/com/goide/dlv/DlvDebugProcess.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.dlv;\n\nimport com.goide.GoConstants;\nimport com.goide.GoFileType;\nimport com.goide.dlv.breakpoint.DlvBreakpointProperties;\nimport com.goide.dlv.breakpoint.DlvBreakpointType;\nimport com.goide.dlv.protocol.DlvRequest;\nimport com.goide.util.GoUtil;\nimport com.intellij.execution.ExecutionResult;\nimport com.intellij.execution.ui.ExecutionConsole;\nimport com.intellij.icons.AllIcons;\nimport com.intellij.openapi.Disposable;\nimport com.intellij.openapi.application.AccessToken;\nimport com.intellij.openapi.application.ReadAction;\nimport com.intellij.openapi.diagnostic.Logger;\nimport com.intellij.openapi.fileTypes.FileType;\nimport com.intellij.openapi.fileTypes.PlainTextLanguage;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.Key;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.PsiFileFactory;\nimport com.intellij.util.Consumer;\nimport com.intellij.util.containers.ContainerUtil;\nimport com.intellij.util.io.socketConnection.ConnectionStatus;\nimport com.intellij.xdebugger.XDebugSession;\nimport com.intellij.xdebugger.XSourcePosition;\nimport com.intellij.xdebugger.breakpoints.XBreakpoint;\nimport com.intellij.xdebugger.breakpoints.XBreakpointHandler;\nimport com.intellij.xdebugger.breakpoints.XLineBreakpoint;\nimport com.intellij.xdebugger.evaluation.XDebuggerEditorsProviderBase;\nimport com.intellij.xdebugger.frame.XSuspendContext;\nimport org.intellij.lang.annotations.MagicConstant;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\nimport org.jetbrains.concurrency.Promise;\nimport org.jetbrains.debugger.DebugProcessImpl;\nimport org.jetbrains.debugger.Location;\nimport org.jetbrains.debugger.StepAction;\nimport org.jetbrains.debugger.Vm;\nimport org.jetbrains.debugger.connection.VmConnection;\n\nimport java.util.Collections;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.concurrent.atomic.AtomicBoolean;\n\nimport static com.goide.dlv.protocol.DlvApi.*;\nimport static com.intellij.util.ObjectUtils.assertNotNull;\nimport static com.intellij.util.ObjectUtils.tryCast;\n\npublic final class DlvDebugProcess extends DebugProcessImpl<VmConnection<?>> implements Disposable {\n  public static final boolean IS_DLV_DISABLED = !GoConstants.AMD64.equals(GoUtil.systemArch());\n\n  private final static Logger LOG = Logger.getInstance(DlvDebugProcess.class);\n  private final AtomicBoolean breakpointsInitiated = new AtomicBoolean();\n  private final AtomicBoolean connectedListenerAdded = new AtomicBoolean();\n  private static final Consumer<Throwable> THROWABLE_CONSUMER = LOG::info;\n\n  @NotNull\n  private final Consumer<DebuggerState> myStateConsumer = new Consumer<DebuggerState>() {\n    @Override\n    public void consume(@NotNull DebuggerState o) {\n      if (o.exited) {\n        stop();\n        return;\n      }\n\n      XBreakpoint<DlvBreakpointProperties> find = findBreak(o.breakPoint);\n      send(new DlvRequest.StacktraceGoroutine()).done(locations -> {\n          DlvSuspendContext context = new DlvSuspendContext(DlvDebugProcess.this, o.currentThread.id, locations, getProcessor());\n          XDebugSession session = getSession();\n          if (find == null) {\n            session.positionReached(context);\n          }\n          else {\n            session.breakpointReached(find, null, context);\n          }\n        });\n    }\n\n    @Nullable\n    private XBreakpoint<DlvBreakpointProperties> findBreak(@Nullable Breakpoint point) {\n      return point == null ? null : breakpoints.get(point.id);\n    }\n  };\n\n  @NotNull\n  private <T> Promise<T> send(@NotNull DlvRequest<T> request) {\n    return send(request, getProcessor());\n  }\n\n  @NotNull\n  static <T> Promise<T> send(@NotNull DlvRequest<T> request, @NotNull DlvCommandProcessor processor) {\n    return processor.send(request).rejected(THROWABLE_CONSUMER);\n  }\n\n  @NotNull\n  private DlvCommandProcessor getProcessor() {\n    return assertNotNull(tryCast(getVm(), DlvVm.class)).getCommandProcessor();\n  }\n\n  public DlvDebugProcess(@NotNull XDebugSession session, @NotNull VmConnection<?> connection, @Nullable ExecutionResult er) {\n    super(session, connection, new MyEditorsProvider(), null, er);\n  }\n\n  @NotNull\n  @Override\n  protected XBreakpointHandler<?>[] createBreakpointHandlers() {\n    return new XBreakpointHandler[]{new MyBreakpointHandler()};\n  }\n\n  @NotNull\n  @Override\n  public ExecutionConsole createConsole() {\n    ExecutionResult executionResult = getExecutionResult();\n    return executionResult == null ? super.createConsole() : executionResult.getExecutionConsole();\n  }\n\n  @Override\n  protected boolean isVmStepOutCorrect() {\n    return false;\n  }\n\n  @Override\n  public void dispose() {\n    // todo\n  }\n\n  @Override\n  public boolean checkCanInitBreakpoints() {\n    if (getConnection().getState().getStatus() == ConnectionStatus.CONNECTED) {\n      // breakpointsInitiated could be set in another thread and at this point work (init breakpoints) could be not yet performed\n      return initBreakpointHandlersAndSetBreakpoints(false);\n    }\n\n    if (connectedListenerAdded.compareAndSet(false, true)) {\n      getConnection().addListener(status -> {\n        if (status == ConnectionStatus.CONNECTED) {\n          initBreakpointHandlersAndSetBreakpoints(true);\n        }\n      });\n    }\n    return false;\n  }\n\n  private boolean initBreakpointHandlersAndSetBreakpoints(boolean setBreakpoints) {\n    if (!breakpointsInitiated.compareAndSet(false, true)) return false;\n\n    Vm vm = getVm();\n    assert vm != null : \"Vm should be initialized\";\n\n    if (setBreakpoints) {\n      doSetBreakpoints();\n      resume(vm);\n    }\n\n    return true;\n  }\n\n  private void doSetBreakpoints() {\n    AccessToken token = ReadAction.start();\n    try {\n      getSession().initBreakpoints();\n    }\n    finally {\n      token.finish();\n    }\n  }\n\n  private void command(@NotNull @MagicConstant(stringValues = {NEXT, CONTINUE, HALT, SWITCH_THREAD, STEP}) String name) {\n    send(new DlvRequest.Command(name)).done(myStateConsumer);\n  }\n\n  @Nullable\n  @Override\n  protected Promise<?> continueVm(@NotNull Vm vm, @NotNull StepAction stepAction) {\n    switch (stepAction) {\n      case CONTINUE:\n        command(CONTINUE);\n        break;\n      case IN:\n        command(STEP);\n        break;\n      case OVER:\n        command(NEXT);\n        break;\n      case OUT:\n        // todo\n        break;\n    }\n    return null;\n  }\n\n  @NotNull\n  @Override\n  public List<Location> getLocationsForBreakpoint(@NotNull XLineBreakpoint<?> breakpoint) {\n    return Collections.emptyList();\n  }\n\n  @Override\n  public void runToPosition(@NotNull XSourcePosition position, @Nullable XSuspendContext context) {\n    // todo\n  }\n\n  @Override\n  public void stop() {\n    if (getVm() != null) {\n      send(new DlvRequest.Detach(true));\n    }\n    getSession().stop();\n  }\n\n  private static class MyEditorsProvider extends XDebuggerEditorsProviderBase {\n    @NotNull\n    @Override\n    public FileType getFileType() {\n      return GoFileType.INSTANCE;\n    }\n\n    @Override\n    protected PsiFile createExpressionCodeFragment(@NotNull Project project,\n                                                   @NotNull String text,\n                                                   @Nullable PsiElement context,\n                                                   boolean isPhysical) {\n      return PsiFileFactory.getInstance(project).createFileFromText(\"dlv-debug.txt\", PlainTextLanguage.INSTANCE, text);\n    }\n  }\n\n  private static final Key<Integer> ID = Key.create(\"DLV_BP_ID\");\n  private final Map<Integer, XBreakpoint<DlvBreakpointProperties>> breakpoints = ContainerUtil.newConcurrentMap();\n\n  private class MyBreakpointHandler extends XBreakpointHandler<XLineBreakpoint<DlvBreakpointProperties>> {\n\n    public MyBreakpointHandler() {\n      super(DlvBreakpointType.class);\n    }\n\n    @Override\n    public void registerBreakpoint(@NotNull XLineBreakpoint<DlvBreakpointProperties> breakpoint) {\n      XSourcePosition breakpointPosition = breakpoint.getSourcePosition();\n      if (breakpointPosition == null) return;\n      VirtualFile file = breakpointPosition.getFile();\n      int line = breakpointPosition.getLine();\n      send(new DlvRequest.CreateBreakpoint(file.getPath(), line + 1))\n        .done(b -> {\n          breakpoint.putUserData(ID, b.id);\n          breakpoints.put(b.id, breakpoint);\n          getSession().updateBreakpointPresentation(breakpoint, AllIcons.Debugger.Db_verified_breakpoint, null);\n        })\n        .rejected(t -> {\n          String message = t == null ? null : t.getMessage();\n          getSession().updateBreakpointPresentation(breakpoint, AllIcons.Debugger.Db_invalid_breakpoint, message);\n        });\n    }\n\n    @Override\n    public void unregisterBreakpoint(@NotNull XLineBreakpoint<DlvBreakpointProperties> breakpoint, boolean temporary) {\n      XSourcePosition breakpointPosition = breakpoint.getSourcePosition();\n      if (breakpointPosition == null) return;\n      Integer id = breakpoint.getUserData(ID);\n      if (id == null) return; // obsolete\n      breakpoint.putUserData(ID, null);\n      breakpoints.remove(id);\n      send(new DlvRequest.ClearBreakpoint(id));\n    }\n  }\n}"
  },
  {
    "path": "src/com/goide/dlv/DlvRemoteVmConnection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.dlv;\n\nimport io.netty.bootstrap.Bootstrap;\nimport io.netty.channel.Channel;\nimport io.netty.channel.ChannelInitializer;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.concurrency.AsyncPromise;\nimport org.jetbrains.debugger.Vm;\nimport org.jetbrains.debugger.connection.RemoteVmConnection;\nimport org.jetbrains.io.NettyKt;\n\nimport java.net.InetSocketAddress;\n\npublic class DlvRemoteVmConnection extends RemoteVmConnection {\n  @NotNull\n  @Override\n  public Bootstrap createBootstrap(@NotNull InetSocketAddress address, @NotNull AsyncPromise<Vm> vmResult) {\n    return NettyKt.oioClientBootstrap().handler(new ChannelInitializer() {\n      @Override\n      protected void initChannel(@NotNull Channel channel) throws Exception {\n        vmResult.setResult(new DlvVm(getDebugEventListener(), channel));\n      }\n    });\n  }\n\n  @NotNull\n  @Override\n  protected String connectedAddressToPresentation(@NotNull InetSocketAddress address, @NotNull Vm vm) {\n    return address.toString();\n  }\n}"
  },
  {
    "path": "src/com/goide/dlv/DlvStackFrame.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.dlv;\n\nimport com.goide.GoIcons;\nimport com.goide.dlv.protocol.DlvApi;\nimport com.goide.dlv.protocol.DlvRequest;\nimport com.goide.psi.*;\nimport com.goide.sdk.GoSdkService;\nimport com.intellij.execution.configurations.ModuleBasedConfiguration;\nimport com.intellij.execution.configurations.RunProfile;\nimport com.intellij.icons.AllIcons;\nimport com.intellij.openapi.editor.Document;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.project.IndexNotReadyException;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.Ref;\nimport com.intellij.openapi.util.SystemInfo;\nimport com.intellij.openapi.util.TextRange;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.openapi.vfs.LocalFileSystem;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.psi.PsiDocumentManager;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport com.intellij.ui.ColoredTextContainer;\nimport com.intellij.ui.SimpleTextAttributes;\nimport com.intellij.xdebugger.XDebuggerUtil;\nimport com.intellij.xdebugger.XSourcePosition;\nimport com.intellij.xdebugger.evaluation.XDebuggerEvaluator;\nimport com.intellij.xdebugger.frame.XCompositeNode;\nimport com.intellij.xdebugger.frame.XStackFrame;\nimport com.intellij.xdebugger.frame.XValue;\nimport com.intellij.xdebugger.frame.XValueChildrenList;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\nimport org.jetbrains.concurrency.Promise;\n\nimport javax.swing.*;\n\nclass DlvStackFrame extends XStackFrame {\n  private final DlvDebugProcess myProcess;\n  private final DlvApi.Location myLocation;\n  private final DlvCommandProcessor myProcessor;\n  private final int myId;\n\n  public DlvStackFrame(@NotNull DlvDebugProcess process, \n                       @NotNull DlvApi.Location location, \n                       @NotNull DlvCommandProcessor processor, \n                       int id) {\n    myProcess = process;\n    myLocation = location;\n    myProcessor = processor;\n    myId = id;\n  }\n\n  @Nullable\n  @Override\n  public XDebuggerEvaluator getEvaluator() {\n    return new XDebuggerEvaluator() {\n      @Override\n      public void evaluate(@NotNull String expression,\n                           @NotNull XEvaluationCallback callback,\n                           @Nullable XSourcePosition expressionPosition) {\n        myProcessor.send(new DlvRequest.EvalSymbol(expression, myId))\n          .done(variable -> callback.evaluated(createXValue(variable, AllIcons.Debugger.Watch)))\n          .rejected(throwable -> callback.errorOccurred(throwable.getMessage()));\n      }\n      \n      @Nullable\n      private PsiElement findElementAt(@Nullable PsiFile file, int offset) {\n        return file != null ? file.findElementAt(offset) : null;\n      }\n\n      @Nullable\n      @Override\n      public TextRange getExpressionRangeAtOffset(@NotNull Project project,\n                                                  @NotNull Document document,\n                                                  int offset,\n                                                  boolean sideEffectsAllowed) {\n        Ref<TextRange> currentRange = Ref.create(null);\n        PsiDocumentManager.getInstance(project).commitAndRunReadAction(() -> {\n          try {\n            PsiElement elementAtCursor = findElementAt(PsiDocumentManager.getInstance(project).getPsiFile(document), offset);\n            GoTypeOwner e = PsiTreeUtil.getParentOfType(elementAtCursor,\n                                                        GoExpression.class,\n                                                        GoVarDefinition.class,\n                                                        GoConstDefinition.class,\n                                                        GoParamDefinition.class);\n            if (e != null) {\n              currentRange.set(e.getTextRange());\n            }\n          }\n          catch (IndexNotReadyException ignored) {\n          }\n        });\n        return currentRange.get();\n      }\n    };\n  }\n\n  @NotNull\n  private XValue createXValue(@NotNull DlvApi.Variable variable, @Nullable Icon icon) {\n    return new DlvXValue(myProcess, variable, myProcessor, myId, icon);\n  }\n\n  @Nullable\n  @Override\n  public XSourcePosition getSourcePosition() {\n    VirtualFile file = findFile();\n    return file == null ? null : XDebuggerUtil.getInstance().createPosition(file, myLocation.line - 1);\n  }\n\n  @Nullable\n  private VirtualFile findFile() {\n    String url = myLocation.file;\n    VirtualFile file = LocalFileSystem.getInstance().findFileByPath(url);\n    if (file == null && SystemInfo.isWindows) {\n      Project project = myProcess.getSession().getProject();\n      RunProfile profile = myProcess.getSession().getRunProfile();\n      Module module = profile instanceof ModuleBasedConfiguration ? ((ModuleBasedConfiguration)profile).getConfigurationModule().getModule() : null;\n      String sdkHomePath = GoSdkService.getInstance(project).getSdkHomePath(module);\n      if (sdkHomePath == null) return null;\n      String newUrl = StringUtil.replaceIgnoreCase(url, \"c:/go\", sdkHomePath);\n      return LocalFileSystem.getInstance().findFileByPath(newUrl);\n    }\n    return file;\n  }\n\n  @Override\n  public void customizePresentation(@NotNull ColoredTextContainer component) {\n    super.customizePresentation(component);\n    component.append(\" at \" + myLocation.function.name, SimpleTextAttributes.REGULAR_ATTRIBUTES);\n    component.setIcon(AllIcons.Debugger.StackFrame);\n  }\n\n  @NotNull\n  private <T> Promise<T> send(@NotNull DlvRequest<T> request) {\n    return DlvDebugProcess.send(request, myProcessor);\n  }\n\n  @Override\n  public void computeChildren(@NotNull XCompositeNode node) {\n    send(new DlvRequest.ListLocalVars(myId)).done(variables -> {\n      XValueChildrenList xVars = new XValueChildrenList(variables.size());\n      for (DlvApi.Variable v : variables) xVars.add(v.name, createXValue(v, GoIcons.VARIABLE));\n      send(new DlvRequest.ListFunctionArgs(myId)).done(args -> {\n        for (DlvApi.Variable v : args) xVars.add(v.name, createXValue(v, GoIcons.PARAMETER));\n        node.addChildren(xVars, true);\n      });\n    });\n  }\n}\n"
  },
  {
    "path": "src/com/goide/dlv/DlvSuspendContext.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.dlv;\n\nimport com.goide.dlv.protocol.DlvApi;\nimport com.intellij.util.containers.ContainerUtil;\nimport com.intellij.xdebugger.frame.XExecutionStack;\nimport com.intellij.xdebugger.frame.XStackFrame;\nimport com.intellij.xdebugger.frame.XSuspendContext;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.List;\n\nclass DlvSuspendContext extends XSuspendContext {\n  @NotNull private final DlvExecutionStack myStack;\n\n  public DlvSuspendContext(@NotNull DlvDebugProcess process,\n                           int threadId,\n                           @NotNull List<DlvApi.Location> locations,\n                           @NotNull DlvCommandProcessor processor) {\n    myStack = new DlvExecutionStack(process, threadId, locations, processor);\n  }\n\n  @Nullable\n  @Override\n  public XExecutionStack getActiveExecutionStack() {\n    return myStack;\n  }\n\n  @NotNull\n  @Override\n  public XExecutionStack[] getExecutionStacks() {\n    return new XExecutionStack[]{myStack};\n  }\n\n  private static class DlvExecutionStack extends XExecutionStack {\n    @NotNull private final DlvDebugProcess myProcess;\n    @NotNull private final List<DlvApi.Location> myLocations;\n    @NotNull private final DlvCommandProcessor myProcessor;\n    @NotNull private final List<DlvStackFrame> myStack;\n\n    public DlvExecutionStack(@NotNull DlvDebugProcess process,\n                             int threadId,\n                             @NotNull List<DlvApi.Location> locations,\n                             @NotNull DlvCommandProcessor processor) {\n      super(\"Thread #\" + threadId);\n      myProcess = process;\n      myLocations = locations;\n      myProcessor = processor;\n      myStack = ContainerUtil.newArrayListWithCapacity(locations.size());\n      for (int i = 0; i < myLocations.size(); i++) {\n        myStack.add(new DlvStackFrame(myProcess, myLocations.get(i), myProcessor, i));\n      }\n    }\n\n    @Nullable\n    @Override\n    public XStackFrame getTopFrame() {\n      return ContainerUtil.getFirstItem(myStack);\n    }\n\n    @Override\n    public void computeStackFrames(int firstFrameIndex, @NotNull XStackFrameContainer container) {\n      container.addStackFrames(myStack, true);\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/dlv/DlvVm.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.dlv;\n\nimport com.intellij.openapi.diagnostic.Logger;\nimport com.intellij.openapi.vfs.CharsetToolkit;\nimport io.netty.buffer.ByteBuf;\nimport io.netty.channel.Channel;\nimport io.netty.channel.ChannelHandlerContext;\nimport io.netty.handler.codec.json.JsonObjectDecoder;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.concurrency.Promise;\nimport org.jetbrains.debugger.*;\nimport org.jetbrains.io.ChannelBufferToString;\nimport org.jetbrains.io.SimpleChannelInboundHandlerAdapter;\nimport org.jetbrains.jsonProtocol.Request;\n\nimport java.io.IOException;\n\npublic class DlvVm extends VmBase {\n  private final static Logger LOG = Logger.getInstance(DlvVm.class);\n\n  @NotNull private final DlvCommandProcessor commandProcessor;\n  @NotNull private final StandaloneVmHelper vmHelper;\n  @NotNull private final DummyBreakpointManager breakpointManager = new DummyBreakpointManager();\n\n  public DlvVm(@NotNull DebugEventListener tabListener, @NotNull Channel channel) {\n    super(tabListener);\n\n    commandProcessor = new DlvCommandProcessor() {\n      @Override\n      public boolean write(@NotNull Request message) throws IOException {\n        ByteBuf content = message.getBuffer();\n        LOG.info(\"OUT: \" + content.toString(CharsetToolkit.UTF8_CHARSET));\n        return vmHelper.write(content);\n      }\n    };\n    vmHelper = new StandaloneVmHelper(this, commandProcessor, channel);\n\n    channel.pipeline().addLast(new JsonObjectDecoder(), new SimpleChannelInboundHandlerAdapter() {\n      @Override\n      protected void messageReceived(ChannelHandlerContext context, Object message) throws Exception {\n        if (message instanceof ByteBuf) {\n          LOG.info(\"IN: \" + ((ByteBuf)message).toString(CharsetToolkit.UTF8_CHARSET));\n          CharSequence string = ChannelBufferToString.readChars((ByteBuf)message);\n          JsonReaderEx ex = new JsonReaderEx(string);\n          getCommandProcessor().processIncomingJson(ex);\n        }\n      }\n    });\n  }\n\n  @NotNull\n  @Override\n  public AttachStateManager getAttachStateManager() {\n    return vmHelper;\n  }\n\n  @NotNull\n  public final DlvCommandProcessor getCommandProcessor() {\n    return commandProcessor;\n  }\n\n  @NotNull\n  @Override\n  public ScriptManagerBase<ScriptBase> getScriptManager() {\n    throw new UnsupportedOperationException();\n  }\n\n  @NotNull\n  @Override\n  public BreakpointManager getBreakpointManager() {\n    return breakpointManager;\n  }\n\n  /**\n   * Changed API between minor versions, runtime is compatible\n   * Todo: uncomment since 2016.2, when only the last build of 15.0 will be supported\n   */\n  @SuppressWarnings(\"unchecked\")\n  @NotNull\n  @Override\n  public SuspendContextManagerBase getSuspendContextManager() {\n    return new SuspendContextManagerBase() {\n      @NotNull\n      @Override\n      public Promise<Void> continueVm(@NotNull StepAction stepAction, int stepCount) {\n        return Promise.DONE;\n      }\n\n      @NotNull\n      @Override\n      protected DebugEventListener getDebugListener() {\n        return DlvVm.this.getDebugListener();\n      }\n\n      @NotNull\n      @Override\n      protected Promise<?> doSuspend() {\n        return Promise.DONE;\n      }\n    };\n  }\n}"
  },
  {
    "path": "src/com/goide/dlv/DlvXValue.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.dlv;\n\nimport com.goide.dlv.protocol.DlvApi;\nimport com.goide.dlv.protocol.DlvRequest;\nimport com.goide.psi.GoNamedElement;\nimport com.goide.psi.GoTopLevelDeclaration;\nimport com.goide.psi.GoTypeSpec;\nimport com.goide.stubs.index.GoTypesIndex;\nimport com.intellij.icons.AllIcons;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.openapi.application.ApplicationManager;\nimport com.intellij.openapi.editor.Editor;\nimport com.intellij.openapi.fileEditor.FileEditorManager;\nimport com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.Comparing;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.psi.PsiDocumentManager;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.SyntaxTraverser;\nimport com.intellij.psi.search.GlobalSearchScope;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport com.intellij.util.ThreeState;\nimport com.intellij.util.containers.ContainerUtil;\nimport com.intellij.xdebugger.XDebugSession;\nimport com.intellij.xdebugger.XDebuggerUtil;\nimport com.intellij.xdebugger.XSourcePosition;\nimport com.intellij.xdebugger.frame.*;\nimport com.intellij.xdebugger.frame.presentation.XNumericValuePresentation;\nimport com.intellij.xdebugger.frame.presentation.XRegularValuePresentation;\nimport com.intellij.xdebugger.frame.presentation.XStringValuePresentation;\nimport com.intellij.xdebugger.frame.presentation.XValuePresentation;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport javax.swing.*;\nimport java.util.Collection;\nimport java.util.Iterator;\nimport java.util.List;\nimport java.util.regex.Pattern;\n\nclass DlvXValue extends XNamedValue {\n  @NotNull\n  private final DlvApi.Variable myVariable;\n  private final Icon myIcon;\n  private final DlvDebugProcess myProcess;\n  private final DlvCommandProcessor myProcessor;\n  private final int myFrameId;\n\n  public DlvXValue(@NotNull DlvDebugProcess process,\n                   @NotNull DlvApi.Variable variable,\n                   @NotNull DlvCommandProcessor processor, \n                   int frameId, \n                   @Nullable Icon icon) {\n    super(variable.name);\n    myProcess = process;\n    myVariable = variable;\n    myIcon = icon;\n    myProcessor = processor;\n    myFrameId = frameId;\n  }\n\n  @Override\n  public void computePresentation(@NotNull XValueNode node, @NotNull XValuePlace place) {\n    XValuePresentation presentation = getPresentation();\n    boolean hasChildren = myVariable.children.length > 0;\n    node.setPresentation(myIcon, presentation, hasChildren);\n  }\n\n  @Override\n  public void computeChildren(@NotNull XCompositeNode node) {\n    DlvApi.Variable[] children = myVariable.children;\n    if (children.length == 0) {\n      super.computeChildren(node);\n    }\n    else {\n      XValueChildrenList list = new XValueChildrenList();\n      for (DlvApi.Variable child : children) {\n        list.add(child.name, new DlvXValue(myProcess, child, myProcessor, myFrameId, AllIcons.Nodes.Field));\n      }\n      node.addChildren(list, true);\n    }\n  }\n\n  @Nullable\n  @Override\n  public XValueModifier getModifier() {\n    return new XValueModifier() {\n      @Override\n      public void setValue(@NotNull String newValue, @NotNull XModificationCallback callback) {\n        myProcessor.send(new DlvRequest.SetSymbol(myVariable.name, newValue, myFrameId))\n          .processed(o -> {\n            if (o != null) {\n              callback.valueModified();\n            }\n          })\n          .rejected(throwable -> callback.errorOccurred(throwable.getMessage()));\n      }\n    };\n  }\n\n  @NotNull\n  private XValuePresentation getPresentation() {\n    String value = myVariable.value;\n    if (myVariable.isNumber()) return new XNumericValuePresentation(value);\n    if (myVariable.isString()) return new XStringValuePresentation(value);\n    if (myVariable.isBool()) {\n      return new XValuePresentation() {\n        @Override\n        public void renderValue(@NotNull XValueTextRenderer renderer) {\n          renderer.renderValue(value);\n        }\n      };\n    }\n    String type = myVariable.type;\n    boolean isSlice = myVariable.isSlice();\n    boolean isArray = myVariable.isArray();\n    if (isSlice || isArray) {\n      return new XRegularValuePresentation(\"len:\" + myVariable.len + (isSlice ? \", cap:\" + myVariable.cap : \"\"),\n                                           type.replaceFirst(\"struct \", \"\"));\n    }\n    String prefix = myVariable.type + \" \";\n    return new XRegularValuePresentation(StringUtil.startsWith(value, prefix) ? value.replaceFirst(Pattern.quote(prefix), \"\") : value,\n                                         type);\n  }\n\n  @Nullable\n  private static PsiElement findTargetElement(@NotNull Project project,\n                                              @NotNull XSourcePosition position,\n                                              @NotNull Editor editor,\n                                              @NotNull String name) {\n    PsiFile file = PsiDocumentManager.getInstance(project).getPsiFile(editor.getDocument());\n    if (file == null || !file.getVirtualFile().equals(position.getFile())) return null;\n    ASTNode leafElement = file.getNode().findLeafElementAt(position.getOffset());\n    if (leafElement == null) return null;\n    GoTopLevelDeclaration topLevel = PsiTreeUtil.getTopmostParentOfType(leafElement.getPsi(), GoTopLevelDeclaration.class);\n    SyntaxTraverser<PsiElement> traverser = SyntaxTraverser.psiTraverser(topLevel)\n      .filter(e -> e instanceof GoNamedElement && Comparing.equal(name, ((GoNamedElement)e).getName()));\n    Iterator<PsiElement> iterator = traverser.iterator();\n    return iterator.hasNext() ? iterator.next() : null;\n  }\n\n  @Override\n  public void computeSourcePosition(@NotNull XNavigatable navigatable) {\n    readActionInPooledThread(new Runnable() {\n      @Override\n      public void run() {\n        navigatable.setSourcePosition(findPosition());\n      }\n\n      @Nullable\n      private XSourcePosition findPosition() {\n        XDebugSession debugSession = getSession();\n        if (debugSession == null) return null;\n        XStackFrame stackFrame = debugSession.getCurrentStackFrame();\n        if (stackFrame == null) return null;\n        Project project = debugSession.getProject();\n        XSourcePosition position = debugSession.getCurrentPosition();\n        Editor editor = ((FileEditorManagerImpl)FileEditorManager.getInstance(project)).getSelectedTextEditor(true);\n        if (editor == null || position == null) return null;\n        String name = myName.startsWith(\"&\") ? myName.replaceFirst(\"\\\\&\", \"\") : myName;\n        PsiElement resolved = findTargetElement(project, position, editor, name);\n        if (resolved == null) return null;\n        VirtualFile virtualFile = resolved.getContainingFile().getVirtualFile();\n        return XDebuggerUtil.getInstance().createPositionByOffset(virtualFile, resolved.getTextOffset());\n      }\n    });\n  }\n\n  private static void readActionInPooledThread(@NotNull Runnable runnable) {\n    ApplicationManager.getApplication().executeOnPooledThread(() -> ApplicationManager.getApplication().runReadAction(runnable));\n  }\n\n  @Nullable\n  private Project getProject() {\n    XDebugSession session = getSession();\n    return session != null ? session.getProject() : null;\n  }\n\n  @Nullable\n  private XDebugSession getSession() {\n    return myProcess.getSession();\n  }\n\n  @NotNull\n  @Override\n  public ThreeState computeInlineDebuggerData(@NotNull XInlineDebuggerDataCallback callback) {\n    computeSourcePosition(callback::computed);\n    return ThreeState.YES;\n  }\n\n  @Override\n  public boolean canNavigateToSource() {\n    return true; // for the future compatibility\n  }\n\n  @Override\n  public boolean canNavigateToTypeSource() {\n    return (myVariable.isStructure() || myVariable.isPtr()) && getProject() != null;\n  }\n\n  @Override\n  public void computeTypeSourcePosition(@NotNull XNavigatable navigatable) {\n    readActionInPooledThread(() -> {\n      boolean isStructure = myVariable.isStructure();\n      boolean isPtr = myVariable.isPtr();\n      if (!isStructure && !isPtr) return;\n      Project project = getProject();\n      if (project == null) return;\n      String dlvType = myVariable.type;\n      String fqn = dlvType.replaceFirst(isPtr ? \"\\\\*struct \" : \"struct \", \"\");\n      List<String> split = StringUtil.split(fqn, \".\");\n      boolean noFqn = split.size() == 1;\n      if (split.size() == 2 || noFqn) {\n        String name = ContainerUtil.getLastItem(split);\n        assert name != null;\n        Collection<GoTypeSpec> types = GoTypesIndex.find(name, project, GlobalSearchScope.allScope(project), null);\n        for (GoTypeSpec type : types) {\n          if (noFqn || Comparing.equal(fqn, type.getQualifiedName())) {\n            navigatable.setSourcePosition(XDebuggerUtil.getInstance().createPositionByOffset(\n              type.getContainingFile().getVirtualFile(), type.getTextOffset()));\n            return;\n          }\n        }\n      }\n    });\n  }\n}\n"
  },
  {
    "path": "src/com/goide/dlv/JsonReaderEx.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.dlv;\n\nimport com.google.gson.JsonParseException;\nimport com.google.gson.stream.JsonReader;\nimport com.google.gson.stream.JsonToken;\nimport com.intellij.util.text.CharSequenceReader;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.io.Closeable;\nimport java.util.Arrays;\n\npublic final class JsonReaderEx implements Closeable {\n  /**\n   * The only non-execute prefix this parser permits\n   */\n  private static final char[] NON_EXECUTE_PREFIX = \")]}'\\n\".toCharArray();\n  private static final long MIN_INCOMPLETE_INTEGER = Long.MIN_VALUE / 10;\n\n  private static final int PEEKED_NONE = 0;\n  private static final int PEEKED_BEGIN_OBJECT = 1;\n  private static final int PEEKED_END_OBJECT = 2;\n  private static final int PEEKED_BEGIN_ARRAY = 3;\n  private static final int PEEKED_END_ARRAY = 4;\n  private static final int PEEKED_TRUE = 5;\n  private static final int PEEKED_FALSE = 6;\n  private static final int PEEKED_NULL = 7;\n  private static final int PEEKED_SINGLE_QUOTED = 8;\n  private static final int PEEKED_DOUBLE_QUOTED = 9;\n  private static final int PEEKED_UNQUOTED = 10;\n  /**\n   * When this is returned, the string value is stored in peekedString.\n   */\n  private static final int PEEKED_BUFFERED = 11;\n  private static final int PEEKED_SINGLE_QUOTED_NAME = 12;\n  private static final int PEEKED_DOUBLE_QUOTED_NAME = 13;\n  private static final int PEEKED_UNQUOTED_NAME = 14;\n  /**\n   * When this is returned, the integer value is stored in peekedLong.\n   */\n  private static final int PEEKED_LONG = 15;\n  private static final int PEEKED_NUMBER = 16;\n  private static final int PEEKED_EOF = 17;\n\n  /* State machine when parsing numbers */\n  private static final int NUMBER_CHAR_NONE = 0;\n  private static final int NUMBER_CHAR_SIGN = 1;\n  private static final int NUMBER_CHAR_DIGIT = 2;\n  private static final int NUMBER_CHAR_DECIMAL = 3;\n  private static final int NUMBER_CHAR_FRACTION_DIGIT = 4;\n  private static final int NUMBER_CHAR_EXP_E = 5;\n  private static final int NUMBER_CHAR_EXP_SIGN = 6;\n  private static final int NUMBER_CHAR_EXP_DIGIT = 7;\n\n  @NotNull private final CharSequence in;\n\n  /**\n   * True to accept non-spec compliant JSON\n   */\n  private boolean lenient = false;\n\n  private int position;\n  private final int limit;\n\n  private int peeked = PEEKED_NONE;\n\n  /**\n   * A peeked value that was composed entirely of digits with an optional\n   * leading dash. Positive values may not have a leading 0.\n   */\n  private long peekedLong;\n\n  /**\n   * The number of characters in a peeked number literal. Increment 'pos' by\n   * this after reading a number.\n   */\n  private int peekedNumberLength;\n\n  /**\n   * A peeked string that should be parsed on the next double, long or string.\n   * This is populated before a numeric value is parsed and used if that parsing\n   * fails.\n   */\n  @Nullable private String peekedString;\n\n  /*\n   * The nesting stack. Using a manual array rather than an ArrayList saves 20%.\n   */\n  private int[] stack;\n  private int stackSize = 0;\n\n  private StringBuilder builder;\n\n  /**\n   * Creates a new instance that reads a JSON-encoded stream from {@code in}.\n   */\n  public JsonReaderEx(@NotNull CharSequence in) {\n    this(in, 0);\n  }\n\n  public JsonReaderEx(@NotNull CharSequence in, int start) {\n    this(in, start, new int[32]);\n\n    stack[stackSize++] = JsonScope.EMPTY_DOCUMENT;\n  }\n\n  private JsonReaderEx(@NotNull CharSequence in, int start, @NotNull int[] stack) {\n    this.in = in;\n    position = start;\n    limit = in.length();\n    this.stack = stack;\n  }\n\n  private final static class JsonScope {\n    /**\n     * An array with no elements requires no separators or newlines before\n     * it is closed.\n     */\n    static final int EMPTY_ARRAY = 1;\n\n    /**\n     * A array with at least one value requires a comma and newline before\n     * the next element.\n     */\n    static final int NONEMPTY_ARRAY = 2;\n\n    /**\n     * An object with no name/value pairs requires no separators or newlines\n     * before it is closed.\n     */\n    static final int EMPTY_OBJECT = 3;\n\n    /**\n     * An object whose most recent element is a key. The next element must\n     * be a value.\n     */\n    static final int DANGLING_NAME = 4;\n\n    /**\n     * An object with at least one name/value pair requires a comma and\n     * newline before the next element.\n     */\n    static final int NONEMPTY_OBJECT = 5;\n\n    /**\n     * No object or array has been started.\n     */\n    static final int EMPTY_DOCUMENT = 6;\n\n    /**\n     * A document with at an array or object.\n     */\n    static final int NONEMPTY_DOCUMENT = 7;\n\n    /**\n     * A document that's been closed and cannot be accessed.\n     */\n    static final int CLOSED = 8;\n  }\n\n  @Nullable\n  public JsonReaderEx subReader() {\n    JsonToken nextToken = peek();\n    switch (nextToken) {\n      case BEGIN_ARRAY:\n      case BEGIN_OBJECT:\n      case STRING:\n      case NUMBER:\n      case BOOLEAN:\n        break;\n      case NULL:\n        // just return null\n        return null;\n      default:\n        throw createParseError(\"Cannot create sub reader, next token \" + nextToken + \" is not value\");\n    }\n\n    JsonReaderEx subReader = new JsonReaderEx(in, position, Arrays.copyOf(stack, stack.length));\n    subReader.stackSize = stackSize;\n    subReader.peeked = peeked;\n    subReader.peekedLong = peekedLong;\n    subReader.peekedNumberLength = peekedNumberLength;\n    subReader.peekedString = peekedString;\n    return subReader;\n  }\n\n  @NotNull\n  public JsonReader asGson() {\n    JsonToken nextToken = peek();\n    switch (nextToken) {\n      case BEGIN_ARRAY:\n      case BEGIN_OBJECT:\n      case STRING:\n      case NUMBER:\n      case BOOLEAN:\n        break;\n      default:\n        throw createParseError(\"Cannot create sub reader, next token \" + nextToken + \" is not value\");\n    }\n\n    CharSequence sequence = position > 0 ? in.subSequence(position - 1, in.length()) : in;\n    return new JsonReader(new CharSequenceReader(sequence));\n  }\n\n  /**\n   * Consumes the next token from the JSON stream and asserts that it is the\n   * beginning of a new object.\n   */\n  @NotNull\n  public JsonReaderEx beginObject() {\n    int p = peeked;\n    if (p == PEEKED_NONE) {\n      p = doPeek();\n    }\n    if (p == PEEKED_BEGIN_OBJECT) {\n      push(JsonScope.EMPTY_OBJECT);\n      peeked = PEEKED_NONE;\n    }\n    else {\n      throw createParseError(\"Expected BEGIN_OBJECT but was \" + peek());\n    }\n    return this;\n  }\n\n  /**\n   * Consumes the next token from the JSON stream and asserts that it is the\n   * end of the current object.\n   */\n  public void endObject() {\n    int p = peeked;\n    if (p == PEEKED_NONE) {\n      p = doPeek();\n    }\n    if (p == PEEKED_END_OBJECT) {\n      stackSize--;\n      peeked = PEEKED_NONE;\n    }\n    else {\n      throw new IllegalStateException(\"Expected END_OBJECT but was \" + peek());\n    }\n  }\n\n  /**\n   * Returns true if the current array or object has another element.\n   */\n  public boolean hasNext() {\n    int p = peeked;\n    if (p == PEEKED_NONE) {\n      p = doPeek();\n    }\n    return p != PEEKED_END_OBJECT && p != PEEKED_END_ARRAY;\n  }\n\n  /**\n   * Returns the type of the next token without consuming it.\n   */\n  @NotNull\n  public JsonToken peek() {\n    int p = peeked;\n    if (p == PEEKED_NONE) {\n      p = doPeek();\n    }\n\n    switch (p) {\n      case PEEKED_BEGIN_OBJECT:\n        return JsonToken.BEGIN_OBJECT;\n      case PEEKED_END_OBJECT:\n        return JsonToken.END_OBJECT;\n      case PEEKED_BEGIN_ARRAY:\n        return JsonToken.BEGIN_ARRAY;\n      case PEEKED_END_ARRAY:\n        return JsonToken.END_ARRAY;\n      case PEEKED_SINGLE_QUOTED_NAME:\n      case PEEKED_DOUBLE_QUOTED_NAME:\n      case PEEKED_UNQUOTED_NAME:\n        return JsonToken.NAME;\n      case PEEKED_TRUE:\n      case PEEKED_FALSE:\n        return JsonToken.BOOLEAN;\n      case PEEKED_NULL:\n        return JsonToken.NULL;\n      case PEEKED_SINGLE_QUOTED:\n      case PEEKED_DOUBLE_QUOTED:\n      case PEEKED_UNQUOTED:\n      case PEEKED_BUFFERED:\n        return JsonToken.STRING;\n      case PEEKED_LONG:\n      case PEEKED_NUMBER:\n        return JsonToken.NUMBER;\n      case PEEKED_EOF:\n        return JsonToken.END_DOCUMENT;\n      default:\n        throw new AssertionError();\n    }\n  }\n\n  private int doPeek() {\n    int peekStack = stack[stackSize - 1];\n    if (peekStack == JsonScope.EMPTY_ARRAY) {\n      stack[stackSize - 1] = JsonScope.NONEMPTY_ARRAY;\n    }\n    else if (peekStack == JsonScope.NONEMPTY_ARRAY) {\n      // Look for a comma before the next element.\n      int c = nextNonWhitespace(true);\n      switch (c) {\n        case ']':\n          return peeked = PEEKED_END_ARRAY;\n        case ';':\n          checkLenient(); // fall-through\n        case ',':\n          break;\n        default:\n          throw createParseError(\"Unterminated array\");\n      }\n    }\n    else if (peekStack == JsonScope.EMPTY_OBJECT || peekStack == JsonScope.NONEMPTY_OBJECT) {\n      stack[stackSize - 1] = JsonScope.DANGLING_NAME;\n      // Look for a comma before the next element.\n      if (peekStack == JsonScope.NONEMPTY_OBJECT) {\n        int c = nextNonWhitespace(true);\n        switch (c) {\n          case '}':\n            return peeked = PEEKED_END_OBJECT;\n          case ';':\n            checkLenient(); // fall-through\n          case ',':\n            break;\n          default:\n            throw createParseError(\"Unterminated object\");\n        }\n      }\n      int c = nextNonWhitespace(true);\n      switch (c) {\n        case '\"':\n          return peeked = PEEKED_DOUBLE_QUOTED_NAME;\n        case '\\'':\n          checkLenient();\n          return peeked = PEEKED_SINGLE_QUOTED_NAME;\n        case '}':\n          if (peekStack != JsonScope.NONEMPTY_OBJECT) {\n            return peeked = PEEKED_END_OBJECT;\n          }\n          else {\n            throw createParseError(\"Expected name\");\n          }\n        default:\n          checkLenient();\n          position--; // Don't consume the first character in an unquoted string.\n          if (isLiteral((char)c)) {\n            return peeked = PEEKED_UNQUOTED_NAME;\n          }\n          else {\n            throw createParseError(\"Expected name\");\n          }\n      }\n    }\n    else if (peekStack == JsonScope.DANGLING_NAME) {\n      stack[stackSize - 1] = JsonScope.NONEMPTY_OBJECT;\n      // Look for a colon before the value.\n      int c = nextNonWhitespace(true);\n      switch (c) {\n        case ':':\n          break;\n        case '=':\n          checkLenient();\n          if (position < limit && in.charAt(position) == '>') {\n            position++;\n          }\n          break;\n        default:\n          throw createParseError(\"Expected ':'\");\n      }\n    }\n    else if (peekStack == JsonScope.EMPTY_DOCUMENT) {\n      if (lenient) {\n        consumeNonExecutePrefix();\n      }\n      stack[stackSize - 1] = JsonScope.NONEMPTY_DOCUMENT;\n    }\n    else if (peekStack == JsonScope.NONEMPTY_DOCUMENT) {\n      int c = nextNonWhitespace(false);\n      if (c == -1) {\n        return peeked = PEEKED_EOF;\n      }\n      else {\n        checkLenient();\n        position--;\n      }\n    }\n    else if (peekStack == JsonScope.CLOSED) {\n      throw new IllegalStateException(\"JsonReader is closed\");\n    }\n\n    int c = nextNonWhitespace(true);\n    switch (c) {\n      case ']':\n        if (peekStack == JsonScope.EMPTY_ARRAY) {\n          return peeked = PEEKED_END_ARRAY;\n        }\n        // fall-through to handle \",]\"\n      case ';':\n      case ',':\n        // In lenient mode, a 0-length literal in an array means 'null'.\n        if (peekStack == JsonScope.EMPTY_ARRAY || peekStack == JsonScope.NONEMPTY_ARRAY) {\n          checkLenient();\n          position--;\n          return peeked = PEEKED_NULL;\n        }\n        else {\n          throw createParseError(\"Unexpected value\");\n        }\n      case '\\'':\n        checkLenient();\n        return peeked = PEEKED_SINGLE_QUOTED;\n      case '\"':\n        if (stackSize == 1) {\n          checkLenient();\n        }\n        return peeked = PEEKED_DOUBLE_QUOTED;\n      case '[':\n        return peeked = PEEKED_BEGIN_ARRAY;\n      case '{':\n        return peeked = PEEKED_BEGIN_OBJECT;\n      default:\n        position--; // Don't consume the first character in a literal value.\n    }\n\n    if (stackSize == 1) {\n      checkLenient(); // Top-level value isn't an array or an object.\n    }\n\n    int result = peekKeyword();\n    if (result != PEEKED_NONE) {\n      return result;\n    }\n\n    result = peekNumber();\n    if (result != PEEKED_NONE) {\n      return result;\n    }\n\n    if (!isLiteral(in.charAt(position))) {\n      throw createParseError(\"Expected value\");\n    }\n\n    checkLenient();\n    return peeked = PEEKED_UNQUOTED;\n  }\n\n  private int peekKeyword() {\n    // Figure out which keyword we're matching against by its first character.\n    char c = in.charAt(position);\n    String keyword;\n    String keywordUpper;\n    int peeking;\n    if (c == 't' || c == 'T') {\n      keyword = \"true\";\n      keywordUpper = \"TRUE\";\n      peeking = PEEKED_TRUE;\n    }\n    else if (c == 'f' || c == 'F') {\n      keyword = \"false\";\n      keywordUpper = \"FALSE\";\n      peeking = PEEKED_FALSE;\n    }\n    else if (c == 'n' || c == 'N') {\n      keyword = \"null\";\n      keywordUpper = \"NULL\";\n      peeking = PEEKED_NULL;\n    }\n    else {\n      return PEEKED_NONE;\n    }\n\n    // Confirm that chars [1..length) match the keyword.\n    int length = keyword.length();\n    for (int i = 1; i < length; i++) {\n      if (position + i >= limit) {\n        return PEEKED_NONE;\n      }\n      c = in.charAt(position + i);\n      if (c != keyword.charAt(i) && c != keywordUpper.charAt(i)) {\n        return PEEKED_NONE;\n      }\n    }\n\n    if ((position + length < limit) && isLiteral(in.charAt(position + length))) {\n      return PEEKED_NONE; // Don't match trues, falsey or nullsoft!\n    }\n\n    // We've found the keyword followed either by EOF or by a non-literal character.\n    position += length;\n    return peeked = peeking;\n  }\n\n  @SuppressWarnings(\"ConstantConditions\")\n  private int peekNumber() {\n    // Like nextNonWhitespace, this uses locals 'p' and 'l' to save inner-loop field access.\n    CharSequence in = this.in;\n    int p = position;\n    int l = limit;\n\n    long value = 0; // Negative to accommodate Long.MIN_VALUE more easily.\n    boolean negative = false;\n    boolean fitsInLong = true;\n    int last = NUMBER_CHAR_NONE;\n\n    int i = 0;\n\n    charactersOfNumber:\n    for (; true; i++) {\n      if (p + i == l) {\n        if (i == limit) {\n          // Though this looks like a well-formed number, it's too long to continue reading. Give up\n          // and let the application handle this as an unquoted literal.\n          return PEEKED_NONE;\n        }\n        p = position;\n        l = limit;\n      }\n\n      char c = in.charAt(p + i);\n      switch (c) {\n        case '-':\n          if (last == NUMBER_CHAR_NONE) {\n            negative = true;\n            last = NUMBER_CHAR_SIGN;\n            continue;\n          }\n          else if (last == NUMBER_CHAR_EXP_E) {\n            last = NUMBER_CHAR_EXP_SIGN;\n            continue;\n          }\n          return PEEKED_NONE;\n\n        case '+':\n          if (last == NUMBER_CHAR_EXP_E) {\n            last = NUMBER_CHAR_EXP_SIGN;\n            continue;\n          }\n          return PEEKED_NONE;\n\n        case 'e':\n        case 'E':\n          if (last == NUMBER_CHAR_DIGIT || last == NUMBER_CHAR_FRACTION_DIGIT) {\n            last = NUMBER_CHAR_EXP_E;\n            continue;\n          }\n          return PEEKED_NONE;\n\n        case '.':\n          if (last == NUMBER_CHAR_DIGIT) {\n            last = NUMBER_CHAR_DECIMAL;\n            continue;\n          }\n          return PEEKED_NONE;\n\n        default:\n          if (c < '0' || c > '9') {\n            if (!isLiteral(c)) {\n              break charactersOfNumber;\n            }\n            return PEEKED_NONE;\n          }\n          if (last == NUMBER_CHAR_SIGN || last == NUMBER_CHAR_NONE) {\n            value = -(c - '0');\n            last = NUMBER_CHAR_DIGIT;\n          }\n          else if (last == NUMBER_CHAR_DIGIT) {\n            if (value == 0) {\n              return PEEKED_NONE; // Leading '0' prefix is not allowed (since it could be octal).\n            }\n            long newValue = value * 10 - (c - '0');\n            fitsInLong &= value > MIN_INCOMPLETE_INTEGER\n                          || (value == MIN_INCOMPLETE_INTEGER && newValue < value);\n            value = newValue;\n          }\n          else if (last == NUMBER_CHAR_DECIMAL) {\n            last = NUMBER_CHAR_FRACTION_DIGIT;\n          }\n          else if (last == NUMBER_CHAR_EXP_E || last == NUMBER_CHAR_EXP_SIGN) {\n            last = NUMBER_CHAR_EXP_DIGIT;\n          }\n      }\n    }\n\n    // We've read a complete number. Decide if it's a PEEKED_LONG or a PEEKED_NUMBER.\n    if (last == NUMBER_CHAR_DIGIT && fitsInLong && (value != Long.MIN_VALUE || negative)) {\n      peekedLong = negative ? value : -value;\n      position += i;\n      return peeked = PEEKED_LONG;\n    }\n    else if (last == NUMBER_CHAR_DIGIT || last == NUMBER_CHAR_FRACTION_DIGIT || last == NUMBER_CHAR_EXP_DIGIT) {\n      peekedNumberLength = i;\n      return peeked = PEEKED_NUMBER;\n    }\n    else {\n      return PEEKED_NONE;\n    }\n  }\n\n  /**\n   * Consumes the non-execute prefix if it exists.\n   */\n  private void consumeNonExecutePrefix() {\n    // fast forward through the leading whitespace\n    nextNonWhitespace(true);\n    position--;\n\n    if (position + NON_EXECUTE_PREFIX.length > limit) {\n      return;\n    }\n\n    for (int i = 0; i < NON_EXECUTE_PREFIX.length; i++) {\n      if (in.charAt(position + i) != NON_EXECUTE_PREFIX[i]) {\n        return; // not a security token!\n      }\n    }\n\n    // we consumed a security token!\n    position += NON_EXECUTE_PREFIX.length;\n  }\n\n  private boolean isLiteral(char c) {\n    switch (c) {\n      case '/':\n      case '\\\\':\n      case ';':\n      case '#':\n      case '=':\n        checkLenient(); // fall-through\n      case '{':\n      case '}':\n      case '[':\n      case ']':\n      case ':':\n      case ',':\n      case ' ':\n      case '\\t':\n      case '\\f':\n      case '\\r':\n      case '\\n':\n        return false;\n      default:\n        return true;\n    }\n  }\n\n  /**\n   * Returns the next token, a {@link JsonToken#NAME property name}, and consumes it\n   */\n  @Nullable\n  public String nextName() {\n    String result = nextNameOrNull();\n    if (result == null) {\n      throw createParseError(\"Expected a name but was \" + peek());\n    }\n    return result;\n  }\n\n  @Nullable\n  public String nextNameOrNull() {\n    int p = peeked;\n    if (p == PEEKED_NONE) {\n      p = doPeek();\n    }\n    String result;\n    if (p == PEEKED_UNQUOTED_NAME) {\n      result = nextUnquotedValue();\n    }\n    else if (p == PEEKED_SINGLE_QUOTED_NAME) {\n      result = nextQuotedValue('\\'');\n    }\n    else if (p == PEEKED_DOUBLE_QUOTED_NAME) {\n      result = nextQuotedValue('\"');\n    }\n    else {\n      if (p != PEEKED_END_OBJECT && p != PEEKED_END_ARRAY) {\n        throw createParseError(\"Expected a name but was \" + peek());\n      }\n      return null;\n    }\n    peeked = PEEKED_NONE;\n    return result;\n  }\n\n  @Nullable\n  public String nextString() {\n    return nextString(false);\n  }\n\n  /**\n   * Returns the {@link JsonToken#STRING string} value of the next token,\n   * consuming it. If the next token is a number, this method will return its\n   * string form.\n   *\n   * @throws IllegalStateException if the next token is not a string or if\n   *                               this reader is closed.\n   */\n  @Nullable\n  public String nextString(boolean anyPrimitiveAsString) {\n    int p = peeked;\n    if (p == PEEKED_NONE) {\n      p = doPeek();\n    }\n    String result;\n    if (p == PEEKED_UNQUOTED) {\n      result = nextUnquotedValue();\n    }\n    else if (p == PEEKED_SINGLE_QUOTED) {\n      result = nextQuotedValue('\\'');\n    }\n    else if (p == PEEKED_DOUBLE_QUOTED) {\n      result = nextQuotedValue('\"');\n    }\n    else if (p == PEEKED_BUFFERED) {\n      result = peekedString;\n      peekedString = null;\n    }\n    else if (p == PEEKED_LONG) {\n      result = Long.toString(peekedLong);\n    }\n    else if (p == PEEKED_NUMBER) {\n      int end = position + peekedNumberLength;\n      result = in.subSequence(position, end).toString();\n      position = end;\n    }\n    else if (anyPrimitiveAsString && p == PEEKED_TRUE) {\n      result = \"true\";\n    }\n    else if (anyPrimitiveAsString && p == PEEKED_FALSE) {\n      result = \"false\";\n    }\n    else if (anyPrimitiveAsString && p == PEEKED_NULL) {\n      result = \"null\";\n    }\n    else {\n      throw createParseError(\"Expected a string but was \" + peek());\n    }\n    peeked = PEEKED_NONE;\n    return result;\n  }\n\n  /**\n   * Consumes the next token from the JSON stream and asserts that it is a\n   * literal null.\n   *\n   * @throws IllegalStateException if the next token is not null or if this\n   *                               reader is closed.\n   */\n  public void nextNull() {\n    int p = peeked;\n    if (p == PEEKED_NONE) {\n      p = doPeek();\n    }\n    if (p == PEEKED_NULL) {\n      peeked = PEEKED_NONE;\n    }\n    else {\n      throw createParseError(\"Expected null but was \" + peek());\n    }\n  }\n\n  /**\n   * Returns the string up to but not including {@code quote}, unescaping any\n   * character escape sequences encountered along the way. The opening quote\n   * should have already been read. This consumes the closing quote, but does\n   * not include it in the returned string.\n   *\n   * @param quote either ' or \".\n   * @throws NumberFormatException if any unicode escape sequences are\n   *                               malformed.\n   */\n  @NotNull\n  private String nextQuotedValue(char quote) {\n    // Like nextNonWhitespace, this uses locals 'p' and 'l' to save inner-loop field access.\n    CharSequence in = this.in;\n\n    int p = position;\n    int l = limit;\n    // the index of the first character not yet appended to the builder\n    int start = p;\n    StringBuilder builder = null;\n    while (p < l) {\n      char c = in.charAt(p++);\n      if (c == quote) {\n        position = p;\n        if (builder == null) {\n          return in.subSequence(start, p - 1).toString();\n        }\n        else {\n          return builder.append(in, start, p - 1).toString();\n        }\n      }\n      else if (c == '\\\\') {\n        position = p;\n        if (builder == null) {\n          if (this.builder == null) {\n            this.builder = new StringBuilder((p - start) + 16);\n          }\n          else {\n            this.builder.setLength(0);\n          }\n          builder = this.builder;\n        }\n        builder.append(in, start, p - 1);\n        builder.append(readEscapeCharacter());\n        p = position;\n        l = limit;\n        start = p;\n      }\n      //else if (c == '\\n') {\n      //  //lineNumber++;\n      //  //lineStart = p;\n      //}\n    }\n    position = p;\n    throw createParseError(\"Unterminated string\");\n  }\n\n  /**\n   * Returns an unquoted value as a string.\n   */\n  @NotNull\n  private String nextUnquotedValue() {\n    int i = position;\n    findNonLiteralCharacter:\n    for (; i < limit; i++) {\n      switch (in.charAt(i)) {\n        case '/':\n        case '\\\\':\n        case ';':\n        case '#':\n        case '=':\n          checkLenient(); // fall-through\n        case '{':\n        case '}':\n        case '[':\n        case ']':\n        case ':':\n        case ',':\n        case ' ':\n        case '\\t':\n        case '\\f':\n        case '\\r':\n        case '\\n':\n          break findNonLiteralCharacter;\n      }\n    }\n\n    String result = in.subSequence(position, i).toString();\n    position = i;\n    return result;\n  }\n\n  private void skipQuotedValue(char quote) {\n    // Like nextNonWhitespace, this uses locals 'p' and 'l' to save inner-loop field access.\n    CharSequence in = this.in;\n    int p = position;\n    int l = limit;\n    // the index of the first character not yet appended to the builder\n    while (p < l) {\n      int c = in.charAt(p++);\n      if (c == quote) {\n        position = p;\n        return;\n      }\n      else if (c == '\\\\') {\n        position = p;\n        readEscapeCharacter();\n        p = position;\n        l = limit;\n      }\n      //else if (c == '\\n') {\n      //  //lineNumber++;\n      //  //lineStart = p;\n      //}\n    }\n    position = p;\n    throw createParseError(\"Unterminated string\");\n  }\n\n  private void skipUnquotedValue() {\n    int i = position;\n    for (; i < limit; i++) {\n      switch (in.charAt(i)) {\n        case '/':\n        case '\\\\':\n        case ';':\n        case '#':\n        case '=':\n          checkLenient(); // fall-through\n        case '{':\n        case '}':\n        case '[':\n        case ']':\n        case ':':\n        case ',':\n        case ' ':\n        case '\\t':\n        case '\\f':\n        case '\\r':\n        case '\\n':\n          position = i;\n          return;\n      }\n    }\n    position = i;\n  }\n\n  /**\n   * Returns the {@link JsonToken#NUMBER int} value of the next token,\n   * consuming it. If the next token is a string, this method will attempt to\n   * parse it as an int. If the next token's numeric value cannot be exactly\n   * represented by a Java {@code int}, this method throws.\n   *\n   * @throws IllegalStateException if the next token is not a literal value.\n   * @throws NumberFormatException if the next literal value cannot be parsed\n   *                               as a number, or exactly represented as an int.\n   */\n  public int nextInt() {\n    int p = peeked;\n    if (p == PEEKED_NONE) {\n      p = doPeek();\n    }\n\n    int result;\n    if (p == PEEKED_LONG) {\n      result = (int)peekedLong;\n      if (peekedLong != result) { // Make sure no precision was lost casting to 'int'.\n        throw new NumberFormatException(\"Expected an int but was \" + peekedLong\n                                        + \" at line \" + getLineNumber() + \" column \" + getColumnNumber());\n      }\n      peeked = PEEKED_NONE;\n      return result;\n    }\n\n    if (p == PEEKED_NUMBER) {\n      int end = position + peekedNumberLength;\n      peekedString = in.subSequence(position, end).toString();\n      position = end;\n    }\n    else if (p == PEEKED_SINGLE_QUOTED || p == PEEKED_DOUBLE_QUOTED) {\n      peekedString = nextQuotedValue(p == PEEKED_SINGLE_QUOTED ? '\\'' : '\"');\n      try {\n        result = Integer.parseInt(peekedString);\n        peeked = PEEKED_NONE;\n        return result;\n      }\n      catch (NumberFormatException ignored) {\n        // Fall back to parse as a double below.\n      }\n    }\n    else {\n      throw createParseError(\"Expected an int but was \" + peek());\n    }\n\n    peeked = PEEKED_BUFFERED;\n    double asDouble = Double.parseDouble(peekedString); // don't catch this NumberFormatException.\n    result = (int)asDouble;\n    if (result != asDouble) { // Make sure no precision was lost casting to 'int'.\n      throw new NumberFormatException(\"Expected an int but was \" + peekedString\n                                      + \" at line \" + getLineNumber() + \" column \" + getColumnNumber());\n    }\n    peekedString = null;\n    peeked = PEEKED_NONE;\n    return result;\n  }\n\n  /**\n   * Closes this JSON reader and the underlying {@link java.io.Reader}.\n   */\n  @Override\n  public void close() {\n    peeked = PEEKED_NONE;\n    stack[0] = JsonScope.CLOSED;\n    stackSize = 1;\n  }\n\n  /**\n   * Skips the next value recursively. If it is an object or array, all nested\n   * elements are skipped. This method is intended for use when the JSON token\n   * stream contains unrecognized or unhandled values.\n   */\n  public void skipValue() {\n    int count = 0;\n    do {\n      int p = peeked;\n      if (p == PEEKED_NONE) {\n        p = doPeek();\n      }\n\n      if (p == PEEKED_BEGIN_ARRAY) {\n        push(JsonScope.EMPTY_ARRAY);\n        count++;\n      }\n      else if (p == PEEKED_BEGIN_OBJECT) {\n        push(JsonScope.EMPTY_OBJECT);\n        count++;\n      }\n      else if (p == PEEKED_END_ARRAY || p == PEEKED_END_OBJECT) {\n        stackSize--;\n        count--;\n      }\n      else if (p == PEEKED_UNQUOTED_NAME || p == PEEKED_UNQUOTED) {\n        skipUnquotedValue();\n      }\n      else if (p == PEEKED_SINGLE_QUOTED || p == PEEKED_SINGLE_QUOTED_NAME) {\n        skipQuotedValue('\\'');\n      }\n      else if (p == PEEKED_DOUBLE_QUOTED || p == PEEKED_DOUBLE_QUOTED_NAME) {\n        skipQuotedValue('\"');\n      }\n      else if (p == PEEKED_NUMBER) {\n        position += peekedNumberLength;\n      }\n      peeked = PEEKED_NONE;\n    }\n    while (count != 0);\n  }\n\n  private void push(int newTop) {\n    if (stackSize == stack.length) {\n      int[] newStack = new int[stackSize * 2];\n      System.arraycopy(stack, 0, newStack, 0, stackSize);\n      stack = newStack;\n    }\n    stack[stackSize++] = newTop;\n  }\n\n  private int getLineNumber() {\n    int result = 1;\n    for (int i = 0; i < position; i++) {\n      if (in.charAt(i) == '\\n') {\n        result++;\n      }\n    }\n    return result;\n  }\n\n  private int getColumnNumber() {\n    int result = 1;\n    for (int i = 0; i < position; i++) {\n      if (in.charAt(i) == '\\n') {\n        result = 1;\n      }\n      else {\n        result++;\n      }\n    }\n    return result;\n  }\n\n  /**\n   * Returns the next character in the stream that is neither whitespace nor a\n   * part of a comment. When this returns, the returned character is always at\n   * {@code buffer[pos-1]}; this means the caller can always push back the\n   * returned character by decrementing {@code position}.\n   */\n  private int nextNonWhitespace(boolean throwOnEof) {\n    /*\n     * This code uses ugly local variables 'p' and 'l' representing the 'pos'\n     * and 'limit' fields respectively. Using locals rather than fields saves\n     * a few field reads for each whitespace character in a pretty-printed\n     * document, resulting in a 5% speedup. We need to flush 'p' to its field\n     * before any (potentially indirect) call to fillBuffer() and reread both\n     * 'p' and 'l' after any (potentially indirect) call to the same method.\n     */\n    CharSequence in = this.in;\n    int p = position;\n    int l = limit;\n    while (true) {\n      if (p == l) {\n        position = p;\n        break;\n      }\n\n      int c = in.charAt(p++);\n      if (c == '\\n' || c == ' ' || c == '\\r' || c == '\\t') {\n        continue;\n      }\n\n      if (c == '/') {\n        position = p;\n        if (p == l) {\n          position--; // push back '/' so it's still in the buffer when this method returns\n          boolean charsLoaded = (position + 3) < limit;\n          position++; // consume the '/' again\n          if (!charsLoaded) {\n            return c;\n          }\n        }\n\n        checkLenient();\n        char peek = in.charAt(position);\n        switch (peek) {\n          case '*':\n            // skip a /* c-style comment */\n            position++;\n            if (!skipTo(\"*/\")) {\n              throw createParseError(\"Unterminated comment\");\n            }\n            p = position + 2;\n            l = limit;\n            continue;\n\n          case '/':\n            // skip a // end-of-line comment\n            position++;\n            skipToEndOfLine();\n            p = position;\n            l = limit;\n            continue;\n\n          default:\n            return c;\n        }\n      }\n      else if (c == '#') {\n        position = p;\n        /*\n         * Skip a # hash end-of-line comment. The JSON RFC doesn't\n         * specify this behaviour, but it's required to parse\n         * existing documents. See http://b/2571423.\n         */\n        checkLenient();\n        skipToEndOfLine();\n        p = position;\n        l = limit;\n      }\n      else {\n        position = p;\n        return c;\n      }\n    }\n    if (throwOnEof) {\n      throw createParseError(\"End of input\");\n    }\n    else {\n      return -1;\n    }\n  }\n\n  private void checkLenient() {\n    if (!lenient) {\n      throw createParseError(\"Use JsonReaderEx.setLenient(true) to accept malformed JSON\");\n    }\n  }\n\n  /**\n   * Advances the position until after the next newline character. If the line\n   * is terminated by \"\\r\\n\", the '\\n' must be consumed as whitespace by the\n   * caller.\n   */\n  private void skipToEndOfLine() {\n    while (position < limit) {\n      char c = in.charAt(position++);\n      if (c == '\\n' || c == '\\r') {\n        break;\n      }\n    }\n  }\n\n  private boolean skipTo(@NotNull String toFind) {\n    outer:\n    for (; position + toFind.length() <= limit; position++) {\n      if (in.charAt(position) == '\\n') {\n        //lineNumber++;\n        //lineStart = pos + 1;\n        continue;\n      }\n      for (int c = 0; c < toFind.length(); c++) {\n        if (in.charAt(position + c) != toFind.charAt(c)) {\n          continue outer;\n        }\n      }\n      return true;\n    }\n    return false;\n  }\n\n  @NotNull\n  @Override\n  public String toString() {\n    return getClass().getSimpleName() + \" at line \" + getLineNumber() + \" column \" + getColumnNumber();\n  }\n\n  /**\n   * Unescapes the character identified by the character or characters that\n   * immediately follow a backslash. The backslash '\\' should have already\n   * been read. This supports both unicode escapes \"u000A\" and two-character\n   * escapes \"\\n\".\n   *\n   * @throws NumberFormatException if any unicode escape sequences are\n   *                               malformed.\n   */\n  private char readEscapeCharacter() {\n    if (position == limit) {\n      throw createParseError(\"Unterminated escape sequence\");\n    }\n\n    char escaped = in.charAt(position++);\n    switch (escaped) {\n      case 'u':\n        if (position + 4 > limit) {\n          throw createParseError(\"Unterminated escape sequence\");\n        }\n        // Equivalent to Integer.parseInt(stringPool.get(buffer, pos, 4), 16);\n        char result = 0;\n        for (int i = position, end = i + 4; i < end; i++) {\n          char c = in.charAt(i);\n          result <<= 4;\n          if (c >= '0' && c <= '9') {\n            result += (c - '0');\n          }\n          else if (c >= 'a' && c <= 'f') {\n            result += (c - 'a' + 10);\n          }\n          else if (c >= 'A' && c <= 'F') {\n            result += (c - 'A' + 10);\n          }\n          else {\n            throw new NumberFormatException(\"\\\\u\" + in.subSequence(position, position + 4));\n          }\n        }\n        position += 4;\n        return result;\n\n      case 't':\n        return '\\t';\n\n      case 'b':\n        return '\\b';\n\n      case 'n':\n        return '\\n';\n\n      case 'r':\n        return '\\r';\n\n      case 'f':\n        return '\\f';\n\n      case '\\n':\n        //lineNumber++;\n        //lineStart = pos;\n        // fall-through\n\n      case '\\'':\n      case '\"':\n      case '\\\\':\n      default:\n        return escaped;\n    }\n  }\n\n  /**\n   * Throws a new IO exception with the given message and a context snippet\n   * with this reader's content.\n   */\n  @NotNull\n  private JsonParseException createParseError(String message) {\n    throw new JsonParseException(message + \" at line \" + getLineNumber() + \" column \" + getColumnNumber());\n  }\n}"
  },
  {
    "path": "src/com/goide/dlv/breakpoint/DlvBreakpointProperties.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.dlv.breakpoint;\n\nimport com.intellij.xdebugger.breakpoints.XBreakpointProperties;\nimport org.jetbrains.annotations.Nullable;\n\npublic class DlvBreakpointProperties extends XBreakpointProperties<DlvBreakpointProperties> {\n  @Nullable\n  @Override\n  public DlvBreakpointProperties getState() {\n    return this;\n  }\n\n  @Override\n  public void loadState(DlvBreakpointProperties state) {\n  }\n}\n"
  },
  {
    "path": "src/com/goide/dlv/breakpoint/DlvBreakpointType.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.dlv.breakpoint;\n\nimport com.goide.GoFileType;\nimport com.goide.GoParserDefinition;\nimport com.goide.dlv.DlvDebugProcess;\nimport com.intellij.openapi.editor.Document;\nimport com.intellij.openapi.fileEditor.FileDocumentManager;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.tree.IElementType;\nimport com.intellij.util.Processor;\nimport com.intellij.xdebugger.XDebuggerUtil;\nimport com.intellij.xdebugger.breakpoints.XLineBreakpointType;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class DlvBreakpointType extends XLineBreakpointType<DlvBreakpointProperties> {\n  public static final String ID = \"DlvLineBreakpoint\";\n  public static final String NAME = \"Dlv breakpoint\";\n\n  protected DlvBreakpointType() {\n    super(ID, NAME);\n  }\n\n  @Nullable\n  @Override\n  public DlvBreakpointProperties createBreakpointProperties(@NotNull VirtualFile file, int line) {\n    return new DlvBreakpointProperties();\n  }\n\n  @Override\n  public boolean canPutAt(@NotNull VirtualFile file, int line, @NotNull Project project) {\n    if (line < 0 || DlvDebugProcess.IS_DLV_DISABLED || file.getFileType() != GoFileType.INSTANCE) return false;\n    return isLineBreakpointAvailable(file, line, project);\n  }\n\n  private static boolean isLineBreakpointAvailable(@NotNull VirtualFile file, int line, @NotNull Project project) {\n    Document document = FileDocumentManager.getInstance().getDocument(file);\n    if (document == null || document.getLineEndOffset(line) == document.getLineStartOffset(line)) return false;\n    Checker canPutAtChecker = new Checker();\n    XDebuggerUtil.getInstance().iterateLine(project, document, line, canPutAtChecker);\n    return canPutAtChecker.isLineBreakpointAvailable();\n  }\n\n  private static final class Checker implements Processor<PsiElement> {\n    private boolean myIsLineBreakpointAvailable;\n\n    @Override\n    public boolean process(@NotNull PsiElement o) {\n      IElementType type = o.getNode().getElementType();\n      if (GoParserDefinition.COMMENTS.contains(type) || GoParserDefinition.WHITESPACES.contains(type)) {\n        return true;\n      }\n      myIsLineBreakpointAvailable = true;\n      return false;\n    }\n\n    public boolean isLineBreakpointAvailable() {\n      return myIsLineBreakpointAvailable;\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/dlv/protocol/DlvApi.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.dlv.protocol;\n\nimport com.google.gson.annotations.SerializedName;\nimport com.intellij.openapi.diagnostic.Logger;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.List;\n\n@SuppressWarnings(\"unused\")\npublic class DlvApi {\n  private final static Logger LOG = Logger.getInstance(DlvApi.class);\n\n  // DebuggerState represents the current context of the debugger.\n  public static class DebuggerState {\n    // Breakpoint is the current breakpoint at which the debugged process is\n    // suspended, and may be empty if the process is not suspended.\n    public Breakpoint breakPoint;\n    // CurrentThread is the currently selected debugger thread.\n    public Thread currentThread;\n    // SelectedGoroutine is the currently selected goroutine\n    public Goroutine currentGoroutine;\n    // Information requested by the current breakpoint\n    public BreakpointInfo breakPointInfo;\n    // Exited indicates whether the debugged process has exited.\n    public boolean exited;\n    public int exitStatus;\n    // Filled by RPCClient.Continue, indicates an error\n    public String err;\n  }\n\n  // Breakpoint addresses a location at which process execution may be\n  // suspended.\n  public static class Breakpoint {\n    // ID is a unique identifier for the breakpoint.\n    public int id;\n    // Addr is the address of the breakpoint.\n    public int addr;\n    // File is the source file for the breakpoint.\n    public String file;\n    // Line is a line in File for the breakpoint.\n    public int line;\n    // FunctionName is the name of the function at the current breakpoint, and\n    // may not always be available.\n    public String functionName;\n    // tracepoint flag\n    @SerializedName(\"continue\")\n    public boolean tracepoint;\n    // number of stack frames to retrieve\n    public int stacktrace;\n    // retrieve goroutine information\n    public boolean goroutine;\n    // variables to evaluate\n    public List<String> variables;\n    // number of times a breakpoint has been reached in a certain goroutine\n    public Object hitCount; // todo: check type map[string]uint64\n    // number of times a breakpoint has been reached\n    public long totalHitCount;\n  }\n\n  // Thread is a thread within the debugged process.\n  public static class Thread {\n    // ID is a unique identifier for the thread.\n    public int id;\n    // PC is the current program counter for the thread.\n    public long pc;\n    // File is the file for the program counter.\n    public String file;\n    // Line is the line number for the program counter.\n    public int line;\n    // Function is function information at the program counter. May be nil.\n    public Function function;\n  }\n\n  public static class Location {\n    public long pc;\n    public String file;\n    public int line;\n    public Function function;\n  }\n\n  // Function represents thread-scoped function information.\n  public static class Function {\n    // Name is the function name.\n    public String name;\n    public int value;\n    public byte type;\n    public int goclass;\n    // Args are the function arguments in a thread context.\n    public List<Variable> args;\n    // Locals are the thread local variables.\n    public List<Variable> locals;\n  }\n\n  // Variable describes a variable.\n  public static class Variable {\n    // Name of the variable or struct member\n    public String name;\n    // Go type of the variable\n    public String type;\n    // Address of the variable or struct member\n    public Object addr;\n    // Type of the variable after resolving any typedefs\n    public String realType;\n\n    public int kind;\n\n    //Strings have their length capped at proc.maxArrayValues, use Len for the real length of a string\n    //Function variables will store the name of the function in this field\n    public String value;\n\n    // Number of elements in an array or a slice, number of keys for a map, number of struct members for a struct, length of strings\n    public long len;\n    // Cap value for slices\n    public long cap;\n    // Array and slice elements, member fields of structs, key/value pairs of maps, value of complex numbers\n    // The Name field in this slice will always be the empty string except for structs (when it will be the field name) and for complex numbers (when it will be \"real\" and \"imaginary\")\n    // For maps each map entry will have to items in this slice, even numbered items will represent map keys and odd numbered items will represent their values\n    // This field's length is capped at proc.maxArrayValues for slices and arrays and 2*proc.maxArrayValues for maps, in the circumnstances where the cap takes effect len(Children) != Len\n    // The other length cap applied to this field is related to maximum recursion depth, when the maximum recursion depth is reached this field is left empty, contrary to the previous one this cap also applies to structs (otherwise structs will always have all thier member fields returned)\n    public Variable[] children;\n    // Unreadable addresses will have this field set\n    public String unreadable;\n\n    @NotNull\n    private Kind getKind() {\n      try {\n        return Kind.values()[kind];\n      }\n      catch (Exception e) {\n        LOG.warn(\"Unknown kind '\" + kind + \"' of variable '\" + name + \"'\");\n        return Kind.Invalid;\n      }\n    }\n\n    private enum Kind {\n      Invalid,\n      Bool,\n      Int, Int8, Int16, Int32, Int64, Uint, Uint8, Uint16, Uint32, Uint64,\n      Uintptr,\n      Float32, Float64,\n      Complex64, Complex128,\n      Array, Chan, Func, Interface, Map, Ptr, Slice, String, Struct,\n      UnsafePointer;\n\n      private boolean isNumber() {\n        return compareTo(Int) >= 0 && compareTo(Complex128) <= 0;\n      }\n\n    }\n    \n    public boolean isSlice() {\n      return getKind() == Kind.Slice;\n    }\n    \n    public boolean isArray() {\n      return getKind() == Kind.Array;\n    }\n\n    public boolean isNumber() { return getKind().isNumber(); }\n\n    public boolean isString() { return getKind() == Kind.String; }\n\n    public boolean isBool() { return getKind() == Kind.Bool; }\n\n    public boolean isStructure() {\n      return getKind() == Kind.Struct;\n    }\n\n    public boolean isPtr() {\n      return getKind() == Kind.Ptr;\n    }\n  }\n\n  // Goroutine represents the information relevant to Delve from the runtime's\n  // internal G structure.\n  public static class Goroutine {\n    // ID is a unique identifier for the goroutine.\n    public int id;\n    // PC is the current program counter for the goroutine.\n    public long pc;\n    // File is the file for the program counter.\n    public String file;\n    // Line is the line number for the program counter.\n    public int line;\n    // Current location of the goroutine\n    public Location currentLoc;\n    // Current location of the goroutine, excluding calls inside runtime\n    public Location userCurrentLoc;\n    // Location of the go instruction that started this goroutine\n    public Location goStatementLoc;\n  }\n\n  // DebuggerCommand is a command which changes the debugger's execution state.\n  public static class DebuggerCommand {\n    // Name is the command to run.\n    public String name;\n    // ThreadID is used to specify which thread to use with the SwitchThread\n    // command.\n    public int threadID;\n    // GoroutineID is used to specify which thread to use with the SwitchGoroutine\n    // command.\n    public int goroutineID; // `json:\"goroutineID,omitempty\"`\n  }\n\n  // Informations about the current breakpoint\n  public static class BreakpointInfo {\n    public List<Location> stacktrace;\n    public Goroutine goroutine;\n    public List<Variable> variables;\n    public List<Variable> arguments;\n  }\n\n  public static class EvalScope {\n    public int GoroutineID;\n    public int Frame;\n  }\n\n  public static final String CONTINUE = \"continue\";\n  public static final String STEP = \"step\";\n  public static final String NEXT = \"next\";\n  public static final String SWITCH_THREAD = \"switchThread\";\n  public static final String HALT = \"halt\";\n  public static final String SWITCH_GOROUTINE = \"switchGoroutine\";\n}\n"
  },
  {
    "path": "src/com/goide/dlv/protocol/DlvRequest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.dlv.protocol;\n\nimport com.google.gson.stream.JsonWriter;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\nimport org.jetbrains.jsonProtocol.OutMessage;\nimport org.jetbrains.jsonProtocol.Request;\n\nimport java.io.IOException;\nimport java.util.List;\n\n/**\n * Please add your requests as a subclasses, otherwise reflection won't work.\n *\n * @param <T> type of callback\n * @see com.goide.dlv.DlvCommandProcessor#getResultType(String)\n */\npublic abstract class DlvRequest<T> extends OutMessage implements Request<T> {\n  private static final String PARAMS = \"params\";\n  private static final String ID = \"id\";\n  private boolean argumentsObjectStarted;\n\n  private DlvRequest() {\n    try {\n      getWriter().name(\"method\").value(getMethodName());\n    }\n    catch (IOException e) {\n      throw new RuntimeException(e);\n    }\n  }\n\n  @NotNull\n  @Override\n  public String getMethodName() {\n    return \"RPCServer.\" + getClass().getSimpleName();\n  }\n\n  @Override\n  public final void beginArguments() {\n    if (!argumentsObjectStarted) {\n      argumentsObjectStarted = true;\n      if (needObject()) {\n        try {\n          getWriter().name(PARAMS);\n          getWriter().beginArray();\n          getWriter().beginObject();\n        }\n        catch (IOException e) {\n          throw new RuntimeException(e);\n        }\n      }\n    }\n  }\n\n  protected boolean needObject() {\n    return true;\n  }\n\n  @Override\n  public final void finalize(int id) {\n    try {\n      if (argumentsObjectStarted) {\n        if (needObject()) {\n          getWriter().endObject();\n          getWriter().endArray();\n        }\n      }\n      getWriter().name(ID).value(id);\n      getWriter().endObject();\n      getWriter().close();\n    }\n    catch (IOException e) {\n      throw new RuntimeException(e);\n    }\n  }\n\n  public final static class ClearBreakpoint extends DlvRequest<DlvApi.Breakpoint> {\n    public ClearBreakpoint(int id) {\n      writeSingletonIntArray(PARAMS, id);\n    }\n\n    @Override\n    protected boolean needObject() {\n      return false;\n    }\n  }\n\n  public final static class CreateBreakpoint extends DlvRequest<DlvApi.Breakpoint> {\n    public CreateBreakpoint(String path, int line) {\n      writeString(\"file\", path);\n      writeLong(\"line\", line);\n    }\n  }\n\n  public final static class StacktraceGoroutine extends DlvRequest<List<DlvApi.Location>> {\n    public StacktraceGoroutine() {\n      writeLong(\"Id\", -1);\n      writeLong(\"Depth\", 100);\n    }\n  }\n\n  private abstract static class Locals<T> extends DlvRequest<T> {\n    Locals(int frameId) {\n      writeLong(\"GoroutineID\", -1);\n      writeLong(\"Frame\", frameId);\n    }\n  }\n\n  public final static class ListLocalVars extends Locals<List<DlvApi.Variable>> {\n    public ListLocalVars(int frameId) {\n      super(frameId);\n    }\n  }\n\n  public final static class ListFunctionArgs extends Locals<List<DlvApi.Variable>> {\n    public ListFunctionArgs(int frameId) {\n      super(frameId);\n    }\n  }\n\n  public final static class Command extends DlvRequest<DlvApi.DebuggerState> {\n    public Command(@Nullable String command) {\n      writeString(\"Name\", command);\n    }\n  }\n\n  public final static class Detach extends DlvRequest<Integer> {\n    public Detach(boolean kill) {\n      try {\n        beginArguments();\n        getWriter().name(PARAMS).beginArray().value(kill).endArray();\n      }\n      catch (IOException e) {\n        throw new RuntimeException(e);\n      }\n    }\n\n    @Override\n    protected boolean needObject() {\n      return false;\n    }\n  }\n\n  public final static class EvalSymbol extends DlvRequest<DlvApi.Variable> {\n    public EvalSymbol(@NotNull String symbol, int frameId) {\n      try {\n        getWriter().name(PARAMS).beginArray();\n        writeScope(frameId, getWriter())\n          .name(\"Symbol\").value(symbol)\n          .endObject().endArray();\n      }\n      catch (IOException e) {\n        throw new RuntimeException(e);\n      }\n    }\n\n    @Override\n    protected boolean needObject() {\n      return false;\n    }\n  }\n\n  @NotNull\n  private static JsonWriter writeScope(int frameId, @NotNull JsonWriter writer) throws IOException {\n    // todo: ask vladimir how to simplify this\n    return writer.beginObject()\n      .name(\"Scope\").beginObject()\n      .name(\"GoroutineID\").value(-1)\n      .name(\"Frame\").value(frameId).endObject();\n  }\n\n  public final static class SetSymbol extends DlvRequest<Object> {\n    public SetSymbol(@NotNull String symbol, @NotNull String value, int frameId) {\n      try {\n        getWriter().name(PARAMS).beginArray();\n        writeScope(frameId, getWriter())\n          .name(\"Symbol\").value(symbol)\n          .name(\"Value\").value(value)\n          .endObject().endArray();\n      }\n      catch (IOException e) {\n        throw new RuntimeException(e);\n      }\n    }\n\n    @Override\n    protected boolean needObject() {\n      return false;\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/dlv/protocol/DlvResponse.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.dlv.protocol;\n\nimport com.goide.dlv.JsonReaderEx;\nimport com.google.gson.stream.JsonToken;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\nimport org.jetbrains.jsonProtocol.JsonType;\nimport org.jetbrains.jsonProtocol.Optional;\n\nimport java.util.Collections;\nimport java.util.List;\n\n@JsonType\npublic interface DlvResponse {\n  int id();\n\n  @Nullable\n  @Optional\n  JsonReaderEx result();\n\n  @Nullable\n  @Optional\n  ErrorInfo error();\n\n  @JsonType\n  interface ErrorInfo {\n    @Nullable\n    String message();\n\n    @NotNull\n    @Optional\n    List<String> data();\n\n    int code();\n  }\n\n  final class CommandResponseImpl implements DlvResponse {\n    @Nullable private DlvResponse.ErrorInfo _error;\n    private int _id = -1;\n    @Nullable private JsonReaderEx _result;\n\n    public CommandResponseImpl(@NotNull JsonReaderEx reader, @Nullable String name) {\n      if (name == null) {\n        if (reader.hasNext() && reader.beginObject().hasNext()) {\n          name = reader.nextName();\n        }\n        else {\n          return;\n        }\n      }\n\n      do {\n        if (\"error\".equals(name)) {\n          _error = new M5m(reader);\n        }\n        else if (\"id\".equals(name)) {\n          _id = reader.nextInt();\n        }\n        else if (\"result\".equals(name)) {\n          _result = reader.subReader();\n          reader.skipValue();\n        }\n        else {\n          reader.skipValue();\n        }\n      }\n      while ((name = reader.nextNameOrNull()) != null);\n\n      reader.endObject();\n    }\n\n    @Nullable\n    @Override\n    public DlvResponse.ErrorInfo error() {\n      return _error;\n    }\n\n    @Override\n    public int id() {\n      return _id;\n    }\n\n    @Nullable\n    @Override\n    public JsonReaderEx result() {\n      return _result;\n    }\n  }\n\n  final class M5m implements DlvResponse.ErrorInfo {\n    private static final int _code = -1;\n    @NotNull private final List<String> _data = Collections.emptyList();\n    @Nullable private final String _message;\n\n    M5m(@NotNull JsonReaderEx reader) {\n      _message = nextNullableString(reader);\n    }\n\n    @Override\n    public int code() {\n      return _code;\n    }\n\n    @NotNull\n    @Override\n    public List<String> data() {\n      return _data;\n    }\n\n    @Nullable\n    @Override\n    public String message() {\n      return _message;\n    }\n\n    private static String nextNullableString(@NotNull JsonReaderEx reader) {\n      if (reader.peek() == JsonToken.NULL) {\n        reader.nextNull();\n        return null;\n      }\n      else {\n        return reader.nextString();\n      }\n    }\n  }\n}"
  },
  {
    "path": "src/com/goide/editor/GoBraceMatcher.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.editor;\n\nimport com.goide.GoParserDefinition;\nimport com.goide.GoTypes;\nimport com.intellij.lang.BracePair;\nimport com.intellij.lang.PairedBraceMatcher;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.tree.IElementType;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoBraceMatcher implements PairedBraceMatcher {\n  private static final BracePair[] PAIRS = new BracePair[]{\n    new BracePair(GoTypes.LBRACE, GoTypes.RBRACE, true),\n    new BracePair(GoTypes.LPAREN, GoTypes.RPAREN, false),\n    new BracePair(GoTypes.LBRACK, GoTypes.RBRACK, false),\n  };\n\n  @NotNull\n  @Override\n  public BracePair[] getPairs() {\n    return PAIRS;\n  }\n\n  @Override\n  public boolean isPairedBracesAllowedBeforeType(@NotNull IElementType lbraceType, @Nullable IElementType type) {\n    return GoParserDefinition.COMMENTS.contains(type)\n           || GoParserDefinition.WHITESPACES.contains(type)\n           || type == GoTypes.SEMICOLON\n           || type == GoTypes.COMMA\n           || type == GoTypes.RPAREN\n           || type == GoTypes.RBRACK\n           || type == GoTypes.RBRACE\n           || type == GoTypes.LBRACE\n           || null == type;\n  }\n\n  @Override\n  public int getCodeConstructStart(PsiFile file, int openingBraceOffset) {\n    return openingBraceOffset;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/editor/GoFoldingBuilder.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.editor;\n\nimport com.goide.GoParserDefinition;\nimport com.goide.GoTypes;\nimport com.goide.psi.*;\nimport com.intellij.codeInsight.folding.CodeFoldingSettings;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.lang.folding.CustomFoldingBuilder;\nimport com.intellij.lang.folding.FoldingDescriptor;\nimport com.intellij.lang.folding.NamedFoldingDescriptor;\nimport com.intellij.openapi.editor.Document;\nimport com.intellij.openapi.project.DumbAware;\nimport com.intellij.openapi.util.TextRange;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiWhiteSpace;\nimport com.intellij.psi.TokenType;\nimport com.intellij.psi.tree.IElementType;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.List;\nimport java.util.Set;\n\npublic class GoFoldingBuilder extends CustomFoldingBuilder implements DumbAware {\n  private static void foldTypes(@Nullable PsiElement e, @NotNull List<FoldingDescriptor> result) {\n    if (e instanceof GoStructType) {\n      if (((GoStructType)e).getFieldDeclarationList().isEmpty()) return;\n      fold(e, ((GoStructType)e).getLbrace(), ((GoStructType)e).getRbrace(), \"{...}\", result);\n    }\n    if (e instanceof GoInterfaceType) {\n      if (e.getChildren().length == 0) return;\n      fold(e, ((GoInterfaceType)e).getLbrace(), ((GoInterfaceType)e).getRbrace(), \"{...}\", result);\n    }\n  }\n\n  private static void fold(@NotNull PsiElement e,\n                           @Nullable PsiElement l,\n                           @Nullable PsiElement r,\n                           @NotNull String placeholderText,\n                           @NotNull List<FoldingDescriptor> result) {\n    if (l != null && r != null) {\n      result.add(new NamedFoldingDescriptor(e, l.getTextRange().getStartOffset(), r.getTextRange().getEndOffset(), null, placeholderText));\n    }\n  }\n\n  // com.intellij.codeInsight.folding.impl.JavaFoldingBuilderBase.addCodeBlockFolds()\n  private static void addCommentFolds(@NotNull PsiElement comment,\n                                      @NotNull Set<PsiElement> processedComments,\n                                      @NotNull List<FoldingDescriptor> result) {\n    if (processedComments.contains(comment)) return;\n\n    PsiElement end = null;\n    for (PsiElement current = comment.getNextSibling(); current != null; current = current.getNextSibling()) {\n      ASTNode node = current.getNode();\n      if (node == null) break;\n      IElementType elementType = node.getElementType();\n      if (elementType == GoParserDefinition.LINE_COMMENT) {\n        end = current;\n        processedComments.add(current);\n        continue;\n      }\n      if (elementType == TokenType.WHITE_SPACE) continue;\n      break;\n    }\n\n    if (end != null) {\n      int startOffset = comment.getTextRange().getStartOffset();\n      int endOffset = end.getTextRange().getEndOffset();\n      result.add(new NamedFoldingDescriptor(comment, startOffset, endOffset, null, \"/.../\"));\n    }\n  }\n\n  @Override\n  protected void buildLanguageFoldRegions(@NotNull List<FoldingDescriptor> result,\n                                          @NotNull PsiElement root,\n                                          @NotNull Document document,\n                                          boolean quick) {\n    if (!(root instanceof GoFile)) return;\n    GoFile file = (GoFile)root;\n    if (!file.isContentsLoaded()) return;\n\n    GoImportList importList = ((GoFile)root).getImportList();\n    if (importList != null) {\n      GoImportDeclaration firstImport = ContainerUtil.getFirstItem(importList.getImportDeclarationList());\n      if (firstImport != null) {\n        PsiElement importKeyword = firstImport.getImport();\n        int offset = importKeyword.getTextRange().getEndOffset();\n        int startOffset = importKeyword.getNextSibling() instanceof PsiWhiteSpace ? offset + 1 : offset;\n        int endOffset = importList.getTextRange().getEndOffset();\n        if (endOffset - startOffset > 3) {\n          result.add(new NamedFoldingDescriptor(importList, startOffset, endOffset, null, \"...\"));\n        }\n      }\n    }\n\n    for (GoBlock block : PsiTreeUtil.findChildrenOfType(file, GoBlock.class)) {\n      if (block.getTextRange().getLength() > 1) {\n        result.add(new NamedFoldingDescriptor(block.getNode(), block.getTextRange(), null, \"{...}\"));\n      }\n    }\n\n    for (GoExprSwitchStatement switchStatement : PsiTreeUtil.findChildrenOfType(file, GoExprSwitchStatement.class)) {\n      fold(switchStatement, switchStatement.getLbrace(), switchStatement.getRbrace(), \"{...}\", result);\n    }\n\n    for (GoSelectStatement selectStatement : PsiTreeUtil.findChildrenOfType(file, GoSelectStatement.class)) {\n      fold(selectStatement, selectStatement.getLbrace(), selectStatement.getRbrace(), \"{...}\", result);\n    }\n\n    for (GoTypeSpec type : file.getTypes()) {\n      foldTypes(type.getSpecType().getType(), result);\n    }\n\n    for (GoCaseClause caseClause : PsiTreeUtil.findChildrenOfType(file, GoCaseClause.class)) {\n      PsiElement colon = caseClause.getColon();\n      if (colon != null && !caseClause.getStatementList().isEmpty()) {\n        fold(caseClause, colon.getNextSibling(), caseClause, \"...\", result);\n      }\n    }\n\n    for (GoCommClause commClause : PsiTreeUtil.findChildrenOfType(file, GoCommClause.class)) {\n      PsiElement colon = commClause.getColon();\n      if (colon != null && !commClause.getStatementList().isEmpty()) {\n        fold(commClause, colon.getNextSibling(), commClause, \"...\", result);\n      }\n    }\n\n    for (GoVarDeclaration varDeclaration : PsiTreeUtil.findChildrenOfType(file, GoVarDeclaration.class)) {\n      if (varDeclaration.getVarSpecList().size() > 1) {\n        fold(varDeclaration, varDeclaration.getLparen(), varDeclaration.getRparen(), \"(...)\", result);\n      }\n    }\n\n    for (GoConstDeclaration constDeclaration : PsiTreeUtil.findChildrenOfType(file, GoConstDeclaration.class)) {\n      if (constDeclaration.getConstSpecList().size() > 1) {\n        fold(constDeclaration, constDeclaration.getLparen(), constDeclaration.getRparen(), \"(...)\", result);\n      }\n    }\n\n    for (GoTypeDeclaration typeDeclaration : PsiTreeUtil.findChildrenOfType(file, GoTypeDeclaration.class)) {\n      if (typeDeclaration.getTypeSpecList().size() > 1) {\n        fold(typeDeclaration, typeDeclaration.getLparen(), typeDeclaration.getRparen(), \"(...)\", result);\n      }\n    }\n\n    for (GoCompositeLit compositeLit : PsiTreeUtil.findChildrenOfType(file, GoCompositeLit.class)) {\n      GoLiteralValue literalValue = compositeLit.getLiteralValue();\n      if (literalValue != null && literalValue.getElementList().size() > 1) {\n        fold(literalValue, literalValue.getLbrace(), literalValue.getRbrace(), \"{...}\", result);\n      }\n    }\n\n    if (!quick) {\n      Set<PsiElement> processedComments = ContainerUtil.newHashSet();\n      PsiTreeUtil.processElements(file, element -> {\n        ASTNode node = element.getNode();\n        IElementType type = node.getElementType();\n        TextRange range = element.getTextRange();\n        if (type == GoParserDefinition.MULTILINE_COMMENT && range.getLength() > 2) {\n          result.add(new NamedFoldingDescriptor(node, range, null, \"/*...*/\"));\n        }\n        if (type == GoParserDefinition.LINE_COMMENT) {\n          addCommentFolds(element, processedComments, result);\n        }\n        foldTypes(element, result); // folding for inner types\n        return true;\n      });\n    }\n  }\n\n  @Nullable\n  @Override\n  protected String getLanguagePlaceholderText(@NotNull ASTNode node, @NotNull TextRange range) {\n    return \"...\";\n  }\n\n  @Override\n  protected boolean isRegionCollapsedByDefault(@NotNull ASTNode node) {\n    IElementType type = node.getElementType();\n    if (type == GoParserDefinition.LINE_COMMENT || type == GoParserDefinition.MULTILINE_COMMENT) {\n      return CodeFoldingSettings.getInstance().COLLAPSE_DOC_COMMENTS;\n    }\n    if (type == GoTypes.BLOCK && CodeFoldingSettings.getInstance().COLLAPSE_METHODS) {\n      ASTNode parent = node.getTreeParent();\n      return parent != null && parent.getPsi() instanceof GoFunctionOrMethodDeclaration;\n    }\n    return CodeFoldingSettings.getInstance().COLLAPSE_IMPORTS && node.getElementType() == GoTypes.IMPORT_LIST;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/editor/GoImplementationTextSelectioner.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.editor;\n\nimport com.goide.psi.GoTopLevelDeclaration;\nimport com.intellij.codeInsight.hint.ImplementationTextSelectioner;\nimport com.intellij.openapi.util.TextRange;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport com.intellij.util.ObjectUtils;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoImplementationTextSelectioner implements ImplementationTextSelectioner {\n  @Override\n  public int getTextStartOffset(@NotNull PsiElement o) {\n    return getTextRange(o).getStartOffset();\n  }\n\n  @Override\n  public int getTextEndOffset(@NotNull PsiElement o) {\n    return getTextRange(o).getEndOffset();\n  }\n\n  @NotNull\n  private static TextRange getTextRange(@NotNull PsiElement o) {\n    return ObjectUtils.notNull(PsiTreeUtil.getParentOfType(o, GoTopLevelDeclaration.class), o).getTextRange();\n  }\n}\n"
  },
  {
    "path": "src/com/goide/editor/GoParameterInfoHandler.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.editor;\n\nimport com.goide.GoTypes;\nimport com.goide.psi.*;\nimport com.intellij.codeInsight.CodeInsightBundle;\nimport com.intellij.codeInsight.lookup.LookupElement;\nimport com.intellij.lang.parameterInfo.*;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.tree.IElementType;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport com.intellij.util.ArrayUtil;\nimport com.intellij.util.Function;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.List;\nimport java.util.Set;\n\npublic class GoParameterInfoHandler implements ParameterInfoHandlerWithTabActionSupport<GoArgumentList, Object, GoExpression> {\n  @NotNull\n  @Override\n  public GoExpression[] getActualParameters(@NotNull GoArgumentList o) {\n    return ArrayUtil.toObjectArray(o.getExpressionList(), GoExpression.class);\n  }\n\n  @NotNull\n  @Override\n  public IElementType getActualParameterDelimiterType() {\n    return GoTypes.COMMA;\n  }\n\n  @NotNull\n  @Override\n  public IElementType getActualParametersRBraceType() {\n    return GoTypes.RPAREN;\n  }\n\n  @NotNull\n  @Override\n  public Set<Class> getArgumentListAllowedParentClasses() {\n    return ContainerUtil.newHashSet();\n  }\n\n  @NotNull\n  @Override\n  public Set<Class> getArgListStopSearchClasses() {\n    return ContainerUtil.newHashSet();\n  }\n\n  @NotNull\n  @Override\n  public Class<GoArgumentList> getArgumentListClass() {\n    return GoArgumentList.class;\n  }\n\n  @Override\n  public boolean couldShowInLookup() {\n    return true;\n  }\n\n  @Nullable\n  @Override\n  public Object[] getParametersForLookup(LookupElement item, ParameterInfoContext context) {\n    return ArrayUtil.EMPTY_OBJECT_ARRAY;\n  }\n\n  @Nullable\n  @Override\n  public Object[] getParametersForDocumentation(Object p, ParameterInfoContext context) {\n    return ArrayUtil.EMPTY_OBJECT_ARRAY;\n  }\n\n  @Nullable\n  @Override\n  public GoArgumentList findElementForParameterInfo(@NotNull CreateParameterInfoContext context) {\n    // todo: see ParameterInfoUtils.findArgumentList\n    return getList(context);\n  }\n\n  @Nullable\n  private static GoArgumentList getList(@NotNull ParameterInfoContext context) {\n    PsiElement at = context.getFile().findElementAt(context.getOffset());\n    return PsiTreeUtil.getParentOfType(at, GoArgumentList.class);\n  }\n\n  @Override\n  public void showParameterInfo(@NotNull GoArgumentList argList, @NotNull CreateParameterInfoContext context) {\n    PsiElement parent = argList.getParent();\n    if (!(parent instanceof GoCallExpr)) return;\n    GoFunctionType type = findFunctionType(((GoCallExpr)parent).getExpression().getGoType(null));\n    if (type != null) {\n      context.setItemsToShow(new Object[]{type});\n      context.showHint(argList, argList.getTextRange().getStartOffset(), this);\n    }\n  }\n\n  @Nullable\n  private static GoFunctionType findFunctionType(@Nullable GoType type) {\n    if (type instanceof GoFunctionType || type == null) return (GoFunctionType)type;\n    GoType base = type.getUnderlyingType();\n    return base instanceof GoFunctionType ? (GoFunctionType)base : null;\n  }\n\n  @Nullable\n  @Override\n  public GoArgumentList findElementForUpdatingParameterInfo(@NotNull UpdateParameterInfoContext context) {\n    return getList(context);\n  }\n\n  @Override\n  public void updateParameterInfo(@NotNull GoArgumentList list, @NotNull UpdateParameterInfoContext context) {\n    context.setCurrentParameter(ParameterInfoUtils.getCurrentParameterIndex(list.getNode(), context.getOffset(), GoTypes.COMMA));\n  }\n\n  @Nullable\n  @Override\n  public String getParameterCloseChars() {\n    return \",(\";\n  }\n\n  @Override\n  public boolean tracksParameterIndex() {\n    return true;\n  }\n\n  @Override\n  public void updateUI(@Nullable Object p, @NotNull ParameterInfoUIContext context) {\n    updatePresentation(p, context);\n  }\n\n  static String updatePresentation(@Nullable Object p, @NotNull ParameterInfoUIContext context) {\n    if (p == null) {\n      context.setUIComponentEnabled(false);\n      return null;\n    }\n    GoSignature signature = p instanceof GoSignatureOwner ? ((GoSignatureOwner)p).getSignature() : null;\n    if (signature == null) return null;\n    GoParameters parameters = signature.getParameters();\n    List<String> parametersPresentations = getParameterPresentations(parameters, PsiElement::getText);\n    \n    StringBuilder builder = new StringBuilder();\n    int start = 0;\n    int end = 0;\n    if (!parametersPresentations.isEmpty()) {\n      // Figure out what particular presentation is actually selected. Take in\n      // account possibility of the last variadic parameter.\n      int selected = isLastParameterVariadic(parameters.getParameterDeclarationList())\n                     ? Math.min(context.getCurrentParameterIndex(), parametersPresentations.size() - 1)\n                     : context.getCurrentParameterIndex();\n      \n      for (int i = 0; i < parametersPresentations.size(); ++i) {\n        if (i != 0) {\n          builder.append(\", \");\n        }\n        if (i == selected) {\n          start = builder.length();\n        }\n        builder.append(parametersPresentations.get(i));\n\n        if (i == selected) {\n          end = builder.length();\n        }\n      }\n    }\n    else {\n      builder.append(CodeInsightBundle.message(\"parameter.info.no.parameters\"));\n    }\n    return context.setupUIComponentPresentation(builder.toString(), start, end, false, false, false, context.getDefaultParameterColor());\n  }\n\n  /**\n   * Creates a list of parameter presentations. For clarity we expand parameters declared as `a, b, c int` into `a int, b int, c int`.\n   */\n  @NotNull\n  public static List<String> getParameterPresentations(@NotNull GoParameters parameters, \n                                                       @NotNull Function<PsiElement, String> typePresentationFunction) {\n    List<GoParameterDeclaration> paramDeclarations = parameters.getParameterDeclarationList();\n    List<String> paramPresentations = ContainerUtil.newArrayListWithCapacity(2 * paramDeclarations.size());\n    for (GoParameterDeclaration paramDeclaration : paramDeclarations) {\n      boolean isVariadic = paramDeclaration.isVariadic();\n      List<GoParamDefinition> paramDefinitionList = paramDeclaration.getParamDefinitionList();\n      for (GoParamDefinition paramDefinition : paramDefinitionList) {\n        String separator = isVariadic ? \" ...\" : \" \";\n        paramPresentations.add(paramDefinition.getText() + separator + typePresentationFunction.fun(paramDeclaration.getType()));\n      }\n      if (paramDefinitionList.isEmpty()) {\n        String separator = isVariadic ? \"...\" : \"\";\n        paramPresentations.add(separator + typePresentationFunction.fun(paramDeclaration.getType()));\n      }\n    }\n    return paramPresentations;\n  }\n\n  private static boolean isLastParameterVariadic(@NotNull List<GoParameterDeclaration> declarations) {\n    GoParameterDeclaration lastItem = ContainerUtil.getLastItem(declarations);\n    return lastItem != null && lastItem.isVariadic();\n  }\n}\n"
  },
  {
    "path": "src/com/goide/editor/GoQuoteHandler.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.editor;\n\nimport com.goide.GoTypes;\nimport com.intellij.codeInsight.editorActions.JavaLikeQuoteHandler;\nimport com.intellij.codeInsight.editorActions.SimpleTokenSetQuoteHandler;\nimport com.intellij.openapi.editor.Editor;\nimport com.intellij.openapi.editor.highlighter.HighlighterIterator;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.TokenType;\nimport com.intellij.psi.tree.IElementType;\nimport com.intellij.psi.tree.TokenSet;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoQuoteHandler extends SimpleTokenSetQuoteHandler implements JavaLikeQuoteHandler {\n  private static final TokenSet SINGLE_LINE_LITERALS = TokenSet.create(GoTypes.STRING);\n\n  public GoQuoteHandler() {\n    super(GoTypes.STRING, GoTypes.RAW_STRING, GoTypes.CHAR, TokenType.BAD_CHARACTER);\n  }\n\n  @Override\n  public boolean hasNonClosedLiteral(Editor editor, HighlighterIterator iterator, int offset) {\n    return true;\n  }\n\n  @Override\n  public TokenSet getConcatenatableStringTokenTypes() {\n    return SINGLE_LINE_LITERALS;\n  }\n\n  @Override\n  public String getStringConcatenationOperatorRepresentation() {\n    return \"+\";\n  }\n\n  @Override\n  public TokenSet getStringTokenTypes() {\n    return SINGLE_LINE_LITERALS;\n  }\n\n  @Override\n  public boolean isAppropriateElementTypeForLiteral(@NotNull IElementType tokenType) {\n    return true;\n  }\n\n  @Override\n  public boolean needParenthesesAroundConcatenation(PsiElement element) {\n    return false;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/editor/GoStatementMover.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.editor;\n\nimport com.goide.psi.*;\nimport com.intellij.codeInsight.editorActions.moveUpDown.LineMover;\nimport com.intellij.codeInsight.editorActions.moveUpDown.LineRange;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.openapi.editor.Editor;\nimport com.intellij.openapi.util.Couple;\nimport com.intellij.openapi.util.Pair;\nimport com.intellij.openapi.util.TextRange;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.impl.source.tree.TreeUtil;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\n\npublic class GoStatementMover extends LineMover {\n  @Override\n  public boolean checkAvailable(@NotNull Editor editor, @NotNull PsiFile file, @NotNull MoveInfo info, boolean down) {\n    if (!(file instanceof GoFile && super.checkAvailable(editor, file, info, down))) return false;\n\n    Couple<PsiElement> primeElementRange = getElementRange(editor, file);\n    if (primeElementRange == null) return false;\n\n    PsiElement commonParent = primeElementRange.first.isEquivalentTo(primeElementRange.second)\n                              ? primeElementRange.first.getParent()\n                              : PsiTreeUtil.findCommonParent(primeElementRange.first, primeElementRange.second);\n    if (commonParent == null) return false;\n\n    Couple<PsiElement> elementRange = getTopmostElementRange(primeElementRange, commonParent);\n    if (elementRange == null) return false;\n\n    if (commonParent == elementRange.first) commonParent = commonParent.getParent();\n    info.toMove = new LineRange(elementRange.first, elementRange.second);\n    \n    if (elementRange.first instanceof GoTopLevelDeclaration && commonParent instanceof GoFile) {\n      PsiElement toMove2 = getNeighborOfType(elementRange, GoTopLevelDeclaration.class, down);\n      info.toMove2 = toMove2 != null ? new LineRange(toMove2) : null;\n      return true;\n    }\n    if (commonParent instanceof GoImportList) {\n      PsiElement toMove2 = getNeighborOfType(elementRange, GoImportDeclaration.class, down);\n      info.toMove2 = toMove2 != null ? new LineRange(toMove2) : null;\n      return true;\n    }\n    return setUpInfo(info, elementRange, commonParent, down);\n  }\n\n  private static Couple<PsiElement> getElementRange(@NotNull Editor editor, @NotNull PsiFile file) {\n    Pair<PsiElement, PsiElement> primeElementRangePair = getElementRange(editor, file, getLineRangeFromSelection(editor));\n    if (primeElementRangePair == null) return null;\n    ASTNode firstNode = TreeUtil.findFirstLeaf(primeElementRangePair.first.getNode());\n    ASTNode lastNode = TreeUtil.findLastLeaf(primeElementRangePair.second.getNode());\n    if (firstNode == null || lastNode == null) return null;\n    return Couple.of(firstNode.getPsi(), lastNode.getPsi());\n  }\n\n  /**\n   * Return element range which contains TextRange(start, end) of top level elements\n   * common parent of elements is straight parent for each element\n   */\n  @Nullable\n  private static Couple<PsiElement> getTopmostElementRange(@NotNull Couple<PsiElement> elementRange, @NotNull PsiElement commonParent) {\n    if (elementRange.first == null || elementRange.second == null) return null;\n    int start = elementRange.first.getTextOffset();\n    int end = elementRange.second.getTextRange().getEndOffset();\n\n    TextRange range = commonParent.getTextRange();\n    PsiElement[] children = commonParent.getChildren();\n    if (commonParent.isEquivalentTo(elementRange.first) ||\n        commonParent.isEquivalentTo(elementRange.second) ||\n        range.getStartOffset() == start && (children.length == 0 || children[0].getTextRange().getStartOffset() > start) ||\n        range.getEndOffset() == end && (children.length == 0 || children[children.length - 1].getTextRange().getEndOffset() < end)) {\n      return Couple.of(commonParent, commonParent);\n    }\n\n    PsiElement startElement = elementRange.first;\n    PsiElement endElement = elementRange.second;\n    for (PsiElement element : children) {\n      range = element.getTextRange();\n      if (range.contains(start) && !range.contains(end)) {\n        startElement = element;\n      }\n      if (range.contains(end - 1) && !range.contains(start - 1)) {\n        endElement = element;\n      }\n    }\n\n    return startElement.getParent().isEquivalentTo(endElement.getParent()) ? Couple.of(startElement, endElement) : null;\n  }\n\n  private static boolean setUpInfo(@NotNull MoveInfo info,\n                                   @NotNull Couple<PsiElement> range,\n                                   @NotNull PsiElement commonParent,\n                                   boolean down) {\n    info.toMove = new LineRange(range.first, range.second);\n    info.toMove2 = null;\n    if (range.first instanceof GoPackageClause) return true;\n    PsiElement topLevelElement = PsiTreeUtil.findPrevParent(commonParent.getContainingFile(), commonParent);\n\n    int nearLine = down ? info.toMove.endLine : info.toMove.startLine - 1;\n    LineRange lineRange = new LineRange(topLevelElement);\n    if (!lineRange.containsLine(down ? info.toMove.endLine + 1 : info.toMove.startLine - 2)) {\n      return true;\n    }\n\n    info.toMove2 = lineRange.containsLine(down ? info.toMove.endLine + 1 : info.toMove.startLine - 2)\n                   ? new LineRange(nearLine, nearLine + 1)\n                   : null;\n    return true;\n  }\n\n  @Nullable\n  private static PsiElement getNeighborOfType(@NotNull Couple<PsiElement> range,\n                                              @NotNull Class<? extends PsiElement> clazz,\n                                              boolean rightNeighbor) {\n    return rightNeighbor ? PsiTreeUtil.getNextSiblingOfType(range.second, clazz) : PsiTreeUtil.getPrevSiblingOfType(range.first, clazz);\n  }\n}\n\n"
  },
  {
    "path": "src/com/goide/editor/GoTypeDeclarationProvider.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.editor;\n\nimport com.goide.psi.GoNamedElement;\nimport com.goide.psi.GoType;\nimport com.goide.psi.GoTypeReferenceExpression;\nimport com.intellij.codeInsight.navigation.actions.TypeDeclarationProvider;\nimport com.intellij.psi.PsiElement;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoTypeDeclarationProvider implements TypeDeclarationProvider {\n  @Nullable\n  @Override\n  public PsiElement[] getSymbolTypeDeclarations(@NotNull PsiElement element) {\n    if (!(element instanceof GoNamedElement)) return PsiElement.EMPTY_ARRAY;\n    GoType type = ((GoNamedElement)element).getGoType(null);\n    GoTypeReferenceExpression ref = type != null ? type.getTypeReferenceExpression() : null;\n    PsiElement resolve = ref != null ? ref.resolve() : type; // todo: think about better fallback instead of `type`\n    return resolve != null ? new PsiElement[]{resolve} : PsiElement.EMPTY_ARRAY;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/editor/GoTypedHandler.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.editor;\n\nimport com.intellij.codeInsight.template.impl.editorActions.TypedActionHandlerBase;\nimport com.intellij.openapi.actionSystem.DataContext;\nimport com.intellij.openapi.application.ApplicationManager;\nimport com.intellij.openapi.editor.Editor;\nimport com.intellij.openapi.editor.actionSystem.TypedActionHandler;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.TextRange;\nimport com.intellij.psi.PsiDocumentManager;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.codeStyle.CodeStyleManager;\nimport com.intellij.psi.util.PsiUtilBase;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoTypedHandler extends TypedActionHandlerBase {\n  public GoTypedHandler(TypedActionHandler originalHandler) {\n    super(originalHandler);\n  }\n\n  @Override\n  public void execute(@NotNull Editor editor, char c, @NotNull DataContext dataContext) {\n    if (myOriginalHandler != null) myOriginalHandler.execute(editor, c, dataContext);\n    if (c != 'e') return;\n    Project project = editor.getProject();\n    if (project == null) return;\n    int offset = editor.getCaretModel().getOffset();\n    if (offset < 4) return;\n    TextRange from = TextRange.from(offset - 4, 4);\n    String text = editor.getDocument().getText(from);\n    if (\"case\".equals(text)) {\n      PsiDocumentManager.getInstance(project).commitDocument(editor.getDocument());\n      ApplicationManager.getApplication().runWriteAction(() -> {\n        if (project.isDisposed()) return;\n        PsiFile file = PsiUtilBase.getPsiFileInEditor(editor, project);\n        if (file == null) return;\n        CodeStyleManager.getInstance(project).adjustLineIndent(file, from);\n      });\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/editor/GoWordSelectioner.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.editor;\n\nimport com.goide.psi.*;\nimport com.intellij.codeInsight.editorActions.wordSelection.AbstractWordSelectioner;\nimport com.intellij.openapi.editor.Editor;\nimport com.intellij.openapi.util.TextRange;\nimport com.intellij.psi.ElementManipulators;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.List;\n\npublic class GoWordSelectioner extends AbstractWordSelectioner {\n  @Override\n  public boolean canSelect(@NotNull PsiElement e) {\n    return e.getContainingFile() instanceof GoFile;\n  }\n\n  @Override\n  public List<TextRange> select(@NotNull PsiElement e, CharSequence editorText, int cursorOffset, Editor editor) {\n    PsiElement parent = e.getParent();\n    List<TextRange> result = super.select(e, editorText, cursorOffset, editor);\n    if (parent instanceof GoImportString || parent instanceof GoStringLiteral) {\n      result.add(ElementManipulators.getValueTextRange(parent).shiftRight(parent.getTextRange().getStartOffset()));\n    }\n    else if (parent instanceof GoImportDeclaration) {\n      result.addAll(extend(editorText, ((GoImportDeclaration)parent).getImportSpecList(), false));\n    }\n    else if (e instanceof GoSimpleStatement) {\n      result.addAll(expandToWholeLine(editorText, e.getTextRange()));\n    }\n    else if (e instanceof GoArgumentList || e instanceof GoParameters) {\n      if (e.getTextLength() > 2) {\n        result.add(TextRange.create(e.getTextRange().getStartOffset() + 1, e.getTextRange().getEndOffset() - 1));\n      }\n    }\n    else if (e instanceof GoBlock) {\n      result.addAll(extend(editorText, ((GoBlock)e).getStatementList(), true));\n    }\n    else if (parent instanceof GoNamedSignatureOwner) {\n      GoSignature signature = ((GoNamedSignatureOwner)parent).getSignature();\n      if (signature != null) {\n        int nameStartOffset = parent.getTextOffset();\n        result.add(TextRange.create(nameStartOffset, signature.getParameters().getTextRange().getEndOffset()));\n        result.add(TextRange.create(nameStartOffset, signature.getTextRange().getEndOffset()));\n      }\n    }\n    return result;\n  }\n\n  @NotNull\n  private static List<TextRange> extend(@NotNull CharSequence editorText, @NotNull List<? extends PsiElement> list, boolean expand) {\n    PsiElement first = ContainerUtil.getFirstItem(list);\n    PsiElement last = ContainerUtil.getLastItem(list);\n    if (first != null && last != null) {\n      TextRange range = TextRange.create(first.getTextRange().getStartOffset(), last.getTextRange().getEndOffset());\n      if (!expand) return ContainerUtil.newSmartList(range);\n      return expandToWholeLine(editorText, range);\n    }\n    return ContainerUtil.emptyList();\n  }\n}\n"
  },
  {
    "path": "src/com/goide/editor/marker/GoMethodSeparatorProvider.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.editor.marker;\n\nimport com.goide.psi.GoFile;\nimport com.goide.psi.GoTopLevelDeclaration;\nimport com.intellij.codeInsight.daemon.DaemonCodeAnalyzerSettings;\nimport com.intellij.codeInsight.daemon.LineMarkerInfo;\nimport com.intellij.codeInsight.daemon.LineMarkerProvider;\nimport com.intellij.codeInsight.daemon.impl.LineMarkersPass;\nimport com.intellij.openapi.editor.colors.EditorColorsManager;\nimport com.intellij.psi.PsiComment;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiWhiteSpace;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.Collection;\nimport java.util.List;\n\npublic class GoMethodSeparatorProvider implements LineMarkerProvider {\n  private final DaemonCodeAnalyzerSettings myDaemonSettings;\n  private final EditorColorsManager myColorsManager;\n\n  public GoMethodSeparatorProvider(DaemonCodeAnalyzerSettings daemonSettings, EditorColorsManager colorsManager) {\n    myDaemonSettings = daemonSettings;\n    myColorsManager = colorsManager;\n  }\n\n  @Nullable\n  @Override\n  public LineMarkerInfo getLineMarkerInfo(@NotNull PsiElement o) {\n    if (myDaemonSettings.SHOW_METHOD_SEPARATORS && o instanceof GoTopLevelDeclaration && o.getParent() instanceof GoFile) {\n      return LineMarkersPass.createMethodSeparatorLineMarker(findAnchorElement((GoTopLevelDeclaration)o), myColorsManager);\n    }\n    return null;\n  }\n\n  @Override\n  public void collectSlowLineMarkers(@NotNull List<PsiElement> elements, @NotNull Collection<LineMarkerInfo> result) {\n  }\n\n  @NotNull\n  private static PsiElement findAnchorElement(@NotNull GoTopLevelDeclaration o) {\n    PsiElement result = o;\n    PsiElement p = o;\n    while ((p = p.getPrevSibling()) != null) {\n      if (p instanceof PsiComment) {\n        result = p;\n      }\n      else if (p instanceof PsiWhiteSpace) {\n        if (p.getText().contains(\"\\n\\n\")) return result;\n      }\n      else {\n        break;\n      }\n    }\n    return result;\n  }\n}"
  },
  {
    "path": "src/com/goide/editor/smart/GoSmartEnterProcessor.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.editor.smart;\n\nimport com.goide.inspections.GoDeferGoInspection;\nimport com.goide.psi.*;\nimport com.goide.psi.impl.GoElementFactory;\nimport com.intellij.lang.SmartEnterProcessorWithFixers;\nimport com.intellij.openapi.editor.Editor;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport com.intellij.util.IncorrectOperationException;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.List;\n\npublic class GoSmartEnterProcessor extends SmartEnterProcessorWithFixers {\n  public GoSmartEnterProcessor() {\n    addFixers(new IfFixer(), new ForFixer(), new FuncFixer(), new GoDeferExpressionFixer());\n    addEnterProcessors(new PlainEnterProcessor());\n  }\n\n  private static void addBlockIfNeeded(@NotNull GoStatement element) {\n    if (element.getBlock() == null) element.add(GoElementFactory.createBlock(element.getProject()));\n  }\n\n  @Override\n  public boolean doNotStepInto(PsiElement element) {\n    return element instanceof GoBlock;\n  }\n\n  @Override\n  protected void collectAdditionalElements(@NotNull PsiElement element, @NotNull List<PsiElement> result) {\n    element = PsiTreeUtil.getParentOfType(element, GoStatement.class, GoFunctionOrMethodDeclaration.class, GoFunctionLit.class);\n    if (element != null) {\n      result.add(element);\n      PsiElement parent = element.getParent();\n      if (parent instanceof GoStatement) {\n        result.add(parent);\n      }\n    }\n  }\n\n  private static class GoDeferExpressionFixer extends Fixer<SmartEnterProcessorWithFixers> {\n    @Override\n    public void apply(@NotNull Editor editor, @NotNull SmartEnterProcessorWithFixers processor, @NotNull PsiElement element)\n      throws IncorrectOperationException {\n      Project project = element.getProject();\n      if (element instanceof GoGoStatement) {\n        PsiElement expr = GoDeferGoInspection.GoAddParensQuickFix.addParensIfNeeded(project, ((GoGoStatement)element).getExpression());\n        if (expr != null) {\n          element.replace(GoElementFactory.createGoStatement(project, expr.getText()));\n        }\n      }\n      else if (element instanceof GoDeferStatement) {\n        PsiElement expr = GoDeferGoInspection.GoAddParensQuickFix.addParensIfNeeded(project, ((GoDeferStatement)element).getExpression());\n        if (expr != null) {\n          element.replace(GoElementFactory.createDeferStatement(project, expr.getText()));\n        }\n      }\n    }\n  }\n\n  private static class FuncFixer extends Fixer<SmartEnterProcessorWithFixers> {\n    @Override\n    public void apply(@NotNull Editor editor, @NotNull SmartEnterProcessorWithFixers processor, @NotNull PsiElement element)\n      throws IncorrectOperationException {\n      if (element instanceof GoFunctionOrMethodDeclaration && ((GoFunctionOrMethodDeclaration)element).getBlock() == null) {\n        element.add(GoElementFactory.createBlock(element.getProject()));\n      }\n      if (element instanceof GoFunctionLit && ((GoFunctionLit)element).getBlock() == null) {\n        element.add(GoElementFactory.createBlock(element.getProject()));\n      }\n    }\n  }\n\n  private static class IfFixer extends Fixer<SmartEnterProcessorWithFixers> {\n    @Override\n    public void apply(@NotNull Editor editor, @NotNull SmartEnterProcessorWithFixers processor, @NotNull PsiElement element)\n      throws IncorrectOperationException {\n      if (element instanceof GoIfStatement) addBlockIfNeeded((GoIfStatement)element);\n    }\n  }\n\n  private static class ForFixer extends Fixer<SmartEnterProcessorWithFixers> {\n    @Override\n    public void apply(@NotNull Editor editor, @NotNull SmartEnterProcessorWithFixers processor, @NotNull PsiElement element)\n      throws IncorrectOperationException {\n      if (element instanceof GoForStatement) addBlockIfNeeded((GoStatement)element);\n    }\n  }\n\n  public static class PlainEnterProcessor extends FixEnterProcessor {\n    @Nullable\n    private static GoBlock findBlock(@Nullable PsiElement element) {\n      element = PsiTreeUtil.getNonStrictParentOfType(element, GoStatement.class, GoBlock.class, GoFunctionOrMethodDeclaration.class,\n                                                     GoFunctionLit.class);\n      if (element instanceof GoSimpleStatement && element.getParent() instanceof GoStatement) {\n        element = element.getParent();\n      }\n      if (element instanceof GoIfStatement) return ((GoIfStatement)element).getBlock();\n      if (element instanceof GoForStatement) return ((GoForStatement)element).getBlock();\n      if (element instanceof GoBlock) return (GoBlock)element;\n      if (element instanceof GoFunctionOrMethodDeclaration) return ((GoFunctionOrMethodDeclaration)element).getBlock();\n      if (element instanceof GoFunctionLit) return ((GoFunctionLit)element).getBlock();\n      return null;\n    }\n\n    @Override\n    public boolean doEnter(PsiElement psiElement, PsiFile file, @NotNull Editor editor, boolean modified) {\n      GoBlock block = findBlock(psiElement);\n      if (block != null) {\n        editor.getCaretModel().moveToOffset(block.getLbrace().getTextRange().getEndOffset());\n      }\n      plainEnter(editor);\n      return true;\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/editor/surround/GoBoolExpressionSurrounderBase.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.editor.surround;\n\nimport com.goide.psi.GoExpression;\nimport com.goide.psi.GoIfStatement;\nimport com.goide.psi.impl.GoElementFactory;\nimport com.goide.psi.impl.GoTypeUtil;\nimport com.intellij.openapi.util.TextRange;\nimport com.intellij.psi.PsiElement;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic abstract class GoBoolExpressionSurrounderBase extends GoExpressionSurrounder {\n  @Override\n  public boolean isApplicable(@NotNull PsiElement[] elements) {\n    GoExpression expression = getExpression(elements);\n    return expression != null && GoTypeUtil.isBoolean(expression.getGoType(null));\n  }\n\n  @Nullable\n  protected TextRange surroundExpressionWithIfElse(@NotNull PsiElement[] elements, boolean withElse) {\n    GoExpression expression = getExpression(elements);\n    if (expression == null) return null;\n    String condition = expression.getText();\n    GoIfStatement ifStatement = GoElementFactory.createIfStatement(expression.getProject(), condition, \"\", withElse ? \"\" : null);\n    PsiElement replace = expression.replace(ifStatement);\n    int offset = replace.getTextRange().getEndOffset();\n    return TextRange.create(offset, offset);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/editor/surround/GoExpressionSurroundDescriptor.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.editor.surround;\n\nimport com.goide.psi.GoExpression;\nimport com.goide.refactor.GoIntroduceVariableBase;\nimport com.intellij.featureStatistics.FeatureUsageTracker;\nimport com.intellij.internal.statistic.UsageTrigger;\nimport com.intellij.lang.surroundWith.SurroundDescriptor;\nimport com.intellij.lang.surroundWith.Surrounder;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoExpressionSurroundDescriptor implements SurroundDescriptor {\n  private static final Surrounder[] SURROUNDERS = new Surrounder[]{\n    new GoWithParenthesisSurrounder(),\n    new GoWithIfExpressionSurrounder(),\n    new GoWithIfElseExpressionSurrounder(),\n    new GoWithNotExpressionSurrounder()\n  };\n\n  @NotNull\n  @Override\n  public Surrounder[] getSurrounders() {\n    return SURROUNDERS;\n  }\n\n  @NotNull\n  @Override\n  public PsiElement[] getElementsToSurround(PsiFile file, int startOffset, int endOffset) {\n    GoExpression expr = GoIntroduceVariableBase.findExpressionInSelection(file, startOffset, endOffset);\n    if (expr == null) return PsiElement.EMPTY_ARRAY;\n    UsageTrigger.trigger(\"go.surroundwith.expression\");\n    FeatureUsageTracker.getInstance().triggerFeatureUsed(\"codeassists.surroundwith.expression\");\n    return new PsiElement[]{expr};\n  }\n\n  @Override\n  public boolean isExclusive() {\n    return false;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/editor/surround/GoExpressionSurrounder.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.editor.surround;\n\nimport com.goide.psi.GoExpression;\nimport com.goide.psi.impl.GoElementFactory;\nimport com.intellij.lang.surroundWith.Surrounder;\nimport com.intellij.openapi.util.TextRange;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.util.ArrayUtil;\nimport com.intellij.util.ObjectUtils;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic abstract class GoExpressionSurrounder implements Surrounder {\n  @Override\n  public boolean isApplicable(@NotNull PsiElement[] elements) {\n    return getExpression(elements) != null;\n  }\n\n  @Nullable\n  protected TextRange surroundWithParenthesis(@NotNull PsiElement[] elements, boolean withNot) {\n    GoExpression expression = getExpression(elements);\n    if (expression == null) return null;\n\n    String text = (withNot ? \"!\" : \"\") + \"(\" + expression.getText() + \")\";\n    GoExpression parenthExprNode = GoElementFactory.createExpression(expression.getProject(), text);\n    PsiElement replace = expression.replace(parenthExprNode);\n    int endOffset = replace.getTextRange().getEndOffset();\n    return TextRange.create(endOffset, endOffset);\n  }\n\n  @Nullable\n  protected GoExpression getExpression(@NotNull PsiElement[] elements) {\n    return ObjectUtils.tryCast(ArrayUtil.getFirstElement(elements), GoExpression.class);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/editor/surround/GoStatementsSurroundDescriptor.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.editor.surround;\n\nimport com.goide.psi.GoFile;\nimport com.goide.psi.GoPsiTreeUtil;\nimport com.goide.psi.GoStatement;\nimport com.intellij.lang.surroundWith.SurroundDescriptor;\nimport com.intellij.lang.surroundWith.Surrounder;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoStatementsSurroundDescriptor implements SurroundDescriptor {\n  private static final Surrounder[] SURROUNDERS = new Surrounder[]{\n    new GoWithIfSurrounder(),\n    new GoWithIfElseSurrounder(),\n    new GoWithForSurrounder(),\n    new GoWithBlockSurrounder()\n  };\n\n  @NotNull\n  @Override\n  public Surrounder[] getSurrounders() {\n    return SURROUNDERS;\n  }\n\n  @NotNull\n  @Override\n  public PsiElement[] getElementsToSurround(PsiFile file, int startOffset, int endOffset) {\n    return file instanceof GoFile\n           ? GoPsiTreeUtil.getTopLevelElementsInRange((GoFile)file, startOffset, endOffset, GoStatement.class)\n           : PsiElement.EMPTY_ARRAY;\n  }\n\n  @Override\n  public boolean isExclusive() {\n    return false;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/editor/surround/GoStatementsSurrounder.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.editor.surround;\n\nimport com.goide.psi.GoBlock;\nimport com.goide.psi.GoIfStatement;\nimport com.goide.psi.impl.GoElementFactory;\nimport com.intellij.lang.surroundWith.Surrounder;\nimport com.intellij.openapi.editor.Editor;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.TextRange;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.util.ArrayUtil;\nimport com.intellij.util.IncorrectOperationException;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic abstract class GoStatementsSurrounder implements Surrounder {\n  @Override\n  public boolean isApplicable(@NotNull PsiElement[] elements) {\n    return true;\n  }\n\n  @Override\n  @Nullable\n  public TextRange surroundElements(@NotNull Project project,\n                                    @NotNull Editor editor,\n                                    @NotNull PsiElement[] elements) throws IncorrectOperationException {\n    PsiElement container = elements[0].getParent();\n    if (container == null) return null;\n    return surroundStatements(project, container, elements);\n  }\n\n  @Nullable\n  protected abstract TextRange surroundStatements(@NotNull Project project,\n                                                  @NotNull PsiElement container,\n                                                  @NotNull PsiElement[] statements) throws IncorrectOperationException;\n\n  @Nullable\n  protected TextRange surroundStatementsWithIfElse(@NotNull Project project,\n                                                   @NotNull PsiElement container,\n                                                   @NotNull PsiElement[] statements,\n                                                   boolean withElse) {\n    PsiElement first = ArrayUtil.getFirstElement(statements);\n    PsiElement last = ArrayUtil.getLastElement(statements);\n    String block = StringUtil.join(statements, PsiElement::getText, \"\\n\");\n    GoIfStatement ifStatement = GoElementFactory.createIfStatement(project, \"\", block, withElse ? \"\" : null);\n    ifStatement = (GoIfStatement)container.addAfter(ifStatement, last);\n    container.deleteChildRange(first, last);\n    int offset = getOffsetLBraceOfBlock(ifStatement.getBlock());\n    return offset > -1 ? new TextRange(offset, offset) : null;\n  }\n\n  protected int getOffsetLBraceOfBlock(@Nullable GoBlock block) {\n    return block != null ? block.getLbrace().getTextRange().getStartOffset() : -1;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/editor/surround/GoWithBlockSurrounder.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.editor.surround;\n\nimport com.goide.psi.GoBlock;\nimport com.goide.psi.impl.GoElementFactory;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.TextRange;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.impl.source.codeStyle.CodeEditUtil;\nimport com.intellij.util.ArrayUtil;\nimport com.intellij.util.IncorrectOperationException;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoWithBlockSurrounder extends GoStatementsSurrounder {\n  @Override\n  public String getTemplateDescription() {\n    return \"{ statements }\";\n  }\n\n  @Nullable\n  @Override\n  protected TextRange surroundStatements(@NotNull Project project,\n                                         @NotNull PsiElement container,\n                                         @NotNull PsiElement[] statements) throws IncorrectOperationException {\n    GoBlock block = GoElementFactory.createBlock(project);\n    PsiElement first = ArrayUtil.getFirstElement(statements);\n    PsiElement last = ArrayUtil.getLastElement(statements);\n    block = (GoBlock)container.addAfter(block, last);\n    block.addRangeAfter(first, last, block.getLbrace());\n    CodeEditUtil.markToReformat(block.getNode(), true);\n    container.deleteChildRange(first, last);\n    int offset = block.getTextRange().getEndOffset();\n    return new TextRange(offset, offset);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/editor/surround/GoWithForSurrounder.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.editor.surround;\n\nimport com.goide.psi.GoForStatement;\nimport com.goide.psi.impl.GoElementFactory;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.TextRange;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.util.ArrayUtil;\nimport com.intellij.util.IncorrectOperationException;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoWithForSurrounder extends GoStatementsSurrounder {\n  @Override\n  public String getTemplateDescription() {\n    return \"for { statements }\";\n  }\n\n  @Nullable\n  @Override\n  protected TextRange surroundStatements(@NotNull Project project,\n                                         @NotNull PsiElement container,\n                                         @NotNull PsiElement[] statements) throws IncorrectOperationException {\n    String text = StringUtil.join(statements, PsiElement::getText, \"\\n\");\n    GoForStatement forStatement = GoElementFactory.createForStatement(project, text);\n    PsiElement first = ArrayUtil.getFirstElement(statements);\n    PsiElement last = ArrayUtil.getLastElement(statements);\n    forStatement = (GoForStatement)container.addAfter(forStatement, last);\n    container.deleteChildRange(first, last);\n    int offset = getOffsetLBraceOfBlock(forStatement.getBlock());\n    return offset > -1 ? new TextRange(offset, offset) : null;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/editor/surround/GoWithIfElseExpressionSurrounder.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.editor.surround;\n\nimport com.intellij.openapi.editor.Editor;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.TextRange;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.util.IncorrectOperationException;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoWithIfElseExpressionSurrounder extends GoBoolExpressionSurrounderBase {\n  @Override\n  public String getTemplateDescription() {\n    return \"if expression { } else { }\";\n  }\n\n  @Nullable\n  @Override\n  public TextRange surroundElements(@NotNull Project project, @NotNull Editor editor, @NotNull PsiElement[] elements)\n    throws IncorrectOperationException {\n    return surroundExpressionWithIfElse(elements, true);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/editor/surround/GoWithIfElseSurrounder.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.editor.surround;\n\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.TextRange;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.util.IncorrectOperationException;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoWithIfElseSurrounder extends GoStatementsSurrounder {\n  @Override\n  public String getTemplateDescription() {\n    return \"if { statements } else { }\";\n  }\n\n  @Nullable\n  @Override\n  protected TextRange surroundStatements(@NotNull Project project,\n                                         @NotNull PsiElement container,\n                                         @NotNull PsiElement[] statements) throws IncorrectOperationException {\n    return surroundStatementsWithIfElse(project, container, statements, true);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/editor/surround/GoWithIfExpressionSurrounder.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.editor.surround;\n\nimport com.intellij.openapi.editor.Editor;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.TextRange;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.util.IncorrectOperationException;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoWithIfExpressionSurrounder extends GoBoolExpressionSurrounderBase {\n  @Override\n  public String getTemplateDescription() {\n    return \"if expression { }\";\n  }\n\n  @Nullable\n  @Override\n  public TextRange surroundElements(@NotNull Project project, @NotNull Editor editor, @NotNull PsiElement[] elements)\n    throws IncorrectOperationException {\n    return surroundExpressionWithIfElse(elements, false);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/editor/surround/GoWithIfSurrounder.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.editor.surround;\n\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.TextRange;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.util.IncorrectOperationException;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoWithIfSurrounder extends GoStatementsSurrounder {\n  @Override\n  public String getTemplateDescription() {\n    return \"if { statements }\";\n  }\n\n  @Nullable\n  @Override\n  protected TextRange surroundStatements(@NotNull Project project,\n                                         @NotNull PsiElement container,\n                                         @NotNull PsiElement[] statements) throws IncorrectOperationException {\n    return surroundStatementsWithIfElse(project, container, statements, false);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/editor/surround/GoWithNotExpressionSurrounder.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.editor.surround;\n\nimport com.intellij.openapi.editor.Editor;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.TextRange;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.util.IncorrectOperationException;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoWithNotExpressionSurrounder extends GoBoolExpressionSurrounderBase {\n  @Override\n  public String getTemplateDescription() {\n    return \"!(expression)\";\n  }\n\n  @Nullable\n  @Override\n  public TextRange surroundElements(@NotNull Project project, @NotNull Editor editor, @NotNull PsiElement[] elements)\n    throws IncorrectOperationException {\n    return surroundWithParenthesis(elements, true);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/editor/surround/GoWithParenthesisSurrounder.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.editor.surround;\n\nimport com.intellij.openapi.editor.Editor;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.TextRange;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.util.IncorrectOperationException;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoWithParenthesisSurrounder extends GoExpressionSurrounder {\n  @Override\n  public String getTemplateDescription() {\n    return \"(expression)\";\n  }\n\n  @Nullable\n  @Override\n  public TextRange surroundElements(@NotNull Project project, @NotNull Editor editor, @NotNull PsiElement[] elements)\n    throws IncorrectOperationException {\n    return surroundWithParenthesis(elements, false);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/formatter/GoFormattingModelBuilder.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.formatter;\n\nimport com.goide.GoLanguage;\nimport com.goide.psi.*;\nimport com.intellij.formatting.*;\nimport com.intellij.formatting.alignment.AlignmentStrategy;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.openapi.util.Key;\nimport com.intellij.openapi.util.TextRange;\nimport com.intellij.openapi.util.UserDataHolderBase;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.TokenType;\nimport com.intellij.psi.codeStyle.CodeStyleSettings;\nimport com.intellij.psi.tree.IElementType;\nimport com.intellij.psi.tree.TokenSet;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.Collections;\nimport java.util.List;\n\nimport static com.goide.GoParserDefinition.*;\nimport static com.goide.GoTypes.*;\n\npublic class GoFormattingModelBuilder implements FormattingModelBuilder {\n  @NotNull\n  private static SpacingBuilder createSpacingBuilder(@NotNull CodeStyleSettings settings) {\n    return new SpacingBuilder(settings, GoLanguage.INSTANCE)\n      .before(COMMA).spaceIf(false)\n      .after(COMMA).spaceIf(true)\n      .betweenInside(SEMICOLON, SEMICOLON, FOR_CLAUSE).spaces(1)\n      .before(SEMICOLON).spaceIf(false)\n      .after(SEMICOLON).spaceIf(true)\n      .beforeInside(DOT, IMPORT_SPEC).none()\n      .afterInside(DOT, IMPORT_SPEC).spaces(1)\n      .around(DOT).none()\n      .around(ASSIGN).spaces(1)\n      .around(VAR_ASSIGN).spaces(1)\n      .aroundInside(MUL, POINTER_TYPE).none()\n      .before(ARGUMENT_LIST).none()\n      .before(BUILTIN_ARGUMENT_LIST).none()\n      .afterInside(LPAREN, ARGUMENT_LIST).none()\n      .beforeInside(RPAREN, ARGUMENT_LIST).none()\n      .afterInside(LPAREN, BUILTIN_ARGUMENT_LIST).none()\n      .beforeInside(RPAREN, BUILTIN_ARGUMENT_LIST).none()\n      .before(SIGNATURE).none()\n      .afterInside(LPAREN, TYPE_ASSERTION_EXPR).none()\n      .beforeInside(RPAREN, TYPE_ASSERTION_EXPR).none()\n      .afterInside(LPAREN, PARAMETERS).none()\n      .beforeInside(RPAREN, PARAMETERS).none()\n      .afterInside(LPAREN, RESULT).none()\n      .beforeInside(RPAREN, RESULT).none()\n      .between(PARAMETERS, RESULT).spaces(1)\n      .before(BLOCK).spaces(1)\n      .after(FUNC).spaces(1)\n      .after(PACKAGE).spaces(1)\n      .after(IMPORT).spaces(1)\n      .after(CONST).spaces(1)\n      .after(VAR).spaces(1)\n      .after(STRUCT).spaces(1)\n      .after(INTERFACE).spaces(1)\n      .after(RETURN).spaces(1)\n      .after(GO).spaces(1)\n      .after(DEFER).spaces(1)\n      .after(FALLTHROUGH).spaces(1)\n      .after(GOTO).spaces(1)\n      .after(CONTINUE).spaces(1)\n      .after(BREAK).spaces(1)\n      .after(SELECT).spaces(1)\n      .after(FOR).spaces(1)\n      .after(IF).spaces(1)\n      .after(ELSE).spaces(1)\n      .before(ELSE_STATEMENT).spaces(1)\n      .after(CASE).spaces(1)\n      .after(RANGE).spaces(1)\n      .after(SWITCH).spaces(1)\n      .afterInside(SEND_CHANNEL, UNARY_EXPR).none()\n      .aroundInside(SEND_CHANNEL, SEND_STATEMENT).spaces(1)\n      .afterInside(CHAN, CHANNEL_TYPE).spaces(1)\n      .afterInside(MAP, MAP_TYPE).none()\n      .aroundInside(LBRACK, MAP_TYPE).none()\n      .aroundInside(RBRACK, MAP_TYPE).none()\n      .beforeInside(LITERAL_VALUE, COMPOSITE_LIT).none()\n      .afterInside(LBRACE, LITERAL_VALUE).none()\n      .beforeInside(LBRACE, LITERAL_VALUE).none()\n      .afterInside(BIT_AND, UNARY_EXPR).none()\n      .after(LINE_COMMENT).lineBreakInCode()\n      .after(MULTILINE_COMMENT).lineBreakInCode()\n      .between(COMM_CASE, COLON).none()\n      .afterInside(COLON, COMM_CLAUSE).lineBreakInCode()\n      .betweenInside(FIELD_DECLARATION, LINE_COMMENT, STRUCT_TYPE).spaces(1)\n      .betweenInside(FIELD_DECLARATION, MULTILINE_COMMENT, STRUCT_TYPE).spaces(1)\n      .betweenInside(LBRACK, RBRACK, ARRAY_OR_SLICE_TYPE).none()\n      .around(ASSIGN_OP).spaces(1)\n      .aroundInside(OPERATORS, TokenSet.create(MUL_EXPR, ADD_EXPR, OR_EXPR, CONDITIONAL_EXPR)).spaces(1)\n\n      .betweenInside(LBRACE, RBRACE, BLOCK).spacing(0, 0, 0, true, 1)\n      .afterInside(LBRACE, BLOCK).spacing(0, 0, 1, true, 1)\n      .beforeInside(RBRACE, BLOCK).spacing(0, 0, 1, true, 1)\n      \n      .betweenInside(LPAREN, RPAREN, IMPORT_DECLARATION).spacing(0, 0, 0, false, 0)\n      .afterInside(LPAREN, IMPORT_DECLARATION).spacing(0, 0, 1, false, 0)\n      .beforeInside(RPAREN, IMPORT_DECLARATION).spacing(0, 0, 1, false, 0)\n      .between(IMPORT_SPEC, IMPORT_SPEC).spacing(0, 0, 1, true, 1)\n      \n      .betweenInside(LPAREN, RPAREN, VAR_DECLARATION).spacing(0, 0, 0, false, 0)\n      .afterInside(LPAREN, VAR_DECLARATION).spacing(0, 0, 1, false, 0)\n      .beforeInside(RPAREN, VAR_DECLARATION).spacing(0, 0, 1, false, 0)\n      .beforeInside(TYPE, VAR_SPEC).spaces(1)\n      .between(VAR_SPEC, VAR_SPEC).spacing(0, 0, 1, true, 1)\n      \n      .betweenInside(LPAREN, RPAREN, CONST_DECLARATION).spacing(0, 0, 0, false, 0)\n      .afterInside(LPAREN, CONST_DECLARATION).spacing(0, 0, 1, false, 0)\n      .beforeInside(RPAREN, CONST_DECLARATION).spacing(0, 0, 1, false, 0)\n      .beforeInside(TYPE, CONST_SPEC).spaces(1)\n      .between(CONST_SPEC, CONST_SPEC).spacing(0, 0, 1, true, 1)\n      \n      .between(FIELD_DECLARATION, FIELD_DECLARATION).spacing(0, 0, 1, true, 1)\n      .between(METHOD_SPEC, METHOD_SPEC).spacing(0, 0, 1, true, 1)\n      ;\n  }\n\n  @NotNull\n  @Override\n  public FormattingModel createModel(@NotNull PsiElement element, @NotNull CodeStyleSettings settings) {\n    Block block = new GoFormattingBlock(element.getNode(), null, Indent.getNoneIndent(), null, settings, createSpacingBuilder(settings));\n    return FormattingModelProvider.createFormattingModelForPsiFile(element.getContainingFile(), block, settings);\n  }\n\n  @Nullable\n  @Override\n  public TextRange getRangeAffectingIndent(PsiFile file, int offset, ASTNode elementAtOffset) {\n    return null;\n  }\n\n  private static class GoFormattingBlock extends UserDataHolderBase implements ASTBlock {\n    private static final TokenSet BLOCKS_TOKEN_SET = TokenSet.create(\n      BLOCK,\n      STRUCT_TYPE,\n      INTERFACE_TYPE,\n      SELECT_STATEMENT,\n      EXPR_CASE_CLAUSE,\n      TYPE_CASE_CLAUSE,\n      LITERAL_VALUE\n    );\n\n    private static final TokenSet BRACES_TOKEN_SET = TokenSet.create(\n      LBRACE,\n      RBRACE,\n      LBRACK,\n      RBRACK,\n      LPAREN,\n      RPAREN\n    );\n    private static final Key<Alignment> TYPE_ALIGNMENT_INSIDE_STRUCT = Key.create(\"TYPE_ALIGNMENT_INSIDE_STRUCT\");\n\n    @NotNull private final ASTNode myNode;\n    @Nullable private final Alignment myAlignment;\n    @Nullable private final Indent myIndent;\n    @Nullable private final Wrap myWrap;\n    @NotNull private final CodeStyleSettings mySettings;\n    @NotNull private final SpacingBuilder mySpacingBuilder;\n    @Nullable private List<Block> mySubBlocks;\n\n    private GoFormattingBlock(@NotNull ASTNode node,\n                              @Nullable Alignment alignment,\n                              @Nullable Indent indent,\n                              @Nullable Wrap wrap,\n                              @NotNull CodeStyleSettings settings,\n                              @NotNull SpacingBuilder spacingBuilder) {\n      myNode = node;\n      myAlignment = alignment;\n      myIndent = indent;\n      myWrap = wrap;\n      mySettings = settings;\n      mySpacingBuilder = spacingBuilder;\n    }\n\n    @NotNull\n    private static Indent indentIfNotBrace(@NotNull ASTNode child) {\n      return BRACES_TOKEN_SET.contains(child.getElementType()) ? Indent.getNoneIndent() : Indent.getNormalIndent();\n    }\n\n    private static boolean isTopLevelDeclaration(@NotNull PsiElement element) {\n      return element instanceof GoPackageClause || element instanceof GoImportList \n             || element instanceof GoTopLevelDeclaration && element.getParent() instanceof GoFile; \n    }\n\n    private static Spacing lineBreak() {\n      return lineBreak(true);\n    }\n\n    private static Spacing lineBreak(boolean keepLineBreaks) {\n      return lineBreak(0, keepLineBreaks);\n    }\n\n    private static Spacing lineBreak(int lineBreaks, boolean keepLineBreaks) {\n      return Spacing.createSpacing(0, 0, lineBreaks + 1, keepLineBreaks, keepLineBreaks ? 1 : 0);\n    }\n\n    private static Spacing none() {\n      return Spacing.createSpacing(0, 0, 0, false, 0);\n    }\n\n    private static Spacing one() {\n      return Spacing.createSpacing(1, 1, 0, false, 0);\n    }\n\n    @NotNull\n    @Override\n    public ASTNode getNode() {\n      return myNode;\n    }\n\n    @NotNull\n    @Override\n    public TextRange getTextRange() {\n      return myNode.getTextRange();\n    }\n\n    @Nullable\n    @Override\n    public Wrap getWrap() {\n      return myWrap;\n    }\n\n    @Nullable\n    @Override\n    public Indent getIndent() {\n      return myIndent;\n    }\n\n    @Nullable\n    @Override\n    public Alignment getAlignment() {\n      return myAlignment;\n    }\n\n    @NotNull\n    @Override\n    public List<Block> getSubBlocks() {\n      if (mySubBlocks == null) {\n        mySubBlocks = buildSubBlocks();\n      }\n      return ContainerUtil.newArrayList(mySubBlocks);\n    }\n\n    @NotNull\n    private List<Block> buildSubBlocks() {\n      AlignmentStrategy.AlignmentPerTypeStrategy strategy = null;\n      boolean isStruct = getNode().getElementType() == STRUCT_TYPE;\n      Alignment forType = null;\n      if (isStruct) {\n        strategy = AlignmentStrategy.createAlignmentPerTypeStrategy(ContainerUtil.list(FIELD_DECLARATION, LINE_COMMENT), STRUCT_TYPE, true);\n        forType = Alignment.createAlignment(true);\n      }\n\n      List<Block> blocks = ContainerUtil.newArrayList();\n      for (ASTNode child = myNode.getFirstChildNode(); child != null; child = child.getTreeNext()) {\n        IElementType childType = child.getElementType();\n        if (child.getTextRange().getLength() == 0) continue;\n        if (childType == TokenType.WHITE_SPACE) continue;\n        IElementType substitutor = childType == MULTILINE_COMMENT ? LINE_COMMENT : childType;\n        Alignment alignment = strategy != null ? strategy.getAlignment(substitutor) : null;\n        GoFormattingBlock e = buildSubBlock(child, alignment);\n        if (isStruct) {\n          e.putUserDataIfAbsent(TYPE_ALIGNMENT_INSIDE_STRUCT, forType);\n        }\n        blocks.add(e);\n      }\n      return Collections.unmodifiableList(blocks);\n    }\n    \n    @NotNull\n    private GoFormattingBlock buildSubBlock(@NotNull ASTNode child, @Nullable Alignment alignment) {\n      if (child.getPsi() instanceof GoType && child.getTreeParent().getElementType() == FIELD_DECLARATION) {\n        alignment = getUserData(TYPE_ALIGNMENT_INSIDE_STRUCT);\n      }\n      Indent indent = calcIndent(child);\n      return new GoFormattingBlock(child, alignment, indent, null, mySettings, mySpacingBuilder);\n    }\n    \n    @NotNull\n    private Indent calcIndent(@NotNull ASTNode child) {\n      IElementType parentType = myNode.getElementType();\n      IElementType type = child.getElementType();\n      if (type == SWITCH_START) return Indent.getNoneIndent();\n      if (parentType == BLOCK && type == SELECT_STATEMENT) return Indent.getNoneIndent();\n      if (parentType == SELECT_STATEMENT && type == RBRACE) return Indent.getNormalIndent();\n      if (parentType == ARGUMENT_LIST && type != LPAREN && type != RPAREN) return Indent.getNormalIndent();\n      if ((parentType == EXPR_CASE_CLAUSE || parentType == TYPE_CASE_CLAUSE) && (type == CASE || type == DEFAULT)) return Indent.getNoneIndent();\n      if (BLOCKS_TOKEN_SET.contains(parentType)) return indentIfNotBrace(child);\n      if (parentType == IMPORT_DECLARATION) return indentOfMultipleDeclarationChild(type, IMPORT_SPEC);\n      if (parentType == CONST_DECLARATION) return indentOfMultipleDeclarationChild(type, CONST_SPEC);\n      if (parentType == VAR_DECLARATION) return indentOfMultipleDeclarationChild(type, VAR_SPEC);\n      if (parentType == TYPE_DECLARATION) return indentOfMultipleDeclarationChild(type, TYPE_SPEC);\n      if (parentType == COMM_CLAUSE && child.getPsi() instanceof GoStatement) return Indent.getNormalIndent();\n      if (child.getPsi() instanceof GoExpression) return Indent.getContinuationWithoutFirstIndent(); \n      return Indent.getNoneIndent();\n    }\n\n    private Indent indentOfMultipleDeclarationChild(@NotNull IElementType childType, @NotNull IElementType specType) {\n      if (childType == specType) {\n        return Indent.getNormalIndent();\n      }\n      return COMMENTS.contains(childType) && myNode.findChildByType(specType) != null ? Indent.getNormalIndent() : Indent.getNoneIndent();\n    }\n\n    @Override\n    public Spacing getSpacing(@Nullable Block child1, @NotNull Block child2) {\n      if (child1 instanceof GoFormattingBlock && child2 instanceof GoFormattingBlock) {\n        ASTNode n1 = ((GoFormattingBlock)child1).getNode();\n        ASTNode n2 = ((GoFormattingBlock)child2).getNode();\n        PsiElement psi1 = n1.getPsi();\n        PsiElement psi2 = n2.getPsi();\n        if (n1.getElementType() == FIELD_DEFINITION && psi2 instanceof GoType) return one();\n        \n        PsiElement parent = psi1.getParent();\n        if (parent instanceof GoStructType || parent instanceof GoInterfaceType) {\n          boolean oneLineType = !parent.textContains('\\n');\n          if ((n1.getElementType() == STRUCT || n1.getElementType() == INTERFACE) && n2.getElementType() == LBRACE) {\n            return oneLineType ? none() : one();\n          }\n          if (n1.getElementType() == LBRACE && n2.getElementType() == RBRACE) {\n            return oneLineType ? none() : lineBreak();\n          }\n          if (n1.getElementType() == LBRACE) {\n            return oneLineType ? one() : lineBreak(false);\n          }\n          if (n2.getElementType() == RBRACE) {\n            return oneLineType ? one() : lineBreak(false);\n          }\n        }\n          \n        if (psi1 instanceof GoStatement && psi2 instanceof GoStatement) {\n          return lineBreak();\n        }\n        if (isTopLevelDeclaration(psi2) && (isTopLevelDeclaration(psi1) || n1.getElementType() == SEMICOLON)) {\n          // Different declarations should be separated by blank line \n          boolean sameKind = psi1.getClass().equals(psi2.getClass())\n                             || psi1 instanceof GoFunctionOrMethodDeclaration && psi2 instanceof GoFunctionOrMethodDeclaration;\n          return sameKind ? lineBreak() : lineBreak(1, true);\n        }\n      }\n      return mySpacingBuilder.getSpacing(this, child1, child2);\n    }\n\n    @NotNull\n    @Override\n    public ChildAttributes getChildAttributes(int newChildIndex) {\n      Indent childIndent = Indent.getNoneIndent();\n      IElementType parentType = myNode.getElementType();\n      if (BLOCKS_TOKEN_SET.contains(parentType) ||\n          parentType == IMPORT_DECLARATION ||\n          parentType == CONST_DECLARATION ||\n          parentType == VAR_DECLARATION ||\n          parentType == TYPE_DECLARATION ||\n          parentType == ARGUMENT_LIST) {\n        childIndent = Indent.getNormalIndent();\n      }\n      if (parentType == EXPR_SWITCH_STATEMENT || parentType == TYPE_SWITCH_STATEMENT || parentType == SELECT_STATEMENT) {\n        List<Block> subBlocks = getSubBlocks();\n        Block block = subBlocks.size() > newChildIndex ? subBlocks.get(newChildIndex - 1) : null;\n        if (block instanceof GoFormattingBlock) {\n          IElementType type = ((GoFormattingBlock)block).getNode().getElementType();\n          if (type == TYPE_CASE_CLAUSE || type == EXPR_CASE_CLAUSE) {\n            childIndent = Indent.getNormalIndent();\n          }\n          else if (type == COMM_CLAUSE) {\n            childIndent = Indent.getNormalIndent(true);\n          }\n        }\n      }\n      return new ChildAttributes(childIndent, null);\n    }\n\n    @Override\n    public boolean isIncomplete() {\n      return false;\n    }\n\n    @Override\n    public boolean isLeaf() {\n      return myNode.getFirstChildNode() == null;\n    }\n  }\n}"
  },
  {
    "path": "src/com/goide/formatter/settings/GoCodeStyleConfigurable.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.formatter.settings;\n\nimport com.goide.GoConstants;\nimport com.goide.GoLanguage;\nimport com.intellij.application.options.CodeStyleAbstractConfigurable;\nimport com.intellij.application.options.CodeStyleAbstractPanel;\nimport com.intellij.application.options.TabbedLanguageCodeStylePanel;\nimport com.intellij.psi.codeStyle.CodeStyleSettings;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoCodeStyleConfigurable extends CodeStyleAbstractConfigurable {\n  public GoCodeStyleConfigurable(@NotNull CodeStyleSettings settings, CodeStyleSettings cloneSettings) {\n    super(settings, cloneSettings, GoConstants.GO);\n  }\n\n  @NotNull\n  @Override\n  protected CodeStyleAbstractPanel createPanel(CodeStyleSettings settings) {\n    return new GoCodeStyleMainPanel(getCurrentSettings(), settings);\n  }\n\n  @Override\n  public String getHelpTopic() {\n    return null;\n  }\n\n  private static class GoCodeStyleMainPanel extends TabbedLanguageCodeStylePanel {\n    private GoCodeStyleMainPanel(CodeStyleSettings currentSettings, CodeStyleSettings settings) {\n      super(GoLanguage.INSTANCE, currentSettings, settings);\n    }\n\n    @Override\n    protected void addSpacesTab(CodeStyleSettings settings) {\n    }\n\n    @Override\n    protected void addBlankLinesTab(CodeStyleSettings settings) {\n    }\n\n    @Override\n    protected void addWrappingAndBracesTab(CodeStyleSettings settings) {\n    }\n  }\n}"
  },
  {
    "path": "src/com/goide/formatter/settings/GoCodeStyleSettingsProvider.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.formatter.settings;\n\nimport com.goide.GoConstants;\nimport com.intellij.openapi.options.Configurable;\nimport com.intellij.psi.codeStyle.CodeStyleSettings;\nimport com.intellij.psi.codeStyle.CodeStyleSettingsProvider;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoCodeStyleSettingsProvider extends CodeStyleSettingsProvider {\n  @Override\n  public String getConfigurableDisplayName() {\n    return GoConstants.GO;\n  }\n\n  @NotNull\n  @Override\n  public Configurable createSettingsPage(@NotNull CodeStyleSettings settings, CodeStyleSettings originalSettings) {\n    return new GoCodeStyleConfigurable(settings, originalSettings);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/formatter/settings/GoLanguageCodeStyleSettingsProvider.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.formatter.settings;\n\nimport com.goide.GoLanguage;\nimport com.intellij.application.options.IndentOptionsEditor;\nimport com.intellij.application.options.SmartIndentOptionsEditor;\nimport com.intellij.lang.Language;\nimport com.intellij.psi.codeStyle.CommonCodeStyleSettings;\nimport com.intellij.psi.codeStyle.LanguageCodeStyleSettingsProvider;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoLanguageCodeStyleSettingsProvider extends LanguageCodeStyleSettingsProvider {\n  private static final String DEFAULT_CODE_SAMPLE =\n    \"package main\\n\" +\n    \"\\n\" +\n    \"import \\\"fmt\\\"\\n\" +\n    \"\\n\" +\n    \"func main() {\\n\" +\n    \"\\tfmt.Println(\\\"Hello\\\")\\n\" +\n    \"}\";\n\n  @NotNull\n  @Override\n  public Language getLanguage() {\n    return GoLanguage.INSTANCE;\n  }\n\n  @NotNull\n  @Override\n  public String getCodeSample(@NotNull SettingsType settingsType) {\n    return DEFAULT_CODE_SAMPLE;\n  }\n\n  @Override\n  public IndentOptionsEditor getIndentOptionsEditor() {\n    return new SmartIndentOptionsEditor();\n  }\n\n  @Override\n  public CommonCodeStyleSettings getDefaultCommonSettings() {\n    CommonCodeStyleSettings defaultSettings = new CommonCodeStyleSettings(getLanguage());\n    CommonCodeStyleSettings.IndentOptions indentOptions = defaultSettings.initIndentOptions();\n    indentOptions.INDENT_SIZE = 8;\n    indentOptions.CONTINUATION_INDENT_SIZE = 8;\n    indentOptions.TAB_SIZE = 8;\n    indentOptions.USE_TAB_CHARACTER = true;\n    \n    defaultSettings.BLOCK_COMMENT_AT_FIRST_COLUMN = false;\n    defaultSettings.LINE_COMMENT_AT_FIRST_COLUMN = false;\n    return defaultSettings;\n  }\n}"
  },
  {
    "path": "src/com/goide/generate/GoGenerateTestActionBase.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.generate;\n\nimport com.goide.runconfig.testing.GoTestFramework;\nimport com.intellij.codeInsight.CodeInsightActionHandler;\nimport com.intellij.codeInsight.actions.CodeInsightAction;\nimport com.intellij.openapi.editor.Editor;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.psi.PsiFile;\nimport org.jetbrains.annotations.NotNull;\n\nabstract public class GoGenerateTestActionBase extends CodeInsightAction {\n  @NotNull private final GoTestFramework myFramework;\n  @NotNull private final CodeInsightActionHandler myHandler;\n\n  protected GoGenerateTestActionBase(@NotNull GoTestFramework framework, @NotNull CodeInsightActionHandler handler) {\n    myFramework = framework;\n    myHandler = handler;\n  }\n\n  @NotNull\n  @Override\n  protected CodeInsightActionHandler getHandler() {\n    return myHandler;\n  }\n\n  @Override\n  protected boolean isValidForFile(@NotNull Project project, @NotNull Editor editor, @NotNull PsiFile file) {\n    return myFramework.isAvailableOnFile(file);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/generate/GoGenerateTestMethodActionGroup.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.generate;\n\nimport com.goide.runconfig.testing.GoTestFramework;\nimport com.intellij.openapi.actionSystem.ActionGroup;\nimport com.intellij.openapi.actionSystem.AnAction;\nimport com.intellij.openapi.actionSystem.AnActionEvent;\nimport com.intellij.openapi.actionSystem.CommonDataKeys;\nimport com.intellij.openapi.editor.Editor;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.util.PsiUtilBase;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.ArrayList;\n\npublic class GoGenerateTestMethodActionGroup extends ActionGroup {\n  @NotNull\n  @Override\n  public AnAction[] getChildren(@Nullable AnActionEvent e) {\n    if (e == null) {\n      return AnAction.EMPTY_ARRAY;\n    }\n    Project project = e.getProject();\n    Editor editor = e.getData(CommonDataKeys.EDITOR);\n    if (project == null || editor == null) return AnAction.EMPTY_ARRAY;\n    PsiFile file = PsiUtilBase.getPsiFileInEditor(editor, project);\n\n    ArrayList<AnAction> children = ContainerUtil.newArrayList();\n    for (GoTestFramework framework : GoTestFramework.all()) {\n      if (framework.isAvailableOnFile(file)) {\n        children.addAll(framework.getGenerateMethodActions());\n      }\n    }\n    return !children.isEmpty() ? children.toArray(new AnAction[children.size()]) : AnAction.EMPTY_ARRAY;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/go/GoGotoContributorBase.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.go;\n\nimport com.goide.psi.GoNamedElement;\nimport com.intellij.navigation.ChooseByNameContributorEx;\nimport com.intellij.navigation.GotoClassContributor;\nimport com.intellij.navigation.NavigationItem;\nimport com.intellij.openapi.progress.ProgressManager;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.psi.search.GlobalSearchScope;\nimport com.intellij.psi.stubs.StubIndex;\nimport com.intellij.psi.stubs.StubIndexKey;\nimport com.intellij.util.ArrayUtil;\nimport com.intellij.util.Processor;\nimport com.intellij.util.indexing.FindSymbolParameters;\nimport com.intellij.util.indexing.IdFilter;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoGotoContributorBase<T extends GoNamedElement> implements GotoClassContributor, ChooseByNameContributorEx {\n  private final StubIndexKey<String, T>[] myIndexKeys;\n  @NotNull private final Class<T> myClazz;\n\n  @SafeVarargs\n  public GoGotoContributorBase(@NotNull Class<T> clazz, @NotNull StubIndexKey<String, T>... key) {\n    myIndexKeys = key;\n    myClazz = clazz;\n  }\n\n  @NotNull\n  @Override\n  public String[] getNames(@NotNull Project project, boolean includeNonProjectItems) {\n    return ArrayUtil.EMPTY_STRING_ARRAY;\n  }\n\n  @NotNull\n  @Override\n  public NavigationItem[] getItemsByName(String name, String pattern, Project project, boolean includeNonProjectItems) {\n    return NavigationItem.EMPTY_NAVIGATION_ITEM_ARRAY;\n  }\n\n  @Override\n  public void processNames(@NotNull Processor<String> processor, @NotNull GlobalSearchScope scope, IdFilter filter) {\n    for (StubIndexKey<String, T> key : myIndexKeys) {\n      ProgressManager.checkCanceled();\n      StubIndex.getInstance().processAllKeys(key, processor, scope, filter);\n    }\n  }\n\n  @Override\n  public void processElementsWithName(@NotNull String s,\n                                      @NotNull Processor<NavigationItem> processor,\n                                      @NotNull FindSymbolParameters parameters) {\n    for (StubIndexKey<String, T> key : myIndexKeys) {\n      ProgressManager.checkCanceled();\n      StubIndex.getInstance().processElements(key, s, parameters.getProject(), parameters.getSearchScope(), parameters.getIdFilter(), \n                                              myClazz, processor);\n    }\n  }\n  \n  @Nullable\n  @Override\n  public String getQualifiedName(NavigationItem item) {\n    return item instanceof GoNamedElement ? ((GoNamedElement)item).getQualifiedName() : null;\n  }\n\n  @Nullable\n  @Override\n  public String getQualifiedNameSeparator() {\n    return null;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/go/GoSymbolContributor.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.go;\n\nimport com.goide.psi.GoNamedElement;\nimport com.goide.stubs.index.GoAllPrivateNamesIndex;\nimport com.goide.stubs.index.GoAllPublicNamesIndex;\n\npublic class GoSymbolContributor extends GoGotoContributorBase<GoNamedElement> {\n  public GoSymbolContributor() {\n    super(GoNamedElement.class, GoAllPublicNamesIndex.ALL_PUBLIC_NAMES, GoAllPrivateNamesIndex.ALL_PRIVATE_NAMES);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/go/GoTypeContributor.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.go;\n\nimport com.goide.psi.GoTypeSpec;\nimport com.goide.stubs.index.GoTypesIndex;\n\npublic class GoTypeContributor extends GoGotoContributorBase<GoTypeSpec> {\n  public GoTypeContributor() {\n    super(GoTypeSpec.class, GoTypesIndex.KEY);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/highlighting/GoAnnotator.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.highlighting;\n\nimport com.goide.GoConstants;\nimport com.goide.GoTypes;\nimport com.goide.inspections.GoInspectionUtil;\nimport com.goide.psi.*;\nimport com.goide.psi.impl.GoCType;\nimport com.goide.psi.impl.GoPsiImplUtil;\nimport com.goide.psi.impl.GoTypeUtil;\nimport com.goide.quickfix.GoDeleteRangeQuickFix;\nimport com.goide.quickfix.GoEmptySignatureQuickFix;\nimport com.goide.quickfix.GoReplaceWithReturnStatementQuickFix;\nimport com.google.common.collect.Sets;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.lang.annotation.Annotation;\nimport com.intellij.lang.annotation.AnnotationHolder;\nimport com.intellij.lang.annotation.Annotator;\nimport com.intellij.openapi.util.TextRange;\nimport com.intellij.psi.PsiDirectory;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.tree.TokenSet;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.List;\nimport java.util.Set;\n\npublic class GoAnnotator implements Annotator {\n  private static final Set<String> INT_TYPE_NAMES = Sets.newHashSet(\n    \"int\", \"int8\", \"int16\", \"int32\", \"int64\", \"uint\", \"uint8\", \"uint16\", \"uint32\", \"uint64\", \"uintptr\",\n    \"rune\", \"float32\", \"float64\"\n  ); // todo: unify with DlvApi.Variable.Kind\n\n  @Override\n  public void annotate(@NotNull PsiElement element, @NotNull AnnotationHolder holder) {\n    if (!(element instanceof GoCompositeElement) || !element.isValid()) return;\n\n    if (element instanceof GoPackageClause) {\n      PsiElement identifier = ((GoPackageClause)element).getIdentifier();\n      if (identifier != null && identifier.textMatches(\"_\")) {\n        holder.createErrorAnnotation(identifier, \"Invalid package name\");\n        return;\n      }\n    }\n\n    if (element instanceof GoContinueStatement) {\n      if (!(PsiTreeUtil.getParentOfType(element, GoForStatement.class, GoFunctionLit.class) instanceof GoForStatement)) {\n        Annotation annotation = holder.createErrorAnnotation(element, \"Continue statement not inside a for loop\");\n        annotation.registerFix(new GoReplaceWithReturnStatementQuickFix(element));\n      }\n    }\n    else if (element instanceof GoBreakStatement) {\n      if (GoPsiImplUtil.getBreakStatementOwner(element) == null) {\n        Annotation annotation = holder.createErrorAnnotation(element, \"Break statement not inside a for loop, select or switch\");\n        annotation.registerFix(new GoReplaceWithReturnStatementQuickFix(element));\n      }\n    }\n    else if (element instanceof GoReferenceExpression) {\n      GoReferenceExpression reference = (GoReferenceExpression)element;\n      PsiElement resolvedReference = reference.resolve();\n      if (resolvedReference instanceof PsiDirectory || resolvedReference instanceof GoImportSpec) {\n        // It's a package reference. It should either be inside a package clause or part of a larger reference expression.\n        if (!(element.getParent() instanceof GoReferenceExpression) &&\n            PsiTreeUtil.getParentOfType(reference, GoPackageClause.class) == null) {\n          holder.createErrorAnnotation(element, \"Use of package \" + element.getText() + \" without selector\");\n        }\n      }\n      if (resolvedReference instanceof GoTypeSpec && isIllegalUseOfTypeAsExpression(reference)) {\n        holder.createErrorAnnotation(element, \"Type \" + element.getText() + \" is not an expression\");\n      }\n      if (resolvedReference instanceof GoConstDefinition &&\n          resolvedReference.getParent() instanceof GoConstSpec &&\n          PsiTreeUtil.getParentOfType(element, GoConstDeclaration.class) != null) {\n        checkSelfReference((GoReferenceExpression)element, resolvedReference, holder);\n      }\n      if (resolvedReference instanceof GoVarDefinition &&\n          resolvedReference.getParent() instanceof GoVarSpec &&\n          PsiTreeUtil.getParentOfType(element, GoVarDeclaration.class) != null) {\n        checkSelfReference((GoReferenceExpression)element, resolvedReference, holder);\n      }\n    }\n    else if (element instanceof GoLiteralTypeExpr) {\n      if (isIllegalUseOfTypeAsExpression(element)) {\n        holder.createErrorAnnotation(element, \"Type \" + element.getText() + \" is not an expression\");\n      }\n    }\n    else if (element instanceof GoCompositeLit) {\n      GoCompositeLit literal = (GoCompositeLit)element;\n      if (literal.getType() instanceof GoMapType) {\n        GoLiteralValue literalValue = literal.getLiteralValue();\n        if (literalValue != null) {\n          for (GoElement literalElement : literalValue.getElementList()) {\n            if (literalElement.getKey() == null) {\n              holder.createErrorAnnotation(literalElement, \"Missing key in map literal\");\n            }\n          }\n        }\n      }\n    }\n    else if (element instanceof GoTypeAssertionExpr) {\n      GoType type = ((GoTypeAssertionExpr)element).getExpression().getGoType(null);\n      if (type != null) {\n        GoType underlyingType = type.getUnderlyingType();\n        if (!(underlyingType instanceof GoInterfaceType)) {\n          String message =\n            String.format(\"Invalid type assertion: %s, (non-interface type %s on left)\", element.getText(), type.getText());\n          holder.createErrorAnnotation(((GoTypeAssertionExpr)element).getExpression(), message);\n        }\n      }\n    }\n    else if (element instanceof GoBuiltinCallExpr) {\n      GoBuiltinCallExpr call = (GoBuiltinCallExpr)element;\n      if (\"make\".equals(call.getReferenceExpression().getText())) {\n        checkMakeCall(call, holder);\n      }\n    }\n    else if (element instanceof GoCallExpr) {\n      GoCallExpr call = (GoCallExpr)element;\n      GoExpression callExpression = call.getExpression();\n      if (GoInspectionUtil.getFunctionResultCount(call) == 0) {\n        PsiElement parent = call.getParent();\n        boolean simpleStatement = parent instanceof GoLeftHandExprList && parent.getParent() instanceof GoSimpleStatement;\n        boolean inDeferOrGo = parent instanceof GoDeferStatement || parent instanceof GoGoStatement;\n        if (!simpleStatement && !inDeferOrGo) {\n          holder.createErrorAnnotation(call, call.getText() + \" used as value\");\n        }\n      }\n      if (callExpression instanceof GoReferenceExpression) {\n        GoReferenceExpression reference = (GoReferenceExpression)callExpression;\n        if (reference.textMatches(\"cap\")) {\n          if (GoPsiImplUtil.builtin(reference.resolve())) {\n            checkCapCall(call, holder);\n          }\n        }\n      }\n    }\n    else if (element instanceof GoTopLevelDeclaration) {\n      if (element.getParent() instanceof GoFile) {\n        if (element instanceof GoTypeDeclaration) {\n          for (GoTypeSpec spec : ((GoTypeDeclaration)element).getTypeSpecList()) {\n            if (spec.getIdentifier().textMatches(GoConstants.INIT)) {\n              holder.createErrorAnnotation(spec, \"Cannot declare init, must be a function\");\n            }\n          }\n        }\n        else if (element instanceof GoVarDeclaration) {\n          for (GoVarSpec spec : ((GoVarDeclaration)element).getVarSpecList()) {\n            for (GoVarDefinition definition : spec.getVarDefinitionList()) {\n              if (definition.getIdentifier().textMatches(GoConstants.INIT)) {\n                holder.createErrorAnnotation(spec, \"Cannot declare init, must be a function\");\n              }\n            }\n          }\n        }\n        else if (element instanceof GoConstDeclaration) {\n          for (GoConstSpec spec : ((GoConstDeclaration)element).getConstSpecList()) {\n            for (GoConstDefinition definition : spec.getConstDefinitionList()) {\n              if (definition.getIdentifier().textMatches(GoConstants.INIT)) {\n                holder.createErrorAnnotation(spec, \"Cannot declare init, must be a function\");\n              }\n            }\n          }\n        }\n        else if (element instanceof GoFunctionDeclaration) {\n          GoFunctionDeclaration declaration = (GoFunctionDeclaration)element;\n          if (declaration.getIdentifier().textMatches(GoConstants.INIT) ||\n              declaration.getIdentifier().textMatches(GoConstants.MAIN) &&\n              GoConstants.MAIN.equals(declaration.getContainingFile().getPackageName())) {\n            GoSignature signature = declaration.getSignature();\n            if (signature != null) {\n              GoResult result = signature.getResult();\n              if (result != null && !result.isVoid()) {\n                Annotation annotation = holder.createErrorAnnotation(result, declaration.getName() +\n                                                                             \" function must have no arguments and no return values\");\n                annotation.registerFix(new GoEmptySignatureQuickFix(declaration));\n              }\n              GoParameters parameters = signature.getParameters();\n              if (!parameters.getParameterDeclarationList().isEmpty()) {\n                Annotation annotation = holder.createErrorAnnotation(parameters, declaration.getName() +\n                                                                                 \" function must have no arguments and no return values\");\n                annotation.registerFix(new GoEmptySignatureQuickFix(declaration));\n              }\n            }\n          }\n        }\n      }\n    }\n    else if (element instanceof GoIndexOrSliceExpr) {\n      GoIndexOrSliceExpr slice = (GoIndexOrSliceExpr)element;\n      GoExpression expr = slice.getExpression();\n      GoExpression thirdIndex = slice.getIndices().third;\n      if (expr == null || thirdIndex == null) {\n        return;\n      }\n      if (GoTypeUtil.isString(expr.getGoType(null))) {\n        ASTNode[] colons = slice.getNode().getChildren(TokenSet.create(GoTypes.COLON));\n        if (colons.length == 2) {\n          PsiElement secondColon = colons[1].getPsi();\n          TextRange r = TextRange.create(secondColon.getTextRange().getStartOffset(), thirdIndex.getTextRange().getEndOffset());\n          Annotation annotation = holder.createErrorAnnotation(r, \"Invalid operation \" + slice.getText() + \" (3-index slice of string)\");\n          annotation.registerFix(new GoDeleteRangeQuickFix(secondColon, thirdIndex, \"Delete third index\"));\n        }\n      }\n    }\n  }\n\n  private static void checkCapCall(@NotNull GoCallExpr capCall, @NotNull AnnotationHolder holder) {\n    List<GoExpression> exprs = capCall.getArgumentList().getExpressionList();\n    if (exprs.size() != 1) return;\n    GoExpression first = ContainerUtil.getFirstItem(exprs);\n    //noinspection ConstantConditions\n    GoType exprType = first.getGoType(null); // todo: context\n    if (exprType == null) return;\n    GoType baseType = GoPsiImplUtil.unwrapPointerIfNeeded(exprType.getUnderlyingType());\n    if (baseType instanceof GoArrayOrSliceType || baseType instanceof GoChannelType) return;\n    holder.createErrorAnnotation(first, \"Invalid argument for cap\");\n  }\n\n  private static void checkMakeCall(@NotNull GoBuiltinCallExpr call, @NotNull AnnotationHolder holder) {\n    GoBuiltinArgumentList args = call.getBuiltinArgumentList();\n    if (args == null) {\n      holder.createErrorAnnotation(call, \"Missing argument to make\");\n      return;\n    }\n    GoType type = args.getType();\n    if (type == null) {\n      GoExpression first = ContainerUtil.getFirstItem(args.getExpressionList());\n      if (first != null) {\n        holder.createErrorAnnotation(call, first.getText() + \" is not a type\");\n      }\n      else {\n        holder.createErrorAnnotation(args, \"Missing argument to make\");\n      }\n    }\n    else {\n      // We have a type, is it valid?\n      GoType baseType = type.getUnderlyingType();\n      if (canMakeType(baseType)) {\n        // We have a type and we can make the type, are the parameters to make valid?\n        checkMakeArgs(call, baseType, args.getExpressionList(), holder);\n      }\n      else {\n        holder.createErrorAnnotation(type, \"Cannot make \" + type.getText());\n      }\n    }\n  }\n\n  private static boolean canMakeType(@Nullable GoType type) {\n    if (type instanceof GoArrayOrSliceType) {\n      // Only slices (no size expression) can be make()'d.\n      return ((GoArrayOrSliceType)type).getExpression() == null;\n    }\n    return type instanceof GoChannelType || type instanceof GoMapType;\n  }\n\n  private static void checkMakeArgs(@NotNull GoBuiltinCallExpr call,\n                                    @Nullable GoType baseType,\n                                    @NotNull List<GoExpression> list,\n                                    @NotNull AnnotationHolder holder) {\n    if (baseType instanceof GoArrayOrSliceType) {\n      if (list.isEmpty()) {\n        holder.createErrorAnnotation(call, \"Missing len argument to make\");\n        return;\n      }\n      else if (list.size() > 2) {\n        holder.createErrorAnnotation(call, \"Too many arguments to make\");\n        return;\n      }\n    }\n\n    if (baseType instanceof GoChannelType || baseType instanceof GoMapType) {\n      if (list.size() > 1) {\n        holder.createErrorAnnotation(call, \"Too many arguments to make\");\n        return;\n      }\n    }\n\n    for (int i = 0; i < list.size(); i++) {\n      GoExpression expression = list.get(i);\n      GoType type = expression.getGoType(null); // todo: context\n      if (type != null) {\n        GoType expressionBaseType = type.getUnderlyingType();\n        if (!(isIntegerConvertibleType(expressionBaseType) || isCType(type))) {\n          String argName = i == 0 ? \"size\" : \"capacity\";\n          holder.createErrorAnnotation(expression, \"Non-integer \" + argName + \" argument to make\");\n        }\n      }\n    }\n  }\n\n  private static boolean isCType(@Nullable GoType type) {\n    return type instanceof GoCType;\n  }\n\n  private static boolean isIntegerConvertibleType(@Nullable GoType type) {\n    if (type == null) return false;\n    GoTypeReferenceExpression ref = type.getTypeReferenceExpression();\n    if (ref == null) return false;\n    return INT_TYPE_NAMES.contains(ref.getText()) && GoPsiImplUtil.builtin(ref.resolve());\n  }\n\n  private static void checkSelfReference(@NotNull GoReferenceExpression o, PsiElement definition, AnnotationHolder holder) {\n    GoExpression value = null;\n    if (definition instanceof GoVarDefinition) {\n      value = ((GoVarDefinition)definition).getValue();\n    }\n    else if (definition instanceof GoConstDefinition) {\n      value = ((GoConstDefinition)definition).getValue();\n    }\n\n    if (value != null && value.equals(GoPsiImplUtil.getNonStrictTopmostParentOfType(o, GoExpression.class))) {\n      holder.createErrorAnnotation(o, \"Cyclic definition detected\");\n    }\n  }\n\n  /**\n   * Returns {@code true} if the given element is in an invalid location for a type literal or type reference.\n   */\n  private static boolean isIllegalUseOfTypeAsExpression(@NotNull PsiElement e) {\n    PsiElement parent = PsiTreeUtil.skipParentsOfType(e, GoParenthesesExpr.class, GoUnaryExpr.class);\n    // Part of a selector such as T.method\n    if (parent instanceof GoReferenceExpression || parent instanceof GoSelectorExpr) return false;\n    // A situation like T(\"foo\").\n    return !(parent instanceof GoCallExpr);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/highlighting/GoColorsAndFontsPage.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.highlighting;\n\nimport com.goide.GoFileType;\nimport com.intellij.openapi.editor.colors.TextAttributesKey;\nimport com.intellij.openapi.fileTypes.SyntaxHighlighter;\nimport com.intellij.openapi.options.colors.AttributesDescriptor;\nimport com.intellij.openapi.options.colors.ColorDescriptor;\nimport com.intellij.openapi.options.colors.ColorSettingsPage;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\n\nimport javax.swing.*;\nimport java.util.Map;\n\nimport static com.goide.highlighting.GoSyntaxHighlightingColors.*;\n\npublic class GoColorsAndFontsPage implements ColorSettingsPage {\n  private static final AttributesDescriptor[] DESCRIPTORS = new AttributesDescriptor[]{\n    new AttributesDescriptor(\"Line comment\", LINE_COMMENT),\n    new AttributesDescriptor(\"Block comment\", BLOCK_COMMENT),\n    new AttributesDescriptor(\"Keyword\", KEYWORD),\n    new AttributesDescriptor(\"Identifier\", IDENTIFIER),\n    new AttributesDescriptor(\"String\", STRING),\n    new AttributesDescriptor(\"Number\", NUMBER),\n    new AttributesDescriptor(\"Semicolon\", SEMICOLON),\n    new AttributesDescriptor(\"Colon\", COLON),\n    new AttributesDescriptor(\"Comma\", COMMA),\n    new AttributesDescriptor(\"Dot\", DOT),\n    new AttributesDescriptor(\"Operator\", OPERATOR),\n    new AttributesDescriptor(\"Brackets\", BRACKETS),\n    new AttributesDescriptor(\"Braces\", BRACES),\n    new AttributesDescriptor(\"Parentheses\", PARENTHESES),\n    new AttributesDescriptor(\"Bad character\", BAD_CHARACTER),\n    new AttributesDescriptor(\"Type specification\", TYPE_SPECIFICATION),\n    new AttributesDescriptor(\"Type reference\", TYPE_REFERENCE),\n    new AttributesDescriptor(\"Builtin type\", BUILTIN_TYPE_REFERENCE),\n    new AttributesDescriptor(\"Builtin function\", BUILTIN_FUNCTION),\n    new AttributesDescriptor(\"Exported function\", EXPORTED_FUNCTION),\n    new AttributesDescriptor(\"Local function\", LOCAL_FUNCTION),\n    new AttributesDescriptor(\"Package exported interface\", PACKAGE_EXPORTED_INTERFACE),\n    new AttributesDescriptor(\"Package exported struct\", PACKAGE_EXPORTED_STRUCT),\n    new AttributesDescriptor(\"Package exported constant\", PACKAGE_EXPORTED_CONSTANT),\n    new AttributesDescriptor(\"Package exported variable\", PACKAGE_EXPORTED_VARIABLE),\n    new AttributesDescriptor(\"Package local interface\", PACKAGE_LOCAL_INTERFACE),\n    new AttributesDescriptor(\"Package local struct\", PACKAGE_LOCAL_STRUCT),\n    new AttributesDescriptor(\"Package local constant\", PACKAGE_LOCAL_CONSTANT),\n    new AttributesDescriptor(\"Package local variable\", PACKAGE_LOCAL_VARIABLE),\n    new AttributesDescriptor(\"Struct exported member\", STRUCT_EXPORTED_MEMBER),\n    new AttributesDescriptor(\"Struct local member\", STRUCT_LOCAL_MEMBER),\n    new AttributesDescriptor(\"Method receiver\", METHOD_RECEIVER),\n    new AttributesDescriptor(\"Function parameter\", FUNCTION_PARAMETER),\n    new AttributesDescriptor(\"Local constant\", LOCAL_CONSTANT),\n    new AttributesDescriptor(\"Local variable\", LOCAL_VARIABLE),\n    new AttributesDescriptor(\"Scope declared variable\", SCOPE_VARIABLE),\n    new AttributesDescriptor(\"Label\", LABEL)\n  };\n  private static final Map<String, TextAttributesKey> ATTRIBUTES_KEY_MAP = ContainerUtil.newTroveMap();\n  static {\n    ATTRIBUTES_KEY_MAP.put(\"tr\", TYPE_REFERENCE);\n    ATTRIBUTES_KEY_MAP.put(\"ts\", TYPE_SPECIFICATION);\n    ATTRIBUTES_KEY_MAP.put(\"bt\", BUILTIN_TYPE_REFERENCE);\n    ATTRIBUTES_KEY_MAP.put(\"bf\", BUILTIN_FUNCTION);\n    ATTRIBUTES_KEY_MAP.put(\"kw\", KEYWORD);\n    ATTRIBUTES_KEY_MAP.put(\"ef\", EXPORTED_FUNCTION);\n    ATTRIBUTES_KEY_MAP.put(\"lf\", LOCAL_FUNCTION);\n    ATTRIBUTES_KEY_MAP.put(\"pei\", PACKAGE_EXPORTED_INTERFACE);\n    ATTRIBUTES_KEY_MAP.put(\"pes\", PACKAGE_EXPORTED_STRUCT);\n    ATTRIBUTES_KEY_MAP.put(\"pec\", PACKAGE_EXPORTED_CONSTANT);\n    ATTRIBUTES_KEY_MAP.put(\"pev\", PACKAGE_EXPORTED_VARIABLE);\n    ATTRIBUTES_KEY_MAP.put(\"pli\", PACKAGE_LOCAL_INTERFACE);\n    ATTRIBUTES_KEY_MAP.put(\"pls\", PACKAGE_LOCAL_STRUCT);\n    ATTRIBUTES_KEY_MAP.put(\"plc\", PACKAGE_LOCAL_CONSTANT);\n    ATTRIBUTES_KEY_MAP.put(\"plv\", PACKAGE_LOCAL_VARIABLE);\n    ATTRIBUTES_KEY_MAP.put(\"sem\", STRUCT_EXPORTED_MEMBER);\n    ATTRIBUTES_KEY_MAP.put(\"slm\", STRUCT_LOCAL_MEMBER);\n    ATTRIBUTES_KEY_MAP.put(\"mr\", METHOD_RECEIVER);\n    ATTRIBUTES_KEY_MAP.put(\"fp\", FUNCTION_PARAMETER);\n    ATTRIBUTES_KEY_MAP.put(\"lc\", LOCAL_CONSTANT);\n    ATTRIBUTES_KEY_MAP.put(\"lv\", LOCAL_VARIABLE);\n    ATTRIBUTES_KEY_MAP.put(\"sv\", SCOPE_VARIABLE);\n    ATTRIBUTES_KEY_MAP.put(\"ll\", LABEL);\n  }\n\n  @Override\n  @NotNull\n  public String getDisplayName() {\n    return GoFileType.INSTANCE.getName();\n  }\n\n  @Override\n  public Icon getIcon() {\n    return GoFileType.INSTANCE.getIcon();\n  }\n\n  @Override\n  @NotNull\n  public AttributesDescriptor[] getAttributeDescriptors() {\n    return DESCRIPTORS;\n  }\n\n  @Override\n  @NotNull\n  public ColorDescriptor[] getColorDescriptors() {\n    return ColorDescriptor.EMPTY_ARRAY;\n  }\n\n  @Override\n  @NotNull\n  public SyntaxHighlighter getHighlighter() {\n    return new GoSyntaxHighlighter();\n  }\n\n  @Override\n  @NotNull\n  public String getDemoText() {\n    return \"/*\\n\" +\n           \" * Go highlight sample \\n\" +\n           \" */\\n\" +\n           \"\\n\" +\n           \"// Package main\\n\"+\n           \"package main\\n\" +\n           \"\\n\" +\n           \"import \\\"fmt\\\"\\n\" +\n           \"\\n\" +\n           \"type (\\n\" +\n           \"    <pei>PublicInterface</pei> interface {\\n\" +\n           \"        <ef>PublicFunc</ef>() <bt>int</bt>\\n\" +\n           \"        <lf>privateFunc</lf>() <bt>int</bt>\\n\" +\n           \"    }\\n\" +\n           \"\\n\" +\n           \"    <pli>private</pli> interface {\\n\" +\n           \"        <ef>PublicFunc</ef>() <bt>int</bt>\\n\" +\n           \"        <lf>privateFunc</lf>() <bt>int</bt>\\n\" +\n           \"    }\\n\" +\n           \"\\n\" +\n           \"    <pes>PublicStruct</pes> struct {\\n\" +\n           \"        <sem>PublicField</sem>  <bt>int</bt>\\n\" +\n           \"        <slm>privateField</slm> <bt>int</bt>\\n\" +\n           \"    }\\n\" +\n           \"\\n\" +\n           \"    <pls>privateStruct</pls> struct {\\n\" +\n           \"        <sem>PublicField</sem>  <bt>int</bt>\\n\" +\n           \"        <slm>privateField</slm> <bt>int</bt>\\n\" +\n           \"    }\\n\" +\n           \"\\n\" +\n           \"    <ts>demoInt</ts> <bt>int</bt>\\n\" +\n           \")\\n\" +\n           \"\\n\" +\n           \"const (\\n\" +\n           \"    <pec>PublicConst</pec>  = 1\\n\" +\n           \"    <plc>privateConst</plc> = 2\\n\" +\n           \")\\n\" +\n           \"\\n\" +\n           \"var (\\n\" +\n           \"    <pev>PublicVar</pev>  = 1\\n\" +\n           \"    <plv>privateVar</plv> = 2\\n\" +\n           \")\\n\" +\n           \"\\n\" +\n           \"func PublicFunc() <bt>int</bt> {\\n\" +\n           \"    const <lc>LocalConst</lc> = 1\\n\" +\n           \"    <lv>localVar</lv> := <pev>PublicVar</pev>\\n\" +\n           \"    return <lv>localVar</lv>\\n\" +\n           \"}\\n\" +\n           \"\\n\" +\n           \"func privateFunc() (<bt>int</bt>, <bt>int</bt>) {\\n\" +\n           \"    const <lc>localConst</lc> = 2\\n\" +\n           \"    <lv>LocalVar</lv> := <plv>privateVar</plv>\\n\" +\n           \"    return <lv>LocalVar</lv>, <pev>PublicVar</pev>\\n\" +\n           \"}\\n\" +\n           \"\\n\" +\n           \"func (<mr>ps</mr> <tr>PublicStruct</tr>) <ef>PublicFunc</ef>() <bt>int</bt> {\\n\" +\n           \"    return <mr>ps</mr>.<lf>privateField<lf>\\n\" +\n           \"}\\n\" +\n           \"\\n\" +\n           \"func (<mr>ps</mr> <tr>PublicStruct</tr>) <lf>privateFunc</lf>() {\\n\" +\n           \"    return <mr>ps</mr>.<ef>PublicField</ef>\\n\" +\n           \"}\\n\" +\n           \"\\n\" +\n           \"func (<mr>ps</mr> <tr>privateStruct</tr>) <ef>PublicFunc</ef>() <bt>int</bt> {\\n\" +\n           \"    return <mr>ps</mr>.<lf>privateField</lf>\\n\" +\n           \"}\\n\" +\n           \"\\n\" +\n           \"func (<mr>ps</mr> <tr>privateStruct</tr>) <lf>privateFunc</lf>() {\\n\" +\n           \"    return <mr>ps</mr>.<ef>PublicField</ef>\\n\" +\n           \"}\\n\" +\n           \"\\n\" +\n           \"func <lf>variableFunc</lf>(<fp>demo1</fp> <bt>int</bt>) {\\n\" +\n           \"    <fp>demo1</fp> = 3\\n\" +\n           \"    <lv>a</lv> := <tr>PublicStruct</tr>{}\\n\" +\n           \"    <lv>a</lv>.<lf>privateFunc</lf>()\\n\" +\n           \"    <lv>demo2</lv> := 4\\n\" +\n           \"    if <sv>demo1</sv>, <sv>demo2</sv> := <lf>privateFunc</lf>(); <sv>demo1</sv> != 3 {\\n\" +\n           \"        _ = <sv>demo1</sv>\\n\" +\n           \"        _ = <sv>demo2</sv>\\n\" +\n           \"        return\\n\" +\n           \"    }\\n\" +\n           \"<ll>demoLabel</ll>:\\n\" +\n           \"    for <sv>demo1</sv> := range []<bt>int</bt>{1, 2, 3, 4} {\\n\" +\n           \"        _ = <sv>demo1</sv>\\n\" +\n           \"        continue <ll>demoLabel</ll>\\n\" +\n           \"    }\\n\" +\n           \"\\n\" +\n           \"    switch {\\n\" +\n           \"    case 1 == 2:\\n\" +\n           \"        <sv>demo1</sv>, <sv>demo2</sv> := <lf>privateFunc</lf>()\\n\" +\n           \"        _ = <sv>demo1</sv>\\n\" +\n           \"        _ = <sv>demo2</sv>\\n\" +\n           \"    default:\\n\" +\n           \"        _ = <fp>demo1</fp>\\n\" +\n           \"    }\\n\" +\n           \"\\n\" +\n           \"    <lv>b</lv> := func() <bt>int</bt> {\\n\" +\n           \"        return 1\\n\" +\n           \"    }\\n\" +\n           \"    _ = <lv>b</lv>()\\n\" +\n           \"    _ = <ef>PublicFunc</ef>()\\n\" +\n           \"    _ = <lf>variableFunc</lf>(1)\\n\" +\n           \"    _ = <fp>demo1</fp>\\n\" +\n           \"    _ = <lv>demo2</lv>\\n\" +\n           \"    <bf>println</bf>(\\\"builtin function\\\")\" +\n           \"\\n\" +\n           \"}\\n\" +\n           \"\\n\" +\n           \"func main() {\\n\" +\n           \"    fmt.<ef>Println</ef>(\\\"demo\\\")\\n\" +\n           \"    <lf>variableFunc</lf>(1)\\n\" +\n           \"    <lv>c</lv> := <bt>bt</bt>\\n\" +\n           \"    <lv>d</lv> := <bt>nil</bt>\\n\" +\n           \"    _, _ = <lv>c</lv>, <lv>d</lv>\\n\" +\n           \"}\\n\";\n  }\n\n  @Override\n  @NotNull\n  public Map<String, TextAttributesKey> getAdditionalHighlightingTagToDescriptorMap() {\n    return ATTRIBUTES_KEY_MAP;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/highlighting/GoHighlightingAnnotator.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.highlighting;\n\nimport com.goide.psi.*;\nimport com.goide.psi.impl.GoPsiImplUtil;\nimport com.goide.psi.impl.GoReferenceBase;\nimport com.intellij.lang.annotation.AnnotationHolder;\nimport com.intellij.lang.annotation.Annotator;\nimport com.intellij.openapi.application.ApplicationManager;\nimport com.intellij.openapi.editor.colors.TextAttributesKey;\nimport com.intellij.openapi.editor.markup.TextAttributes;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiReference;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.List;\nimport java.util.stream.Collectors;\n\nimport static com.goide.highlighting.GoSyntaxHighlightingColors.*;\n\npublic class GoHighlightingAnnotator implements Annotator {\n  private static void highlightRefIfNeeded(@NotNull GoReferenceExpressionBase o,\n                                           @Nullable PsiElement resolve,\n                                           @NotNull AnnotationHolder holder) {\n\n    if (resolve instanceof GoTypeSpec) {\n      TextAttributesKey key = GoPsiImplUtil.builtin(resolve) ? BUILTIN_TYPE_REFERENCE : getColor((GoTypeSpec)resolve);\n      if (o.getParent() instanceof GoType) {\n        GoType topmostType = PsiTreeUtil.getTopmostParentOfType(o, GoType.class);\n        if (topmostType != null && topmostType.getParent() instanceof GoReceiver) {\n          key = TYPE_REFERENCE;\n        }\n      }\n      setHighlighting(o.getIdentifier(), holder, key);\n    }\n    else if (resolve instanceof GoConstDefinition) {\n      TextAttributesKey color = GoPsiImplUtil.builtin(resolve) ? BUILTIN_TYPE_REFERENCE : getColor((GoConstDefinition)resolve);\n      setHighlighting(o.getIdentifier(), holder, color);\n    }\n    else if (resolve instanceof GoVarDefinition) {\n      TextAttributesKey color = GoPsiImplUtil.builtin(resolve) ? BUILTIN_TYPE_REFERENCE : getColor((GoVarDefinition)resolve);\n      setHighlighting(o.getIdentifier(), holder, color);\n    }\n    else if (resolve instanceof GoFieldDefinition) {\n      setHighlighting(o.getIdentifier(), holder, getColor((GoFieldDefinition)resolve));\n    }\n    else if (resolve instanceof GoFunctionOrMethodDeclaration || resolve instanceof GoMethodSpec) {\n      setHighlighting(o.getIdentifier(), holder, getColor((GoNamedSignatureOwner)resolve));\n    }\n    else if (resolve instanceof GoReceiver) {\n      setHighlighting(o.getIdentifier(), holder, METHOD_RECEIVER);\n    }\n    else if (resolve instanceof GoParamDefinition) {\n      setHighlighting(o.getIdentifier(), holder, FUNCTION_PARAMETER);\n    }\n  }\n\n  private static TextAttributesKey getColor(GoConstDefinition o) {\n    if (isPackageWide(o)) {\n      return o.isPublic() ? PACKAGE_EXPORTED_CONSTANT : PACKAGE_LOCAL_CONSTANT;\n    }\n    return LOCAL_CONSTANT;\n  }\n\n  private static TextAttributesKey getColor(GoFieldDefinition o) {\n    return o.isPublic() ? STRUCT_EXPORTED_MEMBER : STRUCT_LOCAL_MEMBER;\n  }\n\n  private static TextAttributesKey getColor(GoVarDefinition o) {\n    if (PsiTreeUtil.getParentOfType(o, GoForStatement.class) != null ||\n        PsiTreeUtil.getParentOfType(o, GoIfStatement.class) != null ||\n        PsiTreeUtil.getParentOfType(o, GoSwitchStatement.class) != null) {\n      return SCOPE_VARIABLE;\n    }\n\n    if (isPackageWide(o)) {\n      return o.isPublic() ? PACKAGE_EXPORTED_VARIABLE : PACKAGE_LOCAL_VARIABLE;\n    }\n\n    return LOCAL_VARIABLE;\n  }\n\n  private static TextAttributesKey getColor(GoNamedSignatureOwner o) {\n    if (GoPsiImplUtil.builtin(o)) return BUILTIN_FUNCTION;\n    return o.isPublic() ? EXPORTED_FUNCTION : LOCAL_FUNCTION;\n  }\n\n  private static TextAttributesKey getColor(@Nullable GoTypeSpec o) {\n    GoType type = o != null ? o.getGoType(null) : null;\n    if (type != null) {\n      type = type instanceof GoSpecType ? ((GoSpecType)type).getType() : type;\n      boolean isPublic = o.isPublic();\n      if (type instanceof GoInterfaceType) {\n        return isPublic ? PACKAGE_EXPORTED_INTERFACE : PACKAGE_LOCAL_INTERFACE;\n      }\n      else if (type instanceof GoStructType) {\n        return isPublic ? PACKAGE_EXPORTED_STRUCT : PACKAGE_LOCAL_STRUCT;\n      }\n    }\n    return TYPE_SPECIFICATION;\n  }\n\n  private static void setHighlighting(@NotNull PsiElement element, @NotNull AnnotationHolder holder, @NotNull TextAttributesKey key) {\n    holder.createInfoAnnotation(element, null).setEnforcedTextAttributes(TextAttributes.ERASE_MARKER);\n    String description = ApplicationManager.getApplication().isUnitTestMode() ? key.getExternalName() : null;\n    holder.createInfoAnnotation(element, description).setTextAttributes(key);\n  }\n\n  private static boolean isPackageWide(@NotNull GoVarDefinition o) {\n    GoVarDeclaration declaration = PsiTreeUtil.getParentOfType(o, GoVarDeclaration.class);\n    return declaration != null && declaration.getParent() instanceof GoFile;\n  }\n\n  private static boolean isPackageWide(@NotNull GoConstDefinition o) {\n    GoConstDeclaration declaration = PsiTreeUtil.getParentOfType(o, GoConstDeclaration.class);\n    return declaration != null && declaration.getParent() instanceof GoFile;\n  }\n\n  @Override\n  public void annotate(@NotNull PsiElement o, @NotNull AnnotationHolder holder) {\n    if (!o.isValid()) return;\n    if (o instanceof GoImportSpec && ((GoImportSpec)o).isDot()) {\n      //noinspection SynchronizationOnLocalVariableOrMethodParameter\n      synchronized (o) {\n        List<PsiElement> importUsers = o.getUserData(GoReferenceBase.IMPORT_USERS);\n        if (importUsers != null) {\n          List<PsiElement> newImportUsers = ContainerUtil.newSmartList();\n          newImportUsers.addAll(importUsers.stream().filter(PsiElement::isValid).collect(Collectors.toList()));\n          o.putUserData(GoReferenceBase.IMPORT_USERS, newImportUsers.isEmpty() ? null : newImportUsers);\n        }\n      }\n    }\n    else if (o instanceof GoLiteral) {\n      if (((GoLiteral)o).getHex() != null || ((GoLiteral)o).getOct() != null) {\n        setHighlighting(o, holder, NUMBER);\n      }\n    }\n    else if (o instanceof GoReferenceExpressionBase) {\n      PsiReference reference = o.getReference();\n      highlightRefIfNeeded((GoReferenceExpressionBase)o, reference != null ? reference.resolve() : null, holder);\n    }\n    else if (o instanceof GoTypeSpec) {\n      TextAttributesKey key = getColor((GoTypeSpec)o);\n      setHighlighting(((GoTypeSpec)o).getIdentifier(), holder, key);\n    }\n    else if (o instanceof GoConstDefinition) {\n      setHighlighting(o, holder, getColor((GoConstDefinition)o));\n    }\n    else if (o instanceof GoVarDefinition) {\n      setHighlighting(o, holder, getColor((GoVarDefinition)o));\n    }\n    else if (o instanceof GoFieldDefinition) {\n      setHighlighting(o, holder, getColor((GoFieldDefinition)o));\n    }\n    else if (o instanceof GoParamDefinition) {\n      setHighlighting(o, holder, FUNCTION_PARAMETER);\n    }\n    else if (o instanceof GoReceiver) {\n      PsiElement identifier = ((GoReceiver)o).getIdentifier();\n      if (identifier != null) {\n        setHighlighting(identifier, holder, METHOD_RECEIVER);\n      }\n    }\n    else if (o instanceof GoLabelDefinition || o instanceof GoLabelRef) {\n      setHighlighting(o, holder, LABEL);\n    }\n    else if (o instanceof GoNamedSignatureOwner) {\n      PsiElement identifier = ((GoNamedSignatureOwner)o).getIdentifier();\n      if (identifier != null) {\n        setHighlighting(identifier, holder, getColor((GoNamedSignatureOwner)o));\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/highlighting/GoProblemFileHighlightFilter.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.highlighting;\n\nimport com.goide.GoFileType;\nimport com.intellij.openapi.util.Condition;\nimport com.intellij.openapi.vfs.VirtualFile;\n\npublic class GoProblemFileHighlightFilter implements Condition<VirtualFile> {\n  @Override\n  public boolean value(VirtualFile virtualFile) {\n    return virtualFile.getFileType() == GoFileType.INSTANCE;\n  }\n}\n\n"
  },
  {
    "path": "src/com/goide/highlighting/GoSyntaxHighlighter.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.highlighting;\n\nimport com.goide.GoParserDefinition;\nimport com.goide.GoTypes;\nimport com.goide.lexer.GoLexer;\nimport com.intellij.lexer.Lexer;\nimport com.intellij.openapi.editor.colors.TextAttributesKey;\nimport com.intellij.openapi.fileTypes.SyntaxHighlighterBase;\nimport com.intellij.psi.TokenType;\nimport com.intellij.psi.tree.IElementType;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.HashMap;\nimport java.util.Map;\n\nimport static com.goide.highlighting.GoSyntaxHighlightingColors.*;\n\npublic class GoSyntaxHighlighter extends SyntaxHighlighterBase {\n  private static final Map<IElementType, TextAttributesKey> ATTRIBUTES = new HashMap<IElementType, TextAttributesKey>();\n\n  static {\n    fillMap(ATTRIBUTES, LINE_COMMENT, GoParserDefinition.LINE_COMMENT);\n    fillMap(ATTRIBUTES, BLOCK_COMMENT, GoParserDefinition.MULTILINE_COMMENT);\n    fillMap(ATTRIBUTES, PARENTHESES, GoTypes.LPAREN, GoTypes.RPAREN);\n    fillMap(ATTRIBUTES, BRACES, GoTypes.LBRACE, GoTypes.RBRACE);\n    fillMap(ATTRIBUTES, BRACKETS, GoTypes.LBRACK, GoTypes.RBRACK);\n    fillMap(ATTRIBUTES, BAD_CHARACTER, TokenType.BAD_CHARACTER);\n    fillMap(ATTRIBUTES, IDENTIFIER, GoTypes.IDENTIFIER);\n    fillMap(ATTRIBUTES, DOT, GoTypes.DOT, GoTypes.TRIPLE_DOT);\n    fillMap(ATTRIBUTES, COLON, GoTypes.COLON);\n    fillMap(ATTRIBUTES, SEMICOLON, GoTypes.SEMICOLON);\n    fillMap(ATTRIBUTES, COMMA, GoTypes.COMMA);\n    fillMap(ATTRIBUTES, GoParserDefinition.OPERATORS, OPERATOR);\n    fillMap(ATTRIBUTES, GoParserDefinition.KEYWORDS, KEYWORD);\n    fillMap(ATTRIBUTES, GoParserDefinition.NUMBERS, NUMBER);\n    fillMap(ATTRIBUTES, GoParserDefinition.STRING_LITERALS, STRING);\n  }\n\n  @NotNull\n  public Lexer getHighlightingLexer() {\n    return new GoLexer();\n  }\n\n  @NotNull\n  public TextAttributesKey[] getTokenHighlights(IElementType tokenType) {\n    return pack(ATTRIBUTES.get(tokenType));\n  }\n}"
  },
  {
    "path": "src/com/goide/highlighting/GoSyntaxHighlighterFactory.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.highlighting;\n\nimport com.intellij.openapi.fileTypes.SyntaxHighlighter;\nimport com.intellij.openapi.fileTypes.SyntaxHighlighterFactory;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoSyntaxHighlighterFactory extends SyntaxHighlighterFactory {\n  @NotNull\n  @Override\n  public SyntaxHighlighter getSyntaxHighlighter(@Nullable Project project, @Nullable VirtualFile virtualFile) {\n    return new GoSyntaxHighlighter();\n  }\n}\n"
  },
  {
    "path": "src/com/goide/highlighting/GoSyntaxHighlightingColors.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.highlighting;\n\nimport com.intellij.openapi.editor.DefaultLanguageHighlighterColors;\nimport com.intellij.openapi.editor.HighlighterColors;\nimport com.intellij.openapi.editor.colors.TextAttributesKey;\n\nimport static com.intellij.openapi.editor.colors.TextAttributesKey.createTextAttributesKey;\n\npublic class GoSyntaxHighlightingColors {\n  public static final TextAttributesKey LINE_COMMENT = createTextAttributesKey(\"GO_LINE_COMMENT\", DefaultLanguageHighlighterColors.LINE_COMMENT);\n  public static final TextAttributesKey BLOCK_COMMENT = createTextAttributesKey(\"GO_BLOCK_COMMENT\", DefaultLanguageHighlighterColors.BLOCK_COMMENT);\n  public static final TextAttributesKey KEYWORD = createTextAttributesKey(\"GO_KEYWORD\", DefaultLanguageHighlighterColors.KEYWORD);\n  public static final TextAttributesKey STRING = createTextAttributesKey(\"GO_STRING\", DefaultLanguageHighlighterColors.STRING);\n  public static final TextAttributesKey NUMBER = createTextAttributesKey(\"GO_NUMBER\", DefaultLanguageHighlighterColors.NUMBER);\n  public static final TextAttributesKey BRACKETS = createTextAttributesKey(\"GO_BRACKET\", DefaultLanguageHighlighterColors.BRACKETS);\n  public static final TextAttributesKey BRACES = createTextAttributesKey(\"GO_BRACES\", DefaultLanguageHighlighterColors.BRACES);\n  public static final TextAttributesKey PARENTHESES = createTextAttributesKey(\"GO_PARENTHESES\", DefaultLanguageHighlighterColors.PARENTHESES);\n  public static final TextAttributesKey OPERATOR = createTextAttributesKey(\"GO_OPERATOR\", DefaultLanguageHighlighterColors.OPERATION_SIGN);\n  public static final TextAttributesKey IDENTIFIER = createTextAttributesKey(\"GO_IDENTIFIER\", DefaultLanguageHighlighterColors.IDENTIFIER);\n  public static final TextAttributesKey DOT = createTextAttributesKey(\"GO_DOT\", DefaultLanguageHighlighterColors.DOT);\n  public static final TextAttributesKey SEMICOLON = createTextAttributesKey(\"GO_SEMICOLON\", DefaultLanguageHighlighterColors.SEMICOLON);\n  public static final TextAttributesKey COLON = createTextAttributesKey(\"GO_COLON\", HighlighterColors.TEXT);\n  public static final TextAttributesKey COMMA = createTextAttributesKey(\"GO_COMMA\", DefaultLanguageHighlighterColors.COMMA);\n  public static final TextAttributesKey BAD_CHARACTER = createTextAttributesKey(\"GO_BAD_TOKEN\", HighlighterColors.BAD_CHARACTER);\n  public static final TextAttributesKey TYPE_SPECIFICATION = createTextAttributesKey(\"GO_TYPE_SPECIFICATION\", DefaultLanguageHighlighterColors.CLASS_NAME);\n  public static final TextAttributesKey TYPE_REFERENCE = createTextAttributesKey(\"GO_TYPE_REFERENCE\", DefaultLanguageHighlighterColors.CLASS_REFERENCE);\n  public static final TextAttributesKey BUILTIN_TYPE_REFERENCE = createTextAttributesKey(\"GO_BUILTIN_TYPE_REFERENCE\", DefaultLanguageHighlighterColors.CLASS_REFERENCE);\n  public static final TextAttributesKey BUILTIN_FUNCTION = createTextAttributesKey(\"GO_BUILTIN_FUNCTION\", DefaultLanguageHighlighterColors.FUNCTION_DECLARATION);\n  public static final TextAttributesKey EXPORTED_FUNCTION = createTextAttributesKey(\"GO_EXPORTED_FUNCTION\", DefaultLanguageHighlighterColors.FUNCTION_DECLARATION);\n  public static final TextAttributesKey LOCAL_FUNCTION = createTextAttributesKey(\"GO_LOCAL_FUNCTION\", DefaultLanguageHighlighterColors.FUNCTION_DECLARATION);\n  public static final TextAttributesKey PACKAGE_EXPORTED_INTERFACE = createTextAttributesKey(\"GO_PACKAGE_EXPORTED_INTERFACE\", DefaultLanguageHighlighterColors.INTERFACE_NAME);\n  public static final TextAttributesKey PACKAGE_EXPORTED_STRUCT = createTextAttributesKey(\"GO_PACKAGE_EXPORTED_STRUCT\", DefaultLanguageHighlighterColors.CLASS_NAME);\n  public static final TextAttributesKey PACKAGE_EXPORTED_CONSTANT = createTextAttributesKey(\"GO_PACKAGE_EXPORTED_CONSTANT\", DefaultLanguageHighlighterColors.CONSTANT);\n  public static final TextAttributesKey PACKAGE_EXPORTED_VARIABLE = createTextAttributesKey(\"GO_PACKAGE_EXPORTED_VARIABLE\", DefaultLanguageHighlighterColors.GLOBAL_VARIABLE);\n  public static final TextAttributesKey PACKAGE_LOCAL_INTERFACE = createTextAttributesKey(\"GO_PACKAGE_LOCAL_INTERFACE\", DefaultLanguageHighlighterColors.INTERFACE_NAME);\n  public static final TextAttributesKey PACKAGE_LOCAL_STRUCT = createTextAttributesKey(\"GO_PACKAGE_LOCAL_STRUCT\", DefaultLanguageHighlighterColors.CLASS_NAME);\n  public static final TextAttributesKey PACKAGE_LOCAL_CONSTANT = createTextAttributesKey(\"GO_PACKAGE_LOCAL_CONSTANT\", DefaultLanguageHighlighterColors.CONSTANT);\n  public static final TextAttributesKey PACKAGE_LOCAL_VARIABLE = createTextAttributesKey(\"GO_PACKAGE_LOCAL_VARIABLE\", DefaultLanguageHighlighterColors.LOCAL_VARIABLE);\n  public static final TextAttributesKey STRUCT_EXPORTED_MEMBER = createTextAttributesKey(\"GO_STRUCT_EXPORTED_MEMBER\", DefaultLanguageHighlighterColors.GLOBAL_VARIABLE);\n  public static final TextAttributesKey STRUCT_LOCAL_MEMBER = createTextAttributesKey(\"GO_STRUCT_LOCAL_MEMBER\", DefaultLanguageHighlighterColors.LOCAL_VARIABLE);\n  public static final TextAttributesKey METHOD_RECEIVER = createTextAttributesKey(\"GO_METHOD_RECEIVER\", DefaultLanguageHighlighterColors.LOCAL_VARIABLE);\n  public static final TextAttributesKey FUNCTION_PARAMETER = createTextAttributesKey(\"GO_FUNCTION_PARAMETER\", DefaultLanguageHighlighterColors.LOCAL_VARIABLE);\n  public static final TextAttributesKey LOCAL_CONSTANT = createTextAttributesKey(\"GO_LOCAL_CONSTANT\", DefaultLanguageHighlighterColors.CONSTANT);\n  public static final TextAttributesKey LOCAL_VARIABLE = createTextAttributesKey(\"GO_LOCAL_VARIABLE\", DefaultLanguageHighlighterColors.LOCAL_VARIABLE);\n  public static final TextAttributesKey SCOPE_VARIABLE = createTextAttributesKey(\"GO_SCOPE_VARIABLE\", DefaultLanguageHighlighterColors.LOCAL_VARIABLE);\n  public static final TextAttributesKey LABEL = createTextAttributesKey(\"GO_LABEL\", DefaultLanguageHighlighterColors.LABEL);\n  private GoSyntaxHighlightingColors() {\n  }\n}\n"
  },
  {
    "path": "src/com/goide/highlighting/exitpoint/GoBreakStatementExitPointHandler.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.highlighting.exitpoint;\n\nimport com.goide.psi.*;\nimport com.goide.psi.impl.GoPsiImplUtil;\nimport com.intellij.codeInsight.highlighting.HighlightUsagesHandlerBase;\nimport com.intellij.openapi.editor.Editor;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport com.intellij.util.Consumer;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.Collections;\nimport java.util.List;\n\npublic class GoBreakStatementExitPointHandler extends HighlightUsagesHandlerBase<PsiElement> {\n  @NotNull private final PsiElement myTarget;\n  @Nullable private final GoBreakStatement myBreakStatement;\n  @Nullable private final PsiElement myOwner;\n\n  private GoBreakStatementExitPointHandler(@NotNull Editor editor,\n                                           @NotNull PsiFile file,\n                                           @NotNull PsiElement target,\n                                           @Nullable GoBreakStatement breakStatement,\n                                           @Nullable PsiElement owner) {\n    super(editor, file);\n    myTarget = target;\n    myBreakStatement = breakStatement;\n    myOwner = owner;\n  }\n\n  @NotNull\n  @Override\n  public List<PsiElement> getTargets() {\n    return Collections.singletonList(myTarget);\n  }\n\n  @Override\n  protected void selectTargets(List<PsiElement> targets, @NotNull Consumer<List<PsiElement>> selectionConsumer) {\n    selectionConsumer.consume(targets);\n  }\n\n  @Override\n  public void computeUsages(List<PsiElement> targets) {\n    PsiElement breakStmtOwner = findBreakStatementOwner();\n    GoRecursiveVisitor visitor = new GoRecursiveVisitor() {\n      @Override\n      public void visitLabelDefinition(@NotNull GoLabelDefinition o) {\n        if (o == breakStmtOwner) {\n          addOccurrence(o);\n        }\n        super.visitLabelDefinition(o);\n      }\n\n      @Override\n      public void visitBreakStatement(@NotNull GoBreakStatement o) {\n        if (o == myBreakStatement || getBreakStatementOwnerOrResolve(o) == breakStmtOwner) {\n          addOccurrence(o);\n        }\n        super.visitBreakStatement(o);\n      }\n\n      @Override\n      public void visitSwitchStatement(@NotNull GoSwitchStatement o) {\n        if (o == breakStmtOwner) {\n          GoSwitchStart switchStart = o.getSwitchStart();\n          if (switchStart != null) {\n            addOccurrence(switchStart.getSwitch());\n          }\n        }\n        super.visitSwitchStatement(o);\n      }\n\n      @Override\n      public void visitForStatement(@NotNull GoForStatement o) {\n        if (o == breakStmtOwner) {\n          addOccurrence(o.getFor());\n        }\n        super.visitForStatement(o);\n      }\n\n      @Override\n      public void visitSelectStatement(@NotNull GoSelectStatement o) {\n        if (o == breakStmtOwner) {\n          addOccurrence(o.getSelect());\n        }\n        super.visitSelectStatement(o);\n      }\n    };\n    if (breakStmtOwner != null) {\n      PsiElement parent = breakStmtOwner.getParent();\n      if (parent instanceof GoCompositeElement) {\n        visitor.visitCompositeElement((GoCompositeElement)parent);\n      }\n    }\n  }\n\n  @Nullable\n  private PsiElement findBreakStatementOwner() {\n    if (myOwner != null) return myOwner;\n    if (myBreakStatement != null) return getBreakStatementOwnerOrResolve(myBreakStatement);\n    return null;\n  }\n\n  @Nullable\n  public static PsiElement getBreakStatementOwnerOrResolve(@NotNull GoBreakStatement breakStatement) {\n    GoLabelRef label = breakStatement.getLabelRef();\n    if (label != null) {\n      return label.getReference().resolve();\n    }\n    return GoPsiImplUtil.getBreakStatementOwner(breakStatement);\n  }\n\n  @Nullable\n  public static GoBreakStatementExitPointHandler createForElement(@NotNull Editor editor,\n                                                                  @NotNull PsiFile file,\n                                                                  @NotNull PsiElement element) {\n    PsiElement target = PsiTreeUtil.getParentOfType(element, GoBreakStatement.class, GoSwitchStatement.class, GoSelectStatement.class,\n                                                    GoForStatement.class);\n    if (target == null) {\n      return null;\n    }\n    return target instanceof GoBreakStatement\n           ? new GoBreakStatementExitPointHandler(editor, file, element, (GoBreakStatement)target, null)\n           : new GoBreakStatementExitPointHandler(editor, file, element, null, target);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/highlighting/exitpoint/GoFunctionExitPointHandler.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.highlighting.exitpoint;\n\nimport com.goide.psi.*;\nimport com.goide.psi.impl.GoPsiImplUtil;\nimport com.intellij.codeInsight.highlighting.HighlightUsagesHandlerBase;\nimport com.intellij.openapi.editor.Editor;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport com.intellij.util.Consumer;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.Collections;\nimport java.util.List;\n\npublic class GoFunctionExitPointHandler extends HighlightUsagesHandlerBase<PsiElement> {\n  @NotNull private final PsiElement myTarget;\n  @NotNull private final GoTypeOwner myFunction;\n\n  private GoFunctionExitPointHandler(Editor editor, PsiFile file, @NotNull PsiElement target, @NotNull GoTypeOwner function) {\n    super(editor, file);\n    myTarget = target;\n    myFunction = function;\n  }\n\n  @NotNull\n  @Override\n  public List<PsiElement> getTargets() {\n    return Collections.singletonList(myTarget);\n  }\n\n  @Override\n  protected void selectTargets(List<PsiElement> targets, @NotNull Consumer<List<PsiElement>> selectionConsumer) {\n    selectionConsumer.consume(targets);\n  }\n\n  @Override\n  public void computeUsages(List<PsiElement> targets) {\n    if (myFunction instanceof GoFunctionOrMethodDeclaration) {\n      addOccurrence(((GoFunctionOrMethodDeclaration)myFunction).getFunc());\n    }\n    new GoRecursiveVisitor() {\n      @Override\n      public void visitFunctionLit(@NotNull GoFunctionLit literal) {\n      }\n\n      @Override\n      public void visitReturnStatement(@NotNull GoReturnStatement statement) {\n        addOccurrence(statement);\n      }\n\n      @Override\n      public void visitCallExpr(@NotNull GoCallExpr o) {\n        if (GoPsiImplUtil.isPanic(o)) addOccurrence(o);\n        super.visitCallExpr(o);\n      }\n    }.visitTypeOwner(myFunction);\n  }\n\n  @Nullable\n  public static GoFunctionExitPointHandler createForElement(@NotNull Editor editor, @NotNull PsiFile file, @NotNull PsiElement element) {\n    GoTypeOwner function = PsiTreeUtil.getParentOfType(element, GoFunctionLit.class, GoFunctionOrMethodDeclaration.class);\n    return function != null ? new GoFunctionExitPointHandler(editor, file, element, function) : null;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/highlighting/exitpoint/GoHighlightExitPointsHandlerFactory.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.highlighting.exitpoint;\n\nimport com.goide.GoTypes;\nimport com.goide.psi.GoCallExpr;\nimport com.goide.psi.GoReferenceExpression;\nimport com.goide.psi.impl.GoPsiImplUtil;\nimport com.intellij.codeInsight.highlighting.HighlightUsagesHandlerBase;\nimport com.intellij.codeInsight.highlighting.HighlightUsagesHandlerFactoryBase;\nimport com.intellij.openapi.editor.Editor;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.impl.source.tree.LeafPsiElement;\nimport com.intellij.psi.tree.IElementType;\nimport com.intellij.psi.tree.TokenSet;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoHighlightExitPointsHandlerFactory extends HighlightUsagesHandlerFactoryBase {\n  private static final TokenSet BREAK_HIGHLIGHTING_TOKENS = TokenSet.create(GoTypes.BREAK, GoTypes.SWITCH, GoTypes.FOR, GoTypes.SELECT);\n\n  @Nullable\n  @Override\n  public HighlightUsagesHandlerBase createHighlightUsagesHandler(@NotNull Editor editor,\n                                                                 @NotNull PsiFile file,\n                                                                 @NotNull PsiElement target) {\n    if (target instanceof LeafPsiElement) {\n      IElementType elementType = ((LeafPsiElement)target).getElementType();\n      if (elementType == GoTypes.RETURN || elementType == GoTypes.FUNC || isPanicCall(target)) {\n        return GoFunctionExitPointHandler.createForElement(editor, file, target);\n      }\n      else if (BREAK_HIGHLIGHTING_TOKENS.contains(elementType)) {\n        return GoBreakStatementExitPointHandler.createForElement(editor, file, target);\n      }\n    }\n    return null;\n  }\n\n  private static boolean isPanicCall(@NotNull PsiElement e) {\n    PsiElement parent = e.getParent();\n    if (parent instanceof GoReferenceExpression) {\n      PsiElement grandPa = parent.getParent();\n      if (grandPa instanceof GoCallExpr) return GoPsiImplUtil.isPanic((GoCallExpr)grandPa);\n    }\n    return false;\n  }\n}"
  },
  {
    "path": "src/com/goide/inspections/GoAddTrailingCommaInspection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.psi.GoElement;\nimport com.goide.psi.GoVisitor;\nimport com.goide.psi.impl.GoElementFactory;\nimport com.intellij.codeInspection.LocalInspectionToolSession;\nimport com.intellij.codeInspection.LocalQuickFixBase;\nimport com.intellij.codeInspection.ProblemDescriptor;\nimport com.intellij.codeInspection.ProblemsHolder;\nimport com.intellij.openapi.command.WriteCommandAction;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiErrorElement;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoAddTrailingCommaInspection extends GoInspectionBase {\n  public static final String QUICK_FIX_NAME = \"Add comma\";\n\n  @NotNull\n  @Override\n  protected GoVisitor buildGoVisitor(@NotNull ProblemsHolder holder, @NotNull LocalInspectionToolSession session) {\n    return new GoVisitor() {\n      @Override\n      public void visitErrorElement(PsiErrorElement o) {\n        GoElement element = PsiTreeUtil.getPrevSiblingOfType(o, GoElement.class);\n        if (element != null) {\n          holder.registerProblem(element, \"Need trailing comma before newline in composite literal\", new MyAddCommaFix());\n        }\n      }\n    };\n  }\n\n  private static class MyAddCommaFix extends LocalQuickFixBase {\n    private MyAddCommaFix() {super(QUICK_FIX_NAME, QUICK_FIX_NAME);}\n\n    @Override\n    public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {\n      PsiElement e = descriptor.getPsiElement();\n      if (!(e instanceof GoElement)) return;\n      PsiErrorElement error = PsiTreeUtil.getNextSiblingOfType(e, PsiErrorElement.class);\n      if (error == null) return;\n      new WriteCommandAction.Simple(project, getName(), e.getContainingFile()) {\n        @Override\n        protected void run() {\n          error.replace(GoElementFactory.createComma(project));\n        }\n      }.execute();\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/GoAnonymousFieldDefinitionTypeInspection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.psi.GoAnonymousFieldDefinition;\nimport com.goide.psi.GoVisitor;\nimport com.goide.quickfix.GoCreateWrapperTypeQuickFix;\nimport com.intellij.codeInspection.LocalInspectionToolSession;\nimport com.intellij.codeInspection.ProblemsHolder;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoAnonymousFieldDefinitionTypeInspection extends GoInspectionBase {\n  @NotNull\n  @Override\n  protected GoVisitor buildGoVisitor(@NotNull ProblemsHolder holder,\n                                     @SuppressWarnings({\"UnusedParameters\", \"For future\"}) @NotNull LocalInspectionToolSession session) {\n    return new GoVisitor() {\n      @Override\n      public void visitAnonymousFieldDefinition(@NotNull GoAnonymousFieldDefinition o) {\n        if (o.getTypeReferenceExpression() == null) {\n          holder.registerProblem(o, \"Invalid type \" + o.getType().getText() + \": must be typeName or *typeName\",\n                                 new GoCreateWrapperTypeQuickFix(o.getType()));\n        }\n      }\n    };\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/GoAssignmentNilWithoutExplicitTypeInspection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.GoConstants;\nimport com.goide.psi.*;\nimport com.goide.psi.impl.GoPsiImplUtil;\nimport com.goide.psi.impl.GoReferenceExpressionImpl;\nimport com.intellij.codeInspection.LocalInspectionToolSession;\nimport com.intellij.codeInspection.ProblemsHolder;\nimport com.intellij.psi.PsiElement;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.List;\n\nimport static com.intellij.codeInspection.ProblemHighlightType.GENERIC_ERROR_OR_WARNING;\n\npublic class GoAssignmentNilWithoutExplicitTypeInspection extends GoInspectionBase {\n  @NotNull\n  @Override\n  protected GoVisitor buildGoVisitor(@NotNull ProblemsHolder holder, @NotNull LocalInspectionToolSession session) {\n    return new GoVisitor() {\n      @Override\n      public void visitVarDeclaration(@NotNull GoVarDeclaration o) {\n        for (GoVarSpec spec : o.getVarSpecList()) {\n          checkVar(spec);\n        }\n      }\n\n      @Override\n      public void visitShortVarDeclaration(@NotNull GoShortVarDeclaration o) {\n        checkVar(o);\n      }\n\n      @Override\n      public void visitConstDeclaration(@NotNull GoConstDeclaration o) {\n        for (GoConstSpec spec : o.getConstSpecList()) {\n          checkConst(spec);\n        }\n      }\n\n      private void checkVar(@NotNull GoVarSpec spec) {\n        if (spec.getType() != null) return;\n        checkExpressions(spec.getRightExpressionsList());\n      }\n\n      private void checkConst(@NotNull GoConstSpec spec) {\n        if (spec.getType() != null) return;\n        checkExpressions(spec.getExpressionList());\n      }\n\n      private void checkExpressions(@NotNull List<GoExpression> expressions) {\n        for (GoExpression expr : expressions) {\n          if (expr instanceof GoReferenceExpressionImpl) {\n            GoReferenceExpressionImpl ref = (GoReferenceExpressionImpl)expr;\n            PsiElement resolve = ref.resolve();\n            if (ref.getIdentifier().textMatches(GoConstants.NIL) && resolve != null && GoPsiImplUtil.builtin(resolve)) {\n              holder.registerProblem(expr, \"Cannot assign nil without explicit type\", GENERIC_ERROR_OR_WARNING);\n            }\n          }\n        }\n      }\n    };\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/GoAssignmentToReceiverInspection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.psi.GoPointerType;\nimport com.goide.psi.GoReceiver;\nimport com.goide.psi.GoReferenceExpression;\nimport com.goide.psi.GoUnaryExpr;\nimport com.goide.psi.GoVisitor;\nimport com.intellij.codeInsight.highlighting.ReadWriteAccessDetector;\nimport com.intellij.codeInspection.LocalInspectionToolSession;\nimport com.intellij.codeInspection.ProblemsHolder;\nimport com.intellij.psi.PsiElement;\nimport org.jetbrains.annotations.NotNull;\n\nimport static com.intellij.codeInspection.ProblemHighlightType.WEAK_WARNING;\n\npublic class GoAssignmentToReceiverInspection extends GoInspectionBase {\n  @NotNull\n  @Override\n  protected GoVisitor buildGoVisitor(@NotNull ProblemsHolder holder, @NotNull LocalInspectionToolSession session) {\n    return new GoVisitor() {\n      @Override\n      public void visitReferenceExpression(@NotNull GoReferenceExpression o) {\n        super.visitReferenceExpression(o);\n        if (o.getReadWriteAccess() == ReadWriteAccessDetector.Access.Write) {\n          PsiElement resolve = o.resolve();\n          if (resolve instanceof GoReceiver) {\n            String message = \"Assignment to method receiver doesn't propagate to other calls\";\n            if (((GoReceiver)resolve).getType() instanceof GoPointerType) {\n              if (o.getParent() instanceof GoUnaryExpr) {\n                GoUnaryExpr p = (GoUnaryExpr)o.getParent();\n                if (p.getMul() != null) {\n                  // pointer dereference\n                  return;\n                }\n              }\n              message = \"Assignment to method receiver propagates only to callees but not to callers\";\n            }\n            holder.registerProblem(o, message, WEAK_WARNING);\n          }\n        }\n      }\n    };\n  }\n}"
  },
  {
    "path": "src/com/goide/inspections/GoBoolExpressionsInspection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.psi.*;\nimport com.goide.psi.impl.GoExpressionUtil;\nimport com.goide.psi.impl.GoPsiImplUtil;\nimport com.goide.quickfix.GoSimplifyBoolExprQuickFix;\nimport com.intellij.codeInspection.LocalInspectionToolSession;\nimport com.intellij.codeInspection.ProblemsHolder;\nimport com.intellij.openapi.progress.ProgressManager;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.Collections;\nimport java.util.List;\n\npublic class GoBoolExpressionsInspection extends GoInspectionBase {\n  @NotNull\n  @Override\n  protected GoVisitor buildGoVisitor(@NotNull ProblemsHolder holder, @NotNull LocalInspectionToolSession session) {\n    return new GoVisitor() {\n      @Override\n      public void visitAndExpr(@NotNull GoAndExpr o) {\n        visitExpr(o, true);\n      }\n\n      @Override\n      public void visitOrExpr(@NotNull GoOrExpr o) {\n        visitExpr(o, false);\n      }\n\n      private void visitExpr(GoBinaryExpr o, boolean and) {\n        if (!isTopmostOperationOfType(o, and)) return;\n\n        List<GoExpression> elements = collect(o, and);\n        for (int i = 0; i < elements.size(); i++) {\n          GoExpression l = elements.get(i);\n          if (l instanceof GoReferenceExpression && (l.textMatches(\"true\") || l.textMatches(\"false\")) &&\n              GoPsiImplUtil.builtin(((GoReferenceExpression)l).resolve())) {\n            registerProblem(o, holder);\n            return;\n          }\n          for (int j = i + 1; j < elements.size(); j++) {\n            ProgressManager.checkCanceled();\n            GoExpression r = elements.get(j);\n            if (isEqualsWithNot(l, r) || isEqualsWithNot(r, l) || GoExpressionUtil.identical(l, r)) {\n              registerProblem(o, holder);\n              return;\n            }\n            // todo expr evaluating! x != c1 || x != c2 (c1, c2 const, c1 != c2)\n          }\n        }\n      }\n\n      private boolean isTopmostOperationOfType(GoBinaryExpr o, boolean isAndType) {\n        PsiElement parent = PsiTreeUtil.skipParentsOfType(o, GoParenthesesExpr.class);\n        return !(parent instanceof GoBinaryExpr) || !isSameOp((GoExpression)parent, isAndType);\n      }\n    };\n  }\n\n  private static void registerProblem(@NotNull GoBinaryExpr o, @NotNull ProblemsHolder holder) {\n    holder.registerProblem(o, \"Simplify\", new GoSimplifyBoolExprQuickFix(o));\n  }\n\n  public static boolean isEqualsWithNot(@Nullable GoExpression not, @Nullable GoExpression expr) {\n    return not instanceof GoUnaryExpr &&\n           ((GoUnaryExpr)not).getNot() != null &&\n           GoExpressionUtil.identical(((GoUnaryExpr)not).getExpression(), expr);\n  }\n\n  @NotNull\n  public static List<GoExpression> collect(GoBinaryExpr o, boolean and) {\n    List<GoExpression> result = ContainerUtil.newSmartList();\n    result.addAll(processExpr(o.getLeft(), and));\n    result.addAll(processExpr(o.getRight(), and));\n    return result;\n  }\n\n  @NotNull\n  private static List<GoExpression> processExpr(@Nullable GoExpression e, boolean and) {\n    if (e == null) return ContainerUtil.emptyList();\n    if (isSameOp(e, and)) {\n      return collect((GoBinaryExpr)e, and);\n    }\n    if (e instanceof GoParenthesesExpr) {\n      return processExpr(((GoParenthesesExpr)e).getExpression(), and);\n    }\n    return Collections.singletonList(e);\n  }\n\n  private static boolean isSameOp(GoExpression expr, boolean and) {\n    return and ? expr instanceof GoAndExpr : expr instanceof GoOrExpr;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/GoCgoInTestInspection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.psi.GoFile;\nimport com.goide.psi.GoImportSpec;\nimport com.goide.quickfix.GoDeleteImportQuickFix;\nimport com.goide.runconfig.testing.GoTestFinder;\nimport com.intellij.codeInspection.ProblemsHolder;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoCgoInTestInspection extends GoInspectionBase {\n  @Override\n  protected void checkFile(@NotNull GoFile file, @NotNull ProblemsHolder problemsHolder) {\n    if (!GoTestFinder.isTestFile(file)) return;\n    for (GoImportSpec importSpec : file.getImports()) {\n      if (importSpec.isCImport()) {\n        problemsHolder.registerProblem(importSpec, \"Usage of cgo in tests is not supported.\", new GoDeleteImportQuickFix());\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/GoCommentStartInspection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.GoConstants;\nimport com.goide.GoDocumentationProvider;\nimport com.goide.psi.GoCompositeElement;\nimport com.goide.psi.GoNamedElement;\nimport com.goide.psi.GoPackageClause;\nimport com.goide.psi.GoVisitor;\nimport com.intellij.codeInspection.LocalInspectionToolSession;\nimport com.intellij.codeInspection.ProblemHighlightType;\nimport com.intellij.codeInspection.ProblemsHolder;\nimport com.intellij.psi.PsiComment;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.List;\n\n/**\n * golint inspection from:\n * https://github.com/golang/lint/blob/32a87160691b3c96046c0c678fe57c5bef761456/lint.go#L744\n */\npublic class GoCommentStartInspection extends GoInspectionBase {\n  @NotNull\n  @Override\n  protected GoVisitor buildGoVisitor(@NotNull ProblemsHolder holder, @NotNull LocalInspectionToolSession session) {\n    return new GoVisitor() {\n\n      @Override\n      public void visitPackageClause(@NotNull GoPackageClause o) {\n        String packageName = o.getName();\n        if (GoConstants.MAIN.equals(packageName)) {\n          return;\n        }\n        List<PsiComment> comments = GoDocumentationProvider.getCommentsForElement(o);\n        String commentText = GoDocumentationProvider.getCommentText(comments, false);\n        if (!comments.isEmpty() && !commentText.isEmpty() && !commentText.startsWith(\"Package \" + packageName)) {\n          registerProblem(comments, \"Package comment should be of the form 'Package \" + packageName + \" ...'\", holder);\n        }\n      }\n\n      @Override\n      public void visitCompositeElement(@NotNull GoCompositeElement o) {\n        if (!(o instanceof GoNamedElement) || !((GoNamedElement)o).isPublic()) {\n          return;\n        }\n        List<PsiComment> comments = GoDocumentationProvider.getCommentsForElement(o);\n        String commentText = GoDocumentationProvider.getCommentText(comments, false);\n        String elementName = ((GoNamedElement)o).getName();\n        if (elementName != null && !comments.isEmpty() && !commentText.isEmpty()) {\n          if (!isCorrectComment(commentText, elementName)) {\n            registerProblem(comments, \"Comment should start with '\" + elementName + \"'\", holder);\n          }\n          // +1 stands for Element_Name<space>\n          else if (commentText.length() <= elementName.length() + 1) {\n            registerProblem(comments, \"Comment should be meaningful or it should be removed\", holder);\n          }\n        }\n      }\n    };\n  }\n\n  private static void registerProblem(List<PsiComment> comments, String description, @NotNull ProblemsHolder holder) {\n    for (PsiComment comment : comments) {\n      holder.registerProblem(comment, description, ProblemHighlightType.WEAK_WARNING);\n    }\n  }\n\n  private static boolean isCorrectComment(String commentText, String elementName) {\n    return commentText.startsWith(elementName)\n           || commentText.startsWith(\"A \" + elementName)\n           || commentText.startsWith(\"An \" + elementName)\n           || commentText.startsWith(\"The \" + elementName);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/GoDeferGoInspection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.psi.*;\nimport com.goide.psi.impl.GoElementFactory;\nimport com.goide.psi.impl.GoPsiImplUtil;\nimport com.goide.quickfix.GoDeleteQuickFix;\nimport com.intellij.codeInspection.*;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.psi.PsiElement;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoDeferGoInspection extends GoInspectionBase {\n  public static final String ADD_CALL_QUICK_FIX_NAME = \"Add function call\";\n  public static final String UNWRAP_PARENTHESES_QUICK_FIX_NAME = \"Unwrap parentheses\";\n  public static final String REPLACE_WITH_CORRECT_DEFER_RECOVER = \"Replace with correct defer construct\";\n\n  @NotNull\n  @Override\n  protected GoVisitor buildGoVisitor(@NotNull ProblemsHolder holder, @NotNull LocalInspectionToolSession session) {\n    return new GoVisitor() {\n      @SuppressWarnings(\"DialogTitleCapitalization\")\n      @Override\n      public void visitDeferStatement(@NotNull GoDeferStatement o) {\n        super.visitDeferStatement(o);\n        GoExpression expression = o.getExpression();\n        if (expression instanceof GoCallExpr) {\n          GoCallExpr callExpr = (GoCallExpr)expression;\n          if (GoPsiImplUtil.isPanic(callExpr)) {\n            holder.registerProblem(o, \"defer should not call panic() directly #loc\", ProblemHighlightType.WEAK_WARNING,\n                                   new GoDeleteQuickFix(\"Delete statement\", GoDeferStatement.class));\n            return;\n          }\n          if (GoPsiImplUtil.isRecover(callExpr)) {\n            holder.registerProblem(o, \"defer should not call recover() directly #loc\", ProblemHighlightType.WEAK_WARNING,\n                                   new GoReplaceWithCorrectDeferRecoverQuickFix());\n            return;\n          }\n        }\n        checkExpression(expression, \"defer\");\n      }\n\n      @SuppressWarnings(\"DialogTitleCapitalization\")\n      @Override\n      public void visitGoStatement(@NotNull GoGoStatement o) {\n        super.visitGoStatement(o);\n        GoExpression expression = o.getExpression();\n        if (expression instanceof GoCallExpr) {\n          GoCallExpr callExpr = (GoCallExpr)expression;\n          if (GoPsiImplUtil.isPanic(callExpr)) {\n            holder.registerProblem(o, \"go should not call panic() directly #loc\", ProblemHighlightType.WEAK_WARNING,\n                                   new GoDeleteQuickFix(\"Delete statement\", GoGoStatement.class));\n            return;\n          }\n          if (GoPsiImplUtil.isRecover(callExpr)) {\n            holder.registerProblem(o, \"go should not call recover() directly #loc\", ProblemHighlightType.WEAK_WARNING,\n                                   new GoDeleteQuickFix(\"Delete statement\", GoGoStatement.class));\n            return;\n          }\n        }\n        checkExpression(expression, \"go\");\n      }\n\n      private void checkExpression(@Nullable GoExpression o, @NotNull String who) {\n        if (o == null) return;\n        if (o instanceof GoCallExpr || o instanceof GoBuiltinCallExpr) {\n          if (GoPsiImplUtil.isConversionExpression(o)) {\n            holder.registerProblem(o, who + \" requires function call, not conversion #loc\", ProblemHighlightType.GENERIC_ERROR_OR_WARNING);\n          }\n          return;\n        }\n\n        if (o instanceof GoParenthesesExpr) {\n          holder.registerProblem(o, \"Expression in \" + who + \" must not be parenthesized\", ProblemHighlightType.GENERIC_ERROR_OR_WARNING,\n                                 new GoUnwrapParensExpression());\n        }\n        LocalQuickFix[] fixes = o.getGoType(null) instanceof GoFunctionType ? new LocalQuickFix[]{new GoAddParensQuickFix()}\n                                                                            : LocalQuickFix.EMPTY_ARRAY;\n        holder.registerProblem(o, \"Expression in \" + who + \" must be function call\", ProblemHighlightType.GENERIC_ERROR_OR_WARNING, fixes);\n      }\n    };\n  }\n\n  public static class GoAddParensQuickFix extends LocalQuickFixBase {\n    public GoAddParensQuickFix() {\n      super(ADD_CALL_QUICK_FIX_NAME);\n    }\n\n    @Override\n    public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {\n      addParensIfNeeded(project, descriptor.getStartElement());\n    }\n\n    public static PsiElement addParensIfNeeded(@NotNull Project project, @Nullable PsiElement element) {\n      if (element instanceof GoExpression && !(element instanceof GoCallExpr || element instanceof GoBuiltinCallExpr)) {\n        if (((GoExpression)element).getGoType(null) instanceof GoFunctionType) {\n          return element.replace(GoElementFactory.createExpression(project, element.getText() + \"()\"));\n        }\n      }\n      return null;\n    }\n  }\n\n  private static class GoUnwrapParensExpression extends LocalQuickFixBase {\n    public GoUnwrapParensExpression() {\n      super(UNWRAP_PARENTHESES_QUICK_FIX_NAME);\n    }\n\n    @Override\n    public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {\n      PsiElement element = descriptor.getStartElement();\n      if (element instanceof GoParenthesesExpr) {\n        GoExpression innerExpression = ((GoParenthesesExpr)element).getExpression();\n        while (innerExpression instanceof GoParenthesesExpr) {\n          innerExpression = ((GoParenthesesExpr)innerExpression).getExpression();\n        }\n        if (innerExpression != null) {\n          element.replace(GoElementFactory.createExpression(project, innerExpression.getText()));\n        }\n      }\n    }\n  }\n\n  public static class GoReplaceWithCorrectDeferRecoverQuickFix extends LocalQuickFixBase {\n    public GoReplaceWithCorrectDeferRecoverQuickFix() {\n      super(REPLACE_WITH_CORRECT_DEFER_RECOVER);\n    }\n\n    @Override\n    public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {\n      PsiElement element = descriptor.getPsiElement();\n      if (element == null || !element.isValid()) return;\n\n      if (element instanceof GoStatement) {\n        element.replace(GoElementFactory.createDeferStatement(project, \"func() {\\n\" +\n                                                                       \"\\tif r := recover(); r != nil {\\n\" +\n                                                                       \"\\t\\t\\n\" +\n                                                                       \"\\t}\\n\" +\n                                                                       \"\\t}()}\"));\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/GoDeferInLoopInspection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.psi.GoDeferStatement;\nimport com.goide.psi.GoForStatement;\nimport com.goide.psi.GoFunctionLit;\nimport com.goide.psi.GoVisitor;\nimport com.intellij.codeInspection.LocalInspectionToolSession;\nimport com.intellij.codeInspection.ProblemHighlightType;\nimport com.intellij.codeInspection.ProblemsHolder;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoDeferInLoopInspection extends GoInspectionBase {\n  @NotNull\n  @Override\n  protected GoVisitor buildGoVisitor(@NotNull ProblemsHolder holder, @NotNull LocalInspectionToolSession session) {\n    return new GoVisitor() {\n      @Override\n      public void visitDeferStatement(@NotNull GoDeferStatement o) {\n        if (PsiTreeUtil.getParentOfType(o, GoForStatement.class, GoFunctionLit.class) instanceof GoForStatement) {\n          holder.registerProblem(o.getDefer(), \"Possible resource leak, 'defer' is called in a for loop.\",\n                                 ProblemHighlightType.GENERIC_ERROR_OR_WARNING);\n        }\n      }\n    };\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/GoDirectAssignToStructFieldInMapInspection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.psi.*;\nimport com.intellij.codeInspection.LocalInspectionToolSession;\nimport com.intellij.codeInspection.ProblemsHolder;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\n\nimport static com.intellij.codeInspection.ProblemHighlightType.GENERIC_ERROR_OR_WARNING;\n\npublic class GoDirectAssignToStructFieldInMapInspection extends GoInspectionBase {\n  @NotNull\n  @Override\n  protected GoVisitor buildGoVisitor(@NotNull ProblemsHolder holder, @NotNull LocalInspectionToolSession session) {\n    return new GoVisitor() {\n      @Override\n      public void visitLeftHandExprList(@NotNull GoLeftHandExprList o) {\n        super.visitLeftHandExprList(o);\n        for (GoExpression expression : o.getExpressionList()) {\n          if (!(expression instanceof GoSelectorExpr)) continue;\n          GoExpression expr = ContainerUtil.getFirstItem(((GoSelectorExpr)expression).getExpressionList());\n          if (expr instanceof GoIndexOrSliceExpr) {\n            GoType exprType = expr.getGoType(null);\n            if (exprType != null && !(exprType instanceof GoPointerType) && exprType.getParent() instanceof GoMapType) {\n              holder.registerProblem(o, \"cannot assign to \" + expression.getText(), GENERIC_ERROR_OR_WARNING);\n            }\n          }\n        }\n      }\n    };\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/GoDuplicateArgumentInspection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.psi.*;\nimport com.intellij.codeInspection.LocalInspectionToolSession;\nimport com.intellij.codeInspection.ProblemHighlightType;\nimport com.intellij.codeInspection.ProblemsHolder;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.Set;\n\npublic class GoDuplicateArgumentInspection extends GoInspectionBase {\n  @NotNull\n  @Override\n  protected GoVisitor buildGoVisitor(@NotNull ProblemsHolder holder, @NotNull LocalInspectionToolSession session) {\n    return new GoVisitor() {\n      @Override\n      public void visitCompositeElement(@NotNull GoCompositeElement o) {\n        if (o instanceof GoSignatureOwner) {\n          check(((GoSignatureOwner)o).getSignature(), holder);\n        }\n      }\n    };\n  }\n\n  protected void check(@Nullable GoSignature o, @NotNull ProblemsHolder holder) {\n    if (o != null) {\n      checkParameters(holder, o.getParameters(), ContainerUtil.newLinkedHashSet());\n    }\n  }\n\n  protected static void checkParameters(@NotNull ProblemsHolder holder,\n                                        @NotNull GoParameters parameters,\n                                        @NotNull Set<String> parameterNames) {\n    for (GoParameterDeclaration fp : parameters.getParameterDeclarationList()) {\n      for (GoParamDefinition parameter : fp.getParamDefinitionList()) {\n        if (parameter.isBlank()) continue;\n        String name = parameter.getName();\n        if (name != null && parameterNames.contains(name)) {\n          holder.registerProblem(parameter, \"Duplicate argument <code>#ref</code> #loc\", ProblemHighlightType.GENERIC_ERROR_OR_WARNING);\n        }\n        else {\n          parameterNames.add(name);\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/GoDuplicateFieldsOrMethodsInspection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.psi.*;\nimport com.intellij.codeInspection.LocalInspectionToolSession;\nimport com.intellij.codeInspection.ProblemsHolder;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.List;\nimport java.util.Set;\n\nimport static com.intellij.codeInspection.ProblemHighlightType.GENERIC_ERROR_OR_WARNING;\n\npublic class GoDuplicateFieldsOrMethodsInspection extends GoInspectionBase {\n  @NotNull\n  @Override\n  protected GoVisitor buildGoVisitor(@NotNull ProblemsHolder holder,\n                                     @SuppressWarnings({\"UnusedParameters\", \"For future\"}) @NotNull LocalInspectionToolSession session) {\n    return new GoVisitor() {\n      @Override\n      public void visitStructType(@NotNull GoStructType type) {\n        List<GoNamedElement> fields = ContainerUtil.newArrayList();\n        type.accept(new GoRecursiveVisitor() {\n          @Override\n          public void visitFieldDefinition(@NotNull GoFieldDefinition o) {\n            addField(o);\n          }\n\n          @Override\n          public void visitAnonymousFieldDefinition(@NotNull GoAnonymousFieldDefinition o) {\n            addField(o);\n          }\n\n          private void addField(@NotNull GoNamedElement o) {\n            if (!o.isBlank()) fields.add(o);\n          }\n\n          @Override\n          public void visitType(@NotNull GoType o) {\n            if (o == type) super.visitType(o);\n          }\n        });\n        check(fields, holder, \"field\");\n        super.visitStructType(type);\n      }\n\n      @Override\n      public void visitInterfaceType(@NotNull GoInterfaceType o) {\n        check(o.getMethodSpecList(), holder, \"method\");\n        super.visitInterfaceType(o);\n      }\n    };\n  }\n\n  private static void check(@NotNull List<? extends GoNamedElement> fields, @NotNull ProblemsHolder problemsHolder, @NotNull String what) {\n    Set<String> names = ContainerUtil.newHashSet();\n    for (GoCompositeElement field : fields) {\n      if (field instanceof GoMethodSpec && ((GoMethodSpec) field).getSignature() == null) {\n        // It's an embedded type, not a method or a field.\n        continue;\n      }\n      if (field instanceof GoNamedElement) {\n        String name = ((GoNamedElement)field).getName();\n        if (names.contains(name)) {\n          PsiElement id = ((GoNamedElement)field).getIdentifier();\n          problemsHolder.registerProblem(id != null ? id : field, \"Duplicate \" + what + \" <code>#ref</code> #loc\",\n                                         GENERIC_ERROR_OR_WARNING);\n        }\n        else {\n          ContainerUtil.addIfNotNull(names, name);\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/GoDuplicateFunctionOrMethodInspection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.psi.*;\nimport com.goide.psi.impl.GoPsiImplUtil;\nimport com.goide.sdk.GoPackageUtil;\nimport com.goide.stubs.index.GoFunctionIndex;\nimport com.goide.stubs.index.GoIdFilter;\nimport com.goide.stubs.index.GoMethodIndex;\nimport com.goide.stubs.types.GoMethodDeclarationStubElementType;\nimport com.intellij.codeInspection.LocalInspectionToolSession;\nimport com.intellij.codeInspection.ProblemsHolder;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.module.ModuleUtilCore;\nimport com.intellij.openapi.progress.ProgressManager;\nimport com.intellij.openapi.util.Comparing;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.search.GlobalSearchScope;\nimport com.intellij.util.indexing.IdFilter;\nimport org.jetbrains.annotations.NotNull;\n\nimport static com.goide.GoConstants.INIT;\nimport static com.goide.GoConstants.MAIN;\n\npublic class GoDuplicateFunctionOrMethodInspection extends GoInspectionBase {\n  @NotNull\n  @Override\n  protected GoVisitor buildGoVisitor(@NotNull ProblemsHolder holder, @NotNull LocalInspectionToolSession session) {\n    return new GoVisitor() {\n      @Override\n      public void visitMethodDeclaration(@NotNull GoMethodDeclaration method) {\n        if (method.isBlank()) return;\n\n        String methodName = method.getName();\n        if (methodName == null) return;\n\n        String typeText = GoMethodDeclarationStubElementType.calcTypeText(method);\n        if (typeText == null) return;\n\n        GoFile file = method.getContainingFile();\n        GlobalSearchScope scope = GoPackageUtil.packageScope(file);\n        IdFilter idFilter = GoIdFilter.getFilesFilter(scope);\n        Module module = ModuleUtilCore.findModuleForPsiElement(file);\n        String key = file.getPackageName() + \".\" + typeText;\n        GoMethodIndex.process(key, file.getProject(), scope, idFilter, declaration -> {\n          ProgressManager.checkCanceled();\n          if (!method.isEquivalentTo(declaration)) {\n            if (Comparing.equal(declaration.getName(), methodName)\n                && GoPsiImplUtil.allowed(declaration.getContainingFile(), file, module)) {\n              PsiElement identifier = method.getNameIdentifier();\n              holder.registerProblem(identifier == null ? method : identifier, \"Duplicate method name\");\n              return false;\n            }\n          }\n          return true;\n        });\n      }\n\n      @Override\n      public void visitFunctionDeclaration(@NotNull GoFunctionDeclaration func) {\n        if (func.isBlank()) return;\n\n        String funcName = func.getName();\n        if (funcName == null) return;\n        if (INIT.equals(funcName) && zeroArity(func)) return;\n\n        GoFile file = func.getContainingFile();\n        boolean isMainFunction = MAIN.equals(funcName) && MAIN.equals(file.getPackageName()) && zeroArity(func);\n        Module module = ModuleUtilCore.findModuleForPsiElement(file);\n        GlobalSearchScope scope = GoPackageUtil.packageScope(file);\n        IdFilter idFilter = GoIdFilter.getFilesFilter(scope);\n        GoFunctionIndex.process(funcName, file.getProject(), scope, idFilter, declaration -> {\n          ProgressManager.checkCanceled();\n          if (!func.isEquivalentTo(declaration) && GoPsiImplUtil.allowed(declaration.getContainingFile(), file, module)) {\n            if (!isMainFunction || Comparing.equal(declaration.getContainingFile(), file)) {\n              PsiElement identifier = func.getNameIdentifier();\n              holder.registerProblem(identifier == null ? func : identifier, \"Duplicate function name\");\n              return false;\n            }\n          }\n          return true;\n        });\n      }\n    };\n  }\n\n  private static boolean zeroArity(@NotNull GoFunctionDeclaration o) {\n    GoSignature signature = o.getSignature();\n    return signature == null || signature.getParameters().getParameterDeclarationList().isEmpty();\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/GoDuplicateReturnArgumentInspection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.psi.*;\nimport com.intellij.codeInspection.ProblemsHolder;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.List;\nimport java.util.Set;\n\npublic class GoDuplicateReturnArgumentInspection extends GoDuplicateArgumentInspection {\n  @Override\n  public void check(@Nullable GoSignature o, @NotNull ProblemsHolder holder) {\n    if (o == null) return;\n    Set<String> names = getParamNames(o);\n    GoResult result = o.getResult();\n    if (result == null) return;\n    GoParameters parameters = result.getParameters();\n    if (parameters == null) return;\n\n    checkParameters(holder, parameters, names);\n  }\n\n  @NotNull\n  private static Set<String> getParamNames(@NotNull GoSignature o) {\n    List<GoParameterDeclaration> params = o.getParameters().getParameterDeclarationList();\n    Set<String> names = ContainerUtil.newLinkedHashSet();\n    for (GoParameterDeclaration fp : params) {\n      for (GoParamDefinition parameter : fp.getParamDefinitionList()) {\n        if (parameter.isBlank()) continue;\n        ContainerUtil.addIfNotNull(names, parameter.getName());\n      }\n    }\n    return names;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/GoEmbeddedInterfacePointerInspection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.psi.*;\nimport com.intellij.codeInspection.LocalInspectionToolSession;\nimport com.intellij.codeInspection.ProblemHighlightType;\nimport com.intellij.codeInspection.ProblemsHolder;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoEmbeddedInterfacePointerInspection extends GoInspectionBase {\n  @NotNull\n  @Override\n  protected GoVisitor buildGoVisitor(@NotNull ProblemsHolder holder, @NotNull LocalInspectionToolSession session) {\n    return new GoVisitor() {\n      @Override\n      public void visitAnonymousFieldDefinition(@NotNull GoAnonymousFieldDefinition o) {\n        if (!(o.getType() instanceof GoPointerType)) return;\n        GoTypeReferenceExpression reference = o.getTypeReferenceExpression();\n        GoType goType = reference != null ? reference.resolveType() : null;\n        if (!(goType instanceof GoSpecType)) return;\n\n        if (!(((GoSpecType)goType).getType() instanceof GoInterfaceType)) return;\n\n        holder.registerProblem(o, \"Embedded type cannot be a pointer to interface\", ProblemHighlightType.GENERIC_ERROR_OR_WARNING);\n      }\n    };\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/GoEmptyDeclarationInspection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.GoDocumentationProvider;\nimport com.goide.psi.*;\nimport com.goide.quickfix.GoDeleteQuickFix;\nimport com.intellij.codeInspection.CleanupLocalInspectionTool;\nimport com.intellij.codeInspection.LocalInspectionToolSession;\nimport com.intellij.codeInspection.ProblemHighlightType;\nimport com.intellij.codeInspection.ProblemsHolder;\nimport com.intellij.psi.PsiComment;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport org.jetbrains.annotations.NotNull;\n\n\npublic class GoEmptyDeclarationInspection extends GoInspectionBase implements CleanupLocalInspectionTool {\n\n  public final static String QUICK_FIX_NAME = \"Delete empty declaration\";\n\n  @NotNull\n  @Override\n  protected GoVisitor buildGoVisitor(@NotNull ProblemsHolder holder, @NotNull LocalInspectionToolSession session) {\n    return new GoVisitor() {\n      @Override\n      public void visitConstDeclaration(@NotNull GoConstDeclaration o) {\n        visitDeclaration(o);\n      }\n\n      @Override\n      public void visitVarDeclaration(@NotNull GoVarDeclaration o) {\n        if (o.getParent() instanceof GoFile) {\n          visitDeclaration(o);\n        }\n      }\n\n      @Override\n      public void visitTypeDeclaration(@NotNull GoTypeDeclaration o) {\n        visitDeclaration(o);\n      }\n\n      @Override\n      public void visitImportDeclaration(@NotNull GoImportDeclaration o) {\n        visitDeclaration(o);\n      }\n\n      private void visitDeclaration (PsiElement o) {\n        if (o.getChildren().length == 0 &&\n            GoDocumentationProvider.getCommentsForElement(o instanceof GoImportDeclaration && o.getPrevSibling() == null ?\n                                                          o.getParent() : o).isEmpty() &&\n            PsiTreeUtil.findChildrenOfType(o, PsiComment.class).isEmpty()) {\n          holder.registerProblem(o, \"Empty declaration <code>#ref</code> #loc\", ProblemHighlightType.LIKE_UNUSED_SYMBOL,\n                                 new GoDeleteQuickFix(QUICK_FIX_NAME, o.getClass()));\n        }\n      }\n    };\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/GoExportedOwnDeclarationInspection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.psi.*;\nimport com.intellij.codeInspection.*;\nimport com.intellij.diagnostic.AttachmentFactory;\nimport com.intellij.openapi.command.WriteCommandAction;\nimport com.intellij.openapi.diagnostic.Logger;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.psi.PsiElement;\nimport org.jetbrains.annotations.NotNull;\n\n/**\n * Part of the golint tool\n * <p/>\n * https://github.com/golang/lint/blob/32a87160691b3c96046c0c678fe57c5bef761456/lint.go#L827\n */\npublic class GoExportedOwnDeclarationInspection extends GoInspectionBase {\n  public static final String QUICK_FIX_NAME = \"Extract to own declaration\";\n\n  @NotNull\n  @Override\n  protected GoVisitor buildGoVisitor(@NotNull ProblemsHolder holder, @NotNull LocalInspectionToolSession session) {\n    return new GoVisitor() {\n      @Override\n      public void visitConstDeclaration(@NotNull GoConstDeclaration o) {\n        if (o.getParent() instanceof GoFile) {\n          for (GoConstSpec spec : o.getConstSpecList()) {\n            boolean first = true;\n            for (GoConstDefinition constDefinition : spec.getConstDefinitionList()) {\n              if (!first && constDefinition.isPublic()) {\n                String errorText = \"Exported const <code>#ref</code> should have its own declaration #loc\";\n                holder.registerProblem(constDefinition, errorText, ProblemHighlightType.WEAK_WARNING, new ExtractConstantDefinitionFix());\n              }\n              first = false;\n            }\n          }\n        }\n      }\n\n      @Override\n      public void visitVarDeclaration(@NotNull GoVarDeclaration o) {\n        if (o.getParent() instanceof GoFile) {\n          for (GoVarSpec spec : o.getVarSpecList()) {\n            boolean first = true;\n            for (GoVarDefinition varDefinition : spec.getVarDefinitionList()) {\n              if (!first && varDefinition.isPublic()) {\n                String errorText = \"Exported variable <code>#ref</code> should have its own declaration #loc\";\n                holder.registerProblem(varDefinition, errorText, ProblemHighlightType.WEAK_WARNING, new ExtractVarDefinitionFix());\n              }\n              first = false;\n            }\n          }\n        }\n      }\n    };\n  }\n\n  private static class ExtractConstantDefinitionFix extends LocalQuickFixBase {\n    private static final Logger LOG = Logger.getInstance(ExtractConstantDefinitionFix.class);\n\n    ExtractConstantDefinitionFix() {\n      super(QUICK_FIX_NAME);\n    }\n\n    @Override\n    public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {\n      PsiElement element = descriptor.getPsiElement();\n      if (!element.isValid() || !(element instanceof GoConstDefinition)) {\n        return;\n      }\n      String name = ((GoConstDefinition)element).getName();\n      if (StringUtil.isEmpty(name)) {\n        return;\n      }\n      GoType type = ((GoConstDefinition)element).findSiblingType();\n      GoExpression value = ((GoConstDefinition)element).getValue();\n      WriteCommandAction.runWriteCommandAction(project, () -> {\n        PsiElement parent = element.getParent();\n        PsiElement grandParent = parent != null ? parent.getParent() : null;\n        if (parent instanceof GoConstSpec && grandParent instanceof GoConstDeclaration) {\n          if (!parent.isValid() || ((GoConstSpec)parent).getConstDefinitionList().indexOf(element) <= 0) {\n            return;\n          }\n          String typeText = type != null ? type.getText() : \"\";\n          String valueText = value != null ? value.getText() : \"\";\n          ((GoConstSpec)parent).deleteDefinition((GoConstDefinition)element);\n          if (grandParent.isValid()) {\n            ((GoConstDeclaration)grandParent).addSpec(name, typeText, valueText, (GoConstSpec)parent);\n            return;\n          }\n        }\n        LOG.error(\"Cannot run quick fix\", AttachmentFactory.createAttachment(element.getContainingFile().getVirtualFile()));\n      });\n    }\n  }\n\n  private static class ExtractVarDefinitionFix extends LocalQuickFixBase {\n    private static final Logger LOG = Logger.getInstance(ExtractVarDefinitionFix.class);\n\n    ExtractVarDefinitionFix() {\n      super(QUICK_FIX_NAME);\n    }\n\n    @Override\n    public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {\n      PsiElement element = descriptor.getPsiElement();\n      if (!element.isValid() || !(element instanceof GoVarDefinition)) {\n        return;\n      }\n      String name = ((GoVarDefinition)element).getName();\n      if (StringUtil.isEmpty(name)) {\n        return;\n      }\n      GoType type = ((GoVarDefinition)element).findSiblingType();\n      GoExpression value = ((GoVarDefinition)element).getValue();\n      WriteCommandAction.runWriteCommandAction(project, () -> {\n        PsiElement parent = element.getParent();\n        PsiElement grandParent = parent != null ? parent.getParent() : null;\n        if (parent instanceof GoVarSpec && grandParent instanceof GoVarDeclaration) {\n          if (!parent.isValid() || ((GoVarSpec)parent).getVarDefinitionList().indexOf(element) <= 0) {\n            return;\n          }\n          String typeText = type != null ? type.getText() : \"\";\n          String valueText = value != null ? value.getText() : \"\";\n          ((GoVarSpec)parent).deleteDefinition((GoVarDefinition)element);\n          if (grandParent.isValid()) {\n            ((GoVarDeclaration)grandParent).addSpec(name, typeText, valueText, (GoVarSpec)parent);\n            return;\n          }\n        }\n        LOG.error(\"Cannot run quick fix\", AttachmentFactory.createAttachment(element.getContainingFile().getVirtualFile()));\n      });\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/GoFileIgnoredByBuildToolNotificationProvider.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.GoFileType;\nimport com.goide.project.GoModuleSettings;\nimport com.goide.util.GoUtil;\nimport com.intellij.ide.util.PropertiesComponent;\nimport com.intellij.openapi.fileEditor.FileEditor;\nimport com.intellij.openapi.fileEditor.FileEditorManager;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.module.ModuleUtilCore;\nimport com.intellij.openapi.project.DumbAware;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.Key;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.openapi.vfs.VirtualFileManager;\nimport com.intellij.openapi.vfs.newvfs.BulkFileListener;\nimport com.intellij.openapi.vfs.newvfs.events.VFileEvent;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.PsiManager;\nimport com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtil;\nimport com.intellij.ui.EditorNotificationPanel;\nimport com.intellij.ui.EditorNotifications;\nimport com.intellij.util.containers.ContainerUtil;\nimport com.intellij.util.messages.MessageBusConnection;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.List;\nimport java.util.Set;\n\npublic class GoFileIgnoredByBuildToolNotificationProvider extends EditorNotifications.Provider<EditorNotificationPanel>\n  implements DumbAware {\n\n  private static final Key<EditorNotificationPanel> KEY = Key.create(\"Go file ignored by build tool\");\n  private static final String DO_NOT_SHOW_NOTIFICATION_ABOUT_IGNORE_BY_BUILD_TOOL = \"DO_NOT_SHOW_NOTIFICATION_ABOUT_IGNORE_BY_BUILD_TOOL\";\n\n  private final Project myProject;\n\n  public GoFileIgnoredByBuildToolNotificationProvider(@NotNull Project project,\n                                                      @NotNull EditorNotifications notifications,\n                                                      @NotNull FileEditorManager fileEditorManager) {\n    myProject = project;\n    MessageBusConnection connection = myProject.getMessageBus().connect(myProject);\n    connection.subscribe(GoModuleSettings.TOPIC, module -> notifications.updateAllNotifications());\n    connection.subscribe(VirtualFileManager.VFS_CHANGES, new BulkFileListener.Adapter() {\n      @Override\n      public void after(@NotNull List<? extends VFileEvent> events) {\n        if (!myProject.isDisposed()) {\n          Set<VirtualFile> openFiles = ContainerUtil.newHashSet(fileEditorManager.getSelectedFiles());\n          for (VFileEvent event : events) {\n            VirtualFile file = event.getFile();\n            if (file != null && openFiles.contains(file)) {\n              notifications.updateNotifications(file);\n            }\n          }\n        }\n      }\n    });\n  }\n\n  @NotNull\n  @Override\n  public Key<EditorNotificationPanel> getKey() {\n    return KEY;\n  }\n\n  @Override\n  public EditorNotificationPanel createNotificationPanel(@NotNull VirtualFile file, @NotNull FileEditor fileEditor) {\n    if (file.getFileType() == GoFileType.INSTANCE) {\n      PsiFile psiFile = PsiManager.getInstance(myProject).findFile(file);\n      if (InjectedLanguageUtil.findInjectionHost(psiFile) != null) {\n        return null;\n      }\n      Module module = psiFile != null ? ModuleUtilCore.findModuleForPsiElement(psiFile) : null;\n      if (GoUtil.fileToIgnore(file.getName())) {\n        if (!PropertiesComponent.getInstance().getBoolean(DO_NOT_SHOW_NOTIFICATION_ABOUT_IGNORE_BY_BUILD_TOOL, false)) {\n          return createIgnoredByBuildToolPanel(myProject, file);\n        }\n      }\n      else if (module != null && !GoUtil.matchedForModuleBuildTarget(psiFile, module)) {\n        return createMismatchedTargetPanel(module, file);\n      }\n    }\n    return null;\n  }\n\n  private static EditorNotificationPanel createIgnoredByBuildToolPanel(@NotNull Project project, @NotNull VirtualFile file) {\n    EditorNotificationPanel panel = new EditorNotificationPanel();\n    String fileName = file.getName();\n    panel.setText(\"'\" + fileName + \"' will be ignored by build tool since its name starts with '\" + fileName.charAt(0) + \"'\");\n    panel.createActionLabel(\"Do not show again\", () -> {\n      PropertiesComponent.getInstance().setValue(DO_NOT_SHOW_NOTIFICATION_ABOUT_IGNORE_BY_BUILD_TOOL, true);\n      EditorNotifications.getInstance(project).updateAllNotifications();\n    });\n    return panel;\n  }\n\n  @NotNull\n  private static EditorNotificationPanel createMismatchedTargetPanel(@NotNull Module module, @NotNull VirtualFile file) {\n    EditorNotificationPanel panel = new EditorNotificationPanel();\n    panel.setText(\"'\" + file.getName() + \"' doesn't match to target system. File will be ignored by build tool\");\n    panel.createActionLabel(\"Edit Go project settings\", () -> GoModuleSettings.showModulesConfigurable(module));\n    return panel;\n  }\n}"
  },
  {
    "path": "src/com/goide/inspections/GoFunctionCallInspection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.psi.*;\nimport com.goide.psi.impl.GoPsiImplUtil;\nimport com.intellij.codeInspection.LocalInspectionToolSession;\nimport com.intellij.codeInspection.ProblemsHolder;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.List;\n\npublic class GoFunctionCallInspection extends GoInspectionBase {\n  @NotNull\n  @Override\n  protected GoVisitor buildGoVisitor(@NotNull ProblemsHolder holder, @NotNull LocalInspectionToolSession session) {\n    return new GoVisitor() {\n      @Override\n      public void visitCallExpr(@NotNull GoCallExpr o) {\n        super.visitCallExpr(o);\n        PsiElement resolve = GoPsiImplUtil.resolveCallRaw(o); \n        GoExpression expression = o.getExpression();\n        if (resolve != null && expression instanceof GoReferenceExpression) {\n          List<GoExpression> list = o.getArgumentList().getExpressionList();\n          int actualSize = list.size();\n          if (resolve instanceof GoTypeSpec && actualSize != 1) {\n            String message = String.format(\"%sto conversion to %s: %s.\", actualSize == 0 ? \"Missing argument \" : \"Too many arguments \",\n                                           expression.getText(), o.getText());\n            holder.registerProblem(o, message);\n          }\n          else if (resolve instanceof GoSignatureOwner) {\n            GoSignature signature = ((GoSignatureOwner)resolve).getSignature();\n            if (signature == null) return;\n            int expectedSize = 0;\n            GoParameters parameters = signature.getParameters();\n            for (GoParameterDeclaration declaration : parameters.getParameterDeclarationList()) {\n              if (declaration.isVariadic() && actualSize >= expectedSize) return;\n              int size = declaration.getParamDefinitionList().size();\n              expectedSize += size == 0 ? 1 : size;\n            }\n\n            if (actualSize == 1) {\n              GoExpression first = ContainerUtil.getFirstItem(list);\n              GoSignatureOwner firstResolve = GoPsiImplUtil.resolveCall(first);\n              if (firstResolve != null) {\n                actualSize = GoInspectionUtil.getFunctionResultCount(firstResolve);\n              }\n            }\n\n            GoReferenceExpression qualifier = ((GoReferenceExpression)expression).getQualifier();\n            boolean isMethodExpr = qualifier != null && qualifier.resolve() instanceof GoTypeSpec;\n            if (isMethodExpr) actualSize -= 1; // todo: a temp workaround for method specs\n\n            if (actualSize == expectedSize) return;\n\n            String tail = \" arguments in call to \" + expression.getText();\n            holder.registerProblem(o.getArgumentList(), (actualSize > expectedSize ? \"too many\" : \"not enough\") + tail);\n          }\n        }\n      }\n    };\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/GoFunctionVariadicParameterInspection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.psi.*;\nimport com.goide.quickfix.GoDeleteQuickFix;\nimport com.intellij.codeInspection.LocalInspectionToolSession;\nimport com.intellij.codeInspection.ProblemHighlightType;\nimport com.intellij.codeInspection.ProblemsHolder;\nimport com.intellij.psi.PsiElement;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.List;\n\nimport static com.goide.GoTypes.TRIPLE_DOT;\n\npublic class GoFunctionVariadicParameterInspection extends GoInspectionBase {\n  private static final GoDeleteQuickFix DELETE_QUICK_FIX = new GoDeleteQuickFix(\"Delete ...\", TRIPLE_DOT);\n\n  @NotNull\n  @Override\n  protected GoVisitor buildGoVisitor(@NotNull ProblemsHolder holder, @NotNull LocalInspectionToolSession session) {\n    return new GoVisitor() {\n      @Override\n      public void visitCompositeElement(@NotNull GoCompositeElement o) {\n        if (o instanceof GoSignatureOwner) {\n          GoSignature signature = ((GoSignatureOwner)o).getSignature();\n          if (signature != null) {\n            checkResult(signature, holder);\n            checkParameters(signature, holder);\n          }\n        }\n      }\n    };\n  }\n\n  private static void checkResult(@NotNull GoSignature o, @NotNull ProblemsHolder holder) {\n    GoResult result = o.getResult();\n    if (result == null) return;\n    GoParameters parameters = result.getParameters();\n    if (parameters == null) return;\n    for (GoParameterDeclaration declaration : parameters.getParameterDeclarationList()) {\n      PsiElement dot = declaration.getTripleDot();\n      if (dot != null) {\n        holder.registerProblem(dot, \"Cannot use <code>...</code> in output argument list\", ProblemHighlightType.GENERIC_ERROR_OR_WARNING,\n                               DELETE_QUICK_FIX);\n      }\n    }\n  }\n\n  private static void checkParameters(@NotNull GoSignature o, @NotNull ProblemsHolder holder) {\n    GoParameters parameters = o.getParameters();\n    List<GoParameterDeclaration> list = parameters.getParameterDeclarationList();\n    int size = list.size();\n    for (int i = 0; i < size; i++) {\n      GoParameterDeclaration declaration = list.get(i);\n      PsiElement dot = declaration.getTripleDot();\n      if (dot != null) {\n        if (declaration.getParamDefinitionList().size() > 1 || i != size - 1) {\n          holder.registerProblem(dot, \"Can only use <code>...</code> as final argument in list\", ProblemHighlightType.GENERIC_ERROR_OR_WARNING,\n                                 DELETE_QUICK_FIX);\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/GoImportUsedAsNameInspection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.psi.*;\nimport com.goide.quickfix.GoRenameQuickFix;\nimport com.intellij.codeInspection.LocalInspectionToolSession;\nimport com.intellij.codeInspection.ProblemHighlightType;\nimport com.intellij.codeInspection.ProblemsHolder;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.psi.ElementDescriptionUtil;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.usageView.UsageViewTypeLocation;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoImportUsedAsNameInspection extends GoInspectionBase {\n  @NotNull\n  @Override\n  protected GoVisitor buildGoVisitor(@NotNull ProblemsHolder holder, @NotNull LocalInspectionToolSession session) {\n    return new GoVisitor() {\n      @Override\n      public void visitTypeSpec(@NotNull GoTypeSpec o) {\n        super.visitTypeSpec(o);\n        check(o, holder);\n      }\n\n      @Override\n      public void visitConstDefinition(@NotNull GoConstDefinition o) {\n        super.visitConstDefinition(o);\n        check(o, holder);\n      }\n\n      @Override\n      public void visitFunctionDeclaration(@NotNull GoFunctionDeclaration o) {\n        super.visitFunctionDeclaration(o);\n        check(o, holder);\n      }\n\n      @Override\n      public void visitVarDefinition(@NotNull GoVarDefinition o) {\n        super.visitVarDefinition(o);\n        check(o, holder);\n      }\n    };\n  }\n\n  private static void check(@NotNull GoNamedElement element, @NotNull ProblemsHolder holder) {\n    String name = element.getName();\n    if (StringUtil.isNotEmpty(name) &&\n        !\"_\".equals(name) &&\n        element.getContainingFile().getImportMap().containsKey(name)) {\n      registerProblem(holder, element);\n    }\n  }\n\n  private static void registerProblem(@NotNull ProblemsHolder holder, @NotNull GoNamedElement element) {\n    PsiElement identifier = element.getIdentifier();\n    if (identifier != null) {\n      String elementDescription = ElementDescriptionUtil.getElementDescription(element, UsageViewTypeLocation.INSTANCE);\n      String message = StringUtil.capitalize(elementDescription) + \" <code>#ref</code> collides with imported package name #loc\";\n      holder.registerProblem(identifier, message, ProblemHighlightType.GENERIC_ERROR_OR_WARNING, new GoRenameQuickFix(element));\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/GoInfiniteForInspection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.psi.*;\nimport com.goide.quickfix.GoReplaceWithSelectStatementQuickFix;\nimport com.intellij.codeInspection.LocalInspectionToolSession;\nimport com.intellij.codeInspection.ProblemHighlightType;\nimport com.intellij.codeInspection.ProblemsHolder;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoInfiniteForInspection extends GoInspectionBase {\n  @NotNull\n  @Override\n  protected GoVisitor buildGoVisitor(@NotNull ProblemsHolder holder, @NotNull LocalInspectionToolSession session) {\n    return new GoVisitor() {\n      @Override\n      public void visitForStatement(@NotNull GoForStatement o) {\n        super.visitForStatement(o);\n\n        if (o.getExpression() == null &&\n            isEmpty(o.getBlock()) &&\n            !hasRangeClause(o.getRangeClause()) &&\n            !hasClause(o.getForClause())) {\n          holder.registerProblem(o, \"Infinite for loop\", ProblemHighlightType.GENERIC_ERROR_OR_WARNING, new GoReplaceWithSelectStatementQuickFix());\n        }\n      }\n    };\n  }\n\n  private static boolean isEmpty(@Nullable GoBlock block) {\n    return block != null && block.getStatementList().isEmpty();\n  }\n\n  private static boolean hasRangeClause(@Nullable GoRangeClause rangeClause) {\n    return rangeClause != null && !rangeClause.getExpressionList().isEmpty();\n  }\n\n  private static boolean hasClause(@Nullable GoForClause forClause) {\n    return forClause != null && !forClause.getStatementList().isEmpty();\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/GoInspectionBase.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.psi.GoFile;\nimport com.goide.psi.GoVisitor;\nimport com.goide.psi.impl.GoPsiImplUtil;\nimport com.intellij.codeInspection.*;\nimport com.intellij.openapi.module.ModuleUtilCore;\nimport com.intellij.psi.PsiElementVisitor;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.util.ObjectUtils;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nabstract public class GoInspectionBase extends LocalInspectionTool {\n  protected static final GoVisitor DUMMY_VISITOR = new GoVisitor() { };\n\n  @NotNull\n  @Override\n  public final PsiElementVisitor buildVisitor(@NotNull ProblemsHolder holder, boolean isOnTheFly, @NotNull LocalInspectionToolSession session) {\n    GoFile file = ObjectUtils.tryCast(session.getFile(), GoFile.class);\n    return file != null && GoPsiImplUtil.allowed(file, null, ModuleUtilCore.findModuleForPsiElement(file))\n           ? buildGoVisitor(holder, session)\n           : DUMMY_VISITOR;\n  }\n\n  @NotNull\n  @Override\n  public final PsiElementVisitor buildVisitor(@NotNull ProblemsHolder holder, boolean isOnTheFly) {\n    throw new IllegalStateException();\n  }\n\n  @Nullable\n  @Override\n  public final ProblemDescriptor[] checkFile(@NotNull PsiFile file, @NotNull InspectionManager manager, boolean isOnTheFly) {\n    throw new IllegalStateException();\n  }\n\n  @NotNull\n  protected GoVisitor buildGoVisitor(@NotNull ProblemsHolder holder, @NotNull LocalInspectionToolSession session) {\n    return new GoVisitor() {\n      @Override\n      public void visitFile(PsiFile file) {\n        checkFile((GoFile)file, holder);\n      }\n    };\n  }\n\n  protected void checkFile(@NotNull GoFile file, @NotNull ProblemsHolder problemsHolder) {\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/GoInspectionUtil.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.psi.*;\nimport com.goide.psi.impl.GoPsiImplUtil;\nimport com.intellij.psi.PsiElement;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.List;\n\npublic class GoInspectionUtil {\n  public static final int UNKNOWN_COUNT = -1;\n\n  private GoInspectionUtil() {}\n\n  public static int getExpressionResultCount(GoExpression call) {\n    if (call instanceof GoLiteral || call instanceof GoStringLiteral || call instanceof GoBinaryExpr ||\n        call instanceof GoUnaryExpr && ((GoUnaryExpr)call).getSendChannel() == null || call instanceof GoBuiltinCallExpr ||\n        call instanceof GoCompositeLit || call instanceof GoIndexOrSliceExpr || call instanceof GoFunctionLit) {\n      return 1;\n    }\n    if (call instanceof GoParenthesesExpr) {\n      return getExpressionResultCount(((GoParenthesesExpr)call).getExpression());\n    }\n    if (call instanceof GoTypeAssertionExpr) {\n      return getTypeAssertionResultCount((GoTypeAssertionExpr)call);\n    }\n    if (GoPsiImplUtil.isConversionExpression(call)) {\n      return 1;\n    }\n    if (call instanceof GoCallExpr) {\n      return getFunctionResultCount((GoCallExpr)call);\n    }\n    if (call instanceof GoReferenceExpression) {\n      // todo: always 1?\n      PsiElement resolve = ((GoReferenceExpression)call).resolve();\n      if (resolve instanceof GoVarDefinition || resolve instanceof GoParamDefinition || resolve instanceof GoReceiver) return 1;\n    }\n    return UNKNOWN_COUNT;\n  }\n\n  private static int getTypeAssertionResultCount(@NotNull GoTypeAssertionExpr expression) { // todo: ???\n    PsiElement parent = expression.getParent();\n    if (parent instanceof GoAssignmentStatement) {\n      // TODO: get expressions and identifiers of assign statement\n      return UNKNOWN_COUNT;\n    }\n\n    if (!(parent instanceof GoVarSpec)) {\n      return 1;\n    }\n\n    List<GoVarDefinition> identifiers = ((GoVarSpec)parent).getVarDefinitionList();\n    List<GoExpression> expressions = ((GoVarSpec)parent).getRightExpressionsList();\n    // if the type assertion is the only expression, and there are two variables.\n    // The result of the type assertion is a pair of values with types (T, bool)\n    if (identifiers.size() == 2 && expressions.size() == 1) {\n      return 2;\n    }\n\n    return 1;\n  }\n\n  public static int getFunctionResultCount(@NotNull GoCallExpr call) {\n    GoSignatureOwner signatureOwner = GoPsiImplUtil.resolveCall(call);\n    return signatureOwner == null ? UNKNOWN_COUNT : getFunctionResultCount(signatureOwner);\n  }\n  \n  public static int getFunctionResultCount(@NotNull GoSignatureOwner function) {\n    int count = 0;\n    GoSignature signature = function.getSignature();\n    GoResult result = signature != null ? signature.getResult() : null;\n    GoParameters parameters = result != null ? result.getParameters() : null;\n    if (parameters != null) {\n      for (GoParameterDeclaration p : parameters.getParameterDeclarationList()) {\n        count += Math.max(p.getParamDefinitionList().size(), 1);\n      }\n      return count;\n    }\n    if (result != null) {\n      GoType type = result.getType();\n      if (type instanceof GoTypeList) return ((GoTypeList)type).getTypeList().size();\n      if (type != null) return 1;\n    }\n    return count;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/GoInvalidPackageImportInspection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.GoConstants;\nimport com.goide.project.GoVendoringUtil;\nimport com.goide.psi.GoFile;\nimport com.goide.psi.GoImportSpec;\nimport com.goide.psi.impl.imports.GoImportReference;\nimport com.goide.quickfix.GoDeleteImportQuickFix;\nimport com.goide.quickfix.GoDisableVendoringInModuleQuickFix;\nimport com.goide.runconfig.testing.GoTestFinder;\nimport com.goide.sdk.GoPackageUtil;\nimport com.goide.sdk.GoSdkService;\nimport com.goide.sdk.GoSdkUtil;\nimport com.intellij.codeInsight.intention.HighPriorityAction;\nimport com.intellij.codeInspection.LocalQuickFixBase;\nimport com.intellij.codeInspection.ProblemDescriptor;\nimport com.intellij.codeInspection.ProblemsHolder;\nimport com.intellij.openapi.command.WriteCommandAction;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.module.ModuleUtilCore;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.openapi.vfs.VfsUtilCore;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.psi.ElementManipulators;\nimport com.intellij.psi.PsiDirectory;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiReference;\nimport com.intellij.util.ObjectUtils;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.Collection;\nimport java.util.Set;\n\npublic class GoInvalidPackageImportInspection extends GoInspectionBase {\n  public static final String DELETE_ALIAS_QUICK_FIX_NAME = \"Delete alias\";\n\n  @Override\n  protected void checkFile(@NotNull GoFile file, @NotNull ProblemsHolder problemsHolder) {\n    Module module = ModuleUtilCore.findModuleForPsiElement(file);\n    VirtualFile sdkHome = GoSdkUtil.getSdkSrcDir(file.getProject(), module);\n    boolean supportsVendoring = GoVendoringUtil.isVendoringEnabled(module);\n    String sdkVersion = GoSdkService.getInstance(file.getProject()).getSdkVersion(module);\n    boolean supportsInternalPackages = GoVendoringUtil.supportsInternalPackages(sdkVersion);\n    boolean supportsInternalPackagesInSdk = sdkHome != null && GoVendoringUtil.supportsSdkInternalPackages(sdkVersion);\n\n    for (GoImportSpec importSpec : file.getImports()) {\n      if (importSpec.isCImport()) {\n        PsiElement dot = importSpec.getDot();\n        if (dot != null) {\n          problemsHolder.registerProblem(importSpec, \"Cannot rename import `C`\", new GoDeleteImportSpecAlias(),\n                                         new GoDeleteImportQuickFix());\n        }\n        PsiElement identifier = importSpec.getIdentifier();\n        if (identifier != null) {\n          problemsHolder.registerProblem(importSpec, \"Cannot import 'builtin' package\", new GoDeleteImportSpecAlias(),\n                                         new GoDeleteImportQuickFix());\n        }\n        continue;\n      }\n\n      PsiDirectory resolve = importSpec.getImportString().resolve();\n      if (resolve != null) {\n        if (GoPackageUtil.isBuiltinPackage(resolve)) {\n          problemsHolder.registerProblem(importSpec, \"Cannot import 'builtin' package\", new GoDeleteImportQuickFix());\n        }\n        Collection<String> packagesInDirectory = GoPackageUtil.getAllPackagesInDirectory(resolve, module, true);\n        if (packagesInDirectory.isEmpty()) {\n          problemsHolder.registerProblem(importSpec, \"'\" + resolve.getVirtualFile().getPath() + \"' has no buildable Go source files\",\n                                         new GoDeleteImportQuickFix());\n          continue;\n        }\n        if (!GoTestFinder.isTestFile(file) && packagesInDirectory.size() == 1 && packagesInDirectory.contains(GoConstants.MAIN)) {\n          problemsHolder.registerProblem(importSpec, \"'\" + importSpec.getPath() + \"' is a program, not an importable package\",\n                                         new GoDeleteImportQuickFix());\n          continue;\n        }\n        if (packagesInDirectory.size() > 1) {\n          problemsHolder.registerProblem(importSpec, \"Found several packages [\" + StringUtil.join(packagesInDirectory, \", \") + \"] in '\" +\n                                                     resolve.getVirtualFile().getPath() + \"'\", new GoDeleteImportQuickFix());\n          continue;\n        }\n\n        VirtualFile contextFile = file.getVirtualFile();\n        VirtualFile resolvedFile = resolve.getVirtualFile();\n\n        boolean resolvedToSdk = sdkHome != null && VfsUtilCore.isAncestor(sdkHome, resolvedFile, false);\n        boolean validateInternal = supportsInternalPackages || supportsInternalPackagesInSdk && resolvedToSdk;\n        if (supportsVendoring || validateInternal || resolvedToSdk) {\n          Set<VirtualFile> sourceRoots = GoSdkUtil.getSourcesPathsToLookup(file.getProject(), module);\n          for (PsiReference reference : importSpec.getImportString().getReferences()) {\n            if (reference instanceof GoImportReference) {\n              String canonicalText = reference.getCanonicalText();\n              if (resolvedToSdk && GoConstants.TESTDATA_NAME.equals(canonicalText)) {\n                problemsHolder.registerProblem(importSpec, \"Use of testdata package from SDK is not allowed\", new GoDeleteImportQuickFix());\n                break;\n              }\n              else if (validateInternal && GoConstants.INTERNAL.equals(canonicalText)) {\n                if (GoSdkUtil.isUnreachableInternalPackage(resolvedFile, contextFile, sourceRoots)) {\n                  problemsHolder.registerProblem(importSpec, \"Use of internal package is not allowed\", new GoDeleteImportQuickFix());\n                  break;\n                }\n              }\n              else if (supportsVendoring && GoConstants.VENDOR.equals(canonicalText)) {\n                if (GoSdkUtil.isUnreachableVendoredPackage(resolvedFile, contextFile, sourceRoots)) {\n                  problemsHolder.registerProblem(importSpec, \"Use of vendored package is not allowed\",\n                                                 new GoDeleteImportQuickFix(), GoDisableVendoringInModuleQuickFix.create(module));\n                  break;\n                }\n                else {\n                  String vendoredImportPath = GoSdkUtil.getImportPath(resolve, true);\n                  if (vendoredImportPath != null) {\n                    problemsHolder.registerProblem(importSpec, \"Must be imported as '\" + vendoredImportPath + \"'\",\n                                                   new GoReplaceImportPath(vendoredImportPath),\n                                                   new GoDeleteImportQuickFix(), GoDisableVendoringInModuleQuickFix.create(module));\n                    break;\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n      else {\n        for (PsiReference reference : importSpec.getImportString().getReferences()) {\n          if (reference instanceof GoImportReference) {\n            if (((GoImportReference)reference).getFileReferenceSet().isAbsolutePathReference()) {\n              problemsHolder.registerProblem(importSpec, \"Cannot import absolute path\", new GoDeleteImportQuickFix());\n              break;\n            }\n          }\n        }\n      }\n    }\n  }\n\n  private static class GoDeleteImportSpecAlias extends LocalQuickFixBase {\n    protected GoDeleteImportSpecAlias() {\n      super(DELETE_ALIAS_QUICK_FIX_NAME);\n    }\n\n    @Override\n    public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {\n      GoImportSpec element = ObjectUtils.tryCast(descriptor.getPsiElement(), GoImportSpec.class);\n      if (element != null) {\n        WriteCommandAction.runWriteCommandAction(project, () -> {\n          PsiElement dot = element.getDot();\n          if (dot != null) {\n            dot.delete();\n            return;\n          }\n\n          PsiElement identifier = element.getIdentifier();\n          if (identifier != null) {\n            identifier.delete();\n          }\n        });\n      }\n    }\n  }\n\n  private static class GoReplaceImportPath extends LocalQuickFixBase implements HighPriorityAction {\n    @NotNull private final String myNewImportPath;\n\n    protected GoReplaceImportPath(@NotNull String newImportPath) {\n      super(\"Replace with '\" + newImportPath + \"'\");\n      myNewImportPath = newImportPath;\n    }\n\n    @Override\n    public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {\n      GoImportSpec element = ObjectUtils.tryCast(descriptor.getPsiElement(), GoImportSpec.class);\n      if (element != null) {\n        ElementManipulators.handleContentChange(element.getImportString(), myNewImportPath);\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/GoInvalidStringOrCharInspection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.psi.GoLiteral;\nimport com.goide.psi.GoStringLiteral;\nimport com.goide.psi.GoVisitor;\nimport com.intellij.codeInspection.LocalInspectionToolSession;\nimport com.intellij.codeInspection.ProblemsHolder;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.impl.source.tree.LeafPsiElement;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoInvalidStringOrCharInspection extends GoInspectionBase {\n  @NotNull\n  @Override\n  protected GoVisitor buildGoVisitor(@NotNull ProblemsHolder holder,\n                                     @SuppressWarnings({\"UnusedParameters\", \"For future\"}) @NotNull LocalInspectionToolSession session) {\n    return new GoVisitor() {\n\n      @Override\n      public void visitStringLiteral(@NotNull GoStringLiteral o) {\n        PsiElement s = o.getString();\n        if (s instanceof LeafPsiElement) {\n          int length = ((LeafPsiElement)s).getCachedLength();\n          if (length == 1 || ((LeafPsiElement)s).charAt(length - 1) != '\"') {\n            holder.registerProblem(s, \"New line in string\");\n          }\n        }\n      }\n\n      @Override\n      public void visitLiteral(@NotNull GoLiteral o) {\n        PsiElement c = o.getChar();\n        if (c instanceof LeafPsiElement) {\n          int length = ((LeafPsiElement)c).getCachedLength();\n          if (length == 3 && ((LeafPsiElement)c).charAt(1) == '\\'') {\n            holder.registerProblem(c, \"Empty character literal or unescaped ' in character literal\");\n          }\n          if (length < 3) {\n            holder.registerProblem(c, \"Missing '\");\n          }\n        }\n      }\n    };\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/GoMissingReturnInspection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.highlighting.exitpoint.GoBreakStatementExitPointHandler;\nimport com.goide.psi.*;\nimport com.goide.psi.impl.GoPsiImplUtil;\nimport com.intellij.codeInsight.template.Template;\nimport com.intellij.codeInsight.template.TemplateManager;\nimport com.intellij.codeInsight.template.impl.TemplateSettings;\nimport com.intellij.codeInspection.LocalInspectionToolSession;\nimport com.intellij.codeInspection.LocalQuickFix;\nimport com.intellij.codeInspection.LocalQuickFixAndIntentionActionOnPsiElement;\nimport com.intellij.codeInspection.ProblemsHolder;\nimport com.intellij.openapi.editor.Editor;\nimport com.intellij.openapi.editor.ScrollType;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.Collections;\nimport java.util.List;\n\npublic class GoMissingReturnInspection extends GoInspectionBase {\n  public static final String ADD_RETURN_STATEMENT_QUICK_FIX_NAME = \"Add return statement\";\n\n  private static void check(@Nullable GoSignature signature, @Nullable GoBlock block, @NotNull ProblemsHolder holder) {\n    if (block == null) return;\n    GoResult result = signature != null ? signature.getResult() : null;\n    if (result == null || result.isVoid() || isTerminating(block)) return;\n\n    PsiElement brace = block.getRbrace();\n    holder.registerProblem(brace == null ? block : brace, \"Missing return at end of function\",\n                           brace == null ? new LocalQuickFix[]{} : new LocalQuickFix[]{new AddReturnFix(block)});\n  }\n\n  // https://tip.golang.org/ref/spec#Terminating_statements\n  private static boolean isTerminating(@Nullable GoCompositeElement s) {\n    if (s instanceof GoReturnStatement || s instanceof GoGotoStatement) {\n      return true;\n    }\n    if (s instanceof GoSimpleStatement) {\n      GoLeftHandExprList list = ((GoSimpleStatement)s).getLeftHandExprList();\n      GoExpression expression = ContainerUtil.getFirstItem(list != null ? list.getExpressionList() : null);\n      if (expression instanceof GoCallExpr && GoPsiImplUtil.isPanic((GoCallExpr)expression)) return true;\n    }\n    else if (s instanceof GoBlock) {\n      return isTerminating(ContainerUtil.getLastItem(((GoBlock)s).getStatementList()));\n    }\n    else if (s instanceof GoIfStatement) {\n      GoBlock block = ((GoIfStatement)s).getBlock();\n      GoStatement st = ((GoIfStatement)s).getElseStatement();\n      return block != null && isTerminating(block) && st != null && isTerminating(st);\n    }\n    else if (s instanceof GoElseStatement) {\n      GoIfStatement ifStatement = ((GoElseStatement)s).getIfStatement();\n      if (ifStatement != null) return isTerminating(ifStatement);\n      GoBlock block = ((GoElseStatement)s).getBlock();\n      if (block != null) return isTerminating(block);\n      return false;\n    }\n    else if (s instanceof GoForStatement) {\n      GoForStatement f = (GoForStatement)s;\n      GoForClause forClause = f.getForClause();\n      if (forClause != null && forClause.getExpression() != null || f.getExpression() != null || f.getRangeClause() != null) return false;\n      GoBlock block = f.getBlock();\n      return block == null || !hasReferringBreakStatement(f);\n    }\n    else if (s instanceof GoExprSwitchStatement) {\n      return isTerminating((GoExprSwitchStatement)s, ((GoExprSwitchStatement)s).getExprCaseClauseList());\n    }\n    else if (s instanceof GoTypeSwitchStatement) {\n      return isTerminating((GoTypeSwitchStatement)s, ((GoTypeSwitchStatement)s).getTypeCaseClauseList());\n    }\n    else if (s instanceof GoSelectStatement) {\n      GoSelectStatement selectStatement = (GoSelectStatement)s;\n      for (GoCommClause clause : selectStatement.getCommClauseList()) {\n        List<GoStatement> statements = clause.getStatementList();\n        if (hasReferringBreakStatement(selectStatement)) return false;\n        if (!isTerminating(ContainerUtil.getLastItem(statements))) return false;\n      }\n      return true;\n    }\n    else if (s instanceof GoLabeledStatement) {\n      GoLabeledStatement labeledStatement = (GoLabeledStatement)s;\n      return isTerminating(labeledStatement.getStatement());\n    }\n    else if (s instanceof GoStatement && ((GoStatement)s).getBlock() != null) {\n      return isTerminating(((GoStatement)s).getBlock());\n    }\n    return false;\n  }\n\n  private static boolean isTerminating(@NotNull GoSwitchStatement switchStatement, @NotNull List<? extends GoCaseClause> clauses) {\n    boolean hasDefault = false;\n    for (GoCaseClause clause : clauses) {\n      hasDefault |= clause.getDefault() != null;\n      List<GoStatement> statements = clause.getStatementList();\n      if (hasReferringBreakStatement(switchStatement)) return false;\n      GoStatement last = ContainerUtil.getLastItem(statements);\n      if (!(last instanceof GoFallthroughStatement) && !isTerminating(last)) return false;\n    }\n    return hasDefault;\n  }\n\n  private static boolean hasReferringBreakStatement(@NotNull PsiElement breakStatementOwner) {\n    return !GoPsiImplUtil.goTraverser().withRoot(breakStatementOwner).traverse().filter(GoBreakStatement.class).filter(statement -> {\n      PsiElement owner = GoBreakStatementExitPointHandler.getBreakStatementOwnerOrResolve(statement);\n      if (breakStatementOwner.equals(owner)) {\n        return true;\n      }\n      if (owner instanceof GoLabelDefinition) {\n        PsiElement parent = owner.getParent();\n        if (parent instanceof GoLabeledStatement && breakStatementOwner.equals(((GoLabeledStatement)parent).getStatement())) {\n          return true;\n        }\n      }\n      return false;\n    }).isEmpty();\n  }\n\n  @NotNull\n  @Override\n  protected GoVisitor buildGoVisitor(@NotNull ProblemsHolder holder, @NotNull LocalInspectionToolSession session) {\n    return new GoVisitor() {\n      @Override\n      public void visitFunctionOrMethodDeclaration(@NotNull GoFunctionOrMethodDeclaration o) { // todo: extract common interface\n        check(o.getSignature(), o.getBlock(), holder);\n      }\n\n      @Override\n      public void visitFunctionLit(@NotNull GoFunctionLit o) {\n        check(o.getSignature(), o.getBlock(), holder);\n      }\n    };\n  }\n\n  private static class AddReturnFix extends LocalQuickFixAndIntentionActionOnPsiElement {\n    public AddReturnFix(@NotNull GoBlock block) {\n      super(block);\n    }\n\n    @NotNull\n    @Override\n    public String getText() {\n      return ADD_RETURN_STATEMENT_QUICK_FIX_NAME;\n    }\n\n    @NotNull\n    @Override\n    public String getFamilyName() {\n      return getName();\n    }\n\n    @Override\n    public void invoke(@NotNull Project project,\n                       @NotNull PsiFile file,\n                       @Nullable(\"is null when called from inspection\") Editor editor,\n                       @NotNull PsiElement startElement,\n                       @NotNull PsiElement endElement) {\n      if (!(file instanceof GoFile) || editor == null || !(startElement instanceof GoBlock)) return;\n\n      PsiElement brace = ((GoBlock)startElement).getRbrace();\n      if (brace == null) return;\n\n      Template template = TemplateSettings.getInstance().getTemplateById(\"go_lang_add_return\");\n      if (template == null) return;\n      int start = brace.getTextRange().getStartOffset();\n      editor.getCaretModel().moveToOffset(start);\n      editor.getScrollingModel().scrollToCaret(ScrollType.RELATIVE);\n      template.setToReformat(true);\n      TemplateManager.getInstance(project).startTemplate(editor, template, true, Collections.emptyMap(), null);\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/GoMixedNamedUnnamedParametersInspection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.psi.*;\nimport com.intellij.codeInspection.LocalInspectionToolSession;\nimport com.intellij.codeInspection.ProblemHighlightType;\nimport com.intellij.codeInspection.ProblemsHolder;\nimport com.intellij.openapi.progress.ProgressManager;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoMixedNamedUnnamedParametersInspection extends GoInspectionBase {\n  @NotNull\n  @Override\n  protected GoVisitor buildGoVisitor(@NotNull ProblemsHolder holder, @NotNull LocalInspectionToolSession session) {\n    return new GoVisitor() {\n      @Override\n      public void visitMethodDeclaration(@NotNull GoMethodDeclaration o) {\n        super.visitMethodDeclaration(o);\n        visitDeclaration(holder, o.getSignature(), \"Method\");\n      }\n\n      @Override\n      public void visitFunctionDeclaration(@NotNull GoFunctionDeclaration o) {\n        super.visitFunctionDeclaration(o);\n        visitDeclaration(holder, o.getSignature(), \"Function\");\n      }\n\n      @Override\n      public void visitFunctionLit(@NotNull GoFunctionLit o) {\n        super.visitFunctionLit(o);\n        visitDeclaration(holder, o.getSignature(), \"Closure\");\n      }\n    };\n  }\n\n  private static void visitDeclaration(@NotNull ProblemsHolder holder, @Nullable GoSignature signature, @NotNull String ownerType) {\n    if (signature == null) return;\n    GoParameters parameters = signature.getParameters();\n    visitParameterList(holder, parameters, ownerType, \"parameters\");\n\n    GoResult result = signature.getResult();\n    parameters = result != null ? result.getParameters() : null;\n    visitParameterList(holder, parameters, ownerType, \"return parameters\");\n  }\n\n  private static void visitParameterList(@NotNull ProblemsHolder holder, @Nullable GoParameters parameters,\n                                         @NotNull String ownerType, @NotNull String what) {\n\n    if (parameters == null || parameters.getParameterDeclarationList().isEmpty()) return;\n    boolean hasNamed = false;\n    boolean hasUnnamed = false;\n    for (GoParameterDeclaration parameterDeclaration : parameters.getParameterDeclarationList()) {\n      ProgressManager.checkCanceled();\n      if (parameterDeclaration.getParamDefinitionList().isEmpty()) {\n        hasUnnamed = true;\n      }\n      else {\n        hasNamed = true;\n      }\n\n      if (hasNamed && hasUnnamed) {\n        holder.registerProblem(parameters, ownerType + \" has both named and unnamed \" + what + \" <code>#ref</code> #loc\",\n                               ProblemHighlightType.GENERIC_ERROR_OR_WARNING);\n        return;\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/GoMultiplePackagesInspection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.GoConstants;\nimport com.goide.psi.GoFile;\nimport com.goide.psi.GoPackageClause;\nimport com.goide.quickfix.GoMultiplePackagesQuickFix;\nimport com.goide.sdk.GoPackageUtil;\nimport com.intellij.codeInspection.LocalQuickFix;\nimport com.intellij.codeInspection.ProblemsHolder;\nimport com.intellij.ide.scratch.ScratchFileType;\nimport com.intellij.psi.PsiDirectory;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.Collection;\n\npublic class GoMultiplePackagesInspection extends GoInspectionBase {\n  @Override\n  protected void checkFile(@NotNull GoFile file, @NotNull ProblemsHolder problemsHolder) {\n    if (((ScratchFileType)ScratchFileType.INSTANCE).isMyFileType(file.getVirtualFile())) return;\n    GoPackageClause packageClause = file.getPackage();\n    if (packageClause != null) {\n      String packageName = file.getPackageName();\n      if (packageName == null || packageName.equals(GoConstants.DOCUMENTATION)) return;\n      PsiDirectory dir = file.getContainingDirectory();\n      Collection<String> packages = GoPackageUtil.getAllPackagesInDirectory(dir, null, true);\n      packages.remove(GoConstants.DOCUMENTATION);\n      if (packages.size() > 1) {\n        Collection<LocalQuickFix> fixes = ContainerUtil.newArrayList();\n        if (problemsHolder.isOnTheFly()) {\n          fixes.add(new GoMultiplePackagesQuickFix(packageClause, packageName, packages, true));\n        }\n        else {\n          for (String name : packages) {\n            fixes.add(new GoMultiplePackagesQuickFix(packageClause, name, packages, false));\n          }\n        }\n        problemsHolder.registerProblem(packageClause, \"Multiple packages in directory\", fixes.toArray(new LocalQuickFix[fixes.size()]));\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/GoNoNewVariablesInspection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.psi.*;\nimport com.goide.psi.impl.GoElementFactory;\nimport com.goide.psi.impl.GoPsiImplUtil;\nimport com.intellij.codeInspection.LocalInspectionToolSession;\nimport com.intellij.codeInspection.LocalQuickFixBase;\nimport com.intellij.codeInspection.ProblemDescriptor;\nimport com.intellij.codeInspection.ProblemsHolder;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.TextRange;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiReference;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.List;\n\npublic class GoNoNewVariablesInspection extends GoInspectionBase {\n  public static final String QUICK_FIX_NAME = \"Replace with '='\";\n\n  @NotNull\n  @Override\n  protected GoVisitor buildGoVisitor(@NotNull ProblemsHolder holder, @NotNull LocalInspectionToolSession session) {\n    return new GoVisitor() {\n      @Override\n      public void visitShortVarDeclaration(@NotNull GoShortVarDeclaration o) {\n        visitVarDefinitionList(o, o.getVarDefinitionList());\n      }\n\n      @Override\n      public void visitRecvStatement(@NotNull GoRecvStatement o) {\n        visitVarDefinitionList(o, o.getVarDefinitionList());\n      }\n\n      @Override\n      public void visitRangeClause(@NotNull GoRangeClause o) {\n        visitVarDefinitionList(o, o.getVarDefinitionList());\n      }\n\n      private void visitVarDefinitionList(@NotNull PsiElement o, @NotNull List<GoVarDefinition> list) {\n        GoVarDefinition first = ContainerUtil.getFirstItem(list);\n        GoVarDefinition last = ContainerUtil.getLastItem(list);\n        if (first == null || last == null) return;\n        if (hasNonNewVariables(list)) {\n          TextRange textRange = TextRange.create(first.getStartOffsetInParent(), last.getStartOffsetInParent() + last.getTextLength());\n          holder.registerProblem(o, textRange, \"No new variables on left side of :=\", new MyLocalQuickFixBase());\n        }\n      }\n    };\n  }\n\n  public static boolean hasNonNewVariables(@NotNull List<GoVarDefinition> list) {\n    if (list.isEmpty()) return false;\n    for (GoVarDefinition def : list) {\n      if (def.isBlank()) continue;\n      PsiReference reference = def.getReference();\n      if (reference == null || reference.resolve() == null) return false;\n    }\n    return true;\n  }\n\n  public static void replaceWithAssignment(@NotNull Project project, @NotNull PsiElement element) {\n    if (element instanceof GoShortVarDeclaration) {\n      PsiElement parent = element.getParent();\n      if (parent instanceof GoSimpleStatement) {\n        String left = GoPsiImplUtil.joinPsiElementText(((GoShortVarDeclaration)element).getVarDefinitionList());\n        String right = GoPsiImplUtil.joinPsiElementText(((GoShortVarDeclaration)element).getRightExpressionsList());\n        parent.replace(GoElementFactory.createAssignmentStatement(project, left, right));\n      }\n    }\n    else if (element instanceof GoRangeClause) {\n      String left = GoPsiImplUtil.joinPsiElementText(((GoRangeClause)element).getVarDefinitionList());\n      GoExpression rangeExpression = ((GoRangeClause)element).getRangeExpression();\n      String right = rangeExpression != null ? rangeExpression.getText() : \"\";\n      element.replace(GoElementFactory.createRangeClauseAssignment(project, left, right));\n    }\n    else if (element instanceof GoRecvStatement) {\n      String left = GoPsiImplUtil.joinPsiElementText(((GoRecvStatement)element).getVarDefinitionList());\n      GoExpression recvExpression = ((GoRecvStatement)element).getRecvExpression();\n      String right = recvExpression != null ? recvExpression.getText() : \"\";\n      element.replace(GoElementFactory.createRecvStatementAssignment(project, left, right));\n    }\n  }\n\n  private static class MyLocalQuickFixBase extends LocalQuickFixBase {\n    public MyLocalQuickFixBase() {\n      super(QUICK_FIX_NAME);\n    }\n\n    @Override\n    public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {\n      PsiElement element = descriptor.getStartElement();\n      if (element.isValid()) {\n        replaceWithAssignment(project, element);\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/GoPlaceholderChecker.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.psi.GoFunctionOrMethodDeclaration;\nimport com.intellij.openapi.util.Pair;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.Collections;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Set;\n\nimport static com.goide.GoConstants.TESTING_PATH;\nimport static com.goide.inspections.GoPlaceholderChecker.PrintfArgumentType.*;\n\npublic class GoPlaceholderChecker {\n\n  // This holds the name of the known formatting functions and position of the string to be formatted\n  private static final Map<String, Integer> FORMATTING_FUNCTIONS = ContainerUtil.newHashMap(\n    Pair.pair(\"errorf\", 0),\n    Pair.pair(\"fatalf\", 0),\n    Pair.pair(\"fprintf\", 1),\n    Pair.pair(\"fscanf\", 1),\n    Pair.pair(\"logf\", 0),\n    Pair.pair(\"panicf\", 0),\n    Pair.pair(\"printf\", 0),\n    Pair.pair(\"scanf\", 0),\n    Pair.pair(\"skipf\", 0),\n    Pair.pair(\"sprintf\", 0),\n    Pair.pair(\"sscanf\", 1));\n\n  private static final Set<String> PRINTING_FUNCTIONS = ContainerUtil.newHashSet(\n    \"error\",\n    \"error\",\n    \"fatal\",\n    \"fprint\",\n    \"fprintln\",\n    \"log\",\n    \"panic\",\n    \"panicln\",\n    \"print\",\n    \"println\",\n    \"sprint\",\n    \"sprintln\"\n  );\n\n  protected enum PrintfArgumentType {\n    ANY(-1),\n    BOOL(1),\n    INT(2),\n    RUNE(3),\n    STRING(4),\n    FLOAT(5),\n    COMPLEX(6),\n    POINTER(7);\n\n    private int myMask;\n\n    PrintfArgumentType(int mask) {\n      myMask = mask;\n    }\n\n    public int getValue() {\n      return myMask;\n    }\n  }\n\n  enum PrintVerb {\n    Percent('%', \"\", 0),\n    b('b', \" -+.0\", INT.getValue() | FLOAT.getValue() | COMPLEX.getValue()),\n    c('c', \"-\", RUNE.getValue() | INT.getValue()),\n    d('d', \" -+.0\", INT.getValue()),\n    e('e', \" -+.0\", FLOAT.getValue() | COMPLEX.getValue()),\n    E('E', \" -+.0\", FLOAT.getValue() | COMPLEX.getValue()),\n    f('f', \" -+.0\", FLOAT.getValue() | COMPLEX.getValue()),\n    F('F', \" -+.0\", FLOAT.getValue() | COMPLEX.getValue()),\n    g('g', \" -+.0\", FLOAT.getValue() | COMPLEX.getValue()),\n    G('G', \" -+.0\", FLOAT.getValue() | COMPLEX.getValue()),\n    o('o', \" -+.0#\", INT.getValue()),\n    p('p', \"-#\", POINTER.getValue()),\n    q('q', \" -+.0#\", RUNE.getValue() | INT.getValue() | STRING.getValue()),\n    s('s', \" -+.0\", STRING.getValue()),\n    t('t', \"-\", BOOL.getValue()),\n    T('T', \"-\", ANY.getValue()),\n    U('U', \"-#\", RUNE.getValue() | INT.getValue()),\n    V('v', \" -+.0#\", ANY.getValue()),\n    x('x', \" -+.0#\", RUNE.getValue() | INT.getValue() | STRING.getValue()),\n    X('X', \" -+.0#\", RUNE.getValue() | INT.getValue() | STRING.getValue());\n\n    private char myVerb;\n    private String myFlags;\n    private int myMask;\n\n    PrintVerb(char verb, String flags, int mask) {\n      myVerb = verb;\n      myFlags = flags;\n      myMask = mask;\n    }\n\n    public char getVerb() {\n      return myVerb;\n    }\n\n    @NotNull\n    public String getFlags() {\n      return myFlags;\n    }\n\n    public int getMask() {\n      return myMask;\n    }\n\n    @Nullable\n    public static PrintVerb getByVerb(char verb) {\n      for (PrintVerb v : values()) {\n        if (verb == v.getVerb()) return v;\n      }\n      return null;\n    }\n  }\n\n  public static boolean isFormattingFunction(String functionName) {\n    return FORMATTING_FUNCTIONS.containsKey(functionName);\n  }\n\n  public static boolean isPrintingFunction(String functionName) {\n    return PRINTING_FUNCTIONS.contains(functionName);\n  }\n\n  static class Placeholder {\n    private final String placeholder;\n    private final int startPos;\n    private final State state;\n    private final PrintVerb verb;\n    private final List<Integer> arguments;\n    private final String flags;\n\n    enum State {\n      OK,\n      MISSING_VERB_AT_END,\n      ARGUMENT_INDEX_NOT_NUMERIC\n    }\n\n    Placeholder(State state, int startPos, String placeholder, String flags, List<Integer> arguments, PrintVerb verb) {\n      this.placeholder = placeholder;\n      this.startPos = startPos;\n      this.verb = verb;\n      this.state = state;\n      this.arguments = arguments;\n      this.flags = flags;\n    }\n\n    public String getPlaceholder() {\n      return placeholder;\n    }\n\n    public int getPosition() {\n      return arguments.get(arguments.size() - 1);\n    }\n\n    public State getState() {\n      return state;\n    }\n\n    public PrintVerb getVerb() {\n      return verb;\n    }\n\n    public List<Integer> getArguments() {\n      return arguments;\n    }\n\n    public String getFlags() {\n      return flags;\n    }\n\n    public int getStartPos() {\n      return startPos;\n    }\n  }\n\n  @NotNull\n  public static List<Placeholder> parsePrintf(@NotNull String placeholderText) {\n    List<Placeholder> placeholders = ContainerUtil.newArrayList();\n    int argNum = 1;\n    int w;\n    for (int i = 0; i < placeholderText.length(); i += w) {\n      w = 1;\n      if (placeholderText.charAt(i) == '%') {\n        FormatState state = parsePrintfVerb(placeholderText.substring(i), i, argNum);\n        w = state.format.length();\n\n        // We are not interested in %% which prints %\n        if (state.state == Placeholder.State.OK && state.verb == PrintVerb.Percent) {\n          // Special magic case for allowing things like %*% to pass (which are sadly valid expressions)\n          if (state.format.length() == 2) continue;\n        }\n\n        placeholders.add(state.toPlaceholder());\n\n        // We only consider ok states as valid to increase the number of arguments. Should we?\n        if (state.state != Placeholder.State.OK) continue;\n\n        if (!state.indexed) {\n          if (!state.argNums.isEmpty()) {\n            int maxArgNum = Collections.max(state.argNums);\n            if (argNum < maxArgNum) {\n              argNum = maxArgNum;\n            }\n          }\n        }\n        else {\n          argNum = state.argNums.get(state.argNums.size() - 1);\n        }\n        argNum++;\n      }\n    }\n\n    return placeholders;\n  }\n\n  protected static int getPlaceholderPosition(@NotNull GoFunctionOrMethodDeclaration function) {\n    Integer position = FORMATTING_FUNCTIONS.get(StringUtil.toLowerCase(function.getName()));\n    if (position != null) {\n      String importPath = function.getContainingFile().getImportPath(false);\n      if (\"fmt\".equals(importPath) || \"log\".equals(importPath) || TESTING_PATH.equals(importPath)) {\n        return position;\n      }\n    }\n    return -1;\n  }\n\n  private static class FormatState {\n    @Nullable private PrintVerb verb;   // the format verb: 'd' for \"%d\"\n    private String format;              // the full format directive from % through verb, \"%.3d\"\n    @NotNull private String flags = \"\"; // the list of # + etc\n    private boolean indexed;            // whether an indexing expression appears: %[1]d\n    private final int startPos;         // index of the first character of the placeholder in the formatting string\n\n    // the successive argument numbers that are consumed, adjusted to refer to actual arg in call\n    private final List<Integer> argNums = ContainerUtil.newArrayList();\n\n    // Keep track of the parser state\n    private Placeholder.State state;\n\n    // Used only during parse.\n    private int argNum;           // Which argument we're expecting to format now\n    private int nBytes = 1;       // number of bytes of the format string consumed\n\n    FormatState(String format, int startPos, int argNum) {\n      this.format = format;\n      this.startPos = startPos;\n      this.argNum = argNum;\n    }\n\n    @NotNull\n    private Placeholder toPlaceholder() {\n      return new Placeholder(state, startPos, format, flags, argNums, verb);\n    }\n  }\n\n  @NotNull\n  private static FormatState parsePrintfVerb(@NotNull String format, int startPos, int argNum) {\n    FormatState state = new FormatState(format, startPos, argNum);\n\n    parseFlags(state);\n\n    if (!parseIndex(state)) return state;\n\n    // There may be a width\n    if (!parseNum(state)) return state;\n\n    if (!parsePrecision(state)) return state;\n\n    // Now a verb, possibly prefixed by an index (which we may already have)\n    if (!parseIndex(state)) return state;\n\n    if (state.nBytes == format.length()) {\n      state.state = Placeholder.State.MISSING_VERB_AT_END;\n      return state;\n    }\n\n    state.verb = PrintVerb.getByVerb(state.format.charAt(state.nBytes));\n    if (state.verb != null && state.verb != PrintVerb.Percent) state.argNums.add(state.argNum);\n    state.nBytes++;\n    state.format = state.format.substring(0, state.nBytes);\n    state.state = Placeholder.State.OK;\n\n    return state;\n  }\n\n  public static boolean hasPlaceholder(@Nullable String formatString) {\n    return formatString != null && StringUtil.containsChar(formatString, '%');\n  }\n\n  private static void parseFlags(@NotNull FormatState state) {\n    String knownFlags = \"#0+- \";\n    StringBuilder flags = new StringBuilder(state.flags);\n    while (state.nBytes < state.format.length()) {\n      if (StringUtil.containsChar(knownFlags, state.format.charAt(state.nBytes))) {\n        flags.append(state.format.charAt(state.nBytes));\n      }\n      else {\n        state.flags = flags.toString();\n        return;\n      }\n      state.nBytes++;\n    }\n    state.flags = flags.toString();\n  }\n\n  private static void scanNum(@NotNull FormatState state) {\n    while (state.nBytes < state.format.length()) {\n      if (!StringUtil.isDecimalDigit(state.format.charAt(state.nBytes))) {\n        return;\n      }\n      state.nBytes++;\n    }\n  }\n\n  private static boolean parseIndex(@NotNull FormatState state) {\n    if (state.nBytes == state.format.length() || state.format.charAt(state.nBytes) != '[') return true;\n\n    state.indexed = true;\n    state.nBytes++;\n    int start = state.nBytes;\n    scanNum(state);\n    if (state.nBytes == state.format.length() || state.nBytes == start || state.format.charAt(state.nBytes) != ']') {\n      state.state = Placeholder.State.ARGUMENT_INDEX_NOT_NUMERIC;\n      return false;\n    }\n\n    int arg;\n    try {\n      arg = Integer.parseInt(state.format.substring(start, state.nBytes));\n    }\n    catch (NumberFormatException ignored) {\n      state.state = Placeholder.State.ARGUMENT_INDEX_NOT_NUMERIC;\n      return false;\n    }\n\n    state.nBytes++;\n    state.argNum = arg;\n\n    return true;\n  }\n\n  private static boolean parseNum(@NotNull FormatState state) {\n    if (state.nBytes < state.format.length() && state.format.charAt(state.nBytes) == '*') {\n      state.nBytes++;\n      state.argNums.add(state.argNum);\n      state.argNum++;\n    }\n    else {\n      scanNum(state);\n    }\n\n    return true;\n  }\n\n  private static boolean parsePrecision(@NotNull FormatState state) {\n    if (state.nBytes < state.format.length() && state.format.charAt(state.nBytes) == '.') {\n      state.flags += '.';\n      state.nBytes++;\n      if (!parseIndex(state)) return false;\n      if (!parseNum(state)) return false;\n    }\n\n    return true;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/GoPlaceholderCountInspection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.inspections.GoPlaceholderChecker.Placeholder;\nimport com.goide.inspections.GoPlaceholderChecker.PrintVerb;\nimport com.goide.psi.*;\nimport com.goide.psi.impl.GoPsiImplUtil;\nimport com.goide.psi.impl.GoTypeUtil;\nimport com.intellij.codeInspection.LocalInspectionToolSession;\nimport com.intellij.codeInspection.ProblemHighlightType;\nimport com.intellij.codeInspection.ProblemsHolder;\nimport com.intellij.openapi.util.TextRange;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.psi.ElementManipulators;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiReference;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.Collections;\nimport java.util.List;\n\npublic class GoPlaceholderCountInspection extends GoInspectionBase {\n\n  @NotNull\n  @Override\n  protected GoVisitor buildGoVisitor(@NotNull ProblemsHolder holder, @NotNull LocalInspectionToolSession session) {\n    return new GoVisitor() {\n      @Override\n      public void visitCallExpr(@NotNull GoCallExpr o) {\n        PsiReference psiReference = o.getExpression().getReference();\n        PsiElement resolved = psiReference != null ? psiReference.resolve() : null;\n        if (!(resolved instanceof GoFunctionOrMethodDeclaration)) return;\n\n        String functionName = StringUtil.toLowerCase(((GoFunctionOrMethodDeclaration)resolved).getName());\n        if (functionName == null) return;\n\n        if (GoPlaceholderChecker.isFormattingFunction(functionName)) {\n          checkPrintf(holder, o, (GoFunctionOrMethodDeclaration)resolved);\n        }\n        else if (GoPlaceholderChecker.isPrintingFunction(functionName)) {\n          checkPrint(holder, o, (GoFunctionOrMethodDeclaration)resolved);\n        }\n      }\n    };\n  }\n\n  private static void checkPrint(@NotNull ProblemsHolder holder,\n                                 @NotNull GoCallExpr callExpr,\n                                 @NotNull GoFunctionOrMethodDeclaration declaration) {\n    List<GoExpression> arguments = callExpr.getArgumentList().getExpressionList();\n    GoExpression firstArg = ContainerUtil.getFirstItem(arguments);\n    if (firstArg == null) return;\n\n    if (GoTypeUtil.isString(firstArg.getGoType(null))) {\n      String firstArgText = resolve(firstArg);\n      if (GoPlaceholderChecker.hasPlaceholder(firstArgText)) {\n        String message = \"Possible formatting directive in <code>#ref</code> #loc\";\n        holder.registerProblem(firstArg, message, ProblemHighlightType.GENERIC_ERROR_OR_WARNING);\n        return;\n      }\n    }\n\n    // TODO florin: Check first argument for os.Std* output\n    // Ref code: https://github.com/golang/go/blob/79f7ccf2c3931745aeb97c5c985b6ac7b44befb4/src/cmd/vet/print.go#L617\n\n    String declarationName = declaration.getName();\n    boolean isLn = declarationName != null && declarationName.endsWith(\"ln\");\n    for (GoExpression argument : arguments) {\n      GoType goType = argument.getGoType(null);\n      if (isLn && GoTypeUtil.isString(goType)) {\n        String argText = resolve(argument);\n        if (argText != null && argText.endsWith(\"\\\\n\")) {\n          String message = \"Function already ends with new line #loc\";\n          TextRange range = TextRange.from(argText.length() - 1, 2);\n          // TODO florin: add quickfix to remove trailing \\n\n          // TODO florin: add quickfix to convert \\n to a separate argument\n          holder.registerProblem(argument, message, ProblemHighlightType.GENERIC_ERROR_OR_WARNING, range);\n        }\n      }\n      else if (GoTypeUtil.isFunction(goType)) {\n        String message = argument instanceof GoCallExpr ? \"Final return type of <code>#ref</code> is a function not a function call #loc\"\n                                                        : \"Argument <code>#ref</code> is not a function call #loc\";\n        // TODO florin: add quickfix to convert to function call if possible\n        holder.registerProblem(argument, message, ProblemHighlightType.GENERIC_ERROR_OR_WARNING);\n      }\n    }\n  }\n\n  private static void checkPrintf(@NotNull ProblemsHolder holder,\n                                  @NotNull GoCallExpr callExpr,\n                                  @NotNull GoFunctionOrMethodDeclaration declaration) {\n\n    int placeholderPosition = GoPlaceholderChecker.getPlaceholderPosition(declaration);\n    List<GoExpression> arguments = callExpr.getArgumentList().getExpressionList();\n    if (arguments.isEmpty()) return;\n    int callArgsNum = arguments.size();\n    if (placeholderPosition < 0 || callArgsNum <= placeholderPosition) return;\n\n    GoExpression placeholder = arguments.get(placeholderPosition);\n    if (!GoTypeUtil.isString(placeholder.getGoType(null))) {\n      String message = \"Value used for formatting text does not appear to be a string #loc\";\n      holder.registerProblem(placeholder, message, ProblemHighlightType.GENERIC_ERROR_OR_WARNING);\n      return;\n    }\n\n    String placeholderText = resolve(placeholder);\n    if (placeholderText == null) return;\n\n    if (!GoPlaceholderChecker.hasPlaceholder(placeholderText) && callArgsNum > placeholderPosition) {\n      String message = \"Value used for formatting text does not appear to contain a placeholder #loc\";\n      holder.registerProblem(placeholder, message, ProblemHighlightType.GENERIC_ERROR_OR_WARNING);\n      return;\n    }\n\n    callArgsNum--;\n    List<Placeholder> placeholders = GoPlaceholderChecker.parsePrintf(placeholderText);\n    for (Placeholder fmtPlaceholder : placeholders) {\n      if (!checkPrintfArgument(holder, placeholder, callExpr, arguments, callArgsNum, placeholderPosition, fmtPlaceholder)) return;\n    }\n\n    if (hasErrors(holder, placeholder, placeholders)) return;\n    // TODO florin check to see if we are skipping any argument from the formatting string\n    int maxArgsNum = computeMaxArgsNum(placeholders, placeholderPosition);\n\n    if (GoPsiImplUtil.hasVariadic(callExpr.getArgumentList()) && maxArgsNum >= callArgsNum) {\n      return;\n    }\n\n    if (maxArgsNum != callArgsNum) {\n      int expect = maxArgsNum - placeholderPosition;\n      int numArgs = callArgsNum - placeholderPosition;\n      String message = String.format(\"Got %d placeholder(s) for %d arguments(s) #loc\", expect, numArgs);\n      holder.registerProblem(placeholder, message, ProblemHighlightType.GENERIC_ERROR_OR_WARNING);\n    }\n\n    // TODO florin: check if all arguments are strings and add quickfix to replace with Println and string concat\n  }\n\n  private static int computeMaxArgsNum(@NotNull List<Placeholder> placeholders, int firstArg) {\n    int maxArgsNum = 0;\n    for (Placeholder placeholder : placeholders) {\n      List<Integer> arguments = placeholder.getArguments();\n      if (!arguments.isEmpty()) {\n        int max = Collections.max(arguments);\n        if (maxArgsNum < max) {\n          maxArgsNum = max;\n        }\n      }\n    }\n\n    return maxArgsNum + firstArg;\n  }\n\n  private static boolean hasErrors(@NotNull ProblemsHolder holder,\n                                   @NotNull GoExpression formatPlaceholder,\n                                   @NotNull List<Placeholder> placeholders) {\n\n    for (Placeholder placeholder : placeholders) {\n      Placeholder.State state = placeholder.getState();\n      if (state == Placeholder.State.MISSING_VERB_AT_END) {\n        String message = \"Missing verb at end of format string in <code>#ref</code> call #loc\";\n        holder.registerProblem(formatPlaceholder, message, ProblemHighlightType.GENERIC_ERROR_OR_WARNING);\n        return true;\n      }\n\n      if (state == Placeholder.State.ARGUMENT_INDEX_NOT_NUMERIC) {\n        String message = \"Illegal syntax for <code>#ref</code> argument index, expecting a number #loc\";\n        holder.registerProblem(formatPlaceholder, message, ProblemHighlightType.GENERIC_ERROR_OR_WARNING);\n        return true;\n      }\n    }\n\n    return false;\n  }\n\n  private static boolean checkPrintfArgument(@NotNull ProblemsHolder holder,\n                                             @NotNull GoExpression placeholder,\n                                             @NotNull GoCallExpr callExpr,\n                                             @NotNull List<GoExpression> arguments,\n                                             int callArgsNum,\n                                             int firstArg,\n                                             @NotNull Placeholder fmtPlaceholder) {\n\n    PrintVerb v = fmtPlaceholder.getVerb();\n    if (v == null) {\n      String message = \"Unrecognized formatting verb <code>#ref</code> call #loc\";\n      TextRange range = TextRange.from(fmtPlaceholder.getStartPos() + 1, fmtPlaceholder.getPlaceholder().length());\n      // TODO florin: add quickfix to suggest correct printf verbs (maybe take type into account when type info available?)\n      holder.registerProblem(placeholder, message, ProblemHighlightType.GENERIC_ERROR_OR_WARNING, range);\n      return false;\n    }\n\n    String flags = fmtPlaceholder.getFlags();\n    for (int i = 0; i < flags.length(); i++) {\n      char flag = flags.charAt(i);\n      if (v.getFlags().indexOf(flag) == -1) {\n        String message = String.format(\"Unrecognized <code>#ref</code> flag for verb %s: %s call #loc\", v.getVerb(), flag);\n        TextRange range = TextRange.from(fmtPlaceholder.getStartPos() + 1, fmtPlaceholder.getPlaceholder().length());\n        // TODO florin: add quickfix to suggest correct printf verbs (maybe take type into account when type info available?)\n        // TODO florin: cover with tests\n        holder.registerProblem(placeholder, message, ProblemHighlightType.GENERIC_ERROR_OR_WARNING, range);\n        return false;\n      }\n    }\n\n    List<Integer> args = fmtPlaceholder.getArguments();\n    // Verb is good. If len(state.argNums)>trueArgs, we have something like %.*s and all\n    // but the final arg must be an integer.\n    int trueArgs = v == PrintVerb.Percent ? 0 : 1;\n    int nargs = args.size();\n    for (int i = 0; i < nargs - trueArgs; i++) {\n      if (!checkArgumentIndex(holder, placeholder, callExpr, fmtPlaceholder, callArgsNum)) return false;\n      // TODO florin: add argument matching when type comparison can be done\n      // Ref code: https://github.com/golang/go/blob/79f7ccf2c3931745aeb97c5c985b6ac7b44befb4/src/cmd/vet/print.go#L484\n    }\n\n    if (v == PrintVerb.Percent) return true;\n\n    if (!checkArgumentIndex(holder, placeholder, callExpr, fmtPlaceholder, callArgsNum)) return false;\n\n    int argNum = args.get(args.size() - 1);\n    GoExpression expression = arguments.get(argNum + firstArg - 1);\n    if (GoTypeUtil.isFunction(expression.getGoType(null)) && v != PrintVerb.p && v != PrintVerb.T) {\n      String message = \"Argument <code>#ref</code> is not a function call #loc\";\n      if (expression instanceof GoCallExpr) {\n        message = \"Final return type of <code>#ref</code> is a function not a function call #loc\";\n      }\n      // TODO florin: add quickfix for this to transform it into a function call\n      holder.registerProblem(expression, message, ProblemHighlightType.GENERIC_ERROR_OR_WARNING);\n      return false;\n    }\n\n    // TODO florin: add argument matching when type comparison can be done\n    // Ref code: https://github.com/golang/go/blob/79f7ccf2c3931745aeb97c5c985b6ac7b44befb4/src/cmd/vet/print.go#L502\n\n    return true;\n  }\n\n  private static boolean checkArgumentIndex(@NotNull ProblemsHolder holder,\n                                            @NotNull GoExpression placeholder,\n                                            @NotNull GoCallExpr callExpr,\n                                            @NotNull Placeholder fmtPlaceholder,\n                                            int callArgsNum) {\n\n    int argNum = fmtPlaceholder.getPosition();\n    if (argNum < 0) return false;\n\n    if (argNum == 0) {\n      TextRange range = TextRange.create(fmtPlaceholder.getStartPos() + 3, fmtPlaceholder.getStartPos() + 4);\n      // TODO florin: add quickfix to suggest placeholder value\n      holder.registerProblem(placeholder, \"Index value [0] is not allowed #loc\", ProblemHighlightType.GENERIC_ERROR_OR_WARNING, range);\n      return false;\n    }\n\n    if (argNum < callArgsNum) return true;\n    if (GoPsiImplUtil.hasVariadic(callExpr.getArgumentList())) return false;\n    if (argNum == callArgsNum) return true;\n\n    // There are bad indexes in the format or there are fewer arguments than the format needs\n    // This is the argument number relative to the format: Printf(\"%s\", \"hi\") will give 1 for the \"hi\"\n    int arg = fmtPlaceholder.getPosition();\n    String message = String.format(\"Got %d placeholder(s) for %d arguments(s)\", arg, callArgsNum);\n    holder.registerProblem(placeholder, message, ProblemHighlightType.GENERIC_ERROR_OR_WARNING);\n    return false;\n  }\n\n  @Nullable\n  private static String resolve(@NotNull GoExpression argument) {\n    String argumentValue = getValue(argument);\n    if (argumentValue != null) {\n      return argumentValue;\n    }\n\n    PsiReference reference = argument.getReference();\n    PsiElement resolved = reference != null ? reference.resolve() : null;\n\n    String value = null;\n    if (resolved instanceof GoVarDefinition) {\n      value = getValue(((GoVarDefinition)resolved).getValue());\n    }\n    else if (resolved instanceof GoConstDefinition) {\n      value = getValue(((GoConstDefinition)resolved).getValue());\n    }\n\n    return value;\n  }\n\n  // todo: implement ConstEvaluator\n  @Nullable\n  private static String getValue(@Nullable GoExpression expression) {\n    if (expression instanceof GoStringLiteral) {\n      return ElementManipulators.getValueText(expression);\n    }\n    if (expression instanceof GoAddExpr) {\n      StringBuilder result = new StringBuilder();\n      for (GoExpression expr : ((GoAddExpr)expression).getExpressionList()) {\n        String value = getValue(expr);\n        if (value == null) return null;\n        result.append(value);\n      }\n      return StringUtil.nullize(result.toString());\n    }\n    if (expression instanceof GoParenthesesExpr) {\n      return getValue(((GoParenthesesExpr)expression).getExpression());\n    }\n    return null;\n  }}\n"
  },
  {
    "path": "src/com/goide/inspections/GoRangeIterationOnIllegalTypeInspection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.psi.GoExpression;\nimport com.goide.psi.GoRangeClause;\nimport com.goide.psi.GoType;\nimport com.goide.psi.GoVisitor;\nimport com.goide.psi.impl.GoPsiImplUtil;\nimport com.goide.psi.impl.GoTypeUtil;\nimport com.intellij.codeInspection.LocalInspectionToolSession;\nimport com.intellij.codeInspection.ProblemHighlightType;\nimport com.intellij.codeInspection.ProblemsHolder;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoRangeIterationOnIllegalTypeInspection extends GoInspectionBase {\n  @NotNull\n  @Override\n  protected GoVisitor buildGoVisitor(@NotNull ProblemsHolder holder, @NotNull LocalInspectionToolSession session) {\n    return new GoVisitor() {\n      @Override\n      public void visitRangeClause(@NotNull GoRangeClause o) {\n        super.visitRangeClause(o);\n        GoExpression expression = o.getRangeExpression();\n        GoType type = expression != null ? expression.getGoType(null) : null;\n        if (type != null && !GoTypeUtil.isIterable(type)) {\n          holder.registerProblem(expression, \"Cannot range over data (type \" + GoPsiImplUtil.getText(type) + \")\",\n                                 ProblemHighlightType.GENERIC_ERROR_OR_WARNING);\n        }\n      }\n    };\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/GoReceiverNamesInspection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.psi.GoReceiver;\nimport com.goide.psi.GoVisitor;\nimport com.goide.quickfix.GoRenameQuickFix;\nimport com.intellij.codeInspection.LocalInspectionToolSession;\nimport com.intellij.codeInspection.ProblemsHolder;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.Set;\n\npublic class GoReceiverNamesInspection extends GoInspectionBase {\n  private static final Set<String> genericNamesSet = ContainerUtil.newHashSet(\"me\", \"this\", \"self\");\n\n  @NotNull\n  @Override\n  protected GoVisitor buildGoVisitor(@NotNull ProblemsHolder holder, @NotNull LocalInspectionToolSession session) {\n    return new GoVisitor() {\n      @Override\n      public void visitReceiver(@NotNull GoReceiver o) {\n        if (genericNamesSet.contains(o.getName())) {\n          PsiElement identifier = o.getIdentifier();\n          if (identifier == null) return;\n          holder.registerProblem(identifier, \"Receiver has generic name\", new GoRenameQuickFix(o));\n        }\n      }\n    };\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/GoRedeclareImportAsFunctionInspection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.psi.GoFunctionDeclaration;\nimport com.goide.psi.GoVisitor;\nimport com.goide.quickfix.GoRenameQuickFix;\nimport com.intellij.codeInspection.LocalInspectionToolSession;\nimport com.intellij.codeInspection.ProblemsHolder;\nimport com.intellij.openapi.util.text.StringUtil;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoRedeclareImportAsFunctionInspection extends GoInspectionBase {\n  @NotNull\n  @Override\n  protected GoVisitor buildGoVisitor(@NotNull ProblemsHolder holder, @NotNull LocalInspectionToolSession session) {\n    return new GoVisitor() {\n      @Override\n      public void visitFunctionDeclaration(@NotNull GoFunctionDeclaration o) {\n        String functionName = o.getName();\n        if (StringUtil.isNotEmpty(functionName) &&\n            !\"_\".equals(functionName) &&\n            o.getContainingFile().getImportMap().containsKey(functionName)) {\n          holder.registerProblem(o.getIdentifier(), \"import \\\"\" + functionName + \"\\\" redeclared in this block\", new GoRenameQuickFix(o));\n        }\n      }\n    };\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/GoRedundantBlankArgInRangeInspection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.psi.*;\nimport com.goide.quickfix.GoDeleteRangeQuickFix;\nimport com.intellij.codeInspection.CleanupLocalInspectionTool;\nimport com.intellij.codeInspection.LocalInspectionToolSession;\nimport com.intellij.codeInspection.ProblemHighlightType;\nimport com.intellij.codeInspection.ProblemsHolder;\nimport com.intellij.psi.PsiElement;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.List;\n\npublic class GoRedundantBlankArgInRangeInspection extends GoInspectionBase implements CleanupLocalInspectionTool {\n  public final static String DELETE_BLANK_ARGUMENT_QUICK_FIX_NAME = \"Delete blank argument\";\n\n  @NotNull\n  @Override\n  protected GoVisitor buildGoVisitor(@NotNull ProblemsHolder holder, @NotNull LocalInspectionToolSession session) {\n    return new GoVisitor() {\n      @Override\n      public void visitRangeClause(@NotNull GoRangeClause o) {\n        List<GoExpression> leftExpressions = o.getLeftExpressionsList();\n        PsiElement range = o.getRange();\n        if (range == null) return;\n        if (leftExpressions.size() == 2 && isBlankGoReferenceExpression(leftExpressions.get(1))) {\n          if (isBlankGoReferenceExpression(leftExpressions.get(0))) {\n            registerBlankArgumentProblem(holder, leftExpressions.get(0), range.getPrevSibling());\n          }\n          else if (leftExpressions.get(0).getNextSibling() != null) {\n            registerBlankArgumentProblem(holder, leftExpressions.get(0).getNextSibling(), leftExpressions.get(1));\n          }\n        }\n        else if (leftExpressions.size() == 1 && isBlankGoReferenceExpression(leftExpressions.get(0))) {\n          registerBlankArgumentProblem(holder, leftExpressions.get(0), range.getPrevSibling());\n        }\n\n        List<GoVarDefinition> leftDefinitions = o.getVarDefinitionList();\n        if (leftDefinitions.size() == 2 && isBlankGoVarDefinition(leftDefinitions.get(1))) {\n          registerBlankArgumentProblem(holder, leftDefinitions.get(0).getNextSibling(), leftDefinitions.get(1));\n        }\n      }\n    };\n  }\n\n  private static void registerBlankArgumentProblem(@NotNull ProblemsHolder holder,\n                                                   @NotNull PsiElement start,\n                                                   @NotNull PsiElement end) {\n    GoDeleteRangeQuickFix fix = new GoDeleteRangeQuickFix(start, end, DELETE_BLANK_ARGUMENT_QUICK_FIX_NAME);\n    holder.registerProblem(holder.getManager().createProblemDescriptor(start, end, \"Redundant <code>_</code> expression\",\n                                                                       ProblemHighlightType.LIKE_UNUSED_SYMBOL, holder.isOnTheFly(), fix));\n  }\n\n  private static boolean isBlankGoVarDefinition(@Nullable PsiElement o) {\n    return o instanceof GoVarDefinition && o.textMatches(\"_\");\n  }\n\n  private static boolean isBlankGoReferenceExpression(@Nullable PsiElement o) {\n    return o instanceof GoReferenceExpression && o.textMatches(\"_\");\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/GoRedundantSecondIndexInSlicesInspection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.psi.*;\nimport com.goide.psi.impl.GoPsiImplUtil;\nimport com.goide.quickfix.GoDeleteQuickFix;\nimport com.intellij.codeInspection.CleanupLocalInspectionTool;\nimport com.intellij.codeInspection.LocalInspectionToolSession;\nimport com.intellij.codeInspection.ProblemHighlightType;\nimport com.intellij.codeInspection.ProblemsHolder;\nimport com.intellij.openapi.util.Trinity;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiReference;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.List;\n\npublic class GoRedundantSecondIndexInSlicesInspection extends GoInspectionBase implements CleanupLocalInspectionTool {\n  public final static String DELETE_REDUNDANT_INDEX_QUICK_FIX_NAME = \"Delete redundant index\";\n  private static final GoDeleteQuickFix DELETE_REDUNDANT_INDEX_QUICK_FIX =\n    new GoDeleteQuickFix(DELETE_REDUNDANT_INDEX_QUICK_FIX_NAME, GoCallExpr.class);\n\n  @NotNull\n  @Override\n  protected GoVisitor buildGoVisitor(@NotNull ProblemsHolder holder, @NotNull LocalInspectionToolSession session) {\n    return new GoVisitor() {\n      @Override\n      public void visitIndexOrSliceExpr(@NotNull GoIndexOrSliceExpr o) {\n        GoExpression expression = o.getExpression();\n        PsiReference reference = expression != null ? expression.getReference() : null;\n        PsiElement resolvedArrayReference = reference != null ? reference.resolve() : null;\n        if (reference == null ||\n            resolvedArrayReference == null ||\n            !(expression instanceof GoReferenceExpression) ||\n            ((GoReferenceExpression)expression).getQualifier() != null) {\n          return;\n        }\n        Trinity<GoExpression, GoExpression, GoExpression> indexes = o.getIndices();\n        if (indexes.third == null && indexes.second instanceof GoCallExpr) {\n          GoCallExpr call = (GoCallExpr)indexes.second;\n          if (isLenFunctionCall(call)) {\n            GoExpression argument = ContainerUtil.getFirstItem(call.getArgumentList().getExpressionList());\n            if (argument != null && argument.getReference() != null && resolvedArrayReference.equals(argument.getReference().resolve())) {\n              holder.registerProblem(call, \"Redundant index\", ProblemHighlightType.LIKE_UNUSED_SYMBOL, DELETE_REDUNDANT_INDEX_QUICK_FIX);\n            }\n          }\n        }\n      }\n    };\n  }\n\n  private static boolean isLenFunctionCall(@NotNull GoCallExpr callExpr) {\n    GoExpression functionReferenceExpression = callExpr.getExpression();\n    if (!(functionReferenceExpression instanceof GoReferenceExpression) || !functionReferenceExpression.textMatches(\"len\")) {\n      return false;\n    }\n    List<GoExpression> callArguments = callExpr.getArgumentList().getExpressionList();\n    if (callArguments.size() != 1) {\n      return false;\n    }\n    return GoPsiImplUtil.builtin(((GoReferenceExpression)functionReferenceExpression).resolve());\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/GoRedundantTypeDeclInCompositeLit.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.psi.*;\nimport com.goide.quickfix.GoDeleteAmpersandAndTypeInCompositeLitQuickFix;\nimport com.intellij.codeInspection.CleanupLocalInspectionTool;\nimport com.intellij.codeInspection.LocalInspectionToolSession;\nimport com.intellij.codeInspection.ProblemHighlightType;\nimport com.intellij.codeInspection.ProblemsHolder;\nimport com.intellij.psi.PsiElement;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoRedundantTypeDeclInCompositeLit extends GoInspectionBase implements CleanupLocalInspectionTool {\n  public final static String DELETE_TYPE_DECLARATION_QUICK_FIX_NAME = \"Delete redundant type declaration\";\n  private static final GoDeleteAmpersandAndTypeInCompositeLitQuickFix QUICK_FIX = new GoDeleteAmpersandAndTypeInCompositeLitQuickFix();\n\n  @NotNull\n  @Override\n  protected GoVisitor buildGoVisitor(@NotNull ProblemsHolder holder, @NotNull LocalInspectionToolSession session) {\n    return new GoVisitor() {\n      @Override\n      public void visitCompositeLit(@NotNull GoCompositeLit o) {\n        GoLiteralValue literalValue = o.getLiteralValue();\n        if (literalValue == null) return;\n\n        GoType expectedType = getExpectedType(o);\n\n        // TODO o.getType() instanceof GoStruct (struct or T[][])\n\n        if (expectedType != null) {\n          for (GoElement element : literalValue.getElementList()) {\n            GoValue elementValue = element.getValue();\n            if (elementValue != null) {\n              GoExpression expr = elementValue.getExpression();\n              if (expectedType instanceof GoPointerType && expr instanceof GoUnaryExpr) {\n                GoUnaryExpr unaryExpr = (GoUnaryExpr)expr;\n                PsiElement bitAnd = unaryExpr.getBitAnd();\n                if (bitAnd != null && unaryExpr.getExpression() instanceof GoCompositeLit) {\n                  GoCompositeLit compositeLit = (GoCompositeLit)unaryExpr.getExpression();\n                  if (isTypeReferencesEquals(((GoPointerType)expectedType).getType(), compositeLit)) {\n                    GoTypeReferenceExpression typeExpr = compositeLit.getTypeReferenceExpression();\n                    if (typeExpr != null) {\n                      holder.registerProblem(holder.getManager().createProblemDescriptor(bitAnd, typeExpr, \"Redundant type declaration\",\n                                                                                         ProblemHighlightType.LIKE_UNUSED_SYMBOL,\n                                                                                         holder.isOnTheFly(), QUICK_FIX));\n                    }\n                  }\n                }\n              }\n              else if (expr instanceof GoCompositeLit && isTypeReferencesEquals(expectedType, (GoCompositeLit)expr)) {\n                GoTypeReferenceExpression typeExpr = ((GoCompositeLit)expr).getTypeReferenceExpression();\n                if (typeExpr != null) {\n                  holder.registerProblem(typeExpr, \"Redundant type declaration\", ProblemHighlightType.LIKE_UNUSED_SYMBOL, QUICK_FIX);\n                }\n              }\n            }\n          }\n        }\n      }\n    };\n  }\n\n  @Nullable\n  private static GoType getExpectedType(@NotNull GoCompositeLit o) {\n    if (o.getType() instanceof GoArrayOrSliceType && ((GoArrayOrSliceType)o.getType()).getType() != null) {\n      return ((GoArrayOrSliceType)o.getType()).getType();\n    }\n    if (o.getType() instanceof GoMapType && ((GoMapType)o.getType()).getValueType() != null) {\n      return ((GoMapType)o.getType()).getValueType();\n    }\n    return null;\n  }\n\n  private static boolean isTypeReferencesEquals(@Nullable GoType pattern, @NotNull GoCompositeLit value) {\n    if (pattern == null || !pattern.isValid() || !value.isValid()) {\n      return false;\n    }\n\n    if (pattern.getTypeReferenceExpression() == null || value.getTypeReferenceExpression() == null) {\n      return false;\n    }\n\n    if (pattern.getTypeReferenceExpression().resolve() != value.getTypeReferenceExpression().resolve()) {\n      return false;\n    }\n    //TODO Complex type comparison\n    return true;\n  }\n}"
  },
  {
    "path": "src/com/goide/inspections/GoReservedWordUsedAsNameInspection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.psi.*;\nimport com.goide.psi.impl.GoTypeReference;\nimport com.goide.quickfix.GoRenameQuickFix;\nimport com.goide.sdk.GoSdkUtil;\nimport com.intellij.codeInspection.LocalInspectionToolSession;\nimport com.intellij.codeInspection.ProblemHighlightType;\nimport com.intellij.codeInspection.ProblemsHolder;\nimport com.intellij.openapi.progress.ProgressManager;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.psi.ElementDescriptionUtil;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.usageView.UsageViewTypeLocation;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoReservedWordUsedAsNameInspection extends GoInspectionBase {\n  @NotNull\n  @Override\n  protected GoVisitor buildGoVisitor(@NotNull ProblemsHolder holder, @NotNull LocalInspectionToolSession session) {\n    GoFile builtinFile = GoSdkUtil.findBuiltinFile(session.getFile());\n    if (builtinFile == null) return DUMMY_VISITOR;\n\n    return new GoVisitor() {\n      @Override\n      public void visitTypeSpec(@NotNull GoTypeSpec o) {\n        super.visitTypeSpec(o);\n        check(o, builtinFile, holder);\n      }\n\n      @Override\n      public void visitConstDefinition(@NotNull GoConstDefinition o) {\n        super.visitConstDefinition(o);\n        check(o, builtinFile, holder);\n      }\n\n      @Override\n      public void visitFunctionOrMethodDeclaration(@NotNull GoFunctionOrMethodDeclaration o) {\n        super.visitFunctionOrMethodDeclaration(o);\n        check(o, builtinFile, holder);\n      }\n\n      @Override\n      public void visitVarDefinition(@NotNull GoVarDefinition o) {\n        super.visitVarDefinition(o);\n        check(o, builtinFile, holder);\n      }\n    };\n  }\n\n  private static void check(@NotNull GoNamedElement element, @NotNull GoFile builtinFile, @NotNull ProblemsHolder holder) {\n    String name = element.getName();\n    if (name == null || GoTypeReference.DOC_ONLY_TYPES.contains(name)) return;\n\n    for (GoTypeSpec builtinTypeDeclaration : builtinFile.getTypes()) {\n      if (name.equals(builtinTypeDeclaration.getName())) {\n        registerProblem(holder, element, builtinTypeDeclaration);\n        return;\n      }\n    }\n\n    ProgressManager.checkCanceled();\n\n    for (GoFunctionDeclaration builtinFunctionsDeclaration : builtinFile.getFunctions()) {\n      if (name.equals(builtinFunctionsDeclaration.getName())) {\n        registerProblem(holder, element, builtinFunctionsDeclaration);\n        return;\n      }\n    }\n  }\n\n  private static void registerProblem(@NotNull ProblemsHolder holder,\n                                      @NotNull GoNamedElement element,\n                                      @NotNull GoNamedElement builtinElement) {\n    PsiElement identifier = element.getIdentifier();\n    if (identifier == null) return;\n\n    String elementDescription = ElementDescriptionUtil.getElementDescription(element, UsageViewTypeLocation.INSTANCE);\n    String builtinElementDescription = ElementDescriptionUtil.getElementDescription(builtinElement, UsageViewTypeLocation.INSTANCE);\n    String message = StringUtil.capitalize(elementDescription) + \" <code>#ref</code> collides with builtin \" + builtinElementDescription;\n    holder.registerProblem(identifier, message, ProblemHighlightType.GENERIC_ERROR_OR_WARNING, new GoRenameQuickFix(element));\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/GoSelfImportInspection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.psi.GoFile;\nimport com.goide.psi.GoImportSpec;\nimport com.goide.quickfix.GoDeleteImportQuickFix;\nimport com.goide.runconfig.testing.GoTestFinder;\nimport com.intellij.codeInspection.ProblemsHolder;\nimport com.intellij.psi.PsiDirectory;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoSelfImportInspection extends GoInspectionBase {\n  @Override\n  protected void checkFile(@NotNull GoFile file, @NotNull ProblemsHolder problemsHolder) {\n    if (GoTestFinder.isTestFileWithTestPackage(file)) return;\n    PsiDirectory directory = file.getContainingDirectory();\n    if (directory != null) {\n      for (GoImportSpec importSpec : file.getImports()) {\n        PsiDirectory resolve = importSpec.getImportString().resolve();\n        if (directory.equals(resolve)) {\n          problemsHolder.registerProblem(importSpec, \"Self import is not allowed\", new GoDeleteImportQuickFix());\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/GoSpellcheckingStrategy.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.GoLanguage;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.spellchecker.tokenizer.SpellcheckingStrategy;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoSpellcheckingStrategy extends SpellcheckingStrategy {\n  @Override\n  public boolean isMyContext(@NotNull PsiElement element) {\n    return GoLanguage.INSTANCE.is(element.getLanguage());\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/GoStringAndByteTypeMismatchInspection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.GoTypes;\nimport com.goide.psi.*;\nimport com.goide.psi.impl.GoPsiImplUtil;\nimport com.goide.psi.impl.GoTypeUtil;\nimport com.goide.quickfix.GoConvertStringToByteQuickFix;\nimport com.intellij.codeInspection.LocalInspectionToolSession;\nimport com.intellij.codeInspection.LocalQuickFix;\nimport com.intellij.codeInspection.ProblemHighlightType;\nimport com.intellij.codeInspection.ProblemsHolder;\nimport com.intellij.openapi.util.Trinity;\nimport com.intellij.psi.tree.TokenSet;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.Arrays;\n\npublic class GoStringAndByteTypeMismatchInspection extends GoInspectionBase {\n  private static final String TEXT_HINT = \"Mismatched types: byte and string\";\n  private static final GoConvertStringToByteQuickFix STRING_INDEX_IS_BYTE_QUICK_FIX = new GoConvertStringToByteQuickFix();\n\n  @NotNull\n  @Override\n  protected GoVisitor buildGoVisitor(@NotNull ProblemsHolder holder, @NotNull LocalInspectionToolSession session) {\n    return new GoVisitor() {\n\n      @Override\n      public void visitConditionalExpr(@NotNull GoConditionalExpr o) {\n        GoExpression left = o.getLeft();\n        GoExpression right = o.getRight();\n\n        GoIndexOrSliceExpr indexExpr = ContainerUtil.findInstance(Arrays.asList(left, right), GoIndexOrSliceExpr.class);\n        GoStringLiteral stringLiteral = ContainerUtil.findInstance(Arrays.asList(left, right), GoStringLiteral.class);\n\n        if (indexExpr == null || stringLiteral == null) {\n          return;\n        }\n\n        if (isStringIndexExpression(indexExpr)) {\n          LocalQuickFix[] fixes = GoPsiImplUtil.isSingleCharLiteral(stringLiteral) ? new LocalQuickFix[]{STRING_INDEX_IS_BYTE_QUICK_FIX}\n                                                                                   : LocalQuickFix.EMPTY_ARRAY;\n          holder.registerProblem(o, TEXT_HINT, ProblemHighlightType.GENERIC_ERROR, fixes);\n        }\n      }\n    };\n  }\n\n  private static boolean isStringIndexExpression(@NotNull GoIndexOrSliceExpr expr) {\n    GoExpression expression = expr.getExpression();\n    if (expression == null || !GoTypeUtil.isString(expression.getGoType(null))) {\n      return false;\n    }\n\n    Trinity<GoExpression, GoExpression, GoExpression> indices = expr.getIndices();\n    return indices.getSecond() == null\n           && indices.getThird() == null\n           && expr.getNode().getChildren(TokenSet.create(GoTypes.COLON)).length == 0;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/GoStructInitializationInspection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.psi.*;\nimport com.goide.psi.impl.GoElementFactory;\nimport com.goide.psi.impl.GoPsiImplUtil;\nimport com.goide.util.GoUtil;\nimport com.intellij.codeInspection.*;\nimport com.intellij.codeInspection.ui.SingleCheckboxOptionsPanel;\nimport com.intellij.openapi.progress.ProgressManager;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.InvalidDataException;\nimport com.intellij.openapi.util.WriteExternalException;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jdom.Element;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport javax.swing.*;\nimport java.util.List;\n\npublic class GoStructInitializationInspection extends GoInspectionBase {\n  public static final String REPLACE_WITH_NAMED_STRUCT_FIELD_FIX_NAME = \"Replace with named struct field\";\n  public boolean reportLocalStructs;\n  /**\n   * @deprecated use reportLocalStructs\n   */\n  @SuppressWarnings(\"WeakerAccess\") public Boolean reportImportedStructs;\n\n  @NotNull\n  @Override\n  protected GoVisitor buildGoVisitor(@NotNull ProblemsHolder holder, @NotNull LocalInspectionToolSession session) {\n    return new GoVisitor() {\n      @Override\n      public void visitLiteralValue(@NotNull GoLiteralValue o) {\n        if (PsiTreeUtil.getParentOfType(o, GoReturnStatement.class, GoShortVarDeclaration.class, GoAssignmentStatement.class) == null) {\n          return;\n        }\n        PsiElement parent = o.getParent();\n        GoType refType = GoPsiImplUtil.getLiteralType(parent, false);\n        if (refType instanceof GoStructType) {\n          processStructType(holder, o, (GoStructType)refType);\n        }\n      }\n    };\n  }\n\n  @Override\n  public JComponent createOptionsPanel() {\n    return new SingleCheckboxOptionsPanel(\"Report for local type definitions as well\", this, \"reportLocalStructs\");\n  }\n\n  private void processStructType(@NotNull ProblemsHolder holder, @NotNull GoLiteralValue element, @NotNull GoStructType structType) {\n    if (reportLocalStructs || !GoUtil.inSamePackage(structType.getContainingFile(), element.getContainingFile())) {\n      processLiteralValue(holder, element, structType.getFieldDeclarationList());\n    }\n  }\n\n  private static void processLiteralValue(@NotNull ProblemsHolder holder,\n                                          @NotNull GoLiteralValue o,\n                                          @NotNull List<GoFieldDeclaration> fields) {\n    List<GoElement> vals = o.getElementList();\n    for (int elemId = 0; elemId < vals.size(); elemId++) {\n      ProgressManager.checkCanceled();\n      GoElement element = vals.get(elemId);\n      if (element.getKey() == null && elemId < fields.size()) {\n        String structFieldName = getFieldName(fields.get(elemId));\n        LocalQuickFix[] fixes = structFieldName != null ? new LocalQuickFix[]{new GoReplaceWithNamedStructFieldQuickFix(structFieldName)}\n                                                        : LocalQuickFix.EMPTY_ARRAY;\n        holder.registerProblem(element, \"Unnamed field initialization\", ProblemHighlightType.GENERIC_ERROR_OR_WARNING, fixes);\n      }\n    }\n  }\n\n  @Nullable\n  private static String getFieldName(@NotNull GoFieldDeclaration declaration) {\n    List<GoFieldDefinition> list = declaration.getFieldDefinitionList();\n    GoFieldDefinition fieldDefinition = ContainerUtil.getFirstItem(list);\n    return fieldDefinition != null ? fieldDefinition.getIdentifier().getText() : null;\n  }\n\n  private static class GoReplaceWithNamedStructFieldQuickFix extends LocalQuickFixBase {\n    private String myStructField;\n\n    public GoReplaceWithNamedStructFieldQuickFix(@NotNull String structField) {\n      super(REPLACE_WITH_NAMED_STRUCT_FIELD_FIX_NAME);\n      myStructField = structField;\n    }\n\n    @Override\n    public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {\n      PsiElement startElement = descriptor.getStartElement();\n      if (startElement instanceof GoElement) {\n        startElement.replace(GoElementFactory.createLiteralValueElement(project, myStructField, startElement.getText()));\n      }\n    }\n  }\n\n  @Override\n  public void readSettings(@NotNull Element node) throws InvalidDataException {\n    super.readSettings(node);\n    if (reportImportedStructs != null) {\n      reportLocalStructs = reportImportedStructs;\n    }\n  }\n\n  @Override\n  public void writeSettings(@NotNull Element node) throws WriteExternalException {\n    reportImportedStructs = null;\n    super.writeSettings(node);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/GoStructTagInspection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.psi.GoFieldDeclaration;\nimport com.goide.psi.GoStructType;\nimport com.goide.psi.GoTag;\nimport com.goide.psi.GoVisitor;\nimport com.goide.psi.impl.GoPsiImplUtil;\nimport com.intellij.codeInspection.LocalInspectionToolSession;\nimport com.intellij.codeInspection.ProblemsHolder;\nimport org.jetbrains.annotations.NotNull;\n\n/**\n * Implements <a href=\"https://github.com/go-lang-plugin-org/go-lang-idea-plugin/issues/1983\"/>, an\n * inspector that warns if a go StructTag is not well-formed according to Go language conventions.\n */\npublic class GoStructTagInspection extends GoInspectionBase {\n  @NotNull\n  @Override\n  protected GoVisitor buildGoVisitor(@NotNull ProblemsHolder holder,\n                                     @SuppressWarnings({\"UnusedParameters\", \"For future\"}) @NotNull LocalInspectionToolSession session) {\n    return new GoVisitor() {\n      @Override\n      public void visitStructType(@NotNull GoStructType o) {\n        for (GoFieldDeclaration field : o.getFieldDeclarationList()) {\n          GoTag tag = field.getTag();\n          if (tag == null) continue;\n          if (!isValidTag(tag)) {\n            holder.registerProblem(tag, \"Bad syntax for struct tag value\");\n          }\n        }\n      }\n    };\n  }\n\n  // Implementation based on validateStructTag from the go vet tool:\n  // https://github.com/golang/tools/blob/master/cmd/vet/structtag.go.\n  private static boolean isValidTag(@NotNull GoTag tag) {\n    StringBuilder tagText = new StringBuilder(GoPsiImplUtil.unquote(tag.getText()));\n    if (tagText.length() != tag.getText().length() - 2) {\n      // We already have a parsing error in this case, so no need to add an additional warning.\n      return true;\n    }\n    while (tagText.length() > 0) {\n      int i = 0;\n\n      // Skip leading spaces.\n      while (i < tagText.length() && tagText.charAt(i) == ' ') {\n        i++;\n      }\n\n      tagText.delete(0, i);\n      if (tagText.length() == 0) return true;\n\n      // Scan to colon. A space, a quote or a control character is a syntax error.\n      // Strictly speaking, control chars include the range [0x7f, 0x9f], not just\n      // [0x00, 0x1f], but in practice, we ignore the multi-byte control characters\n      // as it is simpler to inspect the tag's bytes than the tag's runes.\n      i = 0;\n      while (i < tagText.length() &&\n             tagText.charAt(i) > ' ' &&\n             tagText.charAt(i) != ':' &&\n             tagText.charAt(i) != '\"' &&\n             tagText.charAt(i) != 0x7f) {\n        i++;\n      }\n      if (i == 0 || i + 1 > tagText.length() || tagText.charAt(i) != ':') return false;\n      tagText.delete(0, i + 1);\n\n      // Scan quoted string to find value.\n      i = 1;\n      while (i < tagText.length() && tagText.charAt(i) != '\"') {\n        if (tagText.charAt(i) == '\\\\') {\n          i++;\n        }\n        i++;\n      }\n\n      if (i >= tagText.length()) return false;\n\n      String unquotedValue = GoPsiImplUtil.unquote(tagText.substring(0, i + 1));\n      if (unquotedValue.length() != i - 1) {\n        // The value was not correctly quoted (two quote chars were not removed by unquote).\n        // TODO(sjr): this check is not equivalent to strconv.Unquote, so this inspector is\n        // more lenient than the go vet tool.\n        return false;\n      }\n\n      tagText.delete(0, i + 1);\n    }\n\n    return true;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/GoTestSignaturesInspection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.GoConstants;\nimport com.goide.psi.*;\nimport com.goide.psi.impl.GoElementFactory;\nimport com.goide.psi.impl.GoPsiImplUtil;\nimport com.goide.runconfig.testing.GoTestFinder;\nimport com.goide.runconfig.testing.GoTestFunctionType;\nimport com.goide.runconfig.testing.frameworks.gotest.GotestGenerateAction;\nimport com.intellij.codeInspection.LocalQuickFixBase;\nimport com.intellij.codeInspection.ProblemDescriptor;\nimport com.intellij.codeInspection.ProblemsHolder;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.util.ObjectUtils;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.List;\n\npublic class GoTestSignaturesInspection extends GoInspectionBase {\n  @Override\n  protected void checkFile(@NotNull GoFile file, @NotNull ProblemsHolder problemsHolder) {\n    if (!GoTestFinder.isTestFile(file)) return;\n    for (GoFunctionDeclaration function : file.getFunctions()) {\n      GoTestFunctionType type = GoTestFunctionType.fromName(function.getName());\n      if (type == null) continue;\n      GoSignature signature = function.getSignature();\n      if (signature == null) continue;\n      List<GoParameterDeclaration> params = signature.getParameters().getParameterDeclarationList();\n      if (type == GoTestFunctionType.EXAMPLE) {\n        if (!params.isEmpty() || signature.getResult() != null) {\n          problemsHolder.registerProblem(function.getIdentifier(), \"Wrong example signature\", new GoTestSignaturesQuickFix(type));\n        }\n      }\n      else {\n        GoParameterDeclaration param = ContainerUtil.getFirstItem(params);\n        GoImportSpec testingImportSpec = file.getImportedPackagesMap().get(GoConstants.TESTING_PATH);\n        String testingAlias = GoPsiImplUtil.getImportQualifierToUseInFile(testingImportSpec, GoConstants.TESTING_PATH);\n        if (GoConstants.TESTING_PATH.equals(file.getImportPath(false))) {\n          testingAlias = \"\";\n        }\n        if (signature.getResult() != null ||\n            testingAlias == null ||\n            params.size() != 1 ||\n            param == null ||\n            !param.getType().textMatches(type.getQualifiedParamType(testingAlias))) {\n          problemsHolder.registerProblem(function.getIdentifier(), \"Wrong test signature\", new GoTestSignaturesQuickFix(type));\n        }\n      }\n    }\n  }\n\n  private static class GoTestSignaturesQuickFix extends LocalQuickFixBase {\n    private final GoTestFunctionType myType;\n\n    public GoTestSignaturesQuickFix(GoTestFunctionType type) {\n      super(\"Fix signature\");\n      myType = type;\n    }\n\n    @Override\n    public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {\n      PsiElement element = descriptor.getStartElement();\n      if (element == null) return;\n      GoFunctionDeclaration function = ObjectUtils.tryCast(element.getParent(), GoFunctionDeclaration.class);\n      GoSignature signature = function != null ? function.getSignature() : null;\n      if (signature == null) return;\n      GoFile file = ObjectUtils.tryCast(signature.getContainingFile(), GoFile.class);\n      if (file == null) return;\n\n      String testingQualifier = GotestGenerateAction.importTestingPackageIfNeeded(file);\n      signature.replace(GoElementFactory.createFunctionSignatureFromText(project, myType.getSignature(testingQualifier)));\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/GoUnderscoreUsedAsValueInspection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.psi.GoReferenceExpression;\nimport com.goide.psi.GoVisitor;\nimport com.intellij.codeInsight.highlighting.ReadWriteAccessDetector;\nimport com.intellij.codeInspection.LocalInspectionToolSession;\nimport com.intellij.codeInspection.ProblemHighlightType;\nimport com.intellij.codeInspection.ProblemsHolder;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoUnderscoreUsedAsValueInspection extends GoInspectionBase {\n  @NotNull\n  @Override\n  protected GoVisitor buildGoVisitor(@NotNull ProblemsHolder holder, @NotNull LocalInspectionToolSession session) {\n    return new GoVisitor() {\n      @Override\n      public void visitReferenceExpression(@NotNull GoReferenceExpression o) {\n        super.visitReferenceExpression(o);\n        if (o.getIdentifier().textMatches(\"_\") && o.getReadWriteAccess() != ReadWriteAccessDetector.Access.Write) {\n          holder.registerProblem(o, \"Cannot use <code>#ref</code> as value #loc\", ProblemHighlightType.ERROR);\n        }\n      }\n    };\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/GoUnusedImportInspection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.codeInsight.imports.GoImportOptimizer;\nimport com.goide.psi.GoFile;\nimport com.goide.psi.GoImportSpec;\nimport com.goide.psi.GoRecursiveVisitor;\nimport com.goide.psi.impl.GoElementFactory;\nimport com.goide.quickfix.GoRenameQuickFix;\nimport com.intellij.codeInspection.*;\nimport com.intellij.find.FindManager;\nimport com.intellij.openapi.application.ApplicationManager;\nimport com.intellij.openapi.command.WriteCommandAction;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.PsiReference;\nimport com.intellij.util.containers.ContainerUtil;\nimport com.intellij.util.containers.MultiMap;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.Collection;\nimport java.util.Iterator;\nimport java.util.Map;\nimport java.util.Set;\n\npublic class GoUnusedImportInspection extends GoInspectionBase {\n  @Nullable private final static LocalQuickFix OPTIMIZE_QUICK_FIX = new LocalQuickFixBase(\"Optimize imports\") {\n    @Override\n    public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {\n      PsiElement element = descriptor.getPsiElement();\n      if (element == null) {\n        return;\n      }\n      PsiFile file = element.getContainingFile();\n      WriteCommandAction.runWriteCommandAction(project, new GoImportOptimizer().processFile(file));\n    }\n  };\n\n  @Nullable private final static LocalQuickFix IMPORT_FOR_SIDE_EFFECTS_QUICK_FIX = new LocalQuickFixBase(\"Import for side-effects\") {\n    @Override\n    public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {\n      PsiElement element = descriptor.getPsiElement();\n      if (!(element instanceof GoImportSpec)) {\n        return;\n      }\n      element.replace(GoElementFactory.createImportSpec(project, ((GoImportSpec)element).getPath(), \"_\"));\n    }\n  };\n\n  private static void resolveAllReferences(@NotNull GoFile file) {\n    file.accept(new GoRecursiveVisitor() {\n      @Override\n      public void visitElement(@NotNull PsiElement o) {\n        for (PsiReference reference : o.getReferences()) {\n          reference.resolve();\n        }\n      }\n    });\n  }\n\n  @Override\n  protected void checkFile(@NotNull GoFile file, @NotNull ProblemsHolder problemsHolder) {\n    MultiMap<String, GoImportSpec> importMap = file.getImportMap();\n\n    for (PsiElement importIdentifier : GoImportOptimizer.findRedundantImportIdentifiers(importMap)) {\n      problemsHolder.registerProblem(importIdentifier, \"Redundant alias\", ProblemHighlightType.LIKE_UNUSED_SYMBOL, OPTIMIZE_QUICK_FIX);\n    }\n\n    Set<GoImportSpec> duplicatedEntries = GoImportOptimizer.findDuplicatedEntries(importMap);\n    for (GoImportSpec duplicatedImportSpec : duplicatedEntries) {\n      problemsHolder.registerProblem(duplicatedImportSpec, \"Redeclared import\", ProblemHighlightType.GENERIC_ERROR, OPTIMIZE_QUICK_FIX);\n    }\n\n    for (Map.Entry<String, Collection<GoImportSpec>> specs : importMap.entrySet()) {\n      Iterator<GoImportSpec> imports = specs.getValue().iterator();\n      GoImportSpec originalImport = imports.next();\n      if (originalImport.isDot() || originalImport.isForSideEffects()) {\n        continue;\n      }\n      while (imports.hasNext()) {\n        GoImportSpec redeclaredImport = imports.next();\n        if (!duplicatedEntries.contains(redeclaredImport)) {\n          LocalQuickFix[] quickFixes = FindManager.getInstance(redeclaredImport.getProject()).canFindUsages(redeclaredImport)\n                                       ? new LocalQuickFix[]{new GoRenameQuickFix(redeclaredImport)}\n                                       : LocalQuickFix.EMPTY_ARRAY;\n          problemsHolder.registerProblem(redeclaredImport, \"Redeclared import\", ProblemHighlightType.GENERIC_ERROR, quickFixes);\n        }\n      }\n    }\n\n    if (importMap.containsKey(\".\")) {\n      if (!problemsHolder.isOnTheFly() || ApplicationManager.getApplication().isUnitTestMode()) resolveAllReferences(file);\n    }\n    MultiMap<String, GoImportSpec> unusedImportsMap = GoImportOptimizer.filterUnusedImports(file, importMap);\n    Set<GoImportSpec> unusedImportSpecs = ContainerUtil.newHashSet(unusedImportsMap.values());\n    for (PsiElement importEntry : unusedImportSpecs) {\n      GoImportSpec spec = GoImportOptimizer.getImportSpec(importEntry);\n      if (spec != null && spec.getImportString().resolve() != null) {\n        problemsHolder.registerProblem(spec, \"Unused import\", ProblemHighlightType.GENERIC_ERROR, OPTIMIZE_QUICK_FIX,\n                                       IMPORT_FOR_SIDE_EFFECTS_QUICK_FIX);\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/GoUsedAsValueInCondition.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.psi.GoAssignmentStatement;\nimport com.goide.psi.GoIfStatement;\nimport com.goide.psi.GoShortVarDeclaration;\nimport com.goide.psi.GoVisitor;\nimport com.goide.psi.impl.GoElementFactory;\nimport com.goide.psi.impl.GoPsiImplUtil;\nimport com.intellij.codeInspection.LocalInspectionToolSession;\nimport com.intellij.codeInspection.LocalQuickFixBase;\nimport com.intellij.codeInspection.ProblemDescriptor;\nimport com.intellij.codeInspection.ProblemsHolder;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.psi.PsiElement;\nimport org.jetbrains.annotations.NotNull;\n\nimport static com.intellij.codeInspection.ProblemHighlightType.GENERIC_ERROR_OR_WARNING;\n\npublic class GoUsedAsValueInCondition extends GoInspectionBase {\n  public static final String QUICK_FIX_NAME = \"Convert to '==''\";\n\n  @NotNull\n  @Override\n  protected GoVisitor buildGoVisitor(@NotNull ProblemsHolder holder, @NotNull LocalInspectionToolSession session) {\n    return new GoVisitor() {\n      @Override\n      public void visitAssignmentStatement(@NotNull GoAssignmentStatement o) {\n        if (o.getParent() != null && o.getParent() instanceof GoIfStatement && ((GoIfStatement)o.getParent()).getExpression() == null) {\n          String left = GoPsiImplUtil.joinPsiElementText(o.getLeftHandExprList().getExpressionList());\n          String right = GoPsiImplUtil.joinPsiElementText(o.getExpressionList());\n          holder.registerProblem(o, left + \" = \" + right + \" used as value\", GENERIC_ERROR_OR_WARNING, \n                                 new GoAssignmentToComparisonQuickFix());\n        }\n      }\n\n      @Override\n      public void visitShortVarDeclaration(@NotNull GoShortVarDeclaration o) {\n        PsiElement parent = o.getParent();\n        if (parent != null) {\n          PsiElement gradParent = parent.getParent();\n          if (gradParent instanceof GoIfStatement && ((GoIfStatement)gradParent).getExpression() == null) {\n            String left = GoPsiImplUtil.joinPsiElementText(o.getVarDefinitionList());\n            String right = GoPsiImplUtil.joinPsiElementText(o.getRightExpressionsList());\n            holder.registerProblem(o, left + \" := \" + right + \" used as value\", GENERIC_ERROR_OR_WARNING,\n                                   new GoAssignmentToComparisonQuickFix());\n          }\n        }\n      }\n    };\n  }\n\n  private static class GoAssignmentToComparisonQuickFix extends LocalQuickFixBase {\n    private GoAssignmentToComparisonQuickFix() {\n      super(QUICK_FIX_NAME);\n    }\n\n    @Override\n    public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {\n      PsiElement element = descriptor.getPsiElement();\n      if (element instanceof GoAssignmentStatement) {\n        String left = GoPsiImplUtil.joinPsiElementText(((GoAssignmentStatement)element).getLeftHandExprList().getExpressionList());\n        String right = GoPsiImplUtil.joinPsiElementText(((GoAssignmentStatement)element).getExpressionList());\n        element.replace(GoElementFactory.createExpression(project, left + \" == \" + right));\n      }\n      else if (element instanceof GoShortVarDeclaration) {\n        String left = GoPsiImplUtil.joinPsiElementText(((GoShortVarDeclaration)element).getVarDefinitionList());\n        String right = GoPsiImplUtil.joinPsiElementText(((GoShortVarDeclaration)element).getRightExpressionsList());\n        element.replace(GoElementFactory.createComparison(project, left + \" == \" + right));\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/GoVarDeclarationInspection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.psi.*;\nimport com.goide.psi.impl.GoPsiImplUtil;\nimport com.goide.psi.impl.GoTypeUtil;\nimport com.intellij.codeInspection.LocalInspectionToolSession;\nimport com.intellij.codeInspection.ProblemHighlightType;\nimport com.intellij.codeInspection.ProblemsHolder;\nimport com.intellij.openapi.util.Pair;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.List;\n\nimport static com.goide.inspections.GoInspectionUtil.UNKNOWN_COUNT;\nimport static com.goide.inspections.GoInspectionUtil.getExpressionResultCount;\n\npublic class GoVarDeclarationInspection extends GoInspectionBase {\n  @NotNull\n  private static Pair<List<? extends GoCompositeElement>, List<GoExpression>> getPair(@NotNull GoVarSpec varDeclaration) {\n    PsiElement assign = varDeclaration instanceof GoShortVarDeclaration ? ((GoShortVarDeclaration)varDeclaration).getVarAssign()\n                                                                        : varDeclaration.getAssign();\n    if (assign == null) {\n      return Pair.create(ContainerUtil.emptyList(), ContainerUtil.emptyList());\n    }\n    if (varDeclaration instanceof GoRecvStatement) {\n      return Pair.create(((GoRecvStatement)varDeclaration).getLeftExpressionsList(), varDeclaration.getRightExpressionsList());\n    }\n    if (varDeclaration instanceof GoRangeClause) {\n      return Pair.create(((GoRangeClause)varDeclaration).getLeftExpressionsList(), varDeclaration.getRightExpressionsList());\n    }\n    return Pair.create(varDeclaration.getVarDefinitionList(), varDeclaration.getRightExpressionsList());\n  }\n\n  @NotNull\n  @Override\n  protected GoVisitor buildGoVisitor(@NotNull ProblemsHolder holder, @NotNull LocalInspectionToolSession session) {\n    return new GoVisitor() {\n      @Override\n      public void visitAssignmentStatement(@NotNull GoAssignmentStatement o) {\n        validatePair(o, Pair.create(o.getLeftHandExprList().getExpressionList(), o.getExpressionList()));\n      }\n\n      @Override\n      public void visitVarSpec(@NotNull GoVarSpec o) {\n        validatePair(o, getPair(o));\n      }\n\n      private void validatePair(@NotNull GoCompositeElement o, Pair<? extends List<? extends GoCompositeElement>, List<GoExpression>> p) {\n        List<GoExpression> list = p.second;\n        int idCount = p.first.size();\n        for (GoCompositeElement idElement : p.first) {\n          if (idElement instanceof GoIndexOrSliceExpr) {\n            GoType referenceType = GoPsiImplUtil.getIndexedExpressionReferenceType((GoIndexOrSliceExpr)idElement, null);\n            if (GoTypeUtil.isString(referenceType)) {\n              // https://golang.org/ref/spec#Index_expressions\n              // For a of string type: a[x] may not be assigned to\n              holder.registerProblem(idElement, \"Cannot assign to <code>#ref</code> #loc\");\n            }\n          }\n        }\n\n        int expressionsSize = list.size();\n        if (expressionsSize == 0) {\n          return;\n        }\n        if (idCount == expressionsSize) {\n          checkExpressionShouldReturnOneResult(list, holder);\n          return;\n        }\n\n        int exprCount = expressionsSize;\n        if (idCount == 2) {\n          if (o instanceof GoRangeClause) {\n            // range clause can be assigned to two variables\n            return;\n          }\n          if (expressionsSize == 1) {\n            GoExpression expression = list.get(0);\n            if (expression instanceof GoIndexOrSliceExpr) {\n              GoType referenceType = GoPsiImplUtil.getIndexedExpressionReferenceType((GoIndexOrSliceExpr)expression, null);\n              if (referenceType != null && referenceType.getUnderlyingType() instanceof GoMapType) {\n                // index expressions on maps can be assigned to two variables\n                return;\n              }\n            }\n          }\n        }\n        if (expressionsSize == 1) {\n          exprCount = getExpressionResultCount(list.get(0));\n          if (exprCount == UNKNOWN_COUNT || exprCount == idCount) return;\n        }\n\n        String msg = String.format(\"Assignment count mismatch: %d = %d\", idCount, exprCount);\n        holder.registerProblem(o, msg, ProblemHighlightType.GENERIC_ERROR);\n      }\n    };\n  }\n\n  private static void checkExpressionShouldReturnOneResult(@NotNull List<GoExpression> expressions, @NotNull ProblemsHolder result) {\n    for (GoExpression expr : expressions) {\n      int count = getExpressionResultCount(expr);\n      if (count != UNKNOWN_COUNT && count != 1) {\n        String text = expr.getText();\n        if (expr instanceof GoCallExpr) {\n          text = ((GoCallExpr)expr).getExpression().getText();\n        }\n\n        String msg = count == 0 ? text + \"() doesn't return a value\" : \"Multiple-value \" + text + \"() in single-value context\";\n        result.registerProblem(expr, msg, ProblemHighlightType.GENERIC_ERROR);\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/WrongModuleTypeNotificationProvider.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.GoFileType;\nimport com.goide.GoModuleType;\nimport com.goide.sdk.GoSdkService;\nimport com.intellij.ide.util.PropertiesComponent;\nimport com.intellij.openapi.fileEditor.FileEditor;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.module.ModuleUtilCore;\nimport com.intellij.openapi.project.DumbAware;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.project.ProjectManager;\nimport com.intellij.openapi.ui.Messages;\nimport com.intellij.openapi.util.Key;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.ui.EditorNotificationPanel;\nimport com.intellij.ui.EditorNotifications;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.Set;\n\npublic class WrongModuleTypeNotificationProvider extends EditorNotifications.Provider<EditorNotificationPanel> implements DumbAware {\n  private static final Key<EditorNotificationPanel> KEY = Key.create(\"Wrong module type\");\n  private static final String DONT_ASK_TO_CHANGE_MODULE_TYPE_KEY = \"do.not.ask.to.change.module.type\";\n\n  private final Project myProject;\n\n  public WrongModuleTypeNotificationProvider(@NotNull Project project) {\n    myProject = project;\n  }\n\n  @NotNull\n  @Override\n  public Key<EditorNotificationPanel> getKey() {\n    return KEY;\n  }\n\n  @Override\n  public EditorNotificationPanel createNotificationPanel(@NotNull VirtualFile file, @NotNull FileEditor fileEditor) {\n    if (file.getFileType() != GoFileType.INSTANCE) return null;\n    Module module = ModuleUtilCore.findModuleForFile(file, myProject);\n    return module == null || GoSdkService.getInstance(myProject).isGoModule(module) || getIgnoredModules(myProject).contains(module.getName()) \n           ? null\n           : createPanel(myProject, module);\n  }\n\n  @NotNull\n  private static EditorNotificationPanel createPanel(@NotNull Project project, @NotNull Module module) {\n    EditorNotificationPanel panel = new EditorNotificationPanel();\n    panel.setText(\"'\" + module.getName() + \"' is not Go Module, some code insight might not work here\");\n    panel.createActionLabel(\"Change module type to Go and reload project\", () -> {\n      int message = Messages.showOkCancelDialog(project, \"Updating module type requires project reload. Proceed?\", \"Update Module Type\",\n                                                \"Reload project\", \"Cancel\", null);\n      if (message == Messages.YES) {\n        module.setOption(Module.ELEMENT_TYPE, GoModuleType.getInstance().getId());\n        project.save();\n        EditorNotifications.getInstance(project).updateAllNotifications();\n        ProjectManager.getInstance().reloadProject(project);\n      }\n    });\n    panel.createActionLabel(\"Don't show again for this module\", () -> {\n      Set<String> ignoredModules = getIgnoredModules(project);\n      ignoredModules.add(module.getName());\n      PropertiesComponent.getInstance(project).setValue(DONT_ASK_TO_CHANGE_MODULE_TYPE_KEY, StringUtil.join(ignoredModules, \",\"));\n      EditorNotifications.getInstance(project).updateAllNotifications();\n    });\n    return panel;\n  }\n\n  @NotNull\n  private static Set<String> getIgnoredModules(@NotNull Project project) {\n    String value = PropertiesComponent.getInstance(project).getValue(DONT_ASK_TO_CHANGE_MODULE_TYPE_KEY, \"\");\n    return ContainerUtil.newLinkedHashSet(StringUtil.split(value, \",\"));\n  }\n}"
  },
  {
    "path": "src/com/goide/inspections/WrongSdkConfigurationNotificationProvider.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.GoFileType;\nimport com.goide.GoLanguage;\nimport com.goide.configuration.GoLibrariesConfigurableProvider;\nimport com.goide.project.GoLibrariesService;\nimport com.goide.sdk.GoSdkService;\nimport com.goide.sdk.GoSdkUtil;\nimport com.intellij.ProjectTopics;\nimport com.intellij.ide.util.PropertiesComponent;\nimport com.intellij.openapi.fileEditor.FileEditor;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.module.ModuleUtilCore;\nimport com.intellij.openapi.project.DumbAware;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.project.ProjectBundle;\nimport com.intellij.openapi.roots.ModuleRootAdapter;\nimport com.intellij.openapi.roots.ModuleRootEvent;\nimport com.intellij.openapi.util.Key;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.PsiManager;\nimport com.intellij.ui.EditorNotificationPanel;\nimport com.intellij.ui.EditorNotifications;\nimport com.intellij.util.messages.MessageBusConnection;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class WrongSdkConfigurationNotificationProvider extends EditorNotifications.Provider<EditorNotificationPanel> implements DumbAware {\n  private static final Key<EditorNotificationPanel> KEY = Key.create(\"Setup Go SDK\");\n  private static final String DO_NOT_SHOW_NOTIFICATION_ABOUT_EMPTY_GOPATH = \"DO_NOT_SHOW_NOTIFICATION_ABOUT_EMPTY_GOPATH\";\n\n  private final Project myProject;\n\n  public WrongSdkConfigurationNotificationProvider(@NotNull Project project, @NotNull EditorNotifications notifications) {\n    myProject = project;\n    MessageBusConnection connection = myProject.getMessageBus().connect(project);\n    connection.subscribe(ProjectTopics.PROJECT_ROOTS, new ModuleRootAdapter() {\n      @Override\n      public void rootsChanged(ModuleRootEvent event) {\n        notifications.updateAllNotifications();\n      }\n    });\n    connection.subscribe(GoLibrariesService.LIBRARIES_TOPIC, newRootUrls -> notifications.updateAllNotifications());\n  }\n\n  @NotNull\n  @Override\n  public Key<EditorNotificationPanel> getKey() {\n    return KEY;\n  }\n\n  @Override\n  public EditorNotificationPanel createNotificationPanel(@NotNull VirtualFile file, @NotNull FileEditor fileEditor) {\n    if (file.getFileType() != GoFileType.INSTANCE) return null;\n\n    PsiFile psiFile = PsiManager.getInstance(myProject).findFile(file);\n    if (psiFile == null) return null;\n\n    if (psiFile.getLanguage() != GoLanguage.INSTANCE) return null;\n\n    Module module = ModuleUtilCore.findModuleForPsiElement(psiFile);\n    if (module == null) return null;\n\n    String sdkHomePath = GoSdkService.getInstance(myProject).getSdkHomePath(module);\n    if (StringUtil.isEmpty(sdkHomePath)) {\n      return createMissingSdkPanel(myProject, module);\n    }\n\n    if (!PropertiesComponent.getInstance().getBoolean(DO_NOT_SHOW_NOTIFICATION_ABOUT_EMPTY_GOPATH, false)) {\n      String goPath = GoSdkUtil.retrieveGoPath(myProject, module);\n      if (StringUtil.isEmpty(goPath.trim())) {\n        return createEmptyGoPathPanel(myProject);\n      }\n    }\n\n    return null;\n  }\n\n  @NotNull\n  private static EditorNotificationPanel createMissingSdkPanel(@NotNull Project project, @Nullable Module module) {\n    EditorNotificationPanel panel = new EditorNotificationPanel();\n    panel.setText(ProjectBundle.message(\"project.sdk.not.defined\"));\n    panel.createActionLabel(ProjectBundle.message(\"project.sdk.setup\"), () -> GoSdkService.getInstance(project).chooseAndSetSdk(module));\n    return panel;\n  }\n\n  @NotNull\n  private static EditorNotificationPanel createEmptyGoPathPanel(@NotNull Project project) {\n    EditorNotificationPanel panel = new EditorNotificationPanel();\n    panel.setText(\"GOPATH is empty\");\n    panel.createActionLabel(\"Configure Go Libraries\", () -> GoLibrariesConfigurableProvider.showModulesConfigurable(project));\n    panel.createActionLabel(\"Do not show again\", () -> {\n      PropertiesComponent.getInstance().setValue(DO_NOT_SHOW_NOTIFICATION_ABOUT_EMPTY_GOPATH, true);\n      EditorNotifications.getInstance(project).updateAllNotifications();\n    });\n    return panel;\n  }\n}"
  },
  {
    "path": "src/com/goide/inspections/suppression/GoInspectionSuppressor.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections.suppression;\n\nimport com.goide.psi.*;\nimport com.intellij.codeInsight.daemon.impl.actions.AbstractBatchSuppressByNoInspectionCommentFix;\nimport com.intellij.codeInspection.InspectionSuppressor;\nimport com.intellij.codeInspection.SuppressQuickFix;\nimport com.intellij.codeInspection.SuppressionUtil;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.psi.ElementDescriptionUtil;\nimport com.intellij.psi.PsiComment;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiWhiteSpace;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport com.intellij.usageView.UsageViewTypeLocation;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.regex.Matcher;\n\npublic class GoInspectionSuppressor implements InspectionSuppressor {\n  @Override\n  public boolean isSuppressedFor(@NotNull PsiElement element, @NotNull String toolId) {\n    GoTopLevelDeclaration topLevelDeclaration = PsiTreeUtil.getTopmostParentOfType(element, GoTopLevelDeclaration.class);\n    if (topLevelDeclaration != null && isSuppressedInStatement(toolId, topLevelDeclaration)) {\n      return true;\n    }\n    GoImportDeclaration importDeclaration = PsiTreeUtil.getNonStrictParentOfType(element, GoImportDeclaration.class);\n    if (importDeclaration != null && importDeclaration.getPrevSibling() == null\n        && isSuppressedInStatement(element, toolId, GoImportList.class)) {\n      return true;\n    }\n    return isSuppressedInStatement(element, toolId, GoPackageClause.class, GoStatement.class, GoCommClause.class, GoCaseClause.class,\n                                   GoTopLevelDeclaration.class, GoImportDeclaration.class);\n  }\n\n  @NotNull\n  @Override\n  public SuppressQuickFix[] getSuppressActions(PsiElement element, @NotNull String toolId) {\n    return new SuppressQuickFix[]{\n      new GoSuppressInspectionFix(\"comm case\", GoCommClause.class, false),\n      new GoSuppressInspectionFix(toolId, \"comm case\", GoCommClause.class, false),\n      new GoSuppressInspectionFix(\"case\", GoCaseClause.class, false),\n      new GoSuppressInspectionFix(toolId, \"case\", GoCaseClause.class, false),\n      new GoSuppressInspectionFix(\"declaration\", GoTopLevelDeclaration.class, true),\n      new GoSuppressInspectionFix(toolId, \"declaration\", GoTopLevelDeclaration.class, true),\n      new GoSuppressForStatementFix(),\n      new GoSuppressForStatementFix(toolId),\n      new GoSuppressInspectionFix(\"import\", GoImportDeclaration.class, false),\n      new GoSuppressInspectionFix(toolId, \"import\", GoImportDeclaration.class, false),\n      new GoSuppressInspectionFix(\"package statement\", GoPackageClause.class, false),\n      new GoSuppressInspectionFix(toolId, \"package statement\", GoPackageClause.class, false),\n    };\n  }\n\n  private static class GoSuppressForStatementFix extends GoSuppressInspectionFix {\n    public GoSuppressForStatementFix() {\n      super(\"statement\", GoStatement.class, false);\n    }\n\n    public GoSuppressForStatementFix(@NotNull String ID) {\n      super(ID, \"statement\", GoStatement.class, false);\n    }\n\n    @Nullable\n    @Override\n    public PsiElement getContainer(PsiElement context) {\n      GoStatement statement = PsiTreeUtil.getNonStrictParentOfType(context, GoStatement.class);\n      if (statement != null && statement.getParent() instanceof GoCommCase) {\n        return PsiTreeUtil.getParentOfType(statement, GoStatement.class);\n      }\n      return statement;\n    }\n  }\n\n  public static class GoSuppressInspectionFix extends AbstractBatchSuppressByNoInspectionCommentFix {\n    private final Class<? extends GoCompositeElement> myContainerClass;\n    private final String myBaseText;\n    private final boolean myTopMost;\n\n    public GoSuppressInspectionFix(@NotNull String elementDescription,\n                                   Class<? extends GoCompositeElement> containerClass,\n                                   boolean topMost) {\n      super(SuppressionUtil.ALL, true);\n      myBaseText = \"Suppress all inspections for \";\n      setText(myBaseText + elementDescription);\n      myContainerClass = containerClass;\n      myTopMost = topMost;\n    }\n\n    public GoSuppressInspectionFix(@NotNull String ID,\n                                   @NotNull String elementDescription,\n                                   Class<? extends GoCompositeElement> containerClass,\n                                   boolean topMost) {\n      super(ID, false);\n      myBaseText = \"Suppress for \";\n      setText(myBaseText + elementDescription);\n      myTopMost = topMost;\n      myContainerClass = containerClass;\n    }\n\n    @Override\n    @Nullable\n    public PsiElement getContainer(PsiElement context) {\n      PsiElement container;\n      if (myTopMost) {\n        container = PsiTreeUtil.getTopmostParentOfType(context, myContainerClass);\n        if (container == null && myContainerClass.isInstance(context)) {\n          container = context;\n        }\n      }\n      else {\n        container = PsiTreeUtil.getNonStrictParentOfType(context, myContainerClass);\n      }\n      if (container != null) {\n        String description = ElementDescriptionUtil.getElementDescription(container, UsageViewTypeLocation.INSTANCE);\n        if (StringUtil.isNotEmpty(description)) {\n          setText(myBaseText + description);\n        }\n      }\n      return container;\n    }\n  }\n\n  private static boolean isSuppressedInStatement(@NotNull PsiElement place,\n                                                 @NotNull String toolId,\n                                                 @NotNull Class<? extends PsiElement>... statementClasses) {\n    PsiElement statement = PsiTreeUtil.getNonStrictParentOfType(place, statementClasses);\n    while (statement != null) {\n      if (isSuppressedInStatement(toolId, statement)) {\n        return true;\n      }\n      statement = PsiTreeUtil.getParentOfType(statement, statementClasses);\n    }\n    return false;\n  }\n\n  private static boolean isSuppressedInStatement(@NotNull String toolId, @Nullable PsiElement statement) {\n    if (statement != null) {\n      PsiElement prev = PsiTreeUtil.skipSiblingsBackward(statement, PsiWhiteSpace.class);\n      if (prev instanceof PsiComment) {\n        String text = prev.getText();\n        Matcher matcher = SuppressionUtil.SUPPRESS_IN_LINE_COMMENT_PATTERN.matcher(text);\n        return matcher.matches() && SuppressionUtil.isInspectionToolIdMentioned(matcher.group(1), toolId);\n      }\n    }\n    return false;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/unresolved/GoAssignmentToConstantInspection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections.unresolved;\n\nimport com.goide.inspections.GoInspectionBase;\nimport com.goide.psi.GoConstDefinition;\nimport com.goide.psi.GoReferenceExpression;\nimport com.goide.psi.GoVisitor;\nimport com.intellij.codeInsight.highlighting.ReadWriteAccessDetector;\nimport com.intellij.codeInspection.LocalInspectionToolSession;\nimport com.intellij.codeInspection.ProblemsHolder;\nimport com.intellij.psi.PsiElement;\nimport org.jetbrains.annotations.NotNull;\n\nimport static com.intellij.codeInspection.ProblemHighlightType.GENERIC_ERROR_OR_WARNING;\n\npublic class GoAssignmentToConstantInspection extends GoInspectionBase {\n  @NotNull\n  @Override\n  protected GoVisitor buildGoVisitor(@NotNull ProblemsHolder holder, @NotNull LocalInspectionToolSession session) {\n    return new GoVisitor() {\n      @Override\n      public void visitReferenceExpression(@NotNull GoReferenceExpression o) {\n        super.visitReferenceExpression(o);\n        if (o.getReadWriteAccess() != ReadWriteAccessDetector.Access.Read) {\n          PsiElement resolve = o.resolve();\n          if (resolve instanceof GoConstDefinition) {\n            holder.registerProblem(o, \"Cannot assign to constant\", GENERIC_ERROR_OR_WARNING);\n          }\n        }\n      }\n    };\n  }\n}"
  },
  {
    "path": "src/com/goide/inspections/unresolved/GoIntroduceFunctionFix.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections.unresolved;\n\nimport com.goide.GoConstants;\nimport com.goide.GoDocumentationProvider;\nimport com.goide.project.GoVendoringUtil;\nimport com.goide.psi.*;\nimport com.goide.psi.impl.GoPsiImplUtil;\nimport com.goide.psi.impl.GoTypeUtil;\nimport com.goide.refactor.GoRefactoringUtil;\nimport com.goide.util.GoPathScopeHelper;\nimport com.goide.util.GoUtil;\nimport com.intellij.codeInsight.intention.HighPriorityAction;\nimport com.intellij.codeInsight.template.Template;\nimport com.intellij.codeInsight.template.TemplateManager;\nimport com.intellij.codeInsight.template.impl.ConstantNode;\nimport com.intellij.codeInspection.LocalQuickFixAndIntentionActionOnPsiElement;\nimport com.intellij.diagnostic.AttachmentFactory;\nimport com.intellij.openapi.application.ApplicationManager;\nimport com.intellij.openapi.command.CommandProcessor;\nimport com.intellij.openapi.editor.Editor;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.module.ModuleUtilCore;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.Nls;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.List;\nimport java.util.Map;\n\npublic class GoIntroduceFunctionFix extends LocalQuickFixAndIntentionActionOnPsiElement implements HighPriorityAction {\n  private final String myName;\n  private static final String FAMILY_NAME = \"Create function\";\n\n  public GoIntroduceFunctionFix(@NotNull PsiElement element, @NotNull String name) {\n    super(element);\n    myName = name;\n  }\n\n  @Override\n  public void invoke(@NotNull Project project,\n                     @NotNull PsiFile file,\n                     @Nullable(\"is null when called from inspection\") Editor editor,\n                     @NotNull PsiElement startElement,\n                     @NotNull PsiElement endElement) {\n    if (editor == null) {\n      LOG.error(\"Cannot run quick fix without editor: \" + getClass().getSimpleName(),\n                AttachmentFactory.createAttachment(file.getVirtualFile()));\n      return;\n    }\n    if (!(startElement instanceof GoCallExpr)) return;\n\n    GoCallExpr call = (GoCallExpr)startElement;\n    List<GoExpression> args = call.getArgumentList().getExpressionList();\n    GoType resultType = ContainerUtil.getFirstItem(GoTypeUtil.getExpectedTypes(call));\n\n    PsiElement anchor = PsiTreeUtil.findPrevParent(file, call);\n\n    Template template = TemplateManager.getInstance(project).createTemplate(\"\", \"\");\n    template.addTextSegment(\"\\nfunc \" + myName);\n\n    setupFunctionParameters(template, args, file);\n    setupFunctionResult(template, resultType);\n\n    template.addTextSegment(\" {\\n\\t\");\n    template.addEndVariable();\n    template.addTextSegment(\"\\n}\");\n\n    int offset = anchor.getTextRange().getEndOffset();\n    editor.getCaretModel().moveToOffset(offset);\n\n    startTemplate(editor, template, project);\n  }\n\n  @NotNull\n  private static String convertType(@NotNull PsiFile file, @Nullable GoType type, @NotNull Map<String, GoImportSpec> importMap) {\n    if (type == null) return GoConstants.INTERFACE_TYPE;\n    Module module = ModuleUtilCore.findModuleForPsiElement(file);\n    boolean vendoringEnabled = GoVendoringUtil.isVendoringEnabled(module);\n    return GoDocumentationProvider.getTypePresentation(type, element -> {\n      if (element instanceof GoTypeSpec) {\n        GoTypeSpec spec = (GoTypeSpec)element;\n        if (GoPsiImplUtil.builtin(spec)) return spec.getIdentifier().getText();\n\n        GoFile typeFile = spec.getContainingFile();\n        if (file.isEquivalentTo(typeFile) || GoUtil.inSamePackage(typeFile, file)) {\n          return spec.getIdentifier().getText();\n        }\n        if (!spec.isPublic()) {\n          return GoConstants.INTERFACE_TYPE;\n        }\n\n        GoPathScopeHelper scopeHelper = GoPathScopeHelper.fromReferenceFile(file.getProject(), module, file.getVirtualFile());\n        boolean isAllowed = scopeHelper.couldBeReferenced(typeFile.getVirtualFile(), file.getVirtualFile());\n        if (!isAllowed) return GoConstants.INTERFACE_TYPE;\n\n        String importPath = typeFile.getImportPath(vendoringEnabled);\n\n        GoImportSpec importSpec = importMap.get(importPath);\n        String packageName = StringUtil.notNullize(typeFile.getPackageName());\n        String qualifier = StringUtil.notNullize(GoPsiImplUtil.getImportQualifierToUseInFile(importSpec, packageName), packageName);\n\n        // todo: add import package fix if getImportQualifierToUseInFile is null?\n        return GoPsiImplUtil.getFqn(qualifier, spec.getIdentifier().getText());\n      }\n      return GoConstants.INTERFACE_TYPE;\n    });\n  }\n\n  private static void setupFunctionResult(@NotNull Template template, @Nullable GoType type) {\n    if (type instanceof GoTypeList) {\n      template.addTextSegment(\" (\");\n      List<GoType> list = ((GoTypeList)type).getTypeList();\n      for (int i = 0; i < list.size(); i++) {\n        template.addVariable(new ConstantNode(list.get(i).getText()), true);\n        if (i < list.size() - 1) template.addTextSegment(\", \");\n      }\n      template.addTextSegment(\")\");\n      return;\n    }\n    if (type != null) {\n      template.addTextSegment(\" \");\n      template.addVariable(new ConstantNode(type.getText()), true);\n    }\n  }\n\n  private static void setupFunctionParameters(@NotNull Template template,\n                                              @NotNull List<GoExpression> args, PsiFile file) {\n    Map<String, GoImportSpec> importMap = ((GoFile)file).getImportedPackagesMap();\n    template.addTextSegment(\"(\");\n    for (int i = 0; i < args.size(); i++) {\n      GoExpression e = args.get(i);\n      template.addVariable(GoRefactoringUtil.createParameterNameSuggestedExpression(e), true);\n      template.addTextSegment(\" \");\n      String type = convertType(file, e.getGoType(null), importMap);\n      template.addVariable(new ConstantNode(type), true);\n      if (i != args.size() - 1) template.addTextSegment(\", \");\n    }\n    template.addTextSegment(\")\");\n  }\n\n  private static void startTemplate(@NotNull Editor editor, @NotNull Template template, @NotNull Project project) {\n    Runnable runnable = () -> {\n      if (project.isDisposed() || editor.isDisposed()) return;\n      CommandProcessor.getInstance().executeCommand(project, () ->\n        TemplateManager.getInstance(project).startTemplate(editor, template, null), \"Introduce function\", null);\n    };\n    if (ApplicationManager.getApplication().isUnitTestMode()) {\n      runnable.run();\n    }\n    else {\n      ApplicationManager.getApplication().invokeLater(runnable);\n    }\n  }\n\n  @NotNull\n  @Override\n  public String getText() {\n    return FAMILY_NAME + \" \" + myName;\n  }\n\n  @Nls\n  @NotNull\n  @Override\n  public String getFamilyName() {\n    return FAMILY_NAME;\n  }\n}"
  },
  {
    "path": "src/com/goide/inspections/unresolved/GoIntroduceGlobalConstantFix.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections.unresolved;\n\nimport com.intellij.psi.PsiElement;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoIntroduceGlobalConstantFix extends GoUnresolvedFixBase {\n  public GoIntroduceGlobalConstantFix(@NotNull PsiElement element, @NotNull String name) {\n    super(element, name, \"global constant\", \"go_lang_const_qf\");\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/unresolved/GoIntroduceGlobalVariableFix.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections.unresolved;\n\nimport com.intellij.psi.PsiElement;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoIntroduceGlobalVariableFix extends GoUnresolvedFixBase {\n  public GoIntroduceGlobalVariableFix(@NotNull PsiElement element, @NotNull String name) {\n    super(element, name, \"global variable\", \"go_lang_global_var_qf\");\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/unresolved/GoIntroduceLocalConstantFix.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections.unresolved;\n\nimport com.goide.refactor.GoRefactoringUtil;\nimport com.intellij.psi.PsiElement;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoIntroduceLocalConstantFix extends GoUnresolvedFixBase {\n  public GoIntroduceLocalConstantFix(@NotNull PsiElement element, @NotNull String name) {\n    super(element, name, \"local constant\", \"go_lang_const_qf\");\n  }\n\n  @Nullable\n  @Override\n  protected PsiElement findAnchor(@NotNull PsiElement reference) {\n    return GoRefactoringUtil.findLocalAnchor(GoRefactoringUtil.getLocalOccurrences(reference));\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/unresolved/GoIntroduceLocalVariableFix.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections.unresolved;\n\nimport com.goide.refactor.GoRefactoringUtil;\nimport com.intellij.psi.PsiElement;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoIntroduceLocalVariableFix extends GoUnresolvedFixBase {\n  public GoIntroduceLocalVariableFix(@NotNull PsiElement element, @NotNull String name) {\n    super(element, name, \"local variable\", \"go_lang_local_var_qf\");\n  }\n\n  @Nullable\n  @Override\n  protected PsiElement findAnchor(@NotNull PsiElement reference) {\n    return GoRefactoringUtil.findLocalAnchor(GoRefactoringUtil.getLocalOccurrences(reference));\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/unresolved/GoIntroduceTypeFix.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections.unresolved;\n\nimport com.intellij.psi.PsiElement;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoIntroduceTypeFix extends GoUnresolvedFixBase {\n  public GoIntroduceTypeFix(@NotNull PsiElement element, @NotNull String name) {\n    super(element, name, \"type\", \"go_lang_type_qf\");\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/unresolved/GoReplaceAssignmentWithDeclarationQuickFix.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections.unresolved;\n\nimport com.goide.psi.GoAssignmentStatement;\nimport com.goide.psi.GoExpression;\nimport com.goide.psi.GoRangeClause;\nimport com.goide.psi.GoRecvStatement;\nimport com.goide.psi.impl.GoElementFactory;\nimport com.goide.psi.impl.GoPsiImplUtil;\nimport com.intellij.codeInspection.LocalQuickFixOnPsiElement;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport org.jetbrains.annotations.Nls;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoReplaceAssignmentWithDeclarationQuickFix extends LocalQuickFixOnPsiElement {\n  public static final String QUICK_FIX_NAME = \"Replace with ':='\";\n\n  public GoReplaceAssignmentWithDeclarationQuickFix(@NotNull PsiElement element) {\n    super(element);\n  }\n\n  @NotNull\n  @Override\n  public String getText() {\n    return QUICK_FIX_NAME;\n  }\n\n  @Override\n  public void invoke(@NotNull Project project, @NotNull PsiFile file, @NotNull PsiElement startElement, @NotNull PsiElement endElement) {\n    if (startElement instanceof GoAssignmentStatement) {\n      GoAssignmentStatement statement = (GoAssignmentStatement)startElement;\n      String leftSide = statement.getLeftHandExprList().getText();\n      String rightSide = GoPsiImplUtil.joinPsiElementText(statement.getExpressionList());\n      statement.replace(GoElementFactory.createShortVarDeclarationStatement(project, leftSide, rightSide));\n    }\n    else if (startElement instanceof GoRangeClause) {\n      GoRangeClause rangeClause = (GoRangeClause)startElement;\n      String leftSide = GoPsiImplUtil.joinPsiElementText(rangeClause.getLeftExpressionsList());\n      GoExpression rangeExpression = rangeClause.getRangeExpression();\n      String rightSide = rangeExpression != null ? rangeExpression.getText() : \"\";\n      rangeClause.replace(GoElementFactory.createRangeClause(project, leftSide, rightSide));\n    }\n    else if (startElement instanceof GoRecvStatement) {\n      GoRecvStatement recvStatement = (GoRecvStatement)startElement;\n      String leftSide = GoPsiImplUtil.joinPsiElementText(recvStatement.getLeftExpressionsList());\n      GoExpression recvExpression = recvStatement.getRecvExpression();\n      String rightSide = recvExpression != null ? recvExpression.getText() : \"\";\n      recvStatement.replace(GoElementFactory.createRecvStatement(project, leftSide, rightSide));\n    }\n  }\n\n  @Nls\n  @NotNull\n  @Override\n  public String getFamilyName() {\n    return QUICK_FIX_NAME;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/unresolved/GoUnresolvedFixBase.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections.unresolved;\n\nimport com.goide.psi.GoReferenceExpressionBase;\nimport com.goide.refactor.GoRefactoringUtil;\nimport com.intellij.codeInsight.template.Template;\nimport com.intellij.codeInsight.template.TemplateManager;\nimport com.intellij.codeInsight.template.impl.TemplateSettings;\nimport com.intellij.codeInspection.LocalQuickFixAndIntentionActionOnPsiElement;\nimport com.intellij.diagnostic.AttachmentFactory;\nimport com.intellij.openapi.editor.Editor;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic abstract class GoUnresolvedFixBase extends LocalQuickFixAndIntentionActionOnPsiElement {\n  @NotNull private final String myName;\n  @NotNull private final String myWhat;\n  @NotNull private final String myTemplateId;\n\n  public GoUnresolvedFixBase(@NotNull PsiElement element, @NotNull String name, @NotNull String what, @NotNull String templateId) {\n    super(element);\n    myName = name;\n    myWhat = what;\n    myTemplateId = templateId;\n  }\n\n  @NotNull\n  @Override\n  public String getText() {\n    return \"Create \" + myWhat + \" '\" + myName + \"'\";\n  }\n\n  @NotNull\n  @Override\n  public String getFamilyName() {\n    return \"Create \" + myWhat;\n  }\n\n  @Override\n  public void invoke(@NotNull Project project,\n                     @NotNull PsiFile file,\n                     @Nullable(\"is null when called from inspection\") Editor editor,\n                     @NotNull PsiElement startElement,\n                     @NotNull PsiElement endElement) {\n    if (editor == null) {\n      LOG.error(\"Cannot run quick fix without editor: \" + getClass().getSimpleName(),\n                AttachmentFactory.createAttachment(file.getVirtualFile()));\n      return;\n    }\n    PsiElement reference = PsiTreeUtil.getNonStrictParentOfType(startElement, GoReferenceExpressionBase.class);\n    PsiElement anchor = reference != null ? findAnchor(reference) : null;\n    if (anchor == null) {\n      LOG.error(\"Cannot find anchor for \" + myWhat + \" (GoUnresolvedFixBase), offset: \" + editor.getCaretModel().getOffset(),\n                AttachmentFactory.createAttachment(file.getVirtualFile()));\n      return;\n    }\n    Template template = TemplateSettings.getInstance().getTemplateById(myTemplateId);\n    if (template == null) {\n      LOG.error(\"Cannot find anchor for \" + myWhat + \" (GoUnresolvedFixBase), offset: \" + editor.getCaretModel().getOffset(),\n                AttachmentFactory.createAttachment(file.getVirtualFile()));\n      return;\n    }\n    int start = anchor.getTextRange().getStartOffset();\n    editor.getCaretModel().moveToOffset(start);\n    template.setToReformat(true);\n    TemplateManager.getInstance(project).startTemplate(editor, template, true, ContainerUtil.stringMap(\"NAME\", myName), null);\n  }\n\n  @Nullable\n  protected PsiElement findAnchor(@NotNull PsiElement reference) {\n    PsiFile file = reference.getContainingFile();\n    return GoRefactoringUtil.findAnchor(GoRefactoringUtil.getOccurrences(reference, file), file);\n  }\n}\n\n"
  },
  {
    "path": "src/com/goide/inspections/unresolved/GoUnresolvedReferenceInspection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections.unresolved;\n\nimport com.goide.GoTypes;\nimport com.goide.codeInsight.imports.GoImportPackageQuickFix;\nimport com.goide.inspections.GoInspectionBase;\nimport com.goide.psi.*;\nimport com.goide.psi.impl.GoReference;\nimport com.intellij.codeInsight.highlighting.ReadWriteAccessDetector;\nimport com.intellij.codeInspection.LocalInspectionToolSession;\nimport com.intellij.codeInspection.LocalQuickFix;\nimport com.intellij.codeInspection.ProblemHighlightType;\nimport com.intellij.codeInspection.ProblemsHolder;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiReference;\nimport com.intellij.psi.ResolveResult;\nimport com.intellij.psi.formatter.FormatterUtil;\nimport com.intellij.psi.impl.source.resolve.reference.impl.providers.FileReference;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.Collection;\nimport java.util.List;\n\nimport static com.intellij.codeInspection.ProblemHighlightType.GENERIC_ERROR_OR_WARNING;\nimport static com.intellij.codeInspection.ProblemHighlightType.LIKE_UNKNOWN_SYMBOL;\n\npublic class GoUnresolvedReferenceInspection extends GoInspectionBase {\n  @NotNull\n  @Override\n  protected GoVisitor buildGoVisitor(@NotNull ProblemsHolder holder, @NotNull LocalInspectionToolSession session) {\n    return new GoVisitor() {\n      @Override\n      public void visitFieldName(@NotNull GoFieldName o) {\n        super.visitFieldName(o);\n        PsiElement resolve = o.resolve();\n        if (resolve == null) {\n          PsiElement id = o.getIdentifier();\n          holder.registerProblem(id, \"Unknown field <code>#ref</code> in struct literal #loc\", LIKE_UNKNOWN_SYMBOL);\n        }\n      }\n\n      @Override\n      public void visitReferenceExpression(@NotNull GoReferenceExpression o) {\n        super.visitReferenceExpression(o);\n        GoReference reference = o.getReference();\n        GoReferenceExpression qualifier = o.getQualifier();\n        GoReference qualifierRef = qualifier != null ? qualifier.getReference() : null;\n        PsiElement qualifierResolve = qualifierRef != null ? qualifierRef.resolve() : null;\n        if (qualifier != null && qualifierResolve == null) return;\n        ResolveResult[] results = reference.multiResolve(false);\n        PsiElement id = o.getIdentifier();\n        String name = id.getText();\n        if (results.length > 1) {\n          holder.registerProblem(id, \"Ambiguous reference \" + \"'\" + name + \"'\", GENERIC_ERROR_OR_WARNING);\n        }\n        else if (reference.resolve() == null) {\n          LocalQuickFix[] fixes = LocalQuickFix.EMPTY_ARRAY;\n          if (isProhibited(o, qualifier)) {\n            fixes = createImportPackageFixes(o, reference, holder.isOnTheFly());\n          }\n          else if (holder.isOnTheFly()) {\n            boolean canBeLocal = PsiTreeUtil.getParentOfType(o, GoBlock.class) != null;\n            List<LocalQuickFix> fixesList = ContainerUtil.newArrayList(new GoIntroduceGlobalVariableFix(id, name));\n            if (canBeLocal) {\n              fixesList.add(new GoIntroduceLocalVariableFix(id, name));\n            }\n            PsiElement parent = o.getParent();\n            if (o.getReadWriteAccess() == ReadWriteAccessDetector.Access.Read) {\n              fixesList.add(new GoIntroduceGlobalConstantFix(id, name));\n              if (canBeLocal) {\n                fixesList.add(new GoIntroduceLocalConstantFix(id, name));\n              }\n            }\n            else if (canBeLocal) {\n              PsiElement grandParent = parent.getParent();\n              if (grandParent instanceof GoAssignmentStatement) {\n                fixesList.add(new GoReplaceAssignmentWithDeclarationQuickFix(grandParent));\n              }\n              else if (parent instanceof GoRangeClause || parent instanceof GoRecvStatement) {\n                fixesList.add(new GoReplaceAssignmentWithDeclarationQuickFix(parent));\n              }\n            }\n\n            if (parent instanceof GoCallExpr && PsiTreeUtil.getParentOfType(o, GoConstDeclaration.class) == null) {\n              fixesList.add(new GoIntroduceFunctionFix(parent, name));\n            }\n            fixes = fixesList.toArray(new LocalQuickFix[fixesList.size()]);\n          }\n          holder.registerProblem(id, \"Unresolved reference \" + \"'\" + name + \"'\", LIKE_UNKNOWN_SYMBOL, fixes);\n        }\n      }\n\n      @Override\n      public void visitImportSpec(@NotNull GoImportSpec o) {\n        if (o.isCImport()) return;\n        GoImportString string = o.getImportString();\n        if (string.getTextLength() < 2) return;\n        PsiReference[] references = string.getReferences();\n        for (PsiReference reference : references) {\n          if (reference instanceof FileReference) {\n            ResolveResult[] resolveResults = ((FileReference)reference).multiResolve(false);\n            if (resolveResults.length == 0) {\n              ProblemHighlightType type = reference.getRangeInElement().isEmpty() ? GENERIC_ERROR_OR_WARNING : LIKE_UNKNOWN_SYMBOL;\n              holder.registerProblem(reference, ProblemsHolder.unresolvedReferenceMessage(reference), type);\n            }\n          }\n        }\n      }\n\n      @Override\n      public void visitLabelRef(@NotNull GoLabelRef o) {\n        PsiReference reference = o.getReference();\n        String name = o.getText();\n        if (reference.resolve() == null) {\n          holder.registerProblem(o, \"Unresolved label \" + \"'\" + name + \"'\", LIKE_UNKNOWN_SYMBOL);\n        }\n      }\n\n      @Override\n      public void visitTypeReferenceExpression(@NotNull GoTypeReferenceExpression o) {\n        super.visitTypeReferenceExpression(o);\n        PsiReference reference = o.getReference();\n        GoTypeReferenceExpression qualifier = o.getQualifier();\n        PsiElement qualifierResolve = qualifier != null ? qualifier.resolve() : null;\n        if (qualifier != null && qualifierResolve == null) return;\n        if (reference.resolve() == null) {\n          PsiElement id = o.getIdentifier();\n          String name = id.getText();\n          boolean isProhibited = isProhibited(o, qualifier);\n          LocalQuickFix[] fixes = LocalQuickFix.EMPTY_ARRAY;\n          if (isProhibited) {\n            fixes = createImportPackageFixes(o, reference, holder.isOnTheFly());\n          }\n          else if (holder.isOnTheFly()) {\n            fixes = new LocalQuickFix[]{new GoIntroduceTypeFix(id, name)};\n          }\n          holder.registerProblem(id, \"Unresolved type \" + \"'\" + name + \"'\", LIKE_UNKNOWN_SYMBOL, fixes);\n        }\n      }\n    };\n  }\n\n  @NotNull\n  private static LocalQuickFix[] createImportPackageFixes(@NotNull PsiElement target, @NotNull PsiReference reference, boolean onTheFly) {\n    if (onTheFly) {\n      GoImportPackageQuickFix importFix = new GoImportPackageQuickFix(reference);\n      if (importFix.isAvailable(target.getProject(), target.getContainingFile(), target, target)) {\n        return new LocalQuickFix[]{importFix};\n      }\n    }\n    else {\n      List<String> packagesToImport = GoImportPackageQuickFix.getImportPathVariantsToImport(reference.getCanonicalText(), target);\n      if (!packagesToImport.isEmpty()) {\n        Collection<LocalQuickFix> result = ContainerUtil.newArrayList();\n        for (String importPath : packagesToImport) {\n          GoImportPackageQuickFix importFix = new GoImportPackageQuickFix(target, importPath);\n          if (importFix.isAvailable(target.getProject(), target.getContainingFile(), target, target)) {\n            result.add(importFix);\n          }\n        }\n        return result.toArray(new LocalQuickFix[result.size()]);\n      }\n    }\n    return LocalQuickFix.EMPTY_ARRAY;\n  }\n\n  private static boolean isProhibited(@NotNull GoCompositeElement o, @Nullable GoCompositeElement qualifier) {\n    ASTNode next = FormatterUtil.getNextNonWhitespaceSibling(o.getNode());\n    boolean isDot = next != null && next.getElementType() == GoTypes.DOT;\n    return isDot || qualifier != null;\n  }\n}"
  },
  {
    "path": "src/com/goide/inspections/unresolved/GoUnusedConstInspection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections.unresolved;\n\nimport com.goide.inspections.GoInspectionBase;\nimport com.goide.psi.GoConstDefinition;\nimport com.goide.psi.GoVisitor;\nimport com.goide.quickfix.GoDeleteConstDefinitionQuickFix;\nimport com.intellij.codeInspection.LocalInspectionToolSession;\nimport com.intellij.codeInspection.ProblemHighlightType;\nimport com.intellij.codeInspection.ProblemsHolder;\nimport com.intellij.psi.search.searches.ReferencesSearch;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoUnusedConstInspection extends GoInspectionBase {\n  @NotNull\n  @Override\n  protected GoVisitor buildGoVisitor(@NotNull ProblemsHolder holder, @NotNull LocalInspectionToolSession session) {\n    return new GoVisitor() {\n      @Override\n      public void visitConstDefinition(@NotNull GoConstDefinition o) {\n        if (o.isBlank()) return;\n        if (ReferencesSearch.search(o, o.getUseScope()).findFirst() == null) {\n          String constName = o.getName();\n          holder.registerProblem(o, \"Unused constant <code>#ref</code> #loc\", ProblemHighlightType.LIKE_UNUSED_SYMBOL,\n                                 new GoDeleteConstDefinitionQuickFix(constName));\n        }\n      }\n    };\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/unresolved/GoUnusedExportedFunctionInspection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections.unresolved;\n\nimport com.intellij.openapi.util.text.StringUtil;\n\npublic class GoUnusedExportedFunctionInspection extends GoUnusedFunctionInspection {\n  @Override\n  protected boolean canRun(String name) {\n    return StringUtil.isCapitalized(name);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/unresolved/GoUnusedFunctionInspection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections.unresolved;\n\nimport com.goide.GoConstants;\nimport com.goide.inspections.GoInspectionBase;\nimport com.goide.psi.GoFile;\nimport com.goide.psi.GoFunctionDeclaration;\nimport com.goide.psi.GoVisitor;\nimport com.goide.quickfix.GoDeleteQuickFix;\nimport com.goide.quickfix.GoRenameToBlankQuickFix;\nimport com.goide.runconfig.testing.GoTestFinder;\nimport com.goide.runconfig.testing.GoTestFunctionType;\nimport com.intellij.codeInspection.LocalInspectionToolSession;\nimport com.intellij.codeInspection.ProblemHighlightType;\nimport com.intellij.codeInspection.ProblemsHolder;\nimport com.intellij.openapi.util.TextRange;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.search.searches.ReferencesSearch;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoUnusedFunctionInspection extends GoInspectionBase {\n  @NotNull\n  @Override\n  protected GoVisitor buildGoVisitor(@NotNull ProblemsHolder holder, @NotNull LocalInspectionToolSession session) {\n    return new GoVisitor() {\n      @Override\n      public void visitFunctionDeclaration(@NotNull GoFunctionDeclaration o) {\n        if (o.isBlank()) return;\n        GoFile file = o.getContainingFile();\n        String name = o.getName();\n        if (!canRun(name)) return;\n        if (GoConstants.MAIN.equals(file.getPackageName()) && GoConstants.MAIN.equals(name)) return;\n        if (GoConstants.INIT.equals(name)) return;\n        if (GoTestFinder.isTestFile(file) && GoTestFunctionType.fromName(name) != null) return;\n        if (ReferencesSearch.search(o, o.getUseScope()).findFirst() == null) {\n          PsiElement id = o.getIdentifier();\n          TextRange range = TextRange.from(id.getStartOffsetInParent(), id.getTextLength());\n          holder.registerProblem(o, \"Unused function <code>#ref</code> #loc\", ProblemHighlightType.LIKE_UNUSED_SYMBOL, range,\n                                 new GoDeleteQuickFix(\"Delete function\", GoFunctionDeclaration.class), new GoRenameToBlankQuickFix(o));\n        }\n      }\n    };\n  }\n\n  protected boolean canRun(String name) {\n    return !StringUtil.isCapitalized(name);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/unresolved/GoUnusedGlobalVariableInspection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections.unresolved;\n\nimport com.goide.psi.GoVarDeclaration;\nimport com.goide.psi.GoVarDefinition;\nimport com.goide.quickfix.GoDeleteVarDefinitionQuickFix;\nimport com.intellij.codeInspection.ProblemHighlightType;\nimport com.intellij.codeInspection.ProblemsHolder;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoUnusedGlobalVariableInspection extends GoUnusedVariableInspection {\n  @Override\n  protected void reportError(@NotNull GoVarDefinition varDefinition, @NotNull ProblemsHolder holder) {\n    holder.registerProblem(varDefinition, \"Unused variable <code>#ref</code> #loc\", ProblemHighlightType.LIKE_UNUSED_SYMBOL,\n                           new GoDeleteVarDefinitionQuickFix(varDefinition.getName()));\n  }\n\n  @Override\n  protected boolean shouldValidate(@Nullable GoVarDeclaration varDeclaration) {\n    return !super.shouldValidate(varDeclaration);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/unresolved/GoUnusedLabelInspection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections.unresolved;\n\nimport com.goide.inspections.GoInspectionBase;\nimport com.goide.psi.GoLabelDefinition;\nimport com.goide.psi.GoLabeledStatement;\nimport com.goide.psi.GoStatement;\nimport com.goide.psi.GoVisitor;\nimport com.goide.quickfix.GoRenameToBlankQuickFix;\nimport com.intellij.codeInspection.*;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.search.searches.ReferencesSearch;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoUnusedLabelInspection extends GoInspectionBase {\n  @NotNull\n  @Override\n  protected GoVisitor buildGoVisitor(@NotNull ProblemsHolder holder, @NotNull LocalInspectionToolSession session) {\n    return new GoVisitor() {\n\n      @Override\n      public void visitLabelDefinition(@NotNull GoLabelDefinition o) {\n        super.visitLabelDefinition(o);\n        if (o.isBlank()) return;\n        if (ReferencesSearch.search(o, o.getUseScope()).findFirst() == null) {\n          String name = o.getName();\n          holder.registerProblem(o, \"Unused label <code>#ref</code> #loc\", ProblemHighlightType.GENERIC_ERROR_OR_WARNING,\n                                 new GoRenameToBlankQuickFix(o), new GoDeleteLabelStatementQuickFix(name));\n        }\n      }\n    };\n  }\n\n  private static class GoDeleteLabelStatementQuickFix extends LocalQuickFixBase {\n    public GoDeleteLabelStatementQuickFix(@Nullable String labelName) {\n      super(\"Delete label \" + (labelName != null ? \"'\" + labelName + \"'\" : \"\"), \"Delete label\");\n    }\n\n    @Override\n    public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {\n      PsiElement element = descriptor.getPsiElement();\n      if (element.isValid() && element instanceof GoLabelDefinition) {\n        PsiElement parent = element.getParent();\n        if (parent instanceof GoLabeledStatement) {\n          GoStatement innerStatement = ((GoLabeledStatement)parent).getStatement();\n          if (innerStatement != null) {\n            parent.replace(innerStatement);\n          }\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/unresolved/GoUnusedParameterInspection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections.unresolved;\n\nimport com.goide.inspections.GoInspectionBase;\nimport com.goide.psi.*;\nimport com.goide.runconfig.testing.GoTestFinder;\nimport com.goide.runconfig.testing.GoTestFunctionType;\nimport com.intellij.codeInspection.LocalInspectionToolSession;\nimport com.intellij.codeInspection.ProblemHighlightType;\nimport com.intellij.codeInspection.ProblemsHolder;\nimport com.intellij.openapi.progress.ProgressManager;\nimport com.intellij.psi.PsiReference;\nimport com.intellij.psi.search.searches.ReferencesSearch;\nimport com.intellij.util.Query;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.List;\n\npublic class GoUnusedParameterInspection extends GoInspectionBase {\n  @NotNull\n  @Override\n  protected GoVisitor buildGoVisitor(@NotNull ProblemsHolder holder, @NotNull LocalInspectionToolSession session) {\n    return new GoVisitor() {\n      @Override\n      public void visitMethodDeclaration(@NotNull GoMethodDeclaration o) {\n        super.visitMethodDeclaration(o);\n        visitDeclaration(o, false);\n      }\n\n      @Override\n      public void visitFunctionDeclaration(@NotNull GoFunctionDeclaration o) {\n        super.visitFunctionDeclaration(o);\n        if (GoTestFinder.isTestFile(o.getContainingFile()) && GoTestFunctionType.fromName(o.getName()) != null) {\n          return;\n        }\n        visitDeclaration(o, true);\n      }\n\n      private void visitDeclaration(@NotNull GoFunctionOrMethodDeclaration o, boolean checkParameters) {\n        GoSignature signature = o.getSignature();\n        if (signature == null) return;\n        if (checkParameters) {\n          GoParameters parameters = signature.getParameters();\n          visitParameterList(parameters.getParameterDeclarationList(), \"parameter\");\n        }\n\n        GoResult result = signature.getResult();\n        GoParameters returnParameters = result != null ? result.getParameters() : null;\n        if (returnParameters != null) {\n          visitParameterList(returnParameters.getParameterDeclarationList(), \"named return parameter\");\n        }\n      }\n\n      private void visitParameterList(List<GoParameterDeclaration> parameters, String what) {\n        for (GoParameterDeclaration parameterDeclaration : parameters) {\n          for (GoParamDefinition parameter : parameterDeclaration.getParamDefinitionList()) {\n            ProgressManager.checkCanceled();\n            if (parameter.isBlank()) continue;\n\n            Query<PsiReference> search = ReferencesSearch.search(parameter, parameter.getUseScope());\n            if (search.findFirst() != null) continue;\n\n            holder.registerProblem(parameter, \"Unused \" + what + \" <code>#ref</code> #loc\", ProblemHighlightType.LIKE_UNUSED_SYMBOL);\n          }\n        }\n      }\n    };\n  }\n}\n"
  },
  {
    "path": "src/com/goide/inspections/unresolved/GoUnusedVariableInspection.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections.unresolved;\n\nimport com.goide.inspections.GoInspectionBase;\nimport com.goide.psi.*;\nimport com.goide.psi.impl.GoVarProcessor;\nimport com.goide.quickfix.GoDeleteVarDefinitionQuickFix;\nimport com.goide.quickfix.GoRenameToBlankQuickFix;\nimport com.intellij.codeInspection.LocalInspectionToolSession;\nimport com.intellij.codeInspection.ProblemHighlightType;\nimport com.intellij.codeInspection.ProblemsHolder;\nimport com.intellij.openapi.progress.ProgressManager;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiReference;\nimport com.intellij.psi.search.searches.ReferencesSearch;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoUnusedVariableInspection extends GoInspectionBase {\n  @NotNull\n  @Override\n  protected GoVisitor buildGoVisitor(@NotNull ProblemsHolder holder, @NotNull LocalInspectionToolSession session) {\n    return new GoVisitor() {\n      @Override\n      public void visitVarDefinition(@NotNull GoVarDefinition o) {\n        if (o.isBlank()) return;\n        GoCompositeElement varSpec = PsiTreeUtil.getParentOfType(o, GoVarSpec.class, GoTypeSwitchGuard.class);\n        GoVarDeclaration decl = PsiTreeUtil.getParentOfType(o, GoVarDeclaration.class);\n        if (shouldValidate(decl) && (varSpec != null || decl != null)) {\n          PsiReference reference = o.getReference();\n          PsiElement resolve = reference != null ? reference.resolve() : null;\n          if (resolve != null) return;\n          boolean foundReference = !ReferencesSearch.search(o, o.getUseScope()).forEach(reference1 -> {\n            ProgressManager.checkCanceled();\n            PsiElement element = reference1.getElement();\n            if (element == null) return true;\n            PsiElement parent = element.getParent();\n            if (parent instanceof GoLeftHandExprList) {\n              PsiElement grandParent = parent.getParent();\n              if (grandParent instanceof GoAssignmentStatement &&\n                  ((GoAssignmentStatement)grandParent).getAssignOp().getAssign() != null) {\n                GoFunctionLit fn = PsiTreeUtil.getParentOfType(element, GoFunctionLit.class);\n                if (fn == null || !PsiTreeUtil.isAncestor(GoVarProcessor.getScope(o), fn, true)) {\n                  return true;\n                }\n              }\n            }\n            if (parent instanceof GoShortVarDeclaration) {\n              int op = ((GoShortVarDeclaration)parent).getVarAssign().getStartOffsetInParent();\n              if (element.getStartOffsetInParent() < op) {\n                return true;\n              }\n            }\n            return false;\n          });\n\n          if (!foundReference) {\n            reportError(o, holder);\n          }\n        }\n      }\n    };\n  }\n\n  protected void reportError(@NotNull GoVarDefinition varDefinition, @NotNull ProblemsHolder holder) {\n    holder.registerProblem(varDefinition, \"Unused variable <code>#ref</code> #loc\", ProblemHighlightType.GENERIC_ERROR_OR_WARNING,\n                           new GoRenameToBlankQuickFix(varDefinition), new GoDeleteVarDefinitionQuickFix(varDefinition.getName()));\n  }\n\n  protected boolean shouldValidate(@Nullable GoVarDeclaration varDeclaration) {\n    return varDeclaration == null || !(varDeclaration.getParent() instanceof GoFile);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/intentions/GoAddFunctionBlockIntention.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.intentions;\n\nimport com.goide.editor.smart.GoSmartEnterProcessor;\nimport com.goide.psi.GoBlock;\nimport com.goide.psi.GoFunctionOrMethodDeclaration;\nimport com.goide.psi.impl.GoElementFactory;\nimport com.intellij.codeInsight.intention.BaseElementAtCaretIntentionAction;\nimport com.intellij.openapi.editor.Editor;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.psi.PsiDocumentManager;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.util.IncorrectOperationException;\nimport com.intellij.util.ObjectUtils;\nimport org.jetbrains.annotations.Nls;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoAddFunctionBlockIntention extends BaseElementAtCaretIntentionAction {\n  public static final String NAME = \"Add function body\";\n\n  public GoAddFunctionBlockIntention() {\n    setText(NAME);\n  }\n\n  @Nls\n  @NotNull\n  @Override\n  public String getFamilyName() {\n    return NAME;\n  }\n\n  @Override\n  public boolean isAvailable(@NotNull Project project, Editor editor, @NotNull PsiElement element) {\n    PsiElement parent = element.getParent();\n    return parent instanceof GoFunctionOrMethodDeclaration && ((GoFunctionOrMethodDeclaration)parent).getBlock() == null;\n  }\n\n  @Override\n  public void invoke(@NotNull Project project, Editor editor, @NotNull PsiElement element) throws IncorrectOperationException {\n    PsiElement parent = element.getParent();\n    if (parent instanceof GoFunctionOrMethodDeclaration) {\n      GoBlock block = ((GoFunctionOrMethodDeclaration)parent).getBlock();\n      if (block == null) {\n        GoBlock newBlock = ObjectUtils.tryCast(parent.add(GoElementFactory.createBlock(project)), GoBlock.class);\n        if (newBlock != null) {\n          PsiDocumentManager.getInstance(project).doPostponedOperationsAndUnblockDocument(editor.getDocument());\n          new GoSmartEnterProcessor.PlainEnterProcessor().doEnter(newBlock, newBlock.getContainingFile(), editor, false);\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/intentions/GoMoveToStructInitializationIntention.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.intentions;\n\nimport com.goide.psi.*;\nimport com.goide.psi.impl.GoElementFactory;\nimport com.goide.psi.impl.GoPsiImplUtil;\nimport com.intellij.codeInsight.intention.BaseElementAtCaretIntentionAction;\nimport com.intellij.openapi.editor.Editor;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport com.intellij.util.IncorrectOperationException;\nimport com.intellij.util.ObjectUtils;\nimport com.intellij.util.containers.MultiMap;\nimport org.jetbrains.annotations.Contract;\nimport org.jetbrains.annotations.Nls;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.List;\nimport java.util.Set;\n\nimport static com.intellij.util.containers.ContainerUtil.*;\n\npublic class GoMoveToStructInitializationIntention extends BaseElementAtCaretIntentionAction {\n  public static final String NAME = \"Move field assignment to struct initialization\";\n\n  public GoMoveToStructInitializationIntention() {\n    setText(NAME);\n  }\n\n  @Nls\n  @NotNull\n  @Override\n  public String getFamilyName() {\n    return NAME;\n  }\n\n  @Override\n  public boolean isAvailable(@NotNull Project project, Editor editor, @NotNull PsiElement element) {\n    return getData(element) != null;\n  }\n\n  @Nullable\n  private static Data getData(@NotNull PsiElement element) {\n    if (!element.isValid() || !element.isWritable()) return null;\n    GoAssignmentStatement assignment = getValidAssignmentParent(element);\n    GoReferenceExpression selectedFieldReference = assignment != null ? getFieldReferenceExpression(element, assignment) : null;\n    GoCompositeLit compositeLit = selectedFieldReference != null ? getStructLiteralByReference(selectedFieldReference, assignment) : null;\n    if (compositeLit == null) return null;\n\n    List<GoReferenceExpression> references = getUninitializedSingleFieldReferences(assignment, selectedFieldReference, compositeLit);\n    return !references.isEmpty() ? new Data(assignment, compositeLit, references) : null;\n  }\n\n  @Nullable\n  private static GoAssignmentStatement getValidAssignmentParent(@Nullable PsiElement element) {\n    GoAssignmentStatement assignment = PsiTreeUtil.getNonStrictParentOfType(element, GoAssignmentStatement.class);\n    return assignment != null && assignment.isValid() && getLeftHandElements(assignment).size() == assignment.getExpressionList().size()\n           ? assignment : null;\n  }\n\n  @Nullable\n  private static GoReferenceExpression getFieldReferenceExpression(@NotNull PsiElement selectedElement,\n                                                                   @NotNull GoAssignmentStatement assignment) {\n    GoReferenceExpression selectedReferenceExpression = PsiTreeUtil.getTopmostParentOfType(selectedElement, GoReferenceExpression.class);\n    if (isFieldReferenceExpression(selectedReferenceExpression)) {\n      return !isAssignedInPreviousStatement(selectedReferenceExpression, assignment) ? selectedReferenceExpression : null;\n    }\n\n    List<GoReferenceExpression> fieldReferenceExpressions = getFieldReferenceExpressions(assignment);\n    if (exists(fieldReferenceExpressions, expression -> isAssignedInPreviousStatement(expression, assignment))) return null;\n\n    Set<PsiElement> resolvedFields = map2Set(fieldReferenceExpressions, GoMoveToStructInitializationIntention::resolveQualifier);\n    return resolvedFields.size() == 1 ? getFirstItem(fieldReferenceExpressions) : null;\n  }\n\n  @NotNull\n  private static List<GoReferenceExpression> getFieldReferenceExpressions(@NotNull GoAssignmentStatement assignment) {\n    return filter(map(getLeftHandElements(assignment), GoMoveToStructInitializationIntention::unwrapParensAndCast),\n                  GoMoveToStructInitializationIntention::isFieldReferenceExpression);\n  }\n\n  @Nullable\n  private static GoReferenceExpression unwrapParensAndCast(@Nullable PsiElement e) {\n    while (e instanceof GoParenthesesExpr) {\n      e = ((GoParenthesesExpr)e).getExpression();\n    }\n    return ObjectUtils.tryCast(e, GoReferenceExpression.class);\n  }\n\n  @Contract(\"null -> false\")\n  private static boolean isFieldReferenceExpression(@Nullable PsiElement element) {\n    return element instanceof GoReferenceExpression && isFieldDefinition(((GoReferenceExpression)element).resolve());\n  }\n\n  @Contract(\"null -> false\")\n  private static boolean isFieldDefinition(@Nullable PsiElement element) {\n    return element instanceof GoFieldDefinition || element instanceof GoAnonymousFieldDefinition;\n  }\n\n  private static boolean isAssignedInPreviousStatement(@NotNull GoExpression referenceExpression,\n                                                       @NotNull GoAssignmentStatement assignment) {\n    GoReferenceExpression rightExpression =\n      unwrapParensAndCast(GoPsiImplUtil.getRightExpression(assignment, getTopmostExpression(referenceExpression)));\n\n    PsiElement resolve = rightExpression != null ? rightExpression.resolve() : null;\n    GoStatement previousElement = resolve != null ? PsiTreeUtil.getPrevSiblingOfType(assignment, GoStatement.class) : null;\n    return previousElement != null && exists(getLeftHandElements(previousElement), e -> isResolvedTo(e, resolve));\n  }\n\n  @NotNull\n  private static GoExpression getTopmostExpression(@NotNull GoExpression expression) {\n    return ObjectUtils.notNull(PsiTreeUtil.getTopmostParentOfType(expression, GoExpression.class), expression);\n  }\n\n  private static boolean isResolvedTo(@Nullable PsiElement e, @Nullable PsiElement resolve) {\n    if (e instanceof GoVarDefinition) return resolve == e;\n\n    GoReferenceExpression refExpression = unwrapParensAndCast(e);\n    return refExpression != null && refExpression.resolve() == resolve;\n  }\n\n  @NotNull\n  private static List<GoReferenceExpression> getUninitializedSingleFieldReferences(@NotNull GoAssignmentStatement assignment,\n                                                                                   @NotNull GoReferenceExpression fieldReferenceExpression,\n                                                                                   @NotNull GoCompositeLit compositeLit) {\n    PsiElement resolve = resolveQualifier(fieldReferenceExpression);\n    List<GoReferenceExpression> uninitializedFieldReferencesByQualifier =\n      filter(getUninitializedFieldReferenceExpressions(assignment, compositeLit), e -> isResolvedTo(e.getQualifier(), resolve));\n    MultiMap<PsiElement, GoReferenceExpression> resolved = groupBy(uninitializedFieldReferencesByQualifier, GoReferenceExpression::resolve);\n    return map(filter(resolved.entrySet(), set -> set.getValue().size() == 1), set -> getFirstItem(set.getValue()));\n  }\n\n  @Nullable\n  private static GoCompositeLit getStructLiteralByReference(@NotNull GoReferenceExpression fieldReferenceExpression,\n                                                            @NotNull GoAssignmentStatement assignment) {\n    GoStatement previousStatement = PsiTreeUtil.getPrevSiblingOfType(assignment, GoStatement.class);\n    if (previousStatement instanceof GoSimpleStatement) {\n      return getStructLiteral(fieldReferenceExpression, (GoSimpleStatement)previousStatement);\n    }\n    if (previousStatement instanceof GoAssignmentStatement) {\n      return getStructLiteral(fieldReferenceExpression, (GoAssignmentStatement)previousStatement);\n    }\n    return null;\n  }\n\n  @Nullable\n  private static GoCompositeLit getStructLiteral(@NotNull GoReferenceExpression fieldReferenceExpression,\n                                                 @NotNull GoSimpleStatement structDeclaration) {\n    GoShortVarDeclaration varDeclaration = structDeclaration.getShortVarDeclaration();\n    if (varDeclaration == null) return null;\n\n    PsiElement resolve = resolveQualifier(fieldReferenceExpression);\n    GoVarDefinition structVarDefinition = find(varDeclaration.getVarDefinitionList(), definition -> resolve == definition);\n    return structVarDefinition != null ? ObjectUtils.tryCast(structVarDefinition.getValue(), GoCompositeLit.class) : null;\n  }\n\n  @Nullable\n  private static PsiElement resolveQualifier(@NotNull GoReferenceExpression fieldReferenceExpression) {\n    GoReferenceExpression qualifier = fieldReferenceExpression.getQualifier();\n    return qualifier != null ? qualifier.resolve() : null;\n  }\n\n  @Nullable\n  private static GoCompositeLit getStructLiteral(@NotNull GoReferenceExpression fieldReferenceExpression,\n                                                 @NotNull GoAssignmentStatement structAssignment) {\n    GoVarDefinition varDefinition = ObjectUtils.tryCast(resolveQualifier(fieldReferenceExpression), GoVarDefinition.class);\n    PsiElement field = fieldReferenceExpression.resolve();\n    if (varDefinition == null || !isFieldDefinition(field) || !hasStructTypeWithField(varDefinition, (GoNamedElement)field)) {\n      return null;\n    }\n\n    GoExpression structReferenceExpression = find(structAssignment.getLeftHandExprList().getExpressionList(),\n                                                  expression -> isResolvedTo(expression, varDefinition));\n    if (structReferenceExpression == null) return null;\n    GoExpression compositeLit = GoPsiImplUtil.getRightExpression(structAssignment, structReferenceExpression);\n    return ObjectUtils.tryCast(compositeLit, GoCompositeLit.class);\n  }\n\n  private static boolean hasStructTypeWithField(@NotNull GoVarDefinition structVarDefinition, @NotNull GoNamedElement field) {\n    GoType type = structVarDefinition.getGoType(null);\n    GoStructType structType = type != null ? ObjectUtils.tryCast(type.getUnderlyingType(), GoStructType.class) : null;\n    return structType != null && PsiTreeUtil.isAncestor(structType, field, true);\n  }\n\n  private static boolean isFieldInitialization(@NotNull GoElement element, @NotNull PsiElement field) {\n    GoKey key = element.getKey();\n    GoFieldName fieldName = key != null ? key.getFieldName() : null;\n    return fieldName != null && fieldName.resolve() == field;\n  }\n\n  @NotNull\n  private static List<GoReferenceExpression> getUninitializedFieldReferenceExpressions(@NotNull GoAssignmentStatement assignment,\n                                                                                       @NotNull GoCompositeLit structLiteral) {\n    return filter(getFieldReferenceExpressions(assignment), expression ->\n      isUninitializedFieldReferenceExpression(expression, structLiteral) && !isAssignedInPreviousStatement(expression, assignment));\n  }\n\n  @Contract(\"null, _-> false\")\n  private static boolean isUninitializedFieldReferenceExpression(@Nullable GoReferenceExpression fieldReferenceExpression,\n                                                                 @NotNull GoCompositeLit structLiteral) {\n    if (fieldReferenceExpression == null) return false;\n    GoLiteralValue literalValue = structLiteral.getLiteralValue();\n    PsiElement resolve = fieldReferenceExpression.resolve();\n    return literalValue != null && isFieldDefinition(resolve) &&\n           !exists(literalValue.getElementList(), element -> isFieldInitialization(element, resolve));\n  }\n\n  @NotNull\n  private static List<? extends PsiElement> getLeftHandElements(@NotNull GoStatement statement) {\n    if (statement instanceof GoSimpleStatement) {\n      GoShortVarDeclaration varDeclaration = ((GoSimpleStatement)statement).getShortVarDeclaration();\n      return varDeclaration != null ? varDeclaration.getVarDefinitionList() : emptyList();\n    }\n    if (statement instanceof GoAssignmentStatement) {\n      return ((GoAssignmentStatement)statement).getLeftHandExprList().getExpressionList();\n    }\n    return emptyList();\n  }\n\n  @Override\n  public void invoke(@NotNull Project project, Editor editor, @NotNull PsiElement element) throws IncorrectOperationException {\n    Data data = getData(element);\n    if (data == null) return;\n    moveFieldReferenceExpressions(data);\n  }\n\n  private static void moveFieldReferenceExpressions(@NotNull Data data) {\n    GoLiteralValue literalValue = data.getCompositeLit().getLiteralValue();\n    if (literalValue == null) return;\n\n    for (GoReferenceExpression expression : data.getReferenceExpressions()) {\n      GoExpression anchor = getTopmostExpression(expression);\n      GoExpression fieldValue = GoPsiImplUtil.getRightExpression(data.getAssignment(), anchor);\n      if (fieldValue == null) continue;\n\n      GoPsiImplUtil.deleteExpressionFromAssignment(data.getAssignment(), anchor);\n      addFieldDefinition(literalValue, expression.getIdentifier().getText(), fieldValue.getText());\n    }\n  }\n\n  private static void addFieldDefinition(@NotNull GoLiteralValue literalValue, @NotNull String name, @NotNull String value) {\n    Project project = literalValue.getProject();\n    PsiElement newField = GoElementFactory.createLiteralValueElement(project, name, value);\n    GoElement lastElement = getLastItem(literalValue.getElementList());\n    if (lastElement == null) {\n      literalValue.addAfter(newField, literalValue.getLbrace());\n    }\n    else {\n      lastElement.add(GoElementFactory.createComma(project));\n      lastElement.add(newField);\n    }\n  }\n\n  private static class Data {\n    private final GoCompositeLit myCompositeLit;\n    private final GoAssignmentStatement myAssignment;\n    private final List<GoReferenceExpression> myReferenceExpressions;\n\n    public Data(@NotNull GoAssignmentStatement assignment,\n                @NotNull GoCompositeLit compositeLit,\n                @NotNull List<GoReferenceExpression> referenceExpressions) {\n      myCompositeLit = compositeLit;\n      myAssignment = assignment;\n      myReferenceExpressions = referenceExpressions;\n    }\n\n    public GoCompositeLit getCompositeLit() {\n      return myCompositeLit;\n    }\n\n    public GoAssignmentStatement getAssignment() {\n      return myAssignment;\n    }\n\n    public List<GoReferenceExpression> getReferenceExpressions() {\n      return myReferenceExpressions;\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/lexer/GoLexer.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.lexer;\n\nimport com.goide.GoParserDefinition;\nimport com.intellij.lexer.FlexAdapter;\nimport com.intellij.lexer.MergingLexerAdapter;\nimport com.intellij.psi.tree.TokenSet;\n\npublic class GoLexer extends MergingLexerAdapter {\n  public GoLexer() {\n    super(new FlexAdapter(new _GoLexer()), TokenSet.orSet(GoParserDefinition.COMMENTS, GoParserDefinition.WHITESPACES));\n  }\n}\n"
  },
  {
    "path": "src/com/goide/lexer/gen_lexer.sh",
    "content": "java -jar ~/src/intellij-community/tools/lexer/jflex-1.7.0-SNAPSHOT.jar --skel ~/src/intellij-community/tools/lexer/idea-flex.skeleton --nobak go.flex -d ../../../../gen/com/goide/lexer/"
  },
  {
    "path": "src/com/goide/lexer/go.flex",
    "content": "package com.goide.lexer;\n\nimport com.intellij.lexer.FlexLexer;\nimport com.intellij.psi.tree.IElementType;\nimport com.goide.GoTypes;\nimport static com.intellij.psi.TokenType.BAD_CHARACTER;\nimport static com.goide.GoParserDefinition.*;\n\n%%\n\n%{\n  public _GoLexer() {\n    this((java.io.Reader)null);\n }\n%}\n\n%class _GoLexer\n%implements FlexLexer, GoTypes\n%unicode\n%public\n\n%function advance\n%type IElementType\n\nNL = \\R\nWS = [ \\t\\f]\n\nLINE_COMMENT = \"//\" [^\\r\\n]*\nMULTILINE_COMMENT = \"/*\" ( ([^\"*\"]|[\\r\\n])* (\"*\"+ [^\"*\"\"/\"] )? )* (\"*\" | \"*\"+\"/\")?\n\nLETTER = [:letter:] | \"_\"\nDIGIT =  [:digit:]\n\nHEX_DIGIT = [0-9A-Fa-f]\nINT_DIGIT = [0-9]\nOCT_DIGIT = [0-7]\n\nNUM_INT = \"0\" | ([1-9] {INT_DIGIT}*)\nNUM_HEX = (\"0x\" | \"0X\") {HEX_DIGIT}+\nNUM_OCT = \"0\" {OCT_DIGIT}+\n\nFLOAT_EXPONENT = [eE] [+-]? {DIGIT}+\nNUM_FLOAT = ( ( ({DIGIT}+ \".\" {DIGIT}*) | ({DIGIT}* \".\" {DIGIT}+) ) {FLOAT_EXPONENT}?) | ({DIGIT}+ {FLOAT_EXPONENT})\n\nIDENT = {LETTER} ({LETTER} | {DIGIT} )*\n\nSTR =      \"\\\"\"\nSTRING = {STR} ( [^\\\"\\\\\\n\\r] | \"\\\\\" (\"\\\\\" | {STR} | {ESCAPES} | [0-8xuU] ) )* {STR}?\nESCAPES = [abfnrtv]\n\n%state MAYBE_SEMICOLON\n\n%%\n\n<YYINITIAL> {\n{WS}                                      { return WS; }\n{NL}+                                     { return NLS; }\n\n{LINE_COMMENT}                            { return LINE_COMMENT; }\n{MULTILINE_COMMENT}                       { return MULTILINE_COMMENT; }\n\n{STRING}                                  { yybegin(MAYBE_SEMICOLON); return STRING; }\n\n\"'\\\\'\"                                    { yybegin(MAYBE_SEMICOLON); return BAD_CHARACTER; }\n\"'\" [^\\\\] \"'\"?                            { yybegin(MAYBE_SEMICOLON); return CHAR; }\n\"'\" \\n \"'\"?                               { yybegin(MAYBE_SEMICOLON); return CHAR; }\n\"'\\\\\" [abfnrtv\\\\\\'] \"'\"?                  { yybegin(MAYBE_SEMICOLON); return CHAR; }\n\"'\\\\\"  {OCT_DIGIT} {3} \"'\"?               { yybegin(MAYBE_SEMICOLON); return CHAR; }\n\"'\\\\x\" {HEX_DIGIT} {2} \"'\"?               { yybegin(MAYBE_SEMICOLON); return CHAR; }\n\"'\\\\u\" {HEX_DIGIT} {4} \"'\"?               { yybegin(MAYBE_SEMICOLON); return CHAR; }\n\"'\\\\U\" {HEX_DIGIT} {8} \"'\"?               { yybegin(MAYBE_SEMICOLON); return CHAR; }\n\n\"`\" [^`]* \"`\"?                            { yybegin(MAYBE_SEMICOLON); return RAW_STRING; }\n\"...\"                                     { return TRIPLE_DOT; }\n\".\"                                       { return DOT; }\n\"|\"                                       { return BIT_OR; }\n\"{\"                                       { return LBRACE; }\n\"}\"                                       { yybegin(MAYBE_SEMICOLON); return RBRACE; }\n\n\"[\"                                       { return LBRACK; }\n\"]\"                                       { yybegin(MAYBE_SEMICOLON); return RBRACK; }\n\n\"(\"                                       { return LPAREN; }\n\")\"                                       { yybegin(MAYBE_SEMICOLON); return RPAREN; }\n\n\":\"                                       { return COLON; }\n\";\"                                       { return SEMICOLON; }\n\",\"                                       { return COMMA; }\n\n\"==\"                                      { return EQ; }\n\"=\"                                       { return ASSIGN; }\n\n\"!=\"                                      { return NOT_EQ; }\n\"!\"                                       { return NOT; }\n\n\"++\"                                      { yybegin(MAYBE_SEMICOLON); return PLUS_PLUS; }\n\"+=\"                                      { return PLUS_ASSIGN; }\n\"+\"                                       { return PLUS; }\n\n\"--\"                                      { yybegin(MAYBE_SEMICOLON); return MINUS_MINUS; }\n\"-=\"                                      { return MINUS_ASSIGN; }\n\"-\"                                       { return MINUS; }\n\n\"||\"                                      { return COND_OR; }\n\"|=\"                                      { return BIT_OR_ASSIGN; }\n\n\"&^=\"                                     { return BIT_CLEAR_ASSIGN; }\n\"&^\"                                      { return BIT_CLEAR; }\n\"&&\"                                      { return COND_AND; }\n\n\"&=\"                                      { return BIT_AND_ASSIGN; }\n\"&\"                                       { return BIT_AND; }\n\n\"<<=\"                                     { return SHIFT_LEFT_ASSIGN; }\n\"<<\"                                      { return SHIFT_LEFT; }\n\"<-\"                                      { return SEND_CHANNEL; }\n\"<=\"                                      { return LESS_OR_EQUAL; }\n\"<\"                                       { return LESS; }\n\n\"^=\"                                      { return BIT_XOR_ASSIGN; }\n\"^\"                                       { return BIT_XOR; }\n\n\"*=\"                                      { return MUL_ASSIGN; }\n\"*\"                                       { return MUL; }\n\n\"/=\"                                      { return QUOTIENT_ASSIGN; }\n\"/\"                                       { return QUOTIENT; }\n\n\"%=\"                                      { return REMAINDER_ASSIGN; }\n\"%\"                                       { return REMAINDER; }\n\n\">>=\"                                     { return SHIFT_RIGHT_ASSIGN; }\n\">>\"                                      { return SHIFT_RIGHT; }\n\">=\"                                      { return GREATER_OR_EQUAL; }\n\">\"                                       { return GREATER; }\n\n\":=\"                                      { return VAR_ASSIGN; }\n\n\"break\"                                   { yybegin(MAYBE_SEMICOLON); return BREAK; }\n\"fallthrough\"                             { yybegin(MAYBE_SEMICOLON); return FALLTHROUGH; }\n\"return\"                                  { yybegin(MAYBE_SEMICOLON); return RETURN ; }\n\"continue\"                                { yybegin(MAYBE_SEMICOLON); return CONTINUE ; }\n\n\"default\"                                 { return DEFAULT; }\n\"package\"                                 { return PACKAGE; }\n\"func\"                                    { return FUNC; }\n\"interface\"                               { return INTERFACE; }\n\"select\"                                  { return SELECT; }\n\n\"case\"                                    { return CASE; }\n\"defer\"                                   { return DEFER; }\n\"go\"                                      { return GO; }\n\"map\"                                     { return MAP; }\n\n\"chan\"                                    { return CHAN; }\n\n\"struct\"                                  { return STRUCT; }\n\"else\"                                    { return ELSE; }\n\"goto\"                                    { return GOTO; }\n\"switch\"                                  { return SWITCH; }\n\"const\"                                   { return CONST; }\n\n\"if\"                                      { return IF ; }\n\"for\"                                     { return FOR ; }\n\"import\"                                  { return IMPORT ; }\n\n\"range\"                                   { return RANGE; }\n\"type\"                                    { return TYPE_; }\n\"var\"                                     { return VAR; }\n\n{IDENT}                                   { yybegin(MAYBE_SEMICOLON); return IDENTIFIER; }\n\n{NUM_FLOAT}\"i\"                            { yybegin(MAYBE_SEMICOLON); return FLOATI; }\n{NUM_FLOAT}                               { yybegin(MAYBE_SEMICOLON); return FLOAT; }\n{DIGIT}+\"i\"                               { yybegin(MAYBE_SEMICOLON); return DECIMALI; }\n{NUM_OCT}                                 { yybegin(MAYBE_SEMICOLON); return OCT; }\n{NUM_HEX}                                 { yybegin(MAYBE_SEMICOLON); return HEX; }\n{NUM_INT}                                 { yybegin(MAYBE_SEMICOLON); return INT; }\n\n.                                         { return BAD_CHARACTER; }\n}\n\n<MAYBE_SEMICOLON> {\n{WS}                                      { return WS; }\n{NL}                                      { yybegin(YYINITIAL); yypushback(yytext().length()); return SEMICOLON_SYNTHETIC; }\n{LINE_COMMENT}                            { return LINE_COMMENT; }\n{MULTILINE_COMMENT}                       { return MULTILINE_COMMENT; }\n.                                         { yybegin(YYINITIAL); yypushback(yytext().length()); }\n}"
  },
  {
    "path": "src/com/goide/marker/GoRecursiveCallMarkerProvider.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.marker;\n\nimport com.goide.psi.GoCallExpr;\nimport com.goide.psi.GoFunctionOrMethodDeclaration;\nimport com.goide.psi.impl.GoPsiImplUtil;\nimport com.intellij.codeHighlighting.Pass;\nimport com.intellij.codeInsight.daemon.LineMarkerInfo;\nimport com.intellij.codeInsight.daemon.LineMarkerProvider;\nimport com.intellij.icons.AllIcons;\nimport com.intellij.openapi.editor.Document;\nimport com.intellij.openapi.editor.markup.GutterIconRenderer;\nimport com.intellij.openapi.util.Comparing;\nimport com.intellij.psi.PsiDocumentManager;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport com.intellij.util.FunctionUtil;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.Collection;\nimport java.util.List;\nimport java.util.Set;\n\npublic class GoRecursiveCallMarkerProvider implements LineMarkerProvider {\n  @Override\n  public LineMarkerInfo getLineMarkerInfo(@NotNull PsiElement element) {\n    return null;\n  }\n\n  @Override\n  public void collectSlowLineMarkers(@NotNull List<PsiElement> elements, @NotNull Collection<LineMarkerInfo> result) {\n    Set<Integer> lines = ContainerUtil.newHashSet();\n    for (PsiElement element : elements) {\n      if (element instanceof GoCallExpr) {\n        PsiElement resolve = GoPsiImplUtil.resolveCall((GoCallExpr)element);\n        if (resolve instanceof GoFunctionOrMethodDeclaration) {\n          if (isRecursiveCall(element, (GoFunctionOrMethodDeclaration)resolve)) {\n            PsiDocumentManager instance = PsiDocumentManager.getInstance(element.getProject());\n            Document document = instance.getDocument(element.getContainingFile());\n            int textOffset = element.getTextOffset();\n            if (document == null) continue;\n            int lineNumber = document.getLineNumber(textOffset);\n            if (!lines.contains(lineNumber)) {\n              result.add(new RecursiveMethodCallMarkerInfo(element));\n            }\n            lines.add(lineNumber);\n          }\n        }\n      }\n    }\n  }\n\n  private static boolean isRecursiveCall(PsiElement element, GoFunctionOrMethodDeclaration function) {\n    return Comparing.equal(PsiTreeUtil.getParentOfType(element, GoFunctionOrMethodDeclaration.class), function);\n  }\n\n  private static class RecursiveMethodCallMarkerInfo extends LineMarkerInfo<PsiElement> {\n    private RecursiveMethodCallMarkerInfo(@NotNull PsiElement methodCall) {\n      super(methodCall,\n            methodCall.getTextRange(),\n            AllIcons.Gutter.RecursiveMethod,\n            Pass.UPDATE_OVERRIDDEN_MARKERS,\n            FunctionUtil.constant(\"Recursive call\"),\n            null,\n            GutterIconRenderer.Alignment.RIGHT\n      );\n    }\n  }\n}\n\n\n"
  },
  {
    "path": "src/com/goide/parser/GoParserUtil.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.parser;\n\nimport com.goide.GoParserDefinition;\nimport com.goide.GoTypes;\nimport com.intellij.lang.LighterASTNode;\nimport com.intellij.lang.PsiBuilder;\nimport com.intellij.lang.WhitespacesBinders;\nimport com.intellij.lang.impl.PsiBuilderAdapter;\nimport com.intellij.lang.parser.GeneratedParserUtilBase;\nimport com.intellij.openapi.util.Key;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.impl.source.resolve.FileContextUtil;\nimport com.intellij.psi.tree.IElementType;\nimport com.intellij.util.containers.ContainerUtil;\nimport com.intellij.util.indexing.IndexingDataKeys;\nimport gnu.trove.TObjectIntHashMap;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.lang.reflect.Field;\nimport java.util.List;\n\npublic class GoParserUtil extends GeneratedParserUtilBase {\n  private static final Key<TObjectIntHashMap<String>> MODES_KEY = Key.create(\"MODES_KEY\");\n\n  @NotNull\n  private static TObjectIntHashMap<String> getParsingModes(@NotNull PsiBuilder builder_) {\n    TObjectIntHashMap<String> flags = builder_.getUserDataUnprotected(MODES_KEY);\n    if (flags == null) builder_.putUserDataUnprotected(MODES_KEY, flags = new TObjectIntHashMap<>());\n    return flags;\n  }\n\n  public static boolean consumeBlock(PsiBuilder builder_, @SuppressWarnings(\"UnusedParameters\") int level) {\n    PsiFile file = builder_.getUserDataUnprotected(FileContextUtil.CONTAINING_FILE_KEY);\n    VirtualFile data = file != null ? file.getUserData(IndexingDataKeys.VIRTUAL_FILE) : null;\n    if (data == null) return false;\n    int i = 0;\n    PsiBuilder.Marker m = builder_.mark();\n    do {\n      IElementType type = builder_.getTokenType();\n      if (type == GoTypes.TYPE_ && nextIdentifier(builder_)) { // don't count a.(type), only type <ident>\n        m.rollbackTo();\n        return false;\n      }\n      i += type == GoTypes.LBRACE ? 1 : type == GoTypes.RBRACE ? -1 : 0;  \n      builder_.advanceLexer();\n    }\n    while (i > 0 && !builder_.eof());\n    boolean result = i == 0;\n    if (result) {\n      m.drop();\n    }\n    else {\n      m.rollbackTo();\n    }\n    return result;  \n  }\n\n  private static boolean nextIdentifier(PsiBuilder builder_) {\n    IElementType e;\n    int i = 0;\n    //noinspection StatementWithEmptyBody\n    while ((e = builder_.rawLookup(++i)) == GoParserDefinition.WS || e == GoParserDefinition.NLS) {\n    }\n    return e == GoTypes.IDENTIFIER;\n  }\n\n  public static boolean emptyImportList(PsiBuilder builder_, @SuppressWarnings(\"UnusedParameters\") int level) {\n    PsiBuilder.Marker marker = getCurrentMarker(builder_ instanceof PsiBuilderAdapter ? ((PsiBuilderAdapter)builder_).getDelegate() : builder_);\n    if (marker != null) {\n      marker.setCustomEdgeTokenBinders(WhitespacesBinders.GREEDY_LEFT_BINDER, null);\n    }\n    return true;\n  }\n\n  public static boolean isModeOn(@NotNull PsiBuilder builder_, @SuppressWarnings(\"UnusedParameters\") int level, String mode) {\n    return getParsingModes(builder_).get(mode) > 0;\n  }\n\n  public static boolean withOn(PsiBuilder builder_, int level_, String mode, Parser parser) {\n    return withImpl(builder_, level_, mode, true, parser, parser);\n  }\n\n  public static boolean withOff(PsiBuilder builder_, int level_, Parser parser, String... modes) {\n    TObjectIntHashMap<String> map = getParsingModes(builder_);\n\n    TObjectIntHashMap<String> prev = new TObjectIntHashMap<>();\n    \n    for (String mode : modes) {\n      int p = map.get(mode);\n      if (p > 0) {\n        map.put(mode, 0);\n        prev.put(mode, p);\n      }\n    }\n    \n    boolean result = parser.parse(builder_, level_);\n    \n    prev.forEachEntry((mode, p) -> {\n      map.put(mode, p);\n      return true;\n    });\n    \n    return result;\n  }\n\n  private static boolean withImpl(PsiBuilder builder_, int level_, String mode, boolean onOff, Parser whenOn, Parser whenOff) {\n    TObjectIntHashMap<String> map = getParsingModes(builder_);\n    int prev = map.get(mode);\n    boolean change = ((prev & 1) == 0) == onOff;\n    if (change) map.put(mode, prev << 1 | (onOff ? 1 : 0));\n    boolean result = (change ? whenOn : whenOff).parse(builder_, level_);\n    if (change) map.put(mode, prev);\n    return result;\n  }\n\n  public static boolean isModeOff(@NotNull PsiBuilder builder_, @SuppressWarnings(\"UnusedParameters\") int level, String mode) {\n    return getParsingModes(builder_).get(mode) == 0;\n  }\n\n  public static boolean prevIsType(@NotNull PsiBuilder builder_, @SuppressWarnings(\"UnusedParameters\") int level) {\n    LighterASTNode marker = builder_.getLatestDoneMarker();\n    IElementType type = marker != null ? marker.getTokenType() : null;\n    return type == GoTypes.ARRAY_OR_SLICE_TYPE || type == GoTypes.MAP_TYPE || type == GoTypes.STRUCT_TYPE;\n  }\n  \n  public static boolean keyOrValueExpression(@NotNull PsiBuilder builder_, int level) {\n    PsiBuilder.Marker m = enter_section_(builder_);\n    boolean r = GoParser.Expression(builder_, level + 1, -1);\n    if (!r) r = GoParser.LiteralValue(builder_, level + 1);\n    IElementType type = r && builder_.getTokenType() == GoTypes.COLON ? GoTypes.KEY : GoTypes.VALUE;\n    exit_section_(builder_, m, type, r);\n    return r;\n  }\n\n  public static boolean enterMode(@NotNull PsiBuilder builder_, @SuppressWarnings(\"UnusedParameters\") int level, String mode) {\n    TObjectIntHashMap<String> flags = getParsingModes(builder_);\n    if (!flags.increment(mode)) flags.put(mode, 1);\n    return true;\n  }\n\n  private static boolean exitMode(@NotNull PsiBuilder builder_, @SuppressWarnings(\"UnusedParameters\") int level, String mode, boolean safe) {\n    TObjectIntHashMap<String> flags = getParsingModes(builder_);\n    int count = flags.get(mode);\n    if (count == 1) flags.remove(mode);\n    else if (count > 1) flags.put(mode, count - 1);\n    else if (!safe) builder_.error(\"Could not exit inactive '\" + mode + \"' mode at offset \" + builder_.getCurrentOffset());\n    return true;\n  }\n\n  public static boolean exitMode(@NotNull PsiBuilder builder_, @SuppressWarnings(\"UnusedParameters\") int level, String mode) {\n    return exitMode(builder_, level,mode, false);\n  }\n  \n  public static boolean exitModeSafe(@NotNull PsiBuilder builder_, @SuppressWarnings(\"UnusedParameters\") int level, String mode) {\n    return exitMode(builder_, level,mode, true);\n  }\n\n  public static boolean isBuiltin(@NotNull PsiBuilder builder_, @SuppressWarnings(\"UnusedParameters\") int level) {\n    LighterASTNode marker = builder_.getLatestDoneMarker();\n    if (marker == null) return false;\n    String text = String.valueOf(builder_.getOriginalText().subSequence(marker.getStartOffset(), marker.getEndOffset())).trim();\n    return \"make\".equals(text) || \"new\".equals(text);\n  }\n\n  @Nullable\n  private static PsiBuilder.Marker getCurrentMarker(@NotNull PsiBuilder builder_) {\n    try {\n      for (Field field : builder_.getClass().getDeclaredFields()) {\n        if (\"MyList\".equals(field.getType().getSimpleName())) {\n          field.setAccessible(true);\n          //noinspection unchecked\n          return ContainerUtil.getLastItem((List<PsiBuilder.Marker>)field.get(builder_));\n        }\n      }\n    }\n    catch (Exception ignored) {}\n    return null;\n  }\n\n  public static boolean nextTokenIsSmart(PsiBuilder builder, IElementType token) {\n    return nextTokenIsFast(builder, token) || ErrorState.get(builder).completionState != null;\n  }\n\n  public static boolean nextTokenIsSmart(PsiBuilder builder, IElementType... tokens) {\n    return nextTokenIsFast(builder, tokens) || ErrorState.get(builder).completionState != null;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/project/GoApplicationLibrariesService.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.project;\n\nimport com.goide.GoConstants;\nimport com.goide.GoLibrariesState;\nimport com.goide.sdk.GoSdkUtil;\nimport com.intellij.openapi.application.ApplicationManager;\nimport com.intellij.openapi.components.ServiceManager;\nimport com.intellij.openapi.components.State;\nimport com.intellij.openapi.components.Storage;\nimport com.intellij.openapi.components.StoragePathMacros;\nimport org.jetbrains.annotations.NotNull;\n\n@State(\n  name = GoConstants.GO_LIBRARIES_SERVICE_NAME,\n  storages = @Storage(file = StoragePathMacros.APP_CONFIG + \"/\" + GoConstants.GO_LIBRARIES_CONFIG_FILE)\n)\npublic class GoApplicationLibrariesService extends GoLibrariesService<GoApplicationLibrariesService.GoApplicationLibrariesState> {\n  @NotNull\n  @Override\n  protected GoApplicationLibrariesState createState() {\n    return new GoApplicationLibrariesState();\n  }\n\n  public static GoApplicationLibrariesService getInstance() {\n    return ServiceManager.getService(GoApplicationLibrariesService.class);\n  }\n\n  public boolean isUseGoPathFromSystemEnvironment() {\n    return myState.isUseGoPathFromSystemEnvironment();\n  }\n\n  public void setUseGoPathFromSystemEnvironment(boolean useGoPathFromSystemEnvironment) {\n    if (myState.isUseGoPathFromSystemEnvironment() != useGoPathFromSystemEnvironment) {\n      myState.setUseGoPathFromSystemEnvironment(useGoPathFromSystemEnvironment);\n      if (!GoSdkUtil.getGoPathsRootsFromEnvironment().isEmpty()) {\n        incModificationCount();\n        ApplicationManager.getApplication().getMessageBus().syncPublisher(LIBRARIES_TOPIC).librariesChanged(getLibraryRootUrls());\n      }\n    }\n  }\n\n  public static class GoApplicationLibrariesState extends GoLibrariesState {\n    private boolean myUseGoPathFromSystemEnvironment = true;\n\n    public boolean isUseGoPathFromSystemEnvironment() {\n      return myUseGoPathFromSystemEnvironment;\n    }\n\n    public void setUseGoPathFromSystemEnvironment(boolean useGoPathFromSystemEnvironment) {\n      myUseGoPathFromSystemEnvironment = useGoPathFromSystemEnvironment;\n    }\n  } \n}\n"
  },
  {
    "path": "src/com/goide/project/GoBuildTargetSettings.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.project;\n\nimport com.intellij.openapi.util.SimpleModificationTracker;\nimport com.intellij.util.ArrayUtil;\nimport com.intellij.util.ThreeState;\nimport com.intellij.util.xmlb.annotations.Tag;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.Arrays;\n\n@Tag(\"buildTags\")\npublic class GoBuildTargetSettings extends SimpleModificationTracker {\n  public static final String ANY_COMPILER = \"Any\";\n  public static final String DEFAULT = \"default\";\n\n  @NotNull public String os = DEFAULT;\n  @NotNull public String arch = DEFAULT;\n  @NotNull public ThreeState cgo = ThreeState.UNSURE;\n  @NotNull public String compiler = ANY_COMPILER;\n  @NotNull public String goVersion = DEFAULT;\n  @NotNull public String[] customFlags = ArrayUtil.EMPTY_STRING_ARRAY;\n\n  @Override\n  public boolean equals(Object o) {\n    if (this == o) return true;\n    if (!(o instanceof GoBuildTargetSettings)) return false;\n\n    GoBuildTargetSettings settings = (GoBuildTargetSettings)o;\n\n    if (!os.equals(settings.os)) return false;\n    if (!arch.equals(settings.arch)) return false;\n    if (cgo != settings.cgo) return false;\n    if (!compiler.equals(settings.compiler)) return false;\n    if (!goVersion.equals(settings.goVersion)) return false;\n    return Arrays.equals(customFlags, settings.customFlags);\n  }\n\n  @Override\n  public int hashCode() {\n    int result = os.hashCode();\n    result = 31 * result + arch.hashCode();\n    result = 31 * result + cgo.hashCode();\n    result = 31 * result + compiler.hashCode();\n    result = 31 * result + goVersion.hashCode();\n    result = 31 * result + Arrays.hashCode(customFlags);\n    return result;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/project/GoExcludedPathsSettings.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.project;\n\nimport com.intellij.openapi.components.*;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.SimpleModificationTracker;\nimport com.intellij.openapi.util.io.FileUtil;\nimport com.intellij.util.ArrayUtil;\nimport com.intellij.util.xmlb.XmlSerializerUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\n@State(\n  name = \"GoExcludedPaths\",\n  storages = {\n    @Storage(id = \"default\", file = StoragePathMacros.PROJECT_FILE),\n    @Storage(id = \"dir\", file = StoragePathMacros.PROJECT_CONFIG_DIR + \"/goExcludedPaths.xml\", scheme = StorageScheme.DIRECTORY_BASED)\n  }\n)\npublic class GoExcludedPathsSettings extends SimpleModificationTracker implements PersistentStateComponent<GoExcludedPathsSettings> {\n  private String[] myExcludedPackages = ArrayUtil.EMPTY_STRING_ARRAY;\n\n  public static GoExcludedPathsSettings getInstance(Project project) {\n    return ServiceManager.getService(project, GoExcludedPathsSettings.class);\n  }\n\n  @Nullable\n  @Override\n  public GoExcludedPathsSettings getState() {\n    return this;\n  }\n\n  @Override\n  public void loadState(GoExcludedPathsSettings state) {\n    XmlSerializerUtil.copyBean(state, this);\n  }\n\n  public String[] getExcludedPackages() {\n    return myExcludedPackages;\n  }\n\n  public void setExcludedPackages(String... excludedPackages) {\n    myExcludedPackages = excludedPackages;\n    incModificationCount();\n  }\n\n  public boolean isExcluded(@Nullable String importPath) {\n    if (importPath == null) {\n      return false;\n    }\n    for (String excludedPath : myExcludedPackages) {\n      if (FileUtil.isAncestor(excludedPath, importPath, false)) return true;\n    }\n    return false;\n  }\n\n  public void excludePath(@NotNull String importPath) {\n    setExcludedPackages(ArrayUtil.append(myExcludedPackages, importPath));\n  }\n}\n"
  },
  {
    "path": "src/com/goide/project/GoLibrariesService.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.project;\n\nimport com.goide.GoLibrariesState;\nimport com.intellij.openapi.application.ApplicationManager;\nimport com.intellij.openapi.components.PersistentStateComponent;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.ModificationTracker;\nimport com.intellij.openapi.util.SimpleModificationTracker;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.openapi.vfs.VirtualFileManager;\nimport com.intellij.util.containers.ContainerUtil;\nimport com.intellij.util.messages.Topic;\nimport com.intellij.util.xmlb.XmlSerializerUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.Arrays;\nimport java.util.Collection;\nimport java.util.Set;\n\npublic abstract class GoLibrariesService<T extends GoLibrariesState> extends SimpleModificationTracker implements PersistentStateComponent<T> {\n  public static final Topic<LibrariesListener> LIBRARIES_TOPIC = Topic.create(\"libraries changes\", LibrariesListener.class);\n  protected final T myState = createState();\n\n  @NotNull\n  @Override\n  public T getState() {\n    return myState;\n  }\n\n  @Override\n  public void loadState(T state) {\n    XmlSerializerUtil.copyBean(state, myState);\n  }\n\n  @NotNull\n  protected T createState() {\n    //noinspection unchecked\n    return (T)new GoLibrariesState();\n  }\n\n  @NotNull\n  public static Collection<? extends VirtualFile> getUserDefinedLibraries(@NotNull Module module) {\n    Set<VirtualFile> result = ContainerUtil.newLinkedHashSet();\n    result.addAll(goRootsFromUrls(GoModuleLibrariesService.getInstance(module).getLibraryRootUrls()));\n    result.addAll(getUserDefinedLibraries(module.getProject()));\n    return result;\n  }\n\n  @NotNull\n  public static Collection<? extends VirtualFile> getUserDefinedLibraries(@NotNull Project project) {\n    Set<VirtualFile> result = ContainerUtil.newLinkedHashSet();\n    result.addAll(goRootsFromUrls(GoProjectLibrariesService.getInstance(project).getLibraryRootUrls()));\n    result.addAll(getUserDefinedLibraries());\n    return result;\n  }\n\n  @NotNull\n  public static Collection<? extends VirtualFile> getUserDefinedLibraries() {\n    return goRootsFromUrls(GoApplicationLibrariesService.getInstance().getLibraryRootUrls());\n  }\n\n  @NotNull\n  public static ModificationTracker[] getModificationTrackers(@NotNull Project project, @Nullable Module module) {\n    return module != null\n           ? new ModificationTracker[]{GoModuleLibrariesService.getInstance(module), GoProjectLibrariesService.getInstance(module.getProject()), GoApplicationLibrariesService.getInstance()}\n           : new ModificationTracker[]{GoProjectLibrariesService.getInstance(project), GoApplicationLibrariesService.getInstance()};\n  }\n  \n  public void setLibraryRootUrls(@NotNull String... libraryRootUrls) {\n    setLibraryRootUrls(Arrays.asList(libraryRootUrls));\n  }\n  \n  public void setLibraryRootUrls(@NotNull Collection<String> libraryRootUrls) {\n    if (!myState.getUrls().equals(libraryRootUrls)) {\n      myState.setUrls(libraryRootUrls);\n      incModificationCount();\n      ApplicationManager.getApplication().getMessageBus().syncPublisher(LIBRARIES_TOPIC).librariesChanged(libraryRootUrls);\n    }\n  }\n\n  @NotNull\n  public Collection<String> getLibraryRootUrls() {\n    return myState.getUrls();\n  }\n\n  @NotNull\n  private static Collection<? extends VirtualFile> goRootsFromUrls(@NotNull Collection<String> urls) {\n    return ContainerUtil.mapNotNull(urls, url -> VirtualFileManager.getInstance().findFileByUrl(url));\n  }\n\n  public interface LibrariesListener {\n    void librariesChanged(@NotNull Collection<String> newRootUrls);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/project/GoModuleLibrariesInitializer.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.project;\n\nimport com.goide.GoConstants;\nimport com.goide.configuration.GoLibrariesConfigurableProvider;\nimport com.goide.sdk.GoSdkService;\nimport com.goide.sdk.GoSdkUtil;\nimport com.goide.util.GoUtil;\nimport com.intellij.ProjectTopics;\nimport com.intellij.ide.util.PropertiesComponent;\nimport com.intellij.notification.Notification;\nimport com.intellij.notification.NotificationListener;\nimport com.intellij.notification.NotificationType;\nimport com.intellij.notification.Notifications;\nimport com.intellij.openapi.Disposable;\nimport com.intellij.openapi.application.ApplicationManager;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.module.ModuleComponent;\nimport com.intellij.openapi.progress.ProgressIndicatorProvider;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.roots.*;\nimport com.intellij.openapi.roots.impl.OrderEntryUtil;\nimport com.intellij.openapi.roots.impl.libraries.LibraryEx;\nimport com.intellij.openapi.roots.libraries.Library;\nimport com.intellij.openapi.roots.libraries.LibraryTable;\nimport com.intellij.openapi.roots.libraries.LibraryTablesRegistrar;\nimport com.intellij.openapi.startup.StartupManager;\nimport com.intellij.openapi.util.Disposer;\nimport com.intellij.openapi.vfs.*;\nimport com.intellij.psi.PsiFileSystemItem;\nimport com.intellij.psi.search.FilenameIndex;\nimport com.intellij.util.Alarm;\nimport com.intellij.util.ThreeState;\nimport com.intellij.util.containers.ContainerUtil;\nimport com.intellij.util.messages.MessageBusConnection;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.TestOnly;\n\nimport javax.swing.event.HyperlinkEvent;\nimport java.util.Collection;\nimport java.util.List;\nimport java.util.Set;\n\npublic class GoModuleLibrariesInitializer implements ModuleComponent {\n  private static final String GO_LIB_NAME = \"GOPATH\";\n  private static final String GO_LIBRARIES_NOTIFICATION_HAD_BEEN_SHOWN = \"go.libraries.notification.had.been.shown\";\n  private static final String GO_VENDORING_NOTIFICATION_HAD_BEEN_SHOWN = \"go.vendoring.notification.had.been.shown\";\n  private static final int UPDATE_DELAY = 300;\n  private static boolean isTestingMode;\n\n  private final Alarm myAlarm;\n  private final MessageBusConnection myConnection;\n  private boolean myModuleInitialized;\n\n  @NotNull private final Set<VirtualFile> myLastHandledGoPathSourcesRoots = ContainerUtil.newHashSet();\n  @NotNull private final Set<VirtualFile> myLastHandledExclusions = ContainerUtil.newHashSet();\n  @NotNull private final Set<LocalFileSystem.WatchRequest> myWatchedRequests = ContainerUtil.newHashSet();\n\n  @NotNull private final Module myModule;\n  @NotNull private final VirtualFileAdapter myFilesListener = new VirtualFileAdapter() {\n    @Override\n    public void fileCreated(@NotNull VirtualFileEvent event) {\n      if (GoConstants.VENDOR.equals(event.getFileName()) && event.getFile().isDirectory()) {\n        showVendoringNotification();\n      }\n    }\n  };\n\n  @TestOnly\n  public static void setTestingMode(@NotNull Disposable disposable) {\n    isTestingMode = true;\n    Disposer.register(disposable, () -> {\n      //noinspection AssignmentToStaticFieldFromInstanceMethod\n      isTestingMode = false;\n    });\n  }\n\n  public GoModuleLibrariesInitializer(@NotNull Module module) {\n    myModule = module;\n    myAlarm = ApplicationManager.getApplication().isUnitTestMode() ? new Alarm() : new Alarm(Alarm.ThreadToUse.POOLED_THREAD, myModule);\n    myConnection = myModule.getMessageBus().connect();\n  }\n\n  @Override\n  public void moduleAdded() {\n    if (!myModuleInitialized) {\n      myConnection.subscribe(ProjectTopics.PROJECT_ROOTS, new ModuleRootAdapter() {\n        @Override\n        public void rootsChanged(ModuleRootEvent event) {\n          scheduleUpdate();\n        }\n      });\n      myConnection.subscribe(GoLibrariesService.LIBRARIES_TOPIC, newRootUrls -> scheduleUpdate());\n\n      Project project = myModule.getProject();\n      StartupManager.getInstance(project).runWhenProjectIsInitialized(() -> {\n        if (!project.isDisposed() && !myModule.isDisposed()) {\n          for (PsiFileSystemItem vendor : FilenameIndex.getFilesByName(project, GoConstants.VENDOR, GoUtil.moduleScope(myModule), true)) {\n            if (vendor.isDirectory()) {\n              showVendoringNotification();\n              break;\n            }\n          }\n        }\n      });\n\n      VirtualFileManager.getInstance().addVirtualFileListener(myFilesListener);\n    }\n    scheduleUpdate(0);\n    myModuleInitialized = true;\n  }\n\n  private void scheduleUpdate() {\n    scheduleUpdate(UPDATE_DELAY);\n  }\n\n  private void scheduleUpdate(int delay) {\n    myAlarm.cancelAllRequests();\n    UpdateRequest updateRequest = new UpdateRequest();\n    if (isTestingMode) {\n      ApplicationManager.getApplication().invokeLater(updateRequest);\n    }\n    else {\n      myAlarm.addRequest(updateRequest, delay);\n    }\n  }\n\n  private void attachLibraries(@NotNull Collection<VirtualFile> libraryRoots, Set<VirtualFile> exclusions) {\n    ApplicationManager.getApplication().assertIsDispatchThread();\n\n    if (!libraryRoots.isEmpty()) {\n      ApplicationManager.getApplication().runWriteAction(() -> {\n        ModuleRootManager model = ModuleRootManager.getInstance(myModule);\n        LibraryOrderEntry goLibraryEntry = OrderEntryUtil.findLibraryOrderEntry(model, getLibraryName());\n\n        if (goLibraryEntry != null && goLibraryEntry.isValid()) {\n          Library library = goLibraryEntry.getLibrary();\n          if (library != null && !((LibraryEx)library).isDisposed()) {\n            fillLibrary(library, libraryRoots, exclusions);\n          }\n        }\n        else {\n          LibraryTable libraryTable = LibraryTablesRegistrar.getInstance().getLibraryTable(myModule.getProject());\n          Library library = libraryTable.createLibrary(getLibraryName());\n          fillLibrary(library, libraryRoots, exclusions);\n          ModuleRootModificationUtil.addDependency(myModule, library);\n        }\n      });\n      showNotification(myModule.getProject());\n    }\n    else {\n      removeLibraryIfNeeded();\n    }\n  }\n\n  public String getLibraryName() {\n    return GO_LIB_NAME + \" <\" + myModule.getName() + \">\";\n  }\n\n  private static void fillLibrary(@NotNull Library library, @NotNull Collection<VirtualFile> libraryRoots, Set<VirtualFile> exclusions) {\n    ApplicationManager.getApplication().assertWriteAccessAllowed();\n\n    Library.ModifiableModel libraryModel = library.getModifiableModel();\n    for (String root : libraryModel.getUrls(OrderRootType.CLASSES)) {\n      libraryModel.removeRoot(root, OrderRootType.CLASSES);\n    }\n    for (String root : libraryModel.getUrls(OrderRootType.SOURCES)) {\n      libraryModel.removeRoot(root, OrderRootType.SOURCES);\n    }\n    for (VirtualFile libraryRoot : libraryRoots) {\n      libraryModel.addRoot(libraryRoot, OrderRootType.CLASSES); // in order to consider GOPATH as library and show it in Ext. Libraries\n      libraryModel.addRoot(libraryRoot, OrderRootType.SOURCES); // in order to find usages inside GOPATH\n    }\n    for (VirtualFile root : exclusions) {\n      ((LibraryEx.ModifiableModelEx)libraryModel).addExcludedRoot(root.getUrl());\n    }\n    libraryModel.commit();\n  }\n\n  private void removeLibraryIfNeeded() {\n    ApplicationManager.getApplication().assertIsDispatchThread();\n\n    ModifiableModelsProvider modelsProvider = ModifiableModelsProvider.SERVICE.getInstance();\n    ModifiableRootModel model = modelsProvider.getModuleModifiableModel(myModule);\n    LibraryOrderEntry goLibraryEntry = OrderEntryUtil.findLibraryOrderEntry(model, getLibraryName());\n    if (goLibraryEntry != null) {\n      ApplicationManager.getApplication().runWriteAction(() -> {\n        Library library = goLibraryEntry.getLibrary();\n        if (library != null) {\n          LibraryTable table = library.getTable();\n          if (table != null) {\n            table.removeLibrary(library);\n            model.removeOrderEntry(goLibraryEntry);\n            modelsProvider.commitModuleModifiableModel(model);\n          }\n        }\n        else {\n          modelsProvider.disposeModuleModifiableModel(model);\n        }\n      });\n    }\n    else {\n      ApplicationManager.getApplication().runWriteAction(() -> modelsProvider.disposeModuleModifiableModel(model));\n    }\n  }\n\n  private static void showNotification(@NotNull Project project) {\n    PropertiesComponent propertiesComponent = PropertiesComponent.getInstance();\n    PropertiesComponent projectPropertiesComponent = PropertiesComponent.getInstance(project);\n    boolean shownAlready;\n    //noinspection SynchronizationOnLocalVariableOrMethodParameter\n    synchronized (propertiesComponent) {\n      shownAlready = propertiesComponent.getBoolean(GO_LIBRARIES_NOTIFICATION_HAD_BEEN_SHOWN, false)\n                     || projectPropertiesComponent.getBoolean(GO_LIBRARIES_NOTIFICATION_HAD_BEEN_SHOWN, false);\n      if (!shownAlready) {\n        propertiesComponent.setValue(GO_LIBRARIES_NOTIFICATION_HAD_BEEN_SHOWN, String.valueOf(true));\n      }\n    }\n\n    if (!shownAlready) {\n      NotificationListener.Adapter notificationListener = new NotificationListener.Adapter() {\n        @Override\n        protected void hyperlinkActivated(@NotNull Notification notification, @NotNull HyperlinkEvent event) {\n          if (event.getEventType() == HyperlinkEvent.EventType.ACTIVATED && \"configure\".equals(event.getDescription())) {\n            GoLibrariesConfigurableProvider.showModulesConfigurable(project);\n          }\n        }\n      };\n      Notification notification = GoConstants.GO_NOTIFICATION_GROUP.createNotification(\"GOPATH was detected\",\n                                                                                       \"We've detected some libraries from your GOPATH.\\n\" +\n                                                                                       \"You may want to add extra libraries in <a href='configure'>Go Libraries configuration</a>.\",\n                                                                                       NotificationType.INFORMATION, notificationListener);\n      Notifications.Bus.notify(notification, project);\n    }\n  }\n\n  private void showVendoringNotification() {\n    if (!myModuleInitialized || myModule.isDisposed()) {\n      return;\n    }\n    Project project = myModule.getProject();\n    String version = GoSdkService.getInstance(project).getSdkVersion(myModule);\n    if (!GoVendoringUtil.supportsVendoring(version) || GoVendoringUtil.supportsVendoringByDefault(version)) {\n      return;\n    }\n    if (GoModuleSettings.getInstance(myModule).getVendoringEnabled() != ThreeState.UNSURE) {\n      return;\n    }\n\n    PropertiesComponent propertiesComponent = PropertiesComponent.getInstance(project);\n    boolean shownAlready;\n    //noinspection SynchronizationOnLocalVariableOrMethodParameter\n    synchronized (propertiesComponent) {\n      shownAlready = propertiesComponent.getBoolean(GO_VENDORING_NOTIFICATION_HAD_BEEN_SHOWN, false);\n      if (!shownAlready) {\n        propertiesComponent.setValue(GO_VENDORING_NOTIFICATION_HAD_BEEN_SHOWN, String.valueOf(true));\n      }\n    }\n\n    if (!shownAlready) {\n      NotificationListener.Adapter notificationListener = new NotificationListener.Adapter() {\n        @Override\n        protected void hyperlinkActivated(@NotNull Notification notification, @NotNull HyperlinkEvent event) {\n          if (event.getEventType() == HyperlinkEvent.EventType.ACTIVATED && \"configure\".equals(event.getDescription())) {\n            GoModuleSettings.showModulesConfigurable(project);\n          }\n        }\n      };\n      Notification notification = GoConstants.GO_NOTIFICATION_GROUP.createNotification(\"Vendoring usage is detected\",\n                                                                                       \"<p><strong>vendor</strong> directory usually means that project uses Go Vendor Experiment.</p>\\n\" +\n                                                                                       \"<p>Selected Go SDK version support vendoring but it's disabled by default.</p>\\n\" +\n                                                                                       \"<p>You may want to explicitly enabled Go Vendor Experiment in the <a href='configure'>project settings</a>.</p>\",\n                                                                                       NotificationType.INFORMATION, notificationListener);\n      Notifications.Bus.notify(notification, project);\n    }\n  }\n\n  @Override\n  public void initComponent() {\n\n  }\n\n  @Override\n  public void disposeComponent() {\n    Disposer.dispose(myConnection);\n    Disposer.dispose(myAlarm);\n    VirtualFileManager.getInstance().removeVirtualFileListener(myFilesListener);\n    myLastHandledGoPathSourcesRoots.clear();\n    myLastHandledExclusions.clear();\n    LocalFileSystem.getInstance().removeWatchedRoots(myWatchedRequests);\n    myWatchedRequests.clear();\n  }\n\n  @Override\n  public void projectOpened() {\n\n  }\n\n  @Override\n  public void projectClosed() {\n    disposeComponent();\n  }\n\n  @NotNull\n  @Override\n  public String getComponentName() {\n    return getClass().getName();\n  }\n\n  private class UpdateRequest implements Runnable {\n    @Override\n    public void run() {\n      Project project = myModule.getProject();\n      if (GoSdkService.getInstance(project).isGoModule(myModule)) {\n        synchronized (myLastHandledGoPathSourcesRoots) {\n          Collection<VirtualFile> goPathSourcesRoots = GoSdkUtil.getGoPathSources(project, myModule);\n          Set<VirtualFile> excludeRoots = ContainerUtil.newHashSet(ProjectRootManager.getInstance(project).getContentRoots());\n          ProgressIndicatorProvider.checkCanceled();\n          if (!myLastHandledGoPathSourcesRoots.equals(goPathSourcesRoots) || !myLastHandledExclusions.equals(excludeRoots)) {\n            Collection<VirtualFile> includeRoots = gatherIncludeRoots(goPathSourcesRoots, excludeRoots);\n            ApplicationManager.getApplication().invokeLater(() -> {\n              if (!myModule.isDisposed() && GoSdkService.getInstance(project).isGoModule(myModule)) {\n                attachLibraries(includeRoots, excludeRoots);\n              }\n            });\n\n            myLastHandledGoPathSourcesRoots.clear();\n            myLastHandledGoPathSourcesRoots.addAll(goPathSourcesRoots);\n\n            myLastHandledExclusions.clear();\n            myLastHandledExclusions.addAll(excludeRoots);\n\n            List<String> paths = ContainerUtil.map(goPathSourcesRoots, VirtualFile::getPath);\n            myWatchedRequests.clear();\n            myWatchedRequests.addAll(LocalFileSystem.getInstance().addRootsToWatch(paths, true));\n          }\n        }\n      }\n      else {\n        synchronized (myLastHandledGoPathSourcesRoots) {\n          LocalFileSystem.getInstance().removeWatchedRoots(myWatchedRequests);\n          myLastHandledGoPathSourcesRoots.clear();\n          myLastHandledExclusions.clear();\n          ApplicationManager.getApplication().invokeLater(() -> {\n            if (!myModule.isDisposed() && GoSdkService.getInstance(project).isGoModule(myModule)) {\n              removeLibraryIfNeeded();\n            }\n          });\n        }\n      }\n    }\n  }\n\n  @NotNull\n  private static Collection<VirtualFile> gatherIncludeRoots(Collection<VirtualFile> goPathSourcesRoots, Set<VirtualFile> excludeRoots) {\n    Collection<VirtualFile> includeRoots = ContainerUtil.newHashSet();\n    for (VirtualFile goPathSourcesDirectory : goPathSourcesRoots) {\n      ProgressIndicatorProvider.checkCanceled();\n      boolean excludedRootIsAncestor = false;\n      for (VirtualFile excludeRoot : excludeRoots) {\n        ProgressIndicatorProvider.checkCanceled();\n        if (VfsUtilCore.isAncestor(excludeRoot, goPathSourcesDirectory, false)) {\n          excludedRootIsAncestor = true;\n          break;\n        }\n      }\n      if (excludedRootIsAncestor) {\n        continue;\n      }\n      for (VirtualFile file : goPathSourcesDirectory.getChildren()) {\n        ProgressIndicatorProvider.checkCanceled();\n        if (file.isDirectory() && !excludeRoots.contains(file)) {\n          includeRoots.add(file);\n        }\n      }\n    }\n    return includeRoots;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/project/GoModuleLibrariesService.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.project;\n\nimport com.goide.GoConstants;\nimport com.goide.GoLibrariesState;\nimport com.intellij.openapi.components.State;\nimport com.intellij.openapi.components.Storage;\nimport com.intellij.openapi.components.StoragePathMacros;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.module.ModuleServiceManager;\nimport org.jetbrains.annotations.NotNull;\n\n@State(\n  name = GoConstants.GO_LIBRARIES_SERVICE_NAME,\n  storages = @Storage(file = StoragePathMacros.MODULE_FILE)\n)\npublic class GoModuleLibrariesService extends GoLibrariesService<GoLibrariesState> {\n  public static GoModuleLibrariesService getInstance(@NotNull Module module) {\n    return ModuleServiceManager.getService(module, GoModuleLibrariesService.class);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/project/GoModuleSettings.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.project;\n\nimport com.goide.GoConstants;\nimport com.goide.configuration.GoConfigurableProvider;\nimport com.goide.configuration.GoModuleSettingsConfigurable;\nimport com.intellij.codeInsight.daemon.DaemonCodeAnalyzer;\nimport com.intellij.openapi.application.ApplicationManager;\nimport com.intellij.openapi.components.PersistentStateComponent;\nimport com.intellij.openapi.components.State;\nimport com.intellij.openapi.components.Storage;\nimport com.intellij.openapi.components.StoragePathMacros;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.module.ModuleServiceManager;\nimport com.intellij.openapi.options.ShowSettingsUtil;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.psi.impl.source.resolve.ResolveCache;\nimport com.intellij.util.ThreeState;\nimport com.intellij.util.messages.Topic;\nimport com.intellij.util.xmlb.XmlSerializerUtil;\nimport com.intellij.util.xmlb.annotations.OptionTag;\nimport com.intellij.util.xmlb.annotations.Property;\nimport org.jetbrains.annotations.NotNull;\n\n@State(name = GoConstants.GO_MODULE_SESTTINGS_SERVICE_NAME, storages = @Storage(file = StoragePathMacros.MODULE_FILE))\npublic class GoModuleSettings implements PersistentStateComponent<GoModuleSettings.GoModuleSettingsState> {\n  public static final Topic<BuildTargetListener> TOPIC = Topic.create(\"build target changed\", BuildTargetListener.class);\n\n  @NotNull\n  private final GoModuleSettingsState myState = new GoModuleSettingsState();\n  @NotNull\n  private final Module myModule;\n\n  public GoModuleSettings(@NotNull Module module) {\n    myModule = module;\n  }\n\n  public static GoModuleSettings getInstance(@NotNull Module module) {\n    return ModuleServiceManager.getService(module, GoModuleSettings.class);\n  }\n\n  @NotNull\n  public ThreeState getVendoringEnabled() {\n    return myState.vendoring;\n  }\n\n  public void setVendoringEnabled(@NotNull ThreeState vendoringEnabled) {\n    if (vendoringEnabled != myState.vendoring) {\n      cleanResolveCaches();\n    }\n    myState.vendoring = vendoringEnabled;\n  }\n\n  @NotNull\n  public GoBuildTargetSettings getBuildTargetSettings() {\n    return myState.buildTargetSettings;\n  }\n\n  public void setBuildTargetSettings(@NotNull GoBuildTargetSettings buildTargetSettings) {\n    if (!buildTargetSettings.equals(myState.buildTargetSettings)) {\n      XmlSerializerUtil.copyBean(buildTargetSettings, myState.buildTargetSettings);\n      if (!myModule.isDisposed()) {\n        myModule.getProject().getMessageBus().syncPublisher(TOPIC).changed(myModule);\n      }\n      cleanResolveCaches();\n      myState.buildTargetSettings.incModificationCount();\n    }\n  }\n\n  private void cleanResolveCaches() {\n    Project project = myModule.getProject();\n    if (!project.isDisposed()) {\n      ResolveCache.getInstance(project).clearCache(true);\n      DaemonCodeAnalyzer.getInstance(project).restart();\n    }\n  }\n\n  @NotNull\n  @Override\n  public GoModuleSettingsState getState() {\n    return myState;\n  }\n\n  @Override\n  public void loadState(GoModuleSettingsState state) {\n    XmlSerializerUtil.copyBean(state, myState);\n  }\n\n  public interface BuildTargetListener {\n    void changed(@NotNull Module module);\n  }\n\n  static class GoModuleSettingsState {\n    @OptionTag\n    @NotNull\n    private ThreeState vendoring = ThreeState.UNSURE;\n\n    @Property(surroundWithTag = false)\n    @NotNull\n    private GoBuildTargetSettings buildTargetSettings = new GoBuildTargetSettings();\n  }\n\n  public static void showModulesConfigurable(@NotNull Project project) {\n    ApplicationManager.getApplication().assertIsDispatchThread();\n    if (!project.isDisposed()) {\n      ShowSettingsUtil.getInstance().editConfigurable(project, new GoConfigurableProvider.GoProjectSettingsConfigurable(project));\n    }\n  }\n\n  public static void showModulesConfigurable(@NotNull Module module) {\n    ApplicationManager.getApplication().assertIsDispatchThread();\n    if (!module.isDisposed()) {\n      ShowSettingsUtil.getInstance().editConfigurable(module.getProject(), new GoModuleSettingsConfigurable(module, true));\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/project/GoProjectLibrariesService.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.project;\n\nimport com.goide.GoConstants;\nimport com.goide.GoLibrariesState;\nimport com.intellij.openapi.components.*;\nimport com.intellij.openapi.project.Project;\nimport org.jetbrains.annotations.NotNull;\n\n@State(\n  name = GoConstants.GO_LIBRARIES_SERVICE_NAME,\n  storages = {\n    @Storage(id = \"default\", file = StoragePathMacros.PROJECT_FILE),\n    @Storage(id = \"dir\", file = StoragePathMacros.PROJECT_CONFIG_DIR + \"/\" + GoConstants.GO_LIBRARIES_CONFIG_FILE, scheme = StorageScheme.DIRECTORY_BASED)\n  }\n)\npublic class GoProjectLibrariesService extends GoLibrariesService<GoLibrariesState> {\n  public static GoProjectLibrariesService getInstance(@NotNull Project project) {\n    return ServiceManager.getService(project, GoProjectLibrariesService.class);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/project/GoProjectStructureDetector.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.project;\n\nimport com.goide.GoConstants;\nimport com.goide.GoModuleType;\nimport com.goide.sdk.GoSdkType;\nimport com.intellij.ide.util.importProject.ModuleDescriptor;\nimport com.intellij.ide.util.importProject.ProjectDescriptor;\nimport com.intellij.ide.util.projectWizard.ModuleWizardStep;\nimport com.intellij.ide.util.projectWizard.ProjectJdkForModuleStep;\nimport com.intellij.ide.util.projectWizard.importSources.DetectedProjectRoot;\nimport com.intellij.ide.util.projectWizard.importSources.ProjectFromSourcesBuilder;\nimport com.intellij.ide.util.projectWizard.importSources.ProjectStructureDetector;\nimport com.intellij.openapi.util.io.FileUtil;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\n\nimport javax.swing.*;\nimport java.io.File;\nimport java.util.Collection;\nimport java.util.Collections;\nimport java.util.List;\nimport java.util.regex.Pattern;\nimport java.util.stream.Collectors;\n\npublic class GoProjectStructureDetector extends ProjectStructureDetector {\n  @NotNull\n  @Override\n  public DirectoryProcessingResult detectRoots(@NotNull File dir,\n                                               @NotNull File[] children,\n                                               @NotNull File base,\n                                               @NotNull List<DetectedProjectRoot> result) {\n    Pattern pattern = Pattern.compile(\".*\\\\.go\");\n    List<File> filesByMask = FileUtil.findFilesByMask(pattern, base);\n    if (!filesByMask.isEmpty()) {\n      result.add(new DetectedProjectRoot(dir) {\n        @NotNull\n        @Override\n        public String getRootTypeName() {\n          return GoConstants.GO;\n        }\n      });\n    }\n    return DirectoryProcessingResult.SKIP_CHILDREN;\n  }\n\n  @Override\n  public void setupProjectStructure(@NotNull Collection<DetectedProjectRoot> roots,\n                                    @NotNull ProjectDescriptor projectDescriptor,\n                                    @NotNull ProjectFromSourcesBuilder builder) {\n    if (!roots.isEmpty() && !builder.hasRootsFromOtherDetectors(this)) {\n      if (projectDescriptor.getModules().isEmpty()) {\n        projectDescriptor.setModules(roots.stream()\n                                       .map(root -> new ModuleDescriptor(root.getDirectory(), GoModuleType.getInstance(),\n                                                                         ContainerUtil.emptyList())).collect(Collectors.toList()));\n      }\n    }\n  }\n\n  @NotNull\n  @Override\n  public List<ModuleWizardStep> createWizardSteps(@NotNull ProjectFromSourcesBuilder builder,\n                                                  ProjectDescriptor projectDescriptor,\n                                                  Icon stepIcon) {\n    ProjectJdkForModuleStep projectJdkForModuleStep = new ProjectJdkForModuleStep(builder.getContext(), GoSdkType.getInstance());\n    return Collections.singletonList(projectJdkForModuleStep);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/project/GoVendoringUtil.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.project;\n\nimport com.goide.sdk.GoSdkService;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.util.ThreeState;\nimport org.jetbrains.annotations.Contract;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoVendoringUtil {\n  public static boolean supportsVendoringByDefault(@Nullable String sdkVersion) {\n    if (sdkVersion == null || sdkVersion.length() < 3) {\n      return false;\n    }\n    return StringUtil.parseDouble(sdkVersion.substring(0, 3), 0) >= 1.6;\n  }\n\n  public static boolean vendoringCanBeDisabled(@Nullable String sdkVersion) {\n    if (sdkVersion == null || sdkVersion.length() < 3) {\n      return true;\n    }\n    return StringUtil.parseDouble(sdkVersion.substring(0, 3), 0) < 1.7;\n  }\n\n  public static boolean supportsInternalPackages(@Nullable String sdkVersion) {\n    if (sdkVersion == null || sdkVersion.length() < 3) {\n      return false;\n    }\n    return StringUtil.parseDouble(sdkVersion.substring(0, 3), 0) >= 1.5;\n  }\n\n  public static boolean supportsSdkInternalPackages(@Nullable String sdkVersion) {\n    if (sdkVersion == null || sdkVersion.length() < 3) {\n      return false;\n    }\n    return StringUtil.parseDouble(sdkVersion.substring(0, 3), 0) >= 1.4;\n  }\n\n  public static boolean supportsVendoring(@Nullable String sdkVersion) {\n    if (sdkVersion == null || sdkVersion.length() < 3) {\n      return false;\n    }\n    return StringUtil.parseDouble(sdkVersion.substring(0, 3), 0) >= 1.4;\n  }\n\n  @Contract(\"null -> false\")\n  public static boolean isVendoringEnabled(@Nullable Module module) {\n    if (module == null) {\n      return false;\n    }\n\n    String version = GoSdkService.getInstance(module.getProject()).getSdkVersion(module);\n    if (!vendoringCanBeDisabled(version)) {\n      return true;\n    }\n    ThreeState vendorSupportEnabled = GoModuleSettings.getInstance(module).getVendoringEnabled();\n    if (vendorSupportEnabled == ThreeState.UNSURE) {\n      return supportsVendoring(version) && supportsVendoringByDefault(version);\n    }\n    return vendorSupportEnabled.toBoolean();\n  }\n}\n"
  },
  {
    "path": "src/com/goide/project/migration/GoBuildTagsSettingsConverterProvider.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.project.migration;\n\nimport com.goide.GoConstants;\nimport com.goide.project.GoBuildTargetSettings;\nimport com.intellij.conversion.*;\nimport com.intellij.ide.impl.convert.JDomConvertingUtil;\nimport com.intellij.util.xmlb.XmlSerializer;\nimport org.jdom.Element;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\nimport org.jetbrains.jps.model.serialization.JDomSerializationUtil;\n\nimport java.io.File;\nimport java.util.Collection;\nimport java.util.Collections;\n\npublic class GoBuildTagsSettingsConverterProvider extends ConverterProvider {\n  protected GoBuildTagsSettingsConverterProvider() {\n    super(\"go-build-tags-settings\");\n  }\n\n  @NotNull\n  @Override\n  public String getConversionDescription() {\n    return \"Go project settings storing mechanism has been changed so project and its modules need to be updated\";\n  }\n\n  @NotNull\n  @Override\n  public ProjectConverter createConverter(@NotNull ConversionContext context) {\n    return new ProjectConverter() {\n      private GoBuildTargetSettings newSettings;\n\n      @NotNull\n      private File getGoBuildFlagsFile() {return new File(context.getSettingsBaseDir(), \"goBuildFlags.xml\");}\n\n      @Nullable\n      @Override\n      public ConversionProcessor<ProjectSettings> createProjectFileConverter() {\n        return new ConversionProcessor<ProjectSettings>() {\n          @Override\n          public boolean isConversionNeeded(@NotNull ProjectSettings settings) {\n            Element oldSettings = JDomSerializationUtil.findComponent(settings.getRootElement(), \"GoBuildFlags\");\n            return oldSettings != null;\n          }\n\n          @Override\n          public void process(@NotNull ProjectSettings settings) throws CannotConvertException {\n            Element oldSettings = JDomSerializationUtil.findComponent(settings.getRootElement(), \"GoBuildFlags\");\n            if (oldSettings != null) {\n              newSettings = XmlSerializer.deserialize(oldSettings, GoBuildTargetSettings.class);\n              oldSettings.detach();\n            }\n          }\n        };\n      }\n\n      @Override\n      public Collection<File> getAdditionalAffectedFiles() {\n        return Collections.singletonList(getGoBuildFlagsFile());\n      }\n\n      @Override\n      public boolean isConversionNeeded() {\n        return getGoBuildFlagsFile().exists();\n      }\n\n      @Override\n      public void preProcessingFinished() throws CannotConvertException {\n        File oldSettingsFile = getGoBuildFlagsFile();\n        if (oldSettingsFile.exists()) {\n          Element oldSettingsRoot = JDomConvertingUtil.loadDocument(oldSettingsFile).getRootElement();\n          Element buildFlagsSettings = JDomSerializationUtil.findComponent(oldSettingsRoot, \"GoBuildFlags\");\n          if (buildFlagsSettings != null) {\n            newSettings = XmlSerializer.deserialize(buildFlagsSettings, GoBuildTargetSettings.class);\n            buildFlagsSettings.detach();\n            //noinspection ResultOfMethodCallIgnored\n            oldSettingsFile.delete();\n          }\n        }\n      }\n\n      @Nullable\n      @Override\n      public ConversionProcessor<ModuleSettings> createModuleFileConverter() {\n        return new ConversionProcessor<ModuleSettings>() {\n          @Override\n          public boolean isConversionNeeded(@NotNull ModuleSettings settings) {\n            return getGoBuildFlagsFile().exists();\n          }\n\n          @Override\n          public void process(@NotNull ModuleSettings settings) throws CannotConvertException {\n            Element rootElement = settings.getRootElement();\n            Element goComponent =\n              JDomSerializationUtil.findOrCreateComponentElement(rootElement, GoConstants.GO_MODULE_SESTTINGS_SERVICE_NAME);\n            Element buildTags = XmlSerializer.serialize(newSettings);\n            Element existingBuildTags = goComponent.getChild(buildTags.getName());\n            if (existingBuildTags != null) {\n              existingBuildTags.detach();\n            }\n            goComponent.addContent(buildTags);\n          }\n        };\n      }\n    };\n  }\n}\n"
  },
  {
    "path": "src/com/goide/project/migration/GoProjectModelConverterProvider.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.project.migration;\n\nimport com.goide.GoConstants;\nimport com.goide.project.GoApplicationLibrariesService;\nimport com.goide.project.GoProjectLibrariesService;\nimport com.goide.sdk.GoSdkType;\nimport com.goide.sdk.GoSdkUtil;\nimport com.intellij.conversion.*;\nimport com.intellij.ide.impl.convert.JDomConvertingUtil;\nimport com.intellij.openapi.application.AccessToken;\nimport com.intellij.openapi.application.WriteAction;\nimport com.intellij.openapi.projectRoots.ProjectJdkTable;\nimport com.intellij.openapi.projectRoots.Sdk;\nimport com.intellij.openapi.projectRoots.impl.ProjectJdkImpl;\nimport com.intellij.openapi.roots.OrderRootType;\nimport com.intellij.openapi.roots.impl.ProjectRootManagerImpl;\nimport com.intellij.openapi.util.JDOMUtil;\nimport com.intellij.openapi.util.io.FileUtil;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.util.SystemProperties;\nimport com.intellij.util.containers.ContainerUtil;\nimport com.intellij.util.xmlb.XmlSerializer;\nimport org.jdom.Element;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\nimport org.jetbrains.jps.model.serialization.JDomSerializationUtil;\n\nimport java.io.File;\nimport java.io.IOException;\nimport java.util.Collection;\n\npublic class GoProjectModelConverterProvider extends ConverterProvider {\n  private static final String PROJECT_ROOT_MANAGER = \"ProjectRootManager\";\n\n  protected GoProjectModelConverterProvider() {\n    super(\"go-project-model\");\n  }\n\n  @NotNull\n  @Override\n  public String getConversionDescription() {\n    return \"Go project model has been changed so project and its modules need to be updated\";\n  }\n\n  @NotNull\n  @Override\n  public ProjectConverter createConverter(@NotNull ConversionContext context) {\n    return new ProjectConverter() {\n      private final Collection<File> additionalCreatedFiles = ContainerUtil.newArrayList();\n      private final Collection<File> additionalAffectedFiles = ContainerUtil.newArrayList();\n\n      @Nullable\n      @Override\n      public ConversionProcessor<ProjectSettings> createProjectFileConverter() {\n        return new ProjectFileConverter();\n      }\n\n      @Nullable\n      @Override\n      public ConversionProcessor<ModuleSettings> createModuleFileConverter() {\n        return new ModuleFileConverter();\n      }\n\n      @Nullable\n      @Override\n      public ConversionProcessor<RunManagerSettings> createRunConfigurationsConverter() {\n        return new RunConfigurationsConverter();\n      }\n\n      @Override\n      public boolean isConversionNeeded() {\n        Element component = getProjectRootManager(context);\n        return component != null && isGoSdkType(component.getAttributeValue(ProjectRootManagerImpl.PROJECT_JDK_TYPE_ATTR));\n      }\n\n      @Override\n      public void preProcessingFinished() throws CannotConvertException {\n        Element component = getProjectRootManager(context);\n        if (component != null) {\n          try {\n            File miscFile = miscFile(context);\n            updateSdkType(miscFile, component);\n            additionalAffectedFiles.add(miscFile);\n\n            File oldGoSettings = new File(context.getSettingsBaseDir(), \"go_settings.xml\");\n            if (oldGoSettings.exists()) {\n              Element oldGoSettingsRoot = rootElement(oldGoSettings);\n              if (isAttachProjectDirToLibraries(oldGoSettingsRoot)) {\n                File librariesConfigFile = new File(context.getSettingsBaseDir(), GoConstants.GO_LIBRARIES_CONFIG_FILE);\n                if (librariesConfigFile.exists()) {\n                  //noinspection ResultOfMethodCallIgnored\n                  librariesConfigFile.delete();\n                  additionalAffectedFiles.add(librariesConfigFile);\n                }\n                else {\n                  additionalCreatedFiles.add(librariesConfigFile);\n                }\n                FileUtil.writeToFile(librariesConfigFile, \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<project></project>\");\n                addProjectDirToLibraries(librariesConfigFile, rootElement(librariesConfigFile));\n              }\n            }\n            //noinspection ResultOfMethodCallIgnored\n            oldGoSettings.delete();\n          }\n          catch (IOException e) {\n            throw new CannotConvertException(\"Cannot convert go project\", e);\n          }\n        }\n        convertSdks();\n      }\n\n      @NotNull\n      @Override\n      public Collection<File> getAdditionalAffectedFiles() {\n        return additionalAffectedFiles;\n      }\n\n      @NotNull\n      @Override\n      public Collection<File> getCreatedFiles() {\n        return additionalCreatedFiles;\n      }\n    };\n  }\n\n  @NotNull\n  private static Element rootElement(@NotNull File file) throws CannotConvertException {\n    return JDomConvertingUtil.loadDocument(file).getRootElement();\n  }\n\n  private static class ProjectFileConverter extends ConversionProcessor<ProjectSettings> {\n    @Override\n    public boolean isConversionNeeded(@NotNull ProjectSettings settings) {\n      Element projectRootManager = getProjectRootManager(settings.getRootElement());\n      return projectRootManager != null && isGoSdkType(projectRootManager.getAttributeValue(ProjectRootManagerImpl.PROJECT_JDK_TYPE_ATTR));\n    }\n\n    @Override\n    public void process(@NotNull ProjectSettings settings) throws CannotConvertException {\n      Element projectRootManager = getProjectRootManager(settings.getRootElement());\n      if (projectRootManager != null) {\n        updateSdkType(settings.getFile(), projectRootManager);\n      }\n      if (isAttachProjectDirToLibraries(settings.getRootElement())) {\n        addProjectDirToLibraries(settings.getFile(), settings.getRootElement());\n      }\n      convertSdks();\n    }\n  }\n\n  private static class ModuleFileConverter extends ConversionProcessor<ModuleSettings> {\n    @Override\n    public boolean isConversionNeeded(@NotNull ModuleSettings settings) {\n      if (\"GO_APP_ENGINE_MODULE\".equals(settings.getModuleType())) return true;\n      for (Element element : settings.getOrderEntries()) {\n        if (isGoSdkType(element.getAttributeValue(\"jdkType\"))) {\n          return true;\n        }\n      }\n      return false;\n    }\n\n    @Override\n    public void process(@NotNull ModuleSettings settings) throws CannotConvertException {\n      settings.setModuleType(GoConstants.MODULE_TYPE_ID);\n      for (Element element : settings.getOrderEntries()) {\n        if (isGoSdkType(element.getAttributeValue(\"jdkType\"))) {\n          element.setAttribute(\"jdkType\", GoConstants.SDK_TYPE_ID);\n        }\n      }\n      convertSdks();\n    }\n  }\n\n  private static Element getProjectRootManager(@NotNull ConversionContext context) {\n    File miscFile = miscFile(context);\n    try {\n      if (miscFile.exists()) {\n        return getProjectRootManager(rootElement(miscFile));\n      }\n    }\n    catch (CannotConvertException e) {\n      return null;\n    }\n    return null;\n  }\n\n  @Nullable\n  private static Element getProjectRootManager(@Nullable Element rootElement) {\n    return rootElement != null ? JDomSerializationUtil.findComponent(rootElement, PROJECT_ROOT_MANAGER) : null;\n  }\n\n  private static void updateSdkType(@NotNull File file, @NotNull Element projectRootManager) throws CannotConvertException {\n    projectRootManager.setAttribute(ProjectRootManagerImpl.PROJECT_JDK_TYPE_ATTR, GoConstants.SDK_TYPE_ID);\n    saveFile(file, projectRootManager, \"Cannot save sdk type changing\");\n  }\n\n  @NotNull\n  private static File miscFile(@NotNull ConversionContext context) {\n    return new File(context.getSettingsBaseDir(), \"misc.xml\");\n  }\n\n  private static void addProjectDirToLibraries(@NotNull File file, @NotNull Element rootElement) throws CannotConvertException {\n    GoProjectLibrariesService librariesService = new GoProjectLibrariesService();\n    librariesService.setLibraryRootUrls(\"file://$PROJECT_DIR$\");\n    Element componentElement = JDomSerializationUtil.findOrCreateComponentElement(rootElement, GoConstants.GO_LIBRARIES_SERVICE_NAME);\n    XmlSerializer.serializeInto(librariesService.getState(), componentElement);\n    saveFile(file, rootElement, \"Cannot save libraries settings\");\n  }\n\n  \n  private static boolean isAttachProjectDirToLibraries(Element rootElement) {\n    Element goProjectSettings = JDomSerializationUtil.findComponent(rootElement, \"GoProjectSettings\");\n    if (goProjectSettings != null) {\n      for (Element option : goProjectSettings.getChildren(\"option\")) {\n        if (\"prependGoPath\".equals(option.getAttributeValue(\"name\"))) {\n          goProjectSettings.detach();\n          return \"true\".equalsIgnoreCase(option.getAttributeValue(\"value\"));\n        }\n      }\n      goProjectSettings.detach();\n    }\n    return false;\n  }\n\n  private static boolean isGoSdkType(String sdkTypeName) {\n    return \"Google Go SDK\".equals(sdkTypeName) || \"Google Go App Engine SDK\".equals(sdkTypeName);\n  }\n\n  private static void saveFile(@NotNull File file, @NotNull Element rootElement, String errorMessage) throws CannotConvertException {\n    try {\n      JDOMUtil.writeDocument(rootElement.getDocument(), file, SystemProperties.getLineSeparator());\n    }\n    catch (IOException e) {\n      throw new CannotConvertException(errorMessage, e);\n    }\n  }\n\n  private static void convertSdks() {\n    ProjectJdkTable sdkTable = ProjectJdkTable.getInstance();\n    Collection<String> globalGoPathUrls = ContainerUtil.newLinkedHashSet();\n    Collection<Sdk> sdksToDelete = ContainerUtil.newArrayList();\n    Collection<Sdk> sdksToAdd = ContainerUtil.newArrayList();\n    GoSdkType sdkType = GoSdkType.getInstance();\n    for (Sdk sdk : sdkTable.getAllJdks()) {\n      String sdkTypeName = sdk.getSdkType().getName();\n      if (isGoSdkType(sdkTypeName)) {\n        sdksToDelete.add(sdk);\n        String sdkHome = sdkType.adjustSelectedSdkHome(sdk.getHomePath());\n        if (sdkType.isValidSdkHome(sdkHome)) {\n          ProjectJdkImpl newSdk = new ProjectJdkImpl(sdk.getName(), sdkType, sdkHome, sdkType.getVersionString(sdkHome));\n          sdkType.setupSdkPaths(newSdk);\n          sdksToAdd.add(newSdk);\n\n          for (String classesRoot : sdk.getRootProvider().getUrls(OrderRootType.CLASSES)) {\n            if (!classesRoot.equals(sdk.getHomePath())) {\n              globalGoPathUrls.add(classesRoot);\n            }\n          }\n        }\n      }\n    }\n\n    for (VirtualFile file : GoSdkUtil.getGoPathsRootsFromEnvironment()) {\n      globalGoPathUrls.remove(file.getUrl());\n    }\n\n    AccessToken l = WriteAction.start();\n    try {\n      for (Sdk sdk : sdksToDelete) {\n        sdkTable.removeJdk(sdk);\n      }\n      for (Sdk sdk : sdksToAdd) {\n        sdkTable.addJdk(sdk);\n      }\n      globalGoPathUrls.addAll(GoApplicationLibrariesService.getInstance().getLibraryRootUrls());\n      GoApplicationLibrariesService.getInstance().setLibraryRootUrls(globalGoPathUrls);\n    }\n    finally {\n      l.finish();\n    }\n  }\n\n  private static class RunConfigurationsConverter extends ConversionProcessor<RunManagerSettings> {\n    @Override\n    public boolean isConversionNeeded(@NotNull RunManagerSettings settings) {\n      for (Element element : settings.getRunConfigurations()) {\n        String confType = element.getAttributeValue(\"type\");\n        if (\"GaeLocalAppEngineServer\".equals(confType) || \"GoTestConfiguration\".equals(confType)) {\n          return true;\n        }\n      }\n      return false;\n    }\n\n    @Override\n    public void process(@NotNull RunManagerSettings settings) throws CannotConvertException {\n      for (Element element : settings.getRunConfigurations()) {\n        String confType = element.getAttributeValue(\"type\");\n        if (\"GaeLocalAppEngineServer\".equals(confType) || \"GoTestConfiguration\".equals(confType)) {\n          element.detach();\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/psi/GoCaseClause.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi;\n\nimport com.intellij.psi.PsiElement;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.List;\n\npublic interface GoCaseClause extends GoCompositeElement {\n  @Nullable\n  PsiElement getColon();\n\n  @NotNull\n  List<GoStatement> getStatementList();\n\n  @Nullable\n  PsiElement getDefault();\n}\n"
  },
  {
    "path": "src/com/goide/psi/GoCompositeElement.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi;\n\nimport com.intellij.psi.PsiElement;\n\npublic interface GoCompositeElement extends PsiElement {\n  boolean shouldGoDeeper();\n}\n"
  },
  {
    "path": "src/com/goide/psi/GoCompositeElementType.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi;\n\nimport com.goide.GoLanguage;\nimport com.intellij.psi.tree.IElementType;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoCompositeElementType extends IElementType {\n  public GoCompositeElementType(@NotNull String debug) {\n    super(debug, GoLanguage.INSTANCE);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/psi/GoFile.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi;\n\nimport com.goide.GoConstants;\nimport com.goide.GoFileType;\nimport com.goide.GoLanguage;\nimport com.goide.GoTypes;\nimport com.goide.psi.impl.GoPsiImplUtil;\nimport com.goide.runconfig.testing.GoTestFinder;\nimport com.goide.sdk.GoPackageUtil;\nimport com.goide.sdk.GoSdkUtil;\nimport com.goide.stubs.GoConstSpecStub;\nimport com.goide.stubs.GoFileStub;\nimport com.goide.stubs.GoVarSpecStub;\nimport com.goide.stubs.types.*;\nimport com.goide.util.GoUtil;\nimport com.intellij.extapi.psi.PsiFileBase;\nimport com.intellij.openapi.fileTypes.FileType;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.module.ModuleUtilCore;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.psi.*;\nimport com.intellij.psi.search.GlobalSearchScope;\nimport com.intellij.psi.search.SearchScope;\nimport com.intellij.psi.stubs.StubElement;\nimport com.intellij.psi.tree.IElementType;\nimport com.intellij.psi.util.CachedValueProvider;\nimport com.intellij.psi.util.CachedValuesManager;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport com.intellij.util.ArrayFactory;\nimport com.intellij.util.ArrayUtil;\nimport com.intellij.util.containers.ContainerUtil;\nimport com.intellij.util.containers.MultiMap;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.Arrays;\nimport java.util.Collection;\nimport java.util.List;\nimport java.util.Map;\n\npublic class GoFile extends PsiFileBase {\n\n  public GoFile(@NotNull FileViewProvider viewProvider) {\n    super(viewProvider, GoLanguage.INSTANCE);\n  }\n\n  @Nullable\n  public String getImportPath(boolean withVendoring) {\n    return GoSdkUtil.getImportPath(getParent(), withVendoring);\n  }\n\n  @NotNull\n  @Override\n  public GlobalSearchScope getResolveScope() {\n    return GoUtil.goPathResolveScope(this);\n  }\n\n  @NotNull\n  @Override\n  public SearchScope getUseScope() {\n    return GoUtil.goPathUseScope(this, true);\n  }\n\n  @Nullable\n  public GoPackageClause getPackage() {\n    return CachedValuesManager.getCachedValue(this, () -> {\n      GoFileStub stub = getStub();\n      if (stub != null) {\n        StubElement<GoPackageClause> packageClauseStub = stub.getPackageClauseStub();\n        return CachedValueProvider.Result.create(packageClauseStub != null ? packageClauseStub.getPsi() : null, this);\n      }\n      return CachedValueProvider.Result.create(findChildByClass(GoPackageClause.class), this);\n    });\n  }\n\n  @Nullable\n  public GoImportList getImportList() {\n    return findChildByClass(GoImportList.class);\n  }\n\n  @Nullable\n  public String getBuildFlags() {\n    GoFileStub stub = getStub();\n    if (stub != null) {\n      return stub.getBuildFlags();\n    }\n\n    // https://code.google.com/p/go/source/browse/src/pkg/go/build/build.go?r=2449e85a115014c3d9251f86d499e5808141e6bc#790\n    Collection<String> buildFlags = ContainerUtil.newArrayList();\n    int buildFlagLength = GoConstants.BUILD_FLAG.length();\n    for (PsiComment comment : getCommentsToConsider(this)) {\n      String commentText = StringUtil.trimStart(comment.getText(), \"//\").trim();\n      if (commentText.startsWith(GoConstants.BUILD_FLAG) && commentText.length() > buildFlagLength\n          && StringUtil.isWhiteSpace(commentText.charAt(buildFlagLength))) {\n        ContainerUtil.addIfNotNull(buildFlags, StringUtil.nullize(commentText.substring(buildFlagLength).trim(), true));\n      }\n    }\n    return !buildFlags.isEmpty() ? StringUtil.join(buildFlags, \"|\") : null;\n  }\n\n\n  @NotNull\n  public List<GoFunctionDeclaration> getFunctions() {\n    return CachedValuesManager.getCachedValue(this, () -> {\n      GoFileStub stub = getStub();\n      List<GoFunctionDeclaration> functions = stub != null \n                                              ? getChildrenByType(stub, GoTypes.FUNCTION_DECLARATION, GoFunctionDeclarationStubElementType.ARRAY_FACTORY)\n                                              : GoPsiImplUtil.goTraverser().children(this).filter(GoFunctionDeclaration.class).toList();\n      return CachedValueProvider.Result.create(functions, this);\n    });\n  }\n\n  @NotNull\n  public List<GoMethodDeclaration> getMethods() {\n    return CachedValuesManager.getCachedValue(this, () -> {\n      StubElement<GoFile> stub = getStub();\n      List<GoMethodDeclaration> calc = stub != null\n                                       ? getChildrenByType(stub, GoTypes.METHOD_DECLARATION, GoMethodDeclarationStubElementType.ARRAY_FACTORY)\n                                       : GoPsiImplUtil.goTraverser().children(this).filter(GoMethodDeclaration.class).toList();\n      return CachedValueProvider.Result.create(calc, this);\n    });\n  }\n\n  @NotNull\n  public List<GoTypeSpec> getTypes() {\n    return CachedValuesManager.getCachedValue(this, () -> {\n      StubElement<GoFile> stub = getStub();\n      List<GoTypeSpec> types = stub != null ? getChildrenByType(stub, GoTypes.TYPE_SPEC, GoTypeSpecStubElementType.ARRAY_FACTORY) \n                                            : calcTypes();\n      return CachedValueProvider.Result.create(types, this);\n    });\n  }\n\n  @NotNull\n  public List<GoImportSpec> getImports() {\n    return CachedValuesManager.getCachedValue(this, () -> {\n      StubElement<GoFile> stub = getStub();\n      List<GoImportSpec> imports = stub != null ? getChildrenByType(stub, GoTypes.IMPORT_SPEC, GoImportSpecStubElementType.ARRAY_FACTORY) \n                                                : calcImports();\n      return CachedValueProvider.Result.create(imports, this);\n    });\n  }\n\n  public GoImportSpec addImport(String path, String alias) {\n    GoImportList importList = getImportList();\n    if (importList != null) {\n      return importList.addImport(path, alias);\n    }\n    return null;\n  }\n\n  /**\n   * @return map like { import path -> import spec } for file\n   */\n  @NotNull\n  public Map<String, GoImportSpec> getImportedPackagesMap() {\n    return CachedValuesManager.getCachedValue(this, () -> {\n      Map<String, GoImportSpec> map = ContainerUtil.newHashMap();\n      for (GoImportSpec spec : getImports()) {\n        if (!spec.isForSideEffects()) {\n          String importPath = spec.getPath();\n          if (StringUtil.isNotEmpty(importPath)) {\n            map.put(importPath, spec);\n          }\n        }\n      }\n      return CachedValueProvider.Result.create(map, this);\n    });\n  }\n\n  /**\n   * @return map like { local package name, maybe alias -> import spec } for file\n   */\n  @NotNull\n  public MultiMap<String, GoImportSpec> getImportMap() {\n    return CachedValuesManager.getCachedValue(this, () -> {\n      MultiMap<String, GoImportSpec> map = MultiMap.createLinked();\n      List<Object> dependencies = ContainerUtil.newArrayList(this);\n      Module module = ModuleUtilCore.findModuleForPsiElement(this);\n      for (GoImportSpec spec : getImports()) {\n        String alias = spec.getAlias();\n        if (alias != null) {\n          map.putValue(alias, spec);\n          continue;\n        }\n        if (spec.isDot()) {\n          map.putValue(\".\", spec);\n          continue;\n        }\n        GoImportString string = spec.getImportString();\n        PsiDirectory dir = string.resolve();\n        // todo[zolotov]: implement package modification tracker\n        ContainerUtil.addIfNotNull(dependencies, dir);\n        Collection<String> packagesInDirectory = GoPackageUtil.getAllPackagesInDirectory(dir, module, true);\n        if (!packagesInDirectory.isEmpty()) {\n          for (String packageNames : packagesInDirectory) {\n            if (!StringUtil.isEmpty(packageNames)) {\n              map.putValue(packageNames, spec);\n            }\n          }\n        }\n        else {\n          String key = spec.getLocalPackageName();\n          if (!StringUtil.isEmpty(key)) {\n            map.putValue(key, spec);\n          }\n        }\n      }\n      return CachedValueProvider.Result.create(map, ArrayUtil.toObjectArray(dependencies));\n    });\n  }\n\n  @NotNull\n  public List<GoVarDefinition> getVars() {\n    return CachedValuesManager.getCachedValue(this, () -> {\n      List<GoVarDefinition> result;\n      StubElement<GoFile> stub = getStub();\n      if (stub != null) {\n        result = ContainerUtil.newArrayList();\n        List<GoVarSpec> varSpecs = getChildrenByType(stub, GoTypes.VAR_SPEC, GoVarSpecStubElementType.ARRAY_FACTORY);\n        for (GoVarSpec spec : varSpecs) {\n          GoVarSpecStub specStub = spec.getStub();\n          if (specStub == null) continue;\n          result.addAll(getChildrenByType(specStub, GoTypes.VAR_DEFINITION, GoVarDefinitionStubElementType.ARRAY_FACTORY));\n        }\n      }\n      else {\n        result = calcVars();\n      }\n      return CachedValueProvider.Result.create(result, this);\n    });\n  }\n\n  @NotNull\n  public List<GoConstDefinition> getConstants() {\n    return CachedValuesManager.getCachedValue(this, () -> {\n      StubElement<GoFile> stub = getStub();\n      List<GoConstDefinition> result;\n      if (stub != null) {\n        result = ContainerUtil.newArrayList();\n        List<GoConstSpec> constSpecs = getChildrenByType(stub, GoTypes.CONST_SPEC, GoConstSpecStubElementType.ARRAY_FACTORY);\n        for (GoConstSpec spec : constSpecs) {\n          GoConstSpecStub specStub = spec.getStub();\n          if (specStub == null) continue;\n          result.addAll(getChildrenByType(specStub, GoTypes.CONST_DEFINITION, GoConstDefinitionStubElementType.ARRAY_FACTORY));\n        }\n      }\n      else {\n        result = calcConsts();\n      }\n      return CachedValueProvider.Result.create(result, this);\n    });\n  }\n\n  @NotNull\n  private List<GoTypeSpec> calcTypes() {\n    return GoPsiImplUtil.goTraverser().children(this).filter(GoTypeDeclaration.class).flatten(GoTypeDeclaration::getTypeSpecList).toList();\n  }\n\n  @NotNull\n  private List<GoImportSpec> calcImports() {\n    GoImportList list = getImportList();\n    if (list == null) return ContainerUtil.emptyList();\n    List<GoImportSpec> result = ContainerUtil.newArrayList();\n    for (GoImportDeclaration declaration : list.getImportDeclarationList()) {\n      result.addAll(declaration.getImportSpecList());\n    }\n    return result;\n  }\n\n  @NotNull\n  private List<GoVarDefinition> calcVars() {\n    return GoPsiImplUtil.goTraverser().children(this).filter(GoVarDeclaration.class)\n      .flatten(GoVarDeclaration::getVarSpecList)\n      .flatten(GoVarSpec::getVarDefinitionList).toList();\n  }\n\n  @NotNull\n  private List<GoConstDefinition> calcConsts() {\n    return GoPsiImplUtil.goTraverser().children(this).filter(GoConstDeclaration.class)\n      .flatten(GoConstDeclaration::getConstSpecList)\n      .flatten(GoConstSpec::getConstDefinitionList).toList();\n  }\n\n  @NotNull\n  @Override\n  public FileType getFileType() {\n    return GoFileType.INSTANCE;\n  }\n\n  public boolean hasMainFunction() { // todo create a map for faster search\n    List<GoFunctionDeclaration> functions = getFunctions();\n    for (GoFunctionDeclaration function : functions) {\n      if (GoConstants.MAIN.equals(function.getName())) {\n        return true;\n      }\n    }\n    return false;\n  }\n\n  @Nullable\n  public String getPackageName() {\n    return CachedValuesManager.getCachedValue(this, () -> {\n      GoFileStub stub = getStub();\n      if (stub != null) {\n        return CachedValueProvider.Result.create(stub.getPackageName(), this);\n      }\n      GoPackageClause packageClause = getPackage();\n      return CachedValueProvider.Result.create(packageClause != null ? packageClause.getName() : null, this);\n    });\n  }\n\n  public String getCanonicalPackageName() {\n    String packageName = getPackageName();\n    if (StringUtil.isNotEmpty(packageName) && GoTestFinder.isTestFile(this)) {\n      return StringUtil.trimEnd(packageName, GoConstants.TEST_SUFFIX);\n    }\n    return packageName;\n  }\n\n  @Nullable\n  @Override\n  public GoFileStub getStub() {\n    //noinspection unchecked\n    return (GoFileStub)super.getStub();\n  }\n\n  public boolean hasCPathImport() {\n    return getImportedPackagesMap().containsKey(GoConstants.C_PATH);\n  }\n\n  public void deleteImport(@NotNull GoImportSpec importSpec) {\n    GoImportDeclaration importDeclaration = PsiTreeUtil.getParentOfType(importSpec, GoImportDeclaration.class);\n    assert importDeclaration != null;\n    PsiElement elementToDelete = importDeclaration.getImportSpecList().size() == 1 ? importDeclaration : importSpec;\n    elementToDelete.delete();\n  }\n\n  @NotNull\n  private static <E extends PsiElement> List<E> getChildrenByType(@NotNull StubElement<? extends PsiElement> stub,\n                                                                  IElementType elementType,\n                                                                  ArrayFactory<E> f) {\n    return Arrays.asList(stub.getChildrenByType(elementType, f));\n  }\n\n  @NotNull\n  private static Collection<PsiComment> getCommentsToConsider(@NotNull GoFile file) {\n    Collection<PsiComment> commentsToConsider = ContainerUtil.newArrayList();\n    PsiElement child = file.getFirstChild();\n    int lastEmptyLineOffset = 0;\n    while (child != null) {\n      if (child instanceof PsiComment) {\n        commentsToConsider.add((PsiComment)child);\n      }\n      else if (child instanceof PsiWhiteSpace) {\n        if (StringUtil.countChars(child.getText(), '\\n') > 1) {\n          lastEmptyLineOffset = child.getTextRange().getStartOffset();\n        }\n      }\n      else {\n        break;\n      }\n      child = child.getNextSibling();\n    }\n    int finalLastEmptyLineOffset = lastEmptyLineOffset;\n    return ContainerUtil.filter(commentsToConsider, comment -> comment.getTextRange().getStartOffset() < finalLastEmptyLineOffset);\n  }\n}"
  },
  {
    "path": "src/com/goide/psi/GoFunctionOrMethodDeclaration.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi;\n\nimport com.intellij.psi.PsiElement;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic interface GoFunctionOrMethodDeclaration extends GoTopLevelDeclaration, GoNamedSignatureOwner {\n\n  @Nullable\n  GoBlock getBlock();\n\n  @Override\n  @Nullable\n  GoSignature getSignature();\n\n  @NotNull\n  PsiElement getFunc();\n\n  @Override\n  @Nullable\n  PsiElement getIdentifier();\n}\n"
  },
  {
    "path": "src/com/goide/psi/GoNamedElement.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi;\n\nimport com.intellij.navigation.NavigationItem;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiNameIdentifierOwner;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic interface GoNamedElement extends GoCompositeElement, GoTypeOwner, PsiNameIdentifierOwner, NavigationItem {\n  boolean isPublic();\n\n  @Nullable\n  PsiElement getIdentifier();\n  \n  @Nullable\n  String getQualifiedName();\n\n  @Override\n  @NotNull\n  GoFile getContainingFile();\n\n  @Nullable\n  GoType findSiblingType();\n\n  boolean isBlank();\n}\n"
  },
  {
    "path": "src/com/goide/psi/GoNamedSignatureOwner.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi;\n\npublic interface GoNamedSignatureOwner extends GoNamedElement, GoSignatureOwner {\n}\n"
  },
  {
    "path": "src/com/goide/psi/GoPsiTreeUtil.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi;\n\nimport com.intellij.lang.ASTNode;\nimport com.intellij.openapi.util.Couple;\nimport com.intellij.openapi.util.TextRange;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiWhiteSpace;\nimport com.intellij.psi.StubBasedPsiElement;\nimport com.intellij.psi.impl.source.tree.TreeUtil;\nimport com.intellij.psi.stubs.StubElement;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport com.intellij.psi.util.PsiUtilCore;\nimport com.intellij.util.SmartList;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.Collections;\nimport java.util.List;\n\npublic class GoPsiTreeUtil extends PsiTreeUtil {\n  @Nullable\n  public static <T extends PsiElement> T getStubChildOfType(@Nullable PsiElement element, @NotNull Class<T> aClass) {\n    if (element == null) return null;\n    StubElement<?> stub = element instanceof StubBasedPsiElement ? ((StubBasedPsiElement)element).getStub() : null;\n    if (stub == null) {\n      return getChildOfType(element, aClass);\n    }\n    for (StubElement childStub : stub.getChildrenStubs()) {\n      PsiElement child = childStub.getPsi();\n      if (aClass.isInstance(child)) {\n        //noinspection unchecked\n        return (T)child;\n      }\n    }\n    return null;\n  }\n\n  @NotNull\n  public static <T extends PsiElement> List<T> getStubChildrenOfTypeAsList(@Nullable PsiElement element, @NotNull Class<T> aClass) {\n    if (element == null) return Collections.emptyList();\n    StubElement<?> stub = element instanceof StubBasedPsiElement ? ((StubBasedPsiElement)element).getStub() : null;\n    if (stub == null) {\n      return getChildrenOfTypeAsList(element, aClass);\n    }\n\n    List<T> result = new SmartList<T>();\n    for (StubElement childStub : stub.getChildrenStubs()) {\n      PsiElement child = childStub.getPsi();\n      if (aClass.isInstance(child)) {\n        //noinspection unchecked\n        result.add((T)child);\n      }\n    }\n    return result;\n  }\n\n  @Nullable\n  private static Couple<PsiElement> getElementRange(@NotNull GoFile file, int startOffset, int endOffset) {\n    PsiElement startElement = findNotWhiteSpaceElementAtOffset(file, startOffset, true);\n    PsiElement endElement = findNotWhiteSpaceElementAtOffset(file, endOffset - 1, false);\n    if (startElement == null || endElement == null) return null;\n    ASTNode startNode = TreeUtil.findFirstLeaf(startElement.getNode());\n    ASTNode endNode = TreeUtil.findLastLeaf(endElement.getNode());\n    if (startNode == null || endNode == null) return null;\n\n    startElement = startNode.getPsi();\n    endElement = endNode.getPsi();\n    if (startElement == null || endElement == null) return null;\n\n    return Couple.of(startElement, endElement);\n  }\n\n  /**\n   * Return element range which contains TextRange(start, end) of top level elements\n   * common parent of elements is straight parent for each element\n   */\n  @Nullable\n  private static Couple<PsiElement> getTopmostElementRange(@NotNull Couple<PsiElement> elementRange) {\n    if (elementRange.first == null || elementRange.second == null) return null;\n    PsiElement commonParent = PsiTreeUtil.findCommonParent(elementRange.first, elementRange.second);\n    if (commonParent == null) return null;\n    if (commonParent.isEquivalentTo(elementRange.first) || commonParent.isEquivalentTo(elementRange.second)) {\n      commonParent = commonParent.getParent();\n    }\n    PsiElement startElement = PsiTreeUtil.findPrevParent(commonParent, elementRange.first);\n    PsiElement endElement = PsiTreeUtil.findPrevParent(commonParent, elementRange.second);\n    if (!startElement.getParent().isEquivalentTo(endElement.getParent())) return null;\n\n    int start = elementRange.first.getTextRange().getStartOffset();\n    int end = elementRange.second.getTextRange().getEndOffset();\n\n    TextRange range = commonParent.getTextRange();\n    PsiElement[] children = commonParent.getChildren();\n    if (range.equalsToRange(start, end) ||\n        range.getStartOffset() == start && (children.length == 0 || children[0].getTextRange().getStartOffset() > start) ||\n        range.getEndOffset() == end && (children.length == 0 || children[children.length - 1].getTextRange().getEndOffset() < end)) {\n      startElement = commonParent;\n      endElement = commonParent;\n    }\n    if (startElement.isEquivalentTo(endElement)) {\n      while (startElement.getTextRange().equals(startElement.getParent().getTextRange())) {\n        startElement = startElement.getParent();\n      }\n      return Couple.of(startElement, startElement);\n    }\n\n    return Couple.of(startElement, endElement);\n  }\n\n  @NotNull\n  public static PsiElement[] getTopLevelElementsInRange(@NotNull GoFile file,\n                                                        int startOffset,\n                                                        int endOffset,\n                                                        @NotNull Class<? extends PsiElement> clazz) {\n    Couple<PsiElement> elementRange = getElementRange(file, startOffset, endOffset);\n    if (elementRange == null) return PsiElement.EMPTY_ARRAY;\n    Couple<PsiElement> topmostElementRange = getTopmostElementRange(elementRange);\n    if (topmostElementRange == null) return PsiElement.EMPTY_ARRAY;\n    if (!clazz.isInstance(topmostElementRange.first) || !clazz.isInstance(topmostElementRange.second)) {\n      return PsiElement.EMPTY_ARRAY;\n    }\n\n    List<PsiElement> result = ContainerUtil.newSmartList();\n    PsiElement start = topmostElementRange.first;\n    while (start != null && !start.isEquivalentTo(topmostElementRange.second)) {\n      if (clazz.isInstance(start)) result.add(start);\n      start = start.getNextSibling();\n    }\n    result.add(topmostElementRange.second);\n    return PsiUtilCore.toPsiElementArray(result);\n  }\n\n  @Nullable\n  private static PsiElement findNotWhiteSpaceElementAtOffset(@NotNull GoFile file, int offset, boolean forward) {\n    PsiElement element = file.findElementAt(offset);\n    while (element instanceof PsiWhiteSpace) {\n      element = file.findElementAt(forward ? element.getTextRange().getEndOffset() : element.getTextRange().getStartOffset() - 1);\n    }\n    return element;\n  }\n}\n  "
  },
  {
    "path": "src/com/goide/psi/GoRecursiveVisitor.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi;\n\nimport com.intellij.openapi.progress.ProgressIndicatorProvider;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoRecursiveVisitor extends GoVisitor {\n  @Override\n  public void visitCompositeElement(@NotNull GoCompositeElement o) {\n    super.visitCompositeElement(o);\n    for (PsiElement psiElement : o.getChildren()) {\n      psiElement.accept(this);\n      ProgressIndicatorProvider.checkCanceled();\n    }\n  }\n\n  @Override\n  public void visitFile(@NotNull PsiFile file) {\n    super.visitFile(file);\n    for (PsiElement psiElement : file.getChildren()) {\n      psiElement.accept(this);\n      ProgressIndicatorProvider.checkCanceled();\n    }\n  }\n}"
  },
  {
    "path": "src/com/goide/psi/GoReferenceExpressionBase.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi;\n\nimport com.intellij.psi.PsiElement;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic interface GoReferenceExpressionBase extends GoCompositeElement {\n  @NotNull\n  PsiElement getIdentifier();\n\n  @Nullable\n  GoReferenceExpressionBase getQualifier();\n}\n"
  },
  {
    "path": "src/com/goide/psi/GoSignatureOwner.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi;\n\nimport org.jetbrains.annotations.Nullable;\n\npublic interface GoSignatureOwner extends GoCompositeElement {\n  @Nullable\n  GoSignature getSignature();\n}\n"
  },
  {
    "path": "src/com/goide/psi/GoTokenType.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi;\n\nimport com.goide.GoLanguage;\nimport com.intellij.psi.tree.IElementType;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoTokenType extends IElementType {\n  public GoTokenType(@NotNull String debug) {\n    super(debug, GoLanguage.INSTANCE);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/psi/GoTopLevelDeclaration.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi;\n\npublic interface GoTopLevelDeclaration extends GoCompositeElement {\n}\n"
  },
  {
    "path": "src/com/goide/psi/GoTypeOwner.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi;\n\nimport com.intellij.psi.ResolveState;\nimport org.jetbrains.annotations.Nullable;\n\npublic interface GoTypeOwner extends GoCompositeElement {\n  @Nullable\n  GoType getGoType(@Nullable ResolveState context);\n}\n"
  },
  {
    "path": "src/com/goide/psi/impl/GoCType.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi.impl;\n\nimport com.goide.psi.GoCompositeElement;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoCType extends GoLightType<GoCompositeElement> {\n  protected GoCType(@NotNull GoCompositeElement expression) {\n    super(expression);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/psi/impl/GoCachedReference.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi.impl;\n\nimport com.goide.util.GoUtil;\nimport com.intellij.openapi.util.TextRange;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiReferenceBase;\nimport com.intellij.psi.impl.source.resolve.ResolveCache;\nimport com.intellij.util.ArrayUtil;\nimport com.intellij.util.IncorrectOperationException;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic abstract class GoCachedReference<T extends PsiElement> extends PsiReferenceBase<T> {\n  protected GoCachedReference(@NotNull T element) {\n    super(element, TextRange.from(0, element.getTextLength()));\n  }\n\n  private static final ResolveCache.AbstractResolver<GoCachedReference, PsiElement> MY_RESOLVER =\n    (r, b) -> r.resolveInner();\n\n  @Nullable\n  protected abstract PsiElement resolveInner();\n\n  @Nullable\n  @Override\n  public final PsiElement resolve() {\n    return myElement.isValid()\n           ? ResolveCache.getInstance(myElement.getProject()).resolveWithCaching(this, MY_RESOLVER, false, false)\n           : null;\n  }\n\n  public abstract boolean processResolveVariants(@NotNull GoScopeProcessor processor);\n\n  @Override\n  public PsiElement handleElementRename(String newElementName) throws IncorrectOperationException {\n    myElement.replace(GoElementFactory.createIdentifierFromText(myElement.getProject(), newElementName));\n    return myElement;\n  }\n\n  @Override\n  public boolean isReferenceTo(PsiElement element) {\n    return GoUtil.couldBeReferenceTo(element, myElement) && super.isReferenceTo(element);\n  }\n  \n  @NotNull\n  @Override\n  public Object[] getVariants() {\n    return ArrayUtil.EMPTY_OBJECT_ARRAY;\n  }\n\n  @Override\n  public boolean equals(Object o) {\n    return this == o || o instanceof GoCachedReference && getElement() == ((GoCachedReference)o).getElement();\n  }\n\n  @Override\n  public int hashCode() {\n    return getElement().hashCode();\n  }\n\n}\n"
  },
  {
    "path": "src/com/goide/psi/impl/GoCompositeElementImpl.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi.impl;\n\nimport com.goide.psi.*;\nimport com.intellij.extapi.psi.ASTWrapperPsiElement;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.ResolveState;\nimport com.intellij.psi.scope.PsiScopeProcessor;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoCompositeElementImpl extends ASTWrapperPsiElement implements GoCompositeElement {\n  public GoCompositeElementImpl(@NotNull ASTNode node) {\n    super(node);\n  }\n\n  @Override\n  public String toString() {\n    return getNode().getElementType().toString();\n  }\n\n  @Override\n  public boolean processDeclarations(@NotNull PsiScopeProcessor processor,\n                                     @NotNull ResolveState state,\n                                     @Nullable PsiElement lastParent,\n                                     @NotNull PsiElement place) {\n    return processDeclarationsDefault(this, processor, state, lastParent, place);\n  }\n\n  public static boolean processDeclarationsDefault(@NotNull GoCompositeElement o,\n                                                   @NotNull PsiScopeProcessor processor,\n                                                   @NotNull ResolveState state,\n                                                   @Nullable PsiElement lastParent,\n                                                   @NotNull PsiElement place) {\n    if (o instanceof GoLeftHandExprList || o instanceof GoExpression) return true;\n\n    if (!o.shouldGoDeeper()) return processor.execute(o, state);\n    if (!processor.execute(o, state)) return false;\n    if ((\n          o instanceof GoSwitchStatement ||\n          o instanceof GoIfStatement ||\n          o instanceof GoForStatement ||\n          o instanceof GoCommClause ||\n          o instanceof GoBlock ||\n          o instanceof GoCaseClause\n        ) \n        && processor instanceof GoScopeProcessorBase) {\n      if (!PsiTreeUtil.isAncestor(o, ((GoScopeProcessorBase)processor).myOrigin, false)) return true;\n    }\n\n    return o instanceof GoBlock\n           ? processBlock((GoBlock)o, processor, state, lastParent, place)\n           : ResolveUtil.processChildren(o, processor, state, lastParent, place);\n  }\n\n  private static boolean processBlock(@NotNull GoBlock o,\n                                      @NotNull PsiScopeProcessor processor,\n                                      @NotNull ResolveState state,\n                                      @Nullable PsiElement lastParent, @NotNull PsiElement place) {\n    return ResolveUtil.processChildrenFromTop(o, processor, state, lastParent, place) && processParameters(o, processor);\n  }\n\n  private static boolean processParameters(@NotNull GoBlock b, @NotNull PsiScopeProcessor processor) {\n    if (processor instanceof GoScopeProcessorBase && b.getParent() instanceof GoSignatureOwner) {\n      return GoPsiImplUtil.processSignatureOwner((GoSignatureOwner)b.getParent(), (GoScopeProcessorBase)processor);\n    }\n    return true;\n  }\n\n  @Override\n  public boolean shouldGoDeeper() {\n    return true;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/psi/impl/GoElementFactory.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi.impl;\n\nimport com.goide.GoLanguage;\nimport com.goide.psi.*;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFileFactory;\nimport com.intellij.psi.impl.PsiParserFacadeImpl;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\n@SuppressWarnings(\"ConstantConditions\")\npublic class GoElementFactory {\n  private GoElementFactory() {\n  }\n\n  @NotNull\n  private static GoFile createFileFromText(@NotNull Project project, @NotNull String text) {\n    return (GoFile)PsiFileFactory.getInstance(project).createFileFromText(\"a.go\", GoLanguage.INSTANCE, text);\n  }\n\n  @NotNull\n  public static PsiElement createReturnStatement(@NotNull Project project) {\n    GoFile file = createFileFromText(project, \"package main\\nfunc _() { return; }\");\n    return PsiTreeUtil.findChildOfType(file, GoReturnStatement.class);\n  }\n\n  @NotNull\n  public static PsiElement createSelectStatement(@NotNull Project project) {\n    GoFile file = createFileFromText(project, \"package main\\nfunc _() { select {\\n} }\");\n    return PsiTreeUtil.findChildOfType(file, GoSelectStatement.class);\n  }\n\n  @NotNull\n  public static PsiElement createIdentifierFromText(@NotNull Project project, String text) {\n    GoFile file = createFileFromText(project, \"package \" + text);\n    return file.getPackage().getIdentifier();\n  }\n\n  @NotNull\n  public static GoIfStatement createIfStatement(@NotNull Project project,\n                                                @NotNull String condition,\n                                                @NotNull String thenBranch,\n                                                @Nullable String elseBranch) {\n    String elseText = elseBranch != null ? \" else {\\n\" + elseBranch + \"\\n}\" : \"\";\n    GoFile file = createFileFromText(project, \"package a; func _() {\\n\" +\n                                              \"if \" + condition + \" {\\n\" +\n                                              thenBranch + \"\\n\" +\n                                              \"}\" + elseText + \"\\n\" +\n                                              \"}\");\n    return PsiTreeUtil.findChildOfType(file, GoIfStatement.class);\n  }\n\n  @NotNull\n  public static GoImportDeclaration createEmptyImportDeclaration(@NotNull Project project) {\n    return PsiTreeUtil.findChildOfType(createFileFromText(project, \"package main\\nimport (\\n\\n)\"), GoImportDeclaration.class);\n  }\n                                                            \n  @NotNull\n  public static GoImportDeclaration createImportDeclaration(@NotNull Project project, @NotNull String importString,\n                                                            @Nullable String alias, boolean withParens) {\n    importString = GoPsiImplUtil.isQuotedImportString(importString) ? importString : StringUtil.wrapWithDoubleQuote(importString);\n    alias = alias != null ? alias + \" \" : \"\";\n    GoFile file = createFileFromText(project, withParens\n                                              ? \"package main\\nimport (\\n\" + alias + importString + \"\\n)\"\n                                              : \"package main\\nimport \" + alias + importString);\n    return PsiTreeUtil.findChildOfType(file, GoImportDeclaration.class);\n  }\n\n  @NotNull\n  public static GoImportSpec createImportSpec(@NotNull Project project, @NotNull String importString, @Nullable String alias) {\n    GoImportDeclaration importDeclaration = createImportDeclaration(project, importString, alias, true);\n    return ContainerUtil.getFirstItem(importDeclaration.getImportSpecList());\n  }\n\n  @NotNull\n  public static GoImportString createImportString(@NotNull Project project, @NotNull String importString) {\n    GoImportSpec importSpec = createImportSpec(project, importString, null);\n    return importSpec.getImportString();\n  }\n\n  @NotNull\n  public static PsiElement createNewLine(@NotNull Project project) {\n    return PsiParserFacadeImpl.SERVICE.getInstance(project).createWhiteSpaceFromText(\"\\n\");\n  }\n\n  @NotNull\n  public static PsiElement createComma(@NotNull Project project) {\n    return createFileFromText(project, \"package foo; var a,b = 1,2\").getVars().get(0).getNextSibling();\n  }\n\n  @NotNull\n  public static GoPackageClause createPackageClause(@NotNull Project project, @NotNull String name) {\n    return createFileFromText(project, \"package \" + name).getPackage();\n  }\n\n  @NotNull\n  public static GoBlock createBlock(@NotNull Project project) {\n    GoFunctionDeclaration function = ContainerUtil.getFirstItem(createFileFromText(project, \"package a; func t() {\\n}\").getFunctions());\n    assert function != null : \"Impossible situation! Parser is broken.\";\n    return function.getBlock();\n  }\n\n  @NotNull\n  public static GoStringLiteral createStringLiteral(@NotNull Project project, @NotNull String stringLiteral) {\n    GoFile f = createFileFromText(project, \"package a; var b = \" + stringLiteral);\n    return PsiTreeUtil.getNextSiblingOfType(ContainerUtil.getFirstItem(f.getVars()), GoStringLiteral.class);\n  }\n\n  @NotNull\n  public static GoSignature createFunctionSignatureFromText(@NotNull Project project, @NotNull String text) {\n    GoFile file = createFileFromText(project, \"package a; func t(\" + text + \") {\\n}\");\n    return ContainerUtil.getFirstItem(file.getFunctions()).getSignature();\n  }\n\n  @NotNull\n  public static GoStatement createShortVarDeclarationStatement(@NotNull Project project,\n                                                               @NotNull String name,\n                                                               @NotNull GoExpression initializer) {\n    GoFile file = createFileFromText(project, \"package a; func a() {\\n \" + name + \" := \" + initializer.getText() + \"}\");\n    return PsiTreeUtil.findChildOfType(file, GoSimpleStatement.class);\n  }\n\n  @NotNull\n  public static GoStatement createShortVarDeclarationStatement(@NotNull Project project,\n                                                               @NotNull String leftSide,\n                                                               @NotNull String rightSide) {\n    GoFile file = createFileFromText(project, \"package a; func a() {\\n \" + leftSide + \" := \" + rightSide + \"}\");\n    return PsiTreeUtil.findChildOfType(file, GoSimpleStatement.class);\n  }\n\n  @NotNull\n  public static GoRangeClause createRangeClause(@NotNull Project project, @NotNull String leftSide, @NotNull String rightSide) {\n    GoFile file = createFileFromText(project, \"package a; func a() {\\n for \" + leftSide + \" := range \" + rightSide + \"{\\n}\\n}\");\n    return PsiTreeUtil.findChildOfType(file, GoRangeClause.class);\n  }\n\n  @NotNull\n  public static GoRangeClause createRangeClauseAssignment(@NotNull Project project, @NotNull String leftSide, @NotNull String rightSide) {\n    GoFile file = createFileFromText(project, \"package a; func a() {\\n for \" + leftSide + \" = range \" + rightSide + \"{\\n}\\n}\");\n    return PsiTreeUtil.findChildOfType(file, GoRangeClause.class);\n  }\n\n  @NotNull\n  public static GoRecvStatement createRecvStatement(@NotNull Project project, @NotNull String leftSide, @NotNull String rightSide) {\n    GoFile file = createFileFromText(project, \"package a; func a() {\\n select { case \" + leftSide + \" := \" + rightSide + \":\\n}\\n}\");\n    return PsiTreeUtil.findChildOfType(file, GoRecvStatement.class);\n  }\n\n  @NotNull\n  public static GoRecvStatement createRecvStatementAssignment(@NotNull Project project, @NotNull String left, @NotNull String right) {\n    GoFile file = createFileFromText(project, \"package a; func a() {\\n select { case \" + left + \" = \" + right + \":\\n}\\n}\");\n    return PsiTreeUtil.findChildOfType(file, GoRecvStatement.class);\n  }\n\n  public static GoAssignmentStatement createAssignmentStatement(@NotNull Project project, @NotNull String left, @NotNull String right) {\n    GoFile file = createFileFromText(project, \"package a; func a() {\\n \" + left + \" = \" + right + \"}\");\n    return PsiTreeUtil.findChildOfType(file, GoAssignmentStatement.class);\n  }\n\n  @NotNull\n  public static GoDeferStatement createDeferStatement(@NotNull Project project, @NotNull String expressionText) {\n    GoFile file = createFileFromText(project, \"package a; func a() {\\n  defer \" + expressionText + \"}\");\n    return PsiTreeUtil.findChildOfType(file, GoDeferStatement.class);\n  }\n\n  @NotNull\n  public static GoGoStatement createGoStatement(@NotNull Project project, @NotNull String expressionText) {\n    GoFile file = createFileFromText(project, \"package a; func a() {\\n  go \" + expressionText + \"}\");\n    return PsiTreeUtil.findChildOfType(file, GoGoStatement.class);\n  }\n\n  @NotNull\n  public static GoForStatement createForStatement(@NotNull Project project, @NotNull String text) {\n    GoFile file = createFileFromText(project, \"package a; func a() {\\n for {\\n\" + text +  \"\\n}\\n}\");\n    return PsiTreeUtil.findChildOfType(file, GoForStatement.class);\n  }\n\n  @NotNull\n  public static GoExpression createExpression(@NotNull Project project, @NotNull String text) {\n    GoFile file = createFileFromText(project, \"package a; func a() {\\n a := \" + text + \"}\");\n    return PsiTreeUtil.findChildOfType(file, GoExpression.class);\n  }\n\n  @NotNull\n  public static GoReferenceExpression createReferenceExpression(@NotNull Project project, @NotNull String name) {\n    GoFile file = createFileFromText(project, \"package a; var a = \" + name);\n    return PsiTreeUtil.findChildOfType(file, GoReferenceExpression.class);\n  }\n\n  @NotNull\n  public static GoSimpleStatement createComparison(@NotNull Project project, @NotNull String text) {\n    GoFile file = createFileFromText(project, \"package a; func a() {\\n \" + text + \"}\");\n    return PsiTreeUtil.findChildOfType(file, GoSimpleStatement.class);\n  }\n\n  @NotNull\n  public static GoConstDeclaration createConstDeclaration(@NotNull Project project, @NotNull String text) {\n    GoFile file = createFileFromText(project, \"package a; const \" + text);\n    return PsiTreeUtil.findChildOfType(file, GoConstDeclaration.class);\n  }\n\n  @NotNull\n  public static GoConstSpec createConstSpec(@NotNull Project project, @NotNull String name, @Nullable String type, @Nullable String value) {\n    GoConstDeclaration constDeclaration = createConstDeclaration(project, prepareVarOrConstDeclarationText(name, type, value));\n    return ContainerUtil.getFirstItem(constDeclaration.getConstSpecList());\n  }\n\n  @NotNull\n  public static GoVarDeclaration createVarDeclaration(@NotNull Project project, @NotNull String text) {\n    GoFile file = createFileFromText(project, \"package a; var \" + text);\n    return PsiTreeUtil.findChildOfType(file, GoVarDeclaration.class);\n  }\n\n  @NotNull\n  public static GoVarSpec createVarSpec(@NotNull Project project, @NotNull String name, @Nullable String type, @Nullable String value) {\n    GoVarDeclaration varDeclaration = createVarDeclaration(project, prepareVarOrConstDeclarationText(name, type, value));\n    return ContainerUtil.getFirstItem(varDeclaration.getVarSpecList());\n  }\n\n  @NotNull\n  private static String prepareVarOrConstDeclarationText(@NotNull String name, @Nullable String type, @Nullable String value) {\n    type = StringUtil.trim(type);\n    value = StringUtil.trim(value);\n    type = StringUtil.isNotEmpty(type) ? \" \" + type : \"\";\n    value = StringUtil.isNotEmpty(value) ? \" = \" + value : \"\";\n    return name + type + value;\n  }\n\n  public static GoTypeList createTypeList(@NotNull Project project, @NotNull String text) {\n    GoFile file = createFileFromText(project, \"package a; func _() (\" + text + \"){}\");\n    return PsiTreeUtil.findChildOfType(file, GoTypeList.class);\n  }\n\n  public static GoType createType(@NotNull Project project, @NotNull String text) {\n    GoFile file = createFileFromText(project, \"package a; var a \" + text);\n    return PsiTreeUtil.findChildOfType(file, GoType.class);\n  }\n\n  public static PsiElement createLiteralValueElement(@NotNull Project project, @NotNull String key, @NotNull String value) {\n    GoFile file = createFileFromText(project, \"package a; var _ = struct { a string } { \" + key + \": \" + value + \" }\");\n    return PsiTreeUtil.findChildOfType(file, GoElement.class);\n  }\n\n  @NotNull\n  public static GoTypeDeclaration createTypeDeclaration(@NotNull Project project, @NotNull String name, @NotNull GoType type) {\n    GoFile file = createFileFromText(project, \"package a; type \" + name + \" \" + type.getText());\n    return PsiTreeUtil.findChildOfType(file, GoTypeDeclaration.class);\n  }\n}"
  },
  {
    "path": "src/com/goide/psi/impl/GoExpressionUtil.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi.impl;\n\nimport com.goide.psi.*;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.openapi.util.Comparing;\nimport com.intellij.openapi.util.Trinity;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.impl.source.tree.LeafElement;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoExpressionUtil {\n\n  public static boolean identical(@Nullable GoExpression left, @Nullable GoExpression right) {\n    if (left == right) return true;\n    if (left == null || right == null) return false;\n    GoExpression l = unwrap(left);\n    GoExpression r = unwrap(right);\n    if (l == null || r == null) return false;\n\n    if (!l.getClass().equals(r.getClass())) return false;\n    if (l instanceof GoBinaryExpr) {\n      GoBinaryExpr lBin = (GoBinaryExpr)l;\n      GoBinaryExpr rBin = (GoBinaryExpr)r;\n      return isOperatorEquals(lBin.getOperator(), rBin.getOperator()) && isChildrenExprEquals(lBin, rBin);\n    }\n    if (l instanceof GoUnaryExpr) {\n      GoUnaryExpr lUnary = (GoUnaryExpr)l;\n      GoUnaryExpr rUnary = (GoUnaryExpr)r;\n      return isOperatorEquals(lUnary.getOperator(), rUnary.getOperator()) && identical(lUnary.getExpression(), rUnary.getExpression());\n    }\n    if (l instanceof GoReferenceExpression) {\n      PsiElement resolve = ((GoReferenceExpression)l).resolve();\n      return resolve != null && resolve.isEquivalentTo(((GoReferenceExpression)r).resolve());\n    }\n    if (l instanceof GoIndexOrSliceExpr) {\n      GoIndexOrSliceExpr lSlice = (GoIndexOrSliceExpr)l;\n      GoIndexOrSliceExpr rSlice = (GoIndexOrSliceExpr)r;\n      return identical(lSlice.getExpression(), rSlice.getExpression()) && isIndicesIdentical(lSlice.getIndices(), rSlice.getIndices());\n    }\n    if (l instanceof GoStringLiteral) {\n      return Comparing.equal(((GoStringLiteral)l).getDecodedText(), ((GoStringLiteral)r).getDecodedText());\n    }\n    if (l instanceof GoLiteralTypeExpr) {\n      GoLiteralTypeExpr lLit = (GoLiteralTypeExpr)l;\n      GoLiteralTypeExpr rLit = (GoLiteralTypeExpr)r;\n      GoTypeReferenceExpression lExpr = lLit.getTypeReferenceExpression();\n      GoTypeReferenceExpression rExpr = rLit.getTypeReferenceExpression();\n      PsiElement lResolve = lExpr != null ? lExpr.resolve() : null;\n      return lResolve != null && rExpr != null && lResolve.equals(rExpr.resolve());\n      //todo: add || GoTypeUtil.identical(lLit.getType(), rLit.getType)\n    }\n    if (l instanceof GoLiteral) {\n      return l.textMatches(r);\n    }\n    if (l instanceof GoBuiltinCallExpr || l instanceof GoCallExpr) {\n      return false;\n    }\n    if (l instanceof GoCompositeLit) {\n      GoCompositeLit lLit = (GoCompositeLit)l;\n      GoCompositeLit rLit = (GoCompositeLit)r;\n      return identical(lLit.getLiteralValue(), rLit.getLiteralValue());\n      // todo: add && GoTypeUtil.identical\n    }\n    if (l instanceof GoTypeAssertionExpr) {\n      GoTypeAssertionExpr lAssertion = (GoTypeAssertionExpr)l;\n      GoTypeAssertionExpr rAssertion = (GoTypeAssertionExpr)r;\n      return identical(lAssertion.getExpression(), rAssertion.getExpression());\n      //todo: add && GoTypeUtil.identical(lAssertion.getType(), rAssertion.getType())\n    }\n\n    String lText = l.getText();\n    return lText != null && lText.equals(r.getText());\n  }\n\n  private static boolean isIndicesIdentical(@NotNull Trinity<GoExpression, GoExpression, GoExpression> l,\n                                            @NotNull Trinity<GoExpression, GoExpression, GoExpression> r) {\n    return identical(l.first, r.first) && identical(l.second, r.second) && identical(l.third, r.third);\n  }\n\n  private static boolean identical(@Nullable GoLiteralValue l, @Nullable GoLiteralValue r) {\n    if (l == null || r == null) return false;\n    return l.textMatches(r); //todo: fill\n  }\n\n  private static boolean isOperatorEquals(@Nullable PsiElement l, @Nullable PsiElement r) {\n    if (l == null || r == null) return false;\n    ASTNode lNode = l.getNode();\n    ASTNode rNode = r.getNode();\n    return lNode instanceof LeafElement && lNode.getElementType().equals(rNode.getElementType());\n  }\n\n  private static boolean isOrderImportant(@NotNull GoBinaryExpr o) {\n    if (o instanceof GoConversionExpr || o instanceof GoSelectorExpr) return true;\n    if (o instanceof GoMulExpr) {\n      GoMulExpr m = (GoMulExpr)o;\n      return m.getRemainder() != null || m.getQuotient() != null || m.getShiftLeft() != null || m.getShiftRight() != null;\n    }\n    if (o instanceof GoConditionalExpr) {\n      GoConditionalExpr c = (GoConditionalExpr)o;\n      return c.getEq() == null && c.getNotEq() == null;\n    }\n    return false;\n  }\n\n  private static boolean isChildrenExprEquals(@NotNull GoBinaryExpr left, @NotNull GoBinaryExpr right) {\n    GoExpression l1 = left.getLeft();\n    GoExpression l2 = left.getRight();\n    GoExpression r1 = right.getLeft();\n    GoExpression r2 = right.getRight();\n\n    boolean order = isOrderImportant(left);\n\n    return identical(l1, r1) && identical(l2, r2) || !order && identical(l1, r2) && identical(l2, r1);\n  }\n\n  @Nullable\n  private static GoExpression unwrap(@Nullable GoExpression o) {\n    if (o instanceof GoParenthesesExpr) return unwrap(((GoParenthesesExpr)o).getExpression());\n    if (o instanceof GoUnaryExpr && ((GoUnaryExpr)o).getPlus() != null) return unwrap(((GoUnaryExpr)o).getExpression());\n    return o;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/psi/impl/GoFieldNameReference.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi.impl;\n\nimport com.goide.psi.*;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.module.ModuleUtilCore;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.ResolveState;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoFieldNameReference extends GoCachedReference<GoReferenceExpressionBase> {\n  public GoFieldNameReference(@NotNull GoReferenceExpressionBase element) {\n    super(element);\n  }\n\n  @Override\n  public boolean processResolveVariants(@NotNull GoScopeProcessor processor) {\n    GoScopeProcessor fieldProcessor = processor instanceof GoFieldProcessor ? processor : new GoFieldProcessor(myElement) {\n      @Override\n      public boolean execute(@NotNull PsiElement e, @NotNull ResolveState state) {\n        return super.execute(e, state) && processor.execute(e, state);\n      }\n    };\n    GoKey key = PsiTreeUtil.getParentOfType(myElement, GoKey.class);\n    GoValue value = PsiTreeUtil.getParentOfType(myElement, GoValue.class);\n    if (key == null && (value == null || PsiTreeUtil.getPrevSiblingOfType(value, GoKey.class) != null)) return true;\n\n    GoType type = GoPsiImplUtil.getLiteralType(myElement, true);\n    if (!processStructType(fieldProcessor, type)) return false;\n    return !(type instanceof GoPointerType && !processStructType(fieldProcessor, ((GoPointerType)type).getType()));\n  }\n\n  private boolean processStructType(@NotNull GoScopeProcessor fieldProcessor, @Nullable GoType type) {\n    return !(type instanceof GoStructType && !type.processDeclarations(fieldProcessor, ResolveState.initial(), null, myElement));\n  }\n\n  public boolean inStructTypeKey() {\n    return GoPsiImplUtil.getParentGoValue(myElement) == null && GoPsiImplUtil.getLiteralType(myElement, false) instanceof GoStructType;\n  }\n\n  @Nullable\n  @Override\n  public PsiElement resolveInner() {\n    GoScopeProcessorBase p = new GoFieldProcessor(myElement);\n    processResolveVariants(p);\n    return p.getResult();\n  }\n\n  private static class GoFieldProcessor extends GoScopeProcessorBase {\n    private final Module myModule;\n\n    public GoFieldProcessor(@NotNull PsiElement element) {\n      super(element);\n      PsiFile containingFile = myOrigin.getContainingFile();\n      myModule = containingFile != null ? ModuleUtilCore.findModuleForPsiElement(containingFile.getOriginalFile()) : null;\n    }\n\n    @Override\n    protected boolean crossOff(@NotNull PsiElement e) {\n      if (!(e instanceof GoFieldDefinition) && !(e instanceof GoAnonymousFieldDefinition)) return true;\n      GoNamedElement named = (GoNamedElement)e;\n      PsiFile myFile = myOrigin.getContainingFile();\n      PsiFile file = e.getContainingFile();\n      if (!(myFile instanceof GoFile) || !GoPsiImplUtil.allowed(file, myFile, myModule)) return true;\n      boolean localResolve = GoReference.isLocalResolve(myFile, file);\n      return !e.isValid() || !(named.isPublic() || localResolve);\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/psi/impl/GoFunctionOrMethodDeclarationImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi.impl;\n\nimport com.goide.psi.GoFunctionOrMethodDeclaration;\nimport com.goide.psi.GoType;\nimport com.goide.stubs.GoFunctionOrMethodDeclarationStub;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.ResolveState;\nimport com.intellij.psi.stubs.IStubElementType;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nabstract public class GoFunctionOrMethodDeclarationImpl<T extends GoFunctionOrMethodDeclarationStub<?>> extends GoNamedElementImpl<T>\n  implements GoFunctionOrMethodDeclaration {\n  public GoFunctionOrMethodDeclarationImpl(@NotNull T stub, @NotNull IStubElementType nodeType) {\n    super(stub, nodeType);\n  }\n\n  public GoFunctionOrMethodDeclarationImpl(@NotNull ASTNode node) {\n    super(node);\n  }\n\n  @Override\n  @Nullable\n  public GoType getGoTypeInner(@Nullable ResolveState context) {\n    return GoPsiImplUtil.getGoTypeInner(this, context);\n  }\n}"
  },
  {
    "path": "src/com/goide/psi/impl/GoLabelReference.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi.impl;\n\nimport com.goide.psi.*;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.ResolveState;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.Collection;\n\npublic class GoLabelReference extends GoCachedReference<GoLabelRef> {\n  private final GoScopeProcessorBase myProcessor = new GoScopeProcessorBase(myElement) {\n    @Override\n    protected boolean crossOff(@NotNull PsiElement e) {\n      return !(e instanceof GoLabelDefinition) || ((GoLabelDefinition)e).isBlank();\n    }\n  };\n\n  public GoLabelReference(@NotNull GoLabelRef element) {\n    super(element);\n  }\n\n  @NotNull\n  private Collection<GoLabelDefinition> getLabelDefinitions() {\n    GoFunctionLit functionLit = PsiTreeUtil.getParentOfType(myElement, GoFunctionLit.class);\n    PsiElement blockToSearch = functionLit != null ? functionLit.getBlock() : PsiTreeUtil.getTopmostParentOfType(myElement, GoBlock.class); \n    return PsiTreeUtil.findChildrenOfType(blockToSearch, GoLabelDefinition.class);\n  }\n\n  @Nullable\n  @Override\n  protected PsiElement resolveInner() {\n    return !processResolveVariants(myProcessor) ? myProcessor.getResult() : null;\n  }\n\n  @Override\n  public boolean processResolveVariants(@NotNull GoScopeProcessor processor) {\n    GoBreakStatement breakStatement = PsiTreeUtil.getParentOfType(myElement, GoBreakStatement.class);\n    if (breakStatement != null) {\n      return processDefinitionsForBreakReference(breakStatement, processor);\n    }\n    return processAllDefinitions(processor);\n  }\n\n  private boolean processAllDefinitions(@NotNull GoScopeProcessor processor) {\n    Collection<GoLabelDefinition> defs = getLabelDefinitions();\n    for (GoLabelDefinition def : defs) {\n      if (!processor.execute(def, ResolveState.initial())) {\n        return false;\n      }\n    }\n    return true;\n  }\n\n  private static boolean processDefinitionsForBreakReference(@NotNull GoBreakStatement breakStatement,\n                                                             @NotNull GoScopeProcessor processor) {\n    PsiElement breakStatementOwner = GoPsiImplUtil.getBreakStatementOwner(breakStatement);\n    while (breakStatementOwner != null) {\n      PsiElement parent = breakStatementOwner.getParent();\n      if (parent instanceof GoLabeledStatement) {\n        if (!processor.execute(((GoLabeledStatement)parent).getLabelDefinition(), ResolveState.initial())) {\n          return false;\n        }\n      }\n      breakStatementOwner = GoPsiImplUtil.getBreakStatementOwner(breakStatementOwner);\n    }\n    return true;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/psi/impl/GoLightType.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi.impl;\n\nimport com.goide.psi.*;\nimport com.goide.stubs.GoTypeStub;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.impl.light.LightElement;\nimport com.intellij.psi.stubs.IStubElementType;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.List;\n\npublic abstract class GoLightType<E extends GoCompositeElement> extends LightElement implements GoType {\n  @NotNull protected final E myElement;\n\n  protected GoLightType(@NotNull E e) {\n    super(e.getManager(), e.getLanguage());\n    myElement = e;\n    setNavigationElement(e);\n  }\n\n  @Nullable\n  @Override\n  public GoTypeReferenceExpression getTypeReferenceExpression() {\n    return null;\n  }\n\n  @Override\n  public boolean shouldGoDeeper() {\n    return false;\n  }\n\n  @Override\n  public String toString() {\n    return getClass().getSimpleName() + \"{\" + myElement + \"}\";\n  }\n\n  @Override\n  public IStubElementType getElementType() {\n    return null;\n  }\n\n  @Override\n  public GoTypeStub getStub() {\n    return null;\n  }\n\n  @NotNull\n  @Override\n  public GoType getUnderlyingType() {\n    return GoPsiImplUtil.getUnderlyingType(this);\n  }\n\n  static class LightPointerType extends GoLightType<GoType> implements GoPointerType {\n    protected LightPointerType(@NotNull GoType o) {\n      super(o);\n    }\n\n    @Override\n    public String getText() {\n      return \"*\" + myElement.getText();\n    }\n\n    @Nullable\n    @Override\n    public GoType getType() {\n      return myElement;\n    }\n\n    @NotNull\n    @Override\n    public PsiElement getMul() {\n      return myElement; // todo: mock it?\n    }\n  }\n\n  static class LightTypeList extends GoLightType<GoCompositeElement> implements GoTypeList {\n    @NotNull private final List<GoType> myTypes;\n\n    public LightTypeList(@NotNull GoCompositeElement o, @NotNull List<GoType> types) {\n      super(o);\n      myTypes = types;\n    }\n\n    @NotNull\n    @Override\n    public List<GoType> getTypeList() {\n      return myTypes;\n    }\n\n    @Override\n    public String toString() {\n      return \"MyGoTypeList{myTypes=\" + myTypes + '}';\n    }\n\n    @Override\n    public String getText() {\n      return StringUtil.join(getTypeList(), PsiElement::getText, \", \");\n    }\n  }\n\n  static class LightFunctionType extends GoLightType<GoSignatureOwner> implements GoFunctionType {\n    public LightFunctionType(@NotNull GoSignatureOwner o) {\n      super(o);\n    }\n\n    @Nullable\n    @Override\n    public GoSignature getSignature() {\n      return myElement.getSignature();\n    }\n\n    @NotNull\n    @Override\n    public PsiElement getFunc() {\n      return myElement instanceof GoFunctionOrMethodDeclaration ? ((GoFunctionOrMethodDeclaration)myElement).getFunc() : myElement;\n    }\n\n    @Override\n    public String getText() {\n      GoSignature signature = myElement.getSignature();\n      return \"func \" + (signature != null ? signature.getText() : \"<null>\");\n    }\n  }\n\n  static class LightArrayType extends GoLightType<GoType> implements GoArrayOrSliceType {\n    protected LightArrayType(GoType type) {\n      super(type);\n    }\n\n    @Override\n    public String getText() {\n      return \"[]\" + myElement.getText();\n    }\n\n    @Nullable\n    @Override\n    public GoExpression getExpression() {\n      return null;\n    }\n\n    @Nullable\n    @Override\n    public GoType getType() {\n      return myElement;\n    }\n\n    @NotNull\n    @Override\n    public PsiElement getLbrack() {\n      //noinspection ConstantConditions\n      return null; // todo: mock?\n    }\n\n    @Nullable\n    @Override\n    public PsiElement getRbrack() {\n      return null;\n    }\n\n    @Nullable\n    @Override\n    public PsiElement getTripleDot() {\n      return null;\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/psi/impl/GoNamedElementImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi.impl;\n\nimport com.goide.GoIcons;\nimport com.goide.project.GoVendoringUtil;\nimport com.goide.psi.*;\nimport com.goide.sdk.GoPackageUtil;\nimport com.goide.stubs.GoNamedStub;\nimport com.goide.util.GoUtil;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.navigation.ItemPresentation;\nimport com.intellij.openapi.module.ModuleUtilCore;\nimport com.intellij.openapi.util.Iconable;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.ResolveState;\nimport com.intellij.psi.impl.ElementBase;\nimport com.intellij.psi.scope.PsiScopeProcessor;\nimport com.intellij.psi.search.GlobalSearchScope;\nimport com.intellij.psi.search.LocalSearchScope;\nimport com.intellij.psi.search.SearchScope;\nimport com.intellij.psi.stubs.IStubElementType;\nimport com.intellij.psi.util.CachedValueProvider;\nimport com.intellij.psi.util.CachedValuesManager;\nimport com.intellij.psi.util.PsiModificationTracker;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport com.intellij.ui.RowIcon;\nimport com.intellij.usageView.UsageViewUtil;\nimport com.intellij.util.IncorrectOperationException;\nimport com.intellij.util.ObjectUtils;\nimport com.intellij.util.PlatformIcons;\nimport org.jetbrains.annotations.NonNls;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport javax.swing.*;\n\npublic abstract class GoNamedElementImpl<T extends GoNamedStub<?>> extends GoStubbedElementImpl<T> implements GoCompositeElement, GoNamedElement {\n\n  public GoNamedElementImpl(@NotNull T stub, @NotNull IStubElementType nodeType) {\n    super(stub, nodeType);\n  }\n\n  public GoNamedElementImpl(@NotNull ASTNode node) {\n    super(node);\n  }\n\n  @Override\n  public boolean isPublic() {\n    if (GoPsiImplUtil.builtin(this)) return true;\n    T stub = getStub();\n    return stub != null ? stub.isPublic() : StringUtil.isCapitalized(getName());\n  }\n\n  @Nullable\n  @Override\n  public PsiElement getNameIdentifier() {\n    return getIdentifier();\n  }\n\n  @Nullable\n  @Override\n  public String getName() {\n    T stub = getStub();\n    if (stub != null) {\n      return stub.getName();\n    }\n    PsiElement identifier = getIdentifier();\n    return identifier != null ? identifier.getText() : null;\n  }\n  \n  @Nullable\n  @Override\n  public String getQualifiedName() {\n    String name = getName();\n    if (name == null) return null;\n    String packageName = getContainingFile().getPackageName();\n    return GoPsiImplUtil.getFqn(packageName, name);\n  }\n\n  @Override\n  public int getTextOffset() {\n    PsiElement identifier = getIdentifier();\n    return identifier != null ? identifier.getTextOffset() : super.getTextOffset();\n  }\n\n  @NotNull\n  @Override\n  public PsiElement setName(@NonNls @NotNull String newName) throws IncorrectOperationException {\n    PsiElement identifier = getIdentifier();\n    if (identifier != null) {\n      identifier.replace(GoElementFactory.createIdentifierFromText(getProject(), newName));\n    }\n    return this;\n  }\n\n  @Nullable\n  @Override\n  public GoType getGoType(@Nullable ResolveState context) {\n    if (context != null) return getGoTypeInner(context);\n    return CachedValuesManager.getCachedValue(this,\n                                              () -> CachedValueProvider.Result\n                                                .create(getGoTypeInner(GoPsiImplUtil.createContextOnElement(this)),\n                                                        PsiModificationTracker.MODIFICATION_COUNT));\n  }\n\n  @Nullable\n  protected GoType getGoTypeInner(@Nullable ResolveState context) {\n    return findSiblingType();\n  }\n\n  @Nullable\n  @Override\n  public GoType findSiblingType() {\n    T stub = getStub();\n    if (stub != null) {\n      return GoPsiTreeUtil.getStubChildOfType(getParentByStub(), GoType.class);\n    }\n    return PsiTreeUtil.getNextSiblingOfType(this, GoType.class);\n  }\n\n  @Override\n  public boolean processDeclarations(@NotNull PsiScopeProcessor processor,\n                                     @NotNull ResolveState state,\n                                     PsiElement lastParent,\n                                     @NotNull PsiElement place) {\n    return GoCompositeElementImpl.processDeclarationsDefault(this, processor, state, lastParent, place);\n  }\n\n  @Override\n  public ItemPresentation getPresentation() {\n    String text = UsageViewUtil.createNodeText(this);\n    if (text != null) {\n      boolean vendoringEnabled = GoVendoringUtil.isVendoringEnabled(ModuleUtilCore.findModuleForPsiElement(getContainingFile()));\n      return new ItemPresentation() {\n        @Nullable\n        @Override\n        public String getPresentableText() {\n          return getName();\n        }\n\n        @Nullable\n        @Override\n        public String getLocationString() {\n          GoFile file = getContainingFile();\n          String fileName = file.getName();\n          String importPath = ObjectUtils.chooseNotNull(file.getImportPath(vendoringEnabled), file.getPackageName());\n          return \"in \" + (importPath != null ? importPath  + \"/\" + fileName : fileName);\n        }\n\n        @Nullable\n        @Override\n        public Icon getIcon(boolean b) {\n          return GoNamedElementImpl.this.getIcon(Iconable.ICON_FLAG_VISIBILITY);\n        }\n      };\n    }\n    return super.getPresentation();\n  }\n\n  @Nullable\n  @Override\n  public Icon getIcon(int flags) {\n    Icon icon = null;\n    if (this instanceof GoMethodDeclaration) icon = GoIcons.METHOD;\n    else if (this instanceof GoFunctionDeclaration) icon = GoIcons.FUNCTION;\n    else if (this instanceof GoTypeSpec) icon = GoIcons.TYPE;\n    else if (this instanceof GoVarDefinition) icon = GoIcons.VARIABLE;\n    else if (this instanceof GoConstDefinition) icon = GoIcons.CONSTANT;\n    else if (this instanceof GoFieldDefinition) icon = GoIcons.FIELD;\n    else if (this instanceof GoMethodSpec) icon = GoIcons.METHOD;\n    else if (this instanceof GoAnonymousFieldDefinition) icon = GoIcons.FIELD;\n    else if (this instanceof GoParamDefinition) icon = GoIcons.PARAMETER;\n    else if (this instanceof GoLabelDefinition) icon = GoIcons.LABEL;\n    if (icon != null) {\n      if ((flags & Iconable.ICON_FLAG_VISIBILITY) != 0) {\n        RowIcon rowIcon = ElementBase.createLayeredIcon(this, icon, flags);\n        rowIcon.setIcon(isPublic() ? PlatformIcons.PUBLIC_ICON : PlatformIcons.PRIVATE_ICON, 1);\n        return rowIcon;\n      }\n      return icon;\n    }\n    return super.getIcon(flags);\n  }\n\n  @NotNull\n  @Override\n  public GlobalSearchScope getResolveScope() {\n    return isPublic() ? GoUtil.goPathResolveScope(this) : GoPackageUtil.packageScope(getContainingFile());\n  }\n\n  @NotNull\n  @Override\n  public SearchScope getUseScope() {\n    if (this instanceof GoVarDefinition || this instanceof GoConstDefinition || this instanceof GoLabelDefinition) {\n      GoBlock block = PsiTreeUtil.getParentOfType(this, GoBlock.class);\n      if (block != null) return new LocalSearchScope(block);\n    }\n    if (!isPublic()) {\n      return GoPackageUtil.packageScope(getContainingFile());\n    }\n    GoSpecType parentType = PsiTreeUtil.getStubOrPsiParentOfType(this, GoSpecType.class);\n    if (parentType != null) {\n      GoTypeSpec typeSpec = GoPsiImplUtil.getTypeSpecSafe(parentType);\n      if (typeSpec != null && !StringUtil.isCapitalized(typeSpec.getName())) {\n        return GoPackageUtil.packageScope(getContainingFile());\n      }\n    }\n    return GoUtil.goPathUseScope(this, !(this instanceof GoMethodDeclaration));\n  }\n\n  @Override\n  public boolean isBlank() {\n    return StringUtil.equals(getName(), \"_\");\n  }\n\n  @Override\n  public boolean shouldGoDeeper() {\n    return true;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/psi/impl/GoPsiImplUtil.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi.impl;\n\nimport com.goide.GoConstants;\nimport com.goide.GoTypes;\nimport com.goide.psi.*;\nimport com.goide.psi.impl.imports.GoImportReferenceSet;\nimport com.goide.runconfig.testing.GoTestFinder;\nimport com.goide.sdk.GoPackageUtil;\nimport com.goide.sdk.GoSdkUtil;\nimport com.goide.stubs.*;\nimport com.goide.stubs.index.GoIdFilter;\nimport com.goide.stubs.index.GoMethodIndex;\nimport com.goide.util.GoStringLiteralEscaper;\nimport com.goide.util.GoUtil;\nimport com.intellij.codeInsight.highlighting.ReadWriteAccessDetector;\nimport com.intellij.diagnostic.AttachmentFactory;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.lang.parser.GeneratedParserUtilBase;\nimport com.intellij.openapi.diagnostic.Logger;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.module.ModuleUtilCore;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.*;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.psi.*;\nimport com.intellij.psi.impl.source.resolve.reference.impl.PsiMultiReference;\nimport com.intellij.psi.impl.source.resolve.reference.impl.providers.FileReferenceOwner;\nimport com.intellij.psi.impl.source.resolve.reference.impl.providers.PsiFileReference;\nimport com.intellij.psi.impl.source.tree.LeafElement;\nimport com.intellij.psi.scope.PsiScopeProcessor;\nimport com.intellij.psi.search.GlobalSearchScope;\nimport com.intellij.psi.tree.TokenSet;\nimport com.intellij.psi.util.CachedValueProvider;\nimport com.intellij.psi.util.CachedValuesManager;\nimport com.intellij.psi.util.PsiModificationTracker;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport com.intellij.util.ObjectUtils;\nimport com.intellij.util.PathUtil;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.Contract;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.Collection;\nimport java.util.Collections;\nimport java.util.List;\n\nimport static com.goide.psi.impl.GoLightType.*;\nimport static com.intellij.codeInsight.highlighting.ReadWriteAccessDetector.Access.*;\nimport static com.intellij.openapi.util.Conditions.equalTo;\n\npublic class GoPsiImplUtil {\n  private static final Logger LOG = Logger.getInstance(GoPsiImplUtil.class);\n  private static final Key<SmartPsiElementPointer<PsiElement>> CONTEXT = Key.create(\"CONTEXT\");\n\n  @NotNull\n  public static SyntaxTraverser<PsiElement> goTraverser() {\n    return SyntaxTraverser.psiTraverser().forceDisregardTypes(equalTo(GeneratedParserUtilBase.DUMMY_BLOCK));\n  }\n\n  public static boolean builtin(@Nullable PsiElement resolve) {\n    return resolve != null && isBuiltinFile(resolve.getContainingFile());\n  }\n\n  public static boolean isConversionExpression(@Nullable GoExpression expression) {\n    if (expression instanceof GoConversionExpr) {\n      return true;\n    }\n    GoReferenceExpression referenceExpression = null;\n    if (expression instanceof GoCallExpr) {\n      referenceExpression = ObjectUtils.tryCast(((GoCallExpr)expression).getExpression(), GoReferenceExpression.class);\n    }\n    else if (expression instanceof GoBuiltinCallExpr) {\n      referenceExpression = ((GoBuiltinCallExpr)expression).getReferenceExpression();\n    }\n    return referenceExpression != null && referenceExpression.resolve() instanceof GoTypeSpec;\n  }\n\n  public static boolean isPanic(@NotNull GoCallExpr o) {\n    return stdLibCall(o, \"panic\");\n  }\n\n  public static boolean isRecover(@NotNull GoCallExpr o) {\n    return stdLibCall(o, \"recover\");\n  }\n\n  private static boolean stdLibCall(@NotNull GoCallExpr o, @NotNull String name) {\n    GoExpression e = o.getExpression();\n    if (e.textMatches(name) && e instanceof GoReferenceExpression) {\n      PsiReference reference = e.getReference();\n      PsiElement resolve = reference != null ? reference.resolve() : null;\n      if (!(resolve instanceof GoFunctionDeclaration)) return false;\n      return isBuiltinFile(resolve.getContainingFile());\n    }\n    return false;\n  }\n\n  public static boolean isBuiltinFile(@Nullable PsiFile file) {\n    return file instanceof GoFile\n           && GoConstants.BUILTIN_PACKAGE_NAME.equals(((GoFile)file).getPackageName())\n           && GoConstants.BUILTIN_PACKAGE_NAME.equals(((GoFile)file).getImportPath(false))\n           && GoConstants.BUILTIN_FILE_NAME.equals(file.getName());\n  }\n\n  @Nullable\n  public static GoTopLevelDeclaration getTopLevelDeclaration(@Nullable PsiElement startElement) {\n    GoTopLevelDeclaration declaration = PsiTreeUtil.getTopmostParentOfType(startElement, GoTopLevelDeclaration.class);\n    if (declaration == null || !(declaration.getParent() instanceof GoFile)) return null;\n    return declaration;\n  }\n\n  public static int getArity(@Nullable GoSignature s) {\n    return s == null ? -1 : s.getParameters().getParameterDeclarationList().size();\n  }\n\n  @Nullable\n  public static PsiElement getContextElement(@Nullable ResolveState state) {\n    SmartPsiElementPointer<PsiElement> context = state != null ? state.get(CONTEXT) : null;\n    return context != null ? context.getElement() : null;\n  }\n\n  @NotNull\n  public static ResolveState createContextOnElement(@NotNull PsiElement element) {\n    return ResolveState.initial().put(CONTEXT, SmartPointerManager.getInstance(element.getProject()).createSmartPsiElementPointer(element));\n  }\n\n  @Nullable\n  public static GoTypeReferenceExpression getQualifier(@NotNull GoTypeReferenceExpression o) {\n    return PsiTreeUtil.getChildOfType(o, GoTypeReferenceExpression.class);\n  }\n\n  @Nullable\n  public static PsiDirectory resolve(@NotNull GoImportString importString) {\n    PsiReference[] references = importString.getReferences();\n    for (PsiReference reference : references) {\n      if (reference instanceof FileReferenceOwner) {\n        PsiFileReference lastFileReference = ((FileReferenceOwner)reference).getLastFileReference();\n        PsiElement result = lastFileReference != null ? lastFileReference.resolve() : null;\n        return result instanceof PsiDirectory ? (PsiDirectory)result : null;\n      }\n    }\n    return null;\n  }\n\n  @NotNull\n  public static PsiReference getReference(@NotNull GoTypeReferenceExpression o) {\n    return new GoTypeReference(o);\n  }\n\n  @NotNull\n  public static PsiReference getReference(@NotNull GoLabelRef o) {\n    return new GoLabelReference(o);\n  }\n\n  @Nullable\n  public static PsiReference getReference(@NotNull GoVarDefinition o) {\n    GoShortVarDeclaration shortDeclaration = PsiTreeUtil.getParentOfType(o, GoShortVarDeclaration.class);\n    boolean createRef = PsiTreeUtil.getParentOfType(shortDeclaration, GoBlock.class, GoForStatement.class, GoIfStatement.class,\n                                                    GoSwitchStatement.class, GoSelectStatement.class) instanceof GoBlock;\n    return createRef ? new GoVarReference(o) : null;\n  }\n\n  @NotNull\n  public static GoReference getReference(@NotNull GoReferenceExpression o) {\n    return new GoReference(o);\n  }\n\n  @NotNull\n  public static PsiReference getReference(@NotNull GoFieldName o) {\n    GoFieldNameReference field = new GoFieldNameReference(o);\n    GoReference ordinal = new GoReference(o);\n    return new PsiMultiReference(new PsiReference[]{field, ordinal}, o) {\n      @Override\n      public PsiElement resolve() {\n        PsiElement resolve = field.resolve();\n        return resolve != null ? resolve : field.inStructTypeKey() ? null : ordinal.resolve();\n      }\n\n      @Override\n      public boolean isReferenceTo(PsiElement element) {\n        return GoUtil.couldBeReferenceTo(element, getElement()) && getElement().getManager().areElementsEquivalent(resolve(), element);\n      }\n    };\n  }\n\n  @Nullable\n  public static GoReferenceExpression getQualifier(@SuppressWarnings(\"UnusedParameters\") @NotNull GoFieldName o) {\n    return null;\n  }\n\n  @NotNull\n  public static PsiReference[] getReferences(@NotNull GoImportString o) {\n    if (o.getTextLength() < 2) return PsiReference.EMPTY_ARRAY;\n    return new GoImportReferenceSet(o).getAllReferences();\n  }\n\n  @Nullable\n  public static GoReferenceExpression getQualifier(@NotNull GoReferenceExpression o) {\n    return PsiTreeUtil.getChildOfType(o, GoReferenceExpression.class);\n  }\n\n  public static boolean processDeclarations(@NotNull GoCompositeElement o,\n                                            @NotNull PsiScopeProcessor processor,\n                                            @NotNull ResolveState state,\n                                            PsiElement lastParent,\n                                            @NotNull PsiElement place) {\n    boolean isAncestor = PsiTreeUtil.isAncestor(o, place, false);\n    if (o instanceof GoVarSpec) {\n      return isAncestor || GoCompositeElementImpl.processDeclarationsDefault(o, processor, state, lastParent, place);\n    }\n\n    if (isAncestor) return GoCompositeElementImpl.processDeclarationsDefault(o, processor, state, lastParent, place);\n\n    if (o instanceof GoBlock ||\n        o instanceof GoIfStatement ||\n        o instanceof GoForStatement ||\n        o instanceof GoCommClause ||\n        o instanceof GoFunctionLit ||\n        o instanceof GoTypeCaseClause ||\n        o instanceof GoExprCaseClause) {\n      return processor.execute(o, state);\n    }\n    return GoCompositeElementImpl.processDeclarationsDefault(o, processor, state, lastParent, place);\n  }\n\n  @Nullable\n  public static GoType getGoTypeInner(@NotNull GoReceiver o, @SuppressWarnings(\"UnusedParameters\") @Nullable ResolveState context) {\n    return o.getType();\n  }\n\n  @Nullable\n  public static PsiElement getIdentifier(@SuppressWarnings(\"UnusedParameters\") @NotNull GoAnonymousFieldDefinition o) {\n    GoTypeReferenceExpression expression = o.getTypeReferenceExpression();\n    return expression != null ? expression.getIdentifier() : null;\n  }\n\n  @Nullable\n  public static String getName(@NotNull GoPackageClause packageClause) {\n    GoPackageClauseStub stub = packageClause.getStub();\n    if (stub != null) return stub.getName();\n    PsiElement packageIdentifier = packageClause.getIdentifier();\n    return packageIdentifier != null ? packageIdentifier.getText().trim() : null;\n  }\n\n  @Nullable\n  public static String getName(@NotNull GoAnonymousFieldDefinition o) {\n    PsiElement identifier = o.getIdentifier();\n    return identifier != null ? identifier.getText() : null;\n  }\n\n  @Nullable\n  public static GoTypeReferenceExpression getTypeReferenceExpression(@NotNull GoAnonymousFieldDefinition o) {\n    return getTypeRefExpression(o.getType());\n  }\n\n  @Nullable\n  public static GoType getGoTypeInner(@NotNull GoAnonymousFieldDefinition o,\n                                      @SuppressWarnings(\"UnusedParameters\") @Nullable ResolveState context) {\n    return o.getType();\n  }\n\n  @Nullable\n  public static String getName(@NotNull GoMethodSpec o) {\n    GoNamedStub<GoMethodSpec> stub = o.getStub();\n    if (stub != null) {\n      return stub.getName();\n    }\n    PsiElement identifier = o.getIdentifier();\n    if (identifier != null) return identifier.getText();\n    GoTypeReferenceExpression typeRef = o.getTypeReferenceExpression();\n    return typeRef != null ? typeRef.getIdentifier().getText() : null;\n  }\n\n  @Nullable\n  public static GoType getReceiverType(@NotNull GoMethodDeclaration o) {\n    GoReceiver receiver = o.getReceiver();\n    return receiver == null ? null : receiver.getType();\n  }\n\n  // todo: merge with {@link this#getTypeRefExpression}\n  @Nullable\n  public static GoTypeReferenceExpression getTypeReference(@Nullable GoType o) {\n    if (o instanceof GoPointerType) {\n      return PsiTreeUtil.findChildOfAnyType(o, GoTypeReferenceExpression.class);\n    }\n    return o != null ? o.getTypeReferenceExpression() : null;\n  }\n\n  // todo: merge with {@link this#getTypeReference}\n  @Nullable\n  public static GoTypeReferenceExpression getTypeRefExpression(@Nullable GoType type) {\n    GoType unwrap = unwrapPointerIfNeeded(type);\n    return unwrap != null ? unwrap.getTypeReferenceExpression() : null;\n  }\n\n  @Nullable\n  public static GoType getGoTypeInner(@NotNull GoConstDefinition o, @Nullable ResolveState context) {\n    GoType fromSpec = findTypeInConstSpec(o);\n    if (fromSpec != null) return fromSpec;\n    // todo: stubs \n    return RecursionManager.doPreventingRecursion(o, true, (NullableComputable<GoType>)() -> {\n      GoConstSpec prev = PsiTreeUtil.getPrevSiblingOfType(o.getParent(), GoConstSpec.class);\n      while (prev != null) {\n        GoType type = prev.getType();\n        if (type != null) return type;\n        GoExpression expr = ContainerUtil.getFirstItem(prev.getExpressionList()); // not sure about first\n        if (expr != null) return expr.getGoType(context);\n        prev = PsiTreeUtil.getPrevSiblingOfType(prev, GoConstSpec.class);\n      }\n      return null;\n    });\n  }\n\n  @Nullable\n  private static GoType findTypeInConstSpec(@NotNull GoConstDefinition o) {\n    GoConstDefinitionStub stub = o.getStub();\n    PsiElement parent = PsiTreeUtil.getStubOrPsiParent(o);\n    if (!(parent instanceof GoConstSpec)) return null;\n    GoConstSpec spec = (GoConstSpec)parent;\n    GoType commonType = spec.getType();\n    if (commonType != null) return commonType;\n    List<GoConstDefinition> varList = spec.getConstDefinitionList();\n    int i = Math.max(varList.indexOf(o), 0);\n    if (stub != null) return null;\n    GoConstSpecStub specStub = spec.getStub();\n    List<GoExpression> es = specStub != null ? specStub.getExpressionList() : spec.getExpressionList(); // todo: move to constant spec\n    if (es.size() <= i) return null;\n    return es.get(i).getGoType(null);\n  }\n\n  @Nullable\n  private static GoType unwrapParType(@NotNull GoExpression o, @Nullable ResolveState c) {\n    GoType inner = getGoTypeInner(o, c);\n    return inner instanceof GoParType ? ((GoParType)inner).getActualType() : inner;\n  }\n\n  @Nullable\n  public static GoType getGoType(@NotNull GoExpression o, @Nullable ResolveState context) {\n    return RecursionManager.doPreventingRecursion(o, true, () -> {\n      if (context != null) return unwrapParType(o, context);\n      return CachedValuesManager.getCachedValue(o, () -> CachedValueProvider.Result\n        .create(unwrapParType(o, createContextOnElement(o)), PsiModificationTracker.MODIFICATION_COUNT));\n    });\n  }\n\n  @Nullable\n  private static GoType getGoTypeInner(@NotNull GoExpression o, @Nullable ResolveState context) {\n    if (o instanceof GoUnaryExpr) {\n      GoUnaryExpr u = (GoUnaryExpr)o;\n      GoExpression e = u.getExpression();\n      if (e == null) return null;\n      GoType type = e.getGoType(context);\n      GoType base = type == null || type.getTypeReferenceExpression() == null ? type : type.getUnderlyingType();\n      if (u.getBitAnd() != null) return type != null ? new LightPointerType(type) : null;\n      if (u.getSendChannel() != null) return base instanceof GoChannelType ? ((GoChannelType)base).getType() : type;\n      if (u.getMul() != null) return base instanceof GoPointerType ? ((GoPointerType)base).getType() : type;\n      return type;\n    }\n    if (o instanceof GoAddExpr) {\n      return ((GoAddExpr)o).getLeft().getGoType(context);\n    }\n    if (o instanceof GoMulExpr) {\n      GoExpression left = ((GoMulExpr)o).getLeft();\n      if (!(left instanceof GoLiteral)) return left.getGoType(context);\n      GoExpression right = ((GoBinaryExpr)o).getRight();\n      if (right != null) return right.getGoType(context);\n    }\n    else if (o instanceof GoCompositeLit) {\n      GoType type = ((GoCompositeLit)o).getType();\n      if (type != null) return type;\n      GoTypeReferenceExpression expression = ((GoCompositeLit)o).getTypeReferenceExpression();\n      return expression != null ? expression.resolveType() : null;\n    }\n    else if (o instanceof GoFunctionLit) {\n      return new LightFunctionType((GoFunctionLit)o);\n    }\n    else if (o instanceof GoBuiltinCallExpr) {\n      String text = ((GoBuiltinCallExpr)o).getReferenceExpression().getText();\n      boolean isNew = \"new\".equals(text);\n      boolean isMake = \"make\".equals(text);\n      if (isNew || isMake) {\n        GoBuiltinArgumentList args = ((GoBuiltinCallExpr)o).getBuiltinArgumentList();\n        GoType type = args != null ? args.getType() : null;\n        return isNew ? type == null ? null : new LightPointerType(type) : type;\n      }\n    }\n    else if (o instanceof GoCallExpr) {\n      GoExpression e = ((GoCallExpr)o).getExpression();\n      if (e instanceof GoReferenceExpression) { // todo: unify Type processing\n        PsiReference ref = e.getReference();\n        PsiElement resolve = ref != null ? ref.resolve() : null;\n        if (((GoReferenceExpression)e).getQualifier() == null && \"append\".equals(((GoReferenceExpression)e).getIdentifier().getText())) {\n          if (resolve instanceof GoFunctionDeclaration && isBuiltinFile(resolve.getContainingFile())) {\n            List<GoExpression> l = ((GoCallExpr)o).getArgumentList().getExpressionList();\n            GoExpression f = ContainerUtil.getFirstItem(l);\n            return f == null ? null : getGoType(f, context);\n          }\n        }\n        else if (resolve == e) { // C.call()\n          return new GoCType(e);\n        }\n      }\n      GoType type = ((GoCallExpr)o).getExpression().getGoType(context);\n      if (type instanceof GoFunctionType) {\n        return funcType(type);\n      }\n      GoType byRef = type != null && type.getTypeReferenceExpression() != null ? type.getUnderlyingType() : null;\n      if (byRef instanceof GoFunctionType) {\n        return funcType(byRef);\n      }\n      return type;\n    }\n    else if (o instanceof GoReferenceExpression) {\n      PsiReference reference = o.getReference();\n      PsiElement resolve = reference != null ? reference.resolve() : null;\n      if (resolve instanceof GoTypeOwner) return typeOrParameterType((GoTypeOwner)resolve, context);\n    }\n    else if (o instanceof GoParenthesesExpr) {\n      GoExpression expression = ((GoParenthesesExpr)o).getExpression();\n      return expression != null ? expression.getGoType(context) : null;\n    }\n    else if (o instanceof GoSelectorExpr) {\n      GoExpression item = ContainerUtil.getLastItem(((GoSelectorExpr)o).getExpressionList());\n      return item != null ? item.getGoType(context) : null;\n    }\n    else if (o instanceof GoIndexOrSliceExpr) {\n      GoType referenceType = getIndexedExpressionReferenceType((GoIndexOrSliceExpr)o, context);\n      if (o.getNode().findChildByType(GoTypes.COLON) != null) return referenceType; // means slice expression, todo: extract if needed\n      GoType type = referenceType != null ? referenceType.getUnderlyingType() : null;\n      if (type instanceof GoMapType) {\n        List<GoType> list = ((GoMapType)type).getTypeList();\n        if (list.size() == 2) {\n          return list.get(1);\n        }\n      }\n      else if (type instanceof GoArrayOrSliceType) {\n        return ((GoArrayOrSliceType)type).getType();\n      }\n      else if (GoTypeUtil.isString(type)) {\n        return getBuiltinType(\"byte\", o);\n      }\n    }\n    else if (o instanceof GoTypeAssertionExpr) {\n      return ((GoTypeAssertionExpr)o).getType();\n    }\n    else if (o instanceof GoConversionExpr) {\n      return ((GoConversionExpr)o).getType();\n    }\n    else if (o instanceof GoStringLiteral) {\n      return getBuiltinType(\"string\", o);\n    }\n    else if (o instanceof GoLiteral) {\n      GoLiteral l = (GoLiteral)o;\n      if (l.getChar() != null) return getBuiltinType(\"rune\", o);\n      if (l.getInt() != null || l.getHex() != null || ((GoLiteral)o).getOct() != null) return getBuiltinType(\"int\", o);\n      if (l.getFloat() != null) return getBuiltinType(\"float64\", o);\n      if (l.getFloati() != null) return getBuiltinType(\"complex64\", o);\n      if (l.getDecimali() != null) return getBuiltinType(\"complex128\", o);\n    }\n    else if (o instanceof GoConditionalExpr) {\n      return getBuiltinType(\"bool\", o);\n    }\n    return null;\n  }\n\n  @Nullable\n  public static GoType getIndexedExpressionReferenceType(@NotNull GoIndexOrSliceExpr o, @Nullable ResolveState context) {\n    GoExpression first = ContainerUtil.getFirstItem(o.getExpressionList());\n    // todo: calculate type for indexed expressions only\n    // https://golang.org/ref/spec#Index_expressions – a[x] is shorthand for (*a)[x]\n    return unwrapPointerIfNeeded(first != null ? first.getGoType(context) : null);\n  }\n\n  @Nullable\n  public static GoType unwrapPointerIfNeeded(@Nullable GoType type) {\n    return type instanceof GoPointerType ? ((GoPointerType)type).getType() : type;\n  }\n\n  @Nullable\n  public static GoType getBuiltinType(@NotNull String name, @NotNull PsiElement context) {\n    GoFile builtin = GoSdkUtil.findBuiltinFile(context);\n    if (builtin != null) {\n      GoTypeSpec spec = ContainerUtil.find(builtin.getTypes(), spec1 -> name.equals(spec1.getName()));\n      if (spec != null) {\n        return spec.getSpecType().getType(); // todo\n      }\n    }\n    return null;\n  }\n\n  @Nullable\n  private static GoType typeFromRefOrType(@Nullable GoType t) {\n    if (t == null) return null;\n    GoTypeReferenceExpression tr = t.getTypeReferenceExpression();\n    return tr != null ? tr.resolveType() : t;\n  }\n\n  @Nullable\n  public static GoType typeOrParameterType(@NotNull GoTypeOwner resolve, @Nullable ResolveState context) {\n    GoType type = resolve.getGoType(context);\n    if (resolve instanceof GoParamDefinition && ((GoParamDefinition)resolve).isVariadic()) {\n      return type == null ? null : new LightArrayType(type);\n    }\n    if (resolve instanceof GoSignatureOwner) {\n      return new LightFunctionType((GoSignatureOwner)resolve);\n    }\n    return type;\n  }\n\n  @Nullable\n  public static PsiElement resolve(@NotNull GoReferenceExpression o) { // todo: replace with default method in GoReferenceExpressionBase\n    return o.getReference().resolve();\n  }\n\n  @Nullable\n  public static PsiElement resolve(@NotNull GoTypeReferenceExpression o) { // todo: replace with default method in GoReferenceExpressionBase\n    return o.getReference().resolve();\n  }\n\n  @Nullable\n  public static PsiElement resolve(@NotNull GoFieldName o) { // todo: replace with default method in GoReferenceExpressionBase\n    return o.getReference().resolve();\n  }\n\n  @Nullable\n  public static GoType getLiteralType(@Nullable PsiElement context, boolean considerLiteralValue) {\n    GoCompositeLit lit = PsiTreeUtil.getNonStrictParentOfType(context, GoCompositeLit.class);\n    if (lit == null) {\n      return null;\n    }\n    GoType type = lit.getType();\n    if (type == null) {\n      GoTypeReferenceExpression ref = lit.getTypeReferenceExpression();\n      GoType resolve = ref != null ? ref.resolveType() : null;\n      type = resolve != null ? resolve.getUnderlyingType() : null;\n    }\n    if (!considerLiteralValue) {\n      return type;\n    }\n    GoValue parentGoValue = getParentGoValue(context);\n    PsiElement literalValue = PsiTreeUtil.getParentOfType(context, GoLiteralValue.class);\n    while (literalValue != null) {\n      if (literalValue == lit) break;\n      if (literalValue instanceof GoLiteralValue) {\n        type = calcLiteralType(parentGoValue, type);\n      }\n      literalValue = literalValue.getParent();\n    }\n    return type;\n  }\n\n  @Nullable\n  public static GoValue getParentGoValue(@NotNull PsiElement element) {\n    PsiElement place = element;\n    while ((place = PsiTreeUtil.getParentOfType(place, GoLiteralValue.class)) != null) {\n      if (place.getParent() instanceof GoValue) {\n        return (GoValue)place.getParent();\n      }\n    }\n    return null;\n  }\n\n  // todo: rethink and unify this algorithm\n  @Nullable\n  private static GoType calcLiteralType(@Nullable GoValue parentGoValue, @Nullable GoType type) {\n    if (type == null) return null;\n    type = findLiteralType(parentGoValue, type);\n\n    if (type instanceof GoParType) {\n      type = ((GoParType)type).getActualType();\n    }\n\n    if (type != null && type.getTypeReferenceExpression() != null) {\n      type = type.getUnderlyingType();\n    }\n\n    if (type instanceof GoPointerType) {\n      GoType inner = ((GoPointerType)type).getType();\n      if (inner != null && inner.getTypeReferenceExpression() != null) {\n        type = inner.getUnderlyingType();\n      }\n    }\n\n    return type instanceof GoSpecType ? ((GoSpecType)type).getType() : type;\n  }\n\n  private static GoType findLiteralType(@Nullable GoValue parentGoValue, @Nullable GoType type) {\n    boolean inValue = parentGoValue != null;\n    if (inValue && type instanceof GoArrayOrSliceType) {\n      type = ((GoArrayOrSliceType)type).getType();\n    }\n    else if (type instanceof GoMapType) {\n      type = inValue ? ((GoMapType)type).getValueType() : ((GoMapType)type).getKeyType();\n    }\n    else if (inValue && type instanceof GoSpecType) {\n      GoType inner = ((GoSpecType)type).getType();\n      if (inner instanceof GoArrayOrSliceType) {\n        type = ((GoArrayOrSliceType)inner).getType();\n      }\n      else if (inner instanceof GoStructType) {\n        GoKey key = PsiTreeUtil.getPrevSiblingOfType(parentGoValue, GoKey.class);\n        GoFieldName field = key != null ? key.getFieldName() : null;\n        PsiElement resolve = field != null ? field.resolve() : null;\n        if (resolve instanceof GoFieldDefinition) {\n          type = PsiTreeUtil.getNextSiblingOfType(resolve, GoType.class);\n        }\n      }\n    }\n    return type;\n  }\n\n  @Nullable\n  public static GoType resolveType(@NotNull GoTypeReferenceExpression expression) {\n    PsiElement resolve = expression.resolve();\n    if (resolve instanceof GoTypeSpec) return ((GoTypeSpec)resolve).getSpecType();\n    // hacky C resolve\n    return resolve == expression ? new GoCType(expression) : null;\n  }\n\n  public static boolean isVariadic(@NotNull GoParamDefinition o) {\n    PsiElement parent = o.getParent();\n    return parent instanceof GoParameterDeclaration && ((GoParameterDeclaration)parent).isVariadic();\n  }\n\n  public static boolean isVariadic(@NotNull GoParameterDeclaration o) {\n    GoParameterDeclarationStub stub = o.getStub();\n    return stub != null ? stub.isVariadic() : o.getTripleDot() != null;\n  }\n\n  public static boolean hasVariadic(@NotNull GoArgumentList argumentList) {\n    return argumentList.getTripleDot() != null;\n  }\n\n  @Nullable\n  public static GoType getGoTypeInner(@NotNull GoTypeSpec o, @SuppressWarnings(\"UnusedParameters\") @Nullable ResolveState context) {\n    return o.getSpecType();\n  }\n\n  @Nullable\n  public static GoType getGoTypeInner(@NotNull GoVarDefinition o, @Nullable ResolveState context) {\n    // see http://golang.org/ref/spec#RangeClause\n    PsiElement parent = PsiTreeUtil.getStubOrPsiParent(o);\n    if (parent instanceof GoRangeClause) {\n      return processRangeClause(o, (GoRangeClause)parent, context);\n    }\n    if (parent instanceof GoVarSpec) {\n      return findTypeInVarSpec(o, context);\n    }\n    GoCompositeLit literal = PsiTreeUtil.getNextSiblingOfType(o, GoCompositeLit.class);\n    if (literal != null) {\n      return literal.getType();\n    }\n    GoType siblingType = o.findSiblingType();\n    if (siblingType != null) return siblingType;\n\n    if (parent instanceof GoTypeSwitchGuard) {\n      GoTypeSwitchStatement switchStatement = ObjectUtils.tryCast(parent.getParent(), GoTypeSwitchStatement.class);\n      if (switchStatement != null) {\n        GoTypeCaseClause typeCase = getTypeCaseClause(getContextElement(context), switchStatement);\n        if (typeCase != null) {\n          return typeCase.getDefault() != null ? ((GoTypeSwitchGuard)parent).getExpression().getGoType(context) : typeCase.getType();\n        }\n        return ((GoTypeSwitchGuard)parent).getExpression().getGoType(null);\n      }\n    }\n    return null;\n  }\n\n  public static boolean isVoid(@NotNull GoResult result) {\n    GoType type = result.getType();\n    if (type != null) return false;\n    GoParameters parameters = result.getParameters();\n    return parameters == null || parameters.getParameterDeclarationList().isEmpty();\n  }\n\n  @Nullable\n  private static GoTypeCaseClause getTypeCaseClause(@Nullable PsiElement context, @NotNull GoTypeSwitchStatement switchStatement) {\n    return SyntaxTraverser.psiApi().parents(context).takeWhile(Conditions.notEqualTo(switchStatement))\n      .filter(GoTypeCaseClause.class).last();\n  }\n\n  @Nullable\n  private static GoType findTypeInVarSpec(@NotNull GoVarDefinition o, @Nullable ResolveState context) {\n    GoVarSpec parent = (GoVarSpec)PsiTreeUtil.getStubOrPsiParent(o);\n    if (parent == null) return null;\n    GoType commonType = parent.getType();\n    if (commonType != null) return commonType;\n    List<GoVarDefinition> varList = parent.getVarDefinitionList();\n    int i = varList.indexOf(o);\n    i = i == -1 ? 0 : i;\n    List<GoExpression> exprs = parent.getRightExpressionsList();\n    if (exprs.size() == 1 && exprs.get(0) instanceof GoCallExpr) {\n      GoExpression call = exprs.get(0);\n      GoType fromCall = call.getGoType(context);\n      boolean canDecouple = varList.size() > 1;\n      GoType underlyingType = canDecouple && fromCall instanceof GoSpecType ? ((GoSpecType)fromCall).getType() : fromCall;\n      GoType byRef = typeFromRefOrType(underlyingType);\n      GoType type = funcType(canDecouple && byRef instanceof GoSpecType ? ((GoSpecType)byRef).getType() : byRef);\n      if (type == null) return fromCall;\n      if (type instanceof GoTypeList) {\n        if (((GoTypeList)type).getTypeList().size() > i) {\n          return ((GoTypeList)type).getTypeList().get(i);\n        }\n      }\n      return type;\n    }\n    if (exprs.size() <= i) return null;\n    return exprs.get(i).getGoType(context);\n  }\n\n  @Nullable\n  private static GoType funcType(@Nullable GoType type) {\n    if (type instanceof GoFunctionType) {\n      GoSignature signature = ((GoFunctionType)type).getSignature();\n      GoResult result = signature != null ? signature.getResult() : null;\n      if (result != null) {\n        GoType rt = result.getType();\n        if (rt != null) return rt;\n        GoParameters parameters = result.getParameters();\n        if (parameters != null) {\n          List<GoParameterDeclaration> list = parameters.getParameterDeclarationList();\n          List<GoType> types = ContainerUtil.newArrayListWithCapacity(list.size());\n          for (GoParameterDeclaration declaration : list) {\n            GoType declarationType = declaration.getType();\n            for (GoParamDefinition ignored : declaration.getParamDefinitionList()) {\n              types.add(declarationType);\n            }\n          }\n          if (!types.isEmpty()) {\n            return types.size() == 1 ? types.get(0) : new LightTypeList(parameters, types);\n          }\n        }\n      }\n      return null;\n    }\n    return type;\n  }\n\n  /**\n   * https://golang.org/ref/spec#RangeClause\n   */\n  @Nullable\n  private static GoType processRangeClause(@NotNull GoVarDefinition o, @NotNull GoRangeClause parent, @Nullable ResolveState context) {\n    GoExpression rangeExpression = parent.getRangeExpression();\n    if (rangeExpression != null) {\n      List<GoVarDefinition> varList = parent.getVarDefinitionList();\n      GoType type = unwrapIfNeeded(rangeExpression.getGoType(context));\n      if (type instanceof GoChannelType) return ((GoChannelType)type).getType();\n      int i = varList.indexOf(o);\n      i = i == -1 ? 0 : i;\n      if (type instanceof GoArrayOrSliceType && i == 1) return ((GoArrayOrSliceType)type).getType();\n      if (type instanceof GoMapType) {\n        List<GoType> list = ((GoMapType)type).getTypeList();\n        if (i == 0) return ContainerUtil.getFirstItem(list);\n        if (i == 1) return ContainerUtil.getLastItem(list);\n      }\n      if (GoTypeUtil.isString(type)) {\n        return getBuiltinType(\"int32\", o);\n      }\n    }\n    return null;\n  }\n\n  @Nullable\n  private static GoType unwrapIfNeeded(@Nullable GoType type) {\n    type = unwrapPointerIfNeeded(type);\n    return type != null ? type.getUnderlyingType() : null;\n  }\n\n  @NotNull\n  public static GoType getActualType(@NotNull GoParType o) {\n    return ObjectUtils.notNull(SyntaxTraverser.psiTraverser(o).filter(Conditions.notInstanceOf(GoParType.class))\n                                 .filter(GoType.class).first(), o.getType());\n  }\n\n  @NotNull\n  public static String getText(@Nullable GoType o) {\n    if (o == null) return \"\";\n    if (o instanceof GoPointerType && ((GoPointerType)o).getType() instanceof GoSpecType) {\n      return \"*\" + getText(((GoPointerType)o).getType());\n    }\n    if (o instanceof GoSpecType) {\n      String fqn = getFqn(getTypeSpecSafe(o));\n      if (fqn != null) {\n        return fqn;\n      }\n    }\n    else if (o instanceof GoStructType) {\n      return ((GoStructType)o).getFieldDeclarationList().isEmpty() ? \"struct{}\" : \"struct {...}\";\n    }\n    else if (o instanceof GoInterfaceType) {\n      return ((GoInterfaceType)o).getMethodSpecList().isEmpty() ? \"interface{}\" : \"interface {...}\";\n    }\n    String text = o.getText();\n    if (text == null) return \"\";\n    return text.replaceAll(\"\\\\s+\", \" \");\n  }\n\n  @Nullable\n  private static String getFqn(@Nullable GoTypeSpec typeSpec) {\n    if (typeSpec == null) return null;\n    String name = typeSpec.getName();\n    GoFile file = typeSpec.getContainingFile();\n    String packageName = file.getPackageName();\n    if (name != null) {\n      return !isBuiltinFile(file) ? getFqn(packageName, name) : name;\n    }\n    return null;\n  }\n\n  public static String getFqn(@Nullable String packageName, @NotNull String elementName) {\n    return StringUtil.isNotEmpty(packageName) ? packageName + \".\" + elementName : elementName;\n  }\n\n  @NotNull\n  public static List<GoMethodSpec> getMethods(@NotNull GoInterfaceType o) {\n    return ContainerUtil.filter(o.getMethodSpecList(), spec -> spec.getIdentifier() != null);\n  }\n\n  @NotNull\n  public static List<GoTypeReferenceExpression> getBaseTypesReferences(@NotNull GoInterfaceType o) {\n    List<GoTypeReferenceExpression> refs = ContainerUtil.newArrayList();\n    o.accept(new GoRecursiveVisitor() {\n      @Override\n      public void visitMethodSpec(@NotNull GoMethodSpec o) {\n        ContainerUtil.addIfNotNull(refs, o.getTypeReferenceExpression());\n      }\n    });\n    return refs;\n  }\n\n  @NotNull\n  public static List<GoMethodDeclaration> getMethods(@NotNull GoTypeSpec o) {\n    return CachedValuesManager.getCachedValue(o, () -> {\n      // todo[zolotov]: implement package modification tracker\n      return CachedValueProvider.Result.create(calcMethods(o), PsiModificationTracker.MODIFICATION_COUNT);\n    });\n  }\n\n  public static boolean allowed(@NotNull PsiFile declarationFile, @Nullable PsiFile referenceFile, @Nullable Module contextModule) {\n    if (!(declarationFile instanceof GoFile)) {\n      return false;\n    }\n    VirtualFile referenceVirtualFile = referenceFile != null ? referenceFile.getOriginalFile().getVirtualFile() : null;\n    if (!allowed(declarationFile.getVirtualFile(), referenceVirtualFile)) {\n      return false;\n    }\n    if (GoConstants.DOCUMENTATION.equals(((GoFile)declarationFile).getPackageName())) {\n      return false;\n    }\n    return GoUtil.matchedForModuleBuildTarget(declarationFile, contextModule);\n  }\n\n  public static boolean allowed(@Nullable VirtualFile declarationFile, @Nullable VirtualFile referenceFile) {\n    if (declarationFile == null) {\n      return true;\n    }\n    if (GoUtil.fileToIgnore(declarationFile.getName())) {\n      return false;\n    }\n    // it's not a test or context file is also test from the same package\n    return referenceFile == null\n           || !GoTestFinder.isTestFile(declarationFile)\n           || GoTestFinder.isTestFile(referenceFile) && Comparing.equal(referenceFile.getParent(), declarationFile.getParent());\n  }\n\n  static boolean processNamedElements(@NotNull PsiScopeProcessor processor,\n                                      @NotNull ResolveState state,\n                                      @NotNull Collection<? extends GoNamedElement> elements,\n                                      boolean localResolve) {\n    //noinspection unchecked\n    return processNamedElements(processor, state, elements, Condition.TRUE, localResolve, false);\n  }\n\n  static boolean processNamedElements(@NotNull PsiScopeProcessor processor,\n                                      @NotNull ResolveState state,\n                                      @NotNull Collection<? extends GoNamedElement> elements,\n                                      boolean localResolve,\n                                      boolean checkContainingFile) {\n    //noinspection unchecked\n    return processNamedElements(processor, state, elements, Condition.TRUE, localResolve, checkContainingFile);\n  }\n\n  static boolean processNamedElements(@NotNull PsiScopeProcessor processor,\n                                      @NotNull ResolveState state,\n                                      @NotNull Collection<? extends GoNamedElement> elements,\n                                      @NotNull Condition<GoNamedElement> condition,\n                                      boolean localResolve,\n                                      boolean checkContainingFile) {\n    PsiFile contextFile = checkContainingFile ? GoReference.getContextFile(state) : null;\n    Module module = contextFile != null ? ModuleUtilCore.findModuleForPsiElement(contextFile) : null;\n    for (GoNamedElement definition : elements) {\n      if (!condition.value(definition)) continue;\n      if (!definition.isValid() || checkContainingFile && !allowed(definition.getContainingFile(), contextFile, module)) continue;\n      if ((localResolve || definition.isPublic()) && !processor.execute(definition, state)) return false;\n    }\n    return true;\n  }\n\n  public static boolean processSignatureOwner(@NotNull GoSignatureOwner o, @NotNull GoScopeProcessorBase processor) {\n    GoSignature signature = o.getSignature();\n    if (signature == null) return true;\n    if (!processParameters(processor, signature.getParameters())) return false;\n    GoResult result = signature.getResult();\n    GoParameters resultParameters = result != null ? result.getParameters() : null;\n    return resultParameters == null || processParameters(processor, resultParameters);\n  }\n\n  private static boolean processParameters(@NotNull GoScopeProcessorBase processor, @NotNull GoParameters parameters) {\n    for (GoParameterDeclaration declaration : parameters.getParameterDeclarationList()) {\n      if (!processNamedElements(processor, ResolveState.initial(), declaration.getParamDefinitionList(), true)) return false;\n    }\n    return true;\n  }\n\n  @NotNull\n  public static String joinPsiElementText(List<? extends PsiElement> items) {\n    return StringUtil.join(items, PsiElement::getText, \", \");\n  }\n\n  @Nullable\n  public static PsiElement getBreakStatementOwner(@NotNull PsiElement breakStatement) {\n    GoCompositeElement owner = PsiTreeUtil.getParentOfType(breakStatement, GoSwitchStatement.class, GoForStatement.class,\n                                                           GoSelectStatement.class, GoFunctionLit.class);\n    return owner instanceof GoFunctionLit ? null : owner;\n  }\n\n  @NotNull\n  private static List<GoMethodDeclaration> calcMethods(@NotNull GoTypeSpec o) {\n    PsiFile file = o.getContainingFile().getOriginalFile();\n    if (file instanceof GoFile) {\n      String packageName = ((GoFile)file).getPackageName();\n      String typeName = o.getName();\n      if (StringUtil.isEmpty(packageName) || StringUtil.isEmpty(typeName)) return Collections.emptyList();\n      String key = packageName + \".\" + typeName;\n      Project project = ((GoFile)file).getProject();\n      GlobalSearchScope scope = GoPackageUtil.packageScope((GoFile)file);\n      Collection<GoMethodDeclaration> declarations = GoMethodIndex.find(key, project, scope, GoIdFilter.getFilesFilter(scope));\n      return ContainerUtil.newArrayList(declarations);\n    }\n    return Collections.emptyList();\n  }\n\n  @NotNull\n  public static GoType getUnderlyingType(@NotNull GoType o) {\n    GoType type = RecursionManager.doPreventingRecursion(o, true, () -> getTypeInner(o));\n    return ObjectUtils.notNull(type, o);\n  }\n\n  @NotNull\n  private static GoType getTypeInner(@NotNull GoType o) {\n    if (o instanceof GoArrayOrSliceType\n        | o instanceof GoStructType\n        | o instanceof GoPointerType\n        | o instanceof GoFunctionType\n        | o instanceof GoInterfaceType\n        | o instanceof GoMapType\n        | o instanceof GoChannelType) {\n      return o;\n    }\n\n    if (o instanceof GoParType) return ((GoParType)o).getActualType();\n\n    if (o instanceof GoSpecType) {\n      GoType type = ((GoSpecType)o).getType();\n      return type != null ? type.getUnderlyingType() : o;\n    }\n\n    if (builtin(o)) return o;\n\n    GoTypeReferenceExpression e = o.getTypeReferenceExpression();\n    GoType byRef = e == null ? null : e.resolveType();\n    if (byRef != null) {\n      return byRef.getUnderlyingType();\n    }\n\n    return o;\n  }\n\n  @Nullable\n  public static GoType getGoTypeInner(@NotNull GoSignatureOwner o, @SuppressWarnings(\"UnusedParameters\") @Nullable ResolveState context) {\n    GoSignature signature = o.getSignature();\n    GoResult result = signature != null ? signature.getResult() : null;\n    if (result != null) {\n      GoType type = result.getType();\n      if (type instanceof GoTypeList && ((GoTypeList)type).getTypeList().size() == 1) {\n        return ((GoTypeList)type).getTypeList().get(0);\n      }\n      if (type != null) return type;\n      GoParameters parameters = result.getParameters();\n      if (parameters != null) {\n        GoType parametersType = parameters.getType();\n        if (parametersType != null) return parametersType;\n        List<GoType> composite = ContainerUtil.newArrayList();\n        for (GoParameterDeclaration p : parameters.getParameterDeclarationList()) {\n          for (GoParamDefinition definition : p.getParamDefinitionList()) {\n            composite.add(definition.getGoType(context));\n          }\n        }\n        if (composite.size() == 1) return composite.get(0);\n        return new LightTypeList(parameters, composite);\n      }\n    }\n    return null;\n  }\n\n  @NotNull\n  public static GoImportSpec addImport(@NotNull GoImportList importList, @NotNull String packagePath, @Nullable String alias) {\n    Project project = importList.getProject();\n    GoImportDeclaration newDeclaration = GoElementFactory.createImportDeclaration(project, packagePath, alias, false);\n    List<GoImportDeclaration> existingImports = importList.getImportDeclarationList();\n    for (int i = existingImports.size() - 1; i >= 0; i--) {\n      GoImportDeclaration existingImport = existingImports.get(i);\n      List<GoImportSpec> importSpecList = existingImport.getImportSpecList();\n      if (importSpecList.isEmpty()) {\n        continue;\n      }\n      if (existingImport.getRparen() == null && importSpecList.get(0).isCImport()) {\n        continue;\n      }\n      return existingImport.addImportSpec(packagePath, alias);\n    }\n    return addImportDeclaration(importList, newDeclaration);\n  }\n\n  @NotNull\n  private static GoImportSpec addImportDeclaration(@NotNull GoImportList importList, @NotNull GoImportDeclaration newImportDeclaration) {\n    GoImportDeclaration lastImport = ContainerUtil.getLastItem(importList.getImportDeclarationList());\n    GoImportDeclaration importDeclaration = (GoImportDeclaration)importList.addAfter(newImportDeclaration, lastImport);\n    PsiElement importListNextSibling = importList.getNextSibling();\n    if (!(importListNextSibling instanceof PsiWhiteSpace)) {\n      importList.addAfter(GoElementFactory.createNewLine(importList.getProject()), importDeclaration);\n      if (importListNextSibling != null) {\n        // double new line if there is something valuable after import list\n        importList.addAfter(GoElementFactory.createNewLine(importList.getProject()), importDeclaration);\n      }\n    }\n    importList.addBefore(GoElementFactory.createNewLine(importList.getProject()), importDeclaration);\n    GoImportSpec result = ContainerUtil.getFirstItem(importDeclaration.getImportSpecList());\n    assert result != null;\n    return result;\n  }\n\n  @NotNull\n  public static GoImportSpec addImportSpec(@NotNull GoImportDeclaration declaration, @NotNull String packagePath, @Nullable String alias) {\n    PsiElement rParen = declaration.getRparen();\n    if (rParen == null) {\n      GoImportDeclaration newDeclaration = GoElementFactory.createEmptyImportDeclaration(declaration.getProject());\n      for (GoImportSpec spec : declaration.getImportSpecList()) {\n        newDeclaration.addImportSpec(spec.getPath(), spec.getAlias());\n      }\n      declaration = (GoImportDeclaration)declaration.replace(newDeclaration);\n      LOG.assertTrue(declaration.getRparen() != null);\n      return declaration.addImportSpec(packagePath, alias);\n    }\n    declaration.addBefore(GoElementFactory.createNewLine(declaration.getProject()), rParen);\n    GoImportSpec newImportSpace = GoElementFactory.createImportSpec(declaration.getProject(), packagePath, alias);\n    GoImportSpec spec = (GoImportSpec)declaration.addBefore(newImportSpace, rParen);\n    declaration.addBefore(GoElementFactory.createNewLine(declaration.getProject()), rParen);\n    return spec;\n  }\n\n  public static String getLocalPackageName(@NotNull String importPath) {\n    String fileName = !StringUtil.endsWithChar(importPath, '/') && !StringUtil.endsWithChar(importPath, '\\\\')\n                      ? PathUtil.getFileName(importPath)\n                      : \"\";\n    StringBuilder name = null;\n    for (int i = 0; i < fileName.length(); i++) {\n      char c = fileName.charAt(i);\n      if (!(Character.isLetter(c) || c == '_' || i != 0 && Character.isDigit(c))) {\n        if (name == null) {\n          name = new StringBuilder(fileName.length());\n          name.append(fileName, 0, i);\n        }\n        name.append('_');\n      }\n      else if (name != null) {\n        name.append(c);\n      }\n    }\n    return name == null ? fileName : name.toString();\n  }\n\n  public static String getLocalPackageName(@NotNull GoImportSpec importSpec) {\n    return getLocalPackageName(importSpec.getPath());\n  }\n\n  public static boolean isCImport(@NotNull GoImportSpec importSpec) {\n    return GoConstants.C_PATH.equals(importSpec.getPath());\n  }\n\n  public static boolean isDot(@NotNull GoImportSpec importSpec) {\n    GoImportSpecStub stub = importSpec.getStub();\n    return stub != null ? stub.isDot() : importSpec.getDot() != null;\n  }\n\n  @NotNull\n  public static String getPath(@NotNull GoImportSpec importSpec) {\n    GoImportSpecStub stub = importSpec.getStub();\n    return stub != null ? stub.getPath() : importSpec.getImportString().getPath();\n  }\n\n  public static String getName(@NotNull GoImportSpec importSpec) {\n    return getAlias(importSpec);\n  }\n\n  public static String getAlias(@NotNull GoImportSpec importSpec) {\n    GoImportSpecStub stub = importSpec.getStub();\n    if (stub != null) {\n      return stub.getAlias();\n    }\n\n    PsiElement identifier = importSpec.getIdentifier();\n    if (identifier != null) {\n      return identifier.getText();\n    }\n    return importSpec.isDot() ? \".\" : null;\n  }\n\n  @Nullable\n  public static String getImportQualifierToUseInFile(@Nullable GoImportSpec importSpec, @Nullable String defaultValue) {\n    if (importSpec == null || importSpec.isForSideEffects()) {\n      return null;\n    }\n    if (importSpec.isDot()) {\n      return \"\";\n    }\n    String alias = importSpec.getAlias();\n    if (alias != null) {\n      return alias;\n    }\n    return defaultValue != null ? defaultValue : importSpec.getLocalPackageName();\n  }\n\n  public static boolean shouldGoDeeper(@SuppressWarnings(\"UnusedParameters\") GoImportSpec o) {\n    return false;\n  }\n\n  public static boolean shouldGoDeeper(@SuppressWarnings(\"UnusedParameters\") GoTypeSpec o) {\n    return false;\n  }\n\n  public static boolean shouldGoDeeper(@NotNull GoType o) {\n    return o instanceof GoInterfaceType || o instanceof GoStructType;\n  }\n\n  public static boolean isForSideEffects(@NotNull GoImportSpec o) {\n    return \"_\".equals(o.getAlias());\n  }\n\n  @NotNull\n  public static String getPath(@NotNull GoImportString o) {\n    return o.getStringLiteral().getDecodedText();\n  }\n\n  @NotNull\n  public static String unquote(@Nullable String s) {\n    if (StringUtil.isEmpty(s)) return \"\";\n    char quote = s.charAt(0);\n    int startOffset = isQuote(quote) ? 1 : 0;\n    int endOffset = s.length();\n    if (s.length() > 1) {\n      char lastChar = s.charAt(s.length() - 1);\n      if (isQuote(quote) && lastChar == quote) {\n        endOffset = s.length() - 1;\n      }\n      if (!isQuote(quote) && isQuote(lastChar)) {\n        endOffset = s.length() - 1;\n      }\n    }\n    return s.substring(startOffset, endOffset);\n  }\n\n  @NotNull\n  public static TextRange getPathTextRange(@NotNull GoImportString importString) {\n    String text = importString.getText();\n    return !text.isEmpty() && isQuote(text.charAt(0)) ? TextRange.create(1, text.length() - 1) : TextRange.EMPTY_RANGE;\n  }\n\n  public static boolean isQuotedImportString(@NotNull String s) {\n    return s.length() > 1 && isQuote(s.charAt(0)) && s.charAt(0) == s.charAt(s.length() - 1);\n  }\n\n  private static boolean isQuote(char ch) {\n    return ch == '\"' || ch == '\\'' || ch == '`';\n  }\n\n  public static boolean isValidHost(@NotNull GoStringLiteral o) {\n    return PsiTreeUtil.getParentOfType(o, GoImportString.class) == null;\n  }\n\n  @NotNull\n  public static GoStringLiteralImpl updateText(@NotNull GoStringLiteral o, @NotNull String text) {\n    if (text.length() > 2) {\n      if (o.getString() != null) {\n        StringBuilder outChars = new StringBuilder();\n        GoStringLiteralEscaper.escapeString(text.substring(1, text.length() - 1), outChars);\n        outChars.insert(0, '\"');\n        outChars.append('\"');\n        text = outChars.toString();\n      }\n    }\n\n    ASTNode valueNode = o.getNode().getFirstChildNode();\n    assert valueNode instanceof LeafElement;\n\n    ((LeafElement)valueNode).replaceWithText(text);\n    return (GoStringLiteralImpl)o;\n  }\n\n  @NotNull\n  public static GoStringLiteralEscaper createLiteralTextEscaper(@NotNull GoStringLiteral o) {\n    return new GoStringLiteralEscaper(o);\n  }\n\n  public static boolean prevDot(@Nullable PsiElement e) {\n    PsiElement prev = e == null ? null : PsiTreeUtil.prevVisibleLeaf(e);\n    return prev instanceof LeafElement && ((LeafElement)prev).getElementType() == GoTypes.DOT;\n  }\n\n  @Nullable\n  public static GoSignatureOwner resolveCall(@Nullable GoExpression call) {\n    return ObjectUtils.tryCast(resolveCallRaw(call), GoSignatureOwner.class);\n  }\n\n  public static PsiElement resolveCallRaw(@Nullable GoExpression call) {\n    if (!(call instanceof GoCallExpr)) return null;\n    GoExpression e = ((GoCallExpr)call).getExpression();\n    if (e instanceof GoSelectorExpr) {\n      GoExpression right = ((GoSelectorExpr)e).getRight();\n      PsiReference reference = right instanceof GoReferenceExpression ? right.getReference() : null;\n      return reference != null ? reference.resolve() : null;\n    }\n    if (e instanceof GoCallExpr) {\n      GoSignatureOwner resolve = resolveCall(e);\n      if (resolve != null) {\n        GoSignature signature = resolve.getSignature();\n        GoResult result = signature != null ? signature.getResult() : null;\n        return result != null ? result.getType() : null;\n      }\n      return null;\n    }\n    if (e instanceof GoFunctionLit) {\n      return e;\n    }\n    GoReferenceExpression r = e instanceof GoReferenceExpression\n                              ? (GoReferenceExpression)e\n                              : PsiTreeUtil.getChildOfType(e, GoReferenceExpression.class);\n    PsiReference reference = (r != null ? r : e).getReference();\n    return reference != null ? reference.resolve() : null;\n  }\n\n  public static boolean isUnaryBitAndExpression(@Nullable PsiElement parent) {\n    PsiElement grandParent = parent != null ? parent.getParent() : null;\n    return grandParent instanceof GoUnaryExpr && ((GoUnaryExpr)grandParent).getBitAnd() != null;\n  }\n\n  @NotNull\n  public static GoVarSpec addSpec(@NotNull GoVarDeclaration declaration,\n                                  @NotNull String name,\n                                  @Nullable String type,\n                                  @Nullable String value,\n                                  @Nullable GoVarSpec specAnchor) {\n    Project project = declaration.getProject();\n    GoVarSpec newSpec = GoElementFactory.createVarSpec(project, name, type, value);\n    PsiElement rParen = declaration.getRparen();\n    if (rParen == null) {\n      GoVarSpec item = ContainerUtil.getFirstItem(declaration.getVarSpecList());\n      assert item != null;\n      boolean updateAnchor = specAnchor == item;\n      declaration = (GoVarDeclaration)declaration.replace(GoElementFactory.createVarDeclaration(project, \"(\" + item.getText() + \")\"));\n      rParen = declaration.getRparen();\n      if (updateAnchor) {\n        specAnchor = ContainerUtil.getFirstItem(declaration.getVarSpecList());\n      }\n    }\n\n    assert rParen != null;\n    PsiElement anchor = ObjectUtils.notNull(specAnchor, rParen);\n    if (!hasNewLineBefore(anchor)) {\n      declaration.addBefore(GoElementFactory.createNewLine(declaration.getProject()), anchor);\n    }\n    GoVarSpec spec = (GoVarSpec)declaration.addBefore(newSpec, anchor);\n    declaration.addBefore(GoElementFactory.createNewLine(declaration.getProject()), anchor);\n    return spec;\n  }\n\n  @NotNull\n  public static GoConstSpec addSpec(@NotNull GoConstDeclaration declaration,\n                                    @NotNull String name,\n                                    @Nullable String type,\n                                    @Nullable String value,\n                                    @Nullable GoConstSpec specAnchor) {\n    Project project = declaration.getProject();\n    GoConstSpec newSpec = GoElementFactory.createConstSpec(project, name, type, value);\n    PsiElement rParen = declaration.getRparen();\n    if (rParen == null) {\n      GoConstSpec item = ContainerUtil.getFirstItem(declaration.getConstSpecList());\n      assert item != null;\n      boolean updateAnchor = specAnchor == item;\n      declaration = (GoConstDeclaration)declaration.replace(GoElementFactory.createConstDeclaration(project, \"(\" + item.getText() + \")\"));\n      rParen = declaration.getRparen();\n      if (updateAnchor) {\n        specAnchor = ContainerUtil.getFirstItem(declaration.getConstSpecList());\n      }\n    }\n\n    assert rParen != null;\n    PsiElement anchor = ObjectUtils.notNull(specAnchor, rParen);\n    if (!hasNewLineBefore(anchor)) {\n      declaration.addBefore(GoElementFactory.createNewLine(declaration.getProject()), anchor);\n    }\n    GoConstSpec spec = (GoConstSpec)declaration.addBefore(newSpec, anchor);\n    declaration.addBefore(GoElementFactory.createNewLine(declaration.getProject()), anchor);\n    return spec;\n  }\n\n  public static void deleteSpec(@NotNull GoVarDeclaration declaration, @NotNull GoVarSpec specToDelete) {\n    List<GoVarSpec> specList = declaration.getVarSpecList();\n    int index = specList.indexOf(specToDelete);\n    assert index >= 0;\n    if (specList.size() == 1) {\n      declaration.delete();\n      return;\n    }\n    specToDelete.delete();\n  }\n\n  public static void deleteSpec(@NotNull GoConstDeclaration declaration, @NotNull GoConstSpec specToDelete) {\n    List<GoConstSpec> specList = declaration.getConstSpecList();\n    int index = specList.indexOf(specToDelete);\n    assert index >= 0;\n    if (specList.size() == 1) {\n      declaration.delete();\n      return;\n    }\n    specToDelete.delete();\n  }\n\n  public static void deleteExpressionFromAssignment(@NotNull GoAssignmentStatement assignment,\n                                                    @NotNull GoExpression expressionToDelete) {\n    GoExpression expressionValue = getRightExpression(assignment, expressionToDelete);\n    if (expressionValue != null) {\n      if (assignment.getExpressionList().size() == 1) {\n        assignment.delete();\n      }\n      else {\n        deleteElementFromCommaSeparatedList(expressionToDelete);\n        deleteElementFromCommaSeparatedList(expressionValue);\n      }\n    }\n  }\n\n  public static void deleteDefinition(@NotNull GoVarSpec spec, @NotNull GoVarDefinition definitionToDelete) {\n    List<GoVarDefinition> definitionList = spec.getVarDefinitionList();\n    int index = definitionList.indexOf(definitionToDelete);\n    assert index >= 0;\n    if (definitionList.size() == 1) {\n      PsiElement parent = spec.getParent();\n      if (parent instanceof GoVarDeclaration) {\n        ((GoVarDeclaration)parent).deleteSpec(spec);\n      }\n      else {\n        spec.delete();\n      }\n      return;\n    }\n\n    GoExpression value = definitionToDelete.getValue();\n    if (value != null && spec.getRightExpressionsList().size() <= 1) {\n      PsiElement assign = spec.getAssign();\n      if (assign != null) {\n        assign.delete();\n      }\n    }\n    deleteElementFromCommaSeparatedList(value);\n    deleteElementFromCommaSeparatedList(definitionToDelete);\n  }\n\n  public static void deleteDefinition(@NotNull GoConstSpec spec, @NotNull GoConstDefinition definitionToDelete) {\n    List<GoConstDefinition> definitionList = spec.getConstDefinitionList();\n    int index = definitionList.indexOf(definitionToDelete);\n    assert index >= 0;\n    if (definitionList.size() == 1) {\n      PsiElement parent = spec.getParent();\n      if (parent instanceof GoConstDeclaration) {\n        ((GoConstDeclaration)parent).deleteSpec(spec);\n      }\n      else {\n        spec.delete();\n      }\n      return;\n    }\n    GoExpression value = definitionToDelete.getValue();\n    if (value != null && spec.getExpressionList().size() <= 1) {\n      PsiElement assign = spec.getAssign();\n      if (assign != null) {\n        assign.delete();\n      }\n    }\n    deleteElementFromCommaSeparatedList(value);\n    deleteElementFromCommaSeparatedList(definitionToDelete);\n  }\n\n  private static void deleteElementFromCommaSeparatedList(@Nullable PsiElement element) {\n    if (element == null) {\n      return;\n    }\n    PsiElement prevVisibleLeaf = PsiTreeUtil.prevVisibleLeaf(element);\n    PsiElement nextVisibleLeaf = PsiTreeUtil.nextVisibleLeaf(element);\n    if (prevVisibleLeaf != null && prevVisibleLeaf.textMatches(\",\")) {\n      prevVisibleLeaf.delete();\n    }\n    else if (nextVisibleLeaf != null && nextVisibleLeaf.textMatches(\",\")) {\n      nextVisibleLeaf.delete();\n    }\n    element.delete();\n  }\n\n  private static boolean hasNewLineBefore(@NotNull PsiElement anchor) {\n    PsiElement prevSibling = anchor.getPrevSibling();\n    while (prevSibling instanceof PsiWhiteSpace) {\n      if (prevSibling.textContains('\\n')) {\n        return true;\n      }\n      prevSibling = prevSibling.getPrevSibling();\n    }\n    return false;\n  }\n\n  @Nullable\n  public static GoExpression getValue(@NotNull GoVarDefinition definition) {\n    PsiElement parent = definition.getParent();\n    if (parent instanceof GoVarSpec) {\n      int index = ((GoVarSpec)parent).getVarDefinitionList().indexOf(definition);\n      return getByIndex(((GoVarSpec)parent).getRightExpressionsList(), index);\n    }\n    if (parent instanceof GoTypeSwitchGuard) {\n      return ((GoTypeSwitchGuard)parent).getExpression();\n    }\n    LOG.error(\"Cannot find value for variable definition: \" + definition.getText(),\n              AttachmentFactory.createAttachment(definition.getContainingFile().getVirtualFile()));\n    return null;\n  }\n\n  @Nullable\n  public static GoExpression getValue(@NotNull GoConstDefinition definition) {\n    PsiElement parent = definition.getParent();\n    assert parent instanceof GoConstSpec;\n    int index = ((GoConstSpec)parent).getConstDefinitionList().indexOf(definition);\n    return getByIndex(((GoConstSpec)parent).getExpressionList(), index);\n  }\n\n  private static <T> T getByIndex(@NotNull List<T> list, int index) {\n    return 0 <= index && index < list.size() ? list.get(index) : null;\n  }\n\n  @Nullable\n  public static GoTypeSpec getTypeSpecSafe(@NotNull GoType type) {\n    GoTypeStub stub = type.getStub();\n    PsiElement parent = stub == null ? type.getParent() : stub.getParentStub().getPsi();\n    return ObjectUtils.tryCast(parent, GoTypeSpec.class);\n  }\n\n  public static boolean canBeAutoImported(@NotNull GoFile file, boolean allowMain, @Nullable Module module) {\n    if (isBuiltinFile(file) || !allowMain && StringUtil.equals(file.getPackageName(), GoConstants.MAIN)) {\n      return false;\n    }\n    return allowed(file, null, module) && !GoUtil.isExcludedFile(file);\n  }\n\n  @Nullable\n  @Contract(\"null, _ -> null\")\n  public static <T extends PsiElement> T getNonStrictTopmostParentOfType(@Nullable PsiElement element, @NotNull Class<T> aClass) {\n    T first = PsiTreeUtil.getNonStrictParentOfType(element, aClass);\n    T topMost = PsiTreeUtil.getTopmostParentOfType(first, aClass);\n    return ObjectUtils.chooseNotNull(topMost, first);\n  }\n\n  @Nullable\n  public static GoExpression getExpression(@NotNull GoIndexOrSliceExpr slice) {\n    return ContainerUtil.getFirstItem(getExpressionsBefore(slice.getExpressionList(), slice.getLbrack()));\n  }\n\n  @NotNull\n  public static List<GoExpression> getLeftExpressionsList(@NotNull GoRangeClause rangeClause) {\n    return getExpressionsBefore(rangeClause.getExpressionList(), rangeClause.getRange());\n  }\n\n  @NotNull\n  public static List<GoExpression> getLeftExpressionsList(@NotNull GoRecvStatement recvStatement) {\n    return getExpressionsBefore(recvStatement.getExpressionList(),\n                                ObjectUtils.chooseNotNull(recvStatement.getAssign(), recvStatement.getVarAssign()));\n  }\n\n  @NotNull\n  public static Trinity<GoExpression, GoExpression, GoExpression> getIndices(@NotNull GoIndexOrSliceExpr slice) {\n    GoExpression start;\n    GoExpression end = null;\n    GoExpression max = null;\n    ASTNode[] colons = slice.getNode().getChildren(TokenSet.create(GoTypes.COLON));\n    List<GoExpression> exprList = slice.getExpressionList();\n\n    start = ContainerUtil.getFirstItem(getExpressionsInRange(exprList, slice.getLbrack(), colons.length > 0 ? colons[0].getPsi() : null));\n    if (colons.length == 1) {\n      end = ContainerUtil.getFirstItem(getExpressionsInRange(exprList, colons[0].getPsi(), slice.getRbrack()));\n    }\n    if (colons.length == 2) {\n      end = ContainerUtil.getFirstItem(getExpressionsInRange(exprList, colons[0].getPsi(), colons[1].getPsi()));\n      max = ContainerUtil.getFirstItem(getExpressionsInRange(exprList, colons[1].getPsi(), slice.getRbrack()));\n    }\n\n    return Trinity.create(start, end, max);\n  }\n\n  @NotNull\n  public static List<GoExpression> getRightExpressionsList(@NotNull GoVarSpec varSpec) {\n    return varSpec.getExpressionList();\n  }\n\n  @NotNull\n  public static List<GoExpression> getRightExpressionsList(@NotNull GoRangeClause rangeClause) {\n    return ContainerUtil.createMaybeSingletonList(rangeClause.getRangeExpression());\n  }\n\n  @NotNull\n  public static List<GoExpression> getRightExpressionsList(@NotNull GoRecvStatement recvStatement) {\n    return ContainerUtil.createMaybeSingletonList(recvStatement.getRecvExpression());\n  }\n\n  @Nullable\n  public static GoExpression getRangeExpression(@NotNull GoRangeClause rangeClause) {\n    return getLastExpressionAfter(rangeClause.getExpressionList(), rangeClause.getRange());\n  }\n\n  @Nullable\n  public static GoExpression getRecvExpression(@NotNull GoRecvStatement recvStatement) {\n    return getLastExpressionAfter(recvStatement.getExpressionList(),\n                                  ObjectUtils.chooseNotNull(recvStatement.getAssign(), recvStatement.getVarAssign()));\n  }\n\n  @Nullable\n  public static GoExpression getSendExpression(@NotNull GoSendStatement sendStatement) {\n    return getLastExpressionAfter(sendStatement.getExpressionList(), sendStatement.getSendChannel());\n  }\n\n  @Nullable\n  private static GoExpression getLastExpressionAfter(@NotNull List<GoExpression> list, @Nullable PsiElement anchor) {\n    if (anchor == null) return null;\n    GoExpression last = ContainerUtil.getLastItem(list);\n    return last != null && last.getTextRange().getStartOffset() >= anchor.getTextRange().getEndOffset() ? last : null;\n  }\n\n  @NotNull\n  private static List<GoExpression> getExpressionsInRange(@NotNull List<GoExpression> list,\n                                                          @Nullable PsiElement start,\n                                                          @Nullable PsiElement end) {\n    if (start == null && end == null) {\n      return list;\n    }\n    return ContainerUtil.filter(list, expression -> (end == null || expression.getTextRange().getEndOffset() <= end.getTextRange().getStartOffset()) &&\n                                                (start == null || expression.getTextRange().getStartOffset() >= start.getTextRange().getEndOffset()));\n  }\n\n  @NotNull\n  private static List<GoExpression> getExpressionsBefore(@NotNull List<GoExpression> list, @Nullable PsiElement anchor) {\n    return getExpressionsInRange(list, null, anchor);\n  }\n\n  @NotNull\n  public static ReadWriteAccessDetector.Access getReadWriteAccess(@NotNull GoReferenceExpression referenceExpression) {\n    GoExpression expression = getConsiderableExpression(referenceExpression);\n    PsiElement parent = expression.getParent();\n    if (parent instanceof GoSelectorExpr) {\n      if (expression.equals(((GoSelectorExpr)parent).getRight())) {\n        expression = getConsiderableExpression((GoSelectorExpr)parent);\n        parent = expression.getParent();\n      }\n      else {\n        return Read;\n      }\n    }\n    if (parent instanceof GoIncDecStatement) {\n      return Write;\n    }\n    if (parent instanceof GoLeftHandExprList) {\n      PsiElement grandParent = parent.getParent();\n      if (grandParent instanceof GoAssignmentStatement) {\n        return ((GoAssignmentStatement)grandParent).getAssignOp().getAssign() == null ? ReadWrite : Write;\n      }\n      if (grandParent instanceof GoSendStatement) {\n        return Write;\n      }\n      return Read;\n    }\n    if (parent instanceof GoSendStatement && parent.getParent() instanceof GoCommCase) {\n      return expression.equals(((GoSendStatement)parent).getSendExpression()) ? Read : ReadWrite;\n    }\n    if (parent instanceof GoRangeClause) {\n      return expression.equals(((GoRangeClause)parent).getRangeExpression()) ? Read : Write;\n    }\n    if (parent instanceof GoRecvStatement) {\n      return expression.equals(((GoRecvStatement)parent).getRecvExpression()) ? Read : Write;\n    }\n    return Read;\n  }\n\n  @NotNull\n  private static GoExpression getConsiderableExpression(@NotNull GoExpression element) {\n    GoExpression result = element;\n    while (true) {\n      PsiElement parent = result.getParent();\n      if (parent == null) {\n        return result;\n      }\n      if (parent instanceof GoParenthesesExpr) {\n        result = (GoParenthesesExpr)parent;\n        continue;\n      }\n      if (parent instanceof GoUnaryExpr) {\n        GoUnaryExpr unaryExpr = (GoUnaryExpr)parent;\n        if (unaryExpr.getMul() != null || unaryExpr.getBitAnd() != null || unaryExpr.getSendChannel() != null) {\n          result = (GoUnaryExpr)parent;\n          continue;\n        }\n      }\n      return result;\n    }\n  }\n\n  @NotNull\n  public static String getDecodedText(@NotNull GoStringLiteral o) {\n    StringBuilder builder = new StringBuilder();\n    TextRange range = ElementManipulators.getManipulator(o).getRangeInElement(o);\n    o.createLiteralTextEscaper().decode(range, builder);\n    return builder.toString();\n  }\n\n  @Nullable\n  public static PsiElement getOperator(@NotNull GoUnaryExpr o) {\n    return getNotNullElement(o.getNot(), o.getMinus(), o.getPlus(), o.getBitAnd(), o.getBitXor(), o.getMul(), o.getSendChannel());\n  }\n\n  @Nullable\n  public static PsiElement getOperator(@NotNull GoBinaryExpr o) {\n    if (o instanceof GoAndExpr) return ((GoAndExpr)o).getCondAnd();\n    if (o instanceof GoOrExpr) return ((GoOrExpr)o).getCondOr();\n    if (o instanceof GoSelectorExpr) return ((GoSelectorExpr)o).getDot();\n    if (o instanceof GoConversionExpr) return ((GoConversionExpr)o).getComma();\n\n    if (o instanceof GoMulExpr) {\n      GoMulExpr m = (GoMulExpr)o;\n      return getNotNullElement(m.getMul(), m.getQuotient(), m.getRemainder(), m.getShiftRight(), m.getShiftLeft(), m.getBitAnd(),\n                               m.getBitClear());\n    }\n    if (o instanceof GoAddExpr) {\n      GoAddExpr a = (GoAddExpr)o;\n      return getNotNullElement(a.getBitXor(), a.getBitOr(), a.getMinus(), a.getPlus());\n    }\n    if (o instanceof GoConditionalExpr) {\n      GoConditionalExpr c = (GoConditionalExpr)o;\n      return getNotNullElement(c.getEq(), c.getNotEq(), c.getGreater(), c.getGreaterOrEqual(), c.getLess(), c.getLessOrEqual());\n    }\n    return null;\n  }\n\n  @Nullable\n  private static PsiElement getNotNullElement(@Nullable PsiElement... elements) {\n    if (elements == null) return null;\n    for (PsiElement e : elements) {\n      if (e != null) return e;\n    }\n    return null;\n  }\n\n  public static boolean isSingleCharLiteral(@NotNull GoStringLiteral literal) {\n    return literal.getDecodedText().length() == 1;\n  }\n\n  @Nullable\n  public static GoExpression getRightExpression(@NotNull GoAssignmentStatement assignment, @NotNull GoExpression leftExpression) {\n    int fieldIndex = assignment.getLeftHandExprList().getExpressionList().indexOf(leftExpression);\n    return getByIndex(assignment.getExpressionList(), fieldIndex);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/psi/impl/GoReference.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi.impl;\n\nimport com.goide.GoConstants;\nimport com.goide.psi.*;\nimport com.goide.util.GoUtil;\nimport com.intellij.openapi.module.ModuleUtilCore;\nimport com.intellij.openapi.util.*;\nimport com.intellij.psi.*;\nimport com.intellij.psi.impl.source.resolve.ResolveCache;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport com.intellij.util.ArrayUtil;\nimport com.intellij.util.IncorrectOperationException;\nimport com.intellij.util.ObjectUtils;\nimport com.intellij.util.containers.ContainerUtil;\nimport com.intellij.util.containers.OrderedSet;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.Collection;\nimport java.util.List;\n\nimport static com.goide.psi.impl.GoPsiImplUtil.*;\n\npublic class GoReference extends GoReferenceBase<GoReferenceExpressionBase> {\n  private static final Key<Object> POINTER = Key.create(\"POINTER\");\n  private static final Key<Object> DONT_PROCESS_METHODS = Key.create(\"DONT_PROCESS_METHODS\");\n\n  private static final ResolveCache.PolyVariantResolver<GoReference> MY_RESOLVER =\n    (r, incompleteCode) -> r.resolveInner();\n\n  public GoReference(@NotNull GoReferenceExpressionBase o) {\n    super(o, TextRange.from(o.getIdentifier().getStartOffsetInParent(), o.getIdentifier().getTextLength()));\n  }\n\n  @Nullable\n  static PsiFile getContextFile(@NotNull ResolveState state) {\n    PsiElement element = getContextElement(state);\n    return element != null ? element.getContainingFile() : null;\n  }\n\n  @NotNull\n  private ResolveResult[] resolveInner() {\n    if (!myElement.isValid()) return ResolveResult.EMPTY_ARRAY;\n    Collection<ResolveResult> result = new OrderedSet<>();\n    processResolveVariants(createResolveProcessor(result, myElement));\n    return result.toArray(new ResolveResult[result.size()]);\n  }\n  \n  @Override\n  public boolean isReferenceTo(@NotNull PsiElement element) {\n    return GoUtil.couldBeReferenceTo(element, myElement) && super.isReferenceTo(element);\n  }\n\n  @NotNull\n  private PsiElement getIdentifier() {\n    return myElement.getIdentifier();\n  }\n\n  @Override\n  @NotNull\n  public ResolveResult[] multiResolve(boolean incompleteCode) {\n    if (!myElement.isValid()) return ResolveResult.EMPTY_ARRAY;\n    return ResolveCache.getInstance(myElement.getProject()).resolveWithCaching(this, MY_RESOLVER, false, false);\n  }\n\n  @NotNull\n  @Override\n  public Object[] getVariants() {\n    return ArrayUtil.EMPTY_OBJECT_ARRAY;\n  }\n\n  public boolean processResolveVariants(@NotNull GoScopeProcessor processor) {\n    PsiFile file = myElement.getContainingFile();\n    if (!(file instanceof GoFile)) return false;\n    ResolveState state = createContextOnElement(myElement);\n    GoReferenceExpressionBase qualifier = myElement.getQualifier();\n    return qualifier != null\n           ? processQualifierExpression((GoFile)file, qualifier, processor, state)\n           : processUnqualifiedResolve((GoFile)file, processor, state);\n  }\n\n  private boolean processQualifierExpression(@NotNull GoFile file,\n                                             @NotNull GoReferenceExpressionBase qualifier,\n                                             @NotNull GoScopeProcessor processor,\n                                             @NotNull ResolveState state) {\n    PsiReference reference = qualifier.getReference();\n    PsiElement target = reference != null ? reference.resolve() : null;\n    if (target == null) return false;\n    if (target == qualifier) return processor.execute(myElement, state);\n    if (target instanceof GoImportSpec) {\n      if (((GoImportSpec)target).isCImport()) return processor.execute(myElement, state);\n      target = ((GoImportSpec)target).getImportString().resolve();\n    }\n    if (target instanceof PsiDirectory && !processDirectory((PsiDirectory)target, file, null, processor, state, false)) return false;\n    if (target instanceof GoTypeOwner) {\n      GoType type = typeOrParameterType((GoTypeOwner)target, createContextOnElement(myElement));\n      if (type instanceof GoCType) return processor.execute(myElement, state);\n      if (type != null) {\n        if (!processGoType(type, processor, state)) return false;\n        GoTypeReferenceExpression ref = getTypeRefExpression(type);\n        if (ref != null && ref.resolve() == ref) return processor.execute(myElement, state); // a bit hacky resolve for: var a C.foo; a.b\n      }\n    }\n    return true;\n  }\n\n  private boolean processGoType(@NotNull GoType type, @NotNull GoScopeProcessor processor, @NotNull ResolveState state) {\n    Boolean result = RecursionManager.doPreventingRecursion(type, true, () -> {\n      if (type instanceof GoParType) return processGoType(((GoParType)type).getActualType(), processor, state);\n      if (!processExistingType(type, processor, state)) return false;\n      if (type instanceof GoPointerType) {\n        if (!processPointer((GoPointerType)type, processor, state.put(POINTER, true))) return false;\n        GoType pointer = ((GoPointerType)type).getType();\n        if (pointer instanceof GoPointerType) {\n          return processPointer((GoPointerType)pointer, processor, state.put(POINTER, true));\n        }\n      }\n      return processTypeRef(type, processor, state);\n    });\n    return Boolean.TRUE.equals(result);\n  }\n\n  private boolean processPointer(@NotNull GoPointerType type, @NotNull GoScopeProcessor processor, @NotNull ResolveState state) {\n    GoType pointer = type.getType();\n    return pointer == null || processExistingType(pointer, processor, state) && processTypeRef(pointer, processor, state);\n  }\n\n  private boolean processTypeRef(@Nullable GoType type, @NotNull GoScopeProcessor processor, @NotNull ResolveState state) {\n    if (type == null) {\n      return true;\n    }\n    if (builtin(type)) {\n      // do not process builtin types like 'int int' or 'string string'\n      return true;\n    }\n    return processInTypeRef(type.getTypeReferenceExpression(), processor, state);\n  }\n\n  private boolean processExistingType(@NotNull GoType type, @NotNull GoScopeProcessor processor, @NotNull ResolveState state) {\n    PsiFile file = type.getContainingFile();\n    if (!(file instanceof GoFile)) return true;\n    PsiFile myFile = ObjectUtils.notNull(getContextFile(state), myElement.getContainingFile());\n    if (!(myFile instanceof GoFile) || !allowed(file, myFile, ModuleUtilCore.findModuleForPsiElement(myFile))) return true;\n\n    boolean localResolve = isLocalResolve(myFile, file);\n\n    GoTypeSpec parent = getTypeSpecSafe(type);\n    boolean canProcessMethods = state.get(DONT_PROCESS_METHODS) == null;\n    if (canProcessMethods && parent != null && !processNamedElements(processor, state, parent.getMethods(), localResolve, true)) return false;\n\n    if (type instanceof GoSpecType) {\n      type = type.getUnderlyingType();\n    }\n    if (type instanceof GoStructType) {\n      GoScopeProcessorBase delegate = createDelegate(processor);\n      type.processDeclarations(delegate, ResolveState.initial(), null, myElement);\n      List<GoTypeReferenceExpression> interfaceRefs = ContainerUtil.newArrayList();\n      List<GoTypeReferenceExpression> structRefs = ContainerUtil.newArrayList();\n      for (GoFieldDeclaration d : ((GoStructType)type).getFieldDeclarationList()) {\n        if (!processNamedElements(processor, state, d.getFieldDefinitionList(), localResolve)) return false;\n        GoAnonymousFieldDefinition anon = d.getAnonymousFieldDefinition();\n        GoTypeReferenceExpression ref = anon != null ? anon.getTypeReferenceExpression() : null;\n        if (ref != null) {\n          (anon.getType() instanceof GoPointerType ? structRefs : interfaceRefs).add(ref);\n          if (!processNamedElements(processor, state, ContainerUtil.createMaybeSingletonList(anon), localResolve)) return false;\n        }\n      }\n      if (!processCollectedRefs(interfaceRefs, processor, state.put(POINTER, null))) return false;\n      if (!processCollectedRefs(structRefs, processor, state)) return false;\n    }\n    else if (state.get(POINTER) == null && type instanceof GoInterfaceType) {\n      if (!processNamedElements(processor, state, ((GoInterfaceType)type).getMethods(), localResolve, true)) return false;\n      if (!processCollectedRefs(((GoInterfaceType)type).getBaseTypesReferences(), processor, state)) return false;\n    }\n    else if (type instanceof GoFunctionType) {\n      GoSignature signature = ((GoFunctionType)type).getSignature();\n      GoResult result = signature != null ? signature.getResult() : null;\n      GoType resultType = result != null ? result.getType() : null;\n      if (resultType != null && !processGoType(resultType, processor, state)) return false;\n    }\n    return true;\n  }\n\n  public static boolean isLocalResolve(@NotNull PsiFile originFile, @NotNull PsiFile externalFile) {\n    if (!(originFile instanceof GoFile) || !(externalFile instanceof GoFile)) return false;\n    GoFile o1 = (GoFile)originFile.getOriginalFile();\n    GoFile o2 = (GoFile)externalFile.getOriginalFile();\n    return Comparing.equal(o1.getImportPath(false), o2.getImportPath(false)) \n           && Comparing.equal(o1.getPackageName(), o2.getPackageName());\n  }\n\n  private boolean processCollectedRefs(@NotNull List<GoTypeReferenceExpression> refs,\n                                       @NotNull GoScopeProcessor processor,\n                                       @NotNull ResolveState state) {\n    for (GoTypeReferenceExpression ref : refs) {\n      if (!processInTypeRef(ref, processor, state)) return false;\n    }\n    return true;\n  }\n\n  private boolean processInTypeRef(@Nullable GoTypeReferenceExpression e, @NotNull GoScopeProcessor processor, @NotNull ResolveState state) {\n    PsiElement resolve = e != null ? e.resolve() : null;\n    if (resolve instanceof GoTypeOwner) {\n      GoType type = ((GoTypeOwner)resolve).getGoType(state);\n      if (type == null) return true;\n      if (!processGoType(type, processor, state)) return false;\n      if (type instanceof GoSpecType) {\n        GoType inner = ((GoSpecType)type).getType();\n        if (inner instanceof GoPointerType && state.get(POINTER) != null) return true;\n        if (inner != null && !processGoType(inner, processor, state.put(DONT_PROCESS_METHODS, true))) return false;\n      }\n      return true;\n    }\n    return true;\n  }\n\n  private boolean processUnqualifiedResolve(@NotNull GoFile file,\n                                            @NotNull GoScopeProcessor processor,\n                                            @NotNull ResolveState state) {\n    if (getIdentifier().textMatches(\"_\")) return processor.execute(myElement, state);\n\n    PsiElement parent = myElement.getParent();\n\n    if (parent instanceof GoSelectorExpr) {\n      boolean result = processSelector((GoSelectorExpr)parent, processor, state, myElement);\n      if (processor.isCompletion()) return result;\n      if (!result || prevDot(myElement)) return false;\n    }\n\n    PsiElement grandPa = parent.getParent();\n    if (grandPa instanceof GoSelectorExpr && !processSelector((GoSelectorExpr)grandPa, processor, state, parent)) return false;\n    \n    if (prevDot(parent)) return false;\n\n    if (!processBlock(processor, state, true)) return false;\n    if (!processReceiver(processor, state, true)) return false;\n    if (!processImports(file, processor, state, myElement)) return false;\n    if (!processFileEntities(file, processor, state, true)) return false;\n    if (!processDirectory(file.getOriginalFile().getParent(), file, file.getPackageName(), processor, state, true)) return false;\n    return processBuiltin(processor, state, myElement);\n  }\n\n  private boolean processReceiver(@NotNull GoScopeProcessor processor, @NotNull ResolveState state, boolean localResolve) {\n    GoScopeProcessorBase delegate = createDelegate(processor);\n    GoMethodDeclaration method = PsiTreeUtil.getParentOfType(myElement, GoMethodDeclaration.class);\n    GoReceiver receiver = method != null ? method.getReceiver() : null;\n    if (receiver == null) return true;\n    receiver.processDeclarations(delegate, ResolveState.initial(), null, myElement);\n    return processNamedElements(processor, state, delegate.getVariants(), localResolve);\n  }\n\n  private boolean processBlock(@NotNull GoScopeProcessor processor, @NotNull ResolveState state, boolean localResolve) {\n    GoScopeProcessorBase delegate = createDelegate(processor);\n    ResolveUtil.treeWalkUp(myElement, delegate);\n    return processNamedElements(processor, state, delegate.getVariants(), localResolve);\n  }\n\n  private boolean processSelector(@NotNull GoSelectorExpr parent,\n                                  @NotNull GoScopeProcessor processor,\n                                  @NotNull ResolveState state,\n                                  @Nullable PsiElement another) {\n    List<GoExpression> list = parent.getExpressionList();\n    if (list.size() > 1 && list.get(1).isEquivalentTo(another)) {\n      GoExpression e = list.get(0);\n      List<GoReferenceExpression> refs = ContainerUtil.newArrayList(PsiTreeUtil.findChildrenOfType(e, GoReferenceExpression.class));\n      GoExpression o = refs.size() > 1 ? refs.get(refs.size() - 1) : e;\n      PsiReference ref = o.getReference();\n      PsiElement resolve = ref != null ? ref.resolve() : null;\n      if (resolve == o) return processor.execute(myElement, state); // var c = C.call(); c.a.b.d;\n      GoType type = e.getGoType(createContextOnElement(myElement));\n      if (type != null && !processGoType(type, processor, state)) return false;\n    }\n    return true;\n  }\n\n  @NotNull\n  private GoVarProcessor createDelegate(@NotNull GoScopeProcessor processor) {\n    return new GoVarProcessor(getIdentifier(), myElement, processor.isCompletion(), true) {\n      @Override\n      protected boolean crossOff(@NotNull PsiElement e) {\n        if (e instanceof GoFieldDefinition) return true;\n        return super.crossOff(e) && !(e instanceof GoTypeSpec);\n      }\n    };\n  }\n\n  @Override\n  protected boolean processFileEntities(@NotNull GoFile file,\n                                        @NotNull GoScopeProcessor processor,\n                                        @NotNull ResolveState state,\n                                        boolean localProcessing) {\n    if (!processNamedElements(processor, state, file.getConstants(), o -> !Comparing.equal(GoConstants.IOTA, o.getName()) ||\n                                                                    !builtin(o) ||\n           PsiTreeUtil.getParentOfType(getContextElement(state), GoConstSpec.class) != null, localProcessing, false)) return false;\n    if (!processNamedElements(processor, state, file.getVars(), localProcessing)) return false;\n    Condition<GoNamedElement> dontProcessInit = o -> o instanceof GoFunctionDeclaration && !Comparing.equal(o.getName(), GoConstants.INIT);\n    if (!processNamedElements(processor, state, file.getFunctions(), dontProcessInit, localProcessing, false)) return false;\n    return processNamedElements(processor, state, file.getTypes(), localProcessing);\n  }\n\n  @NotNull\n  @Override\n  public PsiElement handleElementRename(@NotNull String newElementName) throws IncorrectOperationException {\n    getIdentifier().replace(GoElementFactory.createIdentifierFromText(myElement.getProject(), newElementName));\n    return myElement;\n  }\n\n  @Override\n  public boolean equals(Object o) {\n    return this == o || o instanceof GoReference && getElement() == ((GoReference)o).getElement();\n  }\n\n  @Override\n  public int hashCode() {\n    return getElement().hashCode();\n  }\n}"
  },
  {
    "path": "src/com/goide/psi/impl/GoReferenceBase.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi.impl;\n\nimport com.goide.psi.*;\nimport com.goide.sdk.GoSdkUtil;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.module.ModuleUtilCore;\nimport com.intellij.openapi.util.Comparing;\nimport com.intellij.openapi.util.Key;\nimport com.intellij.openapi.util.TextRange;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.psi.*;\nimport com.intellij.util.ObjectUtils;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.Collection;\nimport java.util.List;\nimport java.util.Map;\n\nimport static com.goide.psi.impl.GoPsiImplUtil.allowed;\n\npublic abstract class GoReferenceBase<T extends GoReferenceExpressionBase> extends PsiPolyVariantReferenceBase<T> {\n  public static final Key<List<PsiElement>> IMPORT_USERS = Key.create(\"IMPORT_USERS\");\n  public static final Key<String> ACTUAL_NAME = Key.create(\"ACTUAL_NAME\");\n\n  public GoReferenceBase(T element, TextRange range) {\n    super(element, range);\n  }\n\n  @Nullable\n  protected static String getPath(@Nullable PsiFile file) {\n    if (file == null) return null;\n    VirtualFile virtualFile = file.getOriginalFile().getVirtualFile();\n    return virtualFile == null ? null : virtualFile.getPath();\n  }\n\n  private static void putIfAbsent(@NotNull GoImportSpec importSpec, @NotNull PsiElement usage) {\n    //noinspection SynchronizationOnLocalVariableOrMethodParameter\n    synchronized (importSpec) {\n      List<PsiElement> newUsages = ContainerUtil.newSmartList(usage);\n      newUsages.addAll(IMPORT_USERS.get(importSpec, ContainerUtil.emptyList()));\n      importSpec.putUserData(IMPORT_USERS, newUsages);\n    }\n  }\n\n  protected boolean processDirectory(@Nullable PsiDirectory dir,\n                                     @Nullable GoFile file,\n                                     @Nullable String packageName,\n                                     @NotNull GoScopeProcessor processor,\n                                     @NotNull ResolveState state,\n                                     boolean localProcessing) {\n    if (dir == null) return true;\n    String filePath = getPath(file);\n    Module module = file != null ? ModuleUtilCore.findModuleForPsiElement(file) : null;\n    for (PsiFile f : dir.getFiles()) {\n      if (!(f instanceof GoFile) || Comparing.equal(getPath(f), filePath)) continue;\n      if (packageName != null && !packageName.equals(((GoFile)f).getPackageName())) continue;\n      if (!allowed(f, file, module)) continue;\n      if (!processFileEntities((GoFile)f, processor, state, localProcessing)) return false;\n    }\n    return true;\n  }\n\n  protected boolean processBuiltin(@NotNull GoScopeProcessor processor, @NotNull ResolveState state, @NotNull GoCompositeElement element) {\n    GoFile builtin = GoSdkUtil.findBuiltinFile(element);\n    return builtin == null || processFileEntities(builtin, processor, state, true);\n  }\n\n  protected boolean processImports(@NotNull GoFile file,\n                                   @NotNull GoScopeProcessor processor,\n                                   @NotNull ResolveState state,\n                                   @NotNull GoCompositeElement element) {\n    for (Map.Entry<String, Collection<GoImportSpec>> entry : file.getImportMap().entrySet()) {\n      for (GoImportSpec o : entry.getValue()) {\n        if (o.isForSideEffects()) continue;\n\n        GoImportString importString = o.getImportString();\n        if (o.isDot()) {\n          PsiDirectory implicitDir = importString.resolve();\n          boolean resolved = !processDirectory(implicitDir, file, null, processor, state, false);\n          if (resolved && !processor.isCompletion()) {\n            putIfAbsent(o, element);\n          }\n          if (resolved) return false;\n        }\n        else {\n          if (o.getAlias() == null) {\n            PsiDirectory resolve = importString.resolve();\n            if (resolve != null && !processor.execute(resolve, state.put(ACTUAL_NAME, entry.getKey()))) return false;\n          }\n          // todo: multi-resolve into appropriate package clauses\n          if (!processor.execute(o, state.put(ACTUAL_NAME, entry.getKey()))) return false;\n        }\n      }\n    }\n    return true;\n  }\n\n  @NotNull\n  protected GoScopeProcessor createResolveProcessor(@NotNull Collection<ResolveResult> result,\n                                                    @NotNull GoReferenceExpressionBase o) {\n    return new GoScopeProcessor() {\n      @Override\n      public boolean execute(@NotNull PsiElement element, @NotNull ResolveState state) {\n        if (element.equals(o)) return !result.add(new PsiElementResolveResult(element));\n        String name = ObjectUtils.chooseNotNull(state.get(ACTUAL_NAME),\n                                                element instanceof PsiNamedElement ? ((PsiNamedElement)element).getName() : null);\n        if (name != null && o.getIdentifier().textMatches(name)) {\n          result.add(new PsiElementResolveResult(element));\n          return false;\n        }\n        return true;\n      }\n    };\n  }\n\n  protected abstract boolean processFileEntities(@NotNull GoFile file,\n                                                 @NotNull GoScopeProcessor processor,\n                                                 @NotNull ResolveState state,\n                                                 boolean localProcessing);\n}\n"
  },
  {
    "path": "src/com/goide/psi/impl/GoScopeProcessor.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi.impl;\n\nimport com.intellij.psi.scope.BaseScopeProcessor;\n\nabstract public class GoScopeProcessor extends BaseScopeProcessor {\n  public boolean isCompletion() {\n    return false;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/psi/impl/GoScopeProcessorBase.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi.impl;\n\nimport com.goide.psi.GoFunctionOrMethodDeclaration;\nimport com.goide.psi.GoNamedElement;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.ResolveState;\nimport com.intellij.util.containers.ContainerUtil;\nimport com.intellij.util.containers.OrderedSet;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.List;\n\npublic abstract class GoScopeProcessorBase extends GoScopeProcessor {\n  @NotNull private final OrderedSet<GoNamedElement> myResult = new OrderedSet<>();\n  @NotNull protected final PsiElement myOrigin;\n  @NotNull private final PsiElement myRequestedNameElement;\n  protected final boolean myIsCompletion;\n\n  public GoScopeProcessorBase(@NotNull PsiElement origin) {\n    this(origin, origin, false);\n  }\n\n  public GoScopeProcessorBase(@NotNull PsiElement requestedNameElement, @NotNull PsiElement origin, boolean completion) {\n    myRequestedNameElement = requestedNameElement;\n    myOrigin = origin;\n    myIsCompletion = completion;\n  }\n\n  @Override\n  public boolean execute(@NotNull PsiElement e, @NotNull ResolveState state) {\n    if (e instanceof GoFunctionOrMethodDeclaration) return false;\n    if (!(e instanceof GoNamedElement)) return true;\n    String name = ((GoNamedElement)e).getName();\n    if (StringUtil.isEmpty(name) || !myIsCompletion && !myRequestedNameElement.textMatches(name)) return true;\n    if (crossOff(e)) return true;\n    if (e.equals(myOrigin)) return true;\n    return add((GoNamedElement)e) || myIsCompletion;\n  }\n\n  protected boolean add(@NotNull GoNamedElement psiElement) {\n    return !myResult.add(psiElement);\n  }\n\n  @Nullable\n  public GoNamedElement getResult() {\n    return ContainerUtil.getFirstItem(myResult);\n  }\n\n  @NotNull\n  public List<GoNamedElement> getVariants() {\n    return myResult;\n  }\n\n  protected abstract boolean crossOff(@NotNull PsiElement e);\n}\n"
  },
  {
    "path": "src/com/goide/psi/impl/GoStubbedElementImpl.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi.impl;\n\nimport com.goide.psi.GoCompositeElement;\nimport com.goide.psi.GoFile;\nimport com.goide.stubs.TextHolder;\nimport com.intellij.extapi.psi.StubBasedPsiElementBase;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.ResolveState;\nimport com.intellij.psi.scope.PsiScopeProcessor;\nimport com.intellij.psi.stubs.IStubElementType;\nimport com.intellij.psi.stubs.StubBase;\nimport com.intellij.psi.stubs.StubElement;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport com.intellij.util.SmartList;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.List;\n\npublic abstract class GoStubbedElementImpl<T extends StubBase<?>> extends StubBasedPsiElementBase<T> implements GoCompositeElement {\n  public GoStubbedElementImpl(@NotNull T stub, @NotNull IStubElementType nodeType) {\n    super(stub, nodeType);\n  }\n\n  public GoStubbedElementImpl(@NotNull ASTNode node) {\n    super(node);\n  }\n\n  @Override\n  public String toString() {\n    return getElementType().toString();\n  }\n\n  @Nullable\n  @Override\n  public String getText() {\n    T stub = getStub();\n    if (stub instanceof TextHolder) {\n      String text = ((TextHolder)stub).getText();\n      if (text != null) return text;\n    }\n    return super.getText();\n  }\n\n  @Override\n  public PsiElement getParent() {\n    return getParentByStub();\n  }\n\n  @Override\n  public boolean processDeclarations(@NotNull PsiScopeProcessor processor,\n                                     @NotNull ResolveState state,\n                                     PsiElement lastParent,\n                                     @NotNull PsiElement place) {\n    return GoCompositeElementImpl.processDeclarationsDefault(this, processor, state, lastParent, place);\n  }\n\n  @NotNull\n  @Override\n  public GoFile getContainingFile() {\n    return (GoFile)super.getContainingFile();\n  }\n\n  @Override\n  public boolean shouldGoDeeper() {\n    return true;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/psi/impl/GoTypeProcessor.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi.impl;\n\nimport com.goide.psi.GoTypeReferenceExpression;\nimport com.goide.psi.GoTypeSpec;\nimport com.intellij.psi.PsiElement;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoTypeProcessor extends GoScopeProcessorBase {\n  public GoTypeProcessor(@NotNull GoTypeReferenceExpression origin, boolean completion) {\n    super(origin.getIdentifier(), origin, completion);\n  }\n\n  @Override\n  protected boolean crossOff(@NotNull PsiElement e) {\n    return !(e instanceof GoTypeSpec);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/psi/impl/GoTypeReference.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi.impl;\n\nimport com.goide.GoConstants;\nimport com.goide.GoTypes;\nimport com.goide.psi.*;\nimport com.goide.sdk.GoSdkUtil;\nimport com.goide.util.GoUtil;\nimport com.intellij.openapi.util.Condition;\nimport com.intellij.openapi.util.TextRange;\nimport com.intellij.psi.*;\nimport com.intellij.psi.formatter.FormatterUtil;\nimport com.intellij.psi.impl.source.resolve.ResolveCache;\nimport com.intellij.psi.scope.PsiScopeProcessor;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport com.intellij.util.ArrayUtil;\nimport com.intellij.util.IncorrectOperationException;\nimport com.intellij.util.containers.ContainerUtil;\nimport com.intellij.util.containers.OrderedSet;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.Collection;\nimport java.util.List;\nimport java.util.Set;\n\npublic class GoTypeReference extends GoReferenceBase<GoTypeReferenceExpression> {\n  private final boolean myInsideInterfaceType;\n\n  public GoTypeReference(@NotNull GoTypeReferenceExpression o) {\n    super(o, TextRange.from(o.getIdentifier().getStartOffsetInParent(), o.getIdentifier().getTextLength()));\n    myInsideInterfaceType = myElement.getParent() instanceof GoMethodSpec;\n  }\n\n  private static final ResolveCache.PolyVariantResolver<PsiPolyVariantReferenceBase> MY_RESOLVER =\n    (psiPolyVariantReferenceBase, incompleteCode) -> ((GoTypeReference)psiPolyVariantReferenceBase).resolveInner();\n\n  @NotNull\n  private ResolveResult[] resolveInner() {\n    Collection<ResolveResult> result = new OrderedSet<>();\n    processResolveVariants(createResolveProcessor(result, myElement));\n    return result.toArray(new ResolveResult[result.size()]);\n  }\n\n  @Override\n  public boolean isReferenceTo(PsiElement element) {\n    return GoUtil.couldBeReferenceTo(element, myElement) && super.isReferenceTo(element);\n  }\n\n  @NotNull\n  private PsiElement getIdentifier() {\n    return myElement.getIdentifier();\n  }\n\n  @Override\n  @NotNull\n  public ResolveResult[] multiResolve(boolean incompleteCode) {\n    return myElement.isValid()\n           ? ResolveCache.getInstance(myElement.getProject()).resolveWithCaching(this, MY_RESOLVER, false, false)\n           : ResolveResult.EMPTY_ARRAY;\n  }\n\n  @NotNull\n  @Override\n  public Object[] getVariants() {\n    return ArrayUtil.EMPTY_OBJECT_ARRAY;\n  }\n\n  public boolean processResolveVariants(@NotNull GoScopeProcessor processor) {\n    PsiFile file = myElement.getContainingFile();\n    if (!(file instanceof GoFile)) return false;\n    ResolveState state = ResolveState.initial();\n    GoTypeReferenceExpression qualifier = myElement.getQualifier();\n    if (qualifier != null) {\n      return processQualifierExpression((GoFile)file, qualifier, processor, state);\n    }\n    return processUnqualifiedResolve((GoFile)file, processor, state, true);\n  }\n\n  private boolean processQualifierExpression(@NotNull GoFile file,\n                                             @NotNull GoTypeReferenceExpression qualifier,\n                                             @NotNull GoScopeProcessor processor,\n                                             @NotNull ResolveState state) {\n    PsiElement target = qualifier.resolve();\n    if (target == null || target == qualifier) return false;\n    if (target instanceof GoImportSpec) {\n      if (((GoImportSpec)target).isCImport()) return processor.execute(myElement, state);\n      target = ((GoImportSpec)target).getImportString().resolve();\n    }\n    if (target instanceof PsiDirectory) {\n      processDirectory((PsiDirectory)target, file, null, processor, state, false);\n    }\n    return false;\n  }\n\n  private boolean processUnqualifiedResolve(@NotNull GoFile file,\n                                            @NotNull GoScopeProcessor processor,\n                                            @NotNull ResolveState state,\n                                            boolean localResolve) {\n    GoScopeProcessorBase delegate = createDelegate(processor);\n    ResolveUtil.treeWalkUp(myElement, delegate);\n    Collection<? extends GoNamedElement> result = delegate.getVariants();\n    if (!processNamedElements(processor, state, result, localResolve)) return false;\n    if (!processFileEntities(file, processor, state, localResolve)) return false;\n    PsiDirectory dir = file.getOriginalFile().getParent();\n    if (!processDirectory(dir, file, file.getPackageName(), processor, state, true)) return false;\n    if (PsiTreeUtil.getParentOfType(getElement(), GoReceiver.class) != null) return true;\n    if (!processImports(file, processor, state, myElement)) return false;\n    if (!processBuiltin(processor, state, myElement)) return false;\n    if (getIdentifier().textMatches(GoConstants.NIL) && PsiTreeUtil.getParentOfType(myElement, GoTypeCaseClause.class) != null) {\n      GoType type = PsiTreeUtil.getParentOfType(myElement, GoType.class);\n      if (FormatterUtil.getPrevious(type != null ? type.getNode() : null, GoTypes.CASE) == null) return true;\n      GoFile builtinFile = GoSdkUtil.findBuiltinFile(myElement);\n      if (builtinFile == null) return false;\n      GoVarDefinition nil = ContainerUtil.find(builtinFile.getVars(), v -> GoConstants.NIL.equals(v.getName()));\n      if (nil != null && !processor.execute(nil, state)) return false;\n    }\n    return true;\n  }\n\n  public final static Set<String> DOC_ONLY_TYPES = ContainerUtil.set(\"Type\", \"Type1\", \"IntegerType\", \"FloatType\", \"ComplexType\");\n  private static final Condition<GoTypeSpec> BUILTIN_TYPE = spec -> {\n    String name = spec.getName();\n    return name != null && !DOC_ONLY_TYPES.contains(name);\n  };\n\n  @NotNull\n  private GoTypeProcessor createDelegate(@NotNull GoScopeProcessor processor) {\n    return new GoTypeProcessor(myElement, processor.isCompletion());\n  }\n\n  @Override\n  protected boolean processFileEntities(@NotNull GoFile file,\n                                        @NotNull GoScopeProcessor processor,\n                                        @NotNull ResolveState state,\n                                        boolean localProcessing) {\n    List<GoTypeSpec> types = GoPsiImplUtil.isBuiltinFile(file) ? ContainerUtil.filter(file.getTypes(), BUILTIN_TYPE) : file.getTypes();\n    return processNamedElements(processor, state, types, localProcessing);\n  }\n\n  private boolean processNamedElements(@NotNull PsiScopeProcessor processor,\n                                       @NotNull ResolveState state,\n                                       @NotNull Collection<? extends GoNamedElement> elements, boolean localResolve) {\n    for (GoNamedElement definition : elements) {\n      if (definition instanceof GoTypeSpec && !allowed((GoTypeSpec)definition)) continue;\n      if ((definition.isPublic() || localResolve) && !processor.execute(definition, state)) return false;\n    }\n    return true;\n  }\n\n  public boolean allowed(@NotNull GoTypeSpec definition) {\n    return !myInsideInterfaceType || definition.getSpecType().getType() instanceof GoInterfaceType;\n  }\n\n  @Override\n  public PsiElement handleElementRename(String newElementName) throws IncorrectOperationException {\n    getIdentifier().replace(GoElementFactory.createIdentifierFromText(myElement.getProject(), newElementName));\n    return myElement;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/psi/impl/GoTypeUtil.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi.impl;\n\nimport com.goide.GoConstants;\nimport com.goide.psi.*;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiReference;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.Collections;\nimport java.util.List;\n\npublic class GoTypeUtil {\n  /**\n   * https://golang.org/ref/spec#For_statements\n   * The expression on the right in the \"range\" clause is called the range expression,\n   * which may be an array, pointer to an array, slice, string, map, or channel permitting receive operations.\n   */\n  public static boolean isIterable(@Nullable GoType type) {\n    type = type != null ? type.getUnderlyingType() : null;\n    return type instanceof GoArrayOrSliceType ||\n           type instanceof GoPointerType && isArray(((GoPointerType)type).getType()) ||\n           type instanceof GoMapType ||\n           type instanceof GoChannelType ||\n           isString(type);\n  }\n\n  private static boolean isArray(@Nullable GoType type) {\n    type = type != null ? type.getUnderlyingType() : null;\n    return type instanceof GoArrayOrSliceType && ((GoArrayOrSliceType)type).getExpression() != null;\n  }\n\n  public static boolean isString(@Nullable GoType type) {\n    return isBuiltinType(type, \"string\");\n  }\n\n  public static boolean isBoolean(@Nullable GoType type) {\n    return isBuiltinType(type, \"bool\");\n  }\n\n  private static boolean isBuiltinType(@Nullable GoType type, @Nullable String builtinTypeName) {\n    if (builtinTypeName == null) return false;\n    type = type != null ? type.getUnderlyingType() : null;\n    return type != null &&\n           !(type instanceof GoCType) &&\n           type.textMatches(builtinTypeName) && GoPsiImplUtil.builtin(type);\n  }\n\n  @NotNull\n  public static List<GoType> getExpectedTypes(@NotNull GoExpression expression) {\n    PsiElement parent = expression.getParent();\n    if (parent == null) return Collections.emptyList();\n    if (parent instanceof GoAssignmentStatement) {\n      return getExpectedTypesFromAssignmentStatement(expression, (GoAssignmentStatement)parent);\n    }\n    if (parent instanceof GoRangeClause) {\n      return Collections.singletonList(getGoType(null, parent));\n    }\n    if (parent instanceof GoRecvStatement) {\n      return getExpectedTypesFromRecvStatement((GoRecvStatement)parent);\n    }\n    if (parent instanceof GoVarSpec) {\n      return getExpectedTypesFromVarSpec(expression, (GoVarSpec)parent);\n    }\n    if (parent instanceof GoArgumentList) {\n      return getExpectedTypesFromArgumentList(expression, (GoArgumentList)parent);\n    }\n    if (parent instanceof GoUnaryExpr) {\n      GoUnaryExpr unaryExpr = (GoUnaryExpr)parent;\n      if (unaryExpr.getSendChannel() != null) {\n        GoType type = ContainerUtil.getFirstItem(getExpectedTypes(unaryExpr));\n        GoType chanType = GoElementFactory.createType(parent.getProject(), \"chan \" + getInterfaceIfNull(type, parent).getText());\n        return Collections.singletonList(chanType);\n      }\n      else {\n        return Collections.singletonList(getGoType(null, parent));\n      }\n    }\n    if (parent instanceof GoSendStatement || parent instanceof GoLeftHandExprList && parent.getParent() instanceof GoSendStatement) {\n      GoSendStatement sendStatement = (GoSendStatement)(parent instanceof GoSendStatement ? parent : parent.getParent());\n      return getExpectedTypesFromGoSendStatement(expression, sendStatement);\n    }\n    if (parent instanceof GoExprCaseClause) {\n      return getExpectedTypesFromExprCaseClause((GoExprCaseClause)parent);\n    }\n    return Collections.emptyList();\n  }\n\n  @NotNull\n  private static List<GoType> getExpectedTypesFromExprCaseClause(@NotNull GoExprCaseClause exprCaseClause) {\n    GoExprSwitchStatement switchStatement = PsiTreeUtil.getParentOfType(exprCaseClause, GoExprSwitchStatement.class);\n    assert switchStatement != null;\n\n    GoExpression switchExpr = switchStatement.getExpression();\n    if (switchExpr != null) {\n      return Collections.singletonList(getGoType(switchExpr, exprCaseClause));\n    }\n\n    GoStatement statement = switchStatement.getStatement();\n    if (statement == null) {\n      return Collections.singletonList(getInterfaceIfNull(GoPsiImplUtil.getBuiltinType(\"bool\", exprCaseClause), exprCaseClause));\n    }\n\n    GoLeftHandExprList leftHandExprList = statement instanceof GoSimpleStatement ? ((GoSimpleStatement)statement).getLeftHandExprList() : null;\n    GoExpression expr = leftHandExprList != null ? ContainerUtil.getFirstItem(leftHandExprList.getExpressionList()) : null;\n    return Collections.singletonList(getGoType(expr, exprCaseClause));\n  }\n\n  @NotNull\n  private static List<GoType> getExpectedTypesFromGoSendStatement(@NotNull GoExpression expression, @NotNull GoSendStatement statement) {\n    GoLeftHandExprList leftHandExprList = statement.getLeftHandExprList();\n    GoExpression channel = ContainerUtil.getFirstItem(leftHandExprList != null ? leftHandExprList.getExpressionList() : statement.getExpressionList());\n    GoExpression sendExpr = statement.getSendExpression();\n    assert channel != null;\n    if (expression.isEquivalentTo(sendExpr)) {\n      GoType chanType = channel.getGoType(null);\n      if (chanType instanceof GoChannelType) {\n        return Collections.singletonList(getInterfaceIfNull(((GoChannelType)chanType).getType(), statement));\n      }\n    }\n    if (expression.isEquivalentTo(channel)) {\n      GoType type = sendExpr != null ? sendExpr.getGoType(null) : null;\n      GoType chanType = GoElementFactory.createType(statement.getProject(), \"chan \" + getInterfaceIfNull(type, statement).getText());\n      return Collections.singletonList(chanType);\n    }\n    return Collections.singletonList(getInterfaceIfNull(null, statement));\n  }\n\n  @NotNull\n  private static List<GoType> getExpectedTypesFromArgumentList(@NotNull GoExpression expression, @NotNull GoArgumentList argumentList) {\n    PsiElement parentOfParent = argumentList.getParent();\n    assert parentOfParent instanceof GoCallExpr;\n    PsiReference reference = ((GoCallExpr)parentOfParent).getExpression().getReference();\n    if (reference != null) {\n      PsiElement resolve = reference.resolve();\n      if (resolve instanceof GoFunctionOrMethodDeclaration) {\n        GoSignature signature = ((GoFunctionOrMethodDeclaration)resolve).getSignature();\n        if (signature != null) {\n          List<GoExpression> exprList = argumentList.getExpressionList();\n          List<GoParameterDeclaration> paramsList = signature.getParameters().getParameterDeclarationList();\n          if (exprList.size() == 1) {\n            List<GoType> typeList = ContainerUtil.newSmartList();\n            for (GoParameterDeclaration parameterDecl : paramsList) {\n              for (GoParamDefinition parameter : parameterDecl.getParamDefinitionList()) {\n                typeList.add(getGoType(parameter, argumentList));\n              }\n              if (parameterDecl.getParamDefinitionList().isEmpty()) {\n                typeList.add(getInterfaceIfNull(parameterDecl.getType(), argumentList));\n              }\n            }\n            List<GoType> result = ContainerUtil.newSmartList(createGoTypeListOrGoType(typeList, argumentList));\n            if (paramsList.size() > 1) {\n              assert paramsList.get(0) != null;\n              result.add(getInterfaceIfNull(paramsList.get(0).getType(), argumentList));\n            }\n            return result;\n          }\n          else {\n            int position = exprList.indexOf(expression);\n            if (position >= 0) {\n              int i = 0;\n              for (GoParameterDeclaration parameterDecl : paramsList) {\n                int paramDeclSize = Math.max(1, parameterDecl.getParamDefinitionList().size());\n                if (i + paramDeclSize > position) {\n                  return Collections.singletonList(getInterfaceIfNull(parameterDecl.getType(), argumentList));\n                }\n                i += paramDeclSize;\n              }\n            }\n          }\n        }\n      }\n    }\n    return Collections.singletonList(getInterfaceIfNull(null, argumentList));\n  }\n\n  @NotNull\n  private static List<GoType> getExpectedTypesFromRecvStatement(@NotNull GoRecvStatement recvStatement) {\n    List<GoType> typeList = ContainerUtil.newSmartList();\n    for (GoExpression expr : recvStatement.getLeftExpressionsList()) {\n      typeList.add(getGoType(expr, recvStatement));\n    }\n    return Collections.singletonList(createGoTypeListOrGoType(typeList, recvStatement));\n  }\n\n  @NotNull\n  private static List<GoType> getExpectedTypesFromVarSpec(@NotNull GoExpression expression, @NotNull GoVarSpec varSpec) {\n    List<GoType> result = ContainerUtil.newSmartList();\n    GoType type = getInterfaceIfNull(varSpec.getType(), varSpec);\n    if (varSpec.getRightExpressionsList().size() == 1) {\n      List<GoType> typeList = ContainerUtil.newSmartList();\n      int defListSize = varSpec.getVarDefinitionList().size();\n      for (int i = 0; i < defListSize; i++) {\n        typeList.add(type);\n      }\n      result.add(createGoTypeListOrGoType(typeList, expression));\n      if (defListSize > 1) {\n        result.add(getInterfaceIfNull(type, varSpec));\n      }\n      return result;\n    }\n    result.add(type);\n    return result;\n  }\n\n  @NotNull\n  private static List<GoType> getExpectedTypesFromAssignmentStatement(@NotNull GoExpression expression,\n                                                                      @NotNull GoAssignmentStatement assignment) {\n    List<GoExpression> leftExpressions = assignment.getLeftHandExprList().getExpressionList();\n    if (assignment.getExpressionList().size() == 1) {\n      List<GoType> typeList = ContainerUtil.newSmartList();\n      for (GoExpression expr : leftExpressions) {\n        GoType type = expr.getGoType(null);\n        typeList.add(type);\n      }\n      List<GoType> result = ContainerUtil.newSmartList(createGoTypeListOrGoType(typeList, expression));\n      if (leftExpressions.size() > 1) {\n        result.add(getGoType(leftExpressions.get(0), assignment));\n      }\n      return result;\n    }\n\n    int position = assignment.getExpressionList().indexOf(expression);\n    GoType leftExpression = leftExpressions.size() > position ? leftExpressions.get(position).getGoType(null) : null;\n    return Collections.singletonList(getInterfaceIfNull(leftExpression, assignment));\n  }\n\n  @NotNull\n  private static GoType createGoTypeListOrGoType(@NotNull List<GoType> types, @NotNull PsiElement context) {\n    if (types.size() < 2) {\n      return getInterfaceIfNull(ContainerUtil.getFirstItem(types), context);\n    }\n    return GoElementFactory.createTypeList(context.getProject(), StringUtil.join(types, type -> type == null ? GoConstants.INTERFACE_TYPE : type.getText(), \", \"));\n  }\n\n  @NotNull\n  private static GoType getInterfaceIfNull(@Nullable GoType type, @NotNull PsiElement context) {\n    return type == null ? GoElementFactory.createType(context.getProject(), GoConstants.INTERFACE_TYPE) : type;\n  }\n\n  @NotNull\n  private static GoType getGoType(@Nullable GoTypeOwner element, @NotNull PsiElement context) {\n    return getInterfaceIfNull(element != null ? element.getGoType(null) : null, context);\n  }\n\n  public static boolean isFunction(@Nullable GoType goType) {\n    return goType != null && goType.getUnderlyingType() instanceof GoFunctionType;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/psi/impl/GoVarProcessor.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi.impl;\n\nimport com.goide.psi.*;\nimport com.intellij.openapi.util.Comparing;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoVarProcessor extends GoScopeProcessorBase {\n  private final boolean myImShortVarDeclaration;\n  private final PsiElement myParentGuard; \n  @Nullable private final GoCompositeElement myScope;\n  \n  public GoVarProcessor(@NotNull PsiElement origin, boolean completion) {\n    this(origin, origin, completion, false);\n  }\n\n  public GoVarProcessor(@NotNull PsiElement requestedName, @NotNull PsiElement origin, boolean completion, boolean delegate) {\n    super(requestedName, origin, completion);\n    myImShortVarDeclaration = PsiTreeUtil.getParentOfType(origin, GoShortVarDeclaration.class) != null && !delegate;\n    myParentGuard = origin.getParent() instanceof GoTypeSwitchGuard ? origin.getParent() : null;\n    myScope = getScope(origin);\n  }\n\n  @Override\n  protected boolean add(@NotNull GoNamedElement o) {\n    PsiElement commonParent = PsiTreeUtil.findCommonParent(o, myOrigin);\n    if (commonParent instanceof GoRangeClause || commonParent instanceof GoTypeSwitchGuard) return true;\n    PsiElement p = o.getParent();\n    boolean inVarOrRange = PsiTreeUtil.getParentOfType(o, GoVarDeclaration.class) != null || p instanceof GoRangeClause;\n    boolean differentBlocks = differentBlocks(o);\n    boolean inShortVar = PsiTreeUtil.getParentOfType(o, GoShortVarDeclaration.class, GoRecvStatement.class) != null;\n    if (inShortVar && differentBlocks && myImShortVarDeclaration) return true;\n    if (differentBlocks && inShortVar && !inVarOrRange && getResult() != null && !myIsCompletion) return true;\n    if (inShortVar && fromNotAncestorBlock(o)) return true;\n    if (myParentGuard != null && o instanceof GoVarDefinition && p.isEquivalentTo(myParentGuard)) return true;\n    return super.add(o);\n  }\n\n  private boolean fromNotAncestorBlock(@NotNull GoNamedElement o) {\n    return (myScope instanceof GoExprCaseClause || myScope instanceof GoCommClause) &&\n           !PsiTreeUtil.isAncestor(getScope(o), myOrigin, false);\n  }\n\n  private boolean differentBlocks(@Nullable GoNamedElement o) {\n    return !Comparing.equal(myScope, getScope(o));\n  }\n\n  @Nullable\n  public static GoCompositeElement getScope(@Nullable PsiElement o) {\n    GoForStatement forStatement = PsiTreeUtil.getParentOfType(o, GoForStatement.class);\n    if (forStatement != null) return forStatement.getBlock();\n    GoIfStatement ifStatement = PsiTreeUtil.getParentOfType(o, GoIfStatement.class);\n    if (ifStatement != null) return ifStatement.getBlock();\n    GoElseStatement elseStatement = PsiTreeUtil.getParentOfType(o, GoElseStatement.class);\n    if (elseStatement != null) return elseStatement.getBlock();\n    GoExprCaseClause exprCaseClause = PsiTreeUtil.getParentOfType(o, GoExprCaseClause.class);\n    if (exprCaseClause != null) return exprCaseClause;\n    GoCommClause commClause = PsiTreeUtil.getParentOfType(o, GoCommClause.class);\n    if (commClause != null) return commClause;\n    return PsiTreeUtil.getParentOfType(o, GoBlock.class);\n  }\n\n  @Override\n  protected boolean crossOff(@NotNull PsiElement e) {\n    return !(e instanceof GoVarDefinition) &&\n           !(e instanceof GoParamDefinition) &&\n           !(e instanceof GoReceiver) &&\n           !(e instanceof GoFieldDefinition) &&\n           !(e instanceof GoAnonymousFieldDefinition) &&\n           !(e instanceof GoConstDefinition);\n  }\n}"
  },
  {
    "path": "src/com/goide/psi/impl/GoVarReference.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi.impl;\n\nimport com.goide.psi.GoBlock;\nimport com.goide.psi.GoFieldDefinition;\nimport com.goide.psi.GoStatement;\nimport com.goide.psi.GoVarDefinition;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.ResolveState;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoVarReference extends GoCachedReference<GoVarDefinition> {\n  private final GoBlock myPotentialStopBlock;\n\n  public GoVarReference(@NotNull GoVarDefinition element) {\n    super(element);\n    myPotentialStopBlock = PsiTreeUtil.getParentOfType(element, GoBlock.class);\n  }\n\n  @Nullable\n  @Override\n  public PsiElement resolveInner() {\n    GoVarProcessor p = new GoVarProcessor(myElement, false) {\n      @Override\n      protected boolean crossOff(@NotNull PsiElement e) {\n        return e instanceof GoFieldDefinition || super.crossOff(e);\n      }\n    };\n    processResolveVariants(p);\n    return p.getResult();\n  }\n\n  @Override\n  public boolean processResolveVariants(@NotNull GoScopeProcessor processor) {\n    GoVarProcessor p = processor instanceof GoVarProcessor\n                       ? (GoVarProcessor)processor\n                       : new GoVarProcessor(myElement, processor.isCompletion()) {\n                         @Override\n                         public boolean execute(@NotNull PsiElement e, @NotNull ResolveState state) {\n                           return super.execute(e, state) && processor.execute(e, state);\n                         }\n                       };\n\n    if (myPotentialStopBlock != null) {\n      myPotentialStopBlock.processDeclarations(p, ResolveState.initial(), PsiTreeUtil.getParentOfType(myElement, GoStatement.class), myElement);\n      return true;\n    }\n    return false;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/psi/impl/ResolveUtil.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi.impl;\n\nimport com.goide.psi.GoCompositeElement;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.ResolveState;\nimport com.intellij.psi.scope.PsiScopeProcessor;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic final class ResolveUtil {\n  private ResolveUtil() {}\n\n  public static boolean treeWalkUp(@Nullable PsiElement place, @NotNull PsiScopeProcessor processor) {\n    PsiElement lastParent = null;\n    PsiElement run = place;\n    while (run != null) {\n      if (place != run && !run.processDeclarations(processor, ResolveState.initial(), lastParent, place)) return false;\n      lastParent = run;\n      run = run.getParent();\n    }\n    return true;\n  }\n\n  public static boolean processChildren(@NotNull PsiElement element,\n                                        @NotNull PsiScopeProcessor processor,\n                                        @NotNull ResolveState substitutor,\n                                        @Nullable PsiElement lastParent,\n                                        @NotNull PsiElement place) {\n    PsiElement run = lastParent == null ? element.getLastChild() : lastParent.getPrevSibling();\n    while (run != null) {\n      if (run instanceof GoCompositeElement && !run.processDeclarations(processor, substitutor, null, place)) return false;\n      run = run.getPrevSibling();\n    }\n    return true;\n  }\n\n  public static boolean processChildrenFromTop(@NotNull PsiElement element,\n                                               @NotNull PsiScopeProcessor processor,\n                                               @NotNull ResolveState substitutor,\n                                               @Nullable PsiElement lastParent,\n                                               @NotNull PsiElement place) {\n    PsiElement run = element.getFirstChild();\n    while (run != null) {\n      if (run instanceof GoCompositeElement) {\n        if (run.isEquivalentTo(lastParent)) return true;\n        if (!run.processDeclarations(processor, substitutor, null, place)) return false;\n      }\n      run = run.getNextSibling();\n    }\n    return true;\n  }\n}"
  },
  {
    "path": "src/com/goide/psi/impl/imports/GoImportReference.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi.impl.imports;\n\nimport com.goide.codeInsight.imports.GoGetPackageFix;\nimport com.goide.completion.GoCompletionUtil;\nimport com.goide.quickfix.GoDeleteImportQuickFix;\nimport com.goide.sdk.GoPackageUtil;\nimport com.intellij.codeInsight.completion.CompletionUtil;\nimport com.intellij.codeInsight.daemon.quickFix.CreateFileFix;\nimport com.intellij.codeInspection.LocalQuickFix;\nimport com.intellij.openapi.util.TextRange;\nimport com.intellij.psi.*;\nimport com.intellij.psi.impl.source.resolve.reference.impl.providers.FileReference;\nimport com.intellij.psi.impl.source.resolve.reference.impl.providers.FileReferenceSet;\nimport com.intellij.util.ArrayUtil;\nimport com.intellij.util.IncorrectOperationException;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.Collection;\nimport java.util.List;\nimport java.util.Set;\n\npublic class GoImportReference extends FileReference {\n  public GoImportReference(@NotNull FileReferenceSet fileReferenceSet, TextRange range, int index, String text) {\n    super(fileReferenceSet, range, index, text);\n  }\n\n  @Override\n  protected Object createLookupItem(PsiElement candidate) {\n    if (candidate instanceof PsiDirectory) {\n      return GoCompletionUtil.createDirectoryLookupElement((PsiDirectory)candidate);\n    }\n    return super.createLookupItem(candidate);\n  }\n\n  @NotNull\n  @Override\n  protected ResolveResult[] innerResolve(boolean caseSensitive, @NotNull PsiFile file) {\n    if (isFirst()) {\n      if (\".\".equals(getCanonicalText())) {\n        PsiDirectory directory = getDirectory();\n        return directory != null ? new PsiElementResolveResult[]{new PsiElementResolveResult(directory)} : ResolveResult.EMPTY_ARRAY;\n      }\n      else if (\"..\".equals(getCanonicalText())) {\n        PsiDirectory directory = getDirectory();\n        PsiDirectory grandParent = directory != null ? directory.getParentDirectory() : null;\n        return grandParent != null ? new PsiElementResolveResult[]{new PsiElementResolveResult(grandParent)} : ResolveResult.EMPTY_ARRAY;\n      }\n    }\n\n    String referenceText = getText();\n    Set<ResolveResult> result = ContainerUtil.newLinkedHashSet();\n    Set<ResolveResult> innerResult = ContainerUtil.newLinkedHashSet();\n    for (PsiFileSystemItem context : getContexts()) {\n      innerResolveInContext(referenceText, context, innerResult, caseSensitive);\n      for (ResolveResult resolveResult : innerResult) {\n        PsiElement element = resolveResult.getElement();\n        if (element instanceof PsiDirectory) {\n          if (isLast()) {\n            return new ResolveResult[]{resolveResult};\n          }\n          result.add(resolveResult);\n        }\n      }\n      innerResult.clear();\n    }\n    return result.isEmpty() ? ResolveResult.EMPTY_ARRAY : result.toArray(new ResolveResult[result.size()]);\n  }\n\n  @Override\n  public boolean isReferenceTo(PsiElement element) {\n    if (super.isReferenceTo(element)) {\n      return true;\n    }\n\n    if (element instanceof PsiDirectoryContainer) {\n      for (PsiDirectory directory : ((PsiDirectoryContainer)element).getDirectories()) {\n        if (super.isReferenceTo(directory)) {\n          return true;\n        }\n      }\n    }\n    return false;\n  }\n\n  @Override\n  public PsiElement bindToElement(@NotNull PsiElement element, boolean absolute) throws IncorrectOperationException {\n    if (!absolute) {\n      FileReference firstReference = ArrayUtil.getFirstElement(getFileReferenceSet().getAllReferences());\n      if (firstReference != null) {\n        Collection<PsiFileSystemItem> contexts = getFileReferenceSet().getDefaultContexts();\n        for (ResolveResult resolveResult : firstReference.multiResolve(false)) {\n          PsiElement resolveResultElement = resolveResult.getElement();\n          if (resolveResultElement instanceof PsiFileSystemItem) {\n            PsiFileSystemItem parentDirectory = ((PsiFileSystemItem)resolveResultElement).getParent();\n            if (parentDirectory != null && contexts.contains(parentDirectory)) {\n              return getElement();\n            }\n          }\n        }\n      }\n    }\n    return super.bindToElement(element, absolute);\n  }\n\n  @Override\n  public LocalQuickFix[] getQuickFixes() {\n    if (GoPackageUtil.isBuiltinPackage(resolve())) {\n      return new LocalQuickFix[]{new GoDeleteImportQuickFix()};\n    }\n\n    List<LocalQuickFix> result = ContainerUtil.newArrayList();\n    FileReferenceSet fileReferenceSet = getFileReferenceSet();\n    if (fileReferenceSet instanceof GoImportReferenceSet && !((GoImportReferenceSet)fileReferenceSet).isRelativeImport()\n        && !fileReferenceSet.isAbsolutePathReference()) {\n      result.add(new GoGetPackageFix(fileReferenceSet.getPathString()));\n    }\n\n    String fileNameToCreate = getFileNameToCreate();\n    for (PsiFileSystemItem context : getContexts()) {\n      if (context instanceof PsiDirectory) {\n        try {\n          ((PsiDirectory)context).checkCreateSubdirectory(fileNameToCreate);\n          String targetPath = context.getVirtualFile().getPath();\n          result.add(new CreateFileFix(true, fileNameToCreate, (PsiDirectory)context) {\n            @NotNull\n            @Override\n            public String getText() {\n              return \"Create Directory \" + fileNameToCreate + \" at \" + targetPath;\n            }\n          });\n        }\n        catch (IncorrectOperationException ignore) {\n        }\n      }\n    }\n    return result.toArray(new LocalQuickFix[result.size()]);\n  }\n\n  private boolean isFirst() {\n    return getIndex() <= 0;\n  }\n\n  @Nullable\n  private PsiDirectory getDirectory() {\n    PsiElement originalElement = CompletionUtil.getOriginalElement(getElement());\n    PsiFile file = originalElement != null ? originalElement.getContainingFile() : getElement().getContainingFile();\n    return file.getParent();\n  }\n}\n"
  },
  {
    "path": "src/com/goide/psi/impl/imports/GoImportReferenceSet.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi.impl.imports;\n\nimport com.goide.project.GoVendoringUtil;\nimport com.goide.psi.GoImportString;\nimport com.goide.sdk.GoSdkUtil;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.module.ModuleUtilCore;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.Condition;\nimport com.intellij.openapi.util.Conditions;\nimport com.intellij.openapi.util.TextRange;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.PsiFileSystemItem;\nimport com.intellij.psi.PsiManager;\nimport com.intellij.psi.impl.source.resolve.reference.impl.providers.FileReference;\nimport com.intellij.psi.impl.source.resolve.reference.impl.providers.FileReferenceSet;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.Collection;\nimport java.util.Collections;\nimport java.util.LinkedHashSet;\n\npublic class GoImportReferenceSet extends FileReferenceSet {\n  public GoImportReferenceSet(@NotNull GoImportString importString) {\n    super(importString.getPath(), importString, importString.getPathTextRange().getStartOffset(), null, true);\n  }\n\n  @NotNull\n  @Override\n  public Collection<PsiFileSystemItem> computeDefaultContexts() {\n    PsiFile file = getContainingFile();\n    if (file == null || !file.isValid() || isAbsolutePathReference()) {\n      return Collections.emptyList();\n    }\n\n    PsiManager psiManager = file.getManager();\n    Module module = ModuleUtilCore.findModuleForPsiElement(file);\n    Project project = file.getProject();\n    LinkedHashSet<VirtualFile> sourceRoots = GoVendoringUtil.isVendoringEnabled(module)\n                                             ? GoSdkUtil.getVendoringAwareSourcesPathsToLookup(project, module, file.getVirtualFile())\n                                             : GoSdkUtil.getSourcesPathsToLookup(project, module);\n    return ContainerUtil.mapNotNull(sourceRoots, psiManager::findDirectory);\n  }\n\n  @Override\n  protected Condition<PsiFileSystemItem> getReferenceCompletionFilter() {\n    if (!isRelativeImport()) {\n      return Conditions.alwaysFalse();\n    }\n    return super.getReferenceCompletionFilter();\n  }\n\n  @Nullable\n  @Override\n  public PsiFileSystemItem resolve() {\n    return isAbsolutePathReference() ? null : super.resolve();\n  }\n\n  @Override\n  public boolean absoluteUrlNeedsStartSlash() {\n    return false;\n  }\n\n  @Override\n  public boolean isEndingSlashNotAllowed() {\n    return !isRelativeImport();\n  }\n\n  @NotNull\n  @Override\n  public FileReference createFileReference(TextRange range, int index, String text) {\n    return new GoImportReference(this, range, index, text);\n  }\n\n  public boolean isRelativeImport() {\n    return isRelativeImport(getPathString());\n  }\n\n  public static boolean isRelativeImport(@NotNull String pathString) {\n    return pathString.startsWith(\"./\") || pathString.startsWith(\"../\");\n  }\n\n  @Override\n  public boolean couldBeConvertedTo(boolean relative) {\n    return false;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/psi/impl/imports/GoReferenceImporter.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi.impl.imports;\n\nimport com.goide.GoLanguage;\nimport com.goide.codeInsight.imports.GoImportPackageQuickFix;\nimport com.goide.psi.GoCompositeElement;\nimport com.intellij.codeInsight.daemon.ReferenceImporter;\nimport com.intellij.codeInsight.daemon.impl.CollectHighlightsUtil;\nimport com.intellij.codeInsight.daemon.impl.DaemonListeners;\nimport com.intellij.openapi.editor.Document;\nimport com.intellij.openapi.editor.Editor;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.PsiReference;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.List;\n\npublic class GoReferenceImporter implements ReferenceImporter {\n  @Override\n  public boolean autoImportReferenceAtCursor(@NotNull Editor editor, @NotNull PsiFile file) {\n    if (!file.getViewProvider().getLanguages().contains(GoLanguage.INSTANCE) ||\n        !DaemonListeners.canChangeFileSilently(file)) {\n      return false;\n    }\n\n    int caretOffset = editor.getCaretModel().getOffset();\n    Document document = editor.getDocument();\n    int lineNumber = document.getLineNumber(caretOffset);\n    int startOffset = document.getLineStartOffset(lineNumber);\n    int endOffset = document.getLineEndOffset(lineNumber);\n\n    List<PsiElement> elements = CollectHighlightsUtil.getElementsInRange(file, startOffset, endOffset);\n    for (PsiElement element : elements) {\n      if (element instanceof GoCompositeElement) {\n        for (PsiReference reference : element.getReferences()) {\n          GoImportPackageQuickFix fix = new GoImportPackageQuickFix(reference);\n          if (fix.doAutoImportOrShowHint(editor, false)) {\n            return true;\n          }\n        }\n      }\n    }\n    return false;\n  }\n\n  @Override\n  public boolean autoImportReferenceAt(@NotNull Editor editor, @NotNull PsiFile file, int offset) {\n    if (!file.getViewProvider().getLanguages().contains(GoLanguage.INSTANCE)) {\n      return false;\n    }\n    PsiReference reference = file.findReferenceAt(offset);\n    if (reference != null) {\n      return new GoImportPackageQuickFix(reference).doAutoImportOrShowHint(editor, false);\n    }\n    return false;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/psi/impl/manipulator/GoImportStringManipulator.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi.impl.manipulator;\n\nimport com.goide.psi.GoImportString;\nimport com.goide.psi.impl.GoElementFactory;\nimport com.intellij.openapi.util.TextRange;\nimport com.intellij.psi.AbstractElementManipulator;\nimport com.intellij.util.IncorrectOperationException;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoImportStringManipulator extends AbstractElementManipulator<GoImportString> {\n  @NotNull\n  @Override\n  public GoImportString handleContentChange(@NotNull GoImportString string, @NotNull TextRange range, String s) throws IncorrectOperationException {\n    String newPackage = range.replace(string.getText(), s);\n    return (GoImportString)string.replace(GoElementFactory.createImportString(string.getProject(), newPackage));\n  }\n\n  @NotNull\n  @Override\n  public TextRange getRangeInElement(@NotNull GoImportString element) {\n    return element.getPathTextRange();\n  }\n}\n"
  },
  {
    "path": "src/com/goide/psi/impl/manipulator/GoStringManipulator.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi.impl.manipulator;\n\nimport com.goide.psi.impl.GoStringLiteralImpl;\nimport com.intellij.openapi.util.TextRange;\nimport com.intellij.psi.AbstractElementManipulator;\nimport com.intellij.util.IncorrectOperationException;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoStringManipulator extends AbstractElementManipulator<GoStringLiteralImpl> {\n  @Override\n  public GoStringLiteralImpl handleContentChange(@NotNull GoStringLiteralImpl literal, @NotNull TextRange range, String newContent)\n    throws IncorrectOperationException {\n    String newText = range.replace(literal.getText(), newContent);\n    return literal.updateText(newText);\n  }\n\n  @NotNull\n  @Override\n  public TextRange getRangeInElement(@NotNull GoStringLiteralImpl element) {\n    if (element.getTextLength() == 0) {\n      return TextRange.EMPTY_RANGE;\n    }\n    String s = element.getText();\n    char quote = s.charAt(0);\n    int startOffset = isQuote(quote) ? 1 : 0;\n    int endOffset = s.length();\n    if (s.length() > 1) {\n      char lastChar = s.charAt(s.length() - 1);\n      if (isQuote(quote) && lastChar == quote) {\n        endOffset = s.length() - 1;\n      }\n      if (!isQuote(quote) && isQuote(lastChar)) {\n        endOffset = s.length() - 1;\n      }\n    }\n    return TextRange.create(startOffset, endOffset);\n  }\n\n  private static boolean isQuote(char ch) {\n    return ch == '\"' || ch == '\\'' || ch == '`';\n  }\n}\n"
  },
  {
    "path": "src/com/goide/quickfix/GoConvertStringToByteQuickFix.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.quickfix;\n\nimport com.goide.psi.GoConditionalExpr;\nimport com.goide.psi.GoStringLiteral;\nimport com.intellij.codeInspection.LocalQuickFixBase;\nimport com.intellij.codeInspection.ProblemDescriptor;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.psi.ElementManipulators;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.Arrays;\n\nimport static com.goide.psi.impl.GoElementFactory.createExpression;\nimport static com.goide.psi.impl.GoPsiImplUtil.isSingleCharLiteral;\nimport static java.lang.String.format;\n\npublic class GoConvertStringToByteQuickFix extends LocalQuickFixBase {\n  public static final String NAME = \"Convert string to byte\";\n\n  public GoConvertStringToByteQuickFix() {\n    super(NAME);\n  }\n\n  @Override\n  public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {\n    PsiElement element = descriptor.getPsiElement();\n    if (!(element instanceof GoConditionalExpr) || !element.isValid()) {\n      return;\n    }\n\n    GoConditionalExpr expr = (GoConditionalExpr)element;\n    GoStringLiteral literal = ContainerUtil.findInstance(Arrays.asList(expr.getLeft(), expr.getRight()), GoStringLiteral.class);\n    if (literal == null || !isSingleCharLiteral(literal)) {\n      return;\n    }\n    literal.replace(createExpression(project, extractSingleCharFromText(literal)));\n  }\n\n  @NotNull\n  private static String extractSingleCharFromText(@NotNull GoStringLiteral element) {\n    return format(\"'%s'\", ElementManipulators.getValueText(element));\n  }\n}\n"
  },
  {
    "path": "src/com/goide/quickfix/GoCreateWrapperTypeQuickFix.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.quickfix;\n\nimport com.goide.psi.GoType;\nimport com.goide.psi.GoTypeDeclaration;\nimport com.goide.psi.GoTypeSpec;\nimport com.goide.psi.impl.GoElementFactory;\nimport com.intellij.codeInsight.CodeInsightUtilCore;\nimport com.intellij.codeInsight.template.Template;\nimport com.intellij.codeInsight.template.TemplateBuilderImpl;\nimport com.intellij.codeInsight.template.TemplateManager;\nimport com.intellij.codeInsight.template.impl.ConstantNode;\nimport com.intellij.codeInspection.LocalQuickFixAndIntentionActionOnPsiElement;\nimport com.intellij.diagnostic.AttachmentFactory;\nimport com.intellij.openapi.editor.Editor;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.Nls;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoCreateWrapperTypeQuickFix extends LocalQuickFixAndIntentionActionOnPsiElement {\n\n  private static final String INPUT_NAME = \"INPUTVAR\";\n  private static final String OTHER_NAME = \"OTHERVAR\";\n\n  public static final String QUICKFIX_NAME = \"Create type\";\n\n  public GoCreateWrapperTypeQuickFix(@NotNull GoType type) {\n    super(type);\n  }\n\n  @Override\n  public void invoke(@NotNull Project project,\n                     @NotNull PsiFile file,\n                     @Nullable(\"is null when called from inspection\") Editor editor,\n                     @NotNull PsiElement startElement,\n                     @NotNull PsiElement endElement) {\n    if (editor == null) {\n      LOG.error(\"Cannot run quick fix without editor: \" + getClass().getSimpleName(),\n                AttachmentFactory.createAttachment(file.getVirtualFile()));\n      return;\n    }\n    if (!(startElement instanceof GoType)) return;\n    GoType type = (GoType)startElement;\n\n    PsiElement anchor = PsiTreeUtil.findPrevParent(file, type);\n\n    String name = \"TypeName\";\n    GoTypeDeclaration decl = (GoTypeDeclaration)file.addBefore(GoElementFactory.createTypeDeclaration(project, name, type), anchor);\n    if (decl == null) return;\n    decl = CodeInsightUtilCore.forcePsiPostprocessAndRestoreElement(decl);\n    if (decl == null) return;\n    GoTypeSpec spec = ContainerUtil.getFirstItem(decl.getTypeSpecList());\n    if (spec == null) return;\n\n    TemplateBuilderImpl builder = new TemplateBuilderImpl(file);\n    builder.replaceElement(type, OTHER_NAME, INPUT_NAME, false);\n    builder.replaceElement(spec.getIdentifier(), INPUT_NAME, new ConstantNode(name), true);\n\n    editor.getCaretModel().moveToOffset(file.getTextRange().getStartOffset());\n    Template template = builder.buildInlineTemplate();\n    editor.getCaretModel().moveToOffset(file.getTextRange().getStartOffset());\n    TemplateManager.getInstance(project).startTemplate(editor, template);\n  }\n\n  @NotNull\n  @Override\n  public String getText() {\n    return QUICKFIX_NAME;\n  }\n\n  @Nls\n  @NotNull\n  @Override\n  public String getFamilyName() {\n    return QUICKFIX_NAME;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/quickfix/GoDeleteAmpersandAndTypeInCompositeLitQuickFix.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.quickfix;\n\nimport com.goide.inspections.GoRedundantTypeDeclInCompositeLit;\nimport com.goide.psi.*;\nimport com.intellij.codeInspection.LocalQuickFixBase;\nimport com.intellij.codeInspection.ProblemDescriptor;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.psi.PsiElement;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoDeleteAmpersandAndTypeInCompositeLitQuickFix extends LocalQuickFixBase {\n\n  public GoDeleteAmpersandAndTypeInCompositeLitQuickFix() {\n    super(GoRedundantTypeDeclInCompositeLit.DELETE_TYPE_DECLARATION_QUICK_FIX_NAME);\n  }\n\n  @Override\n  public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {\n    PsiElement element = descriptor.getPsiElement();\n    if (element != null && element.isValid()) {\n      if (element instanceof GoUnaryExpr) {\n        GoUnaryExpr unaryExpr = (GoUnaryExpr)element;\n        GoExpression expr = unaryExpr.getExpression();\n        if (unaryExpr.getBitAnd() != null && expr instanceof GoCompositeLit) {\n          GoLiteralValue literalValue = ((GoCompositeLit)expr).getLiteralValue();\n          if (literalValue != null) {\n            unaryExpr.replace(literalValue);\n          }\n        }\n      }\n      else if (element instanceof GoTypeReferenceExpression) {\n        PsiElement parent = element.getParent();\n        if (parent instanceof GoCompositeLit) {\n          GoLiteralValue literalValue = ((GoCompositeLit)parent).getLiteralValue();\n          if (literalValue != null) {\n            parent.replace(literalValue);\n          }\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/quickfix/GoDeleteConstDefinitionQuickFix.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.quickfix;\n\nimport com.goide.psi.GoConstDefinition;\nimport com.goide.psi.GoConstSpec;\nimport com.intellij.codeInspection.LocalQuickFixBase;\nimport com.intellij.codeInspection.ProblemDescriptor;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.psi.PsiElement;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoDeleteConstDefinitionQuickFix extends LocalQuickFixBase {\n  public GoDeleteConstDefinitionQuickFix(@Nullable String constName) {\n    super(\"Delete const \" + (constName != null ? \"'\" + constName + \"'\" : \"\"), \"Delete constant\");\n  }\n\n  @Override\n  public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {\n    PsiElement element = descriptor.getPsiElement();\n    if (element.isValid() && element instanceof GoConstDefinition) {\n      PsiElement parent = element.getParent();\n      if (parent instanceof GoConstSpec) {\n        ((GoConstSpec)parent).deleteDefinition((GoConstDefinition)element);\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/quickfix/GoDeleteImportQuickFix.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.quickfix;\n\nimport com.goide.psi.GoFile;\nimport com.goide.psi.GoImportSpec;\nimport com.intellij.codeInspection.LocalQuickFixBase;\nimport com.intellij.codeInspection.ProblemDescriptor;\nimport com.intellij.openapi.command.WriteCommandAction;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoDeleteImportQuickFix extends LocalQuickFixBase {\n  public static final String QUICK_FIX_NAME = \"Delete import\";\n\n  public GoDeleteImportQuickFix() {\n    super(QUICK_FIX_NAME);\n  }\n\n  @Override\n  public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {\n    PsiElement element = PsiTreeUtil.getNonStrictParentOfType(descriptor.getPsiElement(), GoImportSpec.class);\n    PsiFile file = element != null ? element.getContainingFile() : null;\n    if (!(file instanceof GoFile)) return;\n\n    WriteCommandAction.runWriteCommandAction(project, () -> ((GoFile)file).deleteImport((GoImportSpec)element));\n  }\n}\n"
  },
  {
    "path": "src/com/goide/quickfix/GoDeleteQuickFix.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.quickfix;\n\nimport com.intellij.codeInspection.LocalQuickFixBase;\nimport com.intellij.codeInspection.ProblemDescriptor;\nimport com.intellij.openapi.command.WriteCommandAction;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.tree.IElementType;\nimport com.intellij.util.ObjectUtils;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoDeleteQuickFix extends LocalQuickFixBase {\n  private final Class<? extends PsiElement> myClazz;\n  private final IElementType myElementType;\n\n  public GoDeleteQuickFix(@NotNull String name, @NotNull Class<? extends PsiElement> clazz) {\n    super(name);\n    myClazz = clazz;\n    myElementType = null;\n  }\n  \n  public GoDeleteQuickFix(@NotNull String name, @NotNull IElementType elementType) {\n    super(name);\n    myClazz = PsiElement.class;\n    myElementType = elementType;\n  }\n\n  @Override\n  public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {\n    WriteCommandAction.runWriteCommandAction(project, () -> {\n      PsiElement element = ObjectUtils.tryCast(descriptor.getStartElement(), myClazz);\n      if (element != null && (myElementType == null || element.getNode().getElementType() == myElementType)) {\n        element.delete();\n      }\n    });\n  }\n}"
  },
  {
    "path": "src/com/goide/quickfix/GoDeleteRangeQuickFix.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.quickfix;\n\nimport com.intellij.codeInspection.LocalQuickFixAndIntentionActionOnPsiElement;\nimport com.intellij.openapi.diagnostic.Logger;\nimport com.intellij.openapi.editor.Editor;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport org.jetbrains.annotations.Nls;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoDeleteRangeQuickFix extends LocalQuickFixAndIntentionActionOnPsiElement {\n  private static final Logger LOG = Logger.getInstance(GoDeleteRangeQuickFix.class);\n  private final String myName;\n  \n  public GoDeleteRangeQuickFix(@NotNull PsiElement startElement, @NotNull PsiElement endElement, @NotNull String name) {\n    super(startElement, endElement);\n    if (!startElement.getParent().equals(endElement.getParent())) {\n      LOG.error(\"Cannot delete range of elements with different parents\");\n    }\n    myName = name;\n  }\n\n  @NotNull\n  @Override\n  public String getText() {\n    return myName;\n  }\n\n  @Nls\n  @NotNull\n  @Override\n  public String getFamilyName() {\n    return \"Delete elements\";\n  }\n\n  @Override\n  public void invoke(@NotNull Project project,\n                     @NotNull PsiFile file,\n                     @Nullable(\"is null when called from inspection\") Editor editor,\n                     @NotNull PsiElement start,\n                     @NotNull PsiElement end) {\n    if (start.isValid() && end.isValid()) {\n      PsiElement parent = start.getParent();\n      if (parent != null && parent.equals(end.getParent())) {\n        parent.getNode().removeRange(start.getNode(), end.getNode().getTreeNext());\n      }\n    }\n  }\n}"
  },
  {
    "path": "src/com/goide/quickfix/GoDeleteVarDefinitionQuickFix.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.quickfix;\n\nimport com.goide.psi.GoVarDefinition;\nimport com.goide.psi.GoVarSpec;\nimport com.intellij.codeInspection.LocalQuickFixBase;\nimport com.intellij.codeInspection.ProblemDescriptor;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.psi.PsiElement;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoDeleteVarDefinitionQuickFix extends LocalQuickFixBase {\n  public GoDeleteVarDefinitionQuickFix(@Nullable String variableName) {\n    super(\"Delete variable \" + (variableName != null ? \"'\" + variableName + \"'\" : \"\"), \"Delete variable\");\n  }\n\n  @Override\n  public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {\n    PsiElement element = descriptor.getPsiElement();\n    if (element.isValid() && element instanceof GoVarDefinition) {\n      PsiElement parent = element.getParent();\n      if (parent instanceof GoVarSpec) {\n        ((GoVarSpec)parent).deleteDefinition((GoVarDefinition)element);\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/quickfix/GoDisableVendoringInModuleQuickFix.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.quickfix;\n\nimport com.goide.project.GoModuleSettings;\nimport com.goide.sdk.GoSdkService;\nimport com.intellij.codeInspection.LocalQuickFixBase;\nimport com.intellij.codeInspection.ProblemDescriptor;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.util.ThreeState;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport static com.goide.project.GoVendoringUtil.isVendoringEnabled;\nimport static com.goide.project.GoVendoringUtil.vendoringCanBeDisabled;\n\npublic class GoDisableVendoringInModuleQuickFix extends LocalQuickFixBase {\n  @NotNull private final Module myModule;\n\n  private GoDisableVendoringInModuleQuickFix(@NotNull Module module) {\n    super(\"Disable vendoring experiment support in module '\" + module.getName() + \"'\", \"Disable vendoring experiment support in module\");\n    myModule = module;\n  }\n\n  @Override\n  public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {\n    if (!myModule.isDisposed()) {\n      GoModuleSettings.getInstance(myModule).setVendoringEnabled(ThreeState.NO);\n    }\n  }\n\n  public static GoDisableVendoringInModuleQuickFix create(@Nullable Module module) {\n    if (!isVendoringEnabled(module)) {\n      return null;\n    }\n    String version = GoSdkService.getInstance(module.getProject()).getSdkVersion(module);\n    return vendoringCanBeDisabled(version) ? new GoDisableVendoringInModuleQuickFix(module) : null;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/quickfix/GoEmptySignatureQuickFix.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.quickfix;\n\nimport com.goide.psi.GoFunctionDeclaration;\nimport com.goide.psi.GoSignature;\nimport com.goide.psi.impl.GoElementFactory;\nimport com.intellij.codeInspection.LocalQuickFixAndIntentionActionOnPsiElement;\nimport com.intellij.openapi.editor.Editor;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.util.ObjectUtils;\nimport org.jetbrains.annotations.Nls;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoEmptySignatureQuickFix extends LocalQuickFixAndIntentionActionOnPsiElement {\n  public static final String QUICK_FIX_NAME = \"Fix signature\";\n\n  public GoEmptySignatureQuickFix(@NotNull GoFunctionDeclaration functionDeclaration) {\n    super(functionDeclaration);\n  }\n\n  @NotNull\n  @Override\n  public String getText() {\n    return QUICK_FIX_NAME;\n  }\n\n  @Nls\n  @NotNull\n  @Override\n  public String getFamilyName() {\n    return QUICK_FIX_NAME;\n  }\n\n  @Override\n  public void invoke(@NotNull Project project,\n                     @NotNull PsiFile file,\n                     @Nullable(\"is null when called from inspection\") Editor editor,\n                     @NotNull PsiElement startElement,\n                     @NotNull PsiElement endElement) {\n    GoFunctionDeclaration function = ObjectUtils.tryCast(startElement, GoFunctionDeclaration.class);\n    GoSignature signature = function != null ? function.getSignature() : null;\n    if (signature == null) return;\n    signature.replace(GoElementFactory.createFunctionSignatureFromText(project, \"\"));\n  }\n}"
  },
  {
    "path": "src/com/goide/quickfix/GoMultiplePackagesQuickFix.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.quickfix;\n\nimport com.goide.GoConstants;\nimport com.goide.psi.GoFile;\nimport com.goide.psi.GoPackageClause;\nimport com.goide.psi.impl.GoElementFactory;\nimport com.goide.psi.impl.GoPsiImplUtil;\nimport com.goide.runconfig.testing.GoTestFinder;\nimport com.intellij.codeInspection.LocalQuickFixAndIntentionActionOnPsiElement;\nimport com.intellij.openapi.Disposable;\nimport com.intellij.openapi.command.WriteCommandAction;\nimport com.intellij.openapi.editor.Editor;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.module.ModuleUtilCore;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.ui.popup.JBPopupFactory;\nimport com.intellij.openapi.util.Disposer;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.psi.PsiDirectory;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.ui.IdeBorderFactory;\nimport com.intellij.ui.components.JBLabel;\nimport com.intellij.ui.components.JBList;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\nimport org.jetbrains.annotations.TestOnly;\n\nimport java.util.Collection;\n\npublic class GoMultiplePackagesQuickFix extends LocalQuickFixAndIntentionActionOnPsiElement {\n  private static String myTestingPackageName;\n  private final Collection<String> myPackages;\n  private final String myPackageName;\n  private final boolean myIsOneTheFly;\n\n  public GoMultiplePackagesQuickFix(@NotNull PsiElement element,\n                                    @NotNull String packageName,\n                                    @NotNull Collection<String> packages,\n                                    boolean isOnTheFly) {\n    super(element);\n    myPackages = packages;\n    myPackageName = packageName;\n    myIsOneTheFly = isOnTheFly;\n  }\n\n  private static void renamePackagesInDirectory(@NotNull Project project,\n                                                @NotNull PsiDirectory dir,\n                                                @NotNull String newName) {\n    WriteCommandAction.runWriteCommandAction(project, () -> {\n      Module module = ModuleUtilCore.findModuleForPsiElement(dir);\n      for (PsiFile file : dir.getFiles()) {\n        if (file instanceof GoFile && GoPsiImplUtil.allowed(file, null, module)) {\n          GoPackageClause packageClause = ((GoFile)file).getPackage();\n          String oldName = ((GoFile)file).getPackageName();\n          if (packageClause != null && oldName != null) {\n            String fullName = GoTestFinder.isTestFile(file) && StringUtil.endsWith(oldName, GoConstants.TEST_SUFFIX)\n                              ? newName + GoConstants.TEST_SUFFIX\n                              : newName;\n            packageClause.replace(GoElementFactory.createPackageClause(project, fullName));\n          }\n        }\n      }\n    });\n  }\n\n  @TestOnly\n  public static void setTestingPackageName(@NotNull String packageName, @NotNull Disposable disposable) {\n    myTestingPackageName = packageName;\n    Disposer.register(disposable, () -> {\n      //noinspection AssignmentToStaticFieldFromInstanceMethod\n      myTestingPackageName = null;\n    });\n  }\n\n  @Override\n  public void invoke(@NotNull Project project,\n                     @NotNull PsiFile file,\n                     @Nullable(\"is null when called from inspection\") Editor editor,\n                     @NotNull PsiElement startElement,\n                     @NotNull PsiElement endElement) {\n    if (editor == null || myTestingPackageName != null) {\n      renamePackagesInDirectory(project, file.getContainingDirectory(),\n                                myTestingPackageName != null ? myTestingPackageName : myPackageName);\n      return;\n    }\n    JBList list = new JBList(myPackages);\n    list.installCellRenderer(o -> {\n      JBLabel label = new JBLabel(o.toString());\n      label.setBorder(IdeBorderFactory.createEmptyBorder(2, 4, 2, 4));\n      return label;\n    });\n\n    JBPopupFactory.getInstance().createListPopupBuilder(list).setTitle(\"Choose package name\").setItemChoosenCallback(() -> {\n      String name = (String)list.getSelectedValue();\n      if (name != null) {\n        renamePackagesInDirectory(project, file.getContainingDirectory(), name);\n      }\n    }).createPopup().showInBestPositionFor(editor);\n  }\n\n  @NotNull\n  @Override\n  public String getText() {\n    return \"Rename packages\" + (myIsOneTheFly ? \"\" : \" to \" + myPackageName);\n  }\n\n  @NotNull\n  @Override\n  public String getFamilyName() {\n    return \"Rename packages\";\n  }\n}\n"
  },
  {
    "path": "src/com/goide/quickfix/GoRenameQuickFix.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.quickfix;\n\nimport com.goide.psi.GoNamedElement;\nimport com.intellij.codeInsight.FileModificationService;\nimport com.intellij.codeInspection.LocalQuickFixOnPsiElement;\nimport com.intellij.ide.DataManager;\nimport com.intellij.openapi.actionSystem.DataContext;\nimport com.intellij.openapi.application.ApplicationManager;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.AsyncResult;\nimport com.intellij.psi.ElementDescriptionUtil;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.refactoring.RefactoringActionHandler;\nimport com.intellij.refactoring.RefactoringActionHandlerFactory;\nimport com.intellij.refactoring.rename.RenameHandler;\nimport com.intellij.refactoring.rename.RenameHandlerRegistry;\nimport com.intellij.usageView.UsageViewTypeLocation;\nimport com.intellij.util.Consumer;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoRenameQuickFix extends LocalQuickFixOnPsiElement {\n  private final String myText;\n\n  public GoRenameQuickFix(@NotNull GoNamedElement element) {\n    super(element);\n    myText = \"Rename \" + ElementDescriptionUtil.getElementDescription(element, UsageViewTypeLocation.INSTANCE);\n  }\n\n  @Override\n  public void invoke(@NotNull Project project,\n                     @NotNull PsiFile file,\n                     @NotNull PsiElement startElement,\n                     @NotNull PsiElement endElement) {\n    if (!FileModificationService.getInstance().preparePsiElementsForWrite(startElement)) return;\n\n    Runnable runnable = () -> {\n      AsyncResult<DataContext> dataContextContainer = DataManager.getInstance().getDataContextFromFocus();\n      dataContextContainer.doWhenDone(new Consumer<DataContext>() {\n        @Override\n        public void consume(DataContext dataContext) {\n          RenameHandler renameHandler = RenameHandlerRegistry.getInstance().getRenameHandler(dataContext);\n          if (renameHandler != null) {\n            renameHandler.invoke(project, new PsiElement[]{startElement}, dataContext);\n          }\n          else {\n            RefactoringActionHandler renameRefactoringHandler = RefactoringActionHandlerFactory.getInstance().createRenameHandler();\n            renameRefactoringHandler.invoke(project, new PsiElement[]{startElement}, dataContext);\n          }\n        }\n      });\n    };\n    if (ApplicationManager.getApplication().isUnitTestMode()) {\n      runnable.run();\n    }\n    else {\n      ApplicationManager.getApplication().invokeLater(runnable, project.getDisposed());\n    }\n  }\n\n  @Override\n  @NotNull\n  public String getFamilyName() {\n    return getName();\n  }\n\n  @NotNull\n  @Override\n  public String getText() {\n    return myText;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/quickfix/GoRenameToBlankQuickFix.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.quickfix;\n\nimport com.goide.inspections.GoNoNewVariablesInspection;\nimport com.goide.psi.GoNamedElement;\nimport com.goide.psi.GoVarDefinition;\nimport com.goide.psi.GoVarSpec;\nimport com.intellij.codeInspection.LocalQuickFixOnPsiElement;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoRenameToBlankQuickFix extends LocalQuickFixOnPsiElement {\n  public static final String NAME = \"Rename to _\";\n\n  public GoRenameToBlankQuickFix(GoNamedElement o) {\n    super(o);\n  }\n\n  @NotNull\n  @Override\n  public String getText() {\n    return NAME;\n  }\n\n  @Override\n  public void invoke(@NotNull Project project, @NotNull PsiFile file, @NotNull PsiElement startElement, @NotNull PsiElement endElement) {\n    if (startElement.isValid() && startElement instanceof GoNamedElement) {\n      ((GoNamedElement)startElement).setName(\"_\");\n\n      if (startElement instanceof GoVarDefinition) {\n        PsiElement parent = startElement.getParent();\n        if (parent instanceof GoVarSpec) {\n          if (GoNoNewVariablesInspection.hasNonNewVariables(((GoVarSpec)parent).getVarDefinitionList())) {\n            GoNoNewVariablesInspection.replaceWithAssignment(project, parent);\n          }\n        }\n      }\n    }\n  }\n\n  @NotNull\n  @Override\n  public String getFamilyName() {\n    return getName();\n  }\n}\n"
  },
  {
    "path": "src/com/goide/quickfix/GoReplaceWithReturnStatementQuickFix.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.quickfix;\n\nimport com.goide.psi.GoStatement;\nimport com.goide.psi.impl.GoElementFactory;\nimport com.intellij.codeInspection.LocalQuickFixAndIntentionActionOnPsiElement;\nimport com.intellij.openapi.command.WriteCommandAction;\nimport com.intellij.openapi.editor.Editor;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport org.jetbrains.annotations.Nls;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoReplaceWithReturnStatementQuickFix extends LocalQuickFixAndIntentionActionOnPsiElement {\n  public static final String QUICK_FIX_NAME = \"Replace with 'return'\";\n\n  public GoReplaceWithReturnStatementQuickFix(@Nullable PsiElement element) {\n    super(element);\n  }\n\n  @NotNull\n  @Override\n  public String getText() {\n    return QUICK_FIX_NAME;\n  }\n\n  @Nls\n  @NotNull\n  @Override\n  public String getFamilyName() {\n    return QUICK_FIX_NAME;\n  }\n\n  @Override\n  public void invoke(@NotNull Project project,\n                     @NotNull PsiFile file,\n                     @Nullable(\"is null when called from inspection\") Editor editor,\n                     @NotNull PsiElement startElement,\n                     @NotNull PsiElement endElement) {\n    WriteCommandAction.runWriteCommandAction(project, () -> {\n      if (startElement instanceof GoStatement) {\n        startElement.replace(GoElementFactory.createReturnStatement(project));\n      }\n    });\n  }\n}"
  },
  {
    "path": "src/com/goide/quickfix/GoReplaceWithSelectStatementQuickFix.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.quickfix;\n\nimport com.goide.psi.GoForStatement;\nimport com.goide.psi.impl.GoElementFactory;\nimport com.intellij.codeInspection.LocalQuickFixBase;\nimport com.intellij.codeInspection.ProblemDescriptor;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.psi.PsiElement;\nimport org.jetbrains.annotations.Nls;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoReplaceWithSelectStatementQuickFix extends LocalQuickFixBase {\n  public static final String QUICK_FIX_NAME = \"Replace with 'select'\";\n\n  public GoReplaceWithSelectStatementQuickFix() {\n    super(QUICK_FIX_NAME);\n  }\n\n  @Nls\n  @NotNull\n  @Override\n  public String getFamilyName() {\n    return QUICK_FIX_NAME;\n  }\n\n  @Override\n  public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {\n    PsiElement element = descriptor.getPsiElement();\n    if (element instanceof GoForStatement) {\n      element.replace(GoElementFactory.createSelectStatement(project));\n    }\n  }\n}"
  },
  {
    "path": "src/com/goide/quickfix/GoSimplifyBoolExprQuickFix.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.quickfix;\n\nimport com.goide.inspections.GoBoolExpressionsInspection;\nimport com.goide.psi.GoAndExpr;\nimport com.goide.psi.GoBinaryExpr;\nimport com.goide.psi.GoExpression;\nimport com.goide.psi.GoReferenceExpression;\nimport com.goide.psi.impl.GoElementFactory;\nimport com.goide.psi.impl.GoExpressionUtil;\nimport com.goide.psi.impl.GoPsiImplUtil;\nimport com.intellij.codeInspection.LocalQuickFixOnPsiElement;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.List;\n\npublic class GoSimplifyBoolExprQuickFix extends LocalQuickFixOnPsiElement {\n\n  public static final String QUICK_FIX_NAME = \"Simplify expression\";\n\n  public GoSimplifyBoolExprQuickFix(@NotNull PsiElement element) {\n    super(element);\n  }\n\n  @Override\n  @NotNull\n  public String getFamilyName() {\n    return getName();\n  }\n\n  @NotNull\n  @Override\n  public String getText() {\n    return \"Simplify expression\";\n  }\n\n  @Override\n  public void invoke(@NotNull Project project, @NotNull PsiFile file, @NotNull PsiElement startElement, @NotNull PsiElement endElement) {\n    if (!(startElement instanceof GoBinaryExpr)) return;\n    GoBinaryExpr o = (GoBinaryExpr)startElement;\n    boolean and = o instanceof GoAndExpr;\n\n    List<GoExpression> elements = GoBoolExpressionsInspection.collect(o, and);\n    List<GoExpression> toRemove = ContainerUtil.newSmartList();\n    for (int i = 0; i < elements.size(); i++) {\n      GoExpression l = elements.get(i);\n      if (l instanceof GoReferenceExpression &&\n          (l.textMatches(\"true\") || l.textMatches(\"false\")) &&\n          GoPsiImplUtil.builtin(((GoReferenceExpression)l).resolve())) {\n        boolean trueExpr = l.textMatches(\"true\");\n        if (and ^ !trueExpr) {\n          toRemove.add(l);\n        }\n        else {\n          replaceExpressionByBoolConst(o, project, !and);\n          return;\n        }\n      }\n      for (int j = i + 1; j < elements.size(); j++) {\n        GoExpression r = elements.get(j);\n        if (GoBoolExpressionsInspection.isEqualsWithNot(l, r) || GoBoolExpressionsInspection.isEqualsWithNot(r, l)) {\n          replaceExpressionByBoolConst(o, project, !and);\n        }\n\n        if (GoExpressionUtil.identical(l, r)) toRemove.add(l);\n        // todo expr evaluating! x != c1 || x != c2 (c1, c2 const, c1 != c2)\n      }\n    }\n\n    if (!toRemove.isEmpty()) {\n      removeRedundantExpressions(o, project, elements, toRemove, and);\n    }\n  }\n\n  private static void removeRedundantExpressions(@NotNull GoBinaryExpr binaryExpr,\n                                          @NotNull Project project,\n                                          @NotNull List<GoExpression> expressions,\n                                          @NotNull List<GoExpression> toRemove,\n                                          boolean and) {\n    for (GoExpression e : toRemove) {\n      expressions.remove(e);\n    }\n    String separator = and ? \" && \" : \" || \";\n    String text = StringUtil.join(expressions, PsiElement::getText, separator);\n    GoExpression expression = GoElementFactory.createExpression(project, text);\n    binaryExpr.replace(expression);\n  }\n\n\n  private static void replaceExpressionByBoolConst(@NotNull GoBinaryExpr binaryExpr, @NotNull Project project, boolean value) {\n    GoExpression expression = GoElementFactory.createExpression(project, value ? \"true\" : \"false\");\n    binaryExpr.replace(expression);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/refactor/GoAnonymousFieldProcessor.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.refactor;\n\nimport com.goide.psi.*;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiReference;\nimport com.intellij.psi.search.SearchScope;\nimport com.intellij.psi.search.searches.ReferencesSearch;\nimport com.intellij.refactoring.rename.RenamePsiElementProcessor;\nimport com.intellij.util.ObjectUtils;\nimport com.intellij.util.Query;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.Map;\n\npublic class GoAnonymousFieldProcessor extends RenamePsiElementProcessor {\n  @Override\n  public boolean canProcessElement(@NotNull PsiElement element) {\n    return\n      element instanceof GoTypeSpec ||\n      element instanceof GoAnonymousFieldDefinition;\n  }\n\n  @Override\n  public void prepareRenaming(PsiElement element, String newName, @NotNull Map<PsiElement, String> allRenames, @NotNull SearchScope scope) {\n    if (element instanceof GoTypeSpec) {\n      Query<PsiReference> search = ReferencesSearch.search(element, scope);\n      for (PsiReference ref : search) {\n        PsiElement refElement = ref.getElement();\n        PsiElement type = refElement == null ? null : refElement.getParent();\n        if (!(type instanceof GoType)) continue;\n        PsiElement typeParent = type.getParent();\n        GoPointerType pointer = ObjectUtils.tryCast(typeParent, GoPointerType.class);\n        PsiElement anon = pointer != null ? pointer.getParent() : typeParent;\n        if (anon instanceof GoAnonymousFieldDefinition) {\n          allRenames.put(anon, newName);\n        }\n      }\n    }\n    else if (element instanceof GoAnonymousFieldDefinition) {\n      GoTypeReferenceExpression reference = ((GoAnonymousFieldDefinition)element).getTypeReferenceExpression();\n      PsiElement resolve = reference != null ? reference.resolve() : null;\n      if (resolve instanceof GoTypeSpec) {\n        allRenames.put(resolve, newName);\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/refactor/GoDescriptionProvider.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.refactor;\n\nimport com.goide.psi.GoNamedElement;\nimport com.intellij.codeInsight.highlighting.HighlightUsagesDescriptionLocation;\nimport com.intellij.psi.ElementDescriptionLocation;\nimport com.intellij.psi.ElementDescriptionProvider;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.usageView.UsageViewLongNameLocation;\nimport com.intellij.usageView.UsageViewShortNameLocation;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoDescriptionProvider implements ElementDescriptionProvider {\n  @Nullable\n  @Override\n  public String getElementDescription(@NotNull PsiElement o, @NotNull ElementDescriptionLocation location) {\n    if (location == UsageViewShortNameLocation.INSTANCE ||\n        location == UsageViewLongNameLocation.INSTANCE ||\n        location == HighlightUsagesDescriptionLocation.INSTANCE) {\n      return o instanceof GoNamedElement ? ((GoNamedElement)o).getName() : null;\n    }\n    return null;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/refactor/GoIntroduceOperation.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.refactor;\n\nimport com.goide.psi.GoExpression;\nimport com.goide.psi.GoVarDefinition;\nimport com.intellij.openapi.editor.Editor;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.TestOnly;\n\nimport java.util.LinkedHashSet;\nimport java.util.List;\n\npublic class GoIntroduceOperation {\n  final private Project myProject;\n  final private Editor myEditor;\n  final private PsiFile myFile;\n  private GoExpression myExpression;\n  private List<PsiElement> myOccurrences;\n  private LinkedHashSet<String> mySuggestedNames;\n  private String myName;\n  private GoVarDefinition myVar;\n  private boolean myReplaceAll;\n\n  public GoIntroduceOperation(@NotNull Project project, @NotNull Editor editor, @NotNull PsiFile file) {\n    myProject = project;\n    myEditor = editor;\n    myFile = file;\n  }\n\n  @TestOnly\n  public GoIntroduceOperation(@NotNull Project project, @NotNull Editor editor, @NotNull PsiFile file, boolean replaceAll) {\n    myProject = project;\n    myEditor = editor;\n    myFile = file;\n    myReplaceAll = replaceAll;\n  }\n\n  @NotNull\n  public Project getProject() {\n    return myProject;\n  }\n\n  @NotNull\n  public Editor getEditor() {\n    return myEditor;\n  }\n\n  @NotNull\n  public PsiFile getFile() {\n    return myFile;\n  }\n\n  @NotNull\n  public GoExpression getExpression() {\n    return myExpression;\n  }\n\n  public void setExpression(@NotNull GoExpression expression) {\n    myExpression = expression;\n  }\n\n  @NotNull\n  public List<PsiElement> getOccurrences() {\n    return myOccurrences;\n  }\n\n  public void setOccurrences(@NotNull List<PsiElement> occurrences) {\n    myOccurrences = occurrences;\n  }\n\n  @NotNull\n  public LinkedHashSet<String> getSuggestedNames() {\n    return mySuggestedNames;\n  }\n\n  public void setSuggestedNames(@NotNull LinkedHashSet<String> suggestedNames) {\n    mySuggestedNames = suggestedNames;\n  }\n\n  @NotNull\n  public String getName() {\n    return myName;\n  }\n\n  public void setName(@NotNull String name) {\n    myName = name;\n  }\n\n  @NotNull\n  public GoVarDefinition getVar() {\n    return myVar;\n  }\n\n  public void setVar(@NotNull GoVarDefinition var) {\n    myVar = var;\n  }\n\n  public boolean isReplaceAll() {\n    return myReplaceAll;\n  }\n\n  public void setReplaceAll(boolean replaceAll) {\n    myReplaceAll = replaceAll;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/refactor/GoIntroduceVariableBase.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.refactor;\n\nimport com.goide.inspections.GoInspectionUtil;\nimport com.goide.psi.*;\nimport com.goide.psi.impl.GoElementFactory;\nimport com.intellij.openapi.application.ApplicationManager;\nimport com.intellij.openapi.command.WriteCommandAction;\nimport com.intellij.openapi.editor.Editor;\nimport com.intellij.openapi.editor.SelectionModel;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.Conditions;\nimport com.intellij.openapi.util.Pass;\nimport com.intellij.psi.PsiDocumentManager;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.SyntaxTraverser;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport com.intellij.refactoring.IntroduceTargetChooser;\nimport com.intellij.refactoring.RefactoringBundle;\nimport com.intellij.refactoring.introduce.inplace.InplaceVariableIntroducer;\nimport com.intellij.refactoring.introduce.inplace.OccurrencesChooser;\nimport com.intellij.refactoring.util.CommonRefactoringUtil;\nimport com.intellij.util.ArrayUtil;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.Collections;\nimport java.util.LinkedHashSet;\nimport java.util.List;\n\npublic class GoIntroduceVariableBase {\n  protected static void performAction(GoIntroduceOperation operation) {\n    SelectionModel selectionModel = operation.getEditor().getSelectionModel();\n    boolean hasSelection = selectionModel.hasSelection();\n    GoExpression expression =\n      hasSelection ? findExpressionInSelection(operation.getFile(), selectionModel.getSelectionStart(), selectionModel.getSelectionEnd())\n                   : findExpressionAtOffset(operation);\n    if (expression instanceof GoParenthesesExpr) expression = ((GoParenthesesExpr)expression).getExpression();\n    if (expression == null) {\n      String message =\n        RefactoringBundle.message(hasSelection ? \"selected.block.should.represent.an.expression\" : \"refactoring.introduce.selection.error\");\n      showCannotPerform(operation, message);\n      return;\n    }\n    List<GoExpression> extractableExpressions = collectExtractableExpressions(expression);\n    if (extractableExpressions.isEmpty()) {\n      showCannotPerform(operation, RefactoringBundle.message(\"refactoring.introduce.context.error\"));\n      return;\n    }\n    List<GoExpression> expressions = ContainerUtil.filter(extractableExpressions,\n                                                          expression12 -> GoInspectionUtil.getExpressionResultCount(expression12) == 1);\n    if (expressions.isEmpty()) {\n      GoExpression closestExpression = ContainerUtil.getFirstItem(extractableExpressions);\n      int resultCount = closestExpression != null ? GoInspectionUtil.getExpressionResultCount(closestExpression) : 0;\n      showCannotPerform(operation, \"Expression \" + (closestExpression != null ? closestExpression.getText() + \" \" : \"\") +\n                                   (resultCount == 0 ? \"doesn't return a value.\" : \"returns multiple values.\"));\n      return;\n    }\n    if (expressions.size() == 1 || hasSelection || ApplicationManager.getApplication().isUnitTestMode()) {\n      //noinspection ConstantConditions\n      operation.setExpression(ContainerUtil.getFirstItem(expressions));\n      performOnElement(operation);\n    }\n    else {\n      IntroduceTargetChooser.showChooser(operation.getEditor(), expressions, new Pass<GoExpression>() {\n        @Override\n        public void pass(GoExpression expression) {\n          if (expression.isValid()) {\n            operation.setExpression(expression);\n            performOnElement(operation);\n          }\n        }\n      }, expression1 -> expression1.isValid() ? expression1.getText() : \"<invalid expression>\");\n    }\n  }\n\n  @Nullable\n  public static GoExpression findExpressionInSelection(@NotNull PsiFile file, int start, int end) {\n    return PsiTreeUtil.findElementOfClassAtRange(file, start, end, GoExpression.class);\n  }\n\n  @Nullable\n  private static GoExpression findExpressionAtOffset(GoIntroduceOperation operation) {\n    PsiFile file = operation.getFile();\n    int offset = operation.getEditor().getCaretModel().getOffset();\n\n    GoExpression expr = PsiTreeUtil.getNonStrictParentOfType(file.findElementAt(offset), GoExpression.class);\n    GoExpression preExpr = PsiTreeUtil.getNonStrictParentOfType(file.findElementAt(offset - 1), GoExpression.class);\n    if (expr == null || preExpr != null && PsiTreeUtil.isAncestor(expr, preExpr, false)) return preExpr;\n    return expr;\n  }\n\n  @NotNull\n  private static List<GoExpression> collectExtractableExpressions(@NotNull GoExpression expression) {\n    if (PsiTreeUtil.getParentOfType(expression, GoStatement.class) == null) {\n      return Collections.emptyList();\n    }\n    return SyntaxTraverser.psiApi().parents(expression).takeWhile(Conditions.notInstanceOf(GoTopLevelDeclaration.class))\n      .filter(GoExpression.class)\n      .filter(Conditions.notInstanceOf(GoParenthesesExpr.class))\n      .filter(expression1 -> !(expression1 instanceof GoReferenceExpression && expression1.getParent() instanceof GoCallExpr))\n      .toList();\n  }\n\n  private static void performOnElement(@NotNull GoIntroduceOperation operation) {\n    GoExpression expression = operation.getExpression();\n    LinkedHashSet<String> suggestedNames = GoRefactoringUtil.getSuggestedNames(expression);\n    operation.setSuggestedNames(suggestedNames);\n    operation.setOccurrences(GoRefactoringUtil.getLocalOccurrences(expression));\n\n    Editor editor = operation.getEditor();\n    if (editor.getSettings().isVariableInplaceRenameEnabled()) {\n      //noinspection ConstantConditions\n      operation.setName(ContainerUtil.getFirstItem(suggestedNames));\n      if (ApplicationManager.getApplication().isUnitTestMode()) {\n        performInplaceIntroduce(operation);\n        return;\n      }\n      OccurrencesChooser.simpleChooser(editor)\n        .showChooser(expression, operation.getOccurrences(), new Pass<OccurrencesChooser.ReplaceChoice>() {\n          @Override\n          public void pass(OccurrencesChooser.ReplaceChoice choice) {\n            operation.setReplaceAll(choice == OccurrencesChooser.ReplaceChoice.ALL);\n            performInplaceIntroduce(operation);\n          }\n        });\n    }\n    else {\n      GoIntroduceVariableDialog dialog = new GoIntroduceVariableDialog(operation);\n      if (dialog.showAndGet()) {\n        operation.setName(dialog.getName());\n        operation.setReplaceAll(dialog.getReplaceAll());\n        performReplace(operation);\n      }\n    }\n  }\n\n  private static void performInplaceIntroduce(GoIntroduceOperation operation) {\n    if (!operation.getExpression().isValid()) {\n      showCannotPerform(operation, RefactoringBundle.message(\"refactoring.introduce.context.error\"));\n      return;\n    }\n    performReplace(operation);\n    new GoInplaceVariableIntroducer(operation).performInplaceRefactoring(operation.getSuggestedNames());\n  }\n\n  private static void performReplace(GoIntroduceOperation operation) {\n    Project project = operation.getProject();\n    PsiElement expression = operation.getExpression();\n    List<PsiElement> occurrences = operation.isReplaceAll() ? operation.getOccurrences() : Collections.singletonList(expression);\n    PsiElement anchor = GoRefactoringUtil.findLocalAnchor(occurrences);\n    if (anchor == null) {\n      showCannotPerform(operation, RefactoringBundle.message(\"refactoring.introduce.context.error\"));\n      return;\n    }\n    GoBlock context = (GoBlock)anchor.getParent();\n    String name = operation.getName();\n    List<PsiElement> newOccurrences = ContainerUtil.newArrayList();\n    WriteCommandAction.runWriteCommandAction(project, () -> {\n      GoStatement declarationStatement = GoElementFactory.createShortVarDeclarationStatement(project, name, (GoExpression)expression);\n      PsiElement newLine = GoElementFactory.createNewLine(project);\n      PsiElement statement = context.addBefore(declarationStatement, context.addBefore(newLine, anchor));\n      GoVarDefinition varDefinition = PsiTreeUtil.findChildOfType(statement, GoVarDefinition.class);\n      assert varDefinition != null;\n      assert varDefinition.isValid() : \"invalid var `\" + varDefinition.getText() + \"` definition in `\" + statement.getText() + \"`\";\n      operation.setVar(varDefinition);\n\n      boolean firstOccurrence = true;\n      for (PsiElement occurrence : occurrences) {\n        PsiElement occurrenceParent = occurrence.getParent();\n        if (occurrenceParent instanceof GoParenthesesExpr) occurrence = occurrenceParent;\n\n        if (firstOccurrence && occurrence instanceof GoExpression) {\n          firstOccurrence = false;\n          PsiElement parent = occurrence.getParent();\n          // single-expression statement\n          if (parent instanceof GoLeftHandExprList && parent.getParent() instanceof GoSimpleStatement) {\n            parent.getParent().delete();\n            continue;\n          }\n        }\n        newOccurrences.add(occurrence.replace(GoElementFactory.createReferenceExpression(project, name)));\n      }\n      operation.getEditor().getCaretModel().moveToOffset(varDefinition.getIdentifier().getTextRange().getStartOffset());\n    });\n    operation.setOccurrences(newOccurrences);\n    PsiDocumentManager.getInstance(project).doPostponedOperationsAndUnblockDocument(operation.getEditor().getDocument());\n  }\n\n  private static void showCannotPerform(GoIntroduceOperation operation, String message) {\n    message = RefactoringBundle.getCannotRefactorMessage(message);\n    CommonRefactoringUtil.showErrorHint(operation.getProject(), operation.getEditor(), message, \n                                        RefactoringBundle.getCannotRefactorMessage(null), \"refactoring.extractVariable\");\n  }\n\n  private static class GoInplaceVariableIntroducer extends InplaceVariableIntroducer<PsiElement> {\n    public GoInplaceVariableIntroducer(GoIntroduceOperation operation) {\n      super(operation.getVar(), operation.getEditor(), operation.getProject(), \"Introduce Variable\",\n            ArrayUtil.toObjectArray(operation.getOccurrences(), PsiElement.class), null);\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/refactor/GoIntroduceVariableDialog.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.refactor;\n\nimport com.goide.GoFileType;\nimport com.goide.GoNamesValidator;\nimport com.intellij.openapi.options.ConfigurationException;\nimport com.intellij.refactoring.RefactoringBundle;\nimport com.intellij.refactoring.ui.NameSuggestionsField;\nimport com.intellij.refactoring.ui.RefactoringDialog;\nimport com.intellij.ui.IdeBorderFactory;\nimport com.intellij.util.ArrayUtil;\nimport com.intellij.util.ui.UIUtil;\nimport org.jetbrains.annotations.Nullable;\n\nimport javax.swing.*;\nimport java.awt.*;\n\nclass GoIntroduceVariableDialog extends RefactoringDialog {\n  private final GoIntroduceOperation myOperation;\n  private final int myOccurrencesCount;\n  private NameSuggestionsField myNameField;\n  private JCheckBox myReplaceAllCheckBox;\n\n  protected GoIntroduceVariableDialog(GoIntroduceOperation operation) {\n    super(operation.getProject(), true);\n    myOperation = operation;\n    myOccurrencesCount = operation.getOccurrences().size();\n\n    setTitle(RefactoringBundle.message(\"introduce.variable.title\"));\n    setModal(true);\n    init();\n  }\n\n  @Override\n  protected boolean hasHelpAction() {\n    return false;\n  }\n\n  @Override\n  protected boolean hasPreviewButton() {\n    return false;\n  }\n\n  @Nullable\n  @Override\n  public JComponent getPreferredFocusedComponent() {\n    return myNameField;\n  }\n\n  @Override\n  protected void canRun() throws ConfigurationException {\n    if (!areButtonsValid()) {\n      throw new ConfigurationException(RefactoringBundle.message(\"refactoring.introduce.name.error\"), getName());\n    }\n  }\n\n  @Nullable\n  @Override\n  protected JComponent createCenterPanel() {\n    JPanel panel = new JPanel(new BorderLayout());\n    panel.add(createNamePanel(), BorderLayout.CENTER);\n    if (myOccurrencesCount > 1) panel.add(createReplaceAllPanel(), BorderLayout.SOUTH);\n    panel.setPreferredSize(new Dimension(myNameField.getWidth(), -1));\n    return panel;\n  }\n\n  private JComponent createNamePanel() {\n    JPanel panel = new JPanel(new BorderLayout());\n\n    String[] names = ArrayUtil.toStringArray(myOperation.getSuggestedNames());\n    myNameField = new NameSuggestionsField(names, myOperation.getProject(), GoFileType.INSTANCE);\n    myNameField.setBorder(IdeBorderFactory.createEmptyBorder(3, 5, 2, 3));\n    myNameField.addDataChangedListener(this::validateButtons);\n\n    JLabel label = new JLabel(UIUtil.replaceMnemonicAmpersand(RefactoringBundle.message(\"name.prompt\")));\n    label.setLabelFor(myNameField);\n\n    panel.add(myNameField, BorderLayout.CENTER);\n    panel.add(label, BorderLayout.WEST);\n    return panel;\n  }\n\n  private JComponent createReplaceAllPanel() {\n    JPanel panel = new JPanel(new FlowLayout());\n\n    String text = UIUtil.replaceMnemonicAmpersand(RefactoringBundle.message(\"replace.all.occurences\", myOccurrencesCount));\n    myReplaceAllCheckBox = new JCheckBox(text);\n    panel.add(myReplaceAllCheckBox);\n\n    return panel;\n  }\n\n  @Override\n  protected boolean areButtonsValid() {\n    return new GoNamesValidator().isIdentifier(getName(), myProject);\n  }\n\n  @Override\n  protected void doAction() {\n    closeOKAction();\n  }\n\n  public String getName() {\n    return myNameField.getEnteredName();\n  }\n\n  public boolean getReplaceAll() {\n    return myReplaceAllCheckBox != null && myReplaceAllCheckBox.isSelected();\n  }\n}\n"
  },
  {
    "path": "src/com/goide/refactor/GoIntroduceVariableHandler.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.refactor;\n\nimport com.intellij.openapi.actionSystem.DataContext;\nimport com.intellij.openapi.editor.Editor;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.refactoring.RefactoringActionHandler;\nimport com.intellij.refactoring.util.CommonRefactoringUtil;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoIntroduceVariableHandler extends GoIntroduceVariableBase implements RefactoringActionHandler {\n  @Override\n  public void invoke(@NotNull Project project, Editor editor, PsiFile file, DataContext dataContext) {\n    if (!CommonRefactoringUtil.checkReadOnlyStatus(file)) return;\n    performAction(new GoIntroduceOperation(project, editor, file));\n  }\n\n  @Override\n  public void invoke(@NotNull Project project, @NotNull PsiElement[] elements, DataContext dataContext) {\n  }\n}\n"
  },
  {
    "path": "src/com/goide/refactor/GoRefactoringSupportProvider.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.refactor;\n\nimport com.goide.psi.GoNamedElement;\nimport com.intellij.lang.refactoring.RefactoringSupportProvider;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.refactoring.RefactoringActionHandler;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoRefactoringSupportProvider extends RefactoringSupportProvider {\n  @Override\n  public boolean isMemberInplaceRenameAvailable(@NotNull PsiElement element, PsiElement context) {\n    return element instanceof GoNamedElement;\n  }\n\n  @Nullable\n  @Override\n  public RefactoringActionHandler getIntroduceVariableHandler() {\n    return new GoIntroduceVariableHandler();\n  }\n}\n"
  },
  {
    "path": "src/com/goide/refactor/GoRefactoringUtil.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.refactor;\n\nimport com.goide.GoLanguage;\nimport com.goide.psi.*;\nimport com.goide.psi.impl.GoPsiImplUtil;\nimport com.goide.psi.impl.GoTypeUtil;\nimport com.intellij.codeInsight.PsiEquivalenceUtil;\nimport com.intellij.codeInsight.lookup.LookupElement;\nimport com.intellij.codeInsight.lookup.LookupElementBuilder;\nimport com.intellij.codeInsight.template.Expression;\nimport com.intellij.codeInsight.template.ExpressionContext;\nimport com.intellij.codeInsight.template.Result;\nimport com.intellij.codeInsight.template.TextResult;\nimport com.intellij.lang.LanguageNamesValidation;\nimport com.intellij.lang.refactoring.NamesValidator;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.psi.PsiDocumentManager;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.PsiRecursiveElementVisitor;\nimport com.intellij.psi.codeStyle.NameUtil;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport com.intellij.util.ArrayUtil;\nimport com.intellij.util.containers.ContainerUtil;\nimport com.intellij.util.text.UniqueNameGenerator;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.Collections;\nimport java.util.LinkedHashSet;\nimport java.util.List;\nimport java.util.Set;\n\npublic class GoRefactoringUtil {\n  private GoRefactoringUtil() {}\n\n  @NotNull\n  public static List<PsiElement> getLocalOccurrences(@NotNull PsiElement element) {\n    return getOccurrences(element, PsiTreeUtil.getTopmostParentOfType(element, GoBlock.class));\n  }\n\n  @NotNull\n  public static List<PsiElement> getOccurrences(@NotNull PsiElement pattern, @Nullable PsiElement context) {\n    if (context == null) return Collections.emptyList();\n    List<PsiElement> occurrences = ContainerUtil.newArrayList();\n    PsiRecursiveElementVisitor visitor = new PsiRecursiveElementVisitor() {\n      @Override\n      public void visitElement(@NotNull PsiElement element) {\n        if (PsiEquivalenceUtil.areElementsEquivalent(element, pattern)) {\n          occurrences.add(element);\n          return;\n        }\n        super.visitElement(element);\n      }\n    };\n    context.acceptChildren(visitor);\n    return occurrences;\n  }\n\n  @Nullable\n  public static PsiElement findLocalAnchor(@NotNull List<PsiElement> occurrences) {\n    return findAnchor(occurrences, PsiTreeUtil.getNonStrictParentOfType(PsiTreeUtil.findCommonParent(occurrences), GoBlock.class));\n  }\n\n  @Nullable\n  public static PsiElement findAnchor(@NotNull List<PsiElement> occurrences, @Nullable PsiElement context) {\n    PsiElement first = ContainerUtil.getFirstItem(occurrences);\n    PsiElement statement = PsiTreeUtil.getNonStrictParentOfType(first, GoStatement.class);\n    while (statement != null && statement.getParent() != context) {\n      statement = statement.getParent();\n    }\n    return statement == null ? GoPsiImplUtil.getTopLevelDeclaration(first) : statement;\n  }\n\n  public static LinkedHashSet<String> getSuggestedNames(GoExpression expression) {\n    return getSuggestedNames(expression, expression);\n  }\n\n  @NotNull\n  public static Expression createParameterNameSuggestedExpression(GoExpression expression) {\n    GoTopLevelDeclaration topLevelDecl = PsiTreeUtil.getParentOfType(expression, GoTopLevelDeclaration.class);\n    return new ParameterNameExpression(getSuggestedNames(expression, topLevelDecl != null ? topLevelDecl.getNextSibling() : null));\n  }\n\n  private static class ParameterNameExpression extends Expression {\n    private final Set<String> myNames;\n\n    public ParameterNameExpression(@NotNull Set<String> names) {\n      myNames = names;\n    }\n\n    @Nullable\n    @Override\n    public Result calculateResult(ExpressionContext context) {\n      LookupElement firstElement = ArrayUtil.getFirstElement(calculateLookupItems(context));\n      return new TextResult(firstElement != null ? firstElement.getLookupString() : \"\");\n    }\n\n    @Nullable\n    @Override\n    public Result calculateQuickResult(ExpressionContext context) {\n      return null;\n    }\n\n    @NotNull\n    @Override\n    public LookupElement[] calculateLookupItems(ExpressionContext context) {\n      int offset = context.getStartOffset();\n      Project project = context.getProject();\n      PsiDocumentManager.getInstance(project).commitAllDocuments();\n      assert context.getEditor() != null;\n      PsiFile file = PsiDocumentManager.getInstance(project).getPsiFile(context.getEditor().getDocument());\n      assert file != null;\n      PsiElement elementAt = file.findElementAt(offset);\n\n      Set<String> parameterNames = ContainerUtil.newHashSet();\n      GoParameters parameters = PsiTreeUtil.getParentOfType(elementAt, GoParameters.class);\n      if (parameters != null) {\n        GoParamDefinition parameter = PsiTreeUtil.getParentOfType(elementAt, GoParamDefinition.class);\n        for (GoParameterDeclaration paramDecl : parameters.getParameterDeclarationList()) {\n          for (GoParamDefinition paramDef : paramDecl.getParamDefinitionList()) {\n            if (parameter != paramDef) {\n              parameterNames.add(paramDef.getName());\n            }\n          }\n        }\n      }\n\n      Set<LookupElement> set = ContainerUtil.newLinkedHashSet();\n      for (String name : myNames) {\n        set.add(LookupElementBuilder.create(UniqueNameGenerator.generateUniqueName(name, parameterNames)));\n      }\n      return set.toArray(new LookupElement[set.size()]);\n    }\n  }\n\n  @NotNull\n  private static LinkedHashSet<String> getSuggestedNames(GoExpression expression, PsiElement context) {\n    // todo rewrite with names resolve; check occurrences contexts\n    if (expression.isEquivalentTo(context)) {\n      context = PsiTreeUtil.getParentOfType(context, GoBlock.class);\n    }\n    LinkedHashSet<String> usedNames = getNamesInContext(context);\n    LinkedHashSet<String> names = ContainerUtil.newLinkedHashSet();\n    NamesValidator namesValidator = LanguageNamesValidation.INSTANCE.forLanguage(GoLanguage.INSTANCE);\n\n    if (expression instanceof GoCallExpr) {\n      GoReferenceExpression callReference = PsiTreeUtil.getChildOfType(expression, GoReferenceExpression.class);\n      if (callReference != null) {\n        String name = StringUtil.decapitalize(callReference.getIdentifier().getText());\n        for (String candidate : NameUtil.getSuggestionsByName(name, \"\", \"\", false, false, false)) {\n          if (usedNames.contains(candidate)) continue;\n          if (!isValidName(namesValidator, candidate)) continue;\n          names.add(candidate);\n        }\n      }\n    }\n\n    GoType type = expression.getGoType(null);\n    String typeText = GoPsiImplUtil.getText(type);\n    if (StringUtil.isNotEmpty(typeText)) {\n      boolean array = GoTypeUtil.isIterable(type) && !GoTypeUtil.isString(type);\n      for (String candidate : NameUtil.getSuggestionsByName(typeText, \"\", \"\", false, false, array)) {\n        if (usedNames.contains(candidate) || typeText.equals(candidate)) continue;\n        if (!isValidName(namesValidator, candidate)) continue;\n        names.add(candidate);\n      }\n    }\n\n    if (names.isEmpty()) {\n      names.add(UniqueNameGenerator.generateUniqueName(\"i\", usedNames));\n    }\n    return names;\n  }\n\n  private static boolean isValidName(NamesValidator namesValidator, String candidate) {\n    return namesValidator != null && !namesValidator.isKeyword(candidate, null) && namesValidator.isIdentifier(candidate, null);\n  }\n\n  @NotNull\n  private static LinkedHashSet<String> getNamesInContext(PsiElement context) {\n    if (context == null) return ContainerUtil.newLinkedHashSet();\n    LinkedHashSet<String> names = ContainerUtil.newLinkedHashSet();\n\n    for (GoNamedElement namedElement : PsiTreeUtil.findChildrenOfType(context, GoNamedElement.class)) {\n      names.add(namedElement.getName());\n    }\n    names.addAll(((GoFile)context.getContainingFile()).getImportMap().keySet());\n\n    GoFunctionDeclaration functionDeclaration = PsiTreeUtil.getParentOfType(context, GoFunctionDeclaration.class);\n    GoSignature signature = PsiTreeUtil.getChildOfType(functionDeclaration, GoSignature.class);\n    for (GoParamDefinition param : PsiTreeUtil.findChildrenOfType(signature, GoParamDefinition.class)) {\n      names.add(param.getName());\n    }\n    return names;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/refactor/GoRenameImportSpecProcessor.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.refactor;\n\nimport com.goide.psi.GoImportSpec;\nimport com.intellij.find.FindManager;\nimport com.intellij.openapi.editor.Editor;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.refactoring.RefactoringBundle;\nimport com.intellij.refactoring.rename.RenamePsiElementProcessor;\nimport com.intellij.refactoring.util.CommonRefactoringUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoRenameImportSpecProcessor extends RenamePsiElementProcessor {\n  @Nullable\n  @Override\n  public PsiElement substituteElementToRename(PsiElement element, @Nullable Editor editor) {\n    if (FindManager.getInstance(element.getProject()).canFindUsages(element)) {\n      return element;\n    }\n    \n    String message = RefactoringBundle.message(\"error.cannot.be.renamed\");\n    CommonRefactoringUtil.showErrorHint(element.getProject(), editor, message, RefactoringBundle.message(\"rename.title\"), null);\n    return null;\n  }\n\n  @Override\n  public boolean canProcessElement(@NotNull PsiElement element) {\n    return element instanceof GoImportSpec;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/regexp/GoRegExpLanguage.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.regexp;\n\nimport com.intellij.lang.Language;\nimport org.intellij.lang.regexp.RegExpLanguage;\n\npublic class GoRegExpLanguage extends Language {\n  public static final GoRegExpLanguage INSTANCE = new GoRegExpLanguage();\n\n  private GoRegExpLanguage() {\n    super(RegExpLanguage.INSTANCE, \"GoRegExp\");\n  }\n}\n"
  },
  {
    "path": "src/com/goide/regexp/GoRegExpParserDefinition.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.regexp;\n\nimport com.intellij.lang.PsiParser;\nimport com.intellij.lexer.Lexer;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.psi.FileViewProvider;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.tree.IFileElementType;\nimport org.intellij.lang.regexp.*;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.EnumSet;\n\npublic class GoRegExpParserDefinition extends RegExpParserDefinition {\n  private static final IFileElementType GO_REGEXP_FILE = new IFileElementType(\"GO_REGEXP_FILE\", GoRegExpLanguage.INSTANCE);\n  private final EnumSet<RegExpCapability> CAPABILITIES = EnumSet.of(RegExpCapability.UNICODE_CATEGORY_SHORTHAND,\n                                                                    RegExpCapability.CARET_NEGATED_PROPERTIES,\n                                                                    RegExpCapability.NESTED_CHARACTER_CLASSES,\n                                                                    RegExpCapability.OCTAL_NO_LEADING_ZERO,\n                                                                    RegExpCapability.POSIX_BRACKET_EXPRESSIONS);\n\n  @Override\n  @NotNull\n  public Lexer createLexer(Project project) {\n    return new RegExpLexer(CAPABILITIES);\n  }\n\n  @Override\n  public PsiParser createParser(Project project) {\n    return new RegExpParser(CAPABILITIES);\n  }\n\n  @Override\n  public IFileElementType getFileNodeType() {\n    return GO_REGEXP_FILE;\n  }\n\n  @Override\n  public PsiFile createFile(FileViewProvider viewProvider) {\n    return new RegExpFile(viewProvider, GoRegExpLanguage.INSTANCE);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/regexp/GoRegexHost.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.regexp;\n\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.intellij.lang.regexp.RegExpLanguageHost;\nimport org.intellij.lang.regexp.psi.RegExpChar;\nimport org.intellij.lang.regexp.psi.RegExpGroup;\nimport org.intellij.lang.regexp.psi.RegExpNamedGroupRef;\nimport org.intellij.lang.regexp.psi.RegExpSimpleClass;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.Set;\n\n// see https://golang.org/pkg/regexp/syntax/\npublic class GoRegexHost implements RegExpLanguageHost {\n  @Override\n  public boolean characterNeedsEscaping(char c) {\n    return false;\n  }\n\n  @Override\n  public boolean supportsPerl5EmbeddedComments() {\n    return false;\n  }\n\n  @Override\n  public boolean supportsPossessiveQuantifiers() {\n    return false;\n  }\n\n  @Override\n  public boolean supportsPythonConditionalRefs() {\n    return false;\n  }\n\n  @Override\n  public boolean supportsNamedGroupSyntax(RegExpGroup group) {\n    return group.isPythonNamedGroup(); // only (?P<name>) group is supported\n  }\n\n  @Override\n  public boolean supportsNamedGroupRefSyntax(RegExpNamedGroupRef ref) {\n    return false;\n  }\n\n  @Override\n  public boolean supportsExtendedHexCharacter(RegExpChar regExpChar) {\n    return true;\n  }\n\n  @Override\n  public boolean isValidCategory(@NotNull String category) {\n    return Lazy.KNOWN_PROPERTIES.contains(category);\n  }\n\n  @NotNull\n  @Override\n  public String[][] getAllKnownProperties() {\n    return Lazy.KNOWN_PROPERTIES_ARRAY;\n  }\n\n  @Nullable\n  @Override\n  public String getPropertyDescription(@Nullable String name) {\n    return name;\n  }\n\n  @NotNull\n  @Override\n  public String[][] getKnownCharacterClasses() {\n    return Lazy.CHARACTER_CLASSES;\n  }\n\n  @Override\n  public boolean supportsSimpleClass(RegExpSimpleClass simpleClass) {\n    switch (simpleClass.getKind()) {\n      case HORIZONTAL_SPACE:\n      case NON_HORIZONTAL_SPACE:\n      case NON_VERTICAL_SPACE:\n      case XML_NAME_START:\n      case NON_XML_NAME_START:\n      case XML_NAME_PART:\n      case NON_XML_NAME_PART:\n      case UNICODE_GRAPHEME:\n      case UNICODE_LINEBREAK:\n        return false;\n\n      case ANY:\n      case DIGIT:\n      case NON_DIGIT:\n      case WORD:\n      case NON_WORD:\n      case SPACE:\n      case NON_SPACE:\n      case VERTICAL_SPACE:\n        return true;\n    }\n    return false;\n  }\n\n  @Override\n  public boolean supportsLiteralBackspace(RegExpChar aChar) {\n    return false;\n  }\n\n  @Override\n  public boolean supportsInlineOptionFlag(char flag, PsiElement context) {\n    return StringUtil.containsChar(\"imsU\", flag);\n  }\n\n  private interface Lazy {\n    // SDK/unicode/tables.go\n    Set<String> KNOWN_PROPERTIES = ContainerUtil.immutableSet(\"C\", \"Cc\", \"Cf\", \"Co\", \"Cs\", \"L\", \"Ll\", \"Lm\", \"Lo\", \"Lt\", \"Lu\", \"M\", \"Mc\",\n                                                              \"Me\", \"Mn\", \"N\", \"Nd\", \"Nl\", \"No\", \"P\", \"Pc\", \"Pd\", \"Pe\", \"Pf\", \"Pi\", \"Po\",\n                                                              \"Ps\", \"S\", \"Sc\", \"Sk\", \"Sm\", \"So\", \"Z\", \"Zl\", \"Zp\", \"Zs\",\n\n                                                              \"Ahom\", \"Anatolian_Hieroglyphs\", \"Arabic\", \"Armenian\", \"Avestan\", \"Balinese\",\n                                                              \"Bamum\", \"Bassa_Vah\", \"Batak\", \"Bengali\", \"Bopomofo\", \"Brahmi\", \"Braille\",\n                                                              \"Buginese\", \"Buhid\", \"Canadian_Aboriginal\", \"Carian\", \"Caucasian_Albanian\",\n                                                              \"Chakma\", \"Cham\", \"Cherokee\", \"Common\", \"Coptic\", \"Cuneiform\", \"Cypriot\",\n                                                              \"Cyrillic\", \"Deseret\", \"Devanagari\", \"Duployan\", \"Egyptian_Hieroglyphs\",\n                                                              \"Elbasan\", \"Ethiopic\", \"Georgian\", \"Glagolitic\", \"Gothic\", \"Grantha\", \"Greek\",\n                                                              \"Gujarati\", \"Gurmukhi\", \"Han\", \"Hangul\", \"Hanunoo\", \"Hatran\", \"Hebrew\",\n                                                              \"Hiragana\", \"Imperial_Aramaic\", \"Inherited\", \"Inscriptional_Pahlavi\",\n                                                              \"Inscriptional_Parthian\", \"Javanese\", \"Kaithi\", \"Kannada\", \"Katakana\",\n                                                              \"Kayah_Li\", \"Kharoshthi\", \"Khmer\", \"Khojki\", \"Khudawadi\", \"Lao\", \"Latin\",\n                                                              \"Lepcha\", \"Limbu\", \"Linear_A\", \"Linear_B\", \"Lisu\", \"Lycian\", \"Lydian\",\n                                                              \"Mahajani\", \"Malayalam\", \"Mandaic\", \"Manichaean\", \"Meetei_Mayek\",\n                                                              \"Mende_Kikakui\", \"Meroitic_Cursive\", \"Meroitic_Hieroglyphs\", \"Miao\", \"Modi\",\n                                                              \"Mongolian\", \"Mro\", \"Multani\", \"Myanmar\", \"Nabataean\", \"New_Tai_Lue\", \"Nko\",\n                                                              \"Ogham\", \"Ol_Chiki\", \"Old_Hungarian\", \"Old_Italic\", \"Old_North_Arabian\",\n                                                              \"Old_Permic\", \"Old_Persian\", \"Old_South_Arabian\", \"Old_Turkic\", \"Oriya\",\n                                                              \"Osmanya\", \"Pahawh_Hmong\", \"Palmyrene\", \"Pau_Cin_Hau\", \"Phags_Pa\",\n                                                              \"Phoenician\", \"Psalter_Pahlavi\", \"Rejang\", \"Runic\", \"Samaritan\", \"Saurashtra\",\n                                                              \"Sharada\", \"Shavian\", \"Siddham\", \"SignWriting\", \"Sinhala\", \"Sora_Sompeng\",\n                                                              \"Sundanese\", \"Syloti_Nagri\", \"Syriac\", \"Tagalog\", \"Tagbanwa\", \"Tai_Le\",\n                                                              \"Tai_Tham\", \"Tai_Viet\", \"Takri\", \"Tamil\", \"Telugu\", \"Thaana\", \"Thai\",\n                                                              \"Tibetan\", \"Tifinagh\", \"Tirhuta\", \"Ugaritic\", \"Vai\", \"Warang_Citi\", \"Yi\");\n\n    String[][] KNOWN_PROPERTIES_ARRAY = ContainerUtil.map2Array(KNOWN_PROPERTIES, new String[KNOWN_PROPERTIES.size()][2],\n                                                                s -> new String[]{s, \"\"});\n\n    String[][] CHARACTER_CLASSES = {\n      // Empty strings\n      {\"A\", \"at beginning of text\"},\n      {\"b\", \"at ASCII word boundary (\\\\w on one side and \\\\W, \\\\A, or \\\\z on the other)\"},\n      {\"B\", \"not at ASCII word boundary\"},\n      {\"z\", \"at end of text\"},\n      {\"Z\", \"end of the text but for the final terminator, if any\"},\n\n      // Escape sequences\n      {\"a\", \"bell (== \\007)\"},\n      {\"f\", \"form feed (== \\014)\"},\n      {\"t\", \"horizontal tab (== \\011)\"},\n      {\"n\", \"newline (== \\012)\"},\n      {\"r\", \"carriage return (== \\015)\"},\n      {\"v\", \"vertical tab character (== \\013)\"},\n      {\"*\", \"literal *, for any punctuation character *\"},\n      {\"Q\", \"nothing, but quotes all characters until \\\\E\"},\n      {\"E\", \"nothing, but ends quoting started by \\\\Q\"},\n\n      // Perl character classes (all ASCII-only):\n      {\"d\", \"digits (== [0-9])\"},\n      {\"D\", \"not digits (== [^0-9])\"},\n      {\"s\", \"whitespace (== [\\t\\n\\f\\r ])\"},\n      {\"S\", \"not whitespace (== [^\\t\\n\\f\\r ])\"},\n      {\"w\", \"word characters (== [0-9A-Za-z_])\"},\n      {\"W\", \"not word characters (== [^0-9A-Za-z_])\"},\n    };\n  }\n} "
  },
  {
    "path": "src/com/goide/regexp/GoRegexInjector.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.regexp;\n\nimport com.goide.psi.*;\nimport com.goide.psi.impl.GoPsiImplUtil;\nimport com.intellij.psi.*;\nimport com.intellij.util.ObjectUtils;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.Set;\n\npublic class GoRegexInjector implements LanguageInjector {\n  private static final Set<String> REGEXP_FUNCTION_NAMES = ContainerUtil.newHashSet(\n    \"Compile\", \"CompilePOSIX\", \"MustCompile\", \"MustCompilePOSIX\", \"Match\", \"MatchReader\", \"MatchString\"\n  );\n\n  @Override\n  public void getLanguagesToInject(@NotNull PsiLanguageInjectionHost host, @NotNull InjectedLanguagePlaces injectionPlacesRegistrar) {\n    if (!(host instanceof GoStringLiteral)) return;\n    PsiElement topMostExpression = host;\n    PsiElement argumentList = host.getParent();\n    while (argumentList instanceof GoParenthesesExpr) {\n      topMostExpression = argumentList;\n      argumentList = argumentList.getParent();\n    }\n    if (!(argumentList instanceof GoArgumentList)) return;\n    // must be first argument\n    if (ContainerUtil.getFirstItem(((GoArgumentList)argumentList).getExpressionList()) != topMostExpression) return;\n\n    GoCallExpr callExpression = ObjectUtils.tryCast(argumentList.getParent(), GoCallExpr.class);\n    if (callExpression == null) return;\n    GoReferenceExpression referenceExpression = ObjectUtils.tryCast(callExpression.getExpression(), GoReferenceExpression.class);\n    if (referenceExpression != null && REGEXP_FUNCTION_NAMES.contains(referenceExpression.getIdentifier().getText())) {\n      GoSignatureOwner resolvedCall = GoPsiImplUtil.resolveCall(callExpression);\n      if (resolvedCall instanceof GoFunctionDeclaration) {\n        PsiFile file = resolvedCall.getContainingFile();\n        if (file instanceof GoFile && \"regexp\".equals(((GoFile)file).getImportPath(false))) {\n          injectionPlacesRegistrar.addPlace(GoRegExpLanguage.INSTANCE, ElementManipulators.getValueTextRange(host), null, null);\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/GoBuildingRunner.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig;\n\nimport com.goide.GoEnvironmentUtil;\nimport com.goide.dlv.DlvDebugProcess;\nimport com.goide.dlv.DlvRemoteVmConnection;\nimport com.goide.runconfig.application.GoApplicationConfiguration;\nimport com.goide.runconfig.application.GoApplicationRunningState;\nimport com.goide.util.GoHistoryProcessListener;\nimport com.intellij.execution.ExecutionException;\nimport com.intellij.execution.ExecutionResult;\nimport com.intellij.execution.RunProfileStarter;\nimport com.intellij.execution.RunnerAndConfigurationSettings;\nimport com.intellij.execution.configurations.RunProfile;\nimport com.intellij.execution.configurations.RunProfileState;\nimport com.intellij.execution.executors.DefaultDebugExecutor;\nimport com.intellij.execution.executors.DefaultRunExecutor;\nimport com.intellij.execution.process.ProcessAdapter;\nimport com.intellij.execution.process.ProcessEvent;\nimport com.intellij.execution.runners.AsyncGenericProgramRunner;\nimport com.intellij.execution.runners.ExecutionEnvironment;\nimport com.intellij.execution.runners.RunContentBuilder;\nimport com.intellij.execution.ui.RunContentDescriptor;\nimport com.intellij.internal.statistic.UsageTrigger;\nimport com.intellij.openapi.fileEditor.FileDocumentManager;\nimport com.intellij.openapi.util.io.FileUtil;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.util.ArrayUtil;\nimport com.intellij.util.net.NetUtils;\nimport com.intellij.xdebugger.XDebugProcess;\nimport com.intellij.xdebugger.XDebugProcessStarter;\nimport com.intellij.xdebugger.XDebugSession;\nimport com.intellij.xdebugger.XDebuggerManager;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\nimport org.jetbrains.concurrency.AsyncPromise;\nimport org.jetbrains.concurrency.Promise;\nimport org.jetbrains.debugger.connection.RemoteVmConnection;\n\nimport java.io.File;\nimport java.io.IOException;\nimport java.net.InetSocketAddress;\nimport java.net.ServerSocket;\n\npublic class GoBuildingRunner extends AsyncGenericProgramRunner {\n  private static final String ID = \"GoBuildingRunner\";\n\n  @NotNull\n  @Override\n  public String getRunnerId() {\n    return ID;\n  }\n\n  @Override\n  public boolean canRun(@NotNull String executorId, @NotNull RunProfile profile) {\n    if (profile instanceof GoApplicationConfiguration) {\n      return DefaultRunExecutor.EXECUTOR_ID.equals(executorId)\n             || DefaultDebugExecutor.EXECUTOR_ID.equals(executorId) && !DlvDebugProcess.IS_DLV_DISABLED;\n    }\n    return false;\n  }\n\n  @NotNull\n  @Override\n  protected Promise<RunProfileStarter> prepare(@NotNull ExecutionEnvironment environment, @NotNull RunProfileState state)\n    throws ExecutionException {\n    File outputFile = getOutputFile(environment, (GoApplicationRunningState)state);\n    FileDocumentManager.getInstance().saveAllDocuments();\n\n    AsyncPromise<RunProfileStarter> buildingPromise = new AsyncPromise<>();\n    GoHistoryProcessListener historyProcessListener = new GoHistoryProcessListener();\n    ((GoApplicationRunningState)state).createCommonExecutor()\n      .withParameters(\"build\")\n      .withParameterString(((GoApplicationRunningState)state).getGoBuildParams())\n      .withParameters(\"-o\", outputFile.getAbsolutePath())\n      .withParameters(((GoApplicationRunningState)state).isDebug() ? new String[]{\"-gcflags\", \"-N -l\"} : ArrayUtil.EMPTY_STRING_ARRAY)\n      .withParameters(((GoApplicationRunningState)state).getTarget())\n      .disablePty()\n      .withPresentableName(\"go build\")\n      .withProcessListener(historyProcessListener)\n      .withProcessListener(new ProcessAdapter() {\n\n        @Override\n        public void processTerminated(ProcessEvent event) {\n          super.processTerminated(event);\n          boolean compilationFailed = event.getExitCode() != 0;\n          if (((GoApplicationRunningState)state).isDebug()) {\n              buildingPromise.setResult(new MyDebugStarter(outputFile.getAbsolutePath(), historyProcessListener, compilationFailed));\n            }\n            else {\n              buildingPromise.setResult(new MyRunStarter(outputFile.getAbsolutePath(), historyProcessListener, compilationFailed));\n            }\n        }\n      }).executeWithProgress(false);\n    return buildingPromise;\n  }\n\n  @NotNull\n  private static File getOutputFile(@NotNull ExecutionEnvironment environment, @NotNull GoApplicationRunningState state)\n    throws ExecutionException {\n    File outputFile;\n    String outputDirectoryPath = state.getConfiguration().getOutputFilePath();\n    RunnerAndConfigurationSettings settings = environment.getRunnerAndConfigurationSettings();\n    String configurationName = settings != null ? settings.getName() : \"application\";\n    if (StringUtil.isEmpty(outputDirectoryPath)) {\n      try {\n        outputFile = FileUtil.createTempFile(configurationName, \"go\", true);\n      }\n      catch (IOException e) {\n        throw new ExecutionException(\"Cannot create temporary output file\", e);\n      }\n    }\n    else {\n      File outputDirectory = new File(outputDirectoryPath);\n      if (outputDirectory.isDirectory() || !outputDirectory.exists() && outputDirectory.mkdirs()) {\n        outputFile = new File(outputDirectoryPath, GoEnvironmentUtil.getBinaryFileNameForPath(configurationName));\n        try {\n          if (!outputFile.exists() && !outputFile.createNewFile()) {\n            throw new ExecutionException(\"Cannot create output file \" + outputFile.getAbsolutePath());\n          }\n        }\n        catch (IOException e) {\n          throw new ExecutionException(\"Cannot create output file \" + outputFile.getAbsolutePath());\n        }\n      }\n      else {\n        throw new ExecutionException(\"Cannot create output file in \" + outputDirectory.getAbsolutePath());\n      }\n    }\n    if (!prepareFile(outputFile)) {\n      throw new ExecutionException(\"Cannot make temporary file executable \" + outputFile.getAbsolutePath());\n    }\n    return outputFile;\n  }\n\n  private static boolean prepareFile(@NotNull File file) {\n    try {\n      FileUtil.writeToFile(file, new byte[]{0x7F, 'E', 'L', 'F'});\n    }\n    catch (IOException e) {\n      return false;\n    }\n    return file.setExecutable(true);\n  }\n  \n  private class MyDebugStarter extends RunProfileStarter {\n    private final String myOutputFilePath;\n    private final GoHistoryProcessListener myHistoryProcessListener;\n    private final boolean myCompilationFailed;\n\n\n    private MyDebugStarter(@NotNull String outputFilePath,\n                           @NotNull GoHistoryProcessListener historyProcessListener,\n                           boolean compilationFailed) {\n      myOutputFilePath = outputFilePath;\n      myHistoryProcessListener = historyProcessListener;\n      myCompilationFailed = compilationFailed;\n    }\n\n    @Nullable\n    @Override\n    public RunContentDescriptor execute(@NotNull RunProfileState state, @NotNull ExecutionEnvironment env)\n      throws ExecutionException {\n      if (state instanceof GoApplicationRunningState) {\n        int port = findFreePort();\n        FileDocumentManager.getInstance().saveAllDocuments();\n        ((GoApplicationRunningState)state).setHistoryProcessHandler(myHistoryProcessListener);\n        ((GoApplicationRunningState)state).setOutputFilePath(myOutputFilePath);\n        ((GoApplicationRunningState)state).setDebugPort(port);\n        ((GoApplicationRunningState)state).setCompilationFailed(myCompilationFailed);\n\n        // start debugger\n        ExecutionResult executionResult = state.execute(env.getExecutor(), GoBuildingRunner.this);\n        if (executionResult == null) {\n          throw new ExecutionException(\"Cannot run debugger\");\n        }\n\n        UsageTrigger.trigger(\"go.dlv.debugger\");\n      \n        return XDebuggerManager.getInstance(env.getProject()).startSession(env, new XDebugProcessStarter() {\n          @NotNull\n          @Override\n          public XDebugProcess start(@NotNull XDebugSession session) throws ExecutionException {\n            RemoteVmConnection connection = new DlvRemoteVmConnection();\n            DlvDebugProcess process = new DlvDebugProcess(session, connection, executionResult);\n            connection.open(new InetSocketAddress(NetUtils.getLoopbackAddress(), port));\n            return process;\n          }\n        }).getRunContentDescriptor();\n      }\n      return null;\n    }\n  }\n\n  private class MyRunStarter extends RunProfileStarter {\n    private final String myOutputFilePath;\n    private final GoHistoryProcessListener myHistoryProcessListener;\n    private final boolean myCompilationFailed;\n\n\n    private MyRunStarter(@NotNull String outputFilePath,\n                         @NotNull GoHistoryProcessListener historyProcessListener,\n                         boolean compilationFailed) {\n      myOutputFilePath = outputFilePath;\n      myHistoryProcessListener = historyProcessListener;\n      myCompilationFailed = compilationFailed;\n    }\n\n    @Nullable\n    @Override\n    public RunContentDescriptor execute(@NotNull RunProfileState state, @NotNull ExecutionEnvironment env)\n      throws ExecutionException {\n      if (state instanceof GoApplicationRunningState) {\n        FileDocumentManager.getInstance().saveAllDocuments();\n        ((GoApplicationRunningState)state).setHistoryProcessHandler(myHistoryProcessListener);\n        ((GoApplicationRunningState)state).setOutputFilePath(myOutputFilePath);\n        ((GoApplicationRunningState)state).setCompilationFailed(myCompilationFailed);\n        ExecutionResult executionResult = state.execute(env.getExecutor(), GoBuildingRunner.this);\n        return executionResult != null ? new RunContentBuilder(executionResult, env).showRunContent(env.getContentToReuse()) : null;\n      }\n      return null;\n    }\n  }\n\n  private static int findFreePort() {\n    try(ServerSocket socket = new ServerSocket(0)) {\n      socket.setReuseAddress(true);\n      return socket.getLocalPort();\n    }\n    catch (Exception ignore) {\n    }\n    throw new IllegalStateException(\"Could not find a free TCP/IP port to start dlv\");\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/GoConfigurationFactoryBase.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig;\n\nimport com.intellij.compiler.options.CompileStepBeforeRun;\nimport com.intellij.execution.BeforeRunTask;\nimport com.intellij.execution.configurations.ConfigurationFactory;\nimport com.intellij.execution.configurations.ConfigurationType;\nimport com.intellij.openapi.util.Key;\n\npublic abstract class GoConfigurationFactoryBase extends ConfigurationFactory {\n  protected GoConfigurationFactoryBase(ConfigurationType type) {\n    super(type);\n  }\n\n  @Override\n  public void configureBeforeRunTaskDefaults(Key<? extends BeforeRunTask> providerID, BeforeRunTask task) {\n    super.configureBeforeRunTaskDefaults(providerID, task);\n    if (providerID == CompileStepBeforeRun.ID) {\n      task.setEnabled(false);\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/GoConsoleFilter.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig;\n\nimport com.goide.codeInsight.imports.GoGetPackageFix;\nimport com.goide.sdk.GoPackageUtil;\nimport com.goide.util.GoPathResolveScope;\nimport com.goide.util.GoUtil;\nimport com.intellij.execution.filters.Filter;\nimport com.intellij.execution.filters.HyperlinkInfo;\nimport com.intellij.execution.filters.OpenFileHyperlinkInfo;\nimport com.intellij.openapi.application.ApplicationManager;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.io.FileUtil;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.openapi.vfs.VfsUtilCore;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.openapi.vfs.VirtualFileManager;\nimport com.intellij.openapi.vfs.ex.temp.TempFileSystem;\nimport com.intellij.psi.search.FilenameIndex;\nimport com.intellij.psi.search.GlobalSearchScope;\nimport com.intellij.util.ObjectUtils;\nimport com.intellij.util.PathUtil;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.Collection;\nimport java.util.List;\nimport java.util.regex.Matcher;\nimport java.util.regex.Pattern;\n\npublic class GoConsoleFilter implements Filter {\n  private static final Pattern MESSAGE_PATTERN = Pattern.compile(\"(?:^|\\\\s)(\\\\S+\\\\.\\\\w+):(\\\\d+)(:(\\\\d+))?(?=[:\\\\s]|$).*\");\n  private static final Pattern GO_GET_MESSAGE_PATTERN = Pattern.compile(\"^[ \\t]*(go get (.*))\\n?$\");\n  private static final Pattern APP_ENGINE_PATH_PATTERN = Pattern.compile(\"/tmp[A-z0-9]+appengine-go-bin/\");\n  private static final Pattern GO_FILE_PATTERN = Pattern.compile(\"\\\\((\\\\w+\\\\.go)\\\\)\");\n\n  @NotNull private final Project myProject;\n  @Nullable private final Module myModule;\n  @Nullable private final String myWorkingDirectoryUrl;\n\n  @SuppressWarnings(\"unused\") //used by pico container\n  public GoConsoleFilter(@NotNull Project project) {\n    this(project, null, null);\n  }\n\n  public GoConsoleFilter(@NotNull Project project, @Nullable Module module, @Nullable String workingDirectoryUrl) {\n    myProject = project;\n    myModule = module;\n    myWorkingDirectoryUrl = ObjectUtils.chooseNotNull(workingDirectoryUrl, VfsUtilCore.pathToUrl(System.getProperty(\"user.dir\")));\n  }\n\n  @Override\n  public Result applyFilter(@NotNull String line, int entireLength) {\n    Matcher goGetMatcher = GO_GET_MESSAGE_PATTERN.matcher(line);\n    if (goGetMatcher.find() && myModule != null) {\n      String packageName = goGetMatcher.group(2).trim();\n      HyperlinkInfo hyperlinkInfo = new GoGetHyperlinkInfo(packageName, myModule);\n      int lineStart = entireLength - line.length();\n      return new Result(lineStart + goGetMatcher.start(1), lineStart + goGetMatcher.end(2), hyperlinkInfo);\n    }\n    Matcher matcher = MESSAGE_PATTERN.matcher(line);\n    if (!matcher.find()) {\n      Matcher fileMatcher = GO_FILE_PATTERN.matcher(line);\n      List<ResultItem> resultItems = ContainerUtil.newArrayList();\n      while (fileMatcher.find()) {\n        VirtualFile file = findSingleFile(fileMatcher.group(1));\n        if (file != null) {\n          resultItems.add(createResult(line, entireLength, fileMatcher.start(1), fileMatcher.end(1), 0, 0, file));\n        }\n      }\n      return !resultItems.isEmpty() ? new Result(resultItems) : null;\n    }\n\n    int startOffset = matcher.start(1);\n    int endOffset = matcher.end(2);\n\n    String fileName = matcher.group(1);\n    int lineNumber = StringUtil.parseInt(matcher.group(2), 1) - 1;\n    if (lineNumber < 0) {\n      return null;\n    }\n\n    int columnNumber = -1;\n    if (matcher.groupCount() > 3) {\n      columnNumber = StringUtil.parseInt(matcher.group(4), 1) - 1;\n      endOffset = Math.max(endOffset, matcher.end(4));\n    }\n\n    Matcher appEnginePathMatcher = APP_ENGINE_PATH_PATTERN.matcher(fileName);\n    if (appEnginePathMatcher.find()) {\n      fileName = fileName.substring(appEnginePathMatcher.end());\n    }\n\n    VirtualFile virtualFile = null;\n    if (FileUtil.isAbsolutePlatformIndependent(fileName)) {\n      virtualFile = ApplicationManager.getApplication().isUnitTestMode()\n                    ? TempFileSystem.getInstance().refreshAndFindFileByPath(fileName)\n                    : VirtualFileManager.getInstance().refreshAndFindFileByUrl(VfsUtilCore.pathToUrl(fileName));\n    }\n    else {\n      if (myWorkingDirectoryUrl != null) {\n        virtualFile = VirtualFileManager.getInstance().refreshAndFindFileByUrl(myWorkingDirectoryUrl + \"/\" + fileName);\n      }\n      if (virtualFile == null && myModule != null) {\n        virtualFile = findInGoPath(fileName);\n        if (virtualFile == null && fileName.startsWith(\"src/\")) {\n          virtualFile = findInGoPath(StringUtil.trimStart(fileName, \"src/\"));\n        }\n      }\n      if (virtualFile == null) {\n        VirtualFile baseDir = myProject.getBaseDir();\n        if (baseDir != null) {\n          virtualFile = baseDir.findFileByRelativePath(fileName);\n          if (virtualFile == null && fileName.startsWith(\"src/\")) {\n            // exclude src\n            virtualFile = baseDir.findFileByRelativePath(StringUtil.trimStart(fileName, \"src/\"));\n          }\n        }\n      }\n    }\n    if (virtualFile == null) {\n      virtualFile = findSingleFile(fileName);\n    }\n    if (virtualFile == null) {\n      return null;\n    }\n    return createResult(line, entireLength, startOffset, endOffset, lineNumber, columnNumber, virtualFile);\n  }\n\n  @NotNull\n  private Result createResult(@NotNull String line,\n                              int entireLength,\n                              int startOffset,\n                              int endOffset,\n                              int lineNumber,\n                              int columnNumber,\n                              @NotNull VirtualFile virtualFile) {\n    HyperlinkInfo hyperlinkInfo = new OpenFileHyperlinkInfo(myProject, virtualFile, lineNumber, columnNumber);\n    int lineStart = entireLength - line.length();\n    return new Result(lineStart + startOffset, lineStart + endOffset, hyperlinkInfo);\n  }\n\n  @Nullable\n  private VirtualFile findSingleFile(@NotNull String fileName) {\n    if (PathUtil.isValidFileName(fileName)) {\n      Collection<VirtualFile> files = FilenameIndex.getVirtualFilesByName(myProject, fileName, GlobalSearchScope.allScope(myProject));\n      if (files.size() == 1) {\n        return ContainerUtil.getFirstItem(files);\n      }\n      if (!files.isEmpty()) {\n        GlobalSearchScope goPathScope = GoPathResolveScope.create(myProject, myModule, null);\n        files = ContainerUtil.filter(files, goPathScope::accept);\n        if (files.size() == 1) {\n          return ContainerUtil.getFirstItem(files);\n        }\n      }\n      if (!files.isEmpty()) {\n        GlobalSearchScope smallerScope = GoUtil.moduleScopeWithoutLibraries(myProject, myModule);\n        files = ContainerUtil.filter(files, smallerScope::accept);\n        if (files.size() == 1) {\n          return ContainerUtil.getFirstItem(files);\n        }\n      }\n    }\n    return null;\n  }\n\n  @Nullable\n  private VirtualFile findInGoPath(@NotNull String fileName) {\n    return GoPackageUtil.findByImportPath(fileName, myProject, myModule);\n  }\n\n  public static class GoGetHyperlinkInfo implements HyperlinkInfo {\n    private final String myPackageName;\n    private final Module myModule;\n\n    public GoGetHyperlinkInfo(@NotNull String packageName, @NotNull Module module) {\n      myPackageName = packageName;\n      myModule = module;\n    }\n\n    @NotNull\n    public String getPackageName() {\n      return myPackageName;\n    }\n\n    @Override\n    public void navigate(Project project) {\n      GoGetPackageFix.applyFix(project, myModule, myPackageName, false);\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/GoModuleBasedConfiguration.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig;\n\nimport com.intellij.execution.configurations.RunConfigurationModule;\nimport com.intellij.openapi.project.Project;\n\npublic class GoModuleBasedConfiguration extends RunConfigurationModule {\n  public GoModuleBasedConfiguration(Project project) {\n    super(project);\n  }\n}"
  },
  {
    "path": "src/com/goide/runconfig/GoRunConfigurationBase.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig;\n\nimport com.goide.sdk.GoSdkService;\nimport com.goide.sdk.GoSdkUtil;\nimport com.intellij.execution.ExecutionBundle;\nimport com.intellij.execution.ExecutionException;\nimport com.intellij.execution.Executor;\nimport com.intellij.execution.configuration.EnvironmentVariablesComponent;\nimport com.intellij.execution.configurations.*;\nimport com.intellij.execution.runners.ExecutionEnvironment;\nimport com.intellij.execution.runners.RunConfigurationWithSuppressedDefaultRunAction;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.util.InvalidDataException;\nimport com.intellij.openapi.util.JDOMExternalizerUtil;\nimport com.intellij.openapi.util.WriteExternalException;\nimport com.intellij.openapi.util.io.FileUtil;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.openapi.vfs.VfsUtilCore;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.openapi.vfs.VirtualFileManager;\nimport com.intellij.util.PathUtil;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jdom.Element;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.Collection;\nimport java.util.Map;\n\npublic abstract class GoRunConfigurationBase<RunningState extends GoRunningState>\n  extends ModuleBasedConfiguration<GoModuleBasedConfiguration> implements RunConfigurationWithSuppressedDefaultRunAction,\n                                                                          RunConfigurationWithSuppressedDefaultDebugAction {\n\n  private static final String WORKING_DIRECTORY_NAME = \"working_directory\";\n  private static final String GO_PARAMETERS_NAME = \"go_parameters\";\n  private static final String PARAMETERS_NAME = \"parameters\";\n  private static final String PASS_PARENT_ENV = \"pass_parent_env\";\n\n  @NotNull private String myWorkingDirectory = \"\";\n  @NotNull private String myGoParams = \"\";\n  @NotNull private String myParams = \"\";\n  @NotNull private final Map<String, String> myCustomEnvironment = ContainerUtil.newHashMap();\n  private boolean myPassParentEnvironment = true;\n\n  public GoRunConfigurationBase(String name, GoModuleBasedConfiguration configurationModule, ConfigurationFactory factory) {\n    super(name, configurationModule, factory);\n\n    Module module = configurationModule.getModule();\n    if (module == null) {\n      Collection<Module> modules = getValidModules();\n      if (modules.size() == 1) {\n        module = ContainerUtil.getFirstItem(modules);\n        getConfigurationModule().setModule(module);\n      }\n    }\n\n    if (module != null) {\n      if (FileUtil.exists(module.getModuleFilePath())) {\n        myWorkingDirectory = StringUtil.trimEnd(PathUtil.getParentPath(module.getModuleFilePath()), \".idea\");\n      }\n    }\n    else {\n      myWorkingDirectory = StringUtil.notNullize(configurationModule.getProject().getBasePath());\n    }\n  }\n\n  @Nullable\n  @Override\n  public RunProfileState getState(@NotNull Executor executor, @NotNull ExecutionEnvironment environment) throws ExecutionException {\n    return createRunningState(environment);\n  }\n\n  @NotNull\n  @Override\n  public Collection<Module> getValidModules() {\n    return GoSdkUtil.getGoModules(getProject());\n  }\n\n  @Override\n  public void checkConfiguration() throws RuntimeConfigurationException {\n    GoModuleBasedConfiguration configurationModule = getConfigurationModule();\n    Module module = configurationModule.getModule();\n    if (module != null) {\n      if (GoSdkService.getInstance(module.getProject()).getSdkHomePath(module) == null) {\n        throw new RuntimeConfigurationWarning(\"Go SDK is not specified for module '\" + module.getName() + \"'\");\n      }\n    }\n    else {\n      String moduleName = configurationModule.getModuleName();\n      if (moduleName != null) {\n        throw new RuntimeConfigurationError(ExecutionBundle.message(\"module.doesn.t.exist.in.project.error.text\", moduleName));\n      }\n      throw new RuntimeConfigurationError(ExecutionBundle.message(\"module.not.specified.error.text\"));\n    }\n    if (myWorkingDirectory.isEmpty()) {\n      throw new RuntimeConfigurationError(\"Working directory is not specified\");\n    }\n  }\n\n  @Override\n  public void writeExternal(Element element) throws WriteExternalException {\n    super.writeExternal(element);\n    writeModule(element);\n    addNonEmptyElement(element, WORKING_DIRECTORY_NAME, myWorkingDirectory);\n    addNonEmptyElement(element, GO_PARAMETERS_NAME, myGoParams);\n    addNonEmptyElement(element, PARAMETERS_NAME, myParams);\n    if (!myCustomEnvironment.isEmpty()) {\n      EnvironmentVariablesComponent.writeExternal(element, myCustomEnvironment);\n    }\n    if (!myPassParentEnvironment) {\n      JDOMExternalizerUtil.addElementWithValueAttribute(element, PASS_PARENT_ENV, \"false\");\n    }\n  }\n\n  protected void addNonEmptyElement(@NotNull Element element, @NotNull String attributeName, @Nullable String value) {\n    if (StringUtil.isNotEmpty(value)) {\n      JDOMExternalizerUtil.addElementWithValueAttribute(element, attributeName, value);\n    }\n  }\n\n  @Override\n  public void readExternal(@NotNull Element element) throws InvalidDataException {\n    super.readExternal(element);\n    readModule(element);\n    myGoParams = StringUtil.notNullize(JDOMExternalizerUtil.getFirstChildValueAttribute(element, GO_PARAMETERS_NAME));\n    myParams = StringUtil.notNullize(JDOMExternalizerUtil.getFirstChildValueAttribute(element, PARAMETERS_NAME));\n\n    String workingDirectoryValue = JDOMExternalizerUtil.getFirstChildValueAttribute(element, WORKING_DIRECTORY_NAME);\n    if (workingDirectoryValue != null) {\n      myWorkingDirectory = workingDirectoryValue;\n    }\n    EnvironmentVariablesComponent.readExternal(element, myCustomEnvironment);\n\n    String passEnvValue = JDOMExternalizerUtil.getFirstChildValueAttribute(element, PASS_PARENT_ENV);\n    myPassParentEnvironment = passEnvValue == null || Boolean.valueOf(passEnvValue);\n  }\n\n  @NotNull\n  private RunningState createRunningState(ExecutionEnvironment env) throws ExecutionException {\n    GoModuleBasedConfiguration configuration = getConfigurationModule();\n    Module module = configuration.getModule();\n    if (module == null) {\n      throw new ExecutionException(\"Go isn't configured for run configuration: \" + getName());\n    }\n    return newRunningState(env, module);\n  }\n  \n  @Nullable\n  protected VirtualFile findFile(@NotNull String filePath) {\n    VirtualFile virtualFile = VirtualFileManager.getInstance().findFileByUrl(VfsUtilCore.pathToUrl(filePath));\n    if (virtualFile == null) {\n      String path = FileUtil.join(getWorkingDirectory(), filePath);\n      virtualFile = VirtualFileManager.getInstance().findFileByUrl(VfsUtilCore.pathToUrl(path));\n    }\n    return virtualFile;\n  }\n\n  @NotNull\n  protected abstract RunningState newRunningState(ExecutionEnvironment env, Module module);\n\n  @NotNull\n  public String getGoToolParams() {\n    return myGoParams;\n  }\n\n  @NotNull\n  public String getParams() {\n    return myParams;\n  }\n\n  public void setGoParams(@NotNull String params) {\n    myGoParams = params;\n  }\n\n  public void setParams(@NotNull String params) {\n    myParams = params;\n  }\n\n  @NotNull\n  public Map<String, String> getCustomEnvironment() {\n    return myCustomEnvironment;\n  }\n\n  public void setCustomEnvironment(@NotNull Map<String, String> customEnvironment) {\n    myCustomEnvironment.clear();\n    myCustomEnvironment.putAll(customEnvironment);\n  }\n\n  public void setPassParentEnvironment(boolean passParentEnvironment) {\n    myPassParentEnvironment = passParentEnvironment;\n  }\n\n  public boolean isPassParentEnvironment() {\n    return myPassParentEnvironment;\n  }\n\n  @NotNull\n  public String getWorkingDirectory() {\n    return myWorkingDirectory;\n  }\n\n  @NotNull\n  public String getWorkingDirectoryUrl() {\n    return VfsUtilCore.pathToUrl(myWorkingDirectory);\n  }\n\n  public void setWorkingDirectory(@NotNull String workingDirectory) {\n    myWorkingDirectory = workingDirectory;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/GoRunConfigurationProducerBase.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig;\n\nimport com.goide.psi.GoFile;\nimport com.intellij.execution.actions.ConfigurationContext;\nimport com.intellij.execution.actions.RunConfigurationProducer;\nimport com.intellij.execution.configurations.ConfigurationType;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.util.Ref;\nimport com.intellij.openapi.util.io.FileUtil;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic abstract class GoRunConfigurationProducerBase<T extends GoRunConfigurationWithMain> extends RunConfigurationProducer<T> implements Cloneable {\n  protected GoRunConfigurationProducerBase(@NotNull ConfigurationType configurationType) {\n    super(configurationType);\n  }\n\n  @Override\n  protected boolean setupConfigurationFromContext(@NotNull T configuration, @NotNull ConfigurationContext context, Ref<PsiElement> sourceElement) {\n    PsiFile file = getFileFromContext(context);\n    if (GoRunUtil.isMainGoFile(file)) {\n      configuration.setName(getConfigurationName(file));\n      configuration.setFilePath(file.getVirtualFile().getPath());\n      Module module = context.getModule();\n      if (module != null) {\n        configuration.setModule(module);\n      }\n      return true;\n    }\n    return false;\n  }\n\n  @NotNull\n  protected abstract String getConfigurationName(@NotNull PsiFile file);\n\n  @Override\n  public boolean isConfigurationFromContext(@NotNull T configuration, ConfigurationContext context) {\n    GoFile file = getFileFromContext(context);\n    return file != null && FileUtil.pathsEqual(configuration.getFilePath(), file.getVirtualFile().getPath());\n  }\n\n  @Nullable\n  private static GoFile getFileFromContext(@Nullable ConfigurationContext context) {\n    PsiElement contextElement = GoRunUtil.getContextElement(context);\n    PsiFile psiFile = contextElement != null ? contextElement.getContainingFile() : null;\n    return psiFile instanceof GoFile ? (GoFile)psiFile : null;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/GoRunConfigurationWithMain.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig;\n\nimport com.goide.psi.GoFile;\nimport com.intellij.execution.configurations.ConfigurationFactory;\nimport com.intellij.execution.configurations.RuntimeConfigurationError;\nimport com.intellij.execution.configurations.RuntimeConfigurationException;\nimport com.intellij.openapi.util.InvalidDataException;\nimport com.intellij.openapi.util.JDOMExternalizerUtil;\nimport com.intellij.openapi.util.WriteExternalException;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.PsiManager;\nimport org.jdom.Element;\nimport org.jetbrains.annotations.NotNull;\n\npublic abstract class GoRunConfigurationWithMain<T extends GoRunningState> extends GoRunConfigurationBase<T> {\n  private static final String FILE_PATH_ATTRIBUTE_NAME = \"filePath\";\n\n  @NotNull private String myFilePath = \"\";\n\n  public GoRunConfigurationWithMain(String name, GoModuleBasedConfiguration configurationModule, ConfigurationFactory factory) {\n    super(name, configurationModule, factory);\n    myFilePath = getWorkingDirectory();\n  }\n\n  @Override\n  public void readExternal(@NotNull Element element) throws InvalidDataException {\n    super.readExternal(element);\n    myFilePath = StringUtil.notNullize(JDOMExternalizerUtil.getFirstChildValueAttribute(element, FILE_PATH_ATTRIBUTE_NAME));\n  }\n\n  @Override\n  public void writeExternal(Element element) throws WriteExternalException {\n    super.writeExternal(element);\n    addNonEmptyElement(element, FILE_PATH_ATTRIBUTE_NAME, myFilePath);\n  }\n\n  protected void checkFileConfiguration() throws RuntimeConfigurationError {\n    VirtualFile file = findFile(getFilePath());\n    if (file == null) {\n      throw new RuntimeConfigurationError(\"Main file is not specified\");\n    }\n    PsiFile psiFile = PsiManager.getInstance(getProject()).findFile(file);\n    if (!(psiFile instanceof GoFile)) {\n      throw new RuntimeConfigurationError(\"Main file is invalid\");\n    }\n    if (!GoRunUtil.isMainGoFile(psiFile)) {\n      throw new RuntimeConfigurationError(\"Main file has non-main package or doesn't contain main function\");\n    }\n  }\n\n  protected void checkBaseConfiguration() throws RuntimeConfigurationException {\n    super.checkConfiguration();\n  }\n\n  @NotNull\n  public String getFilePath() {\n    return myFilePath;\n  }\n\n  public void setFilePath(@NotNull String filePath) {\n    myFilePath = filePath;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/GoRunLineMarkerProvider.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig;\n\nimport com.goide.GoConstants;\nimport com.goide.GoTypes;\nimport com.goide.psi.GoFunctionDeclaration;\nimport com.intellij.execution.lineMarker.ExecutorAction;\nimport com.intellij.execution.lineMarker.RunLineMarkerContributor;\nimport com.intellij.icons.AllIcons;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.util.Function;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoRunLineMarkerProvider extends RunLineMarkerContributor {\n  private static final Function<PsiElement, String> TOOLTIP_PROVIDER = element -> \"Run Application\";\n\n  @Nullable\n  @Override\n  public Info getInfo(PsiElement e) {\n    if (e != null && e.getNode().getElementType() == GoTypes.IDENTIFIER) {\n      PsiElement parent = e.getParent();\n      PsiFile file = e.getContainingFile();\n      if (GoRunUtil.isMainGoFile(file) && parent instanceof GoFunctionDeclaration) {\n        if (GoConstants.MAIN.equals(((GoFunctionDeclaration)parent).getName())) {\n          return new Info(AllIcons.RunConfigurations.TestState.Run, TOOLTIP_PROVIDER, ExecutorAction.getActions(0));\n        }\n      }\n    }\n    return null;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/GoRunUtil.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig;\n\nimport com.goide.GoConstants;\nimport com.goide.GoFileType;\nimport com.goide.psi.GoFile;\nimport com.goide.psi.GoPackageClause;\nimport com.goide.runconfig.testing.GoTestFinder;\nimport com.intellij.execution.actions.ConfigurationContext;\nimport com.intellij.execution.configurations.GeneralCommandLine;\nimport com.intellij.execution.process.ProcessHandler;\nimport com.intellij.execution.process.ProcessOutputTypes;\nimport com.intellij.ide.scratch.ScratchFileType;\nimport com.intellij.openapi.fileChooser.FileChooserDescriptor;\nimport com.intellij.openapi.fileChooser.FileChooserDescriptorFactory;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.roots.FileIndexFacade;\nimport com.intellij.openapi.ui.ComponentWithBrowseButton;\nimport com.intellij.openapi.ui.TextBrowseFolderListener;\nimport com.intellij.openapi.ui.TextComponentAccessor;\nimport com.intellij.openapi.ui.TextFieldWithBrowseButton;\nimport com.intellij.openapi.util.Condition;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.PsiFileSystemItem;\nimport com.intellij.psi.PsiManager;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport org.jetbrains.annotations.Contract;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.Map;\n\npublic class GoRunUtil {\n  private GoRunUtil() {\n  }\n\n  @Contract(\"null -> false\")\n  public static boolean isPackageContext(@Nullable PsiElement contextElement) {\n    return PsiTreeUtil.getNonStrictParentOfType(contextElement, GoPackageClause.class) != null;\n  }\n\n  @Nullable\n  public static PsiFile findMainFileInDirectory(@NotNull VirtualFile packageDirectory, @NotNull Project project) {\n    for (VirtualFile file : packageDirectory.getChildren()) {\n      if (file == null) {\n        continue;\n      }\n      PsiFile psiFile = PsiManager.getInstance(project).findFile(file);\n      if (isMainGoFile(psiFile)) {\n        return psiFile;\n      }\n    }\n    return null;\n  }\n\n  @Nullable\n  public static PsiElement getContextElement(@Nullable ConfigurationContext context) {\n    if (context == null) {\n      return null;\n    }\n    PsiElement psiElement = context.getPsiLocation();\n    if (psiElement == null || !psiElement.isValid()) {\n      return null;\n    }\n\n    FileIndexFacade indexFacade = FileIndexFacade.getInstance(psiElement.getProject());\n    PsiFileSystemItem psiFile = psiElement instanceof PsiFileSystemItem ? (PsiFileSystemItem)psiElement : psiElement.getContainingFile();\n    VirtualFile file = psiFile != null ? psiFile.getVirtualFile() : null;\n    if (file != null && file.getFileType() != ScratchFileType.INSTANCE && \n        (!indexFacade.isInContent(file) || indexFacade.isExcludedFile(file))) {\n      return null;\n    }\n\n    return psiElement;\n  }\n\n  public static void installGoWithMainFileChooser(Project project, @NotNull TextFieldWithBrowseButton fileField) {\n    installFileChooser(project, fileField, false, false, file -> {\n      if (file.getFileType() != GoFileType.INSTANCE) {\n        return false;\n      }\n      return isMainGoFile(PsiManager.getInstance(project).findFile(file));\n    });\n  }\n\n  @Contract(\"null -> false\")\n  public static boolean isMainGoFile(@Nullable PsiFile psiFile) {\n    if (!GoTestFinder.isTestFile(psiFile) && psiFile instanceof GoFile) {\n      return GoConstants.MAIN.equals(((GoFile)psiFile).getPackageName()) && ((GoFile)psiFile).hasMainFunction();\n    }\n    return false;\n  }\n\n  public static void installFileChooser(@NotNull Project project,\n                                        @NotNull ComponentWithBrowseButton field,\n                                        boolean directory) {\n    installFileChooser(project, field, directory, false);\n  }\n\n  public static void installFileChooser(@NotNull Project project, @NotNull ComponentWithBrowseButton field, boolean directory,\n                                        boolean showFileSystemRoots) {\n    installFileChooser(project, field, directory, showFileSystemRoots, null);\n  }\n\n  public static void installFileChooser(@NotNull Project project,\n                                        @NotNull ComponentWithBrowseButton field,\n                                        boolean directory,\n                                        boolean showFileSystemRoots,\n                                        @Nullable Condition<VirtualFile> fileFilter) {\n    FileChooserDescriptor chooseDirectoryDescriptor = directory\n                                                      ? FileChooserDescriptorFactory.createSingleFolderDescriptor()\n                                                      : FileChooserDescriptorFactory.createSingleLocalFileDescriptor();\n    chooseDirectoryDescriptor.setRoots(project.getBaseDir());\n    chooseDirectoryDescriptor.setShowFileSystemRoots(showFileSystemRoots);\n    chooseDirectoryDescriptor.withFileFilter(fileFilter);\n    if (field instanceof TextFieldWithBrowseButton) {\n      ((TextFieldWithBrowseButton)field).addBrowseFolderListener(new TextBrowseFolderListener(chooseDirectoryDescriptor, project));\n    }\n    else {\n      //noinspection unchecked\n      field.addBrowseFolderListener(project, new ComponentWithBrowseButton.BrowseFolderActionListener(null, null, field, project,\n                                                                                                      chooseDirectoryDescriptor,\n                                                                                                      TextComponentAccessor.TEXT_FIELD_WITH_HISTORY_WHOLE_TEXT));\n    }\n  }\n\n  public static void printGoEnvVariables(@NotNull GeneralCommandLine commandLine, @NotNull ProcessHandler handler) {\n    Map<String, String> environment = commandLine.getEnvironment();\n    handler.notifyTextAvailable(\"GOROOT=\" + StringUtil.nullize(environment.get(GoConstants.GO_ROOT)) + '\\n', ProcessOutputTypes.SYSTEM);\n    handler.notifyTextAvailable(\"GOPATH=\" + StringUtil.nullize(environment.get(GoConstants.GO_PATH)) + '\\n', ProcessOutputTypes.SYSTEM);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/GoRunner.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig;\n\nimport com.intellij.execution.configurations.RunProfile;\nimport com.intellij.execution.executors.DefaultRunExecutor;\nimport com.intellij.execution.runners.DefaultProgramRunner;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoRunner extends DefaultProgramRunner {\n  private static final String ID = \"GoRunner\";\n\n  @NotNull\n  @Override\n  public String getRunnerId() {\n    return ID;\n  }\n\n  @Override\n  public boolean canRun(@NotNull String executorId, @NotNull RunProfile profile) {\n    return DefaultRunExecutor.EXECUTOR_ID.equals(executorId) && profile instanceof GoRunConfigurationBase;\n  }\n}"
  },
  {
    "path": "src/com/goide/runconfig/GoRunningState.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig;\n\nimport com.goide.util.GoExecutor;\nimport com.intellij.execution.ExecutionException;\nimport com.intellij.execution.configurations.CommandLineState;\nimport com.intellij.execution.configurations.GeneralCommandLine;\nimport com.intellij.execution.process.KillableColoredProcessHandler;\nimport com.intellij.execution.process.ProcessHandler;\nimport com.intellij.execution.process.ProcessTerminatedListener;\nimport com.intellij.execution.runners.ExecutionEnvironment;\nimport com.intellij.openapi.module.Module;\nimport org.jetbrains.annotations.NotNull;\n\npublic abstract class GoRunningState<T extends GoRunConfigurationBase<?>> extends CommandLineState {\n  @NotNull protected final Module myModule;\n\n  @NotNull\n  public T getConfiguration() {\n    return myConfiguration;\n  }\n\n  @NotNull protected final T myConfiguration;\n\n  public GoRunningState(@NotNull ExecutionEnvironment env, @NotNull Module module, @NotNull T configuration) {\n    super(env);\n    myModule = module;\n    myConfiguration = configuration;\n    addConsoleFilters(new GoConsoleFilter(myConfiguration.getProject(), myModule, myConfiguration.getWorkingDirectoryUrl()));\n  }\n\n  @NotNull\n  @Override\n  protected ProcessHandler startProcess() throws ExecutionException {\n    GoExecutor executor = patchExecutor(createCommonExecutor());\n    GeneralCommandLine commandLine = executor.withParameterString(myConfiguration.getParams()).createCommandLine();\n    KillableColoredProcessHandler handler = new KillableColoredProcessHandler(commandLine, true);\n    ProcessTerminatedListener.attach(handler);\n    return handler;\n  }\n\n  @NotNull\n  public GoExecutor createCommonExecutor() {\n    return GoExecutor.in(myModule).withWorkDirectory(myConfiguration.getWorkingDirectory())\n      .withExtraEnvironment(myConfiguration.getCustomEnvironment())\n      .withPassParentEnvironment(myConfiguration.isPassParentEnvironment());\n  }\n\n  protected GoExecutor patchExecutor(@NotNull GoExecutor executor) throws ExecutionException {\n    return executor;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/application/GoApplicationConfiguration.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.application;\n\nimport com.goide.runconfig.GoModuleBasedConfiguration;\nimport com.goide.runconfig.GoRunConfigurationWithMain;\nimport com.goide.runconfig.GoRunUtil;\nimport com.goide.runconfig.ui.GoApplicationConfigurationEditorForm;\nimport com.goide.sdk.GoPackageUtil;\nimport com.intellij.execution.configurations.*;\nimport com.intellij.execution.runners.ExecutionEnvironment;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.options.SettingsEditor;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.InvalidDataException;\nimport com.intellij.openapi.util.JDOMExternalizerUtil;\nimport com.intellij.openapi.util.WriteExternalException;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport org.jdom.Element;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoApplicationConfiguration extends GoRunConfigurationWithMain<GoApplicationRunningState> {\n  private static final String PACKAGE_ATTRIBUTE_NAME = \"package\";\n  private static final String KIND_ATTRIBUTE_NAME = \"kind\";\n\n  @NotNull private String myPackage = \"\";\n\n  @NotNull private Kind myKind = Kind.FILE;\n\n  public GoApplicationConfiguration(Project project, String name, @NotNull ConfigurationType configurationType) {\n    super(name, new GoModuleBasedConfiguration(project), configurationType.getConfigurationFactories()[0]);\n  }\n\n  @Override\n  public void readExternal(@NotNull Element element) throws InvalidDataException {\n    super.readExternal(element);\n    myPackage = StringUtil.notNullize(JDOMExternalizerUtil.getFirstChildValueAttribute(element, PACKAGE_ATTRIBUTE_NAME));\n    try {\n      String kindName = JDOMExternalizerUtil.getFirstChildValueAttribute(element, KIND_ATTRIBUTE_NAME);\n      myKind = kindName != null ? Kind.valueOf(kindName) : Kind.PACKAGE;\n    }\n    catch (IllegalArgumentException e) {\n      myKind = !myPackage.isEmpty() ? Kind.PACKAGE : Kind.FILE;\n    }\n  }\n\n  @Override\n  public void writeExternal(Element element) throws WriteExternalException {\n    super.writeExternal(element);\n    JDOMExternalizerUtil.addElementWithValueAttribute(element, KIND_ATTRIBUTE_NAME, myKind.name());\n    if (!myPackage.isEmpty()) {\n      JDOMExternalizerUtil.addElementWithValueAttribute(element, PACKAGE_ATTRIBUTE_NAME, myPackage);\n    }\n  }\n\n  @NotNull\n  @Override\n  protected ModuleBasedConfiguration createInstance() {\n    return new GoApplicationConfiguration(getProject(), getName(), GoApplicationRunConfigurationType.getInstance());\n  }\n\n  @NotNull\n  @Override\n  public SettingsEditor<? extends RunConfiguration> getConfigurationEditor() {\n    return new GoApplicationConfigurationEditorForm(getProject());\n  }\n\n  @NotNull\n  @Override\n  protected GoApplicationRunningState newRunningState(@NotNull ExecutionEnvironment env, @NotNull Module module) {\n    return new GoApplicationRunningState(env, module, this);\n  }\n\n  @Override\n  public void checkConfiguration() throws RuntimeConfigurationException {\n    checkBaseConfiguration();\n    switch (myKind) {\n      case PACKAGE:\n        Module module = getConfigurationModule().getModule();\n        assert module != null;\n\n        if (StringUtil.isEmptyOrSpaces(myPackage)) {\n          throw new RuntimeConfigurationError(\"Package is not specified\");\n        }\n        VirtualFile packageDirectory = GoPackageUtil.findByImportPath(myPackage, module.getProject(), module);\n        if (packageDirectory == null || !packageDirectory.isDirectory()) {\n          throw new RuntimeConfigurationError(\"Cannot find package '\" + myPackage + \"'\");\n        }\n        if (GoRunUtil.findMainFileInDirectory(packageDirectory, getProject()) == null) {\n          throw new RuntimeConfigurationError(\"Cannot find Go file with main in '\" + myPackage + \"'\");\n        }\n        break;\n      case FILE:\n        checkFileConfiguration();\n        break;\n    }\n  }\n\n  @NotNull\n  public String getPackage() {\n    return myPackage;\n  }\n\n  public void setPackage(@NotNull String aPackage) {\n    myPackage = aPackage;\n  }\n\n  @NotNull\n  public Kind getKind() {\n    return myKind;\n  }\n\n  public void setKind(@NotNull Kind aKind) {\n    myKind = aKind;\n  }\n\n  public enum Kind {\n    PACKAGE, FILE\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/application/GoApplicationRunConfigurationProducer.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.application;\n\nimport com.goide.psi.GoFile;\nimport com.goide.runconfig.GoRunConfigurationProducerBase;\nimport com.goide.runconfig.GoRunUtil;\nimport com.goide.runconfig.testing.GoTestFinder;\nimport com.goide.sdk.GoSdkUtil;\nimport com.intellij.execution.actions.ConfigurationContext;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.module.ModuleUtilCore;\nimport com.intellij.openapi.util.Comparing;\nimport com.intellij.openapi.util.Ref;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.psi.PsiDirectory;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoApplicationRunConfigurationProducer extends GoRunConfigurationProducerBase<GoApplicationConfiguration> implements Cloneable {\n  public GoApplicationRunConfigurationProducer() {\n    super(GoApplicationRunConfigurationType.getInstance());\n  }\n\n  @Override\n  protected boolean setupConfigurationFromContext(@NotNull GoApplicationConfiguration configuration,\n                                                  @NotNull ConfigurationContext context,\n                                                  Ref<PsiElement> sourceElement) {\n    PsiElement contextElement = GoRunUtil.getContextElement(context);\n    if (contextElement != null && GoTestFinder.isTestFile(contextElement.getContainingFile())) {\n      return false;\n    }\n    String importPath = getImportPathFromContext(contextElement);\n    if (StringUtil.isNotEmpty(importPath)) {\n      configuration.setModule(context.getModule());\n      configuration.setKind(GoApplicationConfiguration.Kind.PACKAGE);\n      configuration.setPackage(importPath);\n      configuration.setName(\"Build \" + importPath + \" and run\");\n      return true;\n    }\n    if (super.setupConfigurationFromContext(configuration, context, sourceElement)) {\n      configuration.setKind(GoApplicationConfiguration.Kind.FILE);\n      return true;\n    }\n    return false;\n  }\n\n  @Nullable\n  private static String getImportPathFromContext(@Nullable PsiElement contextElement) {\n    if (GoRunUtil.isPackageContext(contextElement)) {\n      PsiFile file = contextElement.getContainingFile();\n      if (file instanceof GoFile) {\n        return ((GoFile)file).getImportPath(false);\n      }\n    }\n    else if (contextElement instanceof PsiDirectory) {\n      return GoSdkUtil.getImportPath((PsiDirectory)contextElement, false);\n    }\n    return null;\n  }\n\n  @Override\n  public boolean isConfigurationFromContext(@NotNull GoApplicationConfiguration configuration, ConfigurationContext context) {\n    PsiElement contextElement = GoRunUtil.getContextElement(context);\n    if (contextElement == null) return false;\n\n    Module module = ModuleUtilCore.findModuleForPsiElement(contextElement);\n    if (!Comparing.equal(module, configuration.getConfigurationModule().getModule())) return false;\n\n    if (configuration.getKind() == GoApplicationConfiguration.Kind.PACKAGE) {\n      return Comparing.equal(getImportPathFromContext(contextElement), configuration.getPackage());\n    }\n\n    return super.isConfigurationFromContext(configuration, context);\n  }\n\n  @NotNull\n  @Override\n  protected String getConfigurationName(@NotNull PsiFile file) {\n    return \"Build \" + file.getName() + \" and run\";\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/application/GoApplicationRunConfigurationType.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.application;\n\nimport com.goide.GoConstants;\nimport com.goide.GoIcons;\nimport com.goide.runconfig.GoConfigurationFactoryBase;\nimport com.intellij.execution.configurations.ConfigurationTypeBase;\nimport com.intellij.execution.configurations.RunConfiguration;\nimport com.intellij.openapi.extensions.Extensions;\nimport com.intellij.openapi.project.Project;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoApplicationRunConfigurationType extends ConfigurationTypeBase {\n  public GoApplicationRunConfigurationType() {\n    super(\"GoApplicationRunConfiguration\", \"Go Application\", \"Go application run configuration\", GoIcons.APPLICATION_RUN);\n    addFactory(new GoConfigurationFactoryBase(this) {\n      @Override\n      @NotNull\n      public RunConfiguration createTemplateConfiguration(@NotNull Project project) {\n        return new GoApplicationConfiguration(project, GoConstants.GO, getInstance());\n      }\n    });\n  }\n\n  @NotNull\n  public static GoApplicationRunConfigurationType getInstance() {\n    return Extensions.findExtension(CONFIGURATION_TYPE_EP, GoApplicationRunConfigurationType.class);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/application/GoApplicationRunningState.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.application;\n\nimport com.goide.GoConstants;\nimport com.goide.runconfig.GoRunningState;\nimport com.goide.util.GoExecutor;\nimport com.goide.util.GoHistoryProcessListener;\nimport com.goide.util.GoUtil;\nimport com.intellij.execution.ExecutionException;\nimport com.intellij.execution.executors.DefaultDebugExecutor;\nimport com.intellij.execution.process.ProcessAdapter;\nimport com.intellij.execution.process.ProcessEvent;\nimport com.intellij.execution.process.ProcessHandler;\nimport com.intellij.execution.runners.ExecutionEnvironment;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.util.SystemInfo;\nimport com.intellij.openapi.util.text.StringUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.io.File;\n\npublic class GoApplicationRunningState extends GoRunningState<GoApplicationConfiguration> {\n  private String myOutputFilePath;\n  @Nullable private GoHistoryProcessListener myHistoryProcessHandler;\n  private int myDebugPort = 59090;\n  private boolean myCompilationFailed;\n\n  public GoApplicationRunningState(@NotNull ExecutionEnvironment env, @NotNull Module module,\n                                   @NotNull GoApplicationConfiguration configuration) {\n    super(env, module, configuration);\n  }\n\n  @NotNull\n  public String getTarget() {\n    return myConfiguration.getKind() == GoApplicationConfiguration.Kind.PACKAGE\n           ? myConfiguration.getPackage()\n           : myConfiguration.getFilePath();\n  }\n\n  @NotNull\n  public String getGoBuildParams() {\n    return myConfiguration.getGoToolParams();\n  }\n\n  public boolean isDebug() {\n    return DefaultDebugExecutor.EXECUTOR_ID.equals(getEnvironment().getExecutor().getId());\n  }\n\n  @NotNull\n  @Override\n  protected ProcessHandler startProcess() throws ExecutionException {\n    ProcessHandler processHandler = myCompilationFailed ? new GoNopProcessHandler() : super.startProcess();\n    processHandler.addProcessListener(new ProcessAdapter() {\n      @Override\n      public void startNotified(ProcessEvent event) {\n        if (myHistoryProcessHandler != null) {\n          myHistoryProcessHandler.apply(processHandler);\n        }\n      }\n\n      @Override\n      public void processTerminated(ProcessEvent event) {\n        super.processTerminated(event);\n        if (StringUtil.isEmpty(myConfiguration.getOutputFilePath())) {\n          File file = new File(myOutputFilePath);\n          if (file.exists()) {\n            //noinspection ResultOfMethodCallIgnored\n            file.delete();\n          }\n        }\n      }\n    });\n    return processHandler;\n  }\n\n  @Override\n  protected GoExecutor patchExecutor(@NotNull GoExecutor executor) throws ExecutionException {\n    if (isDebug()) {\n      File dlv = dlv();\n      if (dlv.exists() && !dlv.canExecute()) {\n        //noinspection ResultOfMethodCallIgnored\n        dlv.setExecutable(true, false);\n      }\n      return executor.withExePath(dlv.getAbsolutePath())\n        .withParameters(\"--listen=localhost:\" + myDebugPort, \"--headless=true\", \"exec\", myOutputFilePath, \"--\");\n    }\n    return executor.showGoEnvVariables(false).withExePath(myOutputFilePath);\n  }\n\n  @NotNull\n  private static File dlv() {\n    String dlvPath = System.getProperty(\"dlv.path\");\n    if (StringUtil.isNotEmpty(dlvPath)) return new File(dlvPath);\n    return new File(GoUtil.getPlugin().getPath(),\n                    \"lib/dlv/\" + (SystemInfo.isMac ? \"mac\" : SystemInfo.isWindows ? \"windows\" : \"linux\") + \"/\"\n                    + GoConstants.DELVE_EXECUTABLE_NAME + (SystemInfo.isWindows ? \".exe\" : \"\"));\n  }\n\n  public void setOutputFilePath(@NotNull String outputFilePath) {\n    myOutputFilePath = outputFilePath;\n  }\n\n  public void setHistoryProcessHandler(@Nullable GoHistoryProcessListener historyProcessHandler) {\n    myHistoryProcessHandler = historyProcessHandler;\n  }\n\n  public void setDebugPort(int debugPort) {\n    myDebugPort = debugPort;\n  }\n\n  public void setCompilationFailed(boolean compilationFailed) {\n    myCompilationFailed = compilationFailed;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/application/GoNopProcessHandler.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.application;\n\nimport com.intellij.execution.process.ProcessHandler;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.io.OutputStream;\n\n// todo[zolotov]: replace with built-in implementation in 2017.1\npublic class GoNopProcessHandler extends ProcessHandler {\n  public GoNopProcessHandler() {\n    destroyProcess();\n  }\n\n  @Override\n  protected void destroyProcessImpl() {\n    notifyProcessTerminated(0);\n  }\n\n  @Override\n  protected void detachProcessImpl() {\n    notifyProcessDetached();\n  }\n\n  @Override\n  public boolean detachIsDefault() {\n    return false;\n  }\n\n  @Nullable\n  @Override\n  public OutputStream getProcessInput() {\n    return null;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/before/GoBeforeRunTaskProvider.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.before;\n\nimport com.goide.GoIcons;\nimport com.goide.runconfig.GoRunConfigurationBase;\nimport com.goide.sdk.GoSdkService;\nimport com.goide.util.GoExecutor;\nimport com.intellij.execution.BeforeRunTaskProvider;\nimport com.intellij.execution.configurations.RunConfiguration;\nimport com.intellij.execution.process.ProcessAdapter;\nimport com.intellij.execution.process.ProcessEvent;\nimport com.intellij.execution.runners.ExecutionEnvironment;\nimport com.intellij.openapi.actionSystem.DataContext;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.ui.Messages;\nimport com.intellij.openapi.util.Key;\nimport com.intellij.openapi.util.Ref;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.openapi.vfs.VirtualFileManager;\nimport com.intellij.util.concurrency.Semaphore;\nimport com.intellij.util.ui.UIUtil;\nimport org.jetbrains.annotations.Nullable;\n\nimport javax.swing.*;\n\npublic class GoBeforeRunTaskProvider extends BeforeRunTaskProvider<GoCommandBeforeRunTask> {\n  public static final Key<GoCommandBeforeRunTask> ID = Key.create(\"GoBeforeRunTask\");\n\n  @Override\n  public Key<GoCommandBeforeRunTask> getId() {\n    return ID;\n  }\n\n  @Override\n  public String getName() {\n    return \"Go Command\";\n  }\n\n  @Override\n  public String getDescription(GoCommandBeforeRunTask task) {\n    return \"Run `\" + task + \"`\";\n  }\n\n  @Nullable\n  @Override\n  public Icon getIcon() {\n    return GoIcons.APPLICATION_RUN;\n  }\n\n  @Override\n  public boolean isConfigurable() {\n    return true;\n  }\n\n  @Nullable\n  @Override\n  public Icon getTaskIcon(GoCommandBeforeRunTask task) {\n    return getIcon();\n  }\n\n  @Nullable\n  @Override\n  public GoCommandBeforeRunTask createTask(RunConfiguration runConfiguration) {\n    return runConfiguration instanceof GoRunConfigurationBase ? new GoCommandBeforeRunTask() : null;\n  }\n\n  @Override\n  public boolean configureTask(RunConfiguration configuration, GoCommandBeforeRunTask task) {\n    Project project = configuration.getProject();\n    if (!(configuration instanceof GoRunConfigurationBase)) {\n      showAddingTaskErrorMessage(project, \"Go Command task supports only Go Run Configurations\");\n      return false;\n    }\n\n    Module module = ((GoRunConfigurationBase)configuration).getConfigurationModule().getModule();\n    if (!GoSdkService.getInstance(project).isGoModule(module)) {\n      showAddingTaskErrorMessage(project, \"Go Command task supports only Go Modules\");\n      return false;\n    }\n\n    GoCommandConfigureDialog dialog = new GoCommandConfigureDialog(project);\n    if (dialog.showAndGet()) {\n      task.setCommand(dialog.getCommand());\n      return true;\n    }\n    return false;\n  }\n\n  @Override\n  public boolean canExecuteTask(RunConfiguration configuration, GoCommandBeforeRunTask task) {\n    if (configuration instanceof GoRunConfigurationBase) {\n      Module module = ((GoRunConfigurationBase)configuration).getConfigurationModule().getModule();\n      GoSdkService sdkService = GoSdkService.getInstance(configuration.getProject());\n      if (sdkService.isGoModule(module)) {\n        return StringUtil.isNotEmpty(sdkService.getSdkHomePath(module)) && StringUtil.isNotEmpty(task.getCommand());\n      }\n    }\n    return false;\n  }\n\n  @Override\n  public boolean executeTask(DataContext context,\n                             RunConfiguration configuration,\n                             ExecutionEnvironment env,\n                             GoCommandBeforeRunTask task) {\n    Semaphore done = new Semaphore();\n    Ref<Boolean> result = Ref.create(false);\n\n    GoRunConfigurationBase goRunConfiguration = (GoRunConfigurationBase)configuration;\n    Module module = goRunConfiguration.getConfigurationModule().getModule();\n    Project project = configuration.getProject();\n    String workingDirectory = goRunConfiguration.getWorkingDirectory();\n\n    UIUtil.invokeAndWaitIfNeeded(new Runnable() {\n      @Override\n      public void run() {\n        if (StringUtil.isEmpty(task.getCommand())) return;\n        if (project == null || project.isDisposed()) return;\n        GoSdkService sdkService = GoSdkService.getInstance(project);\n        if (!sdkService.isGoModule(module)) return;\n\n        done.down();\n        GoExecutor.in(module).withParameterString(task.getCommand())\n          .withWorkDirectory(workingDirectory)\n          .showOutputOnError()\n          .showNotifications(false, true)\n          .withPresentableName(\"Executing `\" + task + \"`\")\n          .withProcessListener(new ProcessAdapter() {\n            @Override\n            public void processTerminated(ProcessEvent event) {\n              done.up();\n              result.set(event.getExitCode() == 0);\n            }\n          })\n          .executeWithProgress(false, result1 -> VirtualFileManager.getInstance().asyncRefresh(null));\n      }\n    });\n\n    done.waitFor();\n    return result.get();\n  }\n\n  private static void showAddingTaskErrorMessage(Project project, String message) {\n    Messages.showErrorDialog(project, message, \"Go Command Task\");\n  }\n}"
  },
  {
    "path": "src/com/goide/runconfig/before/GoCommandBeforeRunTask.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.before;\n\nimport com.intellij.execution.BeforeRunTask;\nimport com.intellij.openapi.util.text.StringUtil;\nimport org.jdom.Element;\nimport org.jetbrains.annotations.NonNls;\n\npublic class GoCommandBeforeRunTask extends BeforeRunTask<GoCommandBeforeRunTask> {\n  @NonNls\n  private static final String COMMAND_ATTRIBUTE = \"command\";\n\n  private String myCommand;\n\n  public GoCommandBeforeRunTask() {\n    super(GoBeforeRunTaskProvider.ID);\n  }\n\n  public String getCommand() {\n    return myCommand;\n  }\n\n  public void setCommand(String command) {\n    myCommand = command;\n  }\n  \n  @Override\n  public void writeExternal(Element element) {\n    super.writeExternal(element);\n    if (myCommand != null) {\n      element.setAttribute(COMMAND_ATTRIBUTE, myCommand);\n    }\n  }\n\n  @Override\n  public void readExternal(Element element) {\n    super.readExternal(element);\n    String command = element.getAttributeValue(COMMAND_ATTRIBUTE);\n    if (command != null) {\n      myCommand = command;\n    }\n  }\n\n  @Override\n  public String toString() {\n    return \"go \" + StringUtil.notNullize(myCommand);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/before/GoCommandConfigureDialog.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.before;\n\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.ui.DialogWrapper;\nimport com.intellij.openapi.ui.ValidationInfo;\nimport com.intellij.ui.TextFieldWithAutoCompletion;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport javax.swing.*;\nimport java.awt.*;\nimport java.util.Arrays;\nimport java.util.Collection;\n\npublic class GoCommandConfigureDialog extends DialogWrapper {\n  private static final Collection<String> PREDEFINED_COMMANDS = Arrays.asList(\"vet\", \"test -i\");\n\n  private final TextFieldWithAutoCompletion<String> myCommandTextField;\n\n  public GoCommandConfigureDialog(@NotNull Project project) {\n    super(project);\n    setTitle(\"Edit Go Command Task\");\n    setModal(true);\n    myCommandTextField = TextFieldWithAutoCompletion.create(project, PREDEFINED_COMMANDS, false, null);\n    init();\n  }\n\n  @Nullable\n  @Override\n  protected ValidationInfo doValidate() {\n    String command = getCommand();\n    if (command.isEmpty()) {\n      return new ValidationInfo(\"Empty Go command is not allowed\", myCommandTextField);\n    }\n    if (command.startsWith(\"go \")) {\n      return new ValidationInfo(\"Go command shouldn't started with `go`\", myCommandTextField);\n    }\n    return super.doValidate();\n  }\n\n  @Nullable\n  @Override\n  public JComponent getPreferredFocusedComponent() {\n    return myCommandTextField;\n  }\n\n  @Nullable\n  @Override\n  protected JComponent createCenterPanel() {\n    JPanel panel = new JPanel(new BorderLayout());\n    panel.add(myCommandTextField, BorderLayout.NORTH);\n    return panel;\n  }\n\n  @NotNull\n  public String getCommand() {\n    return myCommandTextField.getText().trim();\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/file/GoRunFileConfiguration.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.file;\n\nimport com.goide.runconfig.GoModuleBasedConfiguration;\nimport com.goide.runconfig.GoRunConfigurationWithMain;\nimport com.goide.runconfig.ui.GoRunFileConfigurationEditorForm;\nimport com.intellij.execution.configurations.ConfigurationType;\nimport com.intellij.execution.configurations.ModuleBasedConfiguration;\nimport com.intellij.execution.configurations.RunConfiguration;\nimport com.intellij.execution.configurations.RuntimeConfigurationException;\nimport com.intellij.execution.runners.ExecutionEnvironment;\nimport com.intellij.ide.scratch.ScratchFileType;\nimport com.intellij.openapi.application.ApplicationManager;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.options.SettingsEditor;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.io.FileUtil;\nimport com.intellij.openapi.vfs.LocalFileSystem;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.util.PathUtil;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.io.IOException;\nimport java.util.UUID;\n\npublic class GoRunFileConfiguration extends GoRunConfigurationWithMain<GoRunFileRunningState> {\n  public GoRunFileConfiguration(Project project, String name, @NotNull ConfigurationType configurationType) {\n    super(name, new GoModuleBasedConfiguration(project), configurationType.getConfigurationFactories()[0]);\n  }\n\n  @NotNull\n  @Override\n  protected ModuleBasedConfiguration createInstance() {\n    return new GoRunFileConfiguration(getProject(), getName(), GoRunFileConfigurationType.getInstance());\n  }\n\n  @NotNull\n  @Override\n  public SettingsEditor<? extends RunConfiguration> getConfigurationEditor() {\n    return new GoRunFileConfigurationEditorForm(getProject());\n  }\n\n  @Override\n  public void checkConfiguration() throws RuntimeConfigurationException {\n    super.checkBaseConfiguration();\n    super.checkFileConfiguration();\n  }\n\n  @NotNull\n  @Override\n  protected GoRunFileRunningState newRunningState(@NotNull ExecutionEnvironment env, @NotNull Module module) {\n    String path = getFilePath();\n    if (!\"go\".equals(PathUtil.getFileExtension(path))) {\n      VirtualFile f = LocalFileSystem.getInstance().refreshAndFindFileByPath(path);\n      if (f != null && f.getFileType() == ScratchFileType.INSTANCE) {\n        String suffixWithoutExt = \".\" + UUID.randomUUID().toString().substring(0, 4);\n        String suffix = suffixWithoutExt + \".go\";\n        String before = f.getName();\n        String beforeWithoutExt = FileUtil.getNameWithoutExtension(before);\n        ApplicationManager.getApplication().runWriteAction(new Runnable() {\n          @Override\n          public void run() {\n            try {\n              f.rename(this, before + suffix);\n            }\n            catch (IOException ignored) {\n            }\n          }\n        });\n        setFilePath(path + suffix);\n        setName(getName().replace(beforeWithoutExt, beforeWithoutExt + suffixWithoutExt));\n      }\n    } \n    return new GoRunFileRunningState(env, module, this);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/file/GoRunFileConfigurationProducer.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.file;\n\nimport com.goide.runconfig.GoRunConfigurationProducerBase;\nimport com.intellij.psi.PsiFile;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoRunFileConfigurationProducer extends GoRunConfigurationProducerBase<GoRunFileConfiguration> implements Cloneable {\n  public GoRunFileConfigurationProducer() {\n    super(GoRunFileConfigurationType.getInstance());\n  }\n\n  @Override\n  @NotNull\n  protected String getConfigurationName(@NotNull PsiFile file) {\n    return \"go run \" + file.getName();\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/file/GoRunFileConfigurationType.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.file;\n\nimport com.goide.GoConstants;\nimport com.goide.GoIcons;\nimport com.goide.runconfig.GoConfigurationFactoryBase;\nimport com.intellij.execution.configurations.ConfigurationTypeBase;\nimport com.intellij.execution.configurations.RunConfiguration;\nimport com.intellij.openapi.extensions.Extensions;\nimport com.intellij.openapi.project.Project;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoRunFileConfigurationType extends ConfigurationTypeBase {\n  public GoRunFileConfigurationType() {\n    super(\"GoRunFileConfiguration\", \"Go Single File\", \"Go single run file configuration\", GoIcons.APPLICATION_RUN);\n    addFactory(new GoConfigurationFactoryBase(this) {\n      @Override\n      @NotNull\n      public RunConfiguration createTemplateConfiguration(@NotNull Project project) {\n        return new GoRunFileConfiguration(project, GoConstants.GO, getInstance());\n      }\n    });\n  }\n\n  @NotNull\n  public static GoRunFileConfigurationType getInstance() {\n    return Extensions.findExtension(CONFIGURATION_TYPE_EP, GoRunFileConfigurationType.class);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/file/GoRunFileRunningState.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.file;\n\nimport com.goide.runconfig.GoRunningState;\nimport com.goide.util.GoExecutor;\nimport com.intellij.execution.ExecutionException;\nimport com.intellij.execution.runners.ExecutionEnvironment;\nimport com.intellij.openapi.module.Module;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoRunFileRunningState extends GoRunningState<GoRunFileConfiguration> {\n  public GoRunFileRunningState(@NotNull ExecutionEnvironment env, @NotNull Module module, GoRunFileConfiguration configuration) {\n    super(env, module, configuration);\n  }\n\n  @Override\n  protected GoExecutor patchExecutor(@NotNull GoExecutor executor) throws ExecutionException {\n    return executor\n      .withParameters(\"run\")\n      .withParameterString(myConfiguration.getGoToolParams())\n      .withParameters(myConfiguration.getFilePath());\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/testing/GoTestConfigurationFactoryBase.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.testing;\n\nimport com.goide.runconfig.GoConfigurationFactoryBase;\nimport com.goide.runconfig.before.GoBeforeRunTaskProvider;\nimport com.goide.runconfig.before.GoCommandBeforeRunTask;\nimport com.intellij.execution.BeforeRunTask;\nimport com.intellij.execution.configurations.ConfigurationTypeBase;\nimport com.intellij.openapi.util.Key;\nimport org.jetbrains.annotations.NotNull;\n\npublic abstract class GoTestConfigurationFactoryBase extends GoConfigurationFactoryBase {\n  public GoTestConfigurationFactoryBase(@NotNull ConfigurationTypeBase type) {\n    super(type);\n  }\n\n  @Override\n  public void configureBeforeRunTaskDefaults(Key<? extends BeforeRunTask> providerID, BeforeRunTask task) {\n    super.configureBeforeRunTaskDefaults(providerID, task);\n    if (providerID == GoBeforeRunTaskProvider.ID && task instanceof GoCommandBeforeRunTask \n        && ((GoCommandBeforeRunTask)task).getCommand() == null) {\n      task.setEnabled(true);\n      ((GoCommandBeforeRunTask)task).setCommand(\"test -i\");\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/testing/GoTestConsoleProperties.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.testing;\n\nimport com.goide.psi.GoFunctionOrMethodDeclaration;\nimport com.goide.runconfig.GoRunConfigurationBase;\nimport com.goide.sdk.GoPackageUtil;\nimport com.goide.util.GoUtil;\nimport com.intellij.execution.ExecutionException;\nimport com.intellij.execution.Executor;\nimport com.intellij.execution.Location;\nimport com.intellij.execution.PsiLocation;\nimport com.intellij.execution.configurations.RunConfigurationBase;\nimport com.intellij.execution.configurations.RunProfile;\nimport com.intellij.execution.configurations.RunProfileState;\nimport com.intellij.execution.runners.ExecutionEnvironment;\nimport com.intellij.execution.testframework.AbstractTestProxy;\nimport com.intellij.execution.testframework.Filter;\nimport com.intellij.execution.testframework.TestConsoleProperties;\nimport com.intellij.execution.testframework.actions.AbstractRerunFailedTestsAction;\nimport com.intellij.execution.testframework.sm.SMCustomMessagesParsing;\nimport com.intellij.execution.testframework.sm.runner.OutputToGeneralTestEventsConverter;\nimport com.intellij.execution.testframework.sm.runner.SMTRunnerConsoleProperties;\nimport com.intellij.execution.testframework.sm.runner.SMTestLocator;\nimport com.intellij.execution.ui.ConsoleView;\nimport com.intellij.openapi.actionSystem.ActionManager;\nimport com.intellij.openapi.actionSystem.AnAction;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.vfs.VfsUtilCore;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.openapi.vfs.VirtualFileManager;\nimport com.intellij.psi.PsiDirectory;\nimport com.intellij.psi.PsiManager;\nimport com.intellij.psi.search.GlobalSearchScope;\nimport com.intellij.psi.search.GlobalSearchScopesCore;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.List;\n\npublic class GoTestConsoleProperties extends SMTRunnerConsoleProperties implements SMCustomMessagesParsing {\n  public GoTestConsoleProperties(@NotNull GoTestRunConfiguration configuration, @NotNull Executor executor) {\n    super(configuration, configuration.getTestFramework().getName(), executor);\n    setPrintTestingStartedTime(false);\n  }\n\n  @NotNull\n  @Override\n  protected GlobalSearchScope initScope() {\n    RunProfile configuration = getConfiguration();\n    if (configuration instanceof GoTestRunConfiguration) {\n      Project project = ((GoTestRunConfiguration)configuration).getProject();\n      Module module = ((GoTestRunConfiguration)configuration).getConfigurationModule().getModule();\n      switch (((GoTestRunConfiguration)configuration).getKind()) {\n        case DIRECTORY:\n          String directoryUrl = VfsUtilCore.pathToUrl(((GoTestRunConfiguration)configuration).getDirectoryPath());\n          VirtualFile directory = VirtualFileManager.getInstance().findFileByUrl(directoryUrl);\n          if (directory != null) {\n            return GlobalSearchScopesCore.directoryScope(project, directory, true);\n          }\n          break;\n        case PACKAGE:\n          VirtualFile packageDir = GoPackageUtil.findByImportPath(((GoTestRunConfiguration)configuration).getPackage(), project, module);\n          PsiDirectory psiDirectory = packageDir != null ? PsiManager.getInstance(project).findDirectory(packageDir) : null;\n          if (psiDirectory != null) {\n            return GoPackageUtil.packageScope(psiDirectory, null);\n          }\n          break;\n        case FILE:\n          String fileUrl = VfsUtilCore.pathToUrl(((GoTestRunConfiguration)configuration).getFilePath());\n          VirtualFile file = VirtualFileManager.getInstance().findFileByUrl(fileUrl);\n          if (file != null) {\n            return GlobalSearchScope.fileScope(project, file);\n          }\n          break;\n      }\n    }\n    if (configuration instanceof GoRunConfigurationBase) {\n      GlobalSearchScope scope = GlobalSearchScope.EMPTY_SCOPE;\n      for (Module module : ((GoRunConfigurationBase)configuration).getModules()) {\n        scope = new GoUtil.TestsScope(GoUtil.goPathResolveScope(module, null));\n      }\n      return scope;\n    }\n    return super.initScope();\n  }\n\n  @Nullable\n  @Override\n  public SMTestLocator getTestLocator() {\n    return GoTestLocator.INSTANCE;\n  }\n\n  @NotNull\n  @Override\n  public OutputToGeneralTestEventsConverter createTestEventsConverter(@NotNull String testFrameworkName,\n                                                                      @NotNull TestConsoleProperties consoleProperties) {\n    RunProfile configuration = getConfiguration();\n    assert configuration instanceof GoTestRunConfiguration;\n    return ((GoTestRunConfiguration)configuration).createTestEventsConverter(consoleProperties);\n  }\n\n  @Nullable\n  @Override\n  public AbstractRerunFailedTestsAction createRerunFailedTestsAction(ConsoleView consoleView) {\n    AnAction rerunFailedTestsAction = ActionManager.getInstance().getAction(\"RerunFailedTests\");\n    return rerunFailedTestsAction != null ? new GoRerunFailedTestsAction(this, consoleView) : null;\n  }\n\n  private static class GoRerunFailedTestsAction extends AbstractRerunFailedTestsAction {\n    public GoRerunFailedTestsAction(GoTestConsoleProperties properties, ConsoleView view) {\n      super(view);\n      init(properties);\n    }\n\n    @NotNull\n    @Override\n    protected Filter getFilter(@NotNull Project project, @NotNull GlobalSearchScope searchScope) {\n      return super.getFilter(project, searchScope).and(new Filter() {\n        @Override\n        public boolean shouldAccept(AbstractTestProxy test) {\n          Location location = test.getLocation(project, searchScope);\n          return location instanceof PsiLocation && location.getPsiElement() instanceof GoFunctionOrMethodDeclaration;\n        }\n      });\n    }\n\n    @Nullable\n    @Override\n    protected MyRunProfile getRunProfile(@NotNull ExecutionEnvironment environment) {\n      return new MyRunProfile((RunConfigurationBase)myConsoleProperties.getConfiguration()) {\n        @NotNull\n        @Override\n        public Module[] getModules() {\n          return Module.EMPTY_ARRAY;\n        }\n\n        @Nullable\n        @Override\n        public RunProfileState getState(@NotNull Executor executor, @NotNull ExecutionEnvironment environment) throws ExecutionException {\n          RunConfigurationBase configurationBase = getPeer();\n          if (configurationBase instanceof GoTestRunConfiguration) {\n            List<AbstractTestProxy> failedTests = getFailedTests(configurationBase.getProject());\n            if (failedTests.isEmpty()) {\n              return null;\n            }\n\n            GoTestRunConfiguration goTestRunConfiguration = (GoTestRunConfiguration)configurationBase;\n            Module module = goTestRunConfiguration.getConfigurationModule().getModule();\n            GoTestRunningState runningState = goTestRunConfiguration.newRunningState(environment, module);\n            runningState.setFailedTests(failedTests);\n            return runningState;\n          }\n          return null;\n        }\n      };\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/testing/GoTestEventsConverterBase.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.testing;\n\nimport com.intellij.openapi.util.Key;\nimport jetbrains.buildServer.messages.serviceMessages.ServiceMessageVisitor;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.text.ParseException;\n\npublic interface GoTestEventsConverterBase {\n  boolean processServiceMessages(@NotNull String text, Key outputType, ServiceMessageVisitor visitor) throws ParseException;\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/testing/GoTestFinder.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.testing;\n\nimport com.goide.GoConstants;\nimport com.goide.GoFileType;\nimport com.goide.psi.GoFile;\nimport com.goide.psi.GoFunctionOrMethodDeclaration;\nimport com.intellij.openapi.util.io.FileUtil;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.psi.PsiDirectory;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtil;\nimport com.intellij.testIntegration.TestFinder;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.Collection;\nimport java.util.Collections;\n\npublic class GoTestFinder implements TestFinder {\n  private static final String EXTENSION = \".\" + GoFileType.INSTANCE.getDefaultExtension();\n\n  public static boolean isTestFile(@Nullable PsiFile file) {\n    return file instanceof GoFile && file.getName().endsWith(GoConstants.TEST_SUFFIX_WITH_EXTENSION);\n  }\n\n  public static boolean isTestFile(@NotNull VirtualFile file) {\n    return file.getName().endsWith(GoConstants.TEST_SUFFIX_WITH_EXTENSION);\n  }\n\n  public static boolean isTestOrExampleFunction(@NotNull GoFunctionOrMethodDeclaration function) {\n    GoTestFunctionType type = GoTestFunctionType.fromName(function.getName());\n    return type == GoTestFunctionType.EXAMPLE || type == GoTestFunctionType.TEST;\n  }\n\n  public static boolean isBenchmarkFunction(@NotNull GoFunctionOrMethodDeclaration function) {\n    GoTestFunctionType type = GoTestFunctionType.fromName(function.getName());\n    return type == GoTestFunctionType.BENCHMARK;\n  }\n\n  public static boolean isTestFileWithTestPackage(@Nullable PsiFile file) {\n    return getTestTargetPackage(file) != null;\n  }\n\n  @Nullable\n  public static String getTestTargetPackage(@Nullable PsiFile file) {\n    if (isTestFile(file)) {\n      String packageName = ((GoFile)file).getPackageName();\n      if (packageName != null && packageName.endsWith(GoConstants.TEST_SUFFIX)) {\n        return StringUtil.nullize(StringUtil.trimEnd(packageName, GoConstants.TEST_SUFFIX));\n      }\n    }\n    return null;\n  }\n\n  @Nullable\n  @Override\n  public PsiElement findSourceElement(@NotNull PsiElement from) {\n    return InjectedLanguageUtil.getTopLevelFile(from);\n  }\n\n  @NotNull\n  @Override\n  public Collection<PsiElement> findTestsForClass(@NotNull PsiElement element) {\n    PsiFile file = InjectedLanguageUtil.getTopLevelFile(element);\n    if (file instanceof GoFile) {\n      PsiDirectory directory = file.getContainingDirectory();\n      PsiFile testFile = directory.findFile(FileUtil.getNameWithoutExtension(file.getName()) + GoConstants.TEST_SUFFIX_WITH_EXTENSION);\n      if (testFile != null) {\n        return ContainerUtil.newSmartList(testFile);\n      }\n    }\n    return Collections.emptyList();\n  }\n\n  @NotNull\n  @Override\n  public Collection<PsiElement> findClassesForTest(@NotNull PsiElement element) {\n    PsiFile testFile = InjectedLanguageUtil.getTopLevelFile(element);\n    if (testFile instanceof GoFile) {\n      PsiDirectory directory = testFile.getContainingDirectory();\n      PsiFile sourceFile = directory.findFile(StringUtil.trimEnd(testFile.getName(), GoConstants.TEST_SUFFIX_WITH_EXTENSION) + EXTENSION);\n      if (sourceFile != null) {\n        return ContainerUtil.newSmartList(sourceFile);\n      }\n    }\n    return Collections.emptyList();\n  }\n\n  @Override\n  public boolean isTest(@NotNull PsiElement element) {\n    return isTestFile(InjectedLanguageUtil.getTopLevelFile(element));\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/testing/GoTestFramework.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.testing;\n\nimport com.goide.psi.GoFunctionOrMethodDeclaration;\nimport com.goide.runconfig.testing.frameworks.gobench.GobenchFramework;\nimport com.goide.runconfig.testing.frameworks.gocheck.GocheckFramework;\nimport com.goide.runconfig.testing.frameworks.gotest.GotestFramework;\nimport com.intellij.execution.runners.ExecutionEnvironment;\nimport com.intellij.execution.testframework.TestConsoleProperties;\nimport com.intellij.execution.testframework.sm.runner.OutputToGeneralTestEventsConverter;\nimport com.intellij.openapi.actionSystem.AnAction;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.ArrayList;\nimport java.util.Collection;\nimport java.util.Collections;\nimport java.util.List;\n\npublic abstract class GoTestFramework {\n  private static class Lazy {\n\n    private static final ArrayList<GoTestFramework> ALL_FRAMEWORKS = ContainerUtil.newArrayList(\n      GotestFramework.INSTANCE, GocheckFramework.INSTANCE, GobenchFramework.INSTANCE\n    );\n  }\n  public static List<GoTestFramework> all() {\n    return Lazy.ALL_FRAMEWORKS;\n  }\n\n  public Collection<? extends AnAction> getGenerateMethodActions() {\n    return Collections.emptyList();\n  }\n\n  @NotNull\n  public static GoTestFramework fromName(@Nullable String name) {\n    for (GoTestFramework framework : all()) {\n      if (framework.getName().equals(name)) {\n        return framework;\n      }\n    }\n    return GotestFramework.INSTANCE;\n  }\n\n  @NotNull\n  public abstract String getName();\n\n  public abstract boolean isAvailable(@Nullable Module module);\n\n  public abstract boolean isAvailableOnFile(@Nullable PsiFile file);\n\n  public abstract boolean isAvailableOnFunction(@Nullable GoFunctionOrMethodDeclaration functionOrMethodDeclaration);\n\n  @NotNull\n  protected abstract GoTestRunningState newRunningState(@NotNull ExecutionEnvironment env,\n                                                        @NotNull Module module, @NotNull GoTestRunConfiguration runConfiguration);\n\n  @NotNull\n  public abstract OutputToGeneralTestEventsConverter createTestEventsConverter(@NotNull TestConsoleProperties consoleProperties);\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/testing/GoTestFunctionType.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.testing;\n\nimport com.goide.GoConstants;\nimport com.goide.psi.impl.GoPsiImplUtil;\nimport com.intellij.openapi.util.text.StringUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.Locale;\n\npublic enum GoTestFunctionType {\n  TEST(GoConstants.TEST_PREFIX, \"T\"),\n  TEST_MAIN(GoConstants.TEST_PREFIX, \"M\"),\n  BENCHMARK(GoConstants.BENCHMARK_PREFIX, \"B\"),\n  EXAMPLE(GoConstants.EXAMPLE_PREFIX, null);\n\n  private final String myPrefix;\n  private final String myParamType;\n\n  GoTestFunctionType(String prefix, String paramType) {\n    myPrefix = prefix;\n    myParamType = paramType;\n  }\n\n  @Nullable\n  public String getParamType() {\n    return myParamType;\n  }\n\n  @NotNull\n  public String getPrefix() {\n    return myPrefix;\n  }\n\n  @NotNull\n  public String getQualifiedParamType(@Nullable String testingQualifier) {\n    return myParamType != null ? \"*\" + GoPsiImplUtil.getFqn(testingQualifier, myParamType) : \"\";\n  }\n  \n  @NotNull\n  public String getSignature(@Nullable String testingQualifier) {\n    if (myParamType == null) {\n      return \"\";\n    }\n    return myParamType.toLowerCase(Locale.US) + \" \" + getQualifiedParamType(testingQualifier);\n  }\n\n  @Nullable\n  public static GoTestFunctionType fromName(@Nullable String functionName) {\n    if (StringUtil.isEmpty(functionName)) return null;\n    if (GoConstants.TEST_MAIN.equals(functionName)) return TEST_MAIN;\n    for (GoTestFunctionType type : values()) {\n      if (checkPrefix(functionName, type.myPrefix)) return type;\n    }\n    return null;\n  }\n\n  private static boolean checkPrefix(@Nullable String name, @NotNull String prefix) {\n    // https://github.com/golang/go/blob/master/src/cmd/go/test.go#L1161 – isTest()\n    if (name == null || !name.startsWith(prefix)) return false;\n    if (prefix.length() == name.length()) return true;\n    char c = name.charAt(prefix.length());\n    return !Character.isLetter(c) || !Character.isLowerCase(c);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/testing/GoTestLocator.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.testing;\n\nimport com.goide.psi.GoMethodDeclaration;\nimport com.goide.psi.GoTypeSpec;\nimport com.goide.stubs.index.GoFunctionIndex;\nimport com.goide.stubs.index.GoIdFilter;\nimport com.goide.stubs.index.GoTypesIndex;\nimport com.intellij.execution.Location;\nimport com.intellij.execution.PsiLocation;\nimport com.intellij.execution.testframework.sm.runner.SMTestLocator;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.psi.search.GlobalSearchScope;\nimport com.intellij.util.containers.ContainerUtil;\nimport com.intellij.util.indexing.IdFilter;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.Collections;\nimport java.util.List;\n\npublic class GoTestLocator implements SMTestLocator {\n  public static final String SUITE_PROTOCOL = \"gosuite\";\n  public static final String PROTOCOL = \"gotest\";\n\n  public static final SMTestLocator INSTANCE = new GoTestLocator();\n\n  private GoTestLocator() {}\n\n  @NotNull\n  @Override\n  public List<Location> getLocation(@NotNull String protocolId,\n                                    @NotNull String path,\n                                    @NotNull Project project,\n                                    @NotNull GlobalSearchScope scope) {\n    if (PROTOCOL.equals(protocolId)) {\n      IdFilter idFilter = GoIdFilter.getTestsFilter(project);\n      List<String> locationDataItems = StringUtil.split(path, \".\");\n      // Location is a function name, e.g. `TestCheckItOut`\n      if (locationDataItems.size() == 1) {\n        return ContainerUtil.mapNotNull(GoFunctionIndex.find(path, project, scope, idFilter),\n                                        function -> PsiLocation.fromPsiElement(project, function));\n      }\n\n      // Location is a method name, e.g. `FooSuite.TestCheckItOut`\n      if (locationDataItems.size() == 2) {\n        List<Location> locations = ContainerUtil.newArrayList();\n        for (GoTypeSpec typeSpec : GoTypesIndex.find(locationDataItems.get(0), project, scope, idFilter)) {\n          for (GoMethodDeclaration method : typeSpec.getMethods()) {\n            if (locationDataItems.get(1).equals(method.getName())) {\n              ContainerUtil.addIfNotNull(locations, PsiLocation.fromPsiElement(method));\n            }\n          }\n        }\n        return locations;\n      }\n    }\n    else if (SUITE_PROTOCOL.equals(protocolId)) {\n      IdFilter idFilter = GoIdFilter.getTestsFilter(project);\n      return ContainerUtil.mapNotNull(GoTypesIndex.find(path, project, scope, idFilter),\n                                      spec -> PsiLocation.fromPsiElement(project, spec));\n    }\n    else {\n      return Collections.emptyList();\n    }\n\n    throw new RuntimeException(\"Unsupported location: \" + path);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/testing/GoTestRunConfiguration.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.testing;\n\nimport com.goide.runconfig.GoModuleBasedConfiguration;\nimport com.goide.runconfig.GoRunConfigurationBase;\nimport com.goide.runconfig.testing.frameworks.gotest.GotestFramework;\nimport com.goide.runconfig.testing.ui.GoTestRunConfigurationEditorForm;\nimport com.goide.sdk.GoPackageUtil;\nimport com.intellij.execution.configurations.*;\nimport com.intellij.execution.runners.ExecutionEnvironment;\nimport com.intellij.execution.testframework.TestConsoleProperties;\nimport com.intellij.execution.testframework.sm.runner.OutputToGeneralTestEventsConverter;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.options.SettingsEditor;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.InvalidDataException;\nimport com.intellij.openapi.util.JDOMExternalizerUtil;\nimport com.intellij.openapi.util.WriteExternalException;\nimport com.intellij.openapi.util.io.FileUtil;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.openapi.vfs.LocalFileSystem;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.PsiManager;\nimport org.jdom.Element;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoTestRunConfiguration extends GoRunConfigurationBase<GoTestRunningState> {\n  private static final String PATTERN_ATTRIBUTE_NAME = \"pattern\";\n  private static final String FILE_PATH_ATTRIBUTE_NAME = \"filePath\";\n  private static final String DIRECTORY_ATTRIBUTE_NAME = \"directory\";\n  private static final String PACKAGE_ATTRIBUTE_NAME = \"package\";\n  private static final String KIND_ATTRIBUTE_NAME = \"kind\";\n  private static final String FRAMEWORK_ATTRIBUTE_NAME = \"framework\";\n\n  @NotNull private String myPackage = \"\";\n  @NotNull private String myFilePath = \"\";\n  @NotNull private String myDirectoryPath = \"\";\n\n  @NotNull private String myPattern = \"\";\n  @NotNull private Kind myKind = Kind.DIRECTORY;\n  private GoTestFramework myTestFramework = GotestFramework.INSTANCE;\n\n  public GoTestRunConfiguration(@NotNull Project project, String name, @NotNull ConfigurationType configurationType) {\n    super(name, new GoModuleBasedConfiguration(project), configurationType.getConfigurationFactories()[0]);\n  }\n\n  public OutputToGeneralTestEventsConverter createTestEventsConverter(@NotNull TestConsoleProperties consoleProperties) {\n    return myTestFramework.createTestEventsConverter(consoleProperties);\n  }\n\n  @NotNull\n  @Override\n  protected GoTestRunningState newRunningState(ExecutionEnvironment env, Module module) {\n    return myTestFramework.newRunningState(env, module, this);\n  }\n\n  @Override\n  protected ModuleBasedConfiguration createInstance() {\n    return new GoTestRunConfiguration(getProject(), getName(), GoTestRunConfigurationType.getInstance());\n  }\n\n  @NotNull\n  @Override\n  public SettingsEditor<? extends RunConfiguration> getConfigurationEditor() {\n    return new GoTestRunConfigurationEditorForm(getProject());\n  }\n\n  @Override\n  public void checkConfiguration() throws RuntimeConfigurationException {\n    super.checkConfiguration();\n    GoModuleBasedConfiguration configurationModule = getConfigurationModule();\n    if (!myTestFramework.isAvailable(configurationModule.getModule())) {\n      throw new RuntimeConfigurationError(\"Framework `\" + myTestFramework.getName() + \"` is not available in selected module\");\n    }\n    switch (myKind) {\n      case DIRECTORY:\n        String directoryPath = FileUtil.isAbsolutePlatformIndependent(myDirectoryPath)\n                               ? myDirectoryPath\n                               : FileUtil.join(getWorkingDirectory(), myDirectoryPath);\n\n        if (!FileUtil.isAncestor(getWorkingDirectory(), directoryPath, false)) {\n          throw new RuntimeConfigurationError(\"Working directory should be ancestor of testing directory\");\n        }\n        VirtualFile testingDirectory = LocalFileSystem.getInstance().findFileByPath(directoryPath);\n        if (testingDirectory == null) {\n          throw new RuntimeConfigurationError(\"Testing directory doesn't exist\");\n        }\n        break;\n      case PACKAGE:\n        Module module = configurationModule.getModule();\n        assert module != null;\n\n        VirtualFile packageDirectory = GoPackageUtil.findByImportPath(myPackage, module.getProject(), module);\n        if (packageDirectory == null || !packageDirectory.isDirectory()) {\n          throw new RuntimeConfigurationError(\"Cannot find package '\" + myPackage + \"'\");\n        }\n        for (VirtualFile file : packageDirectory.getChildren()) {\n          PsiFile psiFile = PsiManager.getInstance(getProject()).findFile(file);\n          if (psiFile != null && myTestFramework.isAvailableOnFile(psiFile)) {\n            return;\n          }\n        }\n        String message = \"Cannot find Go test files in '\" + myPackage + \"' compatible with `\" + myTestFramework.getName() + \"` framework\";\n        throw new RuntimeConfigurationError(message);\n      case FILE:\n        VirtualFile virtualFile = findFile(getFilePath());\n        if (virtualFile == null) {\n          throw new RuntimeConfigurationError(\"Test file doesn't exist\");\n        }\n        PsiFile file = PsiManager.getInstance(getProject()).findFile(virtualFile);\n        if (file == null || !myTestFramework.isAvailableOnFile(file)) {\n          message = \"Framework `\" + myTestFramework.getName() + \"` is not available on file `\" + myFilePath + \"`\";\n          throw new RuntimeConfigurationError(message);\n        }\n        break;\n    }\n  }\n\n  @Override\n  public void writeExternal(Element element) throws WriteExternalException {\n    super.writeExternal(element);\n    JDOMExternalizerUtil.addElementWithValueAttribute(element, FRAMEWORK_ATTRIBUTE_NAME, myTestFramework.getName());\n    JDOMExternalizerUtil.addElementWithValueAttribute(element, KIND_ATTRIBUTE_NAME, myKind.name());\n    if (!myPackage.isEmpty()) {\n      JDOMExternalizerUtil.addElementWithValueAttribute(element, PACKAGE_ATTRIBUTE_NAME, myPackage);\n    }\n    if (!myDirectoryPath.isEmpty()) {\n      JDOMExternalizerUtil.addElementWithValueAttribute(element, DIRECTORY_ATTRIBUTE_NAME, myDirectoryPath);\n    }\n    if (!myFilePath.isEmpty()) {\n      JDOMExternalizerUtil.addElementWithValueAttribute(element, FILE_PATH_ATTRIBUTE_NAME, myFilePath);\n    }\n    if (!myPattern.isEmpty()) {\n      JDOMExternalizerUtil.addElementWithValueAttribute(element, PATTERN_ATTRIBUTE_NAME, myPattern);\n    }\n  }\n\n  @Override\n  public void readExternal(@NotNull Element element) throws InvalidDataException {\n    super.readExternal(element);\n    try {\n      String kindName = JDOMExternalizerUtil.getFirstChildValueAttribute(element, KIND_ATTRIBUTE_NAME);\n      myKind = kindName != null ? Kind.valueOf(kindName) : Kind.DIRECTORY;\n    }\n    catch (IllegalArgumentException e) {\n      myKind = Kind.DIRECTORY;\n    }\n    myPackage = StringUtil.notNullize(JDOMExternalizerUtil.getFirstChildValueAttribute(element, PACKAGE_ATTRIBUTE_NAME));\n    myDirectoryPath = StringUtil.notNullize(JDOMExternalizerUtil.getFirstChildValueAttribute(element, DIRECTORY_ATTRIBUTE_NAME));\n    myFilePath = StringUtil.notNullize(JDOMExternalizerUtil.getFirstChildValueAttribute(element, FILE_PATH_ATTRIBUTE_NAME));\n    myPattern = StringUtil.notNullize(JDOMExternalizerUtil.getFirstChildValueAttribute(element, PATTERN_ATTRIBUTE_NAME));\n    myTestFramework = GoTestFramework.fromName(JDOMExternalizerUtil.getFirstChildValueAttribute(element, FRAMEWORK_ATTRIBUTE_NAME));\n  }\n\n  @NotNull\n  public String getPattern() {\n    return myPattern;\n  }\n\n  public void setPattern(@NotNull String pattern) {\n    myPattern = pattern;\n  }\n\n  @NotNull\n  public Kind getKind() {\n    return myKind;\n  }\n\n  public void setKind(@NotNull Kind kind) {\n    myKind = kind;\n  }\n\n  @NotNull\n  public String getPackage() {\n    return myPackage;\n  }\n\n  public void setPackage(@NotNull String aPackage) {\n    myPackage = aPackage;\n  }\n\n  @NotNull\n  public String getFilePath() {\n    return myFilePath;\n  }\n\n  public void setFilePath(@NotNull String filePath) {\n    myFilePath = filePath;\n  }\n\n  @NotNull\n  public String getDirectoryPath() {\n    return myDirectoryPath;\n  }\n\n  public void setDirectoryPath(@NotNull String directoryPath) {\n    myDirectoryPath = directoryPath;\n  }\n\n  public void setTestFramework(@NotNull GoTestFramework testFramework) {\n    myTestFramework = testFramework;\n  }\n\n  @NotNull\n  public GoTestFramework getTestFramework() {\n    return myTestFramework;\n  }\n\n  public enum Kind {\n    DIRECTORY, PACKAGE, FILE\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/testing/GoTestRunConfigurationProducerBase.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.testing;\n\nimport com.goide.psi.GoFile;\nimport com.goide.psi.GoFunctionDeclaration;\nimport com.goide.psi.GoFunctionOrMethodDeclaration;\nimport com.goide.psi.GoMethodDeclaration;\nimport com.goide.runconfig.GoRunUtil;\nimport com.goide.sdk.GoSdkService;\nimport com.intellij.execution.actions.ConfigurationContext;\nimport com.intellij.execution.actions.RunConfigurationProducer;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.module.ModuleUtilCore;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.Comparing;\nimport com.intellij.openapi.util.Ref;\nimport com.intellij.openapi.util.io.FileUtil;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.psi.PsiDirectory;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic abstract class GoTestRunConfigurationProducerBase extends RunConfigurationProducer<GoTestRunConfiguration> {\n  @NotNull private final GoTestFramework myFramework;\n\n  protected GoTestRunConfigurationProducerBase(@NotNull GoTestFramework framework) {\n    super(GoTestRunConfigurationType.getInstance());\n    myFramework = framework;\n  }\n\n  @Override\n  protected boolean setupConfigurationFromContext(@NotNull GoTestRunConfiguration configuration,\n                                                  ConfigurationContext context,\n                                                  Ref sourceElement) {\n    PsiElement contextElement = GoRunUtil.getContextElement(context);\n    if (contextElement == null) {\n      return false;\n    }\n\n    Module module = ModuleUtilCore.findModuleForPsiElement(contextElement);\n    Project project = contextElement.getProject();\n    if (module == null || !GoSdkService.getInstance(project).isGoModule(module)) return false;\n    if (!myFramework.isAvailable(module)) return false;\n\n    configuration.setModule(module);\n    configuration.setTestFramework(myFramework);\n    if (contextElement instanceof PsiDirectory) {\n      configuration.setName(getPackageConfigurationName(((PsiDirectory)contextElement).getName()));\n      configuration.setKind(GoTestRunConfiguration.Kind.DIRECTORY);\n      String directoryPath = ((PsiDirectory)contextElement).getVirtualFile().getPath();\n      configuration.setDirectoryPath(directoryPath);\n      configuration.setWorkingDirectory(directoryPath);\n      return true;\n    }\n\n    PsiFile file = contextElement.getContainingFile();\n    if (myFramework.isAvailableOnFile(file)) {\n      String importPath = ((GoFile)file).getImportPath(false);\n      if (GoRunUtil.isPackageContext(contextElement) && StringUtil.isNotEmpty(importPath)) {\n        configuration.setKind(GoTestRunConfiguration.Kind.PACKAGE);\n        configuration.setPackage(importPath);\n        configuration.setName(getPackageConfigurationName(importPath));\n        return true;\n      }\n      else {\n        GoFunctionOrMethodDeclaration function = findTestFunctionInContext(contextElement);\n        if (function != null) {\n          if (myFramework.isAvailableOnFunction(function)) {\n            configuration.setName(getFunctionConfigurationName(function, file.getName()));\n            configuration.setPattern(\"^\" + function.getName() + \"$\");\n\n            configuration.setKind(GoTestRunConfiguration.Kind.PACKAGE);\n            configuration.setPackage(StringUtil.notNullize(((GoFile)file).getImportPath(false)));\n            return true;\n          }\n        }\n        else if (hasSupportedFunctions((GoFile)file)) {\n          configuration.setName(getFileConfigurationName(file.getName()));\n          configuration.setKind(GoTestRunConfiguration.Kind.FILE);\n          configuration.setFilePath(file.getVirtualFile().getPath());\n          return true;\n        }\n      }\n    }\n    return false;\n  }\n\n  private boolean hasSupportedFunctions(@NotNull GoFile file) {\n    for (GoFunctionDeclaration declaration : file.getFunctions()) {\n      if (myFramework.isAvailableOnFunction(declaration)) {\n        return true;\n      }\n    }\n    for (GoMethodDeclaration declaration : file.getMethods()) {\n      if (myFramework.isAvailableOnFunction(declaration)) {\n        return true;\n      }\n    }\n    return false;\n  }\n\n  @NotNull\n  protected String getFileConfigurationName(@NotNull String fileName) {\n    return fileName;\n  }\n\n  @NotNull\n  protected String getFunctionConfigurationName(@NotNull GoFunctionOrMethodDeclaration function, @NotNull String fileName) {\n    return function.getName() + \" in \" + fileName;\n  }\n\n  @NotNull\n  protected String getPackageConfigurationName(@NotNull String packageName) {\n    return \"All in '\" + packageName + \"'\";\n  }\n\n  @Override\n  public boolean isConfigurationFromContext(@NotNull GoTestRunConfiguration configuration, ConfigurationContext context) {\n    PsiElement contextElement = GoRunUtil.getContextElement(context);\n    if (contextElement == null) return false;\n\n    Module module = ModuleUtilCore.findModuleForPsiElement(contextElement);\n    if (!Comparing.equal(module, configuration.getConfigurationModule().getModule())) return false;\n    if (!Comparing.equal(myFramework, configuration.getTestFramework())) return false;\n\n    PsiFile file = contextElement.getContainingFile();\n    switch (configuration.getKind()) {\n      case DIRECTORY:\n        if (contextElement instanceof PsiDirectory) {\n          String directoryPath = ((PsiDirectory)contextElement).getVirtualFile().getPath();\n          return FileUtil.pathsEqual(configuration.getDirectoryPath(), directoryPath) &&\n                 FileUtil.pathsEqual(configuration.getWorkingDirectory(), directoryPath);\n        }\n      case PACKAGE:\n        if (!GoTestFinder.isTestFile(file)) return false;\n        if (!Comparing.equal(((GoFile)file).getImportPath(false), configuration.getPackage())) return false;\n        if (GoRunUtil.isPackageContext(contextElement) && configuration.getPattern().isEmpty()) return true;\n\n        GoFunctionOrMethodDeclaration contextFunction = findTestFunctionInContext(contextElement);\n        return contextFunction != null && myFramework.isAvailableOnFunction(contextFunction)\n               ? configuration.getPattern().equals(\"^\" + contextFunction.getName() + \"$\")\n               : configuration.getPattern().isEmpty();\n      case FILE:\n        GoFunctionOrMethodDeclaration contextTestFunction = findTestFunctionInContext(contextElement);\n        return contextTestFunction == null && GoTestFinder.isTestFile(file) && \n               FileUtil.pathsEqual(configuration.getFilePath(), file.getVirtualFile().getPath());\n    }\n    return false;\n  }\n\n  @Nullable\n  private static GoFunctionOrMethodDeclaration findTestFunctionInContext(@NotNull PsiElement contextElement) {\n    GoFunctionOrMethodDeclaration function = PsiTreeUtil.getNonStrictParentOfType(contextElement, GoFunctionOrMethodDeclaration.class);\n    return function != null && GoTestFunctionType.fromName(function.getName()) != null ? function : null;\n  }\n}"
  },
  {
    "path": "src/com/goide/runconfig/testing/GoTestRunConfigurationType.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.testing;\n\nimport com.goide.GoIcons;\nimport com.intellij.execution.configurations.ConfigurationTypeBase;\nimport com.intellij.execution.configurations.RunConfiguration;\nimport com.intellij.openapi.extensions.Extensions;\nimport com.intellij.openapi.project.Project;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoTestRunConfigurationType extends ConfigurationTypeBase {\n\n  public GoTestRunConfigurationType() {\n    super(\"GoTestRunConfiguration\", \"Go Test\", \"Go test run configuration\", GoIcons.TEST_RUN);\n    addFactory(new GoTestConfigurationFactoryBase(this) {\n      @Override\n      @NotNull\n      public RunConfiguration createTemplateConfiguration(@NotNull Project project) {\n        return new GoTestRunConfiguration(project, \"Go Test\", getInstance());\n      }\n    });\n  }\n\n  @NotNull\n  public static GoTestRunConfigurationType getInstance() {\n    return Extensions.findExtension(CONFIGURATION_TYPE_EP, GoTestRunConfigurationType.class);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/testing/GoTestRunLineMarkerProvider.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.testing;\n\nimport com.goide.GoTypes;\nimport com.goide.psi.GoFunctionDeclaration;\nimport com.goide.psi.GoFunctionOrMethodDeclaration;\nimport com.goide.psi.GoMethodDeclaration;\nimport com.goide.psi.GoReceiver;\nimport com.goide.runconfig.GoRunUtil;\nimport com.intellij.execution.TestStateStorage;\nimport com.intellij.execution.lineMarker.ExecutorAction;\nimport com.intellij.execution.lineMarker.RunLineMarkerContributor;\nimport com.intellij.execution.testframework.TestIconMapper;\nimport com.intellij.execution.testframework.sm.runner.states.TestStateInfo;\nimport com.intellij.icons.AllIcons;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.util.Function;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport javax.swing.*;\n\npublic class GoTestRunLineMarkerProvider extends RunLineMarkerContributor {\n  private static final Function<PsiElement, String> TOOLTIP_PROVIDER = element -> \"Run Test\";\n\n  @Nullable\n  @Override\n  public Info getInfo(PsiElement e) {\n    if (e != null && e.getNode().getElementType() == GoTypes.IDENTIFIER) {\n      PsiElement parent = e.getParent();\n      PsiFile file = e.getContainingFile();\n      if (!GoTestFinder.isTestFile(file)) {\n        return null;\n      }\n      if (GoRunUtil.isPackageContext(e)) {\n        return new Info(AllIcons.RunConfigurations.TestState.Run_run, TOOLTIP_PROVIDER, ExecutorAction.getActions(0));\n      }\n      else if (parent instanceof GoFunctionOrMethodDeclaration) {\n        GoTestFunctionType functionType = GoTestFunctionType.fromName(((GoFunctionOrMethodDeclaration)parent).getName());\n        if (functionType != null) {\n          if (parent instanceof GoFunctionDeclaration) {\n            return getInfo(GoTestLocator.PROTOCOL + \"://\" + ((GoFunctionDeclaration)parent).getName(), e.getProject());\n          }\n          else if (parent instanceof GoMethodDeclaration) {\n            GoReceiver receiver = ((GoMethodDeclaration)parent).getReceiver();\n            PsiElement receiverIdentifier = receiver != null ? receiver.getIdentifier() : null;\n            String receiverText = receiverIdentifier != null ? receiverIdentifier.getText() + \".\" : \"\";\n            return getInfo(GoTestLocator.PROTOCOL + \"://\" + receiverText + ((GoMethodDeclaration)parent).getName(), e.getProject());\n          }\n        }\n      }\n    }\n    return null;\n  }\n\n  @NotNull\n  private static Info getInfo(String url, Project project) {\n    Icon icon = getTestStateIcon(url, project);\n    return new Info(icon, TOOLTIP_PROVIDER, ExecutorAction.getActions(0));\n  }\n\n  private static Icon getTestStateIcon(@NotNull String url, @NotNull Project project) {\n    TestStateStorage.Record state = TestStateStorage.getInstance(project).getState(url);\n    if (state != null) {\n      TestStateInfo.Magnitude magnitude = TestIconMapper.getMagnitude(state.magnitude);\n      if (magnitude != null) {\n        switch (magnitude) {\n          case ERROR_INDEX:\n          case FAILED_INDEX:\n            return AllIcons.RunConfigurations.TestState.Red2;\n          case PASSED_INDEX:\n          case COMPLETE_INDEX:\n            return AllIcons.RunConfigurations.TestState.Green2;\n          default:\n        }\n      }\n    }\n    return AllIcons.RunConfigurations.TestState.Run;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/testing/GoTestRunningState.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.testing;\n\nimport com.goide.psi.GoFile;\nimport com.goide.psi.GoFunctionDeclaration;\nimport com.goide.runconfig.GoConsoleFilter;\nimport com.goide.runconfig.GoRunningState;\nimport com.goide.util.GoExecutor;\nimport com.intellij.execution.DefaultExecutionResult;\nimport com.intellij.execution.ExecutionException;\nimport com.intellij.execution.ExecutionResult;\nimport com.intellij.execution.Executor;\nimport com.intellij.execution.filters.TextConsoleBuilder;\nimport com.intellij.execution.filters.TextConsoleBuilderFactory;\nimport com.intellij.execution.process.ProcessHandler;\nimport com.intellij.execution.process.ProcessTerminatedListener;\nimport com.intellij.execution.runners.ExecutionEnvironment;\nimport com.intellij.execution.runners.ProgramRunner;\nimport com.intellij.execution.testframework.AbstractTestProxy;\nimport com.intellij.execution.testframework.actions.AbstractRerunFailedTestsAction;\nimport com.intellij.execution.testframework.autotest.ToggleAutoTestAction;\nimport com.intellij.execution.testframework.sm.SMTestRunnerConnectionUtil;\nimport com.intellij.execution.testframework.sm.runner.ui.SMTRunnerConsoleView;\nimport com.intellij.execution.ui.ConsoleView;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.util.io.FileUtil;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.openapi.vfs.LocalFileSystem;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.PsiManager;\nimport com.intellij.util.ObjectUtils;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.io.File;\nimport java.util.Collection;\nimport java.util.List;\n\npublic class GoTestRunningState extends GoRunningState<GoTestRunConfiguration> {\n  private String myCoverageFilePath;\n  private String myFailedTestsPattern;\n\n  public GoTestRunningState(@NotNull ExecutionEnvironment env, @NotNull Module module, @NotNull GoTestRunConfiguration configuration) {\n    super(env, module, configuration);\n  }\n\n  @NotNull\n  @Override\n  public ExecutionResult execute(@NotNull Executor executor, @NotNull ProgramRunner runner) throws ExecutionException {\n    ProcessHandler processHandler = startProcess();\n    TextConsoleBuilder consoleBuilder = TextConsoleBuilderFactory.getInstance().createBuilder(myConfiguration.getProject());\n    setConsoleBuilder(consoleBuilder);\n\n    GoTestConsoleProperties consoleProperties = new GoTestConsoleProperties(myConfiguration, executor);\n    String frameworkName = myConfiguration.getTestFramework().getName();\n    ConsoleView consoleView = SMTestRunnerConnectionUtil.createAndAttachConsole(frameworkName, processHandler, consoleProperties);\n    consoleView.addMessageFilter(new GoConsoleFilter(myConfiguration.getProject(), myModule, myConfiguration.getWorkingDirectoryUrl()));\n    ProcessTerminatedListener.attach(processHandler);\n\n    DefaultExecutionResult executionResult = new DefaultExecutionResult(consoleView, processHandler);\n    AbstractRerunFailedTestsAction rerunFailedTestsAction = consoleProperties.createRerunFailedTestsAction(consoleView);\n    if (rerunFailedTestsAction != null) {\n      rerunFailedTestsAction.setModelProvider(((SMTRunnerConsoleView)consoleView)::getResultsViewer);\n      executionResult.setRestartActions(rerunFailedTestsAction, new ToggleAutoTestAction());\n    }\n    else {\n      executionResult.setRestartActions(new ToggleAutoTestAction());\n    }\n    return executionResult;\n  }\n\n  @Override\n  protected GoExecutor patchExecutor(@NotNull GoExecutor executor) throws ExecutionException {\n    executor.withParameters(\"test\", \"-v\");\n    executor.withParameterString(myConfiguration.getGoToolParams());\n    switch (myConfiguration.getKind()) {\n      case DIRECTORY:\n        String relativePath = FileUtil.getRelativePath(myConfiguration.getWorkingDirectory(),\n                                                       myConfiguration.getDirectoryPath(),\n                                                       File.separatorChar);\n        // TODO Once Go gets support for covering multiple packages the ternary condition should be reverted\n        // See https://golang.org/issues/6909\n        String pathSuffix = myCoverageFilePath == null ? \"...\" : \".\";\n        if (relativePath != null && !\".\".equals(relativePath)) {\n          executor.withParameters(\"./\" + relativePath + \"/\" + pathSuffix);\n        }\n        else {\n          executor.withParameters(\"./\" + pathSuffix);\n          executor.withWorkDirectory(myConfiguration.getDirectoryPath());\n        }\n        addFilterParameter(executor, ObjectUtils.notNull(myFailedTestsPattern, myConfiguration.getPattern()));\n        break;\n      case PACKAGE:\n        executor.withParameters(myConfiguration.getPackage());\n        addFilterParameter(executor, ObjectUtils.notNull(myFailedTestsPattern, myConfiguration.getPattern()));\n        break;\n      case FILE:\n        String filePath = myConfiguration.getFilePath();\n        VirtualFile virtualFile = LocalFileSystem.getInstance().findFileByPath(filePath);\n        if (virtualFile == null) {\n          throw new ExecutionException(\"Test file doesn't exist\");\n        }\n        PsiFile file = PsiManager.getInstance(myConfiguration.getProject()).findFile(virtualFile);\n        if (file == null || !GoTestFinder.isTestFile(file)) {\n          throw new ExecutionException(\"File '\" + filePath + \"' is not test file\");\n        }\n\n        String importPath = ((GoFile)file).getImportPath(false);\n        if (StringUtil.isEmpty(importPath)) {\n          throw new ExecutionException(\"Cannot find import path for \" + filePath);\n        }\n\n        executor.withParameters(importPath);\n        addFilterParameter(executor, myFailedTestsPattern != null ? myFailedTestsPattern : buildFilterPatternForFile((GoFile)file));\n        break;\n    }\n\n    if (myCoverageFilePath != null) {\n      executor.withParameters(\"-coverprofile=\" + myCoverageFilePath, \"-covermode=atomic\");\n    }\n\n    return executor;\n  }\n\n  @NotNull\n  protected String buildFilterPatternForFile(GoFile file) {\n    Collection<String> testNames = ContainerUtil.newLinkedHashSet();\n    for (GoFunctionDeclaration function : file.getFunctions()) {\n      ContainerUtil.addIfNotNull(testNames, GoTestFinder.isTestOrExampleFunction(function) ? function.getName() : null);\n    }\n    return \"^\" + StringUtil.join(testNames, \"|\") + \"$\";\n  }\n\n  protected void addFilterParameter(@NotNull GoExecutor executor, String pattern) {\n    if (StringUtil.isNotEmpty(pattern)) {\n      executor.withParameters(\"-run\", pattern);\n    }\n  }\n\n  public void setCoverageFilePath(@Nullable String coverageFile) {\n    myCoverageFilePath = coverageFile;\n  }\n\n  public void setFailedTests(@NotNull List<AbstractTestProxy> failedTests) {\n    myFailedTestsPattern = \"^\" + StringUtil.join(failedTests, AbstractTestProxy::getName, \"|\") + \"$\";\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/testing/coverage/GoCoverageAnnotator.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.testing.coverage;\n\nimport com.intellij.coverage.BaseCoverageAnnotator;\nimport com.intellij.coverage.CoverageDataManager;\nimport com.intellij.coverage.CoverageSuite;\nimport com.intellij.coverage.CoverageSuitesBundle;\nimport com.intellij.openapi.components.ServiceManager;\nimport com.intellij.openapi.progress.ProgressIndicatorProvider;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.roots.FileIndexFacade;\nimport com.intellij.openapi.roots.ProjectRootManager;\nimport com.intellij.openapi.util.Factory;\nimport com.intellij.openapi.vfs.VfsUtilCore;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.openapi.vfs.VirtualFileVisitor;\nimport com.intellij.psi.PsiDirectory;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.rt.coverage.data.ProjectData;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\nimport org.jetbrains.annotations.TestOnly;\n\nimport java.text.DecimalFormat;\nimport java.text.DecimalFormatSymbols;\nimport java.util.Locale;\nimport java.util.Map;\n\npublic class GoCoverageAnnotator extends BaseCoverageAnnotator {\n  private static final String STATEMENTS_SUFFIX = \"% statements\";\n  private static final String FILES_SUFFIX = \"% files\";\n\n  private final Map<String, FileCoverageInfo> myFileCoverageInfos = ContainerUtil.newHashMap();\n  private final Map<String, DirCoverageInfo> myDirCoverageInfos = ContainerUtil.newHashMap();\n\n  public GoCoverageAnnotator(@NotNull Project project) {\n    super(project);\n  }\n\n  public static GoCoverageAnnotator getInstance(Project project) {\n    return ServiceManager.getService(project, GoCoverageAnnotator.class);\n  }\n\n  @Nullable\n  @Override\n  public String getDirCoverageInformationString(@NotNull PsiDirectory directory,\n                                                @NotNull CoverageSuitesBundle bundle,\n                                                @NotNull CoverageDataManager manager) {\n    DirCoverageInfo dirCoverageInfo = myDirCoverageInfos.get(directory.getVirtualFile().getPath());\n    if (dirCoverageInfo == null) {\n      return null;\n    }\n\n    if (manager.isSubCoverageActive()) {\n      return dirCoverageInfo.coveredLineCount > 0 ? \"covered\" : null;\n    }\n\n    return getDirCoverageString(dirCoverageInfo);\n  }\n\n  @Nullable\n  private static String getDirCoverageString(@NotNull DirCoverageInfo dirCoverageInfo) {\n    String filesCoverageInfo = getFilesCoverageString(dirCoverageInfo);\n    if (filesCoverageInfo != null) {\n      StringBuilder builder = new StringBuilder();\n      builder.append(filesCoverageInfo);\n      String statementsCoverageInfo = getStatementsCoverageString(dirCoverageInfo);\n      if (statementsCoverageInfo != null) {\n        builder.append(\", \").append(statementsCoverageInfo);\n      }\n      return builder.toString();\n    }\n    return null;\n  }\n\n  @Nullable\n  @TestOnly\n  public String getDirCoverageInformationString(@NotNull VirtualFile file) {\n    DirCoverageInfo coverageInfo = myDirCoverageInfos.get(file.getPath());\n    return coverageInfo != null ? getDirCoverageString(coverageInfo) : null;\n  }\n\n  @Nullable\n  @Override\n  public String getFileCoverageInformationString(@NotNull PsiFile file,\n                                                 @NotNull CoverageSuitesBundle bundle,\n                                                 @NotNull CoverageDataManager manager) {\n    FileCoverageInfo coverageInfo = myFileCoverageInfos.get(file.getVirtualFile().getPath());\n    if (coverageInfo == null) {\n      return null;\n    }\n\n    if (manager.isSubCoverageActive()) {\n      return coverageInfo.coveredLineCount > 0 ? \"covered\" : null;\n    }\n\n    return getStatementsCoverageString(coverageInfo);\n  }\n\n  @Nullable\n  @TestOnly\n  public String getFileCoverageInformationString(@NotNull VirtualFile file) {\n    FileCoverageInfo coverageInfo = myFileCoverageInfos.get(file.getPath());\n    return coverageInfo != null ? getStatementsCoverageString(coverageInfo) : null;\n  }\n\n  @Override\n  public void onSuiteChosen(CoverageSuitesBundle newSuite) {\n    super.onSuiteChosen(newSuite);\n    myFileCoverageInfos.clear();\n    myDirCoverageInfos.clear();\n  }\n\n  @Nullable\n  @Override\n  protected Runnable createRenewRequest(@NotNull CoverageSuitesBundle bundle, @NotNull CoverageDataManager manager) {\n    GoCoverageProjectData data = new GoCoverageProjectData();\n    for (CoverageSuite suite : bundle.getSuites()) {\n      ProjectData toMerge = suite.getCoverageData(manager);\n      if (toMerge != null) {\n        data.merge(toMerge);\n      }\n    }\n\n    return () -> {\n      annotateAllFiles(data, manager.doInReadActionIfProjectOpen(() -> ProjectRootManager.getInstance(getProject()).getContentRoots()));\n      manager.triggerPresentationUpdate();\n    };\n  }\n\n  @NotNull\n  private DirCoverageInfo getOrCreateDirectoryInfo(VirtualFile file) {\n    return ContainerUtil.getOrCreate(myDirCoverageInfos, file.getPath(), new Factory<DirCoverageInfo>() {\n      @Override\n      public DirCoverageInfo create() {\n        return new DirCoverageInfo();\n      }\n    });\n  }\n\n  @NotNull\n  private FileCoverageInfo getOrCreateFileInfo(VirtualFile file) {\n    return ContainerUtil.getOrCreate(myFileCoverageInfos, file.getPath(), new Factory<FileCoverageInfo>() {\n      @Override\n      public FileCoverageInfo create() {\n        return new FileCoverageInfo();\n      }\n    });\n  }\n\n  @Nullable\n  private static String getStatementsCoverageString(@NotNull FileCoverageInfo info) {\n    double percent = calcPercent(info.coveredLineCount, info.totalLineCount);\n    return info.totalLineCount > 0 ? new DecimalFormat(\"##.#\" + STATEMENTS_SUFFIX, DecimalFormatSymbols.getInstance(Locale.US))\n      .format(percent) : null;\n  }\n\n  @Nullable\n  private static String getFilesCoverageString(@NotNull DirCoverageInfo info) {\n    double percent = calcPercent(info.coveredFilesCount, info.totalFilesCount);\n    return info.totalFilesCount > 0\n           ? new DecimalFormat(\"##.#\" + FILES_SUFFIX, DecimalFormatSymbols.getInstance(Locale.US)).format(percent)\n           : null;\n  }\n\n  private static double calcPercent(int covered, int total) {\n    return total != 0 ? (double)covered / total : 0;\n  }\n\n  public void annotateAllFiles(@NotNull GoCoverageProjectData data,\n                               @Nullable VirtualFile... contentRoots) {\n    if (contentRoots != null) {\n      for (VirtualFile root : contentRoots) {\n        VfsUtilCore.visitChildrenRecursively(root, new VirtualFileVisitor() {\n          @NotNull\n          @Override\n          public Result visitFileEx(@NotNull VirtualFile file) {\n            ProgressIndicatorProvider.checkCanceled();\n\n            if (file.isDirectory() && !FileIndexFacade.getInstance(getProject()).isInContent(file)) {\n              return SKIP_CHILDREN;\n            }\n            if (!file.isDirectory() && GoCoverageEngine.INSTANCE.coverageProjectViewStatisticsApplicableTo(file)) {\n              DirCoverageInfo dirCoverageInfo = getOrCreateDirectoryInfo(file.getParent());\n              FileCoverageInfo fileCoverageInfo = getOrCreateFileInfo(file);\n              data.processFile(file.getPath(), rangeData -> {\n                if (rangeData.hits > 0) {\n                  fileCoverageInfo.coveredLineCount += rangeData.statements;\n                }\n                fileCoverageInfo.totalLineCount += rangeData.statements;\n                return true;\n              });\n\n              if (fileCoverageInfo.totalLineCount > 0) {\n                dirCoverageInfo.totalLineCount += fileCoverageInfo.totalLineCount;\n                dirCoverageInfo.totalFilesCount++;\n              }\n              if (fileCoverageInfo.coveredLineCount > 0) {\n                dirCoverageInfo.coveredLineCount += fileCoverageInfo.coveredLineCount;\n                dirCoverageInfo.coveredFilesCount++;\n              }\n            }\n            return CONTINUE;\n          }\n\n          @Override\n          public void afterChildrenVisited(@NotNull VirtualFile file) {\n            if (file.isDirectory()) {\n              DirCoverageInfo currentCoverageInfo = getOrCreateDirectoryInfo(file);\n              DirCoverageInfo parentCoverageInfo = getOrCreateDirectoryInfo(file.getParent());\n              parentCoverageInfo.totalFilesCount += currentCoverageInfo.totalFilesCount;\n              parentCoverageInfo.coveredFilesCount += currentCoverageInfo.coveredFilesCount;\n              parentCoverageInfo.totalLineCount += currentCoverageInfo.totalLineCount;\n              parentCoverageInfo.coveredLineCount += currentCoverageInfo.coveredLineCount;\n            }\n          }\n        });\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/testing/coverage/GoCoverageEnabledConfiguration.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.testing.coverage;\n\nimport com.goide.runconfig.testing.GoTestRunConfiguration;\nimport com.intellij.coverage.CoverageRunner;\nimport com.intellij.execution.configurations.coverage.CoverageEnabledConfiguration;\n\npublic class GoCoverageEnabledConfiguration extends CoverageEnabledConfiguration {\n  public GoCoverageEnabledConfiguration(GoTestRunConfiguration configuration) {\n    super(configuration);\n    setCoverageRunner(CoverageRunner.getInstance(GoCoverageRunner.class));\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/testing/coverage/GoCoverageEngine.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.testing.coverage;\n\nimport com.goide.GoFileType;\nimport com.goide.runconfig.testing.GoTestFinder;\nimport com.goide.runconfig.testing.GoTestRunConfiguration;\nimport com.intellij.coverage.*;\nimport com.intellij.coverage.view.CoverageViewExtension;\nimport com.intellij.coverage.view.CoverageViewManager;\nimport com.intellij.coverage.view.DirectoryCoverageViewExtension;\nimport com.intellij.execution.configurations.RunConfigurationBase;\nimport com.intellij.execution.configurations.coverage.CoverageEnabledConfiguration;\nimport com.intellij.execution.testframework.AbstractTestProxy;\nimport com.intellij.ide.util.treeView.AbstractTreeNode;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.Condition;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.io.File;\nimport java.util.Collections;\nimport java.util.Date;\nimport java.util.List;\nimport java.util.Set;\n\npublic class GoCoverageEngine extends CoverageEngine {\n  private static final Condition<AbstractTreeNode> NODE_TO_COVERAGE = node -> {\n    Object value = node.getValue();\n    if (value instanceof PsiFile) {\n      return isProductionGoFile((PsiFile)value);\n    }\n    return !StringUtil.equals(node.getName(), Project.DIRECTORY_STORE_FOLDER);\n  };\n\n  public static final GoCoverageEngine INSTANCE = new GoCoverageEngine();\n  private static final String PRESENTABLE_TEXT = \"Go Coverage\";\n\n  @Override\n  public boolean isApplicableTo(@Nullable RunConfigurationBase conf) {\n    return conf instanceof GoTestRunConfiguration;\n  }\n\n  @Override\n  public boolean canHavePerTestCoverage(@Nullable RunConfigurationBase conf) {\n    return false;\n  }\n\n  @NotNull\n  @Override\n  public CoverageEnabledConfiguration createCoverageEnabledConfiguration(@Nullable RunConfigurationBase conf) {\n    return new GoCoverageEnabledConfiguration((GoTestRunConfiguration)conf);\n  }\n\n  @Override\n  public CoverageSuite createCoverageSuite(@NotNull CoverageRunner runner,\n                                           @NotNull String name,\n                                           @NotNull CoverageFileProvider coverageDataFileProvider,\n                                           @Nullable String[] filters,\n                                           long lastCoverageTimeStamp,\n                                           @Nullable String suiteToMerge,\n                                           boolean coverageByTestEnabled,\n                                           boolean tracingEnabled,\n                                           boolean trackTestFolders,\n                                           Project project) {\n    return new GoCoverageSuite(name, coverageDataFileProvider, lastCoverageTimeStamp, runner, project);\n  }\n\n  @Override\n  public CoverageSuite createCoverageSuite(@NotNull CoverageRunner runner,\n                                           @NotNull String name,\n                                           @NotNull CoverageFileProvider coverageDataFileProvider,\n                                           @NotNull CoverageEnabledConfiguration config) {\n    if (config instanceof GoCoverageEnabledConfiguration) {\n      return new GoCoverageSuite(name, coverageDataFileProvider, new Date().getTime(), runner, config.getConfiguration().getProject());\n    }\n    return null;\n  }\n\n  @Override\n  public CoverageSuite createEmptyCoverageSuite(@NotNull CoverageRunner coverageRunner) {\n    return new GoCoverageSuite();\n  }\n\n  @NotNull\n  @Override\n  public CoverageAnnotator getCoverageAnnotator(Project project) {\n    return GoCoverageAnnotator.getInstance(project);\n  }\n\n  @Override\n  public boolean coverageEditorHighlightingApplicableTo(@NotNull PsiFile psiFile) {\n    return isProductionGoFile(psiFile);\n  }\n\n  @Override\n  public boolean acceptedByFilters(@NotNull PsiFile psiFile, @NotNull CoverageSuitesBundle suite) {\n    return isProductionGoFile(psiFile);\n  }\n\n  private static boolean isProductionGoFile(@NotNull PsiFile psiFile) {\n    return psiFile.getFileType() == GoFileType.INSTANCE && !GoTestFinder.isTestFile(psiFile);\n  }\n\n  @Override\n  public boolean recompileProjectAndRerunAction(@NotNull Module module,\n                                                @NotNull CoverageSuitesBundle suite,\n                                                @NotNull Runnable chooseSuiteAction) {\n    return false;\n  }\n\n  @Override\n  public String getQualifiedName(@NotNull File outputFile, @NotNull PsiFile sourceFile) {\n    return sourceFile.getVirtualFile().getPath();\n  }\n\n  @NotNull\n  @Override\n  public Set<String> getQualifiedNames(@NotNull PsiFile sourceFile) {\n    return Collections.singleton(sourceFile.getVirtualFile().getPath());\n  }\n\n  @Override\n  public boolean includeUntouchedFileInCoverage(@NotNull String qualifiedName,\n                                                @NotNull File outputFile,\n                                                @NotNull PsiFile sourceFile,\n                                                @NotNull CoverageSuitesBundle suite) {\n    return false;\n  }\n\n  @Override\n  public List<Integer> collectSrcLinesForUntouchedFile(@NotNull File classFile, @NotNull CoverageSuitesBundle suite) {\n    return null;\n  }\n\n  @Override\n  public List<PsiElement> findTestsByNames(@NotNull String[] testNames, @NotNull Project project) {\n    return Collections.emptyList();\n  }\n\n  @Override\n  public String getTestMethodName(@NotNull PsiElement element, @NotNull AbstractTestProxy testProxy) {\n    return null;\n  }\n\n  @Override\n  public String getPresentableText() {\n    return PRESENTABLE_TEXT;\n  }\n\n  @Override\n  public boolean coverageProjectViewStatisticsApplicableTo(VirtualFile fileOrDir) {\n    return !fileOrDir.isDirectory() && fileOrDir.getFileType() == GoFileType.INSTANCE && !GoTestFinder.isTestFile(fileOrDir);\n  }\n\n  @Override\n  public CoverageViewExtension createCoverageViewExtension(Project project,\n                                                           CoverageSuitesBundle suiteBundle,\n                                                           CoverageViewManager.StateBean stateBean) {\n    return new DirectoryCoverageViewExtension(project, getCoverageAnnotator(project), suiteBundle, stateBean) {\n      @Override\n      public List<AbstractTreeNode> getChildrenNodes(AbstractTreeNode node) {\n        return ContainerUtil.filter(super.getChildrenNodes(node), NODE_TO_COVERAGE);\n      }\n    };\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/testing/coverage/GoCoverageProgramRunner.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.testing.coverage;\n\nimport com.goide.runconfig.testing.GoTestRunConfiguration;\nimport com.goide.runconfig.testing.GoTestRunningState;\nimport com.intellij.coverage.CoverageExecutor;\nimport com.intellij.coverage.CoverageHelper;\nimport com.intellij.coverage.CoverageRunnerData;\nimport com.intellij.execution.ExecutionException;\nimport com.intellij.execution.ExecutionResult;\nimport com.intellij.execution.configurations.ConfigurationInfoProvider;\nimport com.intellij.execution.configurations.RunProfile;\nimport com.intellij.execution.configurations.RunProfileState;\nimport com.intellij.execution.configurations.RunnerSettings;\nimport com.intellij.execution.configurations.coverage.CoverageEnabledConfiguration;\nimport com.intellij.execution.runners.ExecutionEnvironment;\nimport com.intellij.execution.runners.GenericProgramRunner;\nimport com.intellij.execution.runners.RunContentBuilder;\nimport com.intellij.execution.ui.RunContentDescriptor;\nimport com.intellij.openapi.fileEditor.FileDocumentManager;\nimport com.intellij.util.ObjectUtils;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoCoverageProgramRunner extends GenericProgramRunner {\n  private static final String ID = \"GoCoverageProgramRunner\";\n\n  @NotNull\n  @Override\n  public String getRunnerId() {\n    return ID;\n  }\n\n  @Override\n  public boolean canRun(@NotNull String executorId, @NotNull RunProfile profile) {\n    return executorId.equals(CoverageExecutor.EXECUTOR_ID) && profile instanceof GoTestRunConfiguration;\n  }\n\n  @Override\n  public RunnerSettings createConfigurationData(ConfigurationInfoProvider settingsProvider) {\n    return new CoverageRunnerData();\n  }\n\n  @Nullable\n  @Override\n  protected RunContentDescriptor doExecute(@NotNull RunProfileState state, @NotNull ExecutionEnvironment environment)\n    throws ExecutionException {\n    assert state instanceof GoTestRunningState;\n    GoTestRunningState runningState = (GoTestRunningState)state;\n    GoTestRunConfiguration runConfiguration = ObjectUtils.tryCast(environment.getRunProfile(), GoTestRunConfiguration.class);\n    if (runConfiguration == null) {\n      return null;\n    }\n    FileDocumentManager.getInstance().saveAllDocuments();\n    CoverageEnabledConfiguration coverageEnabledConfiguration = CoverageEnabledConfiguration.getOrCreate(runConfiguration);\n    runningState.setCoverageFilePath(coverageEnabledConfiguration.getCoverageFilePath());\n\n    ExecutionResult executionResult = state.execute(environment.getExecutor(), this);\n    if (executionResult == null) {\n      return null;\n    }\n    CoverageHelper.attachToProcess(runConfiguration, executionResult.getProcessHandler(), environment.getRunnerSettings());\n    return new RunContentBuilder(executionResult, environment).showRunContent(environment.getContentToReuse());\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/testing/coverage/GoCoverageProjectData.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.testing.coverage;\n\nimport com.intellij.openapi.util.Factory;\nimport com.intellij.rt.coverage.data.CoverageData;\nimport com.intellij.rt.coverage.data.ProjectData;\nimport com.intellij.util.Processor;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.Map;\n\npublic class GoCoverageProjectData extends ProjectData {\n  @NotNull\n  private final Map<String, FileData> myFilesData = ContainerUtil.newHashMap();\n\n  public void processFiles(@NotNull Processor<FileData> processor) {\n    for (FileData fileData : myFilesData.values()) {\n      if (!processor.process(fileData)) {\n        return;\n      }\n    }\n  }\n\n  public void processFile(@NotNull String filePath, @NotNull Processor<RangeData> processor) {\n    FileData fileData = myFilesData.get(filePath);\n    if (fileData != null) {\n      for (RangeData rangeData : fileData.myRangesData.values()) {\n        if (!processor.process(rangeData)) {\n          return;\n        }\n      }\n    }\n  }\n\n  public void addData(String filePath, int startLine, int startColumn, int endLine, int endColumn, int statements, int hits) {\n    FileData fileData = ContainerUtil.getOrCreate(myFilesData, filePath, new Factory<FileData>() {\n      @Override\n      public FileData create() {\n        return new FileData(filePath);\n      }\n    });\n    fileData.add(startLine, startColumn, endLine, endColumn, statements, hits);\n  }\n\n  @Override\n  public void merge(CoverageData data) {\n    super.merge(data);\n    if (data instanceof GoCoverageProjectData) {\n      for (Map.Entry<String, FileData> entry : ((GoCoverageProjectData)data).myFilesData.entrySet()) {\n        String filePath = entry.getKey();\n        FileData fileData = myFilesData.get(filePath);\n        FileData fileDataToMerge = entry.getValue();\n        if (fileData != null) {\n          for (Map.Entry<String, RangeData> dataEntry : fileDataToMerge.myRangesData.entrySet()) {\n            RangeData existingRangeData = fileData.myRangesData.get(dataEntry.getKey());\n            if (existingRangeData != null) {\n              fileData.myRangesData.put(dataEntry.getKey(),\n                                        new RangeData(existingRangeData.startLine, existingRangeData.startColumn, existingRangeData.endLine,\n                                                      existingRangeData.endColumn, existingRangeData.statements,\n                                                      existingRangeData.hits + dataEntry.getValue().hits));\n            }\n            else {\n              fileData.myRangesData.put(dataEntry.getKey(), dataEntry.getValue());\n            }\n          }\n        }\n        else {\n          myFilesData.put(filePath, fileDataToMerge);\n        }\n      }\n    }\n  }\n\n  @Override\n  public boolean equals(Object o) {\n    if (this == o) return true;\n    if (!(o instanceof GoCoverageProjectData)) return false;\n\n    GoCoverageProjectData data = (GoCoverageProjectData)o;\n    return myFilesData.equals(data.myFilesData);\n  }\n\n  @Override\n  public int hashCode() {\n    return myFilesData.hashCode();\n  }\n\n  public static class FileData {\n    @NotNull\n    public final String myFilePath;\n    @NotNull\n    public final Map<String, RangeData> myRangesData = ContainerUtil.newHashMap();\n\n    public FileData(@NotNull String filePath) {\n      myFilePath = filePath;\n    }\n\n    public void add(int startLine, int startColumn, int endLine, int endColumn, int statements, int hits) {\n      myRangesData.put(rangeKey(startLine, startColumn, endLine, endColumn),\n                       new RangeData(startLine, startColumn, endLine, endColumn, statements, hits));\n    }\n\n    @Override\n    public boolean equals(Object o) {\n      if (this == o) return true;\n      if (!(o instanceof FileData)) return false;\n\n      FileData fileData = (FileData)o;\n\n      if (!myFilePath.equals(fileData.myFilePath)) return false;\n      return myRangesData.equals(fileData.myRangesData);\n    }\n\n    @Override\n    public int hashCode() {\n      int result = myFilePath.hashCode();\n      result = 31 * result + myRangesData.hashCode();\n      return result;\n    }\n  }\n\n  public static class RangeData {\n    public final int startLine;\n    public final int startColumn;\n    public final int endLine;\n    public final int endColumn;\n    public final int hits;\n    public final int statements;\n\n    public RangeData(int startLine, int startColumn, int endLine, int endColumn, int statements, int hits) {\n      this.startLine = startLine;\n      this.startColumn = startColumn;\n      this.endLine = endLine;\n      this.endColumn = endColumn;\n      this.hits = hits;\n      this.statements = statements;\n    }\n\n    @Override\n    public boolean equals(Object o) {\n      if (this == o) return true;\n      if (!(o instanceof RangeData)) return false;\n\n      RangeData data = (RangeData)o;\n\n      if (startLine != data.startLine) return false;\n      if (startColumn != data.startColumn) return false;\n      if (endLine != data.endLine) return false;\n      if (endColumn != data.endColumn) return false;\n      if (hits != data.hits) return false;\n      return statements == data.statements;\n    }\n\n    @Override\n    public int hashCode() {\n      int result = startLine;\n      result = 31 * result + startColumn;\n      result = 31 * result + endLine;\n      result = 31 * result + endColumn;\n      result = 31 * result + hits;\n      result = 31 * result + statements;\n      return result;\n    }\n\n    @Override\n    public String toString() {\n      return rangeKey(startLine, startColumn, endLine, endColumn) + \"; hits: \" + hits + \"; statements: \" + statements;\n    }\n  }\n\n  private static String rangeKey(int startLine, int startColumn, int endLine, int endColumn) {\n    return startLine + \":\" + startColumn + \"-\" + endLine + \":\" + endColumn;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/testing/coverage/GoCoverageRunner.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.testing.coverage;\n\nimport com.goide.GoConstants;\nimport com.goide.sdk.GoPackageUtil;\nimport com.intellij.coverage.BaseCoverageSuite;\nimport com.intellij.coverage.CoverageEngine;\nimport com.intellij.coverage.CoverageRunner;\nimport com.intellij.coverage.CoverageSuite;\nimport com.intellij.execution.configurations.ModuleBasedConfiguration;\nimport com.intellij.execution.configurations.RunConfigurationBase;\nimport com.intellij.openapi.diagnostic.Logger;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.rt.coverage.data.ClassData;\nimport com.intellij.rt.coverage.data.LineData;\nimport com.intellij.rt.coverage.data.ProjectData;\nimport gnu.trove.TIntObjectHashMap;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.io.*;\nimport java.util.List;\n\npublic class GoCoverageRunner extends CoverageRunner {\n  private static final Logger LOG = Logger.getInstance(GoCoverageRunner.class);\n\n  private static final String ID = \"GoCoverage\";\n  private static final String DATA_FILE_EXTENSION = \"out\";\n  private static final String PRESENTABLE_NAME = GoConstants.GO;\n\n  @Override\n  public ProjectData loadCoverageData(@NotNull File sessionDataFile, @Nullable CoverageSuite baseCoverageSuite) {\n    if (!(baseCoverageSuite instanceof BaseCoverageSuite)) {\n      return null;\n    }\n    Project project = baseCoverageSuite.getProject();\n    if (project == null) {\n      return null;\n    }\n    RunConfigurationBase configuration = ((BaseCoverageSuite)baseCoverageSuite).getConfiguration();\n    Module module = configuration instanceof ModuleBasedConfiguration\n                    ? ((ModuleBasedConfiguration)configuration).getConfigurationModule().getModule()\n                    : null;\n\n    try {\n      BufferedReader reader = new BufferedReader(new FileReader(sessionDataFile.getAbsolutePath()));\n      try {\n        return parseCoverage(reader, project, module);\n      }\n      catch (IOException e) {\n        LOG.warn(e);\n      }\n      finally {\n        try {\n          reader.close();\n        }\n        catch (IOException e) {\n          LOG.warn(e);\n        }\n      }\n    }\n    catch (FileNotFoundException e) {\n      LOG.warn(e);\n    }\n\n    return null;\n  }\n\n  @Nullable\n  public static GoCoverageProjectData parseCoverage(@NotNull BufferedReader dataReader,\n                                                    @NotNull Project project,\n                                                    @Nullable Module module) throws IOException {\n    GoCoverageProjectData result = new GoCoverageProjectData();\n    String line;\n\n    while ((line = dataReader.readLine()) != null) {\n      if (line.isEmpty()) continue;\n      List<String> fileNameTail = StringUtil.split(line, \":\");\n      VirtualFile file = GoPackageUtil.findByImportPath(fileNameTail.get(0), project, module);\n      if (file == null) continue;\n      String filePath = file.getPath();\n\n      List<String> tailParts = StringUtil.split(fileNameTail.get(1), \" \");\n      if (tailParts.size() != 3) continue;\n\n      int statements = Integer.parseInt(tailParts.get(1));\n      int hit = Integer.parseInt(tailParts.get(2));\n\n      String offsets = tailParts.get(0);\n      int firstDot = offsets.indexOf('.');\n      int comma = offsets.indexOf(',', firstDot);\n      int secondDot = offsets.indexOf('.', comma);\n      if (firstDot == -1 || comma == -1 || secondDot == -1) continue;\n\n      int lineStart = Integer.parseInt(offsets.substring(0, firstDot));\n      int columnStart = Integer.parseInt(offsets.substring(firstDot + 1, comma));\n      int lineEnd = Integer.parseInt(offsets.substring(comma + 1, secondDot));\n      int columnEnd = Integer.parseInt(offsets.substring(secondDot + 1));\n\n      result.addData(filePath, lineStart, columnStart, lineEnd, columnEnd, statements, hit);\n    }\n\n    result.processFiles(fileData -> {\n      ClassData classData = result.getOrCreateClassData(fileData.myFilePath);\n      int max = -1;\n      TIntObjectHashMap<LineData> linesMap = new TIntObjectHashMap<>();\n      for (GoCoverageProjectData.RangeData rangeData : fileData.myRangesData.values()) {\n        for (int i = rangeData.startLine; i <= rangeData.endLine; i++) {\n          LineData existingData = linesMap.get(i);\n          if (existingData != null) {\n            existingData.setHits(existingData.getHits() + rangeData.hits);\n            // emulate partial\n            existingData.setFalseHits(0, 0);\n            existingData.setTrueHits(0, 0);\n          }\n          else {\n            LineData newData = new LineData(i, null);\n            newData.setHits(newData.getHits() + rangeData.hits);\n            linesMap.put(i, newData);\n          }\n        }\n        max = Math.max(max, rangeData.endLine);\n      }\n\n      LineData[] linesArray = new LineData[max + 1];\n      linesMap.forEachValue(data -> {\n        data.fillArrays();\n        linesArray[data.getLineNumber()] = data;\n        return true;\n      });\n      classData.setLines(linesArray);\n      return true;\n    });\n\n    return result;\n  }\n\n  @Override\n  public String getPresentableName() {\n    return PRESENTABLE_NAME;\n  }\n\n  @Override\n  public String getId() {\n    return ID;\n  }\n\n  @Override\n  public String getDataFileExtension() {\n    return DATA_FILE_EXTENSION;\n  }\n\n  @Override\n  public boolean acceptsCoverageEngine(@NotNull CoverageEngine engine) {\n    return engine instanceof GoCoverageEngine;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/testing/coverage/GoCoverageSuite.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.testing.coverage;\n\nimport com.intellij.coverage.BaseCoverageSuite;\nimport com.intellij.coverage.CoverageEngine;\nimport com.intellij.coverage.CoverageFileProvider;\nimport com.intellij.coverage.CoverageRunner;\nimport com.intellij.openapi.project.Project;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoCoverageSuite extends BaseCoverageSuite {\n  public GoCoverageSuite() {\n  }\n\n  public GoCoverageSuite(String name,\n                         @Nullable CoverageFileProvider fileProvider,\n                         long lastCoverageTimeStamp,\n                         CoverageRunner coverageRunner,\n                         Project project) {\n    super(name, fileProvider, lastCoverageTimeStamp, false, false, false, coverageRunner, project);\n  }\n\n  @NotNull\n  @Override\n  public CoverageEngine getCoverageEngine() {\n    return GoCoverageEngine.INSTANCE;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/testing/frameworks/gobench/GobenchEventsConverter.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.testing.frameworks.gobench;\n\nimport com.goide.GoConstants;\nimport com.goide.runconfig.testing.frameworks.gotest.GoTestEventsConverterBaseImpl;\nimport com.intellij.execution.testframework.TestConsoleProperties;\nimport com.intellij.openapi.util.Key;\nimport com.intellij.openapi.util.text.StringUtil;\nimport jetbrains.buildServer.messages.serviceMessages.ServiceMessageVisitor;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.text.ParseException;\nimport java.util.regex.Matcher;\nimport java.util.regex.Pattern;\n\npublic class GobenchEventsConverter extends GoTestEventsConverterBaseImpl {\n  private static final Pattern RUN = Pattern.compile(\"^(Benchmark(\" + GoConstants.TEST_NAME_REGEX + \")?)\");\n  private static final Pattern FAIL = Pattern.compile(\"^--- FAIL: (Benchmark(\" + GoConstants.TEST_NAME_REGEX + \")?).*\");\n\n  public GobenchEventsConverter(@NotNull TestConsoleProperties properties) {\n    super(GobenchFramework.NAME, properties);\n  }\n\n  @Override\n  protected int processLine(@NotNull String line, int start, Key outputType, ServiceMessageVisitor visitor) throws ParseException {\n    Matcher matcher;\n    if ((matcher = RUN.matcher(line)).find(start)) {\n      startTest(matcher.group(1), visitor);\n      int newStartOffset = findFirstNonWSIndex(line, matcher.end(1));\n      return newStartOffset != -1 ? newStartOffset : line.length();\n    }\n    if ((matcher = FAIL.matcher(line.substring(start))).find()) {\n      finishTest(matcher.group(1), TestResult.FAILED, visitor);\n      int newStartOffset = findFirstNonWSIndex(line, start + matcher.end(1));\n      return newStartOffset != -1 ? newStartOffset : line.length();\n    }\n    return start;\n  }\n\n  @Override\n  protected void startTest(@NotNull String testName, @Nullable ServiceMessageVisitor visitor) throws ParseException {\n    String currentTestName = getCurrentTestName();\n    if (currentTestName != null && !currentTestName.equals(testName)) {\n      // previous test didn't fail, finish it as passed\n      finishTest(currentTestName, TestResult.PASSED, visitor);\n    }\n    super.startTest(testName, visitor);\n  }\n\n  private static int findFirstNonWSIndex(@NotNull String text, int startOffset) {\n    int whitespaceIndex = StringUtil.indexOfAny(text, \" \\t\", startOffset, text.length());\n    if (whitespaceIndex != -1) {\n      int newStartOffset = whitespaceIndex;\n      while (newStartOffset < text.length() && Character.isWhitespace(text.charAt(newStartOffset))) newStartOffset++;\n      return newStartOffset;\n    }\n    return -1;\n  }\n}"
  },
  {
    "path": "src/com/goide/runconfig/testing/frameworks/gobench/GobenchFramework.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.testing.frameworks.gobench;\n\nimport com.goide.psi.GoFunctionDeclaration;\nimport com.goide.psi.GoFunctionOrMethodDeclaration;\nimport com.goide.runconfig.testing.GoTestFinder;\nimport com.goide.runconfig.testing.GoTestFramework;\nimport com.goide.runconfig.testing.GoTestRunConfiguration;\nimport com.goide.runconfig.testing.GoTestRunningState;\nimport com.intellij.execution.runners.ExecutionEnvironment;\nimport com.intellij.execution.testframework.TestConsoleProperties;\nimport com.intellij.execution.testframework.sm.runner.OutputToGeneralTestEventsConverter;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.psi.PsiFile;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GobenchFramework extends GoTestFramework {\n  public static final String NAME = \"gobench\";\n  public static final GobenchFramework INSTANCE = new GobenchFramework();\n\n  @NotNull\n  @Override\n  public String getName() {\n    return NAME;\n  }\n\n  @Override\n  public boolean isAvailable(@Nullable Module module) {\n    return true;\n  }\n\n  @Override\n  public boolean isAvailableOnFile(@Nullable PsiFile file) {\n    return GoTestFinder.isTestFile(file);\n  }\n\n  @Override\n  public boolean isAvailableOnFunction(@Nullable GoFunctionOrMethodDeclaration functionOrMethodDeclaration) {\n    return functionOrMethodDeclaration instanceof GoFunctionDeclaration && GoTestFinder.isBenchmarkFunction(functionOrMethodDeclaration);\n  }\n\n  @NotNull\n  @Override\n  protected GoTestRunningState newRunningState(@NotNull ExecutionEnvironment env,\n                                               @NotNull Module module,\n                                               @NotNull GoTestRunConfiguration runConfiguration) {\n    return new GobenchRunningState(env, module, runConfiguration);\n  }\n\n  @NotNull\n  @Override\n  public OutputToGeneralTestEventsConverter createTestEventsConverter(@NotNull TestConsoleProperties consoleProperties) {\n    return new GobenchEventsConverter(consoleProperties);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/testing/frameworks/gobench/GobenchRunConfigurationProducer.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.testing.frameworks.gobench;\n\nimport com.goide.runconfig.testing.GoTestRunConfigurationProducerBase;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GobenchRunConfigurationProducer extends GoTestRunConfigurationProducerBase implements Cloneable {\n  public GobenchRunConfigurationProducer() {\n    super(GobenchFramework.INSTANCE);\n  }\n\n  @NotNull\n  @Override\n  protected String getPackageConfigurationName(@NotNull String packageName) {\n    return \"gobench package '\" + packageName + \"'\";\n  }\n\n  @NotNull\n  @Override\n  protected String getFileConfigurationName(@NotNull String fileName) {\n    return \"gobench \" + super.getFileConfigurationName(fileName);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/testing/frameworks/gobench/GobenchRunningState.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.testing.frameworks.gobench;\n\nimport com.goide.psi.GoFile;\nimport com.goide.psi.GoFunctionDeclaration;\nimport com.goide.runconfig.testing.GoTestFinder;\nimport com.goide.runconfig.testing.GoTestRunConfiguration;\nimport com.goide.runconfig.testing.GoTestRunningState;\nimport com.goide.util.GoExecutor;\nimport com.intellij.execution.runners.ExecutionEnvironment;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.Collection;\n\npublic class GobenchRunningState extends GoTestRunningState {\n  public GobenchRunningState(ExecutionEnvironment env, Module module, GoTestRunConfiguration configuration) {\n    super(env, module, configuration);\n  }\n\n  @NotNull\n  @Override\n  protected String buildFilterPatternForFile(GoFile file) {\n    Collection<String> benchmarkNames = ContainerUtil.newLinkedHashSet();\n    for (GoFunctionDeclaration function : file.getFunctions()) {\n      ContainerUtil.addIfNotNull(benchmarkNames, GoTestFinder.isBenchmarkFunction(function) ? function.getName() : null);\n    }\n    return \"^\" + StringUtil.join(benchmarkNames, \"|\") + \"$\";\n  }\n\n  @Override\n  protected void addFilterParameter(@NotNull GoExecutor executor, String pattern) {\n    executor.withParameters(\"-bench\", StringUtil.isEmpty(pattern) ? \".\" : pattern);\n    executor.withParameters(\"-run\", \"^$\");\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/testing/frameworks/gocheck/GocheckEventsConverter.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.testing.frameworks.gocheck;\n\nimport com.goide.runconfig.testing.GoTestEventsConverterBase;\nimport com.goide.runconfig.testing.GoTestLocator;\nimport com.intellij.execution.testframework.TestConsoleProperties;\nimport com.intellij.execution.testframework.sm.ServiceMessageBuilder;\nimport com.intellij.execution.testframework.sm.runner.OutputToGeneralTestEventsConverter;\nimport com.intellij.openapi.util.Key;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.util.containers.ContainerUtil;\nimport jetbrains.buildServer.messages.serviceMessages.ServiceMessageVisitor;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.text.ParseException;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.regex.Matcher;\nimport java.util.regex.Pattern;\n\nimport static com.intellij.openapi.util.Pair.pair;\n\npublic class GocheckEventsConverter extends OutputToGeneralTestEventsConverter implements GoTestEventsConverterBase {\n  private static final String FRAMEWORK_NAME = \"gocheck\";\n\n  /*\n   * Scope hierarchy looks like this:\n   *\n   * GLOBAL\n   *   SUITE\n   *     SUITE_SETUP\n   *     TEST\n   *       TEST_SETUP\n   *       TEST_TEARDOWN\n   *     SUITE_TEARDOWN\n   */\n  private enum Scope {\n    GLOBAL,\n    SUITE,\n    SUITE_SETUP,\n    SUITE_TEARDOWN,\n    TEST,\n    TEST_SETUP,\n    TEST_TEARDOWN\n  }\n\n  private static final Pattern SUITE_START = Pattern.compile(\"=== RUN (.+)\\\\s*$\");\n  private static final Pattern SUITE_END = Pattern.compile(\"((PASS)|(FAIL))\\\\s*$\");\n  private static final Pattern TEST_START = Pattern.compile(\"(.*)START: [^:]+:\\\\d+: ([^\\\\s]+)\\\\s*$\");\n  private static final Pattern TEST_PASSED = Pattern.compile(\"(.*)PASS: [^:]+:\\\\d+: ([^\\\\s]+)\\\\t[^\\\\s]+\\\\s*$\");\n  private static final Pattern TEST_FAILED = Pattern.compile(\"(.*)FAIL: [^:]+:\\\\d+: ([^\\\\s]+)\\\\s*$\");\n  private static final Pattern TEST_PANICKED = Pattern.compile(\"(.*)PANIC: [^:]+:\\\\d+: ([^\\\\s]+)\\\\s*$\");\n  private static final Pattern TEST_MISSED = Pattern.compile(\"(.*)MISS: [^:]+:\\\\d+: ([^\\\\s]+)\\\\s*$\");\n  private static final Pattern TEST_SKIPPED = Pattern.compile(\"(.*)SKIP: [^:]+:\\\\d+: ([^\\\\s]+)( \\\\(.*\\\\))?\\\\s*$\");\n  private static final Pattern ERROR_LOCATION = Pattern.compile(\"(.*:\\\\d+):\\\\s*$\");\n  private static final Pattern ERROR_ACTUAL = Pattern.compile(\"\\\\.\\\\.\\\\. ((obtained)|(value)) (.*?)( \\\\+)?\\\\s*$\");\n  private static final Pattern ERROR_EXPECTED = Pattern.compile(\"\\\\.\\\\.\\\\. ((expected)|(regex)) (.*?)( \\\\+)?\\\\s*$\");\n  private static final Pattern ERROR_CONTINUATION = Pattern.compile(\"\\\\.\\\\.\\\\. {5}(.*?)( +\\\\+)?\\\\s*$\");\n  private static final Pattern PANIC_VALUE = Pattern.compile(\"(.*)\\\\.\\\\.\\\\. (Panic: .* \\\\(.*\\\\)\\\\s*)$\");\n\n  private Scope myScope = Scope.GLOBAL;\n  private String mySuiteName;\n  private String myTestName;\n  private long myCurrentTestStart;\n  private TestResult myFixtureFailure;\n  private List<String> myStdOut;\n\n  private enum Status {\n    PASSED, FAILED, PANICKED, MISSED, SKIPPED\n  }\n\n  private static final class TestResult {\n    private final Status myStatus;\n    private final Map<String, String> myAttributes = ContainerUtil.newHashMap();\n\n    TestResult(@NotNull Status status) {\n      this(status, null);\n    }\n\n    TestResult(@NotNull Status status, @Nullable Map<String, String> attributes) {\n      myStatus = status;\n      if (attributes != null) myAttributes.putAll(attributes);\n    }\n\n    @NotNull\n    public Status getStatus() {\n      return myStatus;\n    }\n\n    public void addAttributesTo(@NotNull ServiceMessageBuilder serviceMessageBuilder) {\n      for (Map.Entry<String, String> entry : myAttributes.entrySet()) {\n        serviceMessageBuilder.addAttribute(entry.getKey(), entry.getValue());\n      }\n    }\n  }\n\n  public GocheckEventsConverter(@NotNull TestConsoleProperties consoleProperties) {\n    super(FRAMEWORK_NAME, consoleProperties);\n  }\n\n  @Override\n  public boolean processServiceMessages(@NotNull String text, Key outputType, ServiceMessageVisitor visitor) throws ParseException {\n    Matcher matcher;\n\n    switch (myScope) {\n      case GLOBAL:\n        if (SUITE_START.matcher(text).matches()) {\n          myScope = Scope.SUITE;\n          return true;\n        }\n        break;\n\n      case SUITE:\n        if ((matcher = TEST_START.matcher(text)).matches()) {\n          myStdOut = ContainerUtil.newArrayList();\n          myTestName = matcher.group(2);\n          processTestSectionStart(myTestName, outputType, visitor);\n          if (myTestName.endsWith(\".SetUpSuite\")) {\n            myScope = Scope.SUITE_SETUP;\n            return true;\n          }\n          if (myTestName.endsWith(\".TearDownSuite\")) {\n            myScope = Scope.SUITE_TEARDOWN;\n            return true;\n          }\n          myScope = Scope.TEST;\n          return processTestStarted(myTestName, outputType, visitor);\n        }\n        if (SUITE_END.matcher(text).matches()) {\n          myScope = Scope.GLOBAL;\n          if (mySuiteName != null) {\n            String suiteFinishedMsg = ServiceMessageBuilder.testSuiteFinished(mySuiteName).toString();\n            super.processServiceMessages(suiteFinishedMsg, outputType, visitor);\n            processStdOut(\"SuiteTearDown\", outputType, visitor);\n          }\n          return true;\n        }\n        break;\n\n      case SUITE_SETUP:\n        TestResult suiteSetUpResult = detectTestResult(text, true);\n        if (suiteSetUpResult != null) {\n          myScope = Scope.SUITE;\n          if (suiteSetUpResult.getStatus() != Status.PASSED) {\n            myFixtureFailure = suiteSetUpResult;\n          }\n          return true;\n        }\n        break;\n\n      case SUITE_TEARDOWN:\n        if (detectTestResult(text, false) != null) {\n          myScope = Scope.SUITE;\n          return true;\n        }\n        break;\n\n      case TEST:\n        if ((matcher = TEST_START.matcher(text)).matches()) {\n          String stdOutLeftover = matcher.group(1);\n          if (!StringUtil.isEmptyOrSpaces(stdOutLeftover)) {\n            myStdOut.add(stdOutLeftover);\n          }\n          String testName = matcher.group(2);\n          if (testName.endsWith(\".SetUpTest\")) {\n            myScope = Scope.TEST_SETUP;\n            return true;\n          }\n          if (testName.endsWith(\".TearDownTest\")) {\n            myScope = Scope.TEST_TEARDOWN;\n            return true;\n          }\n        }\n\n        TestResult testResult = detectTestResult(text, true);\n        if (testResult != null) {\n          myScope = Scope.SUITE;\n          if (StringUtil.notNullize(testResult.myAttributes.get(\"details\")).contains(\"Fixture has panicked\")\n              || (testResult.getStatus() == Status.MISSED || testResult.getStatus() == Status.SKIPPED) && myFixtureFailure != null) {\n            testResult = myFixtureFailure;\n          }\n          myFixtureFailure = null;\n          processTestResult(testResult, outputType, visitor);\n          return true;\n        }\n        break;\n\n      case TEST_SETUP:\n        TestResult testSetUpResult = detectTestResult(text, true);\n        if (testSetUpResult != null) {\n          myScope = Scope.TEST;\n          if (testSetUpResult.getStatus() != Status.PASSED) {\n            myFixtureFailure = testSetUpResult;\n          }\n          return true;\n        }\n        break;\n\n      case TEST_TEARDOWN:\n        boolean isSetUpFailed = myFixtureFailure != null;\n        TestResult testTearDownResult = detectTestResult(text, !isSetUpFailed);\n        if (testTearDownResult != null) {\n          myScope = Scope.TEST;\n          if (!isSetUpFailed && testTearDownResult.getStatus() != Status.PASSED) {\n            myFixtureFailure = testTearDownResult;\n          }\n          return true;\n        }\n        break;\n    }\n\n    if (myStdOut != null) {\n      myStdOut.add(text);\n      return true;\n    }\n\n    return super.processServiceMessages(text, outputType, visitor);\n  }\n\n  @Nullable\n  private TestResult detectTestResult(String text, boolean parseDetails) {\n    Matcher matcher;\n    if ((matcher = TEST_PASSED.matcher(text)).matches()) {\n      myStdOut.add(StringUtil.notNullize(matcher.group(1)).trim());\n      return new TestResult(Status.PASSED);\n    }\n    if ((matcher = TEST_MISSED.matcher(text)).matches()) {\n      myStdOut.add(StringUtil.notNullize(matcher.group(1)).trim());\n      return new TestResult(Status.MISSED);\n    }\n    if ((matcher = TEST_SKIPPED.matcher(text)).matches()) {\n      myStdOut.add(StringUtil.notNullize(matcher.group(1)).trim());\n      return new TestResult(Status.SKIPPED);\n    }\n    if ((matcher = TEST_FAILED.matcher(text)).matches()) {\n      myStdOut.add(StringUtil.notNullize(matcher.group(1)).trim());\n      if (parseDetails) {\n        return new TestResult(Status.FAILED, parseFailureAttributes());\n      }\n      return new TestResult(Status.FAILED);\n    }\n    if ((matcher = TEST_PANICKED.matcher(text)).matches()) {\n      myStdOut.add(StringUtil.notNullize(matcher.group(1)).trim());\n      if (parseDetails) {\n        return new TestResult(Status.PANICKED, parsePanickedAttributes());\n      }\n      return new TestResult(Status.FAILED);\n    }\n    return null;\n  }\n\n  private boolean processTestStarted(@NotNull String testName, Key outputType, ServiceMessageVisitor visitor) throws ParseException {\n    String testStartedMsg = ServiceMessageBuilder.testStarted(testName)\n      .addAttribute(\"locationHint\", testUrl(testName)).toString();\n    return super.processServiceMessages(testStartedMsg, outputType, visitor);\n  }\n\n  private void processTestResult(@NotNull TestResult testResult, Key outputType, ServiceMessageVisitor visitor) throws ParseException {\n    processStdOut(myTestName, outputType, visitor);\n\n    switch (testResult.getStatus()) {\n      case PASSED:\n        break;\n\n      case MISSED:\n      case SKIPPED:\n        String testIgnoredStr = ServiceMessageBuilder.testIgnored(myTestName).toString();\n        super.processServiceMessages(testIgnoredStr, outputType, visitor);\n        break;\n      \n      case FAILED:\n        ServiceMessageBuilder testError = ServiceMessageBuilder.testFailed(myTestName);\n        testResult.addAttributesTo(testError);\n        super.processServiceMessages(testError.toString(), outputType, visitor);\n        break;\n\n      case PANICKED:\n        ServiceMessageBuilder testPanicked = ServiceMessageBuilder.testFailed(myTestName);\n        testResult.addAttributesTo(testPanicked);\n        super.processServiceMessages(testPanicked.toString(), outputType, visitor);\n        break;\n\n      default:\n        throw new RuntimeException(\"Unexpected test result: \" + testResult);\n    }\n    long duration = System.currentTimeMillis() - myCurrentTestStart;\n    String testFinishedMsg = ServiceMessageBuilder.testFinished(myTestName).addAttribute(\"duration\", Long.toString(duration)).toString();\n    super.processServiceMessages(testFinishedMsg, outputType, visitor);\n  }\n\n  private void processStdOut(@NotNull String testName, Key outputType, ServiceMessageVisitor visitor) throws ParseException {\n    if (myStdOut == null) {\n      return;\n    }\n    String allStdOut = StringUtil.join(myStdOut, \"\");\n    if (!StringUtil.isEmptyOrSpaces(allStdOut)) {\n      String testStdOutMsg = ServiceMessageBuilder.testStdOut(testName).addAttribute(\"out\", allStdOut).toString();\n      super.processServiceMessages(testStdOutMsg, outputType, visitor);\n    }\n    myStdOut = null;\n  }\n\n  private void processTestSectionStart(@NotNull String testName, Key outputType, ServiceMessageVisitor visitor) throws ParseException {\n    String suiteName = testName.substring(0, testName.indexOf(\".\"));\n    myTestName = testName;\n    myCurrentTestStart = System.currentTimeMillis();\n    if (!suiteName.equals(mySuiteName)) {\n      if (mySuiteName != null) {\n        String suiteFinishedMsg = ServiceMessageBuilder.testSuiteFinished(mySuiteName).toString();\n        super.processServiceMessages(suiteFinishedMsg, outputType, visitor);\n      }\n      mySuiteName = suiteName;\n      String suiteStartedMsg = ServiceMessageBuilder.testSuiteStarted(suiteName)\n        .addAttribute(\"locationHint\", suiteUrl(suiteName)).toString();\n      super.processServiceMessages(suiteStartedMsg, outputType, visitor);\n    }\n  }\n\n  /**\n   * Parses assertion error report into a set of SystemMessage attributes.\n   * <p/>\n   * An assertion error report usually looks like this:\n   * <pre>\n   * all_fail_test.go:36:\n   *     c.Assert(\"Foo\", Equals, \"Bar\")\n   * ... obtained string = \"Foo\"\n   * ... expected string = \"Bar\"\n   * </pre>\n   * or this:\n   * <pre>\n   * all_fail_test.go:21:\n   *     c.Assert(\"Foo\", IsNil)\n   * ... value string = \"Foo\"\n   * </pre>\n   * or this:\n   * <pre>\n   * all_fail_test.go:54:\n   *     c.Assert(`multi\n   *\n   *     \t          line\n   *     \t          string`,\n   *         Equals,\n   *         `Another\n   *     multi\n   *     \tline\n   *     \t\tstring`)\n   * ... obtained string = \"\" +\n   * ...     \"multi\\n\" +\n   * ...     \"\\n\" +\n   * ...     \"\\t          line\\n\" +\n   * ...     \"\\t          string\"\n   * ... expected string = \"\" +\n   * ...     \"Another\\n\" +\n   * ...     \"multi\\n\" +\n   * ...     \"\\tline\\n\" +\n   * ...     \"\\t\\tstring\"\n   * </pre>\n   * There are other variation. Check out the respective unit test.\n   *\n   * @return a map of system message attributes.\n   */\n  @Nullable\n  private Map<String, String> parseFailureAttributes() {\n    if (myStdOut == null || myStdOut.isEmpty()) return null;\n\n    int lineNumber = myStdOut.size() - 1;\n    StringBuilder expectedMessage = new StringBuilder();\n    StringBuilder actualMessage = new StringBuilder();\n    StringBuilder errorMessage = new StringBuilder();\n    String details = \"\";\n\n    // Skip forward to the error description.\n    while (lineNumber >= 0 && !StringUtil.startsWith(myStdOut.get(lineNumber), \"...\")) {\n      lineNumber--;\n    }\n\n    lineNumber = collectErrorMessage(myStdOut, lineNumber, ERROR_CONTINUATION, ERROR_EXPECTED, expectedMessage);\n    lineNumber = collectErrorMessage(myStdOut, lineNumber, ERROR_CONTINUATION, ERROR_ACTUAL, actualMessage);\n\n    // Collect all lines of the error message and details\n    while (lineNumber >= 0) {\n      String line = myStdOut.get(lineNumber);\n      Matcher matcher = ERROR_LOCATION.matcher(line);\n      if (matcher.matches()) {\n        details = matcher.group(1);\n        break;\n      }\n      else {\n        errorMessage.insert(0, line);\n        lineNumber--;\n      }\n    }\n\n    // Remove the assertion error info from the test StdOut.\n    myStdOut = safeSublist(myStdOut, lineNumber);\n\n    return ContainerUtil.newHashMap(pair(\"expected\", expectedMessage.toString().trim()),\n                                    pair(\"actual\", actualMessage.toString().trim()),\n                                    pair(\"type\", \"comparisonFailure\"),\n                                    pair(\"message\", errorMessage.toString().trim()),\n                                    pair(\"details\", details));\n  }\n\n  private static int collectErrorMessage(List<String> lines, int currentLine, Pattern continuationPattern, Pattern messagePattern,\n                                         StringBuilder result) {\n    while (currentLine >= 0) {\n      String line = lines.get(currentLine);\n\n      Matcher continuationMatcher = continuationPattern.matcher(line);\n      if (continuationMatcher.matches()) {\n        result.insert(0, '\\n').insert(0, continuationMatcher.group(1));\n        currentLine--;\n        continue;\n      }\n\n      Matcher messageMatcher = messagePattern.matcher(line);\n      if (messageMatcher.matches()) {\n        result.insert(0, '\\n').insert(0, messageMatcher.group(4));\n        currentLine--;\n      }\n      break;\n    }\n    return currentLine;\n  }\n\n  /**\n   * Parses panic report into a set of SystemMessage attributes.\n   * <p/>\n   * A panic report usually looks like this:\n   * <pre>\n   * ... Panic: bar (PC=0x3B0A5)\n   *\n   * /usr/local/go/src/runtime/panic.go:387\n   *   in gopanic\n   * some_panic_test.go:31\n   *   in SomePanicSuite.TestD\n   * /usr/local/go/src/reflect/value.go:296\n   *   in Value.Call\n   * /usr/local/go/src/runtime/asm_amd64.s:2232\n   *   in goexit\n   * </pre>\n   *\n   * @return a map of system message attributes.\n   */\n  @Nullable\n  private Map<String, String> parsePanickedAttributes() {\n    if (myStdOut == null || myStdOut.isEmpty()) return null;\n\n    int lineNumber = myStdOut.size() - 1;\n    // Ignore trailing empty lines.\n    while (lineNumber >= 0 && StringUtil.isEmptyOrSpaces(myStdOut.get(lineNumber))) {\n      lineNumber--;\n    }\n\n    StringBuilder detailsMessage = new StringBuilder();\n    // All lines up until an empty one comprise the stack trace.\n    while (lineNumber >= 0 && !StringUtil.isEmptyOrSpaces(myStdOut.get(lineNumber))) {\n      detailsMessage.insert(0, myStdOut.get(lineNumber));\n      lineNumber--;\n    }\n    lineNumber--; // skip empty line\n\n    // Then follows the panic description.\n    String errorMessage = \"\";\n    Matcher matcher;\n    if (lineNumber >= 0 && (matcher = PANIC_VALUE.matcher(myStdOut.get(lineNumber))).matches()) {\n      String stdoutLeftover = matcher.group(1);\n      if (!StringUtil.isEmptyOrSpaces(stdoutLeftover)) {\n        myStdOut.set(lineNumber, stdoutLeftover);\n        lineNumber++;\n      }\n      errorMessage = matcher.group(2);\n    }\n    // Remove the panic info from the test StdOut.\n    myStdOut = safeSublist(myStdOut, lineNumber);\n    return ContainerUtil.newHashMap(pair(\"details\", detailsMessage.toString()), pair(\"message\", errorMessage));\n  }\n\n  @NotNull\n  private static List<String> safeSublist(@NotNull List<String> list, int until) {\n    if (0 < until && until <= list.size() - 1) {\n      return list.subList(0, until);\n    }\n    return ContainerUtil.newArrayList();\n  }\n\n  @NotNull\n  private static String suiteUrl(@NotNull String suiteName) {\n    return GoTestLocator.SUITE_PROTOCOL + \"://\" + suiteName;\n  }\n  \n  @NotNull\n  private static String testUrl(@NotNull String testName) {\n    return GoTestLocator.PROTOCOL + \"://\" + testName;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/testing/frameworks/gocheck/GocheckFramework.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.testing.frameworks.gocheck;\n\nimport com.goide.psi.GoFile;\nimport com.goide.psi.GoFunctionOrMethodDeclaration;\nimport com.goide.psi.GoMethodDeclaration;\nimport com.goide.psi.impl.GoPsiImplUtil;\nimport com.goide.runconfig.testing.*;\nimport com.goide.stubs.index.GoPackagesIndex;\nimport com.goide.util.GoUtil;\nimport com.intellij.execution.runners.ExecutionEnvironment;\nimport com.intellij.execution.testframework.TestConsoleProperties;\nimport com.intellij.execution.testframework.sm.runner.OutputToGeneralTestEventsConverter;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.stubs.StubIndex;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.regex.Pattern;\n\npublic class GocheckFramework extends GoTestFramework {\n  public static final String NAME = \"gocheck\";\n  public static final GocheckFramework INSTANCE = new GocheckFramework();\n  private static final Pattern GO_CHECK_IMPORT_PATH = Pattern.compile(\"gopkg\\\\.in/check\\\\.v\\\\d+\");\n  private static final Pattern GO_CHECK_GITHUB_IMPORT_PATH = Pattern.compile(\"github\\\\.com/go-check/check\\\\.v\\\\d+\");\n\n  private GocheckFramework() {\n  }\n\n  @Nullable\n  public static String getGocheckTestName(@NotNull GoMethodDeclaration method) {\n    String methodName = GoTestFunctionType.fromName(method.getName()) == GoTestFunctionType.TEST ? method.getName() : null;\n    if (methodName != null) {\n      String suiteName = GoPsiImplUtil.getText(method.getReceiverType());\n      if (!suiteName.isEmpty()) {\n        return suiteName + \".\" + methodName;\n      }\n    }\n    return null;\n  }\n\n  @NotNull\n  @Override\n  public String getName() {\n    return NAME;\n  }\n\n  @Override\n  public boolean isAvailable(@Nullable Module module) {\n    if (module == null) return false;\n    return !StubIndex.getInstance().processElements(GoPackagesIndex.KEY, \"check\", module.getProject(),\n                                                    GoUtil.goPathResolveScope(module, null), GoFile.class,\n                                                    file -> !isGoCheckImportPath(file.getImportPath(true)));\n  }\n\n  private static boolean isGoCheckImportPath(String importPath) {\n    if (importPath == null) return false;\n    return GO_CHECK_IMPORT_PATH.matcher(importPath).matches() || GO_CHECK_GITHUB_IMPORT_PATH.matcher(importPath).matches();\n  }\n\n  @Override\n  public boolean isAvailableOnFile(@Nullable PsiFile file) {\n    if (!GoTestFinder.isTestFile(file)) {\n      return false;\n    }\n    for (String importPath : ((GoFile)file).getImportedPackagesMap().keySet()) {\n      if (isGoCheckImportPath(importPath)) {\n        return true;\n      }\n    }\n    return false;\n  }\n\n  @Override\n  public boolean isAvailableOnFunction(@Nullable GoFunctionOrMethodDeclaration functionOrMethodDeclaration) {\n    return functionOrMethodDeclaration instanceof GoMethodDeclaration && GoTestFinder.isTestOrExampleFunction(functionOrMethodDeclaration);\n  }\n\n  @NotNull\n  @Override\n  protected GoTestRunningState newRunningState(@NotNull ExecutionEnvironment env,\n                                               @NotNull Module module,\n                                               @NotNull GoTestRunConfiguration runConfiguration) {\n    return new GocheckRunningState(env, module, runConfiguration);\n  }\n\n  @NotNull\n  @Override\n  public OutputToGeneralTestEventsConverter createTestEventsConverter(@NotNull TestConsoleProperties consoleProperties) {\n    return new GocheckEventsConverter(consoleProperties);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/testing/frameworks/gocheck/GocheckRunConfigurationProducer.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.testing.frameworks.gocheck;\n\nimport com.goide.psi.GoFunctionOrMethodDeclaration;\nimport com.goide.psi.GoMethodDeclaration;\nimport com.goide.runconfig.testing.GoTestRunConfigurationProducerBase;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GocheckRunConfigurationProducer extends GoTestRunConfigurationProducerBase implements Cloneable {\n  public GocheckRunConfigurationProducer() {\n    super(GocheckFramework.INSTANCE);\n  }\n\n  @NotNull\n  @Override\n  protected String getPackageConfigurationName(@NotNull String packageName) {\n    return \"gocheck package '\" + packageName + \"'\";\n  }\n\n  @NotNull\n  @Override\n  protected String getFunctionConfigurationName(@NotNull GoFunctionOrMethodDeclaration function, @NotNull String fileName) {\n    return function instanceof GoMethodDeclaration\n           ? GocheckFramework.getGocheckTestName((GoMethodDeclaration)function) + \" in \" + fileName\n           : super.getFunctionConfigurationName(function, fileName);\n  }\n\n  @NotNull\n  @Override\n  protected String getFileConfigurationName(@NotNull String fileName) {\n    return \"gocheck \" + super.getFileConfigurationName(fileName);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/testing/frameworks/gocheck/GocheckRunningState.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.testing.frameworks.gocheck;\n\nimport com.goide.psi.GoFile;\nimport com.goide.psi.GoMethodDeclaration;\nimport com.goide.runconfig.testing.GoTestRunConfiguration;\nimport com.goide.runconfig.testing.GoTestRunningState;\nimport com.goide.util.GoExecutor;\nimport com.intellij.execution.ExecutionException;\nimport com.intellij.execution.runners.ExecutionEnvironment;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.Collection;\n\npublic class GocheckRunningState extends GoTestRunningState {\n  public GocheckRunningState(@NotNull ExecutionEnvironment env,\n                             @NotNull Module module,\n                             @NotNull GoTestRunConfiguration configuration) {\n    super(env, module, configuration);\n  }\n\n  @Override\n  protected GoExecutor patchExecutor(@NotNull GoExecutor executor) throws ExecutionException {\n    return super.patchExecutor(executor).withParameters(\"-check.vv\");\n  }\n\n  @NotNull\n  @Override\n  protected String buildFilterPatternForFile(GoFile file) {\n    Collection<String> testNames = ContainerUtil.newLinkedHashSet();\n    for (GoMethodDeclaration method : file.getMethods()) {\n      ContainerUtil.addIfNotNull(testNames, GocheckFramework.getGocheckTestName(method));\n    }\n    return \"^\" + StringUtil.join(testNames, \"|\") + \"$\";\n  }\n\n  @Override\n  protected void addFilterParameter(@NotNull GoExecutor executor, String pattern) {\n    if (StringUtil.isNotEmpty(pattern)) {\n      executor.withParameters(\"-check.f\", pattern);\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/testing/frameworks/gotest/GoTestEventsConverterBaseImpl.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.testing.frameworks.gotest;\n\nimport com.goide.runconfig.testing.GoTestEventsConverterBase;\nimport com.goide.runconfig.testing.GoTestLocator;\nimport com.intellij.execution.process.ProcessOutputTypes;\nimport com.intellij.execution.testframework.TestConsoleProperties;\nimport com.intellij.execution.testframework.sm.ServiceMessageBuilder;\nimport com.intellij.execution.testframework.sm.runner.OutputToGeneralTestEventsConverter;\nimport com.intellij.openapi.util.Key;\nimport com.intellij.openapi.util.text.StringUtil;\nimport jetbrains.buildServer.messages.serviceMessages.ServiceMessageTypes;\nimport jetbrains.buildServer.messages.serviceMessages.ServiceMessageVisitor;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.text.ParseException;\n\npublic abstract class GoTestEventsConverterBaseImpl extends OutputToGeneralTestEventsConverter implements GoTestEventsConverterBase {\n  public enum TestResult {PASSED, FAILED, SKIPPED}\n\n  @Nullable\n  private ServiceMessageVisitor myVisitor;\n  @Nullable\n  private String myCurrentTestName;\n  @Nullable\n  private TestResult myCurrentTestResult;\n  private long myCurrentTestStart;\n\n  public GoTestEventsConverterBaseImpl(@NotNull String testFrameworkName, @NotNull TestConsoleProperties consoleProperties) {\n    super(testFrameworkName, consoleProperties);\n  }\n\n  protected abstract int processLine(@NotNull String line, int start, Key outputType, ServiceMessageVisitor visitor)\n    throws ParseException;\n  \n  @Nullable\n  protected String getCurrentTestName() {\n    return myCurrentTestName;\n  }\n\n  @Override\n  public final boolean processServiceMessages(@NotNull String text, Key outputType, ServiceMessageVisitor visitor) throws ParseException {\n    if (myVisitor == null && visitor != null) {\n      myVisitor = visitor;\n    }\n    if (text.isEmpty()) {\n      return true;\n    }\n\n    int startOffset = 0;\n    int newStartOffset = processLine(text, startOffset, outputType, visitor);\n    while (startOffset != newStartOffset && newStartOffset < text.length()) {\n      startOffset = newStartOffset;\n      newStartOffset = processLine(text, startOffset, outputType, visitor);\n    }\n    if (newStartOffset < text.length()) {\n      processOutput(text.substring(startOffset), outputType, visitor);\n    }\n    return true;\n  }\n\n  protected void processOutput(@NotNull String text, Key outputType, ServiceMessageVisitor visitor) throws ParseException {\n    if (text.isEmpty()) {\n      return;\n    }\n    boolean isErrorMessage = ProcessOutputTypes.STDERR == outputType;\n    if (myCurrentTestName != null) {\n      ServiceMessageBuilder builder = isErrorMessage ? ServiceMessageBuilder.testStdErr(myCurrentTestName)\n                                                     : ServiceMessageBuilder.testStdOut(myCurrentTestName);\n      super.processServiceMessages(builder.addAttribute(\"out\", text).toString(), outputType, visitor);\n      return;\n    }\n\n    ServiceMessageBuilder messageBuilder = new ServiceMessageBuilder(ServiceMessageTypes.MESSAGE);\n    if (isErrorMessage) {\n      messageBuilder.addAttribute(\"text\", StringUtil.trimEnd(text, \"\\n\")).addAttribute(\"status\", \"ERROR\");\n    }\n    else {\n      messageBuilder.addAttribute(\"text\", text).addAttribute(\"status\", \"NORMAL\");\n    }\n    super.processServiceMessages(messageBuilder.toString(), outputType, visitor);\n  }\n\n  @Override\n  public void dispose() {\n    myVisitor = null;\n    super.dispose();\n  }\n\n  protected void startTest(@NotNull String testName, @Nullable ServiceMessageVisitor visitor) throws ParseException {\n    if (isCurrentlyRunningTest(testName)) {\n      return;\n    }\n    finishDelayedTest(visitor);\n    myCurrentTestName = testName;\n    myCurrentTestResult = null;\n    myCurrentTestStart = System.currentTimeMillis();\n\n    String testStartedMessage = ServiceMessageBuilder.testStarted(testName).addAttribute(\"locationHint\", testUrl(testName)).toString();\n    super.processServiceMessages(testStartedMessage, null, visitor);\n  }\n\n  @Override\n  public final void flushBufferBeforeTerminating() {\n    try {\n      if (!finishDelayedTest(myVisitor)) {\n        if (myCurrentTestName != null) {\n          finishTestInner(myCurrentTestName, TestResult.PASSED, myVisitor);\n        }\n      }\n    }\n    catch (ParseException ignore) {\n    }\n    myVisitor = null;\n    super.flushBufferBeforeTerminating();\n  }\n\n  protected void finishTest(@NotNull String name, @NotNull TestResult result, @Nullable ServiceMessageVisitor visitor)\n    throws ParseException {\n    if (isCurrentlyRunningTest(name)) {\n      if (myCurrentTestResult == null) {\n        // delay finishing test, we'll use it as a container for future output\n        myCurrentTestResult = result;\n      }\n      return;\n    }\n    finishTestInner(name, result, visitor);\n  }\n\n  protected boolean finishDelayedTest(ServiceMessageVisitor visitor) throws ParseException {\n    if (myCurrentTestName != null && myCurrentTestResult != null) {\n      finishTestInner(myCurrentTestName, myCurrentTestResult, visitor);\n      return true;\n    }\n    return false;\n  }\n\n  private boolean isCurrentlyRunningTest(@NotNull String testName) {\n    return testName.equals(myCurrentTestName);\n  }\n\n  private void finishTestInner(@NotNull String name,\n                               @NotNull TestResult result,\n                               @Nullable ServiceMessageVisitor visitor) throws ParseException {\n    if (isCurrentlyRunningTest(name)) {\n      myCurrentTestName = null;\n      myCurrentTestResult = null;\n    }\n    String duration = myCurrentTestStart > 0 ? Long.toString(System.currentTimeMillis() - myCurrentTestStart) : null;\n    switch (result) {\n      case PASSED:\n        break;\n      case FAILED:\n        String failedMessage = ServiceMessageBuilder.testFailed(name).addAttribute(\"message\", \"\").toString();\n        super.processServiceMessages(failedMessage, null, visitor);\n        break;\n      case SKIPPED:\n        String skipMessage = ServiceMessageBuilder.testIgnored(name).addAttribute(\"message\", \"\").toString();\n        super.processServiceMessages(skipMessage, null, visitor);\n        break;\n    }\n    String finishedMessage = ServiceMessageBuilder.testFinished(name).addAttribute(\"duration\", duration).toString();\n    super.processServiceMessages(finishedMessage, null, visitor);\n  }\n\n  @NotNull\n  private static String testUrl(@NotNull String testName) {\n    return GoTestLocator.PROTOCOL + \"://\" + testName;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/testing/frameworks/gotest/GotestEventsConverter.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.testing.frameworks.gotest;\n\nimport com.goide.GoConstants;\nimport com.intellij.execution.testframework.TestConsoleProperties;\nimport com.intellij.openapi.util.Key;\nimport jetbrains.buildServer.messages.serviceMessages.ServiceMessageVisitor;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.text.ParseException;\nimport java.util.regex.Matcher;\nimport java.util.regex.Pattern;\n\npublic class GotestEventsConverter extends GoTestEventsConverterBaseImpl {\n  private static final Pattern RUN = Pattern.compile(\"^=== RUN\\\\s+(\" + GoConstants.TEST_NAME_REGEX + \")\");\n  private static final Pattern PASSED = Pattern.compile(\"--- PASS:\\\\s+(\" + GoConstants.TEST_NAME_REGEX + \")\");\n  private static final Pattern SKIP = Pattern.compile(\"--- SKIP:\\\\s+(\" + GoConstants.TEST_NAME_REGEX + \")\");\n  private static final Pattern FAILED = Pattern.compile(\"--- FAIL:\\\\s+(\" + GoConstants.TEST_NAME_REGEX + \")\");\n  private static final Pattern FINISHED = Pattern.compile(\"^(PASS)|(FAIL)$\");\n\n  public GotestEventsConverter(@NotNull TestConsoleProperties consoleProperties) {\n    super(GotestFramework.NAME, consoleProperties);\n  }\n\n  @Override\n  protected int processLine(@NotNull String line, int start, Key outputType, ServiceMessageVisitor visitor) throws ParseException {\n    Matcher matcher;\n    if ((matcher = RUN.matcher(line)).find(start)) {\n      startTest(matcher.group(1), visitor);\n      return line.length();\n    }\n    if ((matcher = SKIP.matcher(line)).find(start)) {\n      processOutput(line.substring(start, matcher.start()), outputType, visitor);\n      finishTest(matcher.group(1), TestResult.SKIPPED, visitor);\n      return line.length();\n    }\n    if ((matcher = FAILED.matcher(line)).find(start)) {\n      processOutput(line.substring(start, matcher.start()), outputType, visitor);\n      finishTest(matcher.group(1), TestResult.FAILED, visitor);\n      return line.length();\n    }\n    if ((matcher = PASSED.matcher(line)).find(start)) {\n      processOutput(line.substring(start, matcher.start()), outputType, visitor);\n      finishTest(matcher.group(1), TestResult.PASSED, visitor);\n      return line.length();\n    }\n    if (FINISHED.matcher(line).find(start)) {\n      finishDelayedTest(visitor);\n      return line.length();\n    }\n    return start;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/testing/frameworks/gotest/GotestFramework.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.testing.frameworks.gotest;\n\nimport com.goide.psi.GoFunctionDeclaration;\nimport com.goide.psi.GoFunctionOrMethodDeclaration;\nimport com.goide.runconfig.testing.*;\nimport com.intellij.execution.runners.ExecutionEnvironment;\nimport com.intellij.execution.testframework.TestConsoleProperties;\nimport com.intellij.execution.testframework.sm.runner.OutputToGeneralTestEventsConverter;\nimport com.intellij.openapi.actionSystem.AnAction;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.ArrayList;\nimport java.util.Collection;\n\npublic class GotestFramework extends GoTestFramework {\n  public static final String NAME = \"gotest\";\n  public static final GotestFramework INSTANCE = new GotestFramework();\n  private static final ArrayList<GotestGenerateAction> GENERATE_ACTIONS = ContainerUtil.newArrayList(\n    new GotestGenerateAction(GoTestFunctionType.TEST),\n    new GotestGenerateAction(GoTestFunctionType.BENCHMARK),\n    new GotestGenerateAction(GoTestFunctionType.EXAMPLE));\n\n  private GotestFramework() {\n  }\n\n  @Override\n  public Collection<? extends AnAction> getGenerateMethodActions() {\n    return GENERATE_ACTIONS;\n  }\n\n  @NotNull\n  @Override\n  public String getName() {\n    return NAME;\n  }\n\n  @Override\n  public boolean isAvailable(@Nullable Module module) {\n    return true;\n  }\n\n  @Override\n  public boolean isAvailableOnFile(@Nullable PsiFile file) {\n    return GoTestFinder.isTestFile(file);\n  }\n\n  @Override\n  public boolean isAvailableOnFunction(@Nullable GoFunctionOrMethodDeclaration functionOrMethodDeclaration) {\n    return functionOrMethodDeclaration instanceof GoFunctionDeclaration &&\n           GoTestFinder.isTestOrExampleFunction(functionOrMethodDeclaration);\n  }\n\n  @NotNull\n  @Override\n  protected GoTestRunningState newRunningState(@NotNull ExecutionEnvironment env,\n                                               @NotNull Module module,\n                                               @NotNull GoTestRunConfiguration runConfiguration) {\n    return new GoTestRunningState(env, module, runConfiguration);\n  }\n\n  @NotNull\n  @Override\n  public OutputToGeneralTestEventsConverter createTestEventsConverter(@NotNull TestConsoleProperties consoleProperties) {\n    return new GotestEventsConverter(consoleProperties);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/testing/frameworks/gotest/GotestGenerateAction.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.testing.frameworks.gotest;\n\nimport com.goide.GoConstants;\nimport com.goide.generate.GoGenerateTestActionBase;\nimport com.goide.psi.GoFile;\nimport com.goide.psi.GoImportSpec;\nimport com.goide.psi.impl.GoPsiImplUtil;\nimport com.goide.runconfig.testing.GoTestFunctionType;\nimport com.goide.template.GoLiveTemplateContextType;\nimport com.intellij.codeInsight.AutoPopupController;\nimport com.intellij.codeInsight.CodeInsightActionHandler;\nimport com.intellij.codeInsight.template.TemplateContextType;\nimport com.intellij.openapi.actionSystem.Presentation;\nimport com.intellij.openapi.editor.Editor;\nimport com.intellij.openapi.editor.EditorModificationUtil;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.psi.PsiDocumentManager;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.util.text.UniqueNameGenerator;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.Locale;\n\npublic class GotestGenerateAction extends GoGenerateTestActionBase {\n  public GotestGenerateAction(@NotNull GoTestFunctionType type) {\n    super(GotestFramework.INSTANCE, new GenerateActionHandler(type));\n    String presentationName = StringUtil.capitalize(type.toString().toLowerCase(Locale.US));\n    Presentation presentation = getTemplatePresentation();\n    presentation.setText(presentationName);\n    presentation.setDescription(\"Generate \" + presentationName + \" function\");\n  }\n\n  @Override\n  protected boolean isValidForFile(@NotNull Project project, @NotNull Editor editor, @NotNull PsiFile file) {\n    GoLiveTemplateContextType.File fileContextType =\n      TemplateContextType.EP_NAME.findExtension(GoLiveTemplateContextType.File.class);\n    return fileContextType != null && fileContextType.isInContext(file, editor.getCaretModel().getOffset());\n  }\n\n  @NotNull\n  public static String importTestingPackageIfNeeded(@NotNull GoFile file) {\n    GoImportSpec alreadyImportedPackage = file.getImportedPackagesMap().get(GoConstants.TESTING_PATH);\n    String qualifier = GoPsiImplUtil.getImportQualifierToUseInFile(alreadyImportedPackage, GoConstants.TESTING_PATH);\n    if (qualifier != null) {\n      return qualifier;\n    }\n\n    String localName = UniqueNameGenerator.generateUniqueName(GoConstants.TESTING_PATH, file.getImportMap().keySet());\n    file.addImport(GoConstants.TESTING_PATH, !GoConstants.TESTING_PATH.equals(localName) ? localName : null);\n    return localName;\n  }\n\n  private static class GenerateActionHandler implements CodeInsightActionHandler {\n\n    @NotNull private final GoTestFunctionType myType;\n\n    public GenerateActionHandler(@NotNull GoTestFunctionType type) {\n      myType = type;\n    }\n\n    @Override\n    public void invoke(@NotNull Project project, @NotNull Editor editor, @NotNull PsiFile file) {\n      if (!(file instanceof GoFile)) {\n        return;\n      }\n      String testingQualifier = null;\n      if (myType.getParamType() != null) {\n        testingQualifier = importTestingPackageIfNeeded((GoFile)file);\n        PsiDocumentManager.getInstance(file.getProject()).doPostponedOperationsAndUnblockDocument(editor.getDocument());\n      }\n      String functionText = \"func \" + myType.getPrefix();\n      int offset = functionText.length();\n      functionText += \"(\" + myType.getSignature(testingQualifier) + \") {\\n\\t\\n}\";\n      EditorModificationUtil.insertStringAtCaret(editor, functionText, false, offset);\n      AutoPopupController.getInstance(project).scheduleAutoPopup(editor);\n    }\n\n    @Override\n    public boolean startInWriteAction() {\n      return true;\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/testing/frameworks/gotest/GotestRunConfigurationProducer.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.testing.frameworks.gotest;\n\nimport com.goide.runconfig.testing.GoTestRunConfigurationProducerBase;\n\npublic class GotestRunConfigurationProducer extends GoTestRunConfigurationProducerBase implements Cloneable {\n  public GotestRunConfigurationProducer() {\n    super(GotestFramework.INSTANCE);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/testing/ui/GoPackageFieldCompletionProvider.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.testing.ui;\n\nimport com.goide.completion.GoImportPathsCompletionProvider;\nimport com.goide.util.GoUtil;\nimport com.intellij.codeInsight.completion.CompletionResultSet;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.psi.search.GlobalSearchScope;\nimport com.intellij.util.Producer;\nimport com.intellij.util.TextFieldCompletionProvider;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoPackageFieldCompletionProvider extends TextFieldCompletionProvider {\n  @NotNull private final Producer<Module> myModuleProducer;\n\n  public GoPackageFieldCompletionProvider(@NotNull Producer<Module> moduleProducer) {\n    myModuleProducer = moduleProducer;\n  }\n\n  @Override\n  protected void addCompletionVariants(@NotNull String text,\n                                       int offset,\n                                       @NotNull String prefix,\n                                       @NotNull CompletionResultSet result) {\n    Module module = myModuleProducer.produce();\n    if (module != null) {\n      GlobalSearchScope scope = GoUtil.moduleScopeWithoutLibraries(module.getProject(), module);\n      GoImportPathsCompletionProvider.addCompletions(result, module, null, scope, true);\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/testing/ui/GoTestRunConfigurationEditorForm.form",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<form xmlns=\"http://www.intellij.com/uidesigner/form/\" version=\"1\" bind-to-class=\"com.goide.runconfig.testing.ui.GoTestRunConfigurationEditorForm\">\n  <grid id=\"27dc6\" binding=\"myComponent\" layout-manager=\"GridLayoutManager\" row-count=\"9\" column-count=\"4\" same-size-horizontally=\"false\" same-size-vertically=\"false\" hgap=\"-1\" vgap=\"-1\">\n    <margin top=\"0\" left=\"0\" bottom=\"0\" right=\"0\"/>\n    <constraints>\n      <xy x=\"20\" y=\"20\" width=\"657\" height=\"425\"/>\n    </constraints>\n    <properties/>\n    <border type=\"none\"/>\n    <children>\n      <vspacer id=\"632bf\">\n        <constraints>\n          <grid row=\"8\" column=\"0\" row-span=\"1\" col-span=\"4\" vsize-policy=\"6\" hsize-policy=\"1\" anchor=\"0\" fill=\"2\" indent=\"0\" use-parent-layout=\"false\"/>\n        </constraints>\n      </vspacer>\n      <component id=\"c65ef\" class=\"javax.swing.JComboBox\" binding=\"myTestKindComboBox\">\n        <constraints>\n          <grid row=\"1\" column=\"1\" row-span=\"1\" col-span=\"1\" vsize-policy=\"0\" hsize-policy=\"2\" anchor=\"8\" fill=\"1\" indent=\"0\" use-parent-layout=\"false\">\n            <preferred-size width=\"123\" height=\"26\"/>\n          </grid>\n        </constraints>\n        <properties>\n          <model>\n            <item value=\"All in directory\"/>\n            <item value=\"All in package\"/>\n            <item value=\"File\"/>\n          </model>\n        </properties>\n      </component>\n      <component id=\"b1040\" class=\"javax.swing.JLabel\">\n        <constraints>\n          <grid row=\"1\" column=\"0\" row-span=\"1\" col-span=\"1\" vsize-policy=\"0\" hsize-policy=\"0\" anchor=\"8\" fill=\"0\" indent=\"0\" use-parent-layout=\"false\">\n            <preferred-size width=\"163\" height=\"16\"/>\n          </grid>\n        </constraints>\n        <properties>\n          <labelFor value=\"c65ef\"/>\n          <text value=\"Test &amp;kind:\"/>\n        </properties>\n      </component>\n      <component id=\"c1b\" class=\"javax.swing.JLabel\" binding=\"myDirectoryLabel\">\n        <constraints>\n          <grid row=\"2\" column=\"0\" row-span=\"1\" col-span=\"1\" vsize-policy=\"0\" hsize-policy=\"0\" anchor=\"8\" fill=\"0\" indent=\"0\" use-parent-layout=\"false\">\n            <preferred-size width=\"163\" height=\"16\"/>\n          </grid>\n        </constraints>\n        <properties>\n          <labelFor value=\"c2258\"/>\n          <text value=\"&amp;Directory:\"/>\n          <visible value=\"true\"/>\n        </properties>\n      </component>\n      <component id=\"c2258\" class=\"com.intellij.openapi.ui.TextFieldWithBrowseButton\" binding=\"myDirectoryField\">\n        <constraints>\n          <grid row=\"2\" column=\"1\" row-span=\"1\" col-span=\"3\" vsize-policy=\"3\" hsize-policy=\"3\" anchor=\"0\" fill=\"1\" indent=\"0\" use-parent-layout=\"false\"/>\n        </constraints>\n        <properties>\n          <visible value=\"true\"/>\n        </properties>\n      </component>\n      <component id=\"69539\" class=\"javax.swing.JLabel\" binding=\"myPackageLabel\">\n        <constraints>\n          <grid row=\"3\" column=\"0\" row-span=\"1\" col-span=\"1\" vsize-policy=\"0\" hsize-policy=\"0\" anchor=\"8\" fill=\"0\" indent=\"0\" use-parent-layout=\"false\">\n            <preferred-size width=\"163\" height=\"16\"/>\n          </grid>\n        </constraints>\n        <properties>\n          <labelFor value=\"d8a73\"/>\n          <text value=\"&amp;Package:\"/>\n          <visible value=\"true\"/>\n        </properties>\n      </component>\n      <component id=\"d8a73\" class=\"com.intellij.ui.EditorTextField\" binding=\"myPackageField\" custom-create=\"true\">\n        <constraints>\n          <grid row=\"3\" column=\"1\" row-span=\"1\" col-span=\"3\" vsize-policy=\"3\" hsize-policy=\"3\" anchor=\"0\" fill=\"1\" indent=\"0\" use-parent-layout=\"false\"/>\n        </constraints>\n        <properties>\n          <visible value=\"true\"/>\n        </properties>\n      </component>\n      <component id=\"a9bf9\" class=\"javax.swing.JLabel\" binding=\"myFileLabel\">\n        <constraints>\n          <grid row=\"4\" column=\"0\" row-span=\"1\" col-span=\"1\" vsize-policy=\"0\" hsize-policy=\"0\" anchor=\"8\" fill=\"0\" indent=\"0\" use-parent-layout=\"false\">\n            <preferred-size width=\"163\" height=\"16\"/>\n          </grid>\n        </constraints>\n        <properties>\n          <labelFor value=\"b2116\"/>\n          <text value=\"&amp;File:\"/>\n          <visible value=\"true\"/>\n        </properties>\n      </component>\n      <component id=\"b2116\" class=\"com.intellij.openapi.ui.TextFieldWithBrowseButton\" binding=\"myFileField\">\n        <constraints>\n          <grid row=\"4\" column=\"1\" row-span=\"1\" col-span=\"3\" vsize-policy=\"3\" hsize-policy=\"3\" anchor=\"0\" fill=\"1\" indent=\"0\" use-parent-layout=\"false\"/>\n        </constraints>\n        <properties>\n          <visible value=\"true\"/>\n        </properties>\n      </component>\n      <hspacer id=\"e93e6\">\n        <constraints>\n          <grid row=\"1\" column=\"2\" row-span=\"1\" col-span=\"2\" vsize-policy=\"1\" hsize-policy=\"6\" anchor=\"0\" fill=\"1\" indent=\"0\" use-parent-layout=\"false\"/>\n        </constraints>\n      </hspacer>\n      <component id=\"5d2fe\" class=\"com.intellij.ui.EditorTextField\" binding=\"myPatternEditor\" custom-create=\"true\">\n        <constraints>\n          <grid row=\"5\" column=\"1\" row-span=\"1\" col-span=\"3\" vsize-policy=\"3\" hsize-policy=\"3\" anchor=\"0\" fill=\"1\" indent=\"0\" use-parent-layout=\"false\"/>\n        </constraints>\n        <properties/>\n      </component>\n      <component id=\"be44b\" class=\"javax.swing.JLabel\" binding=\"myPatternLabel\">\n        <constraints>\n          <grid row=\"5\" column=\"0\" row-span=\"1\" col-span=\"1\" vsize-policy=\"0\" hsize-policy=\"0\" anchor=\"8\" fill=\"0\" indent=\"0\" use-parent-layout=\"false\">\n            <preferred-size width=\"163\" height=\"15\"/>\n          </grid>\n        </constraints>\n        <properties>\n          <labelFor value=\"5d2fe\"/>\n          <text value=\"Patte&amp;rn:\"/>\n        </properties>\n      </component>\n      <component id=\"8d39e\" class=\"javax.swing.JSeparator\">\n        <constraints>\n          <grid row=\"6\" column=\"0\" row-span=\"1\" col-span=\"4\" vsize-policy=\"6\" hsize-policy=\"6\" anchor=\"1\" fill=\"1\" indent=\"0\" use-parent-layout=\"false\"/>\n        </constraints>\n        <properties/>\n      </component>\n      <nested-form id=\"78da9\" form-file=\"com/goide/runconfig/ui/GoCommonSettingsPanel.form\" binding=\"myCommonSettingsPanel\">\n        <constraints>\n          <grid row=\"7\" column=\"0\" row-span=\"1\" col-span=\"4\" vsize-policy=\"3\" hsize-policy=\"3\" anchor=\"1\" fill=\"1\" indent=\"0\" use-parent-layout=\"false\"/>\n        </constraints>\n      </nested-form>\n      <component id=\"87b6\" class=\"javax.swing.JLabel\">\n        <constraints>\n          <grid row=\"0\" column=\"0\" row-span=\"1\" col-span=\"1\" vsize-policy=\"0\" hsize-policy=\"0\" anchor=\"8\" fill=\"0\" indent=\"0\" use-parent-layout=\"false\"/>\n        </constraints>\n        <properties>\n          <text value=\"Test framework:\"/>\n        </properties>\n      </component>\n      <component id=\"90783\" class=\"javax.swing.JRadioButton\" binding=\"myGotestFrameworkRadioButton\">\n        <constraints>\n          <grid row=\"0\" column=\"1\" row-span=\"1\" col-span=\"1\" vsize-policy=\"0\" hsize-policy=\"3\" anchor=\"8\" fill=\"0\" indent=\"0\" use-parent-layout=\"false\"/>\n        </constraints>\n        <properties>\n          <text value=\"go&amp;test\"/>\n        </properties>\n      </component>\n      <component id=\"f8e3f\" class=\"javax.swing.JRadioButton\" binding=\"myGocheckFrameworkRadioButton\">\n        <constraints>\n          <grid row=\"0\" column=\"2\" row-span=\"1\" col-span=\"1\" vsize-policy=\"0\" hsize-policy=\"3\" anchor=\"8\" fill=\"0\" indent=\"0\" use-parent-layout=\"false\"/>\n        </constraints>\n        <properties>\n          <text value=\"go&amp;check\"/>\n        </properties>\n      </component>\n      <component id=\"f0312\" class=\"javax.swing.JRadioButton\" binding=\"myGobenchRadioButton\" default-binding=\"true\">\n        <constraints>\n          <grid row=\"0\" column=\"3\" row-span=\"1\" col-span=\"1\" vsize-policy=\"0\" hsize-policy=\"3\" anchor=\"8\" fill=\"0\" indent=\"0\" use-parent-layout=\"false\"/>\n        </constraints>\n        <properties>\n          <text value=\"go&amp;bench\"/>\n        </properties>\n      </component>\n    </children>\n  </grid>\n  <buttonGroups>\n    <group name=\"myTestFramework\">\n      <member id=\"f8e3f\"/>\n      <member id=\"90783\"/>\n      <member id=\"f0312\"/>\n    </group>\n  </buttonGroups>\n</form>\n"
  },
  {
    "path": "src/com/goide/runconfig/testing/ui/GoTestRunConfigurationEditorForm.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.testing.ui;\n\nimport com.goide.runconfig.GoRunUtil;\nimport com.goide.runconfig.testing.GoTestRunConfiguration;\nimport com.goide.runconfig.testing.frameworks.gobench.GobenchFramework;\nimport com.goide.runconfig.testing.frameworks.gocheck.GocheckFramework;\nimport com.goide.runconfig.testing.frameworks.gotest.GotestFramework;\nimport com.goide.runconfig.ui.GoCommonSettingsPanel;\nimport com.intellij.openapi.options.ConfigurationException;\nimport com.intellij.openapi.options.SettingsEditor;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.ui.TextFieldWithBrowseButton;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.ui.EditorTextField;\nimport com.intellij.ui.ListCellRendererWrapper;\nimport org.intellij.lang.regexp.RegExpLanguage;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport javax.swing.*;\nimport java.util.Locale;\n\npublic class GoTestRunConfigurationEditorForm extends SettingsEditor<GoTestRunConfiguration> {\n  @NotNull private final Project myProject;\n  private JPanel myComponent;\n  private EditorTextField myPatternEditor;\n\n  private JComboBox myTestKindComboBox;\n  private JLabel myFileLabel;\n  private TextFieldWithBrowseButton myFileField;\n  private JLabel myPackageLabel;\n  private EditorTextField myPackageField;\n  private JLabel myDirectoryLabel;\n  private TextFieldWithBrowseButton myDirectoryField;\n  private JLabel myPatternLabel;\n  private GoCommonSettingsPanel myCommonSettingsPanel;\n  private JRadioButton myGotestFrameworkRadioButton;\n  private JRadioButton myGocheckFrameworkRadioButton;\n  private JRadioButton myGobenchRadioButton;\n\n  public GoTestRunConfigurationEditorForm(@NotNull Project project) {\n    super(null);\n    myProject = project;\n    myCommonSettingsPanel.init(project);\n\n    installTestKindComboBox();\n    installFileChoosers(project);\n  }\n\n  private void onTestKindChanged() {\n    GoTestRunConfiguration.Kind selectedKind = (GoTestRunConfiguration.Kind)myTestKindComboBox.getSelectedItem();\n    if (selectedKind == null) {\n      selectedKind = GoTestRunConfiguration.Kind.DIRECTORY;\n    }\n    boolean allInPackage = selectedKind == GoTestRunConfiguration.Kind.PACKAGE;\n    boolean allInDirectory = selectedKind == GoTestRunConfiguration.Kind.DIRECTORY;\n    boolean file = selectedKind == GoTestRunConfiguration.Kind.FILE;\n\n    myPackageField.setVisible(allInPackage);\n    myPackageLabel.setVisible(allInPackage);\n    myDirectoryField.setVisible(allInDirectory);\n    myDirectoryLabel.setVisible(allInDirectory);\n    myFileField.setVisible(file);\n    myFileLabel.setVisible(file);\n    myPatternEditor.setVisible(!file);\n    myPatternLabel.setVisible(!file);\n  }\n\n  @Override\n  protected void resetEditorFrom(@NotNull GoTestRunConfiguration configuration) {\n    myGotestFrameworkRadioButton.setSelected(configuration.getTestFramework() == GotestFramework.INSTANCE);\n    myGocheckFrameworkRadioButton.setSelected(configuration.getTestFramework() == GocheckFramework.INSTANCE);\n    myGobenchRadioButton.setSelected(configuration.getTestFramework() == GobenchFramework.INSTANCE);\n    myTestKindComboBox.setSelectedItem(configuration.getKind());\n    myPackageField.setText(configuration.getPackage());\n\n    String directoryPath = configuration.getDirectoryPath();\n    myDirectoryField.setText(directoryPath.isEmpty() ? configuration.getProject().getBasePath() : directoryPath);\n\n    String filePath = configuration.getFilePath();\n    myFileField.setText(filePath.isEmpty() ? configuration.getProject().getBasePath() : filePath);\n\n    myPatternEditor.setText(configuration.getPattern());\n\n    myCommonSettingsPanel.resetEditorFrom(configuration);\n  }\n\n  @Override\n  protected void applyEditorTo(@NotNull GoTestRunConfiguration configuration) throws ConfigurationException {\n    if (myGocheckFrameworkRadioButton.isSelected()) {\n      configuration.setTestFramework(GocheckFramework.INSTANCE);\n    } else if (myGobenchRadioButton.isSelected()) {\n      configuration.setTestFramework(GobenchFramework.INSTANCE);\n    } else {\n      configuration.setTestFramework(GotestFramework.INSTANCE);\n    }\n    configuration.setKind((GoTestRunConfiguration.Kind)myTestKindComboBox.getSelectedItem());\n    configuration.setPackage(myPackageField.getText());\n    configuration.setDirectoryPath(myDirectoryField.getText());\n    configuration.setFilePath(myFileField.getText());\n    configuration.setPattern(myPatternEditor.getText());\n\n    myCommonSettingsPanel.applyEditorTo(configuration);\n  }\n\n  @NotNull\n  @Override\n  protected JComponent createEditor() {\n    return myComponent;\n  }\n\n  @Override\n  protected void disposeEditor() {\n    myComponent.setVisible(false);\n  }\n\n  private void createUIComponents() {\n    myPatternEditor = new EditorTextField(\"\", null, RegExpLanguage.INSTANCE.getAssociatedFileType());\n    myPackageField = new GoPackageFieldCompletionProvider(\n      () -> myCommonSettingsPanel != null ? myCommonSettingsPanel.getSelectedModule() : null).createEditor(myProject);\n  }\n\n  @Nullable\n  private static ListCellRendererWrapper<GoTestRunConfiguration.Kind> getTestKindListCellRendererWrapper() {\n    return new ListCellRendererWrapper<GoTestRunConfiguration.Kind>() {\n      @Override\n      public void customize(JList list, @Nullable GoTestRunConfiguration.Kind kind, int index, boolean selected, boolean hasFocus) {\n        if (kind != null) {\n          String kindName = StringUtil.capitalize(kind.toString().toLowerCase(Locale.US));\n          setText(kindName);\n        }\n      }\n    };\n  }\n\n  private void installFileChoosers(@NotNull Project project) {\n    GoRunUtil.installFileChooser(project, myFileField, false);\n    GoRunUtil.installFileChooser(project, myDirectoryField, true);\n  }\n\n  private void installTestKindComboBox() {\n    myTestKindComboBox.removeAllItems();\n    myTestKindComboBox.setRenderer(getTestKindListCellRendererWrapper());\n    for (GoTestRunConfiguration.Kind kind : GoTestRunConfiguration.Kind.values()) {\n      myTestKindComboBox.addItem(kind);\n    }\n    myTestKindComboBox.addActionListener(e -> onTestKindChanged());\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/ui/GoApplicationConfigurationEditorForm.form",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<form xmlns=\"http://www.intellij.com/uidesigner/form/\" version=\"1\" bind-to-class=\"com.goide.runconfig.ui.GoApplicationConfigurationEditorForm\">\n  <grid id=\"27dc6\" binding=\"myComponent\" layout-manager=\"GridLayoutManager\" row-count=\"3\" column-count=\"1\" same-size-horizontally=\"false\" same-size-vertically=\"false\" hgap=\"-1\" vgap=\"-1\">\n    <margin top=\"0\" left=\"0\" bottom=\"0\" right=\"0\"/>\n    <constraints>\n      <xy x=\"20\" y=\"20\" width=\"725\" height=\"343\"/>\n    </constraints>\n    <properties/>\n    <border type=\"none\"/>\n    <children>\n      <grid id=\"487df\" layout-manager=\"GridLayoutManager\" row-count=\"4\" column-count=\"3\" same-size-horizontally=\"false\" same-size-vertically=\"false\" hgap=\"-1\" vgap=\"-1\">\n        <margin top=\"0\" left=\"0\" bottom=\"0\" right=\"0\"/>\n        <constraints>\n          <grid row=\"0\" column=\"0\" row-span=\"1\" col-span=\"1\" vsize-policy=\"3\" hsize-policy=\"3\" anchor=\"0\" fill=\"3\" indent=\"0\" use-parent-layout=\"true\"/>\n        </constraints>\n        <properties/>\n        <border type=\"none\"/>\n        <children>\n          <component id=\"4edfe\" class=\"javax.swing.JComboBox\" binding=\"myRunKindComboBox\">\n            <constraints>\n              <grid row=\"0\" column=\"1\" row-span=\"1\" col-span=\"1\" vsize-policy=\"0\" hsize-policy=\"2\" anchor=\"8\" fill=\"1\" indent=\"0\" use-parent-layout=\"false\">\n                <preferred-size width=\"123\" height=\"26\"/>\n              </grid>\n            </constraints>\n            <properties>\n              <model>\n                <item value=\"Package\"/>\n                <item value=\"File\"/>\n              </model>\n            </properties>\n          </component>\n          <component id=\"491ca\" class=\"javax.swing.JLabel\">\n            <constraints>\n              <grid row=\"0\" column=\"0\" row-span=\"1\" col-span=\"1\" vsize-policy=\"0\" hsize-policy=\"0\" anchor=\"8\" fill=\"0\" indent=\"0\" use-parent-layout=\"false\"/>\n            </constraints>\n            <properties>\n              <labelFor value=\"4edfe\"/>\n              <text value=\"&amp;Run kind\"/>\n            </properties>\n          </component>\n          <hspacer id=\"50e45\">\n            <constraints>\n              <grid row=\"0\" column=\"2\" row-span=\"1\" col-span=\"1\" vsize-policy=\"1\" hsize-policy=\"6\" anchor=\"0\" fill=\"1\" indent=\"0\" use-parent-layout=\"false\"/>\n            </constraints>\n          </hspacer>\n          <component id=\"9d007\" class=\"javax.swing.JLabel\" binding=\"myPackageLabel\">\n            <constraints>\n              <grid row=\"1\" column=\"0\" row-span=\"1\" col-span=\"1\" vsize-policy=\"0\" hsize-policy=\"0\" anchor=\"8\" fill=\"0\" indent=\"0\" use-parent-layout=\"false\"/>\n            </constraints>\n            <properties>\n              <labelFor value=\"57642\"/>\n              <text value=\"&amp;Package\"/>\n            </properties>\n          </component>\n          <component id=\"57642\" class=\"com.intellij.ui.EditorTextField\" binding=\"myPackageField\" custom-create=\"true\">\n            <constraints>\n              <grid row=\"1\" column=\"1\" row-span=\"1\" col-span=\"2\" vsize-policy=\"0\" hsize-policy=\"6\" anchor=\"8\" fill=\"1\" indent=\"0\" use-parent-layout=\"false\">\n                <preferred-size width=\"150\" height=\"-1\"/>\n              </grid>\n            </constraints>\n            <properties>\n              <visible value=\"true\"/>\n            </properties>\n          </component>\n          <component id=\"ffb40\" class=\"com.intellij.openapi.ui.TextFieldWithBrowseButton\" binding=\"myFileField\">\n            <constraints>\n              <grid row=\"2\" column=\"1\" row-span=\"1\" col-span=\"2\" vsize-policy=\"3\" hsize-policy=\"7\" anchor=\"0\" fill=\"1\" indent=\"0\" use-parent-layout=\"false\"/>\n            </constraints>\n            <properties>\n              <visible value=\"true\"/>\n            </properties>\n          </component>\n          <component id=\"f9f16\" class=\"javax.swing.JLabel\" binding=\"myFileLabel\">\n            <constraints>\n              <grid row=\"2\" column=\"0\" row-span=\"1\" col-span=\"1\" vsize-policy=\"0\" hsize-policy=\"0\" anchor=\"8\" fill=\"0\" indent=\"0\" use-parent-layout=\"false\"/>\n            </constraints>\n            <properties>\n              <labelFor value=\"ffb40\"/>\n              <text value=\"&amp;File\"/>\n            </properties>\n          </component>\n          <component id=\"ad311\" class=\"javax.swing.JLabel\">\n            <constraints>\n              <grid row=\"3\" column=\"0\" row-span=\"1\" col-span=\"1\" vsize-policy=\"0\" hsize-policy=\"0\" anchor=\"8\" fill=\"0\" indent=\"0\" use-parent-layout=\"false\"/>\n            </constraints>\n            <properties>\n              <labelFor value=\"580da\"/>\n              <text value=\"O&amp;utput directory\"/>\n            </properties>\n          </component>\n          <component id=\"580da\" class=\"com.intellij.openapi.ui.TextFieldWithBrowseButton\" binding=\"myOutputFilePathField\">\n            <constraints>\n              <grid row=\"3\" column=\"1\" row-span=\"1\" col-span=\"2\" vsize-policy=\"3\" hsize-policy=\"3\" anchor=\"0\" fill=\"1\" indent=\"0\" use-parent-layout=\"false\"/>\n            </constraints>\n            <properties/>\n          </component>\n        </children>\n      </grid>\n      <vspacer id=\"632bf\">\n        <constraints>\n          <grid row=\"2\" column=\"0\" row-span=\"1\" col-span=\"1\" vsize-policy=\"6\" hsize-policy=\"1\" anchor=\"0\" fill=\"2\" indent=\"0\" use-parent-layout=\"false\"/>\n        </constraints>\n      </vspacer>\n      <nested-form id=\"b9fff\" form-file=\"com/goide/runconfig/ui/GoCommonSettingsPanel.form\" binding=\"myCommonSettingsPanel\">\n        <constraints>\n          <grid row=\"1\" column=\"0\" row-span=\"1\" col-span=\"1\" vsize-policy=\"3\" hsize-policy=\"3\" anchor=\"1\" fill=\"1\" indent=\"0\" use-parent-layout=\"false\"/>\n        </constraints>\n      </nested-form>\n    </children>\n  </grid>\n  <buttonGroups>\n    <group name=\"myRunnerType\">\n      <member id=\"eaa7a\"/>\n      <member id=\"eb72c\"/>\n    </group>\n  </buttonGroups>\n</form>\n"
  },
  {
    "path": "src/com/goide/runconfig/ui/GoApplicationConfigurationEditorForm.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.ui;\n\nimport com.goide.runconfig.GoRunUtil;\nimport com.goide.runconfig.application.GoApplicationConfiguration;\nimport com.goide.runconfig.testing.ui.GoPackageFieldCompletionProvider;\nimport com.intellij.openapi.options.ConfigurationException;\nimport com.intellij.openapi.options.SettingsEditor;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.ui.TextFieldWithBrowseButton;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.ui.EditorTextField;\nimport com.intellij.ui.ListCellRendererWrapper;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport javax.swing.*;\nimport java.util.Locale;\n\npublic class GoApplicationConfigurationEditorForm extends SettingsEditor<GoApplicationConfiguration> {\n  @NotNull private final Project myProject;\n  private JPanel myComponent;\n  private TextFieldWithBrowseButton myFileField;\n  private GoCommonSettingsPanel myCommonSettingsPanel;\n  private EditorTextField myPackageField;\n  private JComboBox myRunKindComboBox;\n  private JLabel myPackageLabel;\n  private JLabel myFileLabel;\n  private TextFieldWithBrowseButton myOutputFilePathField;\n\n\n  public GoApplicationConfigurationEditorForm(@NotNull Project project) {\n    super(null);\n    myProject = project;\n    myCommonSettingsPanel.init(project);\n\n    installRunKindComboBox();\n    GoRunUtil.installGoWithMainFileChooser(myProject, myFileField);\n    GoRunUtil.installFileChooser(myProject, myOutputFilePathField, true, true);\n  }\n\n  private void onRunKindChanged() {\n    GoApplicationConfiguration.Kind selectedKind = (GoApplicationConfiguration.Kind)myRunKindComboBox.getSelectedItem();\n    if (selectedKind == null) {\n      selectedKind = GoApplicationConfiguration.Kind.PACKAGE;\n    }\n    boolean thePackage = selectedKind == GoApplicationConfiguration.Kind.PACKAGE;\n    boolean file = selectedKind == GoApplicationConfiguration.Kind.FILE;\n\n    myPackageField.setVisible(thePackage);\n    myPackageLabel.setVisible(thePackage);\n    myFileField.setVisible(file);\n    myFileLabel.setVisible(file);\n  }\n\n  @Override\n  protected void resetEditorFrom(@NotNull GoApplicationConfiguration configuration) {\n    myFileField.setText(configuration.getFilePath());\n    myPackageField.setText(configuration.getPackage());\n    myRunKindComboBox.setSelectedItem(configuration.getKind());\n    myOutputFilePathField.setText(StringUtil.notNullize(configuration.getOutputFilePath()));\n    myCommonSettingsPanel.resetEditorFrom(configuration);\n  }\n\n  @Override\n  protected void applyEditorTo(@NotNull GoApplicationConfiguration configuration) throws ConfigurationException {\n    configuration.setFilePath(myFileField.getText());\n    configuration.setPackage(myPackageField.getText());\n    configuration.setKind((GoApplicationConfiguration.Kind)myRunKindComboBox.getSelectedItem());\n    configuration.setFileOutputPath(StringUtil.nullize(myOutputFilePathField.getText()));\n    myCommonSettingsPanel.applyEditorTo(configuration);\n  }\n\n  private void createUIComponents() {\n    myPackageField = new GoPackageFieldCompletionProvider(\n      () -> myCommonSettingsPanel != null ? myCommonSettingsPanel.getSelectedModule() : null).createEditor(myProject);\n  }\n\n  @Nullable\n  private static ListCellRendererWrapper<GoApplicationConfiguration.Kind> getRunKindListCellRendererWrapper() {\n    return new ListCellRendererWrapper<GoApplicationConfiguration.Kind>() {\n      @Override\n      public void customize(JList list, @Nullable GoApplicationConfiguration.Kind kind, int index, boolean selected, boolean hasFocus) {\n        if (kind != null) {\n          String kindName = StringUtil.capitalize(kind.toString().toLowerCase(Locale.US));\n          setText(kindName);\n        }\n      }\n    };\n  }\n\n  private void installRunKindComboBox() {\n    myRunKindComboBox.removeAllItems();\n    myRunKindComboBox.setRenderer(getRunKindListCellRendererWrapper());\n    for (GoApplicationConfiguration.Kind kind : GoApplicationConfiguration.Kind.values()) {\n      myRunKindComboBox.addItem(kind);\n    }\n    myRunKindComboBox.addActionListener(e -> onRunKindChanged());\n  }\n\n  @NotNull\n  @Override\n  protected JComponent createEditor() {\n    return myComponent;\n  }\n\n  @Override\n  protected void disposeEditor() {\n    myComponent.setVisible(false);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/ui/GoCommonSettingsPanel.form",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<form xmlns=\"http://www.intellij.com/uidesigner/form/\" version=\"1\" bind-to-class=\"com.goide.runconfig.ui.GoCommonSettingsPanel\">\n  <grid id=\"27dc6\" binding=\"myRoot\" layout-manager=\"GridLayoutManager\" row-count=\"6\" column-count=\"2\" same-size-horizontally=\"false\" same-size-vertically=\"false\" hgap=\"-1\" vgap=\"-1\">\n    <margin top=\"0\" left=\"0\" bottom=\"0\" right=\"0\"/>\n    <constraints>\n      <xy x=\"20\" y=\"20\" width=\"500\" height=\"400\"/>\n    </constraints>\n    <properties/>\n    <border type=\"none\"/>\n    <children>\n      <vspacer id=\"36ae\">\n        <constraints>\n          <grid row=\"5\" column=\"0\" row-span=\"1\" col-span=\"2\" vsize-policy=\"6\" hsize-policy=\"1\" anchor=\"0\" fill=\"2\" indent=\"0\" use-parent-layout=\"false\"/>\n        </constraints>\n      </vspacer>\n      <component id=\"3a255\" class=\"javax.swing.JLabel\">\n        <constraints>\n          <grid row=\"0\" column=\"0\" row-span=\"1\" col-span=\"1\" vsize-policy=\"0\" hsize-policy=\"0\" anchor=\"8\" fill=\"0\" indent=\"0\" use-parent-layout=\"false\"/>\n        </constraints>\n        <properties>\n          <labelFor value=\"658d3\"/>\n          <text value=\"&amp;Working directory:\"/>\n        </properties>\n      </component>\n      <component id=\"658d3\" class=\"com.intellij.openapi.ui.TextFieldWithBrowseButton\" binding=\"myWorkingDirectoryField\">\n        <constraints>\n          <grid row=\"0\" column=\"1\" row-span=\"1\" col-span=\"1\" vsize-policy=\"3\" hsize-policy=\"3\" anchor=\"0\" fill=\"1\" indent=\"0\" use-parent-layout=\"false\"/>\n        </constraints>\n        <properties/>\n      </component>\n      <component id=\"30eb5\" class=\"javax.swing.JLabel\">\n        <constraints>\n          <grid row=\"1\" column=\"0\" row-span=\"1\" col-span=\"1\" vsize-policy=\"0\" hsize-policy=\"0\" anchor=\"8\" fill=\"0\" indent=\"0\" use-parent-layout=\"false\"/>\n        </constraints>\n        <properties>\n          <labelFor value=\"5cd33\"/>\n          <text value=\"&amp;Environment:\"/>\n        </properties>\n      </component>\n      <component id=\"5cd33\" class=\"com.intellij.execution.configuration.EnvironmentVariablesTextFieldWithBrowseButton\" binding=\"myEnvironmentField\">\n        <constraints>\n          <grid row=\"1\" column=\"1\" row-span=\"1\" col-span=\"1\" vsize-policy=\"3\" hsize-policy=\"3\" anchor=\"0\" fill=\"1\" indent=\"0\" use-parent-layout=\"false\"/>\n        </constraints>\n        <properties/>\n      </component>\n      <component id=\"21eaa\" class=\"javax.swing.JLabel\">\n        <constraints>\n          <grid row=\"4\" column=\"0\" row-span=\"1\" col-span=\"1\" vsize-policy=\"0\" hsize-policy=\"0\" anchor=\"8\" fill=\"0\" indent=\"0\" use-parent-layout=\"false\">\n            <preferred-size width=\"1\" height=\"1\"/>\n          </grid>\n        </constraints>\n        <properties>\n          <inheritsPopupMenu value=\"true\"/>\n          <labelFor value=\"e87b2\"/>\n          <text value=\"&amp;Module:\"/>\n        </properties>\n      </component>\n      <component id=\"e87b2\" class=\"com.intellij.application.options.ModulesComboBox\" binding=\"myModulesComboBox\">\n        <constraints>\n          <grid row=\"4\" column=\"1\" row-span=\"1\" col-span=\"1\" vsize-policy=\"3\" hsize-policy=\"3\" anchor=\"1\" fill=\"1\" indent=\"0\" use-parent-layout=\"false\"/>\n        </constraints>\n        <properties/>\n      </component>\n      <component id=\"fd1af\" class=\"javax.swing.JLabel\">\n        <constraints>\n          <grid row=\"3\" column=\"0\" row-span=\"1\" col-span=\"1\" vsize-policy=\"0\" hsize-policy=\"0\" anchor=\"8\" fill=\"0\" indent=\"0\" use-parent-layout=\"false\"/>\n        </constraints>\n        <properties>\n          <labelFor value=\"fedfc\"/>\n          <text value=\"Pr&amp;ogram arguments:\"/>\n        </properties>\n      </component>\n      <component id=\"fedfc\" class=\"com.intellij.ui.RawCommandLineEditor\" binding=\"myParamsField\">\n        <constraints>\n          <grid row=\"3\" column=\"1\" row-span=\"1\" col-span=\"1\" vsize-policy=\"3\" hsize-policy=\"3\" anchor=\"0\" fill=\"1\" indent=\"0\" use-parent-layout=\"false\"/>\n        </constraints>\n        <properties/>\n      </component>\n      <component id=\"f2164\" class=\"com.intellij.ui.RawCommandLineEditor\" binding=\"myGoToolParamsField\">\n        <constraints>\n          <grid row=\"2\" column=\"1\" row-span=\"1\" col-span=\"1\" vsize-policy=\"3\" hsize-policy=\"3\" anchor=\"0\" fill=\"1\" indent=\"0\" use-parent-layout=\"false\"/>\n        </constraints>\n        <properties/>\n      </component>\n      <component id=\"c230f\" class=\"javax.swing.JLabel\">\n        <constraints>\n          <grid row=\"2\" column=\"0\" row-span=\"1\" col-span=\"1\" vsize-policy=\"0\" hsize-policy=\"0\" anchor=\"8\" fill=\"0\" indent=\"0\" use-parent-layout=\"false\"/>\n        </constraints>\n        <properties>\n          <labelFor value=\"f2164\"/>\n          <text value=\"&amp;Go tool arguments:\"/>\n        </properties>\n      </component>\n    </children>\n  </grid>\n</form>\n"
  },
  {
    "path": "src/com/goide/runconfig/ui/GoCommonSettingsPanel.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.ui;\n\nimport com.goide.runconfig.GoRunConfigurationBase;\nimport com.goide.runconfig.GoRunUtil;\nimport com.intellij.application.options.ModulesComboBox;\nimport com.intellij.execution.configuration.EnvironmentVariablesTextFieldWithBrowseButton;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.ui.TextFieldWithBrowseButton;\nimport com.intellij.ui.RawCommandLineEditor;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport javax.swing.*;\n\npublic class GoCommonSettingsPanel extends JPanel {\n  private RawCommandLineEditor myGoToolParamsField;\n  private RawCommandLineEditor myParamsField;\n  private TextFieldWithBrowseButton myWorkingDirectoryField;\n  private EnvironmentVariablesTextFieldWithBrowseButton myEnvironmentField;\n  private ModulesComboBox myModulesComboBox;\n  @SuppressWarnings(\"unused\") private JPanel myRoot;\n\n  public void init(@NotNull Project project) {\n    GoRunUtil.installFileChooser(project, myWorkingDirectoryField, true);\n    myGoToolParamsField.setDialogCaption(\"Go tool arguments\");\n    myParamsField.setDialogCaption(\"Program arguments\");\n  }\n\n  public void resetEditorFrom(@NotNull GoRunConfigurationBase<?> configuration) {\n    myModulesComboBox.setModules(configuration.getValidModules());\n    myModulesComboBox.setSelectedModule(configuration.getConfigurationModule().getModule());\n    myGoToolParamsField.setText(configuration.getGoToolParams());\n    myParamsField.setText(configuration.getParams());\n    myWorkingDirectoryField.setText(configuration.getWorkingDirectory());\n    myEnvironmentField.setEnvs(configuration.getCustomEnvironment());\n    myEnvironmentField.setPassParentEnvs(configuration.isPassParentEnvironment());\n  }\n\n  public void applyEditorTo(@NotNull GoRunConfigurationBase<?> configuration) {\n    configuration.setModule(myModulesComboBox.getSelectedModule());\n    configuration.setGoParams(myGoToolParamsField.getText());\n    configuration.setParams(myParamsField.getText());\n    configuration.setWorkingDirectory(myWorkingDirectoryField.getText());\n    configuration.setCustomEnvironment(myEnvironmentField.getEnvs());\n    configuration.setPassParentEnvironment(myEnvironmentField.isPassParentEnvs());\n  }\n\n  @Nullable\n  public Module getSelectedModule() {\n    return myModulesComboBox.getSelectedModule();\n  }\n}\n"
  },
  {
    "path": "src/com/goide/runconfig/ui/GoRunFileConfigurationEditorForm.form",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<form xmlns=\"http://www.intellij.com/uidesigner/form/\" version=\"1\" bind-to-class=\"com.goide.runconfig.ui.GoRunFileConfigurationEditorForm\">\n  <grid id=\"27dc6\" binding=\"myComponent\" layout-manager=\"GridLayoutManager\" row-count=\"3\" column-count=\"1\" same-size-horizontally=\"false\" same-size-vertically=\"false\" hgap=\"-1\" vgap=\"-1\">\n    <margin top=\"0\" left=\"0\" bottom=\"0\" right=\"0\"/>\n    <constraints>\n      <xy x=\"20\" y=\"20\" width=\"500\" height=\"400\"/>\n    </constraints>\n    <properties/>\n    <border type=\"none\"/>\n    <children>\n      <grid id=\"66522\" layout-manager=\"GridLayoutManager\" row-count=\"1\" column-count=\"2\" same-size-horizontally=\"false\" same-size-vertically=\"false\" hgap=\"-1\" vgap=\"-1\">\n        <margin top=\"0\" left=\"0\" bottom=\"0\" right=\"0\"/>\n        <constraints>\n          <grid row=\"0\" column=\"0\" row-span=\"1\" col-span=\"1\" vsize-policy=\"3\" hsize-policy=\"3\" anchor=\"0\" fill=\"3\" indent=\"0\" use-parent-layout=\"true\"/>\n        </constraints>\n        <properties/>\n        <border type=\"none\"/>\n        <children>\n          <component id=\"e439b\" class=\"com.intellij.openapi.ui.TextFieldWithBrowseButton\" binding=\"myFileField\">\n            <constraints>\n              <grid row=\"0\" column=\"1\" row-span=\"1\" col-span=\"1\" vsize-policy=\"3\" hsize-policy=\"7\" anchor=\"0\" fill=\"1\" indent=\"0\" use-parent-layout=\"false\"/>\n            </constraints>\n            <properties>\n              <visible value=\"true\"/>\n            </properties>\n          </component>\n          <component id=\"f628a\" class=\"javax.swing.JLabel\">\n            <constraints>\n              <grid row=\"0\" column=\"0\" row-span=\"1\" col-span=\"1\" vsize-policy=\"0\" hsize-policy=\"0\" anchor=\"8\" fill=\"0\" indent=\"0\" use-parent-layout=\"false\"/>\n            </constraints>\n            <properties>\n              <labelFor value=\"e439b\"/>\n              <text value=\"&amp;File\"/>\n            </properties>\n          </component>\n        </children>\n      </grid>\n      <nested-form id=\"ea0a1\" form-file=\"com/goide/runconfig/ui/GoCommonSettingsPanel.form\" binding=\"myCommonSettingsPanel\">\n        <constraints>\n          <grid row=\"1\" column=\"0\" row-span=\"1\" col-span=\"1\" vsize-policy=\"3\" hsize-policy=\"3\" anchor=\"1\" fill=\"1\" indent=\"0\" use-parent-layout=\"false\"/>\n        </constraints>\n      </nested-form>\n      <vspacer id=\"83d38\">\n        <constraints>\n          <grid row=\"2\" column=\"0\" row-span=\"1\" col-span=\"1\" vsize-policy=\"6\" hsize-policy=\"1\" anchor=\"0\" fill=\"2\" indent=\"0\" use-parent-layout=\"false\"/>\n        </constraints>\n      </vspacer>\n    </children>\n  </grid>\n</form>\n"
  },
  {
    "path": "src/com/goide/runconfig/ui/GoRunFileConfigurationEditorForm.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.ui;\n\nimport com.goide.runconfig.GoRunUtil;\nimport com.goide.runconfig.file.GoRunFileConfiguration;\nimport com.intellij.openapi.options.ConfigurationException;\nimport com.intellij.openapi.options.SettingsEditor;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.ui.TextFieldWithBrowseButton;\nimport org.jetbrains.annotations.NotNull;\n\nimport javax.swing.*;\n\npublic class GoRunFileConfigurationEditorForm extends SettingsEditor<GoRunFileConfiguration> {\n  private JPanel myComponent;\n  private TextFieldWithBrowseButton myFileField;\n  private GoCommonSettingsPanel myCommonSettingsPanel;\n\n  public GoRunFileConfigurationEditorForm(@NotNull Project project) {\n    myCommonSettingsPanel.init(project);\n    GoRunUtil.installGoWithMainFileChooser(project, myFileField);\n  }\n\n  @Override\n  protected void resetEditorFrom(GoRunFileConfiguration configuration) {\n    myFileField.setText(configuration.getFilePath());\n    myCommonSettingsPanel.resetEditorFrom(configuration);\n  }\n\n  @Override\n  protected void applyEditorTo(GoRunFileConfiguration configuration) throws ConfigurationException {\n    configuration.setFilePath(myFileField.getText());\n    myCommonSettingsPanel.applyEditorTo(configuration);\n  }\n\n  @NotNull\n  @Override\n  protected JComponent createEditor() {\n    return myComponent;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/sdk/GoEnvironmentGoPathModificationTracker.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.sdk;\n\nimport com.goide.GoEnvironmentUtil;\nimport com.intellij.openapi.components.ServiceManager;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.openapi.vfs.*;\nimport com.intellij.util.SystemProperties;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.io.File;\nimport java.util.Collection;\nimport java.util.Set;\n\npublic class GoEnvironmentGoPathModificationTracker {\n  private final Set<String> pathsToTrack = ContainerUtil.newHashSet();\n  private final Collection<VirtualFile> goPathRoots = ContainerUtil.newLinkedHashSet();\n\n  public GoEnvironmentGoPathModificationTracker() {\n    String goPath = GoEnvironmentUtil.retrieveGoPathFromEnvironment();\n    if (goPath != null) {\n      String home = SystemProperties.getUserHome();\n      for (String s : StringUtil.split(goPath, File.pathSeparator)) {\n        if (s.contains(\"$HOME\")) {\n          if (home == null) {\n            continue;\n          }\n          s = s.replaceAll(\"\\\\$HOME\", home);\n        }\n        pathsToTrack.add(s);\n      }\n    }\n    recalculateFiles();\n    \n    VirtualFileManager.getInstance().addVirtualFileListener(new VirtualFileAdapter() {\n      @Override\n      public void fileCreated(@NotNull VirtualFileEvent event) {\n        handleEvent(event);\n      }\n\n      @Override\n      public void fileDeleted(@NotNull VirtualFileEvent event) {\n        handleEvent(event);\n      }\n\n      @Override\n      public void fileMoved(@NotNull VirtualFileMoveEvent event) {\n        handleEvent(event);\n      }\n\n      @Override\n      public void fileCopied(@NotNull VirtualFileCopyEvent event) {\n        handleEvent(event);\n      }\n\n      private void handleEvent(VirtualFileEvent event) {\n        if (pathsToTrack.contains(event.getFile().getPath())) {\n          recalculateFiles();\n        }\n      }\n    });\n  }\n\n  private void recalculateFiles() {\n    Collection<VirtualFile> result = ContainerUtil.newLinkedHashSet();\n    for (String path : pathsToTrack) {\n      ContainerUtil.addIfNotNull(result, LocalFileSystem.getInstance().findFileByPath(path));\n    }\n    updateGoPathRoots(result);\n  }\n\n  private synchronized void updateGoPathRoots(Collection<VirtualFile> newRoots) {\n    goPathRoots.clear();\n    goPathRoots.addAll(newRoots);\n  }\n  \n  private synchronized Collection<VirtualFile> getGoPathRoots() {\n    return goPathRoots;\n  }\n\n  public static Collection<VirtualFile> getGoEnvironmentGoPathRoots() {\n    return ServiceManager.getService(GoEnvironmentGoPathModificationTracker.class).getGoPathRoots();\n  }\n}\n"
  },
  {
    "path": "src/com/goide/sdk/GoIdeaSdkService.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.sdk;\n\nimport com.goide.GoModuleType;\nimport com.intellij.ProjectTopics;\nimport com.intellij.openapi.application.ApplicationManager;\nimport com.intellij.openapi.components.ComponentManager;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.module.ModuleUtil;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.projectRoots.Sdk;\nimport com.intellij.openapi.roots.*;\nimport com.intellij.openapi.roots.ui.configuration.ProjectSettingsService;\nimport com.intellij.psi.util.CachedValueProvider;\nimport com.intellij.psi.util.CachedValuesManager;\nimport com.intellij.util.ObjectUtils;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoIdeaSdkService extends GoSdkService {\n  public GoIdeaSdkService(@NotNull Project project) {\n    super(project);\n    myProject.getMessageBus().connect(project).subscribe(ProjectTopics.PROJECT_ROOTS, new ModuleRootAdapter() {\n      @Override\n      public void rootsChanged(ModuleRootEvent event) {\n        incModificationCount();\n      }\n    });\n  }\n\n  @Override\n  public String getSdkHomePath(@Nullable Module module) {\n    ComponentManager holder = ObjectUtils.notNull(module, myProject);\n    return CachedValuesManager.getManager(myProject).getCachedValue(holder, () -> {\n      Sdk sdk = getGoSdk(module);\n      return CachedValueProvider.Result.create(sdk != null ? sdk.getHomePath() : null, this);\n    });\n  }\n\n  @Nullable\n  @Override\n  public String getSdkVersion(@Nullable Module module) {\n    String parentVersion = super.getSdkVersion(module);\n    if (parentVersion != null) {\n      return parentVersion;\n    }\n\n    ComponentManager holder = ObjectUtils.notNull(module, myProject);\n    return CachedValuesManager.getManager(myProject).getCachedValue(holder, () -> {\n      Sdk sdk = getGoSdk(module);\n      return CachedValueProvider.Result.create(sdk != null ? sdk.getVersionString() : null, this);\n    });\n  }\n\n  @Override\n  public void chooseAndSetSdk(@Nullable Module module) {\n    Sdk projectSdk = ProjectSettingsService.getInstance(myProject).chooseAndSetSdk();\n    if (projectSdk == null && module != null) {\n      ApplicationManager.getApplication().runWriteAction(() -> {\n        if (!module.isDisposed()) {\n          ModuleRootModificationUtil.setSdkInherited(module);\n        }\n      });\n    }\n  }\n\n  @Override\n  public boolean isGoModule(@Nullable Module module) {\n    return super.isGoModule(module) && ModuleUtil.getModuleType(module) == GoModuleType.getInstance();\n  }\n\n  private Sdk getGoSdk(@Nullable Module module) {\n    if (module != null) {\n      Sdk sdk = ModuleRootManager.getInstance(module).getSdk();\n      if (sdk != null && sdk.getSdkType() instanceof GoSdkType) {\n        return sdk;\n      }\n    }\n    Sdk sdk = ProjectRootManager.getInstance(myProject).getProjectSdk();\n    return sdk != null && sdk.getSdkType() instanceof GoSdkType ? sdk : null;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/sdk/GoPackageUtil.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.sdk;\n\nimport com.goide.GoConstants;\nimport com.goide.project.GoBuildTargetSettings;\nimport com.goide.project.GoModuleSettings;\nimport com.goide.psi.GoFile;\nimport com.goide.psi.impl.GoPsiImplUtil;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.module.ModuleUtilCore;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.Comparing;\nimport com.intellij.openapi.util.Key;\nimport com.intellij.openapi.util.io.FileUtil;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.psi.PsiDirectory;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.PsiFileSystemItem;\nimport com.intellij.psi.search.GlobalSearchScope;\nimport com.intellij.psi.util.CachedValue;\nimport com.intellij.psi.util.CachedValueProvider;\nimport com.intellij.psi.util.CachedValuesManager;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.Contract;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.Collection;\nimport java.util.Collections;\nimport java.util.List;\n\npublic class GoPackageUtil {\n  private static final Key<CachedValue<Collection<String>>> PACKAGES_CACHE = Key.create(\"packages_cache\");\n  private static final Key<CachedValue<Collection<String>>> PACKAGES_TEST_TRIMMED_CACHE = Key.create(\"packages_test_trimmed_cache\");\n\n  private GoPackageUtil() {}\n\n  @Contract(\"null -> false\")\n  public static boolean isBuiltinPackage(@Nullable PsiFileSystemItem directory) {\n    return directory instanceof PsiDirectory\n           && GoConstants.BUILTIN_PACKAGE_NAME.equals(directory.getName())\n           && GoConstants.BUILTIN_PACKAGE_NAME.equals(GoSdkUtil.getImportPath((PsiDirectory)directory, false));\n  }\n\n  @NotNull\n  public static List<GoFile> getAllPackageFiles(@NotNull GoFile file) {\n    String packageName = file.getPackageName();\n    PsiDirectory parent = file.getParent();\n    if (parent == null || StringUtil.isEmpty(packageName)) return ContainerUtil.list(file);\n    return getAllPackageFiles(parent, packageName);\n  }\n  \n  @NotNull\n  public static List<GoFile> getAllPackageFiles(@Nullable PsiDirectory directory, @Nullable String packageName) {\n    if (directory == null) {\n      return Collections.emptyList();\n    }\n    PsiElement[] children = directory.getChildren();\n    List<GoFile> files = ContainerUtil.newArrayListWithCapacity(children.length);\n    for (PsiElement element : children) {\n      if (element instanceof GoFile && (packageName == null || Comparing.equal(((GoFile)element).getPackageName(), packageName))) {\n        files.add((GoFile)element);\n      }\n    }\n    return files;\n  }\n\n  @NotNull\n  public static GlobalSearchScope packageScope(@NotNull GoFile file) {\n    List<GoFile> files = getAllPackageFiles(file);\n    return GlobalSearchScope.filesWithLibrariesScope(file.getProject(), ContainerUtil.map(files, PsiFile::getVirtualFile));\n  }\n  \n  @NotNull\n  public static GlobalSearchScope packageScope(@NotNull PsiDirectory psiDirectory, @Nullable String packageName) {\n    List<GoFile> files = getAllPackageFiles(psiDirectory, packageName);\n    return GlobalSearchScope.filesWithLibrariesScope(psiDirectory.getProject(), ContainerUtil.map(files, PsiFile::getVirtualFile));\n  }\n\n  @NotNull\n  public static Collection<String> getAllPackagesInDirectory(@Nullable PsiDirectory dir,\n                                                             @Nullable Module contextModule,\n                                                             boolean trimTestSuffices) {\n    if (dir == null) return Collections.emptyList();\n    if (contextModule != null) {\n      return getAllPackagesInDirectoryInner(dir, contextModule, trimTestSuffices);\n    }\n    Key<CachedValue<Collection<String>>> key = trimTestSuffices ? PACKAGES_TEST_TRIMMED_CACHE : PACKAGES_CACHE;\n    return CachedValuesManager.getManager(dir.getProject()).getCachedValue(dir, key, () -> {\n      Module module = ModuleUtilCore.findModuleForPsiElement(dir);\n      GoBuildTargetSettings buildTargetSettings = module != null ? GoModuleSettings.getInstance(module).getBuildTargetSettings() : null;\n      // todo[zolotov]: implement package modification tracker\n      return buildTargetSettings != null\n             ? CachedValueProvider.Result.create(getAllPackagesInDirectoryInner(dir, module, trimTestSuffices), dir, buildTargetSettings)\n             : CachedValueProvider.Result.create(getAllPackagesInDirectoryInner(dir, null, trimTestSuffices), dir); \n    }, false);\n  }\n\n  @NotNull\n  private static Collection<String> getAllPackagesInDirectoryInner(@NotNull PsiDirectory dir,\n                                                                   @Nullable Module contextModule,\n                                                                   boolean trimTestSuffices) {\n    Collection<String> set = ContainerUtil.newLinkedHashSet();\n    for (PsiFile file : dir.getFiles()) {\n      if (file instanceof GoFile && GoPsiImplUtil.allowed(file, null, contextModule)) {\n        String name = trimTestSuffices ? ((GoFile)file).getCanonicalPackageName() : ((GoFile)file).getPackageName();\n        if (StringUtil.isNotEmpty(name)) {\n          set.add(name);\n        }\n      }\n    }\n    return set;\n  }\n\n  @Nullable\n  public static VirtualFile findByImportPath(@NotNull String importPath, @NotNull Project project, @Nullable Module module) {\n    if (importPath.isEmpty()) {\n      return null;\n    }\n    importPath = FileUtil.toSystemIndependentName(importPath);\n    for (VirtualFile root : GoSdkUtil.getSourcesPathsToLookup(project, module)) {\n      VirtualFile file = root.findFileByRelativePath(importPath);\n      if (file != null) {\n        return file;\n      }\n    }\n    return null;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/sdk/GoSdkLibraryPresentationProvider.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.sdk;\n\nimport com.goide.GoIcons;\nimport com.intellij.openapi.roots.libraries.DummyLibraryProperties;\nimport com.intellij.openapi.roots.libraries.LibraryKind;\nimport com.intellij.openapi.roots.libraries.LibraryPresentationProvider;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport javax.swing.*;\nimport java.util.List;\n\npublic class GoSdkLibraryPresentationProvider extends LibraryPresentationProvider<DummyLibraryProperties> {\n  private static final LibraryKind KIND = LibraryKind.create(\"go\");\n\n  public GoSdkLibraryPresentationProvider() {\n    super(KIND);\n  }\n\n  @Override\n  @Nullable\n  public Icon getIcon() {\n    return GoIcons.ICON;\n  }\n\n  @Override\n  @Nullable\n  public DummyLibraryProperties detect(@NotNull List<VirtualFile> classesRoots) {\n    for (VirtualFile root : classesRoots) {\n      if (GoSmallIDEsSdkService.isGoSdkLibRoot(root) && !GoSdkService.isAppEngineSdkPath(GoSdkService.libraryRootToSdkPath(root))) {\n        return DummyLibraryProperties.INSTANCE;\n      }\n    }\n    return null;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/sdk/GoSdkService.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.sdk;\n\nimport com.goide.GoConstants;\nimport com.goide.GoEnvironmentUtil;\nimport com.intellij.execution.configurations.PathEnvironmentVariableUtil;\nimport com.intellij.openapi.Disposable;\nimport com.intellij.openapi.components.ServiceManager;\nimport com.intellij.openapi.diagnostic.Logger;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.options.Configurable;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.Disposer;\nimport com.intellij.openapi.util.SimpleModificationTracker;\nimport com.intellij.openapi.util.SystemInfo;\nimport com.intellij.openapi.util.io.FileUtil;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.openapi.vfs.VfsUtilCore;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.util.PathUtil;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.Contract;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\nimport org.jetbrains.annotations.TestOnly;\n\nimport java.io.File;\nimport java.util.Set;\n\npublic abstract class GoSdkService extends SimpleModificationTracker {\n  public static final Logger LOG = Logger.getInstance(GoSdkService.class);\n  private static final Set<String> FEDORA_SUBDIRECTORIES = ContainerUtil.newHashSet(\"linux_amd64\", \"linux_386\", \"linux_arm\");\n  private static String ourTestSdkVersion;\n\n  @NotNull\n  protected final Project myProject;\n\n  protected GoSdkService(@NotNull Project project) {\n    myProject = project;\n  }\n\n  public static GoSdkService getInstance(@NotNull Project project) {\n    return ServiceManager.getService(project, GoSdkService.class);\n  }\n\n  @Nullable\n  public abstract String getSdkHomePath(@Nullable Module module);\n\n  @NotNull\n  public static String libraryRootToSdkPath(@NotNull VirtualFile root) {\n    return VfsUtilCore.urlToPath(StringUtil.trimEnd(StringUtil.trimEnd(StringUtil.trimEnd(root.getUrl(), \"src/pkg\"), \"src\"), \"/\"));\n  }\n\n  @Nullable\n  public String getSdkVersion(@Nullable Module module) {\n    return ourTestSdkVersion;\n  }\n\n  public boolean isAppEngineSdk(@Nullable Module module) {\n    return isAppEngineSdkPath(getSdkHomePath(module));\n  }\n\n  public static boolean isAppEngineSdkPath(@Nullable String path) {\n    return isLooksLikeAppEngineSdkPath(path) && getGaeExecutablePath(path) != null;\n  }\n\n  private static boolean isLooksLikeAppEngineSdkPath(@Nullable String path) {\n    return path != null && path.endsWith(GoConstants.APP_ENGINE_GO_ROOT_DIRECTORY_PATH);\n  }\n\n  public abstract void chooseAndSetSdk(@Nullable Module module);\n\n  /**\n   * Use this method in order to check whether the method is appropriate for providing Go-specific code insight\n   */\n  @Contract(\"null -> false\")\n  public boolean isGoModule(@Nullable Module module) {\n    return module != null && !module.isDisposed();\n  }\n\n  @Nullable\n  public Configurable createSdkConfigurable() {\n    return null;\n  }\n\n  @Nullable\n  public String getGoExecutablePath(@Nullable Module module) {\n    return getGoExecutablePath(getSdkHomePath(module));\n  }\n\n  public static String getGoExecutablePath(@Nullable String sdkHomePath) {\n    if (sdkHomePath != null) {\n      if (isLooksLikeAppEngineSdkPath(sdkHomePath)) {\n        LOG.debug(\"Looks like GAE sdk at \" + sdkHomePath);\n        String executablePath = getGaeExecutablePath(sdkHomePath);\n        if (executablePath != null) return executablePath;\n      }\n\n      File binDirectory = new File(sdkHomePath, \"bin\");\n      if (!binDirectory.exists() && SystemInfo.isLinux) {\n        LOG.debug(sdkHomePath + \"/bin doesn't exist, checking linux-specific paths\");\n        // failed to define executable path in old linux and old go\n        File goFromPath = PathEnvironmentVariableUtil.findInPath(GoConstants.GO_EXECUTABLE_NAME);\n        if (goFromPath != null && goFromPath.exists()) {\n          LOG.debug(\"Go executable found at \" + goFromPath.getAbsolutePath());\n          return goFromPath.getAbsolutePath();\n        }\n      }\n\n      String executableName = GoEnvironmentUtil.getBinaryFileNameForPath(GoConstants.GO_EXECUTABLE_NAME);\n      String executable = FileUtil.join(sdkHomePath, \"bin\", executableName);\n\n      if (!new File(executable).exists() && SystemInfo.isLinux) {\n        LOG.debug(executable + \" doesn't exists. Looking for binaries in fedora-specific directories\");\n        // fedora\n        for (String directory : FEDORA_SUBDIRECTORIES) {\n          File file = new File(binDirectory, directory);\n          if (file.exists() && file.isDirectory()) {\n            LOG.debug(\"Go executable found at \" + file.getAbsolutePath());\n            return FileUtil.join(file.getAbsolutePath(), executableName);\n          }\n        }\n      }\n      LOG.debug(\"Go executable found at \" + executable);\n      return executable;\n    }\n    return null;\n  }\n\n  @Nullable\n  private static String getGaeExecutablePath(@NotNull String sdkHomePath) {\n    String goExecutablePath = PathUtil.toSystemIndependentName(sdkHomePath);\n    goExecutablePath = StringUtil.trimEnd(goExecutablePath, GoConstants.APP_ENGINE_GO_ROOT_DIRECTORY_PATH);\n\n    boolean gcloudInstallation = goExecutablePath.endsWith(GoConstants.GCLOUD_APP_ENGINE_DIRECTORY_PATH);\n    if (gcloudInstallation) {\n      LOG.debug(\"Detected gcloud GAE installation at \" + goExecutablePath);\n      goExecutablePath = FileUtil.join(StringUtil.trimEnd(goExecutablePath, GoConstants.GCLOUD_APP_ENGINE_DIRECTORY_PATH), \"bin\");\n    }\n    String executablePath = FileUtil.join(goExecutablePath, GoEnvironmentUtil.getGaeExecutableFileName(gcloudInstallation));\n    return new File(executablePath).exists() ? executablePath : null;\n  }\n\n  @TestOnly\n  public static void setTestingSdkVersion(@Nullable String version, @NotNull Disposable disposable) {\n    ourTestSdkVersion = version;\n    Disposer.register(disposable, () -> {\n      //noinspection AssignmentToStaticFieldFromInstanceMethod\n      ourTestSdkVersion = null;\n    });\n  }\n}\n"
  },
  {
    "path": "src/com/goide/sdk/GoSdkType.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.sdk;\n\nimport com.goide.GoConstants;\nimport com.goide.GoIcons;\nimport com.intellij.openapi.projectRoots.*;\nimport com.intellij.openapi.roots.OrderRootType;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport org.jdom.Element;\nimport org.jetbrains.annotations.NonNls;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport javax.swing.*;\nimport java.io.File;\n\npublic class GoSdkType extends SdkType {\n  public GoSdkType() {\n    super(GoConstants.SDK_TYPE_ID);\n  }\n\n  @NotNull\n  public static GoSdkType getInstance() {\n    return SdkType.findInstance(GoSdkType.class);\n  }\n\n  @NotNull\n  @Override\n  public Icon getIcon() {\n    return GoIcons.ICON;\n  }\n\n  @NotNull\n  @Override\n  public Icon getIconForAddAction() {\n    return getIcon();\n  }\n\n  @Nullable\n  @Override\n  public String suggestHomePath() {\n    VirtualFile suggestSdkDirectory = GoSdkUtil.suggestSdkDirectory();\n    return suggestSdkDirectory != null ? suggestSdkDirectory.getPath() : null;\n  }\n\n  @Override\n  public boolean isValidSdkHome(@NotNull String path) {\n    GoSdkService.LOG.debug(\"Validating sdk path: \" + path);\n    String executablePath = GoSdkService.getGoExecutablePath(path);\n    if (executablePath == null) {\n      GoSdkService.LOG.debug(\"Go executable is not found: \");\n      return false;\n    }\n    if (!new File(executablePath).canExecute()) {\n      GoSdkService.LOG.debug(\"Go binary cannot be executed: \" + path);\n      return false;\n    }\n    if (getVersionString(path) != null) {\n      GoSdkService.LOG.debug(\"Cannot retrieve version for sdk: \" + path);\n      return true;\n    }\n    return false;\n  }\n\n  @NotNull\n  @Override\n  public String adjustSelectedSdkHome(@NotNull String homePath) {\n    return GoSdkUtil.adjustSdkPath(homePath);\n  }\n\n  @NotNull\n  @Override\n  public String suggestSdkName(@Nullable String currentSdkName, @NotNull String sdkHome) {\n    String version = getVersionString(sdkHome);\n    if (version == null) {\n      return \"Unknown Go version at \" + sdkHome;\n    }\n    return \"Go \" + version;\n  }\n\n  @Nullable\n  @Override\n  public String getVersionString(@NotNull String sdkHome) {\n    return GoSdkUtil.retrieveGoVersion(sdkHome);\n  }\n\n  @Nullable\n  @Override\n  public String getDefaultDocumentationUrl(@NotNull Sdk sdk) {\n    return null;\n  }\n\n  @Nullable\n  @Override\n  public AdditionalDataConfigurable createAdditionalDataConfigurable(@NotNull SdkModel sdkModel, @NotNull SdkModificator sdkModificator) {\n    return null;\n  }\n\n  @Override\n  public void saveAdditionalData(@NotNull SdkAdditionalData additionalData, @NotNull Element additional) {\n  }\n\n  @NotNull\n  @NonNls\n  @Override\n  public String getPresentableName() {\n    return \"Go SDK\";\n  }\n\n  @Override\n  public void setupSdkPaths(@NotNull Sdk sdk) {\n    String versionString = sdk.getVersionString();\n    if (versionString == null) throw new RuntimeException(\"SDK version is not defined\");\n    SdkModificator modificator = sdk.getSdkModificator();\n    String path = sdk.getHomePath();\n    if (path == null) return;\n    modificator.setHomePath(path);\n\n    for (VirtualFile file : GoSdkUtil.getSdkDirectoriesToAttach(path, versionString)) {\n      modificator.addRoot(file, OrderRootType.CLASSES);\n      modificator.addRoot(file, OrderRootType.SOURCES);\n    }\n    modificator.commitChanges();\n  }\n}\n"
  },
  {
    "path": "src/com/goide/sdk/GoSdkUtil.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.sdk;\n\nimport com.goide.GoConstants;\nimport com.goide.GoEnvironmentUtil;\nimport com.goide.appengine.YamlFilesModificationTracker;\nimport com.goide.project.GoApplicationLibrariesService;\nimport com.goide.project.GoLibrariesService;\nimport com.goide.psi.GoFile;\nimport com.intellij.execution.configurations.PathEnvironmentVariableUtil;\nimport com.intellij.openapi.application.ApplicationManager;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.module.ModuleManager;\nimport com.intellij.openapi.module.ModuleUtilCore;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.Key;\nimport com.intellij.openapi.util.SystemInfo;\nimport com.intellij.openapi.util.UserDataHolder;\nimport com.intellij.openapi.util.io.FileUtil;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.openapi.vfs.*;\nimport com.intellij.psi.PsiDirectory;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.util.CachedValueProvider;\nimport com.intellij.psi.util.CachedValuesManager;\nimport com.intellij.util.Function;\nimport com.intellij.util.ObjectUtils;\nimport com.intellij.util.containers.ContainerUtil;\nimport com.intellij.util.text.VersionComparatorUtil;\nimport org.jetbrains.annotations.Contract;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.io.File;\nimport java.io.IOException;\nimport java.util.*;\nimport java.util.regex.Matcher;\nimport java.util.regex.Pattern;\n\nimport static com.intellij.util.containers.ContainerUtil.newLinkedHashSet;\n\npublic class GoSdkUtil {\n  private static final Pattern GO_VERSION_PATTERN = Pattern.compile(\"[tT]heVersion\\\\s*=\\\\s*`go([\\\\d.]+\\\\w+(\\\\d+)?)`\");\n  private static final Pattern GAE_VERSION_PATTERN = Pattern.compile(\"[tT]heVersion\\\\s*=\\\\s*`go([\\\\d.]+)( \\\\(appengine-[\\\\d.]+\\\\))?`\");\n  private static final Pattern GO_DEVEL_VERSION_PATTERN = Pattern.compile(\"[tT]heVersion\\\\s*=\\\\s*`(devel.*)`\");\n  private static final Key<String> ZVERSION_DATA_KEY = Key.create(\"GO_ZVERSION_KEY\");\n\n  private GoSdkUtil() {}\n\n  @Nullable\n  public static VirtualFile getSdkSrcDir(@NotNull Project project, @Nullable Module module) {\n    if (module != null) {\n      return CachedValuesManager.getManager(project).getCachedValue(module, () -> {\n        GoSdkService sdkService = GoSdkService.getInstance(module.getProject());\n        return CachedValueProvider.Result.create(getInnerSdkSrcDir(sdkService, module), sdkService);\n      });\n    }\n    return CachedValuesManager.getManager(project).getCachedValue(project, () -> {\n      GoSdkService sdkService = GoSdkService.getInstance(project);\n      return CachedValueProvider.Result.create(getInnerSdkSrcDir(sdkService, null), sdkService);\n    });\n  }\n\n  @Nullable\n  private static VirtualFile getInnerSdkSrcDir(@NotNull GoSdkService sdkService, @Nullable Module module) {\n    String sdkHomePath = sdkService.getSdkHomePath(module);\n    String sdkVersionString = sdkService.getSdkVersion(module);\n    return sdkHomePath != null && sdkVersionString != null ? getSdkSrcDir(sdkHomePath, sdkVersionString) : null;\n  }\n\n  @Nullable\n  private static VirtualFile getSdkSrcDir(@NotNull String sdkPath, @NotNull String sdkVersion) {\n    String srcPath = getSrcLocation(sdkVersion);\n    VirtualFile file = VirtualFileManager.getInstance().findFileByUrl(VfsUtilCore.pathToUrl(FileUtil.join(sdkPath, srcPath)));\n    return file != null && file.isDirectory() ? file : null;\n  }\n\n  @Nullable\n  public static GoFile findBuiltinFile(@NotNull PsiElement context) {\n    Project project = context.getProject();\n    // it's important to ask module on file, otherwise module won't be found for elements in libraries files [zolotov]\n    Module moduleFromContext = ModuleUtilCore.findModuleForPsiElement(context.getContainingFile());\n    if (moduleFromContext == null) {\n      for (Module module : ModuleManager.getInstance(project).getModules()) {\n        if (GoSdkService.getInstance(project).isGoModule(module)) {\n          moduleFromContext = module;\n          break;\n        }\n      }\n    }\n\n    Module module = moduleFromContext;\n    UserDataHolder holder = ObjectUtils.notNull(module, project);\n    VirtualFile file = CachedValuesManager.getManager(context.getProject()).getCachedValue(holder, () -> {\n      VirtualFile sdkSrcDir = getSdkSrcDir(project, module);\n      VirtualFile result = sdkSrcDir != null ? sdkSrcDir.findFileByRelativePath(GoConstants.BUILTIN_FILE_PATH) : null;\n      return CachedValueProvider.Result.create(result, getSdkAndLibrariesCacheDependencies(project, module, result));\n    });\n\n    if (file == null) return null;\n    PsiFile psiBuiltin = context.getManager().findFile(file);\n    return psiBuiltin instanceof GoFile ? (GoFile)psiBuiltin : null;\n  }\n\n  @Nullable\n  public static VirtualFile findExecutableInGoPath(@NotNull String executableName, @NotNull Project project, @Nullable Module module) {\n    executableName = GoEnvironmentUtil.getBinaryFileNameForPath(executableName);\n    Collection<VirtualFile> roots = getGoPathRoots(project, module);\n    for (VirtualFile file : roots) {\n      VirtualFile child = VfsUtil.findRelativeFile(file, \"bin\", executableName);\n      if (child != null) return child;\n    }\n    File fromPath = PathEnvironmentVariableUtil.findInPath(executableName);\n    return fromPath != null ? VfsUtil.findFileByIoFile(fromPath, true) : null;\n  }\n\n  /**\n   * @return concatenation of {@link this#getSdkSrcDir(Project, Module)} and {@link this#getGoPathSources(Project, Module)}\n   */\n  @NotNull\n  public static LinkedHashSet<VirtualFile> getSourcesPathsToLookup(@NotNull Project project, @Nullable Module module) {\n    LinkedHashSet<VirtualFile> sdkAndGoPath = newLinkedHashSet();\n    ContainerUtil.addIfNotNull(sdkAndGoPath, getSdkSrcDir(project, module));\n    ContainerUtil.addAllNotNull(sdkAndGoPath, getGoPathSources(project, module));\n    return sdkAndGoPath;\n  }\n\n  @NotNull\n  public static LinkedHashSet<VirtualFile> getVendoringAwareSourcesPathsToLookup(@NotNull Project project,\n                                                                                 @Nullable Module module,\n                                                                                 @Nullable VirtualFile contextFile) {\n    LinkedHashSet<VirtualFile> sdkAndGoPath = getSourcesPathsToLookup(project, module);\n    if (contextFile != null) {\n      Collection<VirtualFile> vendorDirectories = collectVendorDirectories(contextFile, sdkAndGoPath);\n      if (!vendorDirectories.isEmpty()) {\n        LinkedHashSet<VirtualFile> result = newLinkedHashSet(vendorDirectories);\n        result.addAll(sdkAndGoPath);\n        return result;\n      }\n    }\n    return sdkAndGoPath;\n  }\n\n  @NotNull\n  private static Collection<VirtualFile> collectVendorDirectories(@Nullable VirtualFile contextDirectory,\n                                                                  @NotNull Set<VirtualFile> sourceRoots) {\n    if (contextDirectory == null) {\n      return Collections.emptyList();\n    }\n    Collection<VirtualFile> vendorDirectories = ContainerUtil.newArrayList();\n    VirtualFile directory = contextDirectory;\n    while (directory != null) {\n      VirtualFile vendorDirectory = directory.findChild(GoConstants.VENDOR);\n      if (vendorDirectory != null && vendorDirectory.isDirectory()) {\n        vendorDirectories.add(vendorDirectory);\n      }\n      if (sourceRoots.contains(directory)) {\n        break;\n      }\n      directory = directory.getParent();\n    }\n    return vendorDirectories;\n  }\n\n  @NotNull\n  private static Collection<VirtualFile> getGoPathRoots(@NotNull Project project, @Nullable Module module) {\n    Collection<VirtualFile> roots = ContainerUtil.newArrayList();\n    if (GoApplicationLibrariesService.getInstance().isUseGoPathFromSystemEnvironment()) {\n      roots.addAll(getGoPathsRootsFromEnvironment());\n    }\n    roots.addAll(module != null ? GoLibrariesService.getUserDefinedLibraries(module) : GoLibrariesService.getUserDefinedLibraries(project));\n    return roots;\n  }\n\n  @NotNull\n  public static Collection<VirtualFile> getGoPathSources(@NotNull Project project, @Nullable Module module) {\n    if (module != null) {\n      return CachedValuesManager.getManager(project).getCachedValue(module, () -> {\n        Collection<VirtualFile> result = newLinkedHashSet();\n        Project project1 = module.getProject();\n        GoSdkService sdkService = GoSdkService.getInstance(project1);\n        if (sdkService.isAppEngineSdk(module)) {\n          ContainerUtil.addAllNotNull(result, ContainerUtil.mapNotNull(YamlFilesModificationTracker.getYamlFiles(project1, module),\n                                                                       VirtualFile::getParent));\n        }\n        result.addAll(getInnerGoPathSources(project1, module));\n        return CachedValueProvider.Result\n          .create(result, getSdkAndLibrariesCacheDependencies(project1, module, YamlFilesModificationTracker.getInstance(project1)));\n      });\n    }\n    return CachedValuesManager.getManager(project).getCachedValue(project,\n                                                                  (CachedValueProvider<Collection<VirtualFile>>)() -> CachedValueProvider.Result\n                                                                    .create(getInnerGoPathSources(project, null),\n                                                                            getSdkAndLibrariesCacheDependencies(project, null, YamlFilesModificationTracker.getInstance(project))));\n  }\n\n  @NotNull\n  private static List<VirtualFile> getInnerGoPathSources(@NotNull Project project, @Nullable Module module) {\n    return ContainerUtil.mapNotNull(getGoPathRoots(project, module), new RetrieveSubDirectoryOrSelfFunction(\"src\"));\n  }\n\n  @NotNull\n  private static Collection<VirtualFile> getGoPathBins(@NotNull Project project, @Nullable Module module) {\n    Collection<VirtualFile> result = newLinkedHashSet(ContainerUtil.mapNotNull(getGoPathRoots(project, module),\n                                                                               new RetrieveSubDirectoryOrSelfFunction(\"bin\")));\n    String executableGoPath = GoSdkService.getInstance(project).getGoExecutablePath(module);\n    if (executableGoPath != null) {\n      VirtualFile executable = VirtualFileManager.getInstance().findFileByUrl(VfsUtilCore.pathToUrl(executableGoPath));\n      if (executable != null) ContainerUtil.addIfNotNull(result, executable.getParent());\n    }\n    return result;\n  }\n\n  /**\n   * Retrieves root directories from GOPATH env-variable.\n   * This method doesn't consider user defined libraries,\n   * for that case use {@link {@link this#getGoPathRoots(Project, Module)}\n   */\n  @NotNull\n  public static Collection<VirtualFile> getGoPathsRootsFromEnvironment() {\n    return GoEnvironmentGoPathModificationTracker.getGoEnvironmentGoPathRoots();\n  }\n\n  @NotNull\n  public static String retrieveGoPath(@NotNull Project project, @Nullable Module module) {\n    return StringUtil.join(ContainerUtil.map(getGoPathRoots(project, module), VirtualFile::getPath), File.pathSeparator);\n  }\n\n  @NotNull\n  public static String retrieveEnvironmentPathForGo(@NotNull Project project, @Nullable Module module) {\n    return StringUtil.join(ContainerUtil.map(getGoPathBins(project, module), VirtualFile::getPath), File.pathSeparator);\n  }\n\n  @NotNull\n  private static String getSrcLocation(@NotNull String version) {\n    if (ApplicationManager.getApplication().isUnitTestMode()) {\n      return \"src/pkg\";\n    }\n    if (version.startsWith(\"devel\")) {\n      return \"src\";\n    }\n    if (version.length() > 2 && StringUtil.parseDouble(version.substring(0, 3), 1.4) < 1.4) {\n      return \"src/pkg\";\n    }\n    return \"src\";\n  }\n\n  public static int compareVersions(@NotNull String lhs, @NotNull String rhs) {\n    return VersionComparatorUtil.compare(lhs, rhs);\n  }\n\n  @Nullable\n  @Contract(\"null, _ -> null\")\n  public static String getImportPath(@Nullable PsiDirectory psiDirectory, boolean withVendoring) {\n    if (psiDirectory == null) {\n      return null;\n    }\n    return CachedValuesManager.getCachedValue(psiDirectory, withVendoring ? new CachedVendoredImportPathProvider(psiDirectory)\n                                                                          : new CachedImportPathProviderImpl(psiDirectory));\n  }\n\n  @Nullable\n  private static String getPathRelativeToSdkAndLibrariesAndVendor(@NotNull PsiDirectory psiDirectory, boolean withVendoring) {\n    VirtualFile file = psiDirectory.getVirtualFile();\n    Project project = psiDirectory.getProject();\n    Module module = ModuleUtilCore.findModuleForPsiElement(psiDirectory);\n    LinkedHashSet<VirtualFile> sourceRoots = withVendoring ? getVendoringAwareSourcesPathsToLookup(project, module, file)\n                                                           : getSourcesPathsToLookup(project, module);\n\n    String relativePath = getRelativePathToRoots(file, sourceRoots);\n    if (relativePath != null) {\n      return relativePath;\n    }\n\n    String filePath = file.getPath();\n    int src = filePath.lastIndexOf(\"/src/\");\n    if (src > -1) {\n      return filePath.substring(src + 5);\n    }\n    return null;\n  }\n\n  @Nullable\n  public static String getRelativePathToRoots(@NotNull VirtualFile file, @NotNull Collection<VirtualFile> sourceRoots) {\n    for (VirtualFile root : sourceRoots) {\n      String relativePath = VfsUtilCore.getRelativePath(file, root, '/');\n      if (StringUtil.isNotEmpty(relativePath)) {\n        return relativePath;\n      }\n    }\n    return null;\n  }\n\n  @Nullable\n  public static VirtualFile suggestSdkDirectory() {\n    if (SystemInfo.isWindows) {\n      return ObjectUtils.chooseNotNull(LocalFileSystem.getInstance().findFileByPath(\"C:\\\\Go\"),\n                                       LocalFileSystem.getInstance().findFileByPath(\"C:\\\\cygwin\"));\n    }\n    if (SystemInfo.isMac || SystemInfo.isLinux) {\n      String fromEnv = suggestSdkDirectoryPathFromEnv();\n      if (fromEnv != null) {\n        return LocalFileSystem.getInstance().findFileByPath(fromEnv);\n      }\n      VirtualFile usrLocal = LocalFileSystem.getInstance().findFileByPath(\"/usr/local/go\");\n      if (usrLocal != null) return usrLocal;\n    }\n    if (SystemInfo.isMac) {\n      String macPorts = \"/opt/local/lib/go\";\n      String homeBrew = \"/usr/local/Cellar/go\";\n      File file = FileUtil.findFirstThatExist(macPorts, homeBrew);\n      if (file != null) {\n        return LocalFileSystem.getInstance().findFileByIoFile(file);\n      }\n    }\n    return null;\n  }\n\n  @Nullable\n  private static String suggestSdkDirectoryPathFromEnv() {\n    File fileFromPath = PathEnvironmentVariableUtil.findInPath(\"go\");\n    if (fileFromPath != null) {\n      File canonicalFile;\n      try {\n        canonicalFile = fileFromPath.getCanonicalFile();\n        String path = canonicalFile.getPath();\n        if (path.endsWith(\"bin/go\")) {\n          return StringUtil.trimEnd(path, \"bin/go\");\n        }\n      }\n      catch (IOException ignore) {\n      }\n    }\n    return null;\n  }\n\n  @Nullable\n  public static String parseGoVersion(@NotNull String text) {\n    Matcher matcher = GO_VERSION_PATTERN.matcher(text);\n    if (matcher.find()) {\n      return matcher.group(1);\n    }\n    matcher = GAE_VERSION_PATTERN.matcher(text);\n    if (matcher.find()) {\n      return matcher.group(1) + matcher.group(2);\n    }\n    matcher = GO_DEVEL_VERSION_PATTERN.matcher(text);\n    if (matcher.find()) {\n      return matcher.group(1);\n    }\n\n    return null;\n  }\n\n  @Nullable\n  public static String retrieveGoVersion(@NotNull String sdkPath) {\n    try {\n      VirtualFile sdkRoot = VirtualFileManager.getInstance().findFileByUrl(VfsUtilCore.pathToUrl(sdkPath));\n      if (sdkRoot != null) {\n        String cachedVersion = sdkRoot.getUserData(ZVERSION_DATA_KEY);\n        if (cachedVersion != null) {\n          return !cachedVersion.isEmpty() ? cachedVersion : null;\n        }\n\n        VirtualFile versionFile = sdkRoot.findFileByRelativePath(\"src/\" + GoConstants.GO_VERSION_NEW_FILE_PATH);\n        if (versionFile == null) {\n          versionFile = sdkRoot.findFileByRelativePath(\"src/\" + GoConstants.GO_VERSION_FILE_PATH);\n        }\n        if (versionFile == null) {\n          versionFile = sdkRoot.findFileByRelativePath(\"src/pkg/\" + GoConstants.GO_VERSION_FILE_PATH);\n        }\n        if (versionFile != null) {\n          String text = VfsUtilCore.loadText(versionFile);\n          String version = parseGoVersion(text);\n          if (version == null) {\n            GoSdkService.LOG.debug(\"Cannot retrieve go version from zVersion file: \" + text);\n          }\n          sdkRoot.putUserData(ZVERSION_DATA_KEY, StringUtil.notNullize(version));\n          return version;\n        }\n        else {\n          GoSdkService.LOG.debug(\"Cannot find go version file in sdk path: \" + sdkPath);\n        }\n      }\n    }\n    catch (IOException e) {\n      GoSdkService.LOG.debug(\"Cannot retrieve go version from sdk path: \" + sdkPath, e);\n    }\n    return null;\n  }\n\n  @NotNull\n  public static String adjustSdkPath(@NotNull String path) {\n    if (new File(path, GoConstants.LIB_EXEC_DIRECTORY).exists()) {\n      path += File.separatorChar + GoConstants.LIB_EXEC_DIRECTORY;\n    }\n\n    File possibleGCloudSdk = new File(path, GoConstants.GCLOUD_APP_ENGINE_DIRECTORY_PATH);\n    if (possibleGCloudSdk.exists() && possibleGCloudSdk.isDirectory()) {\n      if (isAppEngine(possibleGCloudSdk.getAbsolutePath())) {\n        return possibleGCloudSdk.getAbsolutePath() + GoConstants.APP_ENGINE_GO_ROOT_DIRECTORY_PATH;\n      }\n    }\n\n    return isAppEngine(path) ? path + GoConstants.APP_ENGINE_GO_ROOT_DIRECTORY_PATH : path;\n  }\n\n\n  private static boolean isAppEngine(@NotNull String path) {\n    return new File(path, GoConstants.APP_ENGINE_MARKER_FILE).exists();\n  }\n\n  @NotNull\n  public static Collection<VirtualFile> getSdkDirectoriesToAttach(@NotNull String sdkPath, @NotNull String versionString) {\n    // scr is enough at the moment, possible process binaries from pkg\n    return ContainerUtil.createMaybeSingletonList(getSdkSrcDir(sdkPath, versionString));\n  }\n\n  @NotNull\n  private static Collection<Object> getSdkAndLibrariesCacheDependencies(@NotNull Project project,\n                                                                        @Nullable Module module,\n                                                                        Object... extra) {\n    Collection<Object> dependencies = ContainerUtil.newArrayList((Object[])GoLibrariesService.getModificationTrackers(project, module));\n    ContainerUtil.addAllNotNull(dependencies, GoSdkService.getInstance(project));\n    ContainerUtil.addAllNotNull(dependencies, extra);\n    return dependencies;\n  }\n\n  @NotNull\n  public static Collection<Module> getGoModules(@NotNull Project project) {\n    if (project.isDefault()) return Collections.emptyList();\n    GoSdkService sdkService = GoSdkService.getInstance(project);\n    return ContainerUtil.filter(ModuleManager.getInstance(project).getModules(), sdkService::isGoModule);\n  }\n\n  public static boolean isUnreachableInternalPackage(@NotNull VirtualFile targetDirectory,\n                                                     @NotNull VirtualFile referenceContextFile,\n                                                     @NotNull Set<VirtualFile> sourceRoots) {\n    return isUnreachablePackage(GoConstants.INTERNAL, targetDirectory, referenceContextFile, sourceRoots);\n  }\n\n  public static boolean isUnreachableVendoredPackage(@NotNull VirtualFile targetDirectory,\n                                                     @NotNull VirtualFile referenceContextFile,\n                                                     @NotNull Set<VirtualFile> sourceRoots) {\n    return isUnreachablePackage(GoConstants.VENDOR, targetDirectory, referenceContextFile, sourceRoots);\n  }\n\n  @Nullable\n  public static VirtualFile findParentDirectory(@Nullable VirtualFile file, @NotNull Set<VirtualFile> sourceRoots, @NotNull String name) {\n    if (file == null) {\n      return null;\n    }\n    VirtualFile currentFile = file.isDirectory() ? file : file.getParent();\n    while (currentFile != null && !sourceRoots.contains(currentFile)) {\n      if (currentFile.isDirectory() && name.equals(currentFile.getName())) {\n        return currentFile;\n      }\n      currentFile = currentFile.getParent();\n    }\n    return null;\n  }\n\n  private static boolean isUnreachablePackage(@NotNull String unreachableDirectoryName,\n                                              @NotNull VirtualFile targetDirectory,\n                                              @NotNull VirtualFile referenceContextFile,\n                                              @NotNull Set<VirtualFile> sourceRoots) {\n    VirtualFile directory = findParentDirectory(targetDirectory, sourceRoots, unreachableDirectoryName);\n    VirtualFile parent = directory != null ? directory.getParent() : null;\n    return directory != null && !VfsUtilCore.isAncestor(parent, referenceContextFile, false);\n  }\n\n  private static class RetrieveSubDirectoryOrSelfFunction implements Function<VirtualFile, VirtualFile> {\n    @NotNull private final String mySubdirName;\n\n    public RetrieveSubDirectoryOrSelfFunction(@NotNull String subdirName) {\n      mySubdirName = subdirName;\n    }\n\n    @Override\n    public VirtualFile fun(VirtualFile file) {\n      return file == null || FileUtil.namesEqual(mySubdirName, file.getName()) ? file : file.findChild(mySubdirName);\n    }\n  }\n\n  private abstract static class CachedImportPathProvider implements CachedValueProvider<String> {\n    private final PsiDirectory myPsiDirectory;\n    private final boolean myWithVendoring;\n\n    public CachedImportPathProvider(@NotNull PsiDirectory psiDirectory, boolean vendoring) {\n      myPsiDirectory = psiDirectory;\n      myWithVendoring = vendoring;\n    }\n\n    @Nullable\n    @Override\n    public Result<String> compute() {\n      String path = getPathRelativeToSdkAndLibrariesAndVendor(myPsiDirectory, myWithVendoring);\n      Module module = ModuleUtilCore.findModuleForPsiElement(myPsiDirectory);\n      return Result.create(path, getSdkAndLibrariesCacheDependencies(myPsiDirectory.getProject(), module, myPsiDirectory));\n    }\n  }\n\n  private static class CachedImportPathProviderImpl extends CachedImportPathProvider {\n    public CachedImportPathProviderImpl(@NotNull PsiDirectory psiDirectory) {\n      super(psiDirectory, false);\n    }\n  }\n\n  private static class CachedVendoredImportPathProvider extends CachedImportPathProvider {\n    public CachedVendoredImportPathProvider(@NotNull PsiDirectory psiDirectory) {\n      super(psiDirectory, true);\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/sdk/GoSmallIDEsSdkService.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.sdk;\n\nimport com.goide.GoConstants;\nimport com.goide.configuration.GoSdkConfigurable;\nimport com.intellij.openapi.application.ApplicationManager;\nimport com.intellij.openapi.components.ComponentManager;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.options.Configurable;\nimport com.intellij.openapi.options.ShowSettingsUtil;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.roots.OrderRootType;\nimport com.intellij.openapi.roots.libraries.Library;\nimport com.intellij.openapi.roots.libraries.LibraryTable;\nimport com.intellij.openapi.roots.libraries.LibraryTablesRegistrar;\nimport com.intellij.openapi.util.Computable;\nimport com.intellij.openapi.vfs.VfsUtilCore;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.psi.util.CachedValueProvider;\nimport com.intellij.psi.util.CachedValuesManager;\nimport com.intellij.util.ObjectUtils;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoSmallIDEsSdkService extends GoSdkService {\n  public static final String LIBRARY_NAME = \"Go SDK\";\n\n  public GoSmallIDEsSdkService(@NotNull Project project) {\n    super(project);\n  }\n\n  @Nullable\n  @Override\n  public String getSdkHomePath(@Nullable Module module) {\n    ComponentManager holder = ObjectUtils.notNull(module, myProject);\n    return CachedValuesManager.getManager(myProject).getCachedValue(holder, () -> CachedValueProvider.Result\n      .create(ApplicationManager.getApplication().runReadAction(new Computable<String>() {\n      @Nullable\n      @Override\n      public String compute() {\n        LibraryTable table = LibraryTablesRegistrar.getInstance().getLibraryTable(myProject);\n        for (Library library : table.getLibraries()) {\n          String libraryName = library.getName();\n          if (libraryName != null && libraryName.startsWith(LIBRARY_NAME)) {\n            for (VirtualFile root : library.getFiles(OrderRootType.CLASSES)) {\n              if (isGoSdkLibRoot(root)) {\n                return libraryRootToSdkPath(root);\n              }\n            }\n          }\n        }\n        return null;\n      }\n    }), this));\n  }\n\n  @Nullable\n  @Override\n  public String getSdkVersion(@Nullable Module module) {\n    String parentVersion = super.getSdkVersion(module);\n    if (parentVersion != null) {\n      return parentVersion;\n    }\n\n    ComponentManager holder = ObjectUtils.notNull(module, myProject);\n    return CachedValuesManager.getManager(myProject).getCachedValue(holder, () -> {\n      String result = null;\n      String sdkHomePath = getSdkHomePath(module);\n      if (sdkHomePath != null) {\n        result = GoSdkUtil.retrieveGoVersion(sdkHomePath);\n      }\n      return CachedValueProvider.Result.create(result, this);\n    });\n  }\n\n  @Override\n  public void chooseAndSetSdk(@Nullable Module module) {\n    ShowSettingsUtil.getInstance().editConfigurable(myProject, new GoSdkConfigurable(myProject, true));\n  }\n\n  @Nullable\n  @Override\n  public Configurable createSdkConfigurable() {\n    return !myProject.isDefault() ? new GoSdkConfigurable(myProject, false) : null;\n  }\n\n  @Override\n  public boolean isGoModule(@Nullable Module module) {\n    return super.isGoModule(module) && getSdkHomePath(module) != null;\n  }\n\n  public static boolean isGoSdkLibRoot(@NotNull VirtualFile root) {\n    return root.isInLocalFileSystem() &&\n           root.isDirectory() &&\n           (VfsUtilCore.findRelativeFile(GoConstants.GO_VERSION_FILE_PATH, root) != null ||\n            VfsUtilCore.findRelativeFile(GoConstants.GO_VERSION_NEW_FILE_PATH, root) != null\n           );\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/GoAnonymousFieldDefinitionStub.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs;\n\nimport com.goide.psi.GoAnonymousFieldDefinition;\nimport com.intellij.psi.stubs.IStubElementType;\nimport com.intellij.psi.stubs.StubElement;\nimport com.intellij.util.io.StringRef;\n\npublic class GoAnonymousFieldDefinitionStub extends GoNamedStub<GoAnonymousFieldDefinition> {\n  public GoAnonymousFieldDefinitionStub(StubElement parent, IStubElementType elementType, StringRef name, boolean isPublic) {\n    super(parent, elementType, name, isPublic);\n  }\n\n  public GoAnonymousFieldDefinitionStub(StubElement parent, IStubElementType elementType, String name, boolean isPublic) {\n    super(parent, elementType, name, isPublic);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/GoConstDefinitionStub.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs;\n\nimport com.goide.psi.GoConstDefinition;\nimport com.intellij.psi.stubs.IStubElementType;\nimport com.intellij.psi.stubs.StubElement;\nimport com.intellij.util.io.StringRef;\n\npublic class GoConstDefinitionStub extends GoNamedStub<GoConstDefinition> {\n  public GoConstDefinitionStub(StubElement parent, IStubElementType elementType, StringRef name, boolean isPublic) {\n    super(parent, elementType, name, isPublic);\n  }\n\n  public GoConstDefinitionStub(StubElement parent, IStubElementType elementType, String name, boolean isPublic) {\n    super(parent, elementType, name, isPublic);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/GoConstSpecStub.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs;\n\nimport com.goide.psi.GoConstSpec;\nimport com.goide.psi.GoExpression;\nimport com.goide.psi.impl.GoElementFactory;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.psi.stubs.IStubElementType;\nimport com.intellij.psi.stubs.StubBase;\nimport com.intellij.psi.stubs.StubElement;\nimport com.intellij.util.containers.ContainerUtil;\nimport com.intellij.util.io.StringRef;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.List;\n\npublic class GoConstSpecStub extends StubBase<GoConstSpec> {\n  private final StringRef myExpressionsRef;\n  private List<GoExpression> myList;\n\n  public GoConstSpecStub(StubElement parent, IStubElementType elementType, StringRef ref) {\n    super(parent, elementType);\n    myExpressionsRef = ref;\n  }\n\n  @Nullable\n  public String getExpressionsText() {\n    return myExpressionsRef == null? null : myExpressionsRef.getString();\n  }\n\n  @NotNull\n  public List<GoExpression> getExpressionList() {\n    if (myList == null) {\n      String text = getExpressionsText();\n      if (!StringUtil.isNotEmpty(text)) return myList = ContainerUtil.emptyList();\n      Project project = getPsi().getProject();\n      List<String> split = StringUtil.split(text, \";\");\n      myList = ContainerUtil.map(split, s -> GoElementFactory.createExpression(project, s));\n    }\n    return myList;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/GoElementTypeFactory.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs;\n\nimport com.goide.psi.GoType;\nimport com.goide.psi.GoVarSpec;\nimport com.goide.psi.impl.*;\nimport com.goide.stubs.types.*;\nimport com.intellij.psi.stubs.IStubElementType;\nimport com.intellij.util.ReflectionUtil;\nimport com.intellij.util.containers.HashMap;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.Map;\n\npublic class GoElementTypeFactory {\n  private static final Map<String, Class> TYPES = new HashMap<String, Class>() {\n    {\n      put(\"ARRAY_OR_SLICE_TYPE\", GoArrayOrSliceTypeImpl.class);\n      put(\"CHANNEL_TYPE\", GoChannelTypeImpl.class);\n      put(\"FUNCTION_TYPE\", GoFunctionTypeImpl.class);\n      put(\"INTERFACE_TYPE\", GoInterfaceTypeImpl.class);\n      put(\"MAP_TYPE\", GoMapTypeImpl.class);\n      put(\"POINTER_TYPE\", GoPointerTypeImpl.class);\n      put(\"STRUCT_TYPE\", GoStructTypeImpl.class);\n      put(\"TYPE\", GoTypeImpl.class);\n      put(\"PAR_TYPE\", GoParTypeImpl.class);\n      put(\"SPEC_TYPE\", GoSpecTypeImpl.class);\n      put(\"TYPE_LIST\", GoTypeListImpl.class);\n    }\n  };\n\n  private GoElementTypeFactory() {}\n\n  public static IStubElementType stubFactory(@NotNull String name) {\n    if (\"CONST_DEFINITION\".equals(name)) return new GoConstDefinitionStubElementType(name);\n    if (\"FIELD_DEFINITION\".equals(name)) return new GoFieldDefinitionStubElementType(name);\n    if (\"ANONYMOUS_FIELD_DEFINITION\".equals(name)) return new GoAnonymousFieldDefinitionStubElementType(name);\n    if (\"FUNCTION_DECLARATION\".equals(name)) return new GoFunctionDeclarationStubElementType(name);\n    if (\"METHOD_DECLARATION\".equals(name)) return new GoMethodDeclarationStubElementType(name);\n    if (\"IMPORT_SPEC\".equals(name)) return new GoImportSpecStubElementType(name);\n    if (\"PARAM_DEFINITION\".equals(name)) return new GoParamDefinitionStubElementType(name);\n    if (\"RECEIVER\".equals(name)) return new GoReceiverStubElementType(name);\n    if (\"TYPE_SPEC\".equals(name)) return new GoTypeSpecStubElementType(name);\n    if (\"METHOD_SPEC\".equals(name)) return new GoMethodSpecStubElementType(name);\n    if (\"CONST_SPEC\".equals(name)) return new GoConstSpecStubElementType(name);\n    if (\"PACKAGE_CLAUSE\".equals(name)) return GoPackageClauseStubElementType.INSTANCE;\n    if (\"VAR_SPEC\".equals(name)) return new GoVarSpecStubElementType(name);\n    if (\"SHORT_VAR_DECLARATION\".equals(name)) return new GoVarSpecStubElementType(name) {\n      @NotNull\n      @Override\n      public GoVarSpec createPsi(@NotNull GoVarSpecStub stub) {\n        return new GoShortVarDeclarationImpl(stub, this);\n      }\n    };\n    if (\"RECV_STATEMENT\".equals(name)) return new GoVarSpecStubElementType(name) {\n      @NotNull\n      @Override\n      public GoVarSpec createPsi(@NotNull GoVarSpecStub stub) {\n        return new GoRecvStatementImpl(stub, this);\n      }\n    };\n    if (\"RANGE_CLAUSE\".equals(name)) return new GoVarSpecStubElementType(name) {\n      @NotNull\n      @Override\n      public GoVarSpec createPsi(@NotNull GoVarSpecStub stub) {\n        return new GoRangeClauseImpl(stub, this);\n      }\n    };\n    if (\"VAR_DEFINITION\".equals(name)) return new GoVarDefinitionStubElementType(name);\n    if (\"LABEL_DEFINITION\".equals(name)) return new GoLabelDefinitionStubElementType(name);\n    if (\"PARAMETERS\".equals(name)) return new GoParametersStubElementType(name);\n    if (\"SIGNATURE\".equals(name)) return new GoSignatureStubElementType(name);\n    if (\"PARAMETER_DECLARATION\".equals(name)) return new GoParameterDeclarationStubElementType(name);\n    if (\"RESULT\".equals(name)) return new GoResultStubElementType(name);\n\n    Class c = TYPES.get(name);\n    if (c != null) {\n      return new GoTypeStubElementType(name) {\n        @NotNull\n        @Override\n        public GoType createPsi(@NotNull GoTypeStub stub) {\n          try {\n            //noinspection unchecked\n            return (GoType)ReflectionUtil.createInstance(c.getConstructor(stub.getClass(), IStubElementType.class), stub, this);\n          }\n          catch (NoSuchMethodException e) {\n            throw new RuntimeException(e);\n          }\n        }\n      };\n    }\n    throw new RuntimeException(\"Unknown element type: \" + name);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/GoFieldDefinitionStub.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs;\n\nimport com.goide.psi.GoFieldDefinition;\nimport com.intellij.psi.stubs.IStubElementType;\nimport com.intellij.psi.stubs.StubElement;\nimport com.intellij.util.io.StringRef;\n\npublic class GoFieldDefinitionStub extends GoNamedStub<GoFieldDefinition> {\n  public GoFieldDefinitionStub(StubElement parent, IStubElementType elementType, StringRef name, boolean isPublic) {\n    super(parent, elementType, name, isPublic);\n  }\n\n  public GoFieldDefinitionStub(StubElement parent, IStubElementType elementType, String name, boolean isPublic) {\n    super(parent, elementType, name, isPublic);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/GoFileStub.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs;\n\nimport com.goide.GoFileElementType;\nimport com.goide.psi.GoFile;\nimport com.goide.psi.GoPackageClause;\nimport com.goide.stubs.types.GoPackageClauseStubElementType;\nimport com.intellij.psi.stubs.PsiFileStubImpl;\nimport com.intellij.psi.stubs.StubElement;\nimport com.intellij.psi.tree.IStubFileElementType;\nimport com.intellij.util.io.StringRef;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoFileStub extends PsiFileStubImpl<GoFile> {\n  private final StringRef myBuildFlags;\n\n  public GoFileStub(@NotNull GoFile file) {\n    this(file, StringRef.fromNullableString(file.getBuildFlags()));\n  }\n\n  public GoFileStub(@Nullable GoFile file, StringRef buildFlags) {\n    super(file);\n    myBuildFlags = buildFlags;\n  }\n\n  @NotNull\n  @Override\n  public IStubFileElementType getType() {\n    return GoFileElementType.INSTANCE;\n  }\n\n  @Nullable\n  public String getBuildFlags() {\n    return myBuildFlags.getString();\n  }\n\n  @Nullable\n  public StubElement<GoPackageClause> getPackageClauseStub() {\n    return findChildStubByType(GoPackageClauseStubElementType.INSTANCE);\n  }\n\n  @Nullable\n  public String getPackageName() {\n    StubElement<GoPackageClause> stub = getPackageClauseStub();\n    return stub instanceof GoPackageClauseStub ? ((GoPackageClauseStub)stub).getName() : null;  \n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/GoFunctionDeclarationStub.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs;\n\nimport com.goide.psi.GoFunctionDeclaration;\nimport com.intellij.psi.stubs.IStubElementType;\nimport com.intellij.psi.stubs.StubElement;\nimport com.intellij.util.io.StringRef;\n\npublic class GoFunctionDeclarationStub extends GoFunctionOrMethodDeclarationStub<GoFunctionDeclaration> {\n  public GoFunctionDeclarationStub(StubElement parent, IStubElementType elementType, StringRef name, boolean isPublic) {\n    super(parent, elementType, name, isPublic);\n  }\n\n  public GoFunctionDeclarationStub(StubElement parent, IStubElementType elementType, String name, boolean isPublic) {\n    super(parent, elementType, name, isPublic);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/GoFunctionOrMethodDeclarationStub.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs;\n\nimport com.goide.psi.GoFunctionOrMethodDeclaration;\nimport com.intellij.psi.stubs.IStubElementType;\nimport com.intellij.psi.stubs.StubElement;\nimport com.intellij.util.io.StringRef;\n\nabstract public class GoFunctionOrMethodDeclarationStub<T extends GoFunctionOrMethodDeclaration> extends GoNamedStub<T> {\n  protected GoFunctionOrMethodDeclarationStub(StubElement parent, IStubElementType elementType, StringRef name, boolean isPublic) {\n    super(parent, elementType, name, isPublic);\n  }\n\n  protected GoFunctionOrMethodDeclarationStub(StubElement parent, IStubElementType elementType, String name, boolean isPublic) {\n    super(parent, elementType, name, isPublic);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/GoImportSpecStub.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs;\n\nimport com.goide.psi.GoImportSpec;\nimport com.intellij.psi.stubs.IStubElementType;\nimport com.intellij.psi.stubs.StubElement;\nimport com.intellij.util.io.StringRef;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoImportSpecStub extends GoNamedStub<GoImportSpec> {\n  @Nullable\n  private final StringRef myAliasRef;\n  @NotNull\n  private final StringRef myPathRef;\n  private final boolean myIsDot;\n\n  public GoImportSpecStub(StubElement parent, IStubElementType elementType, @Nullable String alias, @NotNull String path, boolean isDot) {\n    super(parent, elementType, (String)null, false);\n    myAliasRef = StringRef.fromString(alias);\n    myPathRef = StringRef.fromString(path);\n    myIsDot = isDot;\n  }\n\n  @Nullable\n  public String getAlias() {\n    return myAliasRef != null ? myAliasRef.getString() : null;\n  }\n\n  @NotNull\n  public String getPath() {\n    return myPathRef.getString();\n  }\n\n  public boolean isDot() {\n    return myIsDot;\n  }\n\n  @Override\n  public String getName() {\n    return getAlias();\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/GoLabelDefinitionStub.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs;\n\nimport com.goide.psi.GoLabelDefinition;\nimport com.intellij.psi.stubs.IStubElementType;\nimport com.intellij.psi.stubs.StubElement;\nimport com.intellij.util.io.StringRef;\n\npublic class GoLabelDefinitionStub extends GoNamedStub<GoLabelDefinition> {\n  public GoLabelDefinitionStub(StubElement parent, IStubElementType elementType, StringRef name, boolean isPublic) {\n    super(parent, elementType, name, isPublic);\n  }\n\n  public GoLabelDefinitionStub(StubElement parent, IStubElementType elementType, String name, boolean isPublic) {\n    super(parent, elementType, name, isPublic);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/GoMethodDeclarationStub.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs;\n\nimport com.goide.psi.GoMethodDeclaration;\nimport com.intellij.psi.stubs.IStubElementType;\nimport com.intellij.psi.stubs.StubElement;\nimport com.intellij.util.io.StringRef;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoMethodDeclarationStub extends GoFunctionOrMethodDeclarationStub<GoMethodDeclaration> {\n  private final StringRef myTypeName;\n\n  public GoMethodDeclarationStub(StubElement parent, IStubElementType elementType, StringRef name, boolean isPublic, StringRef typeName) {\n    super(parent, elementType, name, isPublic);\n    myTypeName = typeName;\n  }\n\n  public GoMethodDeclarationStub(StubElement parent, IStubElementType elementType, String name, boolean isPublic, String typeName) {\n    super(parent, elementType, name, isPublic);\n    myTypeName = StringRef.fromString(typeName);\n  }\n\n  @Nullable\n  public String getTypeName() {\n    return myTypeName == null ? null : myTypeName.getString();\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/GoMethodSpecStub.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs;\n\nimport com.goide.psi.GoMethodSpec;\nimport com.intellij.psi.stubs.IStubElementType;\nimport com.intellij.psi.stubs.StubElement;\nimport com.intellij.util.io.StringRef;\n\npublic class GoMethodSpecStub extends GoNamedStub<GoMethodSpec> {\n  private final int myArity;\n\n  public GoMethodSpecStub(StubElement parent, IStubElementType elementType, StringRef name, boolean isPublic, int arity) {\n    super(parent, elementType, name, isPublic);\n    myArity = arity;\n  }\n\n  public GoMethodSpecStub(StubElement parent, IStubElementType elementType, String name, boolean isPublic, int arity) {\n    super(parent, elementType, name, isPublic);\n    myArity = arity;\n  }\n\n  public int getArity() {\n    return myArity;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/GoNamedStub.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs;\n\nimport com.goide.psi.GoNamedElement;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.psi.stubs.IStubElementType;\nimport com.intellij.psi.stubs.NamedStubBase;\nimport com.intellij.psi.stubs.StubElement;\nimport com.intellij.util.io.StringRef;\n\nabstract public class GoNamedStub<T extends GoNamedElement> extends NamedStubBase<T> {\n  private final boolean myIsPublic;\n\n  public GoNamedStub(StubElement parent, IStubElementType elementType, StringRef name, boolean isPublic) {\n    super(parent, elementType, name);\n    myIsPublic = isPublic;\n  }\n\n  public GoNamedStub(StubElement parent, IStubElementType elementType, String name, boolean isPublic) {\n    super(parent, elementType, name);\n    myIsPublic = isPublic;\n  }\n\n  public boolean isPublic() {\n    return myIsPublic;\n  }\n\n  @Override\n  public String toString() {\n    String name = getName();\n    String str = super.toString();\n    return StringUtil.isEmpty(name) ? str : str + \": \" + name;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/GoPackageClauseStub.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs;\n\nimport com.goide.psi.GoPackageClause;\nimport com.intellij.psi.stubs.IStubElementType;\nimport com.intellij.psi.stubs.StubBase;\nimport com.intellij.psi.stubs.StubElement;\nimport com.intellij.util.io.StringRef;\n\npublic class GoPackageClauseStub extends StubBase<GoPackageClause> {\n  private final String myName;\n  public GoPackageClauseStub(StubElement parent, IStubElementType elementType, String name) {\n    super(parent, elementType);\n    myName = name;\n  }\n\n  public GoPackageClauseStub(StubElement stub, IStubElementType elementType, StringRef ref) {\n    super(stub, elementType);\n    myName = ref != null ? ref.getString() : null;\n  }\n\n  public String getName() {\n    return myName;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/GoParamDefinitionStub.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs;\n\nimport com.goide.psi.GoParamDefinition;\nimport com.intellij.psi.stubs.IStubElementType;\nimport com.intellij.psi.stubs.StubElement;\nimport com.intellij.util.io.StringRef;\n\npublic class GoParamDefinitionStub extends GoNamedStub<GoParamDefinition> {\n  public GoParamDefinitionStub(StubElement parent, IStubElementType elementType, StringRef name, boolean isPublic) {\n    super(parent, elementType, name, isPublic);\n  }\n\n  public GoParamDefinitionStub(StubElement parent, IStubElementType elementType, String name, boolean isPublic) {\n    super(parent, elementType, name, isPublic);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/GoParameterDeclarationStub.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs;\n\nimport com.goide.psi.GoParameterDeclaration;\nimport com.intellij.psi.stubs.IStubElementType;\nimport com.intellij.psi.stubs.StubElement;\nimport com.intellij.util.io.StringRef;\n\npublic class GoParameterDeclarationStub extends StubWithText<GoParameterDeclaration> {\n  private final boolean myVariadic;\n\n  public GoParameterDeclarationStub(StubElement parent, IStubElementType elementType, StringRef ref, boolean variadic) {\n    super(parent, elementType, ref);\n    myVariadic = variadic;\n  }\n\n  public GoParameterDeclarationStub(StubElement parent, IStubElementType elementType, String text, boolean variadic) {\n    this(parent, elementType, StringRef.fromString(text), variadic);\n  }\n\n  public boolean isVariadic() {\n    return myVariadic;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/GoParametersStub.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs;\n\nimport com.goide.psi.GoParameters;\nimport com.intellij.psi.stubs.IStubElementType;\nimport com.intellij.psi.stubs.StubElement;\nimport com.intellij.util.io.StringRef;\n\npublic class GoParametersStub extends StubWithText<GoParameters> {\n  public GoParametersStub(StubElement parent, IStubElementType elementType, StringRef ref) {\n    super(parent, elementType, ref);\n  }\n\n  public GoParametersStub(StubElement parent, IStubElementType elementType, String text) {\n    this(parent, elementType, StringRef.fromString(text));\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/GoReceiverStub.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs;\n\nimport com.goide.psi.GoReceiver;\nimport com.intellij.psi.stubs.IStubElementType;\nimport com.intellij.psi.stubs.StubElement;\nimport com.intellij.util.io.StringRef;\n\npublic class GoReceiverStub extends GoNamedStub<GoReceiver> {\n  public GoReceiverStub(StubElement parent, IStubElementType elementType, StringRef name, boolean isPublic) {\n    super(parent, elementType, name, isPublic);\n  }\n\n  public GoReceiverStub(StubElement parent, IStubElementType elementType, String name, boolean isPublic) {\n    super(parent, elementType, name, isPublic);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/GoResultStub.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs;\n\nimport com.goide.psi.GoResult;\nimport com.intellij.psi.stubs.IStubElementType;\nimport com.intellij.psi.stubs.StubElement;\nimport com.intellij.util.io.StringRef;\n\npublic class GoResultStub extends StubWithText<GoResult> {\n  public GoResultStub(StubElement parent, IStubElementType elementType, StringRef ref) {\n    super(parent, elementType, ref);\n  }\n\n  public GoResultStub(StubElement parent, IStubElementType elementType, String text) {\n    this(parent, elementType, StringRef.fromString(text));\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/GoSignatureStub.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs;\n\nimport com.goide.psi.GoSignature;\nimport com.intellij.psi.stubs.IStubElementType;\nimport com.intellij.psi.stubs.StubElement;\nimport com.intellij.util.io.StringRef;\n\npublic class GoSignatureStub extends StubWithText<GoSignature> {\n  public GoSignatureStub(StubElement parent, IStubElementType elementType, StringRef ref) {\n    super(parent, elementType, ref);\n  }\n\n  public GoSignatureStub(StubElement parent, IStubElementType elementType, String text) {\n    this(parent, elementType, StringRef.fromString(text));\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/GoTypeSpecStub.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs;\n\nimport com.goide.psi.GoTypeSpec;\nimport com.intellij.psi.stubs.IStubElementType;\nimport com.intellij.psi.stubs.StubElement;\nimport com.intellij.util.io.StringRef;\n\npublic class GoTypeSpecStub extends GoNamedStub<GoTypeSpec> {\n  public GoTypeSpecStub(StubElement parent, IStubElementType elementType, StringRef name, boolean isPublic) {\n    super(parent, elementType, name, isPublic);\n  }\n\n  public GoTypeSpecStub(StubElement parent, IStubElementType elementType, String name, boolean isPublic) {\n    super(parent, elementType, name, isPublic);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/GoTypeStub.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs;\n\nimport com.goide.psi.GoType;\nimport com.intellij.psi.stubs.IStubElementType;\nimport com.intellij.psi.stubs.StubElement;\nimport com.intellij.util.io.StringRef;\n\npublic class GoTypeStub extends StubWithText<GoType> {\n  public GoTypeStub(StubElement parent, IStubElementType elementType, StringRef ref) {\n    super(parent, elementType, ref);\n  }\n\n  public GoTypeStub(StubElement parent, IStubElementType elementType, String text) {\n    this(parent, elementType, StringRef.fromString(text));\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/GoVarDefinitionStub.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs;\n\nimport com.goide.psi.GoVarDefinition;\nimport com.intellij.psi.stubs.IStubElementType;\nimport com.intellij.psi.stubs.StubElement;\nimport com.intellij.util.io.StringRef;\n\npublic class GoVarDefinitionStub extends GoNamedStub<GoVarDefinition> {\n  public GoVarDefinitionStub(StubElement parent, IStubElementType elementType, StringRef name, boolean isPublic) {\n    super(parent, elementType, name, isPublic);\n  }\n\n  public GoVarDefinitionStub(StubElement parent, IStubElementType elementType, String name, boolean isPublic) {\n    super(parent, elementType, name, isPublic);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/GoVarSpecStub.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs;\n\nimport com.goide.psi.GoVarSpec;\nimport com.intellij.psi.stubs.IStubElementType;\nimport com.intellij.psi.stubs.StubBase;\nimport com.intellij.psi.stubs.StubElement;\n\npublic class GoVarSpecStub extends StubBase<GoVarSpec> {\n  public GoVarSpecStub(StubElement parent, IStubElementType elementType) {\n    super(parent, elementType);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/StubWithText.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs;\n\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.stubs.IStubElementType;\nimport com.intellij.psi.stubs.StubBase;\nimport com.intellij.psi.stubs.StubElement;\nimport com.intellij.util.io.StringRef;\nimport org.jetbrains.annotations.Nullable;\n\nabstract public class StubWithText<T extends PsiElement> extends StubBase<T> implements TextHolder {\n  @Nullable private final StringRef myText;\n\n  protected StubWithText(StubElement parent, IStubElementType elementType, @Nullable StringRef ref) {\n    super(parent, elementType);\n    myText = ref;\n  }\n\n  @Override\n  @Nullable\n  public String getText() {\n    return myText == null ? null : myText.getString();\n  }\n}"
  },
  {
    "path": "src/com/goide/stubs/TextHolder.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs;\n\nimport org.jetbrains.annotations.Nullable;\n\npublic interface TextHolder {\n  @Nullable\n  String getText();\n}\n"
  },
  {
    "path": "src/com/goide/stubs/index/GoAllPrivateNamesIndex.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs.index;\n\nimport com.goide.GoFileElementType;\nimport com.goide.psi.GoNamedElement;\nimport com.intellij.psi.stubs.StringStubIndexExtension;\nimport com.intellij.psi.stubs.StubIndexKey;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoAllPrivateNamesIndex extends StringStubIndexExtension<GoNamedElement> {\n  public static final StubIndexKey<String, GoNamedElement> ALL_PRIVATE_NAMES = StubIndexKey.createIndexKey(\"go.all.private.name\");\n\n  @Override\n  public int getVersion() {\n    return GoFileElementType.VERSION;\n  }\n\n  @NotNull\n  @Override\n  public StubIndexKey<String, GoNamedElement> getKey() {\n    return ALL_PRIVATE_NAMES;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/index/GoAllPublicNamesIndex.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs.index;\n\nimport com.goide.GoFileElementType;\nimport com.goide.psi.GoNamedElement;\nimport com.intellij.psi.stubs.StringStubIndexExtension;\nimport com.intellij.psi.stubs.StubIndexKey;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoAllPublicNamesIndex extends StringStubIndexExtension<GoNamedElement> {\n  public static final StubIndexKey<String, GoNamedElement> ALL_PUBLIC_NAMES = StubIndexKey.createIndexKey(\"go.all.name\");\n\n  @Override\n  public int getVersion() {\n    return GoFileElementType.VERSION;\n  }\n\n  @NotNull\n  @Override\n  public StubIndexKey<String, GoNamedElement> getKey() {\n    return ALL_PUBLIC_NAMES;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/index/GoFunctionIndex.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs.index;\n\nimport com.goide.GoFileElementType;\nimport com.goide.psi.GoFunctionDeclaration;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.psi.search.GlobalSearchScope;\nimport com.intellij.psi.stubs.StringStubIndexExtension;\nimport com.intellij.psi.stubs.StubIndex;\nimport com.intellij.psi.stubs.StubIndexKey;\nimport com.intellij.util.Processor;\nimport com.intellij.util.indexing.IdFilter;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.Collection;\n\npublic class GoFunctionIndex extends StringStubIndexExtension<GoFunctionDeclaration> {\n  public static final StubIndexKey<String, GoFunctionDeclaration> KEY = StubIndexKey.createIndexKey(\"go.function\");\n\n  @Override\n  public int getVersion() {\n    return GoFileElementType.VERSION + 3;\n  }\n\n  @NotNull\n  @Override\n  public StubIndexKey<String, GoFunctionDeclaration> getKey() {\n    return KEY;\n  }\n\n  @NotNull\n  public static Collection<GoFunctionDeclaration> find(@NotNull String name,\n                                                       @NotNull Project project,\n                                                       @Nullable GlobalSearchScope scope,\n                                                       @Nullable IdFilter idFilter) {\n    return StubIndex.getElements(KEY, name, project, scope, idFilter, GoFunctionDeclaration.class);\n  }\n\n  public static boolean process(@NotNull String name,\n                                @NotNull Project project,\n                                @Nullable GlobalSearchScope scope,\n                                @Nullable IdFilter idFilter,\n                                @NotNull Processor<GoFunctionDeclaration> processor) {\n    return StubIndex.getInstance().processElements(KEY, name, project, scope, idFilter, GoFunctionDeclaration.class, processor);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/index/GoIdFilter.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs.index;\n\nimport com.goide.runconfig.testing.GoTestFinder;\nimport com.intellij.openapi.diagnostic.Logger;\nimport com.intellij.openapi.progress.ProgressManager;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.roots.ContentIterator;\nimport com.intellij.openapi.roots.ProjectRootManager;\nimport com.intellij.openapi.util.Condition;\nimport com.intellij.openapi.util.Key;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.openapi.vfs.VirtualFileManager;\nimport com.intellij.openapi.vfs.VirtualFileWithId;\nimport com.intellij.psi.search.GlobalSearchScope;\nimport com.intellij.psi.util.CachedValue;\nimport com.intellij.psi.util.CachedValueProvider;\nimport com.intellij.psi.util.CachedValuesManager;\nimport com.intellij.util.indexing.FileBasedIndex;\nimport com.intellij.util.indexing.IdFilter;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.BitSet;\n\npublic class GoIdFilter extends IdFilter {\n  public static final Logger LOG = Logger.getInstance(\"#com.intellij.ide.util.gotoByName.DefaultFileNavigationContributor\");\n  private static final Key<CachedValue<IdFilter>> PRODUCTION_FILTER = Key.create(\"PRODUCTION\");\n  private static final Key<CachedValue<IdFilter>> TESTS_FILTER = Key.create(\"TESTS\");\n\n  private final BitSet myIdSet;\n\n  private GoIdFilter(@NotNull BitSet idSet) {\n    myIdSet = idSet;\n  }\n\n  @Override\n  public boolean containsFileId(int id) {\n    return id >= 0 && myIdSet.get(id);\n  }\n\n  public static IdFilter getProductionFilter(@NotNull Project project) {\n    return createIdFilter(project, PRODUCTION_FILTER, file -> !file.isDirectory() && !GoTestFinder.isTestFile(file));\n  }\n\n  public static IdFilter getTestsFilter(@NotNull Project project) {\n    return createIdFilter(project, TESTS_FILTER, file -> !file.isDirectory() && GoTestFinder.isTestFile(file));\n  }\n\n  private static IdFilter createIdFilter(@NotNull Project project,\n                                         @NotNull Key<CachedValue<IdFilter>> cacheKey,\n                                         @NotNull Condition<VirtualFile> filterCondition) {\n    return CachedValuesManager.getManager(project).getCachedValue(project, cacheKey, () -> {\n      BitSet bitSet = new BitSet();\n      ContentIterator iterator = fileOrDir -> {\n        if (filterCondition.value(fileOrDir)) {\n          addToBitSet(bitSet, fileOrDir);\n        }\n        ProgressManager.checkCanceled();\n        return true;\n      };\n      FileBasedIndex.getInstance().iterateIndexableFiles(iterator, project, null);\n      return CachedValueProvider.Result.create(new GoIdFilter(bitSet), ProjectRootManager.getInstance(project),\n                                               VirtualFileManager.VFS_STRUCTURE_MODIFICATIONS);\n    }, false);\n  }\n\n  @Nullable\n  public static IdFilter getFilesFilter(@NotNull GlobalSearchScope scope) {\n    if (scope instanceof GlobalSearchScope.FilesScope) {\n      BitSet bitSet = new BitSet();\n      for (VirtualFile file : (GlobalSearchScope.FilesScope)scope) {\n        addToBitSet(bitSet, file);\n      }\n      return new GoIdFilter(bitSet);\n    }\n    return null;\n  }\n\n  private static void addToBitSet(@NotNull BitSet set, @NotNull VirtualFile file) {\n    if (file instanceof VirtualFileWithId) {\n      int id = ((VirtualFileWithId)file).getId();\n      if (id < 0) id = -id; // workaround for encountering invalid files, see EA-49915, EA-50599\n      set.set(id);\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/index/GoMethodFingerprintIndex.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs.index;\n\nimport com.goide.GoFileElementType;\nimport com.goide.psi.GoMethodSpec;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.psi.search.GlobalSearchScope;\nimport com.intellij.psi.stubs.StringStubIndexExtension;\nimport com.intellij.psi.stubs.StubIndex;\nimport com.intellij.psi.stubs.StubIndexKey;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.Collection;\n\npublic class GoMethodFingerprintIndex extends StringStubIndexExtension<GoMethodSpec> {\n  public static final StubIndexKey<String, GoMethodSpec> KEY = StubIndexKey.createIndexKey(\"go.method.fingerprint\");\n\n  @Override\n  public int getVersion() {\n    return GoFileElementType.VERSION + 1;\n  }\n\n  @NotNull\n  @Override\n  public StubIndexKey<String, GoMethodSpec> getKey() {\n    return KEY;\n  }\n\n  public static Collection<GoMethodSpec> find(@NotNull String name, @NotNull Project project, GlobalSearchScope scope) {\n    return StubIndex.getElements(KEY, name, project, scope, GoMethodSpec.class);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/index/GoMethodIndex.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs.index;\n\nimport com.goide.GoFileElementType;\nimport com.goide.psi.GoMethodDeclaration;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.psi.search.GlobalSearchScope;\nimport com.intellij.psi.stubs.StringStubIndexExtension;\nimport com.intellij.psi.stubs.StubIndex;\nimport com.intellij.psi.stubs.StubIndexKey;\nimport com.intellij.util.Processor;\nimport com.intellij.util.indexing.IdFilter;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.Collection;\n\npublic class GoMethodIndex extends StringStubIndexExtension<GoMethodDeclaration> {\n  public static final StubIndexKey<String, GoMethodDeclaration> KEY = StubIndexKey.createIndexKey(\"go.method\");\n\n  @Override\n  public int getVersion() {\n    return GoFileElementType.VERSION + 2;\n  }\n\n  @NotNull\n  @Override\n  public StubIndexKey<String, GoMethodDeclaration> getKey() {\n    return KEY;\n  }\n\n  public static Collection<GoMethodDeclaration> find(@NotNull String name, @NotNull Project project, \n                                                     @Nullable GlobalSearchScope scope, @Nullable IdFilter idFilter) {\n    return StubIndex.getElements(KEY, name, project, scope, idFilter, GoMethodDeclaration.class);\n  }\n\n  public static boolean process(@NotNull String name,\n                                @NotNull Project project,\n                                @Nullable GlobalSearchScope scope,\n                                @Nullable IdFilter idFilter,\n                                @NotNull Processor<GoMethodDeclaration> processor) {\n    return StubIndex.getInstance().processElements(KEY, name, project, scope, idFilter, GoMethodDeclaration.class, processor);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/index/GoPackagesIndex.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs.index;\n\nimport com.goide.GoFileElementType;\nimport com.goide.psi.GoFile;\nimport com.intellij.psi.stubs.StringStubIndexExtension;\nimport com.intellij.psi.stubs.StubIndexKey;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoPackagesIndex extends StringStubIndexExtension<GoFile> {\n  public static final StubIndexKey<String, GoFile> KEY = StubIndexKey.createIndexKey(\"go.packages\");\n\n  @Override\n  public int getVersion() {\n    return GoFileElementType.VERSION + 2;\n  }\n\n  @NotNull\n  @Override\n  public StubIndexKey<String, GoFile> getKey() {\n    return KEY;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/index/GoTypesIndex.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs.index;\n\nimport com.goide.GoFileElementType;\nimport com.goide.psi.GoTypeSpec;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.psi.search.GlobalSearchScope;\nimport com.intellij.psi.stubs.StringStubIndexExtension;\nimport com.intellij.psi.stubs.StubIndex;\nimport com.intellij.psi.stubs.StubIndexKey;\nimport com.intellij.util.indexing.IdFilter;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.Collection;\n\npublic class GoTypesIndex extends StringStubIndexExtension<GoTypeSpec> {\n  public static final StubIndexKey<String, GoTypeSpec> KEY = StubIndexKey.createIndexKey(\"go.type.name\");\n\n  @Override\n  public int getVersion() {\n    return GoFileElementType.VERSION + 2;\n  }\n\n  @NotNull\n  @Override\n  public StubIndexKey<String, GoTypeSpec> getKey() {\n    return KEY;\n  }\n\n  @NotNull\n  public static Collection<GoTypeSpec> find(@NotNull String name,\n                                            @NotNull Project project,\n                                            @Nullable GlobalSearchScope scope,\n                                            @Nullable IdFilter idFilter) {\n    return StubIndex.getElements(KEY, name, project, scope, idFilter, GoTypeSpec.class);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/types/GoAnonymousFieldDefinitionStubElementType.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs.types;\n\nimport com.goide.psi.GoAnonymousFieldDefinition;\nimport com.goide.psi.impl.GoAnonymousFieldDefinitionImpl;\nimport com.goide.stubs.GoAnonymousFieldDefinitionStub;\nimport com.intellij.psi.stubs.StubElement;\nimport com.intellij.psi.stubs.StubInputStream;\nimport com.intellij.psi.stubs.StubOutputStream;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.io.IOException;\n\npublic class GoAnonymousFieldDefinitionStubElementType extends GoNamedStubElementType<GoAnonymousFieldDefinitionStub, GoAnonymousFieldDefinition> {\n  public GoAnonymousFieldDefinitionStubElementType(@NotNull String name) {\n    super(name);\n  }\n\n  @NotNull\n  @Override\n  public GoAnonymousFieldDefinition createPsi(@NotNull GoAnonymousFieldDefinitionStub stub) {\n    return new GoAnonymousFieldDefinitionImpl(stub, this);\n  }\n\n  @NotNull\n  @Override\n  public GoAnonymousFieldDefinitionStub createStub(@NotNull GoAnonymousFieldDefinition psi, StubElement parentStub) {\n    return new GoAnonymousFieldDefinitionStub(parentStub, this, psi.getName(), psi.isPublic());\n  }\n\n  @Override\n  public void serialize(@NotNull GoAnonymousFieldDefinitionStub stub, @NotNull StubOutputStream dataStream) throws IOException {\n    dataStream.writeName(stub.getName());\n    dataStream.writeBoolean(stub.isPublic());\n  }\n\n  @NotNull\n  @Override\n  public GoAnonymousFieldDefinitionStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {\n    return new GoAnonymousFieldDefinitionStub(parentStub, this, dataStream.readName(), dataStream.readBoolean());\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/types/GoConstDefinitionStubElementType.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs.types;\n\nimport com.goide.psi.GoConstDefinition;\nimport com.goide.psi.GoFunctionOrMethodDeclaration;\nimport com.goide.psi.impl.GoConstDefinitionImpl;\nimport com.goide.stubs.GoConstDefinitionStub;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.stubs.StubElement;\nimport com.intellij.psi.stubs.StubInputStream;\nimport com.intellij.psi.stubs.StubOutputStream;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport com.intellij.util.ArrayFactory;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.io.IOException;\n\npublic class GoConstDefinitionStubElementType extends GoNamedStubElementType<GoConstDefinitionStub, GoConstDefinition> {\n  public static final GoConstDefinition[] EMPTY_ARRAY = new GoConstDefinition[0];\n\n  public static final ArrayFactory<GoConstDefinition> ARRAY_FACTORY = count -> count == 0 ? EMPTY_ARRAY : new GoConstDefinition[count];\n  \n  public GoConstDefinitionStubElementType(@NotNull String name) {\n    super(name);\n  }\n\n  @NotNull\n  @Override\n  public GoConstDefinition createPsi(@NotNull GoConstDefinitionStub stub) {\n    return new GoConstDefinitionImpl(stub, this);\n  }\n\n  @NotNull\n  @Override\n  public GoConstDefinitionStub createStub(@NotNull GoConstDefinition psi, StubElement parentStub) {\n    return new GoConstDefinitionStub(parentStub, this, psi.getName(), psi.isPublic());\n  }\n\n  @Override\n  public void serialize(@NotNull GoConstDefinitionStub stub, @NotNull StubOutputStream dataStream) throws IOException {\n    dataStream.writeName(stub.getName());\n    dataStream.writeBoolean(stub.isPublic());\n  }\n\n  @NotNull\n  @Override\n  public GoConstDefinitionStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {\n    return new GoConstDefinitionStub(parentStub, this, dataStream.readName(), dataStream.readBoolean());\n  }\n\n  @Override\n  public boolean shouldCreateStub(@NotNull ASTNode node) {\n    return super.shouldCreateStub(node) && PsiTreeUtil.getParentOfType(node.getPsi(), GoFunctionOrMethodDeclaration.class) == null;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/types/GoConstSpecStubElementType.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs.types;\n\nimport com.goide.psi.GoConstSpec;\nimport com.goide.psi.GoFunctionOrMethodDeclaration;\nimport com.goide.psi.impl.GoConstSpecImpl;\nimport com.goide.stubs.GoConstSpecStub;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.stubs.StubElement;\nimport com.intellij.psi.stubs.StubInputStream;\nimport com.intellij.psi.stubs.StubOutputStream;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport com.intellij.util.ArrayFactory;\nimport com.intellij.util.io.StringRef;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.io.IOException;\n\npublic class GoConstSpecStubElementType extends GoStubElementType<GoConstSpecStub, GoConstSpec> {\n  public static final GoConstSpec[] EMPTY_ARRAY = new GoConstSpec[0];\n\n  public static final ArrayFactory<GoConstSpec> ARRAY_FACTORY = count -> count == 0 ? EMPTY_ARRAY : new GoConstSpec[count];\n  \n  public GoConstSpecStubElementType(@NotNull String name) {\n    super(name);\n  }\n\n  @NotNull\n  @Override\n  public GoConstSpec createPsi(@NotNull GoConstSpecStub stub) {\n    return new GoConstSpecImpl(stub, this);\n  }\n\n  @NotNull\n  @Override\n  public GoConstSpecStub createStub(@NotNull GoConstSpec psi, StubElement parentStub) {\n    String join = StringUtil.join(psi.getExpressionList(), PsiElement::getText, \";\");\n    return new GoConstSpecStub(parentStub, this, StringRef.fromString(join));\n  }\n\n  @Override\n  public void serialize(@NotNull GoConstSpecStub stub, @NotNull StubOutputStream dataStream) throws IOException {\n    dataStream.writeName(stub.getExpressionsText());\n  }\n\n  @Override\n  public boolean shouldCreateStub(ASTNode node) {\n    return super.shouldCreateStub(node) && PsiTreeUtil.getParentOfType(node.getPsi(), GoFunctionOrMethodDeclaration.class) == null;\n  }\n\n  @NotNull\n  @Override\n  public GoConstSpecStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {\n    return new GoConstSpecStub(parentStub, this, dataStream.readName());\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/types/GoFieldDefinitionStubElementType.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs.types;\n\nimport com.goide.psi.GoFieldDefinition;\nimport com.goide.psi.impl.GoFieldDefinitionImpl;\nimport com.goide.stubs.GoFieldDefinitionStub;\nimport com.intellij.psi.stubs.StubElement;\nimport com.intellij.psi.stubs.StubInputStream;\nimport com.intellij.psi.stubs.StubOutputStream;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.io.IOException;\n\npublic class GoFieldDefinitionStubElementType extends GoNamedStubElementType<GoFieldDefinitionStub, GoFieldDefinition> {\n  public GoFieldDefinitionStubElementType(@NotNull String name) {\n    super(name);\n  }\n\n  @NotNull\n  @Override\n  public GoFieldDefinition createPsi(@NotNull GoFieldDefinitionStub stub) {\n    return new GoFieldDefinitionImpl(stub, this);\n  }\n\n  @NotNull\n  @Override\n  public GoFieldDefinitionStub createStub(@NotNull GoFieldDefinition psi, StubElement parentStub) {\n    return new GoFieldDefinitionStub(parentStub, this, psi.getName(), psi.isPublic());\n  }\n\n  @Override\n  public void serialize(@NotNull GoFieldDefinitionStub stub, @NotNull StubOutputStream dataStream) throws IOException {\n    dataStream.writeName(stub.getName());\n    dataStream.writeBoolean(stub.isPublic());\n  }\n\n  @NotNull\n  @Override\n  public GoFieldDefinitionStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {\n    return new GoFieldDefinitionStub(parentStub, this, dataStream.readName(), dataStream.readBoolean());\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/types/GoFunctionDeclarationStubElementType.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs.types;\n\nimport com.goide.psi.GoFunctionDeclaration;\nimport com.goide.psi.GoNamedElement;\nimport com.goide.psi.impl.GoFunctionDeclarationImpl;\nimport com.goide.stubs.GoFunctionDeclarationStub;\nimport com.goide.stubs.index.GoFunctionIndex;\nimport com.intellij.psi.stubs.StubElement;\nimport com.intellij.psi.stubs.StubIndexKey;\nimport com.intellij.psi.stubs.StubInputStream;\nimport com.intellij.psi.stubs.StubOutputStream;\nimport com.intellij.util.ArrayFactory;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.io.IOException;\nimport java.util.ArrayList;\nimport java.util.Collection;\n\npublic class GoFunctionDeclarationStubElementType extends GoNamedStubElementType<GoFunctionDeclarationStub, GoFunctionDeclaration> {\n  public static final GoFunctionDeclaration[] EMPTY_ARRAY = new GoFunctionDeclaration[0];\n\n  public static final ArrayFactory<GoFunctionDeclaration> ARRAY_FACTORY =\n    count -> count == 0 ? EMPTY_ARRAY : new GoFunctionDeclaration[count];\n  \n  private static final ArrayList<StubIndexKey<String, ? extends GoNamedElement>> EXTRA_KEYS =\n    ContainerUtil.newArrayList(GoFunctionIndex.KEY);\n\n  public GoFunctionDeclarationStubElementType(@NotNull String name) {\n    super(name);\n  }\n\n  @NotNull\n  @Override\n  public GoFunctionDeclaration createPsi(@NotNull GoFunctionDeclarationStub stub) {\n    return new GoFunctionDeclarationImpl(stub, this);\n  }\n\n  @NotNull\n  @Override\n  public GoFunctionDeclarationStub createStub(@NotNull GoFunctionDeclaration psi, StubElement parentStub) {\n    return new GoFunctionDeclarationStub(parentStub, this, psi.getName(), psi.isPublic());\n  }\n\n  @Override\n  public void serialize(@NotNull GoFunctionDeclarationStub stub, @NotNull StubOutputStream dataStream) throws IOException {\n    dataStream.writeName(stub.getName());\n    dataStream.writeBoolean(stub.isPublic());\n  }\n\n  @NotNull\n  @Override\n  public GoFunctionDeclarationStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {\n    return new GoFunctionDeclarationStub(parentStub, this, dataStream.readName(), dataStream.readBoolean());\n  }\n\n  @NotNull\n  @Override\n  protected Collection<StubIndexKey<String, ? extends GoNamedElement>> getExtraIndexKeys() {\n    return EXTRA_KEYS;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/types/GoImportSpecStubElementType.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs.types;\n\nimport com.goide.psi.GoImportSpec;\nimport com.goide.psi.impl.GoImportSpecImpl;\nimport com.goide.stubs.GoImportSpecStub;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.psi.stubs.StubElement;\nimport com.intellij.psi.stubs.StubInputStream;\nimport com.intellij.psi.stubs.StubOutputStream;\nimport com.intellij.util.ArrayFactory;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.io.IOException;\n\npublic class GoImportSpecStubElementType extends GoNamedStubElementType<GoImportSpecStub, GoImportSpec> {\n  public static final GoImportSpec[] EMPTY_ARRAY = new GoImportSpec[0];\n  public static final ArrayFactory<GoImportSpec> ARRAY_FACTORY = count -> count == 0 ? EMPTY_ARRAY : new GoImportSpec[count];\n\n  public GoImportSpecStubElementType(@NotNull String name) {\n    super(name);\n  }\n\n  @NotNull\n  @Override\n  public GoImportSpec createPsi(@NotNull GoImportSpecStub stub) {\n    return new GoImportSpecImpl(stub, this);\n  }\n\n  @NotNull\n  @Override\n  public GoImportSpecStub createStub(@NotNull GoImportSpec psi, StubElement parentStub) {\n    return new GoImportSpecStub(parentStub, this, psi.getAlias(), psi.getPath(), psi.isDot());\n  }\n\n  @Override\n  public void serialize(@NotNull GoImportSpecStub stub, @NotNull StubOutputStream dataStream) throws IOException {\n    dataStream.writeUTFFast(StringUtil.notNullize(stub.getAlias()));\n    dataStream.writeUTFFast(stub.getPath());\n    dataStream.writeBoolean(stub.isDot());\n  }\n\n  @NotNull\n  @Override\n  public GoImportSpecStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {\n    return new GoImportSpecStub(parentStub, this, StringUtil.nullize(dataStream.readUTFFast()), \n                                dataStream.readUTFFast(), dataStream.readBoolean());\n  }\n\n  @Override\n  public boolean shouldCreateStub(@NotNull ASTNode node) {\n    return true;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/types/GoLabelDefinitionStubElementType.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs.types;\n\nimport com.goide.psi.GoLabelDefinition;\nimport com.goide.psi.impl.GoLabelDefinitionImpl;\nimport com.goide.stubs.GoLabelDefinitionStub;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.stubs.StubElement;\nimport com.intellij.psi.stubs.StubInputStream;\nimport com.intellij.psi.stubs.StubOutputStream;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.io.IOException;\n\npublic class GoLabelDefinitionStubElementType extends GoNamedStubElementType<GoLabelDefinitionStub, GoLabelDefinition> {\n  public GoLabelDefinitionStubElementType(@NotNull String name) {\n    super(name);\n  }\n\n  @NotNull\n  @Override\n  public GoLabelDefinition createPsi(@NotNull GoLabelDefinitionStub stub) {\n    return new GoLabelDefinitionImpl(stub, this);\n  }\n\n  @NotNull\n  @Override\n  public GoLabelDefinitionStub createStub(@NotNull GoLabelDefinition psi, StubElement parentStub) {\n    return new GoLabelDefinitionStub(parentStub, this, psi.getName(), psi.isPublic());\n  }\n\n  @Override\n  public void serialize(@NotNull GoLabelDefinitionStub stub, @NotNull StubOutputStream dataStream) throws IOException {\n    dataStream.writeName(stub.getName());\n    dataStream.writeBoolean(stub.isPublic());\n  }\n\n  @Override\n  public boolean shouldCreateStub(@NotNull ASTNode node) {\n    return false; // todo\n  }\n\n  @NotNull\n  @Override\n  public GoLabelDefinitionStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {\n    return new GoLabelDefinitionStub(parentStub, this, dataStream.readName(), dataStream.readBoolean());\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/types/GoMethodDeclarationStubElementType.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs.types;\n\nimport com.goide.psi.GoMethodDeclaration;\nimport com.goide.psi.GoTypeReferenceExpression;\nimport com.goide.psi.impl.GoMethodDeclarationImpl;\nimport com.goide.psi.impl.GoPsiImplUtil;\nimport com.goide.stubs.GoFileStub;\nimport com.goide.stubs.GoMethodDeclarationStub;\nimport com.goide.stubs.index.GoMethodIndex;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.psi.stubs.IndexSink;\nimport com.intellij.psi.stubs.StubElement;\nimport com.intellij.psi.stubs.StubInputStream;\nimport com.intellij.psi.stubs.StubOutputStream;\nimport com.intellij.util.ArrayFactory;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.io.IOException;\n\npublic class GoMethodDeclarationStubElementType extends GoNamedStubElementType<GoMethodDeclarationStub, GoMethodDeclaration> {\n  public static final GoMethodDeclaration[] EMPTY_ARRAY = new GoMethodDeclaration[0];\n\n  public static final ArrayFactory<GoMethodDeclaration> ARRAY_FACTORY = count -> count == 0 ? EMPTY_ARRAY : new GoMethodDeclaration[count];\n  \n  public GoMethodDeclarationStubElementType(@NotNull String name) {\n    super(name);\n  }\n\n  @NotNull\n  @Override\n  public GoMethodDeclaration createPsi(@NotNull GoMethodDeclarationStub stub) {\n    return new GoMethodDeclarationImpl(stub, this);\n  }\n\n  @Nullable\n  @Override\n  public GoMethodDeclarationStub createStub(@NotNull GoMethodDeclaration psi, StubElement parentStub) {\n    return new GoMethodDeclarationStub(parentStub, this, psi.getName(), psi.isPublic(), calcTypeText(psi));\n  }\n\n  @Override\n  public void serialize(@NotNull GoMethodDeclarationStub stub, @NotNull StubOutputStream dataStream) throws IOException {\n    dataStream.writeName(stub.getName());\n    dataStream.writeBoolean(stub.isPublic());\n    dataStream.writeName(stub.getTypeName());\n  }\n\n  @NotNull\n  @Override\n  public GoMethodDeclarationStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {\n    return new GoMethodDeclarationStub(parentStub, this, dataStream.readName(), dataStream.readBoolean(), dataStream.readName());\n  }\n\n  @Override\n  public void indexStub(@NotNull GoMethodDeclarationStub stub, @NotNull IndexSink sink) {\n    super.indexStub(stub, sink);\n    String typeName = stub.getTypeName();\n    if (!StringUtil.isEmpty(typeName)) {\n      StubElement parent = stub.getParentStub();\n      if (parent instanceof GoFileStub) {\n        String packageName = ((GoFileStub)parent).getPackageName();\n        if (!StringUtil.isEmpty(typeName)) {\n          sink.occurrence(GoMethodIndex.KEY, packageName + \".\" + typeName);\n        }\n      }\n    }\n  }\n\n  @Nullable\n  public static String calcTypeText(@NotNull GoMethodDeclaration psi) {\n    GoTypeReferenceExpression reference = GoPsiImplUtil.getTypeReference(psi.getReceiverType());\n    return reference != null ? reference.getIdentifier().getText() : null;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/types/GoMethodSpecStubElementType.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs.types;\n\nimport com.goide.psi.GoMethodSpec;\nimport com.goide.psi.impl.GoMethodSpecImpl;\nimport com.goide.psi.impl.GoPsiImplUtil;\nimport com.goide.stubs.GoMethodSpecStub;\nimport com.goide.stubs.index.GoMethodFingerprintIndex;\nimport com.intellij.psi.stubs.IndexSink;\nimport com.intellij.psi.stubs.StubElement;\nimport com.intellij.psi.stubs.StubInputStream;\nimport com.intellij.psi.stubs.StubOutputStream;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.io.IOException;\n\npublic class GoMethodSpecStubElementType extends GoNamedStubElementType<GoMethodSpecStub, GoMethodSpec> {\n  public GoMethodSpecStubElementType(@NotNull String name) {\n    super(name);\n  }\n\n  @Override\n  public void indexStub(@NotNull GoMethodSpecStub stub, @NotNull IndexSink sink) {\n    super.indexStub(stub, sink);\n    String name = stub.getName();\n    int arity = stub.getArity();\n    if (name != null && arity >= 0) {\n      sink.occurrence(GoMethodFingerprintIndex.KEY, name + \"/\" + arity);\n    }\n  }\n\n  @NotNull\n  @Override\n  public GoMethodSpec createPsi(@NotNull GoMethodSpecStub stub) {\n    return new GoMethodSpecImpl(stub, this);\n  }\n\n  @NotNull\n  @Override\n  public GoMethodSpecStub createStub(@NotNull GoMethodSpec psi, StubElement parentStub) {\n    int arity = GoPsiImplUtil.getArity(psi.getSignature());\n    return new GoMethodSpecStub(parentStub, this, psi.getName(), psi.isPublic(), arity);\n  }\n\n  @Override\n  public void serialize(@NotNull GoMethodSpecStub stub, @NotNull StubOutputStream dataStream) throws IOException {\n    dataStream.writeName(stub.getName());\n    dataStream.writeBoolean(stub.isPublic());\n    dataStream.writeVarInt(stub.getArity());\n  }\n\n  @NotNull\n  @Override\n  public GoMethodSpecStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {\n    return new GoMethodSpecStub(parentStub, this, dataStream.readName(), dataStream.readBoolean(), dataStream.readVarInt());\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/types/GoNamedStubElementType.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs.types;\n\nimport com.goide.psi.GoNamedElement;\nimport com.goide.stubs.GoFileStub;\nimport com.goide.stubs.GoNamedStub;\nimport com.goide.stubs.index.GoAllPrivateNamesIndex;\nimport com.goide.stubs.index.GoAllPublicNamesIndex;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.stubs.IndexSink;\nimport com.intellij.psi.stubs.StubElement;\nimport com.intellij.psi.stubs.StubIndexKey;\nimport org.jetbrains.annotations.NonNls;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.Collection;\nimport java.util.Collections;\n\npublic abstract class GoNamedStubElementType<S extends GoNamedStub<T>, T extends GoNamedElement> extends GoStubElementType<S, T> {\n  public GoNamedStubElementType(@NonNls @NotNull String debugName) {\n    super(debugName);\n  }\n\n  @Override\n  public boolean shouldCreateStub(@NotNull ASTNode node) {\n    if (!super.shouldCreateStub(node)) return false;\n    PsiElement psi = node.getPsi();\n    return psi instanceof GoNamedElement && StringUtil.isNotEmpty(((GoNamedElement)psi).getName());\n  }\n\n  @Override\n  public void indexStub(@NotNull S stub, @NotNull IndexSink sink) {\n    String name = stub.getName();\n    if (shouldIndex() && StringUtil.isNotEmpty(name)) {\n      String packageName = null;\n      StubElement parent = stub.getParentStub();\n      while (parent != null) {\n        if (parent instanceof GoFileStub) {\n          packageName = ((GoFileStub)parent).getPackageName();\n          break;\n        }\n        parent = parent.getParentStub();\n      }\n      \n      String indexingName = StringUtil.isNotEmpty(packageName) ? packageName + \".\" + name : name;\n      if (stub.isPublic()) {\n        sink.occurrence(GoAllPublicNamesIndex.ALL_PUBLIC_NAMES, indexingName);\n      }\n      else {\n        sink.occurrence(GoAllPrivateNamesIndex.ALL_PRIVATE_NAMES, indexingName);\n      }\n      for (StubIndexKey<String, ? extends GoNamedElement> key : getExtraIndexKeys()) {\n        sink.occurrence(key, name);\n      }\n    }\n  }\n\n  protected boolean shouldIndex() {\n    return true;\n  }\n\n  @NotNull\n  protected Collection<StubIndexKey<String, ? extends GoNamedElement>> getExtraIndexKeys() {\n    return Collections.emptyList();\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/types/GoPackageClauseStubElementType.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs.types;\n\nimport com.goide.psi.GoPackageClause;\nimport com.goide.psi.impl.GoPackageClauseImpl;\nimport com.goide.stubs.GoPackageClauseStub;\nimport com.intellij.psi.stubs.StubElement;\nimport com.intellij.psi.stubs.StubInputStream;\nimport com.intellij.psi.stubs.StubOutputStream;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.io.IOException;\n\npublic class GoPackageClauseStubElementType extends GoStubElementType<GoPackageClauseStub, GoPackageClause> {\n  public static final GoPackageClauseStubElementType INSTANCE = new GoPackageClauseStubElementType();\n\n  private GoPackageClauseStubElementType() {\n    super(\"PACKAGE_CLAUSE\");\n  }\n\n  @NotNull\n  @Override\n  public GoPackageClause createPsi(@NotNull GoPackageClauseStub stub) {\n    return new GoPackageClauseImpl(stub, this);\n  }\n\n  @NotNull\n  @Override\n  public GoPackageClauseStub createStub(@NotNull GoPackageClause psi, StubElement parentStub) {\n    return new GoPackageClauseStub(parentStub, this, psi.getName());\n  }\n\n  @Override\n  public void serialize(@NotNull GoPackageClauseStub stub, @NotNull StubOutputStream dataStream) throws IOException {\n    dataStream.writeName(stub.getName());\n  }\n\n  @NotNull\n  @Override\n  public GoPackageClauseStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {\n    return new GoPackageClauseStub(parentStub, this, dataStream.readName());\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/types/GoParamDefinitionStubElementType.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs.types;\n\nimport com.goide.psi.GoParamDefinition;\nimport com.goide.psi.impl.GoParamDefinitionImpl;\nimport com.goide.stubs.GoParamDefinitionStub;\nimport com.intellij.psi.stubs.StubElement;\nimport com.intellij.psi.stubs.StubInputStream;\nimport com.intellij.psi.stubs.StubOutputStream;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.io.IOException;\n\npublic class GoParamDefinitionStubElementType extends GoNamedStubElementType<GoParamDefinitionStub, GoParamDefinition> {\n  public GoParamDefinitionStubElementType(@NotNull String name) {\n    super(name);\n  }\n\n  @NotNull\n  @Override\n  public GoParamDefinition createPsi(@NotNull GoParamDefinitionStub stub) {\n    return new GoParamDefinitionImpl(stub, this);\n  }\n\n  @NotNull\n  @Override\n  public GoParamDefinitionStub createStub(@NotNull GoParamDefinition psi, StubElement parentStub) {\n    return new GoParamDefinitionStub(parentStub, this, psi.getName(), psi.isPublic());\n  }\n\n  @Override\n  public void serialize(@NotNull GoParamDefinitionStub stub, @NotNull StubOutputStream dataStream) throws IOException {\n    dataStream.writeName(stub.getName());\n    dataStream.writeBoolean(stub.isPublic());\n  }\n\n  @NotNull\n  @Override\n  public GoParamDefinitionStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {\n    return new GoParamDefinitionStub(parentStub, this, dataStream.readName(), dataStream.readBoolean());\n  }\n\n  @Override\n  protected boolean shouldIndex() {\n    return false;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/types/GoParameterDeclarationStubElementType.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs.types;\n\nimport com.goide.psi.GoParameterDeclaration;\nimport com.goide.psi.impl.GoParameterDeclarationImpl;\nimport com.goide.stubs.GoParameterDeclarationStub;\nimport com.intellij.psi.stubs.StubElement;\nimport com.intellij.psi.stubs.StubInputStream;\nimport com.intellij.psi.stubs.StubOutputStream;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.io.IOException;\n\npublic class GoParameterDeclarationStubElementType extends GoStubElementType<GoParameterDeclarationStub, GoParameterDeclaration> {\n  public GoParameterDeclarationStubElementType(@NotNull String name) {\n    super(name);\n  }\n\n  @NotNull\n  @Override\n  public GoParameterDeclaration createPsi(@NotNull GoParameterDeclarationStub stub) {\n    return new GoParameterDeclarationImpl(stub, this);\n  }\n\n  @NotNull\n  @Override\n  public GoParameterDeclarationStub createStub(@NotNull GoParameterDeclaration psi, StubElement parentStub) {\n    return new GoParameterDeclarationStub(parentStub, this, psi.getText(), psi.isVariadic());\n  }\n\n  @Override\n  public void serialize(@NotNull GoParameterDeclarationStub stub, @NotNull StubOutputStream dataStream) throws IOException {\n    dataStream.writeName(stub.getText());\n    dataStream.writeBoolean(stub.isVariadic());\n  }\n\n  @NotNull\n  @Override\n  public GoParameterDeclarationStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {\n    return new GoParameterDeclarationStub(parentStub, this, dataStream.readName(), dataStream.readBoolean());\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/types/GoParametersStubElementType.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs.types;\n\nimport com.goide.psi.GoParameters;\nimport com.goide.psi.impl.GoParametersImpl;\nimport com.goide.stubs.GoParametersStub;\nimport com.intellij.psi.stubs.StubElement;\nimport com.intellij.psi.stubs.StubInputStream;\nimport com.intellij.psi.stubs.StubOutputStream;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.io.IOException;\n\npublic class GoParametersStubElementType extends GoStubElementType<GoParametersStub, GoParameters> {\n  public GoParametersStubElementType(@NotNull String name) {\n    super(name);\n  }\n\n  @NotNull\n  @Override\n  public GoParameters createPsi(@NotNull GoParametersStub stub) {\n    return new GoParametersImpl(stub, this);\n  }\n\n  @NotNull\n  @Override\n  public GoParametersStub createStub(@NotNull GoParameters psi, StubElement parentStub) {\n    return new GoParametersStub(parentStub, this, psi.getText());\n  }\n\n  @Override\n  public void serialize(@NotNull GoParametersStub stub, @NotNull StubOutputStream dataStream) throws IOException {\n    dataStream.writeName(stub.getText());\n  }\n\n  @NotNull\n  @Override\n  public GoParametersStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {\n    return new GoParametersStub(parentStub, this, dataStream.readName());\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/types/GoReceiverStubElementType.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs.types;\n\nimport com.goide.psi.GoReceiver;\nimport com.goide.psi.impl.GoReceiverImpl;\nimport com.goide.stubs.GoReceiverStub;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.psi.stubs.StubElement;\nimport com.intellij.psi.stubs.StubInputStream;\nimport com.intellij.psi.stubs.StubOutputStream;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.io.IOException;\n\npublic class GoReceiverStubElementType extends GoNamedStubElementType<GoReceiverStub, GoReceiver> {\n  public GoReceiverStubElementType(@NotNull String name) {\n    super(name);\n  }\n\n  @Override\n  public boolean shouldCreateStub(@NotNull ASTNode node) {\n    return true;\n  }\n\n  @NotNull\n  @Override\n  public GoReceiver createPsi(@NotNull GoReceiverStub stub) {\n    return new GoReceiverImpl(stub, this);\n  }\n\n  @NotNull\n  @Override\n  public GoReceiverStub createStub(@NotNull GoReceiver psi, StubElement parentStub) {\n    return new GoReceiverStub(parentStub, this, StringUtil.notNullize(psi.getName()), psi.isPublic());\n  }\n\n  @Override\n  public void serialize(@NotNull GoReceiverStub stub, @NotNull StubOutputStream dataStream) throws IOException {\n    dataStream.writeName(stub.getName());\n    dataStream.writeBoolean(stub.isPublic());\n  }\n\n  @NotNull\n  @Override\n  public GoReceiverStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {\n    return new GoReceiverStub(parentStub, this, dataStream.readName(), dataStream.readBoolean());\n  }\n\n  @Override\n  protected boolean shouldIndex() {\n    return false;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/types/GoResultStubElementType.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs.types;\n\nimport com.goide.psi.GoResult;\nimport com.goide.psi.impl.GoResultImpl;\nimport com.goide.stubs.GoResultStub;\nimport com.intellij.psi.stubs.StubElement;\nimport com.intellij.psi.stubs.StubInputStream;\nimport com.intellij.psi.stubs.StubOutputStream;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.io.IOException;\n\npublic class GoResultStubElementType extends GoStubElementType<GoResultStub, GoResult> {\n  public GoResultStubElementType(@NotNull String name) {\n    super(name);\n  }\n\n  @NotNull\n  @Override\n  public GoResult createPsi(@NotNull GoResultStub stub) {\n    return new GoResultImpl(stub, this);\n  }\n\n  @NotNull\n  @Override\n  public GoResultStub createStub(@NotNull GoResult psi, StubElement parentStub) {\n    return new GoResultStub(parentStub, this, psi.getText());\n  }\n\n  @Override\n  public void serialize(@NotNull GoResultStub stub, @NotNull StubOutputStream dataStream) throws IOException {\n    dataStream.writeName(stub.getText());\n  }\n\n  @NotNull\n  @Override\n  public GoResultStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {\n    return new GoResultStub(parentStub, this, dataStream.readName());\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/types/GoSignatureStubElementType.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs.types;\n\nimport com.goide.psi.GoSignature;\nimport com.goide.psi.impl.GoSignatureImpl;\nimport com.goide.stubs.GoSignatureStub;\nimport com.intellij.psi.stubs.StubElement;\nimport com.intellij.psi.stubs.StubInputStream;\nimport com.intellij.psi.stubs.StubOutputStream;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.io.IOException;\n\npublic class GoSignatureStubElementType extends GoStubElementType<GoSignatureStub, GoSignature> {\n  public GoSignatureStubElementType(@NotNull String name) {\n    super(name);\n  }\n\n  @NotNull\n  @Override\n  public GoSignature createPsi(@NotNull GoSignatureStub stub) {\n    return new GoSignatureImpl(stub, this);\n  }\n\n  @NotNull\n  @Override\n  public GoSignatureStub createStub(@NotNull GoSignature psi, StubElement parentStub) {\n    return new GoSignatureStub(parentStub, this, psi.getText());\n  }\n\n  @Override\n  public void serialize(@NotNull GoSignatureStub stub, @NotNull StubOutputStream dataStream) throws IOException {\n    dataStream.writeName(stub.getText());\n  }\n\n  @NotNull\n  @Override\n  public GoSignatureStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {\n    return new GoSignatureStub(parentStub, this, dataStream.readName());\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/types/GoStubElementType.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs.types;\n\nimport com.goide.GoLanguage;\nimport com.goide.psi.GoBlock;\nimport com.goide.psi.GoCompositeElement;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.stubs.IStubElementType;\nimport com.intellij.psi.stubs.IndexSink;\nimport com.intellij.psi.stubs.StubBase;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport org.jetbrains.annotations.NonNls;\nimport org.jetbrains.annotations.NotNull;\n\npublic abstract class GoStubElementType<S extends StubBase<T>, T extends GoCompositeElement> extends IStubElementType<S, T> {\n  public GoStubElementType(@NonNls @NotNull String debugName) {\n    super(debugName, GoLanguage.INSTANCE);\n  }\n\n  @Override\n  @NotNull\n  public String getExternalId() {\n    return \"go.\" + super.toString();\n  }\n\n  @Override\n  public void indexStub(@NotNull S stub, @NotNull IndexSink sink) {\n  }\n\n  @Override\n  public boolean shouldCreateStub(ASTNode node) {\n    return super.shouldCreateStub(node) && shouldCreateStubInBlock(node);\n  }\n\n  protected boolean shouldCreateStubInBlock(ASTNode node) {\n    return PsiTreeUtil.getParentOfType(node.getPsi(), GoBlock.class) == null;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/types/GoTypeSpecStubElementType.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs.types;\n\nimport com.goide.psi.GoNamedElement;\nimport com.goide.psi.GoTypeSpec;\nimport com.goide.psi.impl.GoTypeSpecImpl;\nimport com.goide.stubs.GoTypeSpecStub;\nimport com.goide.stubs.index.GoTypesIndex;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.stubs.StubElement;\nimport com.intellij.psi.stubs.StubIndexKey;\nimport com.intellij.psi.stubs.StubInputStream;\nimport com.intellij.psi.stubs.StubOutputStream;\nimport com.intellij.util.ArrayFactory;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.io.IOException;\nimport java.util.Collection;\n\npublic class GoTypeSpecStubElementType extends GoNamedStubElementType<GoTypeSpecStub, GoTypeSpec> {\n  public static final GoTypeSpec[] EMPTY_ARRAY = new GoTypeSpec[0];\n\n  public static final ArrayFactory<GoTypeSpec> ARRAY_FACTORY = count -> count == 0 ? EMPTY_ARRAY : new GoTypeSpec[count];\n  \n  public GoTypeSpecStubElementType(@NotNull String name) {\n    super(name);\n  }\n\n  @NotNull\n  @Override\n  public GoTypeSpec createPsi(@NotNull GoTypeSpecStub stub) {\n    return new GoTypeSpecImpl(stub, this);\n  }\n\n  @NotNull\n  @Override\n  public GoTypeSpecStub createStub(@NotNull GoTypeSpec psi, StubElement parentStub) {\n    return new GoTypeSpecStub(parentStub, this, psi.getName(), psi.isPublic());\n  }\n\n  @Override\n  public void serialize(@NotNull GoTypeSpecStub stub, @NotNull StubOutputStream dataStream) throws IOException {\n    dataStream.writeName(stub.getName());\n    dataStream.writeBoolean(stub.isPublic());\n  }\n\n  @NotNull\n  @Override\n  public GoTypeSpecStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {\n    return new GoTypeSpecStub(parentStub, this, dataStream.readName(), dataStream.readBoolean());\n  }\n\n  @NotNull\n  @Override\n  protected Collection<StubIndexKey<String, ? extends GoNamedElement>> getExtraIndexKeys() {\n    return ContainerUtil.list(GoTypesIndex.KEY);\n  }\n\n  @Override\n  protected boolean shouldCreateStubInBlock(ASTNode node) {\n    return true;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/types/GoTypeStubElementType.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs.types;\n\nimport com.goide.psi.GoType;\nimport com.goide.psi.GoTypeSpec;\nimport com.goide.stubs.GoTypeStub;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.stubs.StubElement;\nimport com.intellij.psi.stubs.StubInputStream;\nimport com.intellij.psi.stubs.StubOutputStream;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.io.IOException;\n\npublic abstract class GoTypeStubElementType extends GoStubElementType<GoTypeStub, GoType> {\n  protected GoTypeStubElementType(@NotNull String name) {\n    super(name);\n  }\n\n  @NotNull\n  @Override\n  public GoTypeStub createStub(@NotNull GoType psi, StubElement parentStub) {\n    return new GoTypeStub(parentStub, this, psi.getText());\n  }\n\n  @Override\n  public void serialize(@NotNull GoTypeStub stub, @NotNull StubOutputStream dataStream) throws IOException {\n    dataStream.writeName(stub.getText());\n  }\n\n  @Override\n  protected boolean shouldCreateStubInBlock(ASTNode node) {\n    return PsiTreeUtil.getParentOfType(node.getPsi(), GoTypeSpec.class) != null || super.shouldCreateStubInBlock(node);\n  }\n\n  @NotNull\n  @Override\n  public GoTypeStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {\n    return new GoTypeStub(parentStub, this, dataStream.readName());\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/types/GoVarDefinitionStubElementType.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs.types;\n\nimport com.goide.psi.GoFunctionOrMethodDeclaration;\nimport com.goide.psi.GoVarDefinition;\nimport com.goide.psi.impl.GoVarDefinitionImpl;\nimport com.goide.stubs.GoVarDefinitionStub;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.stubs.StubElement;\nimport com.intellij.psi.stubs.StubInputStream;\nimport com.intellij.psi.stubs.StubOutputStream;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport com.intellij.util.ArrayFactory;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.io.IOException;\n\npublic class GoVarDefinitionStubElementType extends GoNamedStubElementType<GoVarDefinitionStub, GoVarDefinition> {\n  public static final GoVarDefinition[] EMPTY_ARRAY = new GoVarDefinition[0];\n\n  public static final ArrayFactory<GoVarDefinition> ARRAY_FACTORY = count -> count == 0 ? EMPTY_ARRAY : new GoVarDefinition[count];\n  \n  public GoVarDefinitionStubElementType(@NotNull String name) {\n    super(name);\n  }\n\n  @NotNull\n  @Override\n  public GoVarDefinition createPsi(@NotNull GoVarDefinitionStub stub) {\n    return new GoVarDefinitionImpl(stub, this);\n  }\n\n  @NotNull\n  @Override\n  public GoVarDefinitionStub createStub(@NotNull GoVarDefinition psi, StubElement parentStub) {\n    return new GoVarDefinitionStub(parentStub, this, psi.getName(), psi.isPublic());\n  }\n\n  @Override\n  public void serialize(@NotNull GoVarDefinitionStub stub, @NotNull StubOutputStream dataStream) throws IOException {\n    dataStream.writeName(stub.getName());\n    dataStream.writeBoolean(stub.isPublic());\n  }\n\n  @NotNull\n  @Override\n  public GoVarDefinitionStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {\n    return new GoVarDefinitionStub(parentStub, this, dataStream.readName(), dataStream.readBoolean());\n  }\n\n  @Override\n  public boolean shouldCreateStub(@NotNull ASTNode node) {\n    return super.shouldCreateStub(node) && PsiTreeUtil.getParentOfType(node.getPsi(), GoFunctionOrMethodDeclaration.class) == null;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/stubs/types/GoVarSpecStubElementType.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs.types;\n\nimport com.goide.GoTypes;\nimport com.goide.psi.GoFunctionOrMethodDeclaration;\nimport com.goide.psi.GoVarSpec;\nimport com.goide.psi.impl.GoVarSpecImpl;\nimport com.goide.stubs.GoVarSpecStub;\nimport com.intellij.lang.ASTNode;\nimport com.intellij.psi.stubs.StubElement;\nimport com.intellij.psi.stubs.StubInputStream;\nimport com.intellij.psi.stubs.StubOutputStream;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport com.intellij.util.ArrayFactory;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.io.IOException;\n\npublic class GoVarSpecStubElementType extends GoStubElementType<GoVarSpecStub, GoVarSpec> {\n  public static final GoVarSpec[] EMPTY_ARRAY = new GoVarSpec[0];\n\n  public static final ArrayFactory<GoVarSpec> ARRAY_FACTORY = count -> count == 0 ? EMPTY_ARRAY : new GoVarSpec[count];\n  \n  public GoVarSpecStubElementType(@NotNull String name) {\n    super(name);\n  }\n\n  @NotNull\n  @Override\n  public GoVarSpec createPsi(@NotNull GoVarSpecStub stub) {\n    return new GoVarSpecImpl(stub, this);\n  }\n\n  @NotNull\n  @Override\n  public GoVarSpecStub createStub(@NotNull GoVarSpec psi, StubElement parentStub) {\n    return new GoVarSpecStub(parentStub, this);\n  }\n\n  @Override\n  public boolean shouldCreateStub(ASTNode node) {\n    return super.shouldCreateStub(node) &&\n           node.getElementType() == GoTypes.VAR_SPEC &&\n           PsiTreeUtil.getParentOfType(node.getPsi(), GoFunctionOrMethodDeclaration.class) == null;\n  }\n\n  @Override\n  public void serialize(@NotNull GoVarSpecStub stub, @NotNull StubOutputStream dataStream) throws IOException {\n  }\n\n  @NotNull\n  @Override\n  public GoVarSpecStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {\n    return new GoVarSpecStub(parentStub, this);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/template/GoEverywhereContextType.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.template;\n\nimport com.goide.GoConstants;\nimport com.goide.GoTypes;\nimport com.intellij.codeInsight.template.EverywhereContextType;\nimport com.intellij.psi.PsiComment;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.impl.source.tree.LeafPsiElement;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoEverywhereContextType extends GoLiveTemplateContextType {\n  protected GoEverywhereContextType() {\n    super(\"GO\", GoConstants.GO, EverywhereContextType.class);\n  }\n\n  @Override\n  protected boolean isInContext(@NotNull PsiElement element) {\n    return !(element instanceof PsiComment ||\n             element instanceof LeafPsiElement && ((LeafPsiElement)element).getElementType() == GoTypes.STRING);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/template/GoFieldNameMacro.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.template;\n\nimport com.goide.psi.GoFieldDeclaration;\nimport com.intellij.codeInsight.lookup.LookupElement;\nimport com.intellij.codeInsight.lookup.LookupElementBuilder;\nimport com.intellij.codeInsight.template.*;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiNamedElement;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.Collections;\nimport java.util.Set;\n\npublic class GoFieldNameMacro extends Macro {\n  @Override\n  public String getName() {\n    return \"fieldName\";\n  }\n\n  @Override\n  public String getPresentableName() {\n    return \"fieldName()\";\n  }\n\n  @Nullable\n  @Override\n  public Result calculateResult(@NotNull Expression[] params, ExpressionContext context) {\n    String name = ContainerUtil.getFirstItem(fieldNames(context));\n    return StringUtil.isNotEmpty(name) ? new TextResult(name) : null;\n  }\n\n  @Nullable\n  @Override\n  public LookupElement[] calculateLookupItems(@NotNull Expression[] params, ExpressionContext context) {\n    return ContainerUtil.map2Array(fieldNames(context), LookupElement.class, LookupElementBuilder::create);\n  }\n\n  @Override\n  public boolean isAcceptableInContext(TemplateContextType context) {\n    return context instanceof GoLiveTemplateContextType.Tag || context instanceof GoLiveTemplateContextType.TagLiteral;\n  }\n\n  private static Set<String> fieldNames(ExpressionContext context) {\n    PsiElement psiElement = context != null ? context.getPsiElementAtStartOffset() : null;\n    GoFieldDeclaration fieldDeclaration = PsiTreeUtil.getNonStrictParentOfType(psiElement, GoFieldDeclaration.class);\n    if (fieldDeclaration == null) {\n      return Collections.emptySet();\n    }\n    return ContainerUtil.map2LinkedSet(fieldDeclaration.getFieldDefinitionList(), PsiNamedElement::getName);\n  }\n}\n"
  },
  {
    "path": "src/com/goide/template/GoLiveTemplateContextType.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.template;\n\nimport com.goide.GoLanguage;\nimport com.goide.GoTypes;\nimport com.goide.highlighting.GoSyntaxHighlighter;\nimport com.goide.psi.*;\nimport com.intellij.codeInsight.template.TemplateContextType;\nimport com.intellij.openapi.fileTypes.SyntaxHighlighter;\nimport com.intellij.psi.*;\nimport com.intellij.psi.impl.source.tree.LeafPsiElement;\nimport com.intellij.psi.tree.IElementType;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport com.intellij.psi.util.PsiUtilCore;\nimport com.intellij.util.ObjectUtils;\nimport org.jetbrains.annotations.NonNls;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nabstract public class GoLiveTemplateContextType extends TemplateContextType {\n  protected GoLiveTemplateContextType(@NotNull @NonNls String id,\n                                      @NotNull String presentableName,\n                                      @Nullable Class<? extends TemplateContextType> baseContextType) {\n    super(id, presentableName, baseContextType);\n  }\n\n  @Override\n  public boolean isInContext(@NotNull PsiFile file, int offset) {\n    if (PsiUtilCore.getLanguageAtOffset(file, offset).isKindOf(GoLanguage.INSTANCE)) {\n      PsiElement psiElement = ObjectUtils.notNull(file.findElementAt(offset), file);\n      if (!acceptLeaf()) {\n        psiElement = getFirstCompositeElement(psiElement);\n      }\n      return psiElement != null && isInContext(psiElement);\n    }\n\n    return false;\n  }\n\n  protected boolean acceptLeaf() {\n    return false;\n  }\n\n  @Nullable\n  public static PsiElement prevVisibleLeafOrNewLine(PsiElement element) {\n    PsiElement prevLeaf = element;\n    while ((prevLeaf = PsiTreeUtil.prevLeaf(prevLeaf)) != null) {\n      if (prevLeaf instanceof PsiComment || prevLeaf instanceof PsiErrorElement) {\n        continue;\n      }\n      if (prevLeaf instanceof PsiWhiteSpace) {\n        if (prevLeaf.textContains('\\n')) {\n          return prevLeaf;\n        }\n        continue;\n      }\n      break;\n    }\n    return prevLeaf;\n  }\n\n  @Nullable\n  private static PsiElement getFirstCompositeElement(@Nullable PsiElement at) {\n    if (at instanceof PsiComment || at instanceof LeafPsiElement && ((LeafPsiElement)at).getElementType() == GoTypes.STRING) return at;\n    PsiElement result = at;\n    while (result != null && (result instanceof PsiWhiteSpace || result.getNode().getChildren(null).length == 0)) {\n      result = result.getParent();\n    }\n    return result;\n  }\n\n  protected abstract boolean isInContext(@NotNull PsiElement element);\n\n  @Override\n  public SyntaxHighlighter createHighlighter() {\n    return new GoSyntaxHighlighter();\n  }\n\n  public static class File extends GoLiveTemplateContextType {\n    protected File() {\n      super(\"GO_FILE\", \"File\", GoEverywhereContextType.class);\n    }\n\n    @Override\n    protected boolean isInContext(@NotNull PsiElement element) {\n      if (element instanceof PsiComment || element instanceof GoPackageClause) {\n        return false;\n      }\n      return element instanceof GoFile || element.getParent() instanceof GoFile && !(element instanceof GoTopLevelDeclaration);\n    }\n  }\n\n  public static class Type extends GoLiveTemplateContextType {\n    protected Type() {\n      super(\"GO_TYPE\", \"Type\", GoEverywhereContextType.class);\n    }\n\n    @Override\n    protected boolean isInContext(@NotNull PsiElement element) {\n      return element instanceof GoType;\n    }\n  }\n\n  public static class Block extends GoLiveTemplateContextType {\n    protected Block() {\n      super(\"GO_BLOCK\", \"Block\", GoEverywhereContextType.class);\n    }\n\n    @Override\n    protected boolean isInContext(@NotNull PsiElement element) {\n      return (element instanceof GoLeftHandExprList || element instanceof GoSimpleStatement) &&\n             PsiTreeUtil.getParentOfType(element, GoBlock.class) != null;\n    }\n  }\n\n  public static class Expression extends GoLiveTemplateContextType {\n    protected Expression() {\n      super(\"GO_EXPRESSION\", \"Expression\", GoEverywhereContextType.class);\n    }\n\n    @Override\n    protected boolean isInContext(@NotNull PsiElement element) {\n      return element instanceof GoExpression;\n    }\n  }\n\n  public static class Tag extends GoLiveTemplateContextType {\n    protected Tag() {\n      super(\"GO_TAG\", \"Tag\", GoEverywhereContextType.class);\n    }\n\n    @Override\n    protected boolean isInContext(@NotNull PsiElement element) {\n      if (element.getNode().getElementType() == GoTypes.IDENTIFIER) {\n        if (isInsideFieldTypeDeclaration(element)) {\n          return true;\n        }\n        if (isInsideFieldTypeDeclaration(prevVisibleLeafOrNewLine(element))) {\n          return true;\n        }\n      }\n      return false;\n    }\n\n    private static boolean isInsideFieldTypeDeclaration(@Nullable PsiElement element) {\n      if (element != null) {\n        PsiElement parent = element.getParent();\n        if (parent instanceof GoTypeReferenceExpression) {\n          return PsiTreeUtil.skipParentsOfType(parent, GoType.class) instanceof GoFieldDeclaration;\n        }\n      }\n      return false;\n    }\n\n    @Override\n    protected boolean acceptLeaf() {\n      return true;\n    }\n  }\n\n  public static class TagLiteral extends GoLiveTemplateContextType {\n    protected TagLiteral() {\n      super(\"GO_TAG_LITERAL\", \"Tag literal\", GoEverywhereContextType.class);\n    }\n\n    @Override\n    protected boolean isInContext(@NotNull PsiElement element) {\n      return element instanceof GoStringLiteral && element.getParent() instanceof GoTag;\n    }\n  }\n\n  public static class Statement extends GoLiveTemplateContextType {\n    protected Statement() {\n      super(\"GO_STATEMENT\", \"Statement\", GoEverywhereContextType.class);\n    }\n\n    public static boolean onStatementBeginning(@NotNull PsiElement psiElement) {\n      PsiElement prevLeaf = prevVisibleLeafOrNewLine(psiElement);\n      if (prevLeaf == null) {\n        return false;\n      }\n      if (prevLeaf instanceof PsiWhiteSpace) {\n        return true;\n      }\n      IElementType type = prevLeaf.getNode().getElementType();\n      return type == GoTypes.SEMICOLON || type == GoTypes.LBRACE || type == GoTypes.RBRACE || type == GoTypes.COLON;\n    }\n\n    @Override\n    protected boolean isInContext(@NotNull PsiElement element) {\n      if (element instanceof PsiComment) {\n        return false;\n      }\n\n      PsiElement parent = element.getParent();\n      if (parent instanceof PsiErrorElement || parent instanceof GoExpression) {\n        parent = parent.getParent();\n      }\n      return (parent instanceof GoStatement || parent instanceof GoLeftHandExprList || parent instanceof GoBlock) \n             && onStatementBeginning(element);\n    }\n\n    @Override\n    protected boolean acceptLeaf() {\n      return true;\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/template/GoLiveTemplatesProvider.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.template;\n\nimport com.intellij.codeInsight.template.impl.DefaultLiveTemplatesProvider;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoLiveTemplatesProvider implements DefaultLiveTemplatesProvider {\n  @NotNull\n  @Override\n  public String[] getDefaultLiveTemplateFiles() {\n    return new String[]{\"/liveTemplates/go\", \"/liveTemplates/goTags\"};\n  }\n\n  @Nullable\n  @Override\n  public String[] getHiddenLiveTemplateFiles() {\n    return new String[]{\"/liveTemplates/goHidden\"};\n  }\n}\n"
  },
  {
    "path": "src/com/goide/tree/ExportabilityComparator.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.tree;\n\nimport com.goide.psi.GoNamedElement;\nimport com.intellij.psi.PsiElement;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.Comparator;\n\npublic class ExportabilityComparator implements Comparator {\n  public static final Comparator INSTANCE = new ExportabilityComparator();\n\n  @Override\n  public int compare(@NotNull Object descriptor1, @NotNull Object descriptor2) {\n    int accessLevel1 = getAccessLevel(descriptor1);\n    int accessLevel2 = getAccessLevel(descriptor2);\n    return accessLevel2 - accessLevel1;\n  }\n\n  private static int getAccessLevel(@NotNull Object element) {\n    if (element instanceof GoStructureViewFactory.Element) {\n      PsiElement value = ((GoStructureViewFactory.Element)element).getValue();\n      if (value instanceof GoNamedElement && ((GoNamedElement)value).isPublic()) return 1;\n    }\n    return -1;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/tree/ExportabilitySorter.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.tree;\n\nimport com.intellij.icons.AllIcons;\nimport com.intellij.ide.util.treeView.smartTree.ActionPresentation;\nimport com.intellij.ide.util.treeView.smartTree.Sorter;\nimport org.jetbrains.annotations.NonNls;\nimport org.jetbrains.annotations.NotNull;\n\nimport javax.swing.*;\nimport java.util.Comparator;\n\npublic class ExportabilitySorter implements Sorter {\n\n  public static final Sorter INSTANCE = new ExportabilitySorter();\n\n  private static final ActionPresentation PRESENTATION = new ActionPresentation() {\n    @Override\n    @NotNull\n    public String getText() {\n      return \"Sort by Exportability\";\n    }\n\n    @Override\n    public String getDescription() {\n      return null;\n    }\n\n    @Override\n    public Icon getIcon() {\n      return AllIcons.ObjectBrowser.VisibilitySort;\n    }\n  };\n  @NonNls private static final String ID = \"EXPORTABILITY_SORTER\";\n\n  @Override\n  @NotNull\n  public Comparator getComparator() {\n    return ExportabilityComparator.INSTANCE;\n  }\n\n  @Override\n  public boolean isVisible() {\n    return true;\n  }\n\n  @Override\n  @NotNull\n  public ActionPresentation getPresentation() {\n    return PRESENTATION;\n  }\n\n  @Override\n  @NotNull\n  public String getName() {\n    return ID;\n  }\n}"
  },
  {
    "path": "src/com/goide/tree/GoPrivateMembersFilter.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.tree;\n\nimport com.goide.psi.GoNamedElement;\nimport com.intellij.ide.util.treeView.smartTree.ActionPresentation;\nimport com.intellij.ide.util.treeView.smartTree.ActionPresentationData;\nimport com.intellij.ide.util.treeView.smartTree.Filter;\nimport com.intellij.ide.util.treeView.smartTree.TreeElement;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.util.PlatformIcons;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoPrivateMembersFilter implements Filter {\n  private final static String PRIVATE_MEMBERS_FILTER_TEXT = \"Show Private Members\";\n\n  @Override\n  public boolean isVisible(TreeElement treeNode) {\n    if (treeNode instanceof GoStructureViewFactory.Element) {\n      PsiElement psiElement = ((GoStructureViewFactory.Element)treeNode).getValue();\n      return !(psiElement instanceof GoNamedElement) || ((GoNamedElement)psiElement).isPublic();\n    }\n    return true;\n  }\n\n  @Override\n  public boolean isReverted() {\n    return true;\n  }\n\n  @NotNull\n  @Override\n  public ActionPresentation getPresentation() {\n    return new ActionPresentationData(PRIVATE_MEMBERS_FILTER_TEXT, null, PlatformIcons.PRIVATE_ICON);\n  }\n\n  @NotNull\n  @Override\n  public String getName() {\n    return PRIVATE_MEMBERS_FILTER_TEXT;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/tree/GoStructureViewFactory.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.tree;\n\nimport com.goide.GoIcons;\nimport com.goide.psi.*;\nimport com.goide.psi.impl.GoPsiImplUtil;\nimport com.goide.sdk.GoPackageUtil;\nimport com.intellij.ide.structureView.*;\nimport com.intellij.ide.structureView.impl.common.PsiTreeElementBase;\nimport com.intellij.ide.util.ActionShortcutProvider;\nimport com.intellij.ide.util.FileStructureNodeProvider;\nimport com.intellij.ide.util.treeView.smartTree.*;\nimport com.intellij.lang.PsiStructureViewFactory;\nimport com.intellij.openapi.actionSystem.Shortcut;\nimport com.intellij.openapi.diagnostic.Logger;\nimport com.intellij.openapi.editor.Editor;\nimport com.intellij.openapi.project.IndexNotReadyException;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.StubBasedPsiElement;\nimport com.intellij.psi.SyntaxTraverser;\nimport com.intellij.psi.stubs.StubElement;\nimport com.intellij.util.IncorrectOperationException;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.Collection;\nimport java.util.Collections;\nimport java.util.List;\n\npublic class GoStructureViewFactory implements PsiStructureViewFactory {\n  @Nullable\n  @Override\n  public StructureViewBuilder getStructureViewBuilder(@NotNull PsiFile psiFile) {\n    return new TreeBasedStructureViewBuilder() {\n      @NotNull\n      @Override\n      public StructureViewModel createStructureViewModel(@Nullable Editor editor) {\n        return new Model(psiFile, editor);\n      }\n\n      @Override\n      public boolean isRootNodeShown() {\n        return false;\n      }\n    };\n  }\n\n  public static class Model extends StructureViewModelBase implements StructureViewModel.ElementInfoProvider {\n    private static final List<NodeProvider> PROVIDERS =\n      ContainerUtil.newSmartList(new TreeElementFileStructureNodeProvider());\n\n    Model(@NotNull PsiFile file, @Nullable Editor editor) {\n      super(file, editor, new Element(file));\n      withSuitableClasses(GoFile.class, GoNamedElement.class)\n        .withSorters(ExportabilitySorter.INSTANCE, Sorter.ALPHA_SORTER);\n    }\n\n    @NotNull\n    @Override\n    public Filter[] getFilters() {\n      return new Filter[]{new GoPrivateMembersFilter()};\n    }\n\n    @Override\n    public boolean isAlwaysShowsPlus(StructureViewTreeElement structureViewTreeElement) {\n      return false;\n    }\n\n    @Override\n    public boolean isAlwaysLeaf(StructureViewTreeElement structureViewTreeElement) {\n      return false;\n    }\n\n    @NotNull\n    @Override\n    public Collection<NodeProvider> getNodeProviders() {\n      return PROVIDERS;\n    }\n\n    private static class TreeElementFileStructureNodeProvider implements FileStructureNodeProvider<TreeElement>, ActionShortcutProvider {\n      public static final String ID = \"Show package structure\";\n\n      @NotNull\n      @Override\n      public ActionPresentation getPresentation() {\n        return new ActionPresentationData(ID, null, GoIcons.PACKAGE);\n      }\n\n      @NotNull\n      @Override\n      public String getName() {\n        return ID;\n      }\n\n      @NotNull\n      @Override\n      public Collection<TreeElement> provideNodes(@NotNull TreeElement node) {\n        PsiElement psi = node instanceof Element ? ((Element)node).getElement() : null;\n        if (psi instanceof GoFile) {\n          GoFile orig = (GoFile)psi;\n          List<TreeElement> result = ContainerUtil.newSmartList();\n          for (GoFile f : GoPackageUtil.getAllPackageFiles(orig)) {\n            if (f != orig) {\n              ContainerUtil.addAll(result, new Element(f).getChildren());\n            }\n          }\n          return result;\n        }\n        return Collections.emptyList();\n      }\n\n      @NotNull\n      @Override\n      public String getCheckBoxText() {\n        return ID;\n      }\n\n      @NotNull\n      @Override\n      public Shortcut[] getShortcut() {\n        throw new IncorrectOperationException(\"see getActionIdForShortcut()\");\n      }\n\n      @NotNull\n      @Override\n      public String getActionIdForShortcut() {\n        return \"FileStructurePopup\";\n      }\n    }\n  }\n\n  public static class Element extends PsiTreeElementBase<PsiElement> {\n    public Element(@NotNull PsiElement e) {\n      super(e);\n    }\n\n    @NotNull\n    @Override\n    public Collection<StructureViewTreeElement> getChildrenBase() {\n      List<StructureViewTreeElement> result = ContainerUtil.newArrayList();\n      PsiElement element = getElement();\n      if (element instanceof GoFile) {\n        for (GoTypeSpec o : ((GoFile)element).getTypes()) result.add(new Element(o));\n        for (GoConstDefinition o : ((GoFile)element).getConstants()) result.add(new Element(o));\n        for (GoVarDefinition o : ((GoFile)element).getVars()) result.add(new Element(o));\n        for (GoFunctionDeclaration o : ((GoFile)element).getFunctions()) result.add(new Element(o));\n        for (GoMethodDeclaration o : ((GoFile)element).getMethods()) {\n          GoType type = o.getReceiverType();\n          GoTypeReferenceExpression e = GoPsiImplUtil.getTypeReference(type);\n          PsiElement resolve = e != null ? e.resolve() : null;\n          if (resolve == null) {\n            result.add(new Element(o));\n          }\n        }\n      }\n      else if (element instanceof GoTypeSpec) {\n        GoTypeSpec typeSpec = (GoTypeSpec)element;\n        GoType type = typeSpec.getSpecType().getType();\n        for (GoMethodDeclaration m : typeSpec.getMethods()) result.add(new Element(m));\n        if (type instanceof GoStructType) {\n          for (GoFieldDeclaration field : ((GoStructType)type).getFieldDeclarationList()) {\n            for (GoFieldDefinition definition : field.getFieldDefinitionList()) result.add(new Element(definition));\n            GoAnonymousFieldDefinition anon = field.getAnonymousFieldDefinition();\n            if (anon != null) result.add(new Element(anon));\n          }\n        }\n        else if (type instanceof GoInterfaceType) {\n          for (GoMethodSpec m : ((GoInterfaceType)type).getMethodSpecList()) result.add(new Element(m));\n        }\n      }\n      else if (element instanceof GoFunctionOrMethodDeclaration) {\n        StubElement<?> stub = ((StubBasedPsiElement)element).getStub();\n        Iterable<GoTypeSpec> list =\n          stub != null\n          ? GoPsiTreeUtil.getStubChildrenOfTypeAsList(element, GoTypeSpec.class)\n          : SyntaxTraverser.psiTraverser(((GoFunctionOrMethodDeclaration)element).getBlock()).filter(GoTypeSpec.class);\n        for (GoTypeSpec s : list) {\n          result.add(new Element(s));\n        }\n      }\n      return result;\n    }\n\n    @Nullable\n    @Override\n    public String getPresentableText() {\n      String textInner = getPresentationTextInner();\n      return textInner != null ? textInner.replaceAll(\"\\\\(\\\\n\", \"(\").replaceAll(\"\\\\n\\\\)\", \")\") : null;\n    }\n\n    @Nullable\n    private String getPresentationTextInner() {\n      PsiElement element = getElement();\n      if (element == null) {\n        return null;\n      }\n      String separator = \": \";\n      if (element instanceof GoFile) {\n        return ((GoFile)element).getName();\n      }\n      if (element instanceof GoNamedSignatureOwner) {\n        GoSignature signature = ((GoNamedSignatureOwner)element).getSignature();\n        String signatureText = signature != null ? signature.getText() : \"\";\n        String name = ((GoNamedSignatureOwner)element).getName();\n        return StringUtil.notNullize(name) + signatureText;\n      }\n      if (element instanceof GoTypeSpec) {\n        GoType type = ((GoTypeSpec)element).getSpecType().getType();\n        String appendix = type instanceof GoStructType || type instanceof GoInterfaceType ?\n                          \"\" :\n                          separator + GoPsiImplUtil.getText(type);\n        return ((GoTypeSpec)element).getName() + appendix;\n      }\n      if (element instanceof GoNamedElement) {\n        GoType type = null;\n        try {\n          type = ((GoNamedElement)element).getGoType(null);\n        }\n        catch (IndexNotReadyException ignored) {\n        }\n        String typeText = type == null || element instanceof GoAnonymousFieldDefinition ? \"\" : separator + GoPsiImplUtil.getText(type);\n        return ((GoNamedElement)element).getName() + typeText;\n      }\n      Logger.getInstance(GoStructureViewFactory.class).error(\"Cannot get presentation for \" + element.getClass().getName());\n      return null;\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/ui/ProjectTutorialNotification.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.ui;\n\nimport com.goide.GoConstants;\nimport com.intellij.ide.util.PropertiesComponent;\nimport com.intellij.notification.NotificationListener;\nimport com.intellij.notification.NotificationType;\nimport com.intellij.notification.Notifications;\nimport com.intellij.openapi.components.ApplicationComponent;\nimport org.jetbrains.annotations.NotNull;\n\n\npublic class ProjectTutorialNotification implements ApplicationComponent {\n\n  private static final String GO_PROJECT_TUTORIAL_NOTIFICATION_SHOWN = \"go.tutorial.project.notification.shown\";\n\n  @Override\n  public void initComponent() {\n    PropertiesComponent propertiesComponent = PropertiesComponent.getInstance();\n    boolean wasDisplayed;\n    //noinspection SynchronizationOnLocalVariableOrMethodParameter\n    synchronized (propertiesComponent) {\n      wasDisplayed = propertiesComponent.getBoolean(GO_PROJECT_TUTORIAL_NOTIFICATION_SHOWN, false);\n      propertiesComponent.setValue(GO_PROJECT_TUTORIAL_NOTIFICATION_SHOWN, true);\n    }\n\n    if (wasDisplayed) return;\n\n    Notifications.Bus.notify(GoConstants.GO_NOTIFICATION_GROUP.createNotification(\"Learn how to setup a new Go project\",\n      \"Please visit our \" +\n      \"<a href=\\\"https://github.com/go-lang-plugin-org/go-lang-idea-plugin/wiki/v1.0.0-Setup-initial-project\\\">wiki page<a/>\" +\n      \" to learn how to setup a new Go project\",\n      NotificationType.INFORMATION,\n      NotificationListener.URL_OPENING_LISTENER));\n  }\n\n  @Override\n  public void disposeComponent() {\n\n  }\n\n  @NotNull\n  @Override\n  public String getComponentName() {\n    return getClass().getName();\n  }\n}"
  },
  {
    "path": "src/com/goide/usages/GoFileStructureGroupRuleProvider.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.usages;\n\nimport com.goide.psi.GoFunctionOrMethodDeclaration;\nimport com.goide.psi.GoNamedElement;\nimport com.goide.psi.GoTypeSpec;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport com.intellij.usages.PsiElementUsageGroupBase;\nimport com.intellij.usages.impl.FileStructureGroupRuleProvider;\nimport com.intellij.usages.rules.PsiElementUsage;\nimport com.intellij.usages.rules.UsageGroupingRule;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoFileStructureGroupRuleProvider implements FileStructureGroupRuleProvider {\n  public static final UsageGroupingRule USAGE_GROUPING_RULE = usage -> {\n    PsiElement psiElement = usage instanceof PsiElementUsage ? ((PsiElementUsage)usage).getElement() : null;\n    GoNamedElement topmostElement = PsiTreeUtil.getParentOfType(psiElement, GoTypeSpec.class, GoFunctionOrMethodDeclaration.class);\n    if (topmostElement != null) {\n      return new PsiElementUsageGroupBase<>(topmostElement);\n    }\n    return null;\n  };\n\n  @Nullable\n  @Override\n  public UsageGroupingRule getUsageGroupingRule(Project project) {\n    return USAGE_GROUPING_RULE;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/usages/GoFindUsagesProvider.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.usages;\n\nimport com.goide.GoParserDefinition;\nimport com.goide.GoTypes;\nimport com.goide.lexer.GoLexer;\nimport com.goide.psi.*;\nimport com.intellij.lang.HelpID;\nimport com.intellij.lang.cacheBuilder.DefaultWordsScanner;\nimport com.intellij.lang.cacheBuilder.WordsScanner;\nimport com.intellij.lang.findUsages.FindUsagesProvider;\nimport com.intellij.psi.ElementDescriptionUtil;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.tree.TokenSet;\nimport com.intellij.usageView.UsageViewLongNameLocation;\nimport com.intellij.usageView.UsageViewShortNameLocation;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoFindUsagesProvider implements FindUsagesProvider {\n  @Nullable\n  @Override\n  public WordsScanner getWordsScanner() {\n    return new DefaultWordsScanner(new GoLexer(), TokenSet.create(GoTypes.IDENTIFIER),\n                                   GoParserDefinition.COMMENTS, GoParserDefinition.STRING_LITERALS);\n  }\n\n  @Override\n  public boolean canFindUsagesFor(@NotNull PsiElement element) {\n    if (element instanceof GoImportSpec) {\n      GoImportSpec importSpec = (GoImportSpec)element;\n      return importSpec.getAlias() != null && !importSpec.isDot() && !importSpec.isForSideEffects();\n    }\n    return element instanceof GoNamedElement;\n  }\n\n  @Nullable\n  @Override\n  public String getHelpId(@NotNull PsiElement psiElement) {\n    return HelpID.FIND_OTHER_USAGES;\n  }\n\n  @NotNull\n  @Override\n  public String getType(@NotNull PsiElement element) {\n    if (element instanceof GoMethodDeclaration) return \"method\";\n    if (element instanceof GoFunctionDeclaration) return \"function\";\n    if (element instanceof GoConstDefinition || element instanceof GoConstDeclaration) return \"constant\";\n    if (element instanceof GoVarDefinition || element instanceof GoVarDeclaration) return \"variable\";\n    if (element instanceof GoParamDefinition) return \"parameter\";\n    if (element instanceof GoFieldDefinition) return \"field\";\n    if (element instanceof GoAnonymousFieldDefinition) return \"anonymous field\";\n    if (element instanceof GoTypeSpec || element instanceof GoTypeDeclaration) return \"type\";\n    if (element instanceof GoImportDeclaration) return \"import\";\n    if (element instanceof GoImportSpec) return \"import alias\";\n    if (element instanceof GoReceiver) return \"receiver\";\n    if (element instanceof GoMethodSpec) return \"method specification\";\n    if (element instanceof GoLabelDefinition) return \"label\";\n    if (element instanceof GoPackageClause) return \"package statement\";\n\n    // should be last\n    if (element instanceof GoStatement) return \"statement\";\n    if (element instanceof GoTopLevelDeclaration) return \"declaration\";\n    if (element instanceof GoCommClause || element instanceof GoCaseClause) return \"case\";\n    return \"\";\n  }\n\n  @NotNull\n  @Override\n  public String getDescriptiveName(@NotNull PsiElement element) {\n    return ElementDescriptionUtil.getElementDescription(element, UsageViewLongNameLocation.INSTANCE);\n  }\n\n  @NotNull\n  @Override\n  public String getNodeText(@NotNull PsiElement element, boolean useFullName) {\n    return ElementDescriptionUtil.getElementDescription(element, UsageViewShortNameLocation.INSTANCE);\n  }\n}"
  },
  {
    "path": "src/com/goide/usages/GoReadWriteAccessDetector.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.usages;\n\nimport com.goide.psi.*;\nimport com.intellij.codeInsight.highlighting.ReadWriteAccessDetector;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiReference;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoReadWriteAccessDetector extends ReadWriteAccessDetector {\n  @Override\n  public boolean isReadWriteAccessible(@Nullable PsiElement e) {\n    return e instanceof GoVarDefinition ||\n           e instanceof GoConstDefinition ||\n           e instanceof GoParamDefinition ||\n           e instanceof GoReceiver ||\n           e instanceof GoFieldDefinition;\n  }\n\n  @Override\n  public boolean isDeclarationWriteAccess(@Nullable PsiElement e) {\n    return e instanceof GoVarDefinition || e instanceof GoConstDefinition;\n  }\n\n  @NotNull\n  @Override\n  public Access getReferenceAccess(@Nullable PsiElement referencedElement, @NotNull PsiReference reference) {\n    return getExpressionAccess(reference.getElement());\n  }\n\n  @NotNull\n  @Override\n  public Access getExpressionAccess(@Nullable PsiElement e) {\n    if (e instanceof GoFieldName) {\n      return e.getParent() instanceof GoKey ? Access.Write : Access.Read;\n    }\n    GoReferenceExpression referenceExpression = PsiTreeUtil.getNonStrictParentOfType(e, GoReferenceExpression.class);\n    return referenceExpression != null ? referenceExpression.getReadWriteAccess() : Access.Read;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/util/GoBuildMatcher.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.util;\n\nimport com.goide.GoConstants;\nimport com.goide.psi.GoFile;\nimport com.goide.sdk.GoSdkUtil;\nimport com.intellij.openapi.util.io.FileUtil;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.util.ThreeState;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.List;\nimport java.util.regex.Pattern;\n\n/**\n * @see \"$GOROOT/src/go/build/build.go\" and relevant functions\n */\npublic class GoBuildMatcher {\n  private static final Pattern WHITESPACES = Pattern.compile(\"\\\\s+\");\n\n  @NotNull private final GoTargetSystem myTarget;\n\n  public GoBuildMatcher(@NotNull GoTargetSystem target) {\n    myTarget = target;\n  }\n\n  public boolean matchFile(@NotNull PsiFile file) {\n    return matchFile(file, true);\n  }\n\n  /**\n   * @param checkBuildFlags should be false for directly used files: go run gen.go\n   */\n  private boolean matchFile(@NotNull PsiFile file, boolean checkBuildFlags) {\n    if (!(file instanceof GoFile)) {\n      // TODO support .c, .cpp and other\n      return false;\n    }\n    if (((GoFile)file).hasCPathImport() && myTarget.cgoEnabled != ThreeState.YES) return false;\n\n    return match(file.getName(), ((GoFile)file).getBuildFlags(), checkBuildFlags);\n  }\n\n  private boolean match(@NotNull String fileName, @Nullable String buildFlags, boolean checkBuildFlags) {\n    if (!matchFileName(fileName)) return false;\n\n    if (!checkBuildFlags || buildFlags == null) return true;\n    for (String line : StringUtil.split(buildFlags, \"|\")) {\n      if (!matchBuildFlagsLine(line)) return false;\n    }\n    return true;\n  }\n\n  private boolean matchBuildFlagsLine(@NotNull String line) {\n    for (String tag : WHITESPACES.split(line)) {\n      if (matchBuildFlag(tag)) return true;\n    }\n    return false;\n  }\n\n  public boolean matchBuildFlag(@NotNull String name) {\n    if (name.isEmpty()) return false;\n\n    if (StringUtil.containsChar(name, ',')) { // comma separated list\n      for (String tag : StringUtil.split(name, \",\")) {\n        if (!matchBuildFlag(tag)) {\n          return false;\n        }\n      }\n      return true;\n    }\n\n    // bad syntax, reject always\n    if (name.startsWith(\"!!\")) return false;\n\n    // negation\n    if (name.startsWith(\"!\")) return !matchBuildFlag(name.substring(1));\n\n    if (matchOS(name)) return true;\n    if (GoConstants.KNOWN_COMPILERS.contains(name)) {\n      return myTarget.compiler == null || name.equals(myTarget.compiler);\n    }\n    if (GoConstants.KNOWN_VERSIONS.contains(name)) {\n      return myTarget.goVersion == null || GoSdkUtil.compareVersions(myTarget.goVersion, StringUtil.trimStart(name, \"go\")) >= 0;\n    }\n    if (\"cgo\".equals(name)) {\n      return myTarget.cgoEnabled == ThreeState.YES;\n    }\n    return myTarget.supportsFlag(name);\n  }\n\n  public boolean matchFileName(@NotNull String fileName) {\n    String name = StringUtil.substringAfter(fileName, \"_\");\n    if (StringUtil.isEmpty(name)) {\n      return true;\n    }\n\n    name = StringUtil.trimEnd(FileUtil.getNameWithoutExtension(name), GoConstants.TEST_SUFFIX);\n\n    List<String> parts = StringUtil.split(name, \"_\");\n    int n = parts.size();\n\n    if (n >= 2 && GoConstants.KNOWN_OS.contains(parts.get(n - 2)) && GoConstants.KNOWN_ARCH.contains(parts.get(n - 1))) {\n      if (!myTarget.arch.equals(parts.get(n - 1))) {\n        return false;\n      }\n\n      return matchOS(parts.get(n - 2));\n    }\n\n    if (n >= 1) {\n      if (GoConstants.KNOWN_OS.contains(parts.get(n - 1))) {\n        return matchOS(parts.get(n - 1));\n      }\n\n      if (GoConstants.KNOWN_ARCH.contains(parts.get(n - 1))) {\n        return myTarget.arch.equals(parts.get(n - 1));\n      }\n    }\n\n    return true;\n  }\n\n  private boolean matchOS(@NotNull String name) {\n    if (myTarget.os.equals(name) || myTarget.arch.equals(name)) {\n      return true;\n    }\n\n    return GoConstants.LINUX_OS.equals(name) && GoConstants.ANDROID_OS.equals(myTarget.os);\n  }\n}"
  },
  {
    "path": "src/com/goide/util/GoExecutor.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.util;\n\nimport com.goide.GoConstants;\nimport com.goide.project.GoModuleSettings;\nimport com.goide.runconfig.GoConsoleFilter;\nimport com.goide.runconfig.GoRunUtil;\nimport com.goide.sdk.GoSdkService;\nimport com.goide.sdk.GoSdkUtil;\nimport com.intellij.execution.ExecutionException;\nimport com.intellij.execution.ExecutionHelper;\nimport com.intellij.execution.ExecutionModes;\nimport com.intellij.execution.RunContentExecutor;\nimport com.intellij.execution.configurations.GeneralCommandLine;\nimport com.intellij.execution.configurations.ParametersList;\nimport com.intellij.execution.configurations.PtyCommandLine;\nimport com.intellij.execution.process.*;\nimport com.intellij.notification.NotificationType;\nimport com.intellij.notification.Notifications;\nimport com.intellij.openapi.application.ApplicationManager;\nimport com.intellij.openapi.diagnostic.Logger;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.progress.ProgressIndicator;\nimport com.intellij.openapi.progress.ProgressManager;\nimport com.intellij.openapi.progress.Task;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.Disposer;\nimport com.intellij.openapi.util.Ref;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.openapi.vfs.CharsetToolkit;\nimport com.intellij.openapi.vfs.VfsUtilCore;\nimport com.intellij.util.Consumer;\nimport com.intellij.util.EnvironmentUtil;\nimport com.intellij.util.ObjectUtils;\nimport com.intellij.util.ThreeState;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.io.File;\nimport java.util.Collection;\nimport java.util.Collections;\nimport java.util.Map;\n\npublic class GoExecutor {\n  private static final Logger LOGGER = Logger.getInstance(GoExecutor.class);\n  @NotNull private final Map<String, String> myExtraEnvironment = ContainerUtil.newHashMap();\n  @NotNull private final ParametersList myParameterList = new ParametersList();\n  @NotNull private final ProcessOutput myProcessOutput = new ProcessOutput();\n  @NotNull private final Project myProject;\n  @Nullable private Boolean myVendoringEnabled;\n  @Nullable private final Module myModule;\n  @Nullable private String myGoRoot;\n  @Nullable private String myGoPath;\n  @Nullable private String myEnvPath;\n  @Nullable private String myWorkDirectory;\n  private boolean myShowOutputOnError;\n  private boolean myShowNotificationsOnError;\n  private boolean myShowNotificationsOnSuccess;\n  private boolean myShowGoEnvVariables = true;\n  private GeneralCommandLine.ParentEnvironmentType myParentEnvironmentType = GeneralCommandLine.ParentEnvironmentType.CONSOLE;\n  private boolean myPtyDisabled;\n  @Nullable private String myExePath;\n  @Nullable private String myPresentableName;\n  private OSProcessHandler myProcessHandler;\n  private final Collection<ProcessListener> myProcessListeners = ContainerUtil.newArrayList();\n\n  private GoExecutor(@NotNull Project project, @Nullable Module module) {\n    myProject = project;\n    myModule = module;\n  }\n\n  public static GoExecutor in(@NotNull Project project, @Nullable Module module) {\n    return module != null ? in(module) : in(project);\n  }\n\n  @NotNull\n  private static GoExecutor in(@NotNull Project project) {\n    return new GoExecutor(project, null)\n      .withGoRoot(GoSdkService.getInstance(project).getSdkHomePath(null))\n      .withGoPath(GoSdkUtil.retrieveGoPath(project, null))\n      .withGoPath(GoSdkUtil.retrieveEnvironmentPathForGo(project, null));\n  }\n\n  @NotNull\n  public static GoExecutor in(@NotNull Module module) {\n    Project project = module.getProject();\n    ThreeState vendoringEnabled = GoModuleSettings.getInstance(module).getVendoringEnabled();\n    return new GoExecutor(project, module)\n      .withGoRoot(GoSdkService.getInstance(project).getSdkHomePath(module))\n      .withGoPath(GoSdkUtil.retrieveGoPath(project, module))\n      .withEnvPath(GoSdkUtil.retrieveEnvironmentPathForGo(project, module))\n      .withVendoring(vendoringEnabled != ThreeState.UNSURE ? vendoringEnabled.toBoolean() : null);\n  }\n\n  @NotNull\n  public GoExecutor withPresentableName(@Nullable String presentableName) {\n    myPresentableName = presentableName;\n    return this;\n  }\n\n  @NotNull\n  public GoExecutor withExePath(@Nullable String exePath) {\n    myExePath = exePath;\n    return this;\n  }\n\n  @NotNull\n  public GoExecutor withWorkDirectory(@Nullable String workDirectory) {\n    myWorkDirectory = workDirectory;\n    return this;\n  }\n\n  @NotNull\n  public GoExecutor withGoRoot(@Nullable String goRoot) {\n    myGoRoot = goRoot;\n    return this;\n  }\n\n  @NotNull\n  public GoExecutor withGoPath(@Nullable String goPath) {\n    myGoPath = goPath;\n    return this;\n  }\n\n  @NotNull\n  public GoExecutor withEnvPath(@Nullable String envPath) {\n    myEnvPath = envPath;\n    return this;\n  }\n\n  @NotNull\n  public GoExecutor withVendoring(@Nullable Boolean enabled) {\n    myVendoringEnabled = enabled;\n    return this;\n  }\n\n  public GoExecutor withProcessListener(@NotNull ProcessListener listener) {\n    myProcessListeners.add(listener);\n    return this;\n  }\n\n  @NotNull\n  public GoExecutor withExtraEnvironment(@NotNull Map<String, String> environment) {\n    myExtraEnvironment.putAll(environment);\n    return this;\n  }\n\n  @NotNull\n  public GoExecutor withPassParentEnvironment(boolean passParentEnvironment) {\n    myParentEnvironmentType = passParentEnvironment ? GeneralCommandLine.ParentEnvironmentType.CONSOLE\n                                                    : GeneralCommandLine.ParentEnvironmentType.NONE;\n    return this;\n  }\n\n  @NotNull\n  public GoExecutor withParameterString(@NotNull String parameterString) {\n    myParameterList.addParametersString(parameterString);\n    return this;\n  }\n\n  @NotNull\n  public GoExecutor withParameters(@NotNull String... parameters) {\n    myParameterList.addAll(parameters);\n    return this;\n  }\n\n  public GoExecutor showGoEnvVariables(boolean show) {\n    myShowGoEnvVariables = show;\n    return this;\n  } \n\n  @NotNull\n  public GoExecutor showOutputOnError() {\n    myShowOutputOnError = true;\n    return this;\n  }\n\n  @NotNull\n  public GoExecutor disablePty() {\n    myPtyDisabled = true;\n    return this;\n  }\n\n  @NotNull\n  public GoExecutor showNotifications(boolean onError, boolean onSuccess) {\n    myShowNotificationsOnError = onError;\n    myShowNotificationsOnSuccess = onSuccess;\n    return this;\n  }\n\n  public boolean execute() {\n    Logger.getInstance(getClass()).assertTrue(!ApplicationManager.getApplication().isDispatchThread(),\n                                              \"It's bad idea to run external tool on EDT\");\n    Logger.getInstance(getClass()).assertTrue(myProcessHandler == null, \"Process has already run with this executor instance\");\n    Ref<Boolean> result = Ref.create(false);\n    GeneralCommandLine commandLine = null;\n    try {\n      commandLine = createCommandLine();\n      GeneralCommandLine finalCommandLine = commandLine;\n      myProcessHandler = new KillableColoredProcessHandler(finalCommandLine, true) {\n        @Override\n        public void startNotify() {\n          if (myShowGoEnvVariables) {\n            GoRunUtil.printGoEnvVariables(finalCommandLine, this);\n          }\n          super.startNotify();\n        }\n      };\n      GoHistoryProcessListener historyProcessListener = new GoHistoryProcessListener();\n      myProcessHandler.addProcessListener(historyProcessListener);\n      for (ProcessListener listener : myProcessListeners) {\n        myProcessHandler.addProcessListener(listener);\n      }\n\n      CapturingProcessAdapter processAdapter = new CapturingProcessAdapter(myProcessOutput) {\n        @Override\n        public void processTerminated(@NotNull ProcessEvent event) {\n          super.processTerminated(event);\n          boolean success = event.getExitCode() == 0 && myProcessOutput.getStderr().isEmpty();\n          boolean nothingToShow = myProcessOutput.getStdout().isEmpty() && myProcessOutput.getStderr().isEmpty();\n          boolean cancelledByUser = (event.getExitCode() == -1 || event.getExitCode() == 2) && nothingToShow;\n          result.set(success);\n          if (success) {\n            if (myShowNotificationsOnSuccess) {\n              showNotification(\"Finished successfully\", NotificationType.INFORMATION);\n            }\n          }\n          else if (cancelledByUser) {\n            if (myShowNotificationsOnError) {\n              showNotification(\"Interrupted\", NotificationType.WARNING);\n            }\n          }\n          else if (myShowOutputOnError) {\n            ApplicationManager.getApplication().invokeLater(() -> showOutput(myProcessHandler, historyProcessListener));\n          }\n        }\n      };\n\n      myProcessHandler.addProcessListener(processAdapter);\n      myProcessHandler.startNotify();\n      ExecutionModes.SameThreadMode sameThreadMode = new ExecutionModes.SameThreadMode(getPresentableName());\n      ExecutionHelper.executeExternalProcess(myProject, myProcessHandler, sameThreadMode, commandLine);\n\n      LOGGER.debug(\"Finished `\" + getPresentableName() + \"` with result: \" + result.get());\n      return result.get();\n    }\n    catch (ExecutionException e) {\n      if (myShowOutputOnError) {\n        ExecutionHelper.showErrors(myProject, Collections.singletonList(e), getPresentableName(), null);\n      }\n      if (myShowNotificationsOnError) {\n        showNotification(StringUtil.notNullize(e.getMessage(), \"Unknown error, see logs for details\"), NotificationType.ERROR);\n      }\n      String commandLineInfo = commandLine != null ? commandLine.getCommandLineString() : \"not constructed\";\n      LOGGER.debug(\"Finished `\" + getPresentableName() + \"` with an exception. Commandline: \" + commandLineInfo, e);\n      return false;\n    }\n  }\n\n  public void executeWithProgress(boolean modal) {\n    //noinspection unchecked\n    executeWithProgress(modal, Consumer.EMPTY_CONSUMER);\n  }\n\n  public void executeWithProgress(boolean modal, @NotNull Consumer<Boolean> consumer) {\n    ProgressManager.getInstance().run(new Task.Backgroundable(myProject, getPresentableName(), true) {\n      private boolean doNotStart;\n\n      @Override\n      public void onCancel() {\n        doNotStart = true;\n        ProcessHandler handler = getProcessHandler();\n        if (handler != null) {\n          handler.destroyProcess();\n        }\n      }\n\n      @Override\n      public boolean shouldStartInBackground() {\n        return !modal;\n      }\n\n      @Override\n      public boolean isConditionalModal() {\n        return modal;\n      }\n\n      @Override\n      public void run(@NotNull ProgressIndicator indicator) {\n        if (doNotStart || myProject == null || myProject.isDisposed()) {\n          return;\n        }\n        indicator.setIndeterminate(true);\n        consumer.consume(execute());\n      }\n    });\n  }\n\n  @Nullable\n  public ProcessHandler getProcessHandler() {\n    return myProcessHandler;\n  }\n\n  private void showNotification(@NotNull String message, NotificationType type) {\n    ApplicationManager.getApplication().invokeLater(() -> {\n      String title = getPresentableName();\n      Notifications.Bus.notify(GoConstants.GO_EXECUTION_NOTIFICATION_GROUP.createNotification(title, message, type, null), myProject);\n    });\n  }\n\n  private void showOutput(@NotNull OSProcessHandler originalHandler, @NotNull GoHistoryProcessListener historyProcessListener) {\n    if (myShowOutputOnError) {\n      BaseOSProcessHandler outputHandler = new KillableColoredProcessHandler(originalHandler.getProcess(), null);\n      RunContentExecutor runContentExecutor = new RunContentExecutor(myProject, outputHandler)\n        .withTitle(getPresentableName())\n        .withActivateToolWindow(myShowOutputOnError)\n        .withFilter(new GoConsoleFilter(myProject, myModule, myWorkDirectory != null ? VfsUtilCore.pathToUrl(myWorkDirectory) : null));\n      Disposer.register(myProject, runContentExecutor);\n      runContentExecutor.run();\n      historyProcessListener.apply(outputHandler);\n    }\n    if (myShowNotificationsOnError) {\n      showNotification(\"Failed to run\", NotificationType.ERROR);\n    }\n  }\n\n  @NotNull\n  public GeneralCommandLine createCommandLine() throws ExecutionException {\n    if (myGoRoot == null) {\n      throw new ExecutionException(\"Sdk is not set or Sdk home path is empty for module\");\n    }\n\n    GeneralCommandLine commandLine = !myPtyDisabled && PtyCommandLine.isEnabled() ? new PtyCommandLine() : new GeneralCommandLine();\n    commandLine.setExePath(ObjectUtils.notNull(myExePath, GoSdkService.getGoExecutablePath(myGoRoot)));\n    commandLine.getEnvironment().putAll(myExtraEnvironment);\n    commandLine.getEnvironment().put(GoConstants.GO_ROOT, StringUtil.notNullize(myGoRoot));\n    commandLine.getEnvironment().put(GoConstants.GO_PATH, StringUtil.notNullize(myGoPath));\n    if (myVendoringEnabled != null) {\n      commandLine.getEnvironment().put(GoConstants.GO_VENDORING_EXPERIMENT, myVendoringEnabled ? \"1\" : \"0\");\n    }\n\n    Collection<String> paths = ContainerUtil.newArrayList();\n    ContainerUtil.addIfNotNull(paths, StringUtil.nullize(commandLine.getEnvironment().get(GoConstants.PATH), true));\n    ContainerUtil.addIfNotNull(paths, StringUtil.nullize(EnvironmentUtil.getValue(GoConstants.PATH), true));\n    ContainerUtil.addIfNotNull(paths, StringUtil.nullize(myEnvPath, true));\n    commandLine.getEnvironment().put(GoConstants.PATH, StringUtil.join(paths, File.pathSeparator));\n\n    commandLine.withWorkDirectory(myWorkDirectory);\n    commandLine.addParameters(myParameterList.getList());\n    commandLine.withParentEnvironmentType(myParentEnvironmentType);\n    commandLine.withCharset(CharsetToolkit.UTF8_CHARSET);\n    return commandLine;\n  }\n\n  @NotNull\n  private String getPresentableName() {\n    return ObjectUtils.notNull(myPresentableName, \"go\");\n  }\n}\n"
  },
  {
    "path": "src/com/goide/util/GoHistoryProcessListener.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.util;\n\nimport com.intellij.execution.process.ProcessAdapter;\nimport com.intellij.execution.process.ProcessEvent;\nimport com.intellij.execution.process.ProcessHandler;\nimport com.intellij.openapi.util.Key;\nimport com.intellij.openapi.util.Pair;\n\nimport java.util.concurrent.ConcurrentLinkedQueue;\n\npublic class GoHistoryProcessListener extends ProcessAdapter {\n  private final ConcurrentLinkedQueue<Pair<ProcessEvent, Key>> myHistory = new ConcurrentLinkedQueue<>();\n\n  @Override\n  public void onTextAvailable(ProcessEvent event, Key outputType) {\n    myHistory.add(Pair.create(event, outputType));\n  }\n\n  public void apply(ProcessHandler listener) {\n    for (Pair<ProcessEvent, Key> pair : myHistory) {\n      listener.notifyTextAvailable(pair.getFirst().getText(), pair.getSecond());\n    }\n  }\n}\n"
  },
  {
    "path": "src/com/goide/util/GoPathResolveScope.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.util;\n\nimport com.goide.sdk.GoSdkService;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.search.GlobalSearchScope;\nimport com.intellij.util.ObjectUtils;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoPathResolveScope extends GlobalSearchScope {\n  @Nullable private final VirtualFile myReferenceFile;\n  @NotNull private final GoPathScopeHelper myScopeHelper;\n\n  public static GlobalSearchScope create(@NotNull Project project, @Nullable Module module, @Nullable PsiElement context) {\n    VirtualFile referenceFile = context != null ? context.getContainingFile().getVirtualFile() : null;\n    return new GoPathResolveScope(project, referenceFile, GoPathScopeHelper.fromReferenceFile(project, module, referenceFile));\n  }\n\n  private GoPathResolveScope(@NotNull Project project,\n                             @Nullable VirtualFile referenceFile,\n                             @NotNull GoPathScopeHelper scopeHelper) {\n    super(project);\n    myScopeHelper = scopeHelper;\n    myReferenceFile = referenceFile;\n  }\n\n  @Override\n  public boolean contains(@NotNull VirtualFile declarationFile) {\n    VirtualFile declarationDirectory = declarationFile.isDirectory() ? declarationFile : declarationFile.getParent();\n    if (declarationDirectory == null) {\n      return false;\n    }\n    if (myReferenceFile != null && declarationDirectory.equals(myReferenceFile.getParent())) {\n      return true;\n    }\n    return myScopeHelper.couldBeReferenced(declarationFile, myReferenceFile);\n  }\n\n\n  @Override\n  public int compare(@NotNull VirtualFile file1, @NotNull VirtualFile file2) {\n    return 0;\n  }\n\n  @Override\n  public boolean isSearchInModuleContent(@NotNull Module aModule) {\n    return GoSdkService.getInstance(ObjectUtils.assertNotNull(getProject())).isGoModule(aModule);\n  }\n\n  @Override\n  public boolean isSearchInLibraries() {\n    return true;\n  }\n}"
  },
  {
    "path": "src/com/goide/util/GoPathScopeHelper.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.util;\n\nimport com.goide.GoConstants;\nimport com.goide.project.GoVendoringUtil;\nimport com.goide.psi.impl.GoPsiImplUtil;\nimport com.goide.sdk.GoSdkService;\nimport com.goide.sdk.GoSdkUtil;\nimport com.intellij.openapi.application.ApplicationManager;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.vfs.VfsUtilCore;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.Collection;\nimport java.util.Set;\n\npublic class GoPathScopeHelper {\n  @NotNull\n  private final Set<VirtualFile> myRoots;\n  @Nullable\n  private final VirtualFile mySdkHome;\n  private final boolean mySupportsInternalPackages;\n  private final boolean mySupportsSdkInternalPackages;\n  private final boolean myVendoringEnabled;\n\n  public static GoPathScopeHelper fromReferenceFile(@NotNull Project project,\n                                                    @Nullable Module module,\n                                                    @Nullable VirtualFile referenceFile) {\n    VirtualFile sdkHome = GoSdkUtil.getSdkSrcDir(project, module);\n    String sdkVersion = GoSdkService.getInstance(project).getSdkVersion(module);\n    boolean supportsInternalPackages = GoVendoringUtil.supportsInternalPackages(sdkVersion);\n    boolean supportsSdkInternalPackages = GoVendoringUtil.supportsSdkInternalPackages(sdkVersion);\n    boolean vendoringEnabled = GoVendoringUtil.isVendoringEnabled(module);\n    Set<VirtualFile> sourceRoots = vendoringEnabled ? GoSdkUtil.getVendoringAwareSourcesPathsToLookup(project, module, referenceFile)\n                                                    : GoSdkUtil.getSourcesPathsToLookup(project, module);\n    return new GoPathScopeHelper(sourceRoots, sdkHome, supportsInternalPackages, supportsSdkInternalPackages, vendoringEnabled);\n  }\n\n  private GoPathScopeHelper(@NotNull Set<VirtualFile> roots,\n                            @Nullable VirtualFile sdkHome,\n                            boolean supportsInternalPackages,\n                            boolean supportsSdkInternalPackages,\n                            boolean vendoringEnabled) {\n    myRoots = roots;\n    mySdkHome = sdkHome;\n    mySupportsInternalPackages = supportsInternalPackages;\n    mySupportsSdkInternalPackages = supportsSdkInternalPackages;\n    myVendoringEnabled = vendoringEnabled;\n  }\n\n  public boolean couldBeReferenced(@NotNull VirtualFile declarationFile, @Nullable VirtualFile referenceFile) {\n    VirtualFile declarationDirectory = declarationFile.getParent();\n    if (declarationDirectory == null) {\n      return true;\n    }\n\n    if (ApplicationManager.getApplication().isUnitTestMode() && myRoots.contains(declarationDirectory)) {\n      return true;\n    }\n\n    String importPath = GoSdkUtil.getRelativePathToRoots(declarationDirectory, myRoots);\n    if (importPath == null) {\n      return false;\n    }\n    if (importPath.isEmpty()) {\n      return true;\n    }\n\n    VirtualFile referenceDirectory = referenceFile != null ? referenceFile.getParent() : null;\n    if (referenceDirectory != null) {\n      if (myVendoringEnabled && GoSdkUtil.isUnreachableVendoredPackage(declarationDirectory, referenceDirectory, myRoots)) {\n        return false;\n      }\n      boolean declarationIsInSdk = mySdkHome != null && VfsUtilCore.isAncestor(mySdkHome, declarationDirectory, false);\n      if (mySupportsInternalPackages || mySupportsSdkInternalPackages && declarationIsInSdk) {\n        if (GoSdkUtil.isUnreachableInternalPackage(declarationDirectory, referenceDirectory, myRoots)) {\n          return false;\n        }\n      }\n      if (declarationIsInSdk && GoSdkUtil.findParentDirectory(declarationDirectory, myRoots, GoConstants.TESTDATA_NAME) != null) {\n        return false;\n      }\n      else {\n        boolean referenceIsInSdk = mySdkHome != null && VfsUtilCore.isAncestor(mySdkHome, referenceDirectory, false);\n        if (referenceIsInSdk) {\n          return false;\n        }\n      }\n    }\n    return GoPsiImplUtil.allowed(declarationFile, referenceFile) && !isShadowedImportPath(declarationDirectory, importPath, myRoots);\n  }\n\n  private static boolean isShadowedImportPath(@NotNull VirtualFile targetDirectory,\n                                              @NotNull String targetImportPath,\n                                              @NotNull Collection<VirtualFile> roots) {\n    assert targetDirectory.isDirectory();\n    for (VirtualFile root : roots) {\n      VirtualFile realDirectoryToResolve = root.findFileByRelativePath(targetImportPath);\n      if (realDirectoryToResolve != null) {\n        return !targetDirectory.equals(realDirectoryToResolve);\n      }\n    }\n    return false;\n  }\n\n  @NotNull\n  public Set<VirtualFile> getRoots() {\n    return myRoots;\n  }\n\n  public boolean isVendoringEnabled() {\n    return myVendoringEnabled;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/util/GoPathUseScope.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.util;\n\nimport com.goide.psi.GoFile;\nimport com.goide.psi.GoImportSpec;\nimport com.goide.psi.GoNamedElement;\nimport com.goide.psi.impl.GoPsiImplUtil;\nimport com.goide.psi.impl.imports.GoImportReferenceSet;\nimport com.goide.sdk.GoPackageUtil;\nimport com.goide.sdk.GoSdkService;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.module.ModuleUtilCore;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.PsiManager;\nimport com.intellij.psi.search.GlobalSearchScope;\nimport com.intellij.util.ObjectUtils;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.Map;\nimport java.util.Set;\n\npublic class GoPathUseScope extends GlobalSearchScope {\n  public static GlobalSearchScope create(@NotNull PsiElement declarationContext, boolean filterByImportList) {\n    if (declarationContext instanceof GoNamedElement && ((GoNamedElement)declarationContext).isBlank()) {\n      return GlobalSearchScope.EMPTY_SCOPE;\n    }\n    PsiFile declarationPsiFile = declarationContext.getContainingFile();\n    if (!(declarationPsiFile instanceof GoFile)) {\n      return GlobalSearchScope.fileScope(declarationPsiFile);\n    }\n    if (GoPsiImplUtil.isBuiltinFile(declarationPsiFile)) {\n      return GlobalSearchScope.allScope(declarationContext.getProject());\n    }\n\n    VirtualFile declarationFile = declarationPsiFile.getVirtualFile();\n    if (declarationFile == null || declarationFile.getParent() == null) {\n      return GlobalSearchScope.fileScope(declarationPsiFile);\n    }\n\n    return new GoPathUseScope(declarationPsiFile.getProject(), declarationFile, filterByImportList);\n  }\n\n  @NotNull private final VirtualFile myDeclarationFile;\n  private final boolean myFilterByImportList;\n\n  private GoPathUseScope(@NotNull Project project, @NotNull VirtualFile declarationFile, boolean filterByImportList) {\n    super(project);\n    myDeclarationFile = declarationFile;\n    myFilterByImportList = filterByImportList;\n  }\n\n  @Override\n  public boolean contains(@NotNull VirtualFile referenceFile) {\n    VirtualFile referenceDirectory = referenceFile.isDirectory() ? referenceFile : referenceFile.getParent();\n    if (referenceDirectory == null) {\n      return false;\n    }\n    VirtualFile declarationDirectory = myDeclarationFile.getParent();\n    if (referenceDirectory.equals(declarationDirectory)) {\n      return true;\n    }\n\n    Project project = ObjectUtils.assertNotNull(getProject());\n    PsiManager psiManager = PsiManager.getInstance(project);\n    PsiFile referencePsiFile = psiManager.findFile(referenceFile);\n    Module module = referencePsiFile != null ? ModuleUtilCore.findModuleForPsiElement(referencePsiFile) : null;\n\n    GoPathScopeHelper scopeHelper = GoPathScopeHelper.fromReferenceFile(project, module, referenceFile);\n    if (!scopeHelper.couldBeReferenced(myDeclarationFile, referenceFile)) {\n      return false;\n    }\n    if (!myFilterByImportList) {\n      return true;\n    }\n\n    if (!(referencePsiFile instanceof GoFile)) {\n      // it's some injection or cross-reference, so we cannot check its imports\n      return true;\n    }\n    PsiFile declarationPsiFile = psiManager.findFile(myDeclarationFile);\n    if (declarationPsiFile instanceof GoFile) {\n      String importPath = ((GoFile)declarationPsiFile).getImportPath(scopeHelper.isVendoringEnabled());\n      Map<String, GoImportSpec> importedPackagesMap = ((GoFile)referencePsiFile).getImportedPackagesMap();\n      if (importedPackagesMap.containsKey(importPath)) {\n        return true;\n      }\n      if (hasRelativeImportOfTargetPackage(importedPackagesMap.keySet(), referenceDirectory, declarationDirectory)) {\n        return true;\n      }\n\n      for (GoFile packageFile : GoPackageUtil.getAllPackageFiles(referencePsiFile.getContainingDirectory(), null)) {\n        if (packageFile != referencePsiFile && referencePsiFile.getOriginalFile() != packageFile) {\n          Map<String, GoImportSpec> packagesMap = packageFile.getImportedPackagesMap();\n          if (packagesMap.containsKey(importPath)) {\n            return true;\n          }\n          if (hasRelativeImportOfTargetPackage(packagesMap.keySet(), referenceDirectory, declarationDirectory)) {\n            return true;\n          }\n        }\n      }\n    }\n    return false;\n  }\n\n  private static boolean hasRelativeImportOfTargetPackage(@NotNull Set<String> paths,\n                                                          @NotNull VirtualFile referenceDirectory,\n                                                          @NotNull VirtualFile declarationDirectory) {\n    for (String pathString : paths) {\n      if (GoImportReferenceSet.isRelativeImport(pathString)) {\n        VirtualFile file = referenceDirectory.findFileByRelativePath(pathString);\n        if (declarationDirectory.equals(file)) {\n          return true;\n        }\n      }\n    }\n    return false;\n  }\n\n  @Override\n  public int compare(@NotNull VirtualFile file1, @NotNull VirtualFile file2) {\n    return 0;\n  }\n\n  @Override\n  public boolean isSearchInModuleContent(@NotNull Module aModule) {\n    return GoSdkService.getInstance(ObjectUtils.assertNotNull(getProject())).isGoModule(aModule);\n  }\n\n  @Override\n  public boolean isSearchInLibraries() {\n    return false;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/util/GoStringLiteralEscaper.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.util;\n\nimport com.goide.psi.GoStringLiteral;\nimport com.intellij.openapi.util.TextRange;\nimport com.intellij.psi.LiteralTextEscaper;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.Locale;\n\npublic class GoStringLiteralEscaper extends LiteralTextEscaper<GoStringLiteral> {\n\n  private int[] outSourceOffsets;\n\n  public GoStringLiteralEscaper(@NotNull GoStringLiteral host) {\n    super(host);\n  }\n\n  @Override\n  public boolean decode(@NotNull TextRange rangeInsideHost, @NotNull StringBuilder outChars) {\n    TextRange.assertProperRange(rangeInsideHost);\n\n    String subText = rangeInsideHost.substring(myHost.getText());\n\n    if (myHost.getRawString() != null) {\n      outChars.append(subText);\n      return true;\n    }\n\n    return parseStringCharacters(subText, outChars);\n  }\n\n  @Override\n  public int getOffsetInHost(int offsetInDecoded, @NotNull TextRange rangeInsideHost) {\n    TextRange.assertProperRange(rangeInsideHost);\n\n    if (myHost.getRawString() != null) {\n      int offset = offsetInDecoded;\n      offset += rangeInsideHost.getStartOffset();\n      return offset > rangeInsideHost.getEndOffset() ? -1 : offset;\n    }\n\n    int result = offsetInDecoded < outSourceOffsets.length ? outSourceOffsets[offsetInDecoded] : -1;\n    if (result == -1) return -1;\n    return (result <= rangeInsideHost.getLength() ? result : rangeInsideHost.getLength()) + rangeInsideHost.getStartOffset();\n  }\n\n  /**\n   * Escapes the specified string in accordance with https://golang.org/ref/spec#Rune_literals\n   *\n   * @param chars\n   * @param outChars\n   */\n  public static void escapeString(@NotNull String chars, @NotNull StringBuilder outChars) {\n    int index = 0;\n\n    while (index < chars.length()) {\n      int c = chars.codePointAt(index);\n\n      switch (c) {\n        case (char)7:\n          outChars.append(\"\\\\a\");\n          break;\n\n        case '\\b':\n          outChars.append(\"\\\\b\");\n          break;\n\n        case '\\f':\n          outChars.append(\"\\\\f\");\n          break;\n\n        case '\\n':\n          outChars.append(\"\\\\n\");\n          break;\n\n        case '\\r':\n          outChars.append(\"\\\\r\");\n          break;\n\n        case '\\t':\n          outChars.append(\"\\\\t\");\n          break;\n\n        case (char)0x0b:\n          outChars.append(\"\\\\v\");\n          break;\n\n        case '\\\\':\n          outChars.append(\"\\\\\\\\\");\n          break;\n\n        case '\\'':\n          outChars.append(\"\\\\'\");\n          break;\n\n        case '\"':\n          outChars.append(\"\\\\\\\"\");\n          break;\n\n        default:\n          switch (Character.getType(c)) {\n            case Character.CONTROL:\n            case Character.PRIVATE_USE:\n            case Character.UNASSIGNED:\n              if (c <= 0xffff) {\n                outChars.append(\"\\\\u\").append(String.format(Locale.US, \"%04X\", c));\n              } else {\n                outChars.append(\"\\\\U\").append(String.format(Locale.US, \"%08X\", c));\n              }\n\n              break;\n\n            default:\n              outChars.appendCodePoint(c);\n          }\n      }\n\n      index += Character.charCount(c);\n    }\n  }\n\n  private boolean parseStringCharacters(String chars, StringBuilder outChars) {\n    outSourceOffsets = new int[chars.length() + 1];\n    outSourceOffsets[chars.length()] = -1;\n\n    if (chars.indexOf('\\\\') < 0) {\n      outChars.append(chars);\n      for (int i = 0; i < outSourceOffsets.length; i++) {\n        outSourceOffsets[i] = i;\n      }\n      return true;\n    }\n    int index = 0;\n\n    while (index < chars.length()) {\n      char c = chars.charAt(index++);\n\n      outSourceOffsets[outChars.length()] = index - 1;\n      outSourceOffsets[outChars.length() + 1] = index;\n\n      if (c != '\\\\') {\n        outChars.append(c);\n        continue;\n      }\n      if (index == chars.length()) return false;\n      c = chars.charAt(index++);\n\n      switch (c) {\n        case 'a':\n          outChars.append((char)7);\n          break;\n\n        case 'b':\n          outChars.append('\\b');\n          break;\n\n        case 'f':\n          outChars.append('\\f');\n          break;\n\n        case 'n':\n          outChars.append('\\n');\n          break;\n\n        case 'r':\n          outChars.append('\\r');\n          break;\n\n        case 't':\n          outChars.append('\\t');\n          break;\n\n        case 'v':\n          outChars.append((char)0x0b);\n          break;\n\n        case '\\\\':\n          outChars.append('\\\\');\n          break;\n\n        case '\\'':\n          outChars.append('\\'');\n          break;\n\n        case '\"':\n          outChars.append('\"');\n          break;\n\n        case '\\n':\n          outChars.append('\\n');\n          break;\n\n        // octal\n        case '0':\n        case '1':\n        case '2':\n        case '3':\n        case '4':\n        case '5':\n        case '6':\n        case '7': {\n          char startC = c;\n          int v = (int)c - '0';\n          if (index < chars.length()) {\n            c = chars.charAt(index++);\n            if ('0' <= c && c <= '7') {\n              v <<= 3;\n              v += c - '0';\n              if (startC <= '3' && index < chars.length()) {\n                c = chars.charAt(index++);\n                if ('0' <= c && c <= '7') {\n                  v <<= 3;\n                  v += c - '0';\n                }\n                else {\n                  index--;\n                }\n              }\n            }\n            else {\n              index--;\n            }\n          }\n          outChars.append((char)v);\n        }\n        break;\n\n        // hex\n        case 'x':\n          if (index + 2 <= chars.length()) {\n            try {\n              int v = Integer.parseInt(chars.substring(index, index + 2), 16);\n              outChars.append((char)v);\n              index += 2;\n            }\n            catch (Exception e) {\n              return false;\n            }\n          }\n          else {\n            return false;\n          }\n          break;\n\n        // little unicode\n        case 'u':\n          if (index + 4 <= chars.length()) {\n            try {\n              int v = Integer.parseInt(chars.substring(index, index + 4), 16);\n              c = chars.charAt(index);\n              if (c == '+' || c == '-') return false;\n              outChars.append((char)v);\n              index += 4;\n            }\n            catch (Exception e) {\n              return false;\n            }\n          }\n          else {\n            return false;\n          }\n          break;\n\n        // big unicode\n        case 'U':\n          if (index + 8 <= chars.length()) {\n            try {\n              int v = Integer.parseInt(chars.substring(index, index + 8), 16);\n              c = chars.charAt(index);\n              if (c == '+' || c == '-') return false;\n              outChars.append((char)v);\n              index += 8;\n            }\n            catch (Exception e) {\n              return false;\n            }\n          }\n          else {\n            return false;\n          }\n          break;\n\n        default:\n          return false;\n      }\n\n      outSourceOffsets[outChars.length()] = index;\n    }\n    return true;\n  }\n\n  @Override\n  public boolean isOneLine() {\n    return true;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/util/GoTargetSystem.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.util;\n\nimport com.goide.project.GoBuildTargetSettings;\nimport com.goide.project.GoModuleSettings;\nimport com.goide.sdk.GoSdkService;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.psi.util.CachedValueProvider;\nimport com.intellij.psi.util.CachedValuesManager;\nimport com.intellij.util.ArrayUtil;\nimport com.intellij.util.ThreeState;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.Contract;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.Collections;\nimport java.util.Set;\n\npublic class GoTargetSystem {\n  private static final String GAE_BUILD_FLAG = \"appengine\";\n\n  @NotNull public final String os;\n  @NotNull public final String arch;\n  @Nullable public final String goVersion;\n  @Nullable public final String compiler;\n\n  @NotNull public final ThreeState cgoEnabled;\n  private final Set<String> customFlags = ContainerUtil.newHashSet();\n\n  public GoTargetSystem(@NotNull String os, @NotNull String arch, @Nullable String goVersion, @Nullable String compiler,\n                        @NotNull ThreeState cgoEnabled, @NotNull String... customFlags) {\n    this.os = os;\n    this.arch = arch;\n    this.goVersion = goVersion;\n    this.compiler = compiler;\n    this.cgoEnabled = cgoEnabled;\n    Collections.addAll(this.customFlags, customFlags);\n  }\n\n  public boolean supportsFlag(@NotNull String flag) {\n    return customFlags.contains(flag);\n  }\n\n  @NotNull\n  public static GoTargetSystem forModule(@NotNull Module module) {\n    return CachedValuesManager.getManager(module.getProject()).getCachedValue(module, () -> {\n      GoBuildTargetSettings settings = GoModuleSettings.getInstance(module).getBuildTargetSettings();\n      String os = realValue(settings.os, GoUtil.systemOS());\n      String arch = realValue(settings.arch, GoUtil.systemArch());\n      ThreeState cgo = settings.cgo == ThreeState.UNSURE ? GoUtil.systemCgo(os, arch) : settings.cgo;\n      String moduleSdkVersion = GoSdkService.getInstance(module.getProject()).getSdkVersion(module);\n      String[] customFlags = GoSdkService.getInstance(module.getProject()).isAppEngineSdk(module)\n                             ? ArrayUtil.prepend(GAE_BUILD_FLAG, settings.customFlags)\n                             : settings.customFlags;\n      String compiler = GoBuildTargetSettings.ANY_COMPILER.equals(settings.compiler) ? null : settings.compiler;\n      GoTargetSystem result = new GoTargetSystem(os, arch, realValue(settings.goVersion, moduleSdkVersion), compiler, cgo, customFlags);\n      return CachedValueProvider.Result.create(result, settings);\n    });\n  }\n\n  @Contract(\"_,null->!null\")\n  private static String realValue(@NotNull String value, @Nullable String defaultValue) {\n    return GoBuildTargetSettings.DEFAULT.equals(value) ? defaultValue : value;\n  }\n}\n"
  },
  {
    "path": "src/com/goide/util/GoUtil.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.util;\n\nimport com.goide.GoConstants;\nimport com.goide.project.GoExcludedPathsSettings;\nimport com.goide.psi.*;\nimport com.goide.psi.impl.GoPsiImplUtil;\nimport com.goide.runconfig.testing.GoTestFinder;\nimport com.goide.sdk.GoPackageUtil;\nimport com.intellij.ide.plugins.IdeaPluginDescriptor;\nimport com.intellij.ide.plugins.PluginManager;\nimport com.intellij.openapi.extensions.PluginId;\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.module.ModuleUtilCore;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.SystemInfo;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.psi.PsiDirectory;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.PsiManager;\nimport com.intellij.psi.search.DelegatingGlobalSearchScope;\nimport com.intellij.psi.search.GlobalSearchScope;\nimport com.intellij.psi.util.CachedValueProvider;\nimport com.intellij.psi.util.CachedValuesManager;\nimport com.intellij.util.ThreeState;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoUtil {\n  private static final String PLUGIN_ID = \"ro.redeul.google.go\";\n\n  private GoUtil() {}\n\n  public static boolean matchedForModuleBuildTarget(@NotNull PsiFile file, @Nullable Module module) {\n    return module == null || new GoBuildMatcher(GoTargetSystem.forModule(module)).matchFile(file);\n  }\n\n  public static boolean isExcludedFile(@NotNull GoFile file) {\n    return CachedValuesManager.getCachedValue(file, () -> {\n      String importPath = file.getImportPath(false);\n      GoExcludedPathsSettings excludedSettings = GoExcludedPathsSettings.getInstance(file.getProject());\n      return CachedValueProvider.Result.create(importPath != null && excludedSettings.isExcluded(importPath), file, excludedSettings);\n    });\n  }\n\n  @NotNull\n  public static String systemOS() {\n    // TODO android? dragonfly nacl? netbsd openbsd plan9\n    if (SystemInfo.isMac) {\n      return \"darwin\";\n    }\n    if (SystemInfo.isFreeBSD) {\n      return \"freebsd\";\n    }\n    if (SystemInfo.isLinux) {\n      return GoConstants.LINUX_OS;\n    }\n    if (SystemInfo.isSolaris) {\n      return \"solaris\";\n    }\n    if (SystemInfo.isWindows) {\n      return \"windows\";\n    }\n    return \"unknown\";\n  }\n\n  @NotNull\n  public static String systemArch() {\n    if (SystemInfo.is64Bit) {\n      return GoConstants.AMD64;\n    }\n    if (SystemInfo.isWindows) {\n      String arch = System.getenv(\"PROCESSOR_ARCHITECTURE\");\n      String wow64Arch = System.getenv(\"PROCESSOR_ARCHITEW6432\");\n      return arch.endsWith(\"64\") || wow64Arch != null && wow64Arch.endsWith(\"64\") ? GoConstants.AMD64 : \"386\";\n    }\n    if (SystemInfo.is32Bit) {\n      return \"386\";\n    }\n    return \"unknown\";\n  }\n\n  @NotNull\n  public static ThreeState systemCgo(@NotNull String os, @NotNull String arch) {\n    return GoConstants.KNOWN_CGO.contains(os + \"/\" + arch) ? ThreeState.YES : ThreeState.NO;\n  }\n\n  public static boolean fileToIgnore(@NotNull String fileName) {\n    return StringUtil.startsWithChar(fileName, '_') || StringUtil.startsWithChar(fileName, '.');\n  }\n  \n  public static GlobalSearchScope goPathUseScope(@NotNull PsiElement context, boolean filterByImportList) {\n    return GoPathUseScope.create(context, filterByImportList);\n  }\n\n  public static GlobalSearchScope goPathResolveScope(@NotNull PsiElement context) {\n    // it's important to ask module on file, otherwise module won't be found for elements in libraries files [zolotov]\n    Module module = ModuleUtilCore.findModuleForPsiElement(context.getContainingFile());\n    return GoPathResolveScope.create(context.getProject(), module, context);\n  }\n\n  public static GlobalSearchScope goPathResolveScope(@NotNull Module module, @Nullable PsiElement context) {\n    return GoPathResolveScope.create(module.getProject(), module, context);\n  }\n\n  @NotNull\n  public static GlobalSearchScope moduleScope(@NotNull Module module) {\n    return GlobalSearchScope.moduleWithDependenciesAndLibrariesScope(module).uniteWith(module.getModuleContentWithDependenciesScope());\n  }\n\n  @NotNull\n  public static GlobalSearchScope moduleScopeWithoutLibraries(@NotNull Project project, @Nullable Module module) {\n    return module != null ? GlobalSearchScope.moduleWithDependenciesScope(module).uniteWith(module.getModuleContentWithDependenciesScope())\n                          : GlobalSearchScope.projectScope(project);\n  }\n\n  @NotNull\n  @SuppressWarnings(\"ConstantConditions\")\n  public static IdeaPluginDescriptor getPlugin() {\n    return PluginManager.getPlugin(PluginId.getId(PLUGIN_ID));\n  }\n\n  /**\n   * isReferenceTo optimization. Before complex checking via resolve we can say for sure that element\n   * can't be a reference to given declaration in following cases:<br/>\n   * – Blank definitions can't be used as value, so this method return false for all named elements with '_' name<br/>\n   * – GoLabelRef can't be resolved to anything but GoLabelDefinition<br/>\n   * – GoTypeReferenceExpression (not from receiver type) can't be resolved to anything but GoTypeSpec or GoImportSpec<br/>\n   * – Definition is private and reference in different package<br/>\n   */\n  public static boolean couldBeReferenceTo(@NotNull PsiElement definition, @NotNull PsiElement reference) {\n    if (definition instanceof PsiDirectory && reference instanceof GoReferenceExpressionBase) return true;\n    if (reference instanceof GoLabelRef && !(definition instanceof GoLabelDefinition)) return false;\n    if (reference instanceof GoTypeReferenceExpression &&\n        !(definition instanceof GoTypeSpec || definition instanceof GoImportSpec)) {\n      return false;\n    }\n\n    PsiFile definitionFile = definition.getContainingFile();\n    PsiFile referenceFile = reference.getContainingFile();\n    // todo: zolotov, are you sure? cross refs, for instance?\n    if (!(definitionFile instanceof GoFile) || !(referenceFile instanceof GoFile)) return false;\n\n    boolean inSameFile = definitionFile.isEquivalentTo(referenceFile);\n    if (inSameFile) return true;\n\n    if (inSamePackage(referenceFile, definitionFile)) return true;\n    return !(reference instanceof GoNamedElement && !((GoNamedElement)reference).isPublic());\n  }\n\n  public static boolean inSamePackage(@NotNull PsiFile firstFile, @NotNull PsiFile secondFile) {\n    PsiDirectory containingDirectory = firstFile.getContainingDirectory();\n    if (containingDirectory == null || !containingDirectory.equals(secondFile.getContainingDirectory())) {\n      return false;\n    }\n    if (firstFile instanceof GoFile && secondFile instanceof GoFile) {\n      String referencePackage = ((GoFile)firstFile).getPackageName();\n      String definitionPackage = ((GoFile)secondFile).getPackageName();\n      return referencePackage != null && referencePackage.equals(definitionPackage);\n    }\n    return true;\n  }\n\n  @NotNull\n  public static String suggestPackageForDirectory(@Nullable PsiDirectory directory) {\n    String packageName = GoPsiImplUtil.getLocalPackageName(directory != null ? directory.getName() : \"\");\n    for (String p : GoPackageUtil.getAllPackagesInDirectory(directory, null, true)) {\n      if (!GoConstants.MAIN.equals(p)) {\n        return p;\n      }\n    }\n    return packageName;\n  }\n\n  public static class ExceptTestsScope extends DelegatingGlobalSearchScope {\n    public ExceptTestsScope(@NotNull GlobalSearchScope baseScope) {\n      super(baseScope);\n    }\n\n    @Override\n    public boolean contains(@NotNull VirtualFile file) {\n      return !GoTestFinder.isTestFile(file) && super.contains(file);\n    }\n  }\n  \n  public static class TestsScope extends DelegatingGlobalSearchScope {\n    public TestsScope(@NotNull GlobalSearchScope baseScope) {\n      super(baseScope);\n    }\n\n    @Override\n    public boolean contains(@NotNull VirtualFile file) {\n      return GoTestFinder.isTestFile(file) && super.contains(file);\n    }\n  }\n\n  public static class ExceptChildOfDirectory extends DelegatingGlobalSearchScope {\n    @NotNull private final VirtualFile myParent;\n    @Nullable private final String myAllowedPackageInExcludedDirectory;\n\n    public ExceptChildOfDirectory(@NotNull VirtualFile parent,\n                                  @NotNull GlobalSearchScope baseScope,\n                                  @Nullable String allowedPackageInExcludedDirectory) {\n      super(baseScope);\n      myParent = parent;\n      myAllowedPackageInExcludedDirectory = allowedPackageInExcludedDirectory;\n    }\n\n    @Override\n    public boolean contains(@NotNull VirtualFile file) {\n      if (myParent.equals(file.getParent())) {\n        if (myAllowedPackageInExcludedDirectory == null) {\n          return false;\n        }\n        Project project = getProject();\n        PsiFile psiFile = project != null ? PsiManager.getInstance(project).findFile(file) : null;\n        if (!(psiFile instanceof GoFile)) {\n          return false;\n        }\n        if (!myAllowedPackageInExcludedDirectory.equals(((GoFile)psiFile).getPackageName())) {\n          return false;\n        }\n      }\n      return super.contains(file);\n    }\n  }\n}"
  },
  {
    "path": "testData/colorHighlighting/builtinFunctions.go",
    "content": "package main\n\nfunc <info descr=\"null\"><info descr=\"GO_LOCAL_FUNCTION\">main</info></info>() {\n\t<info descr=\"null\"><info descr=\"GO_BUILTIN_FUNCTION\">println</info></info>(\"demo\")\n}\n"
  },
  {
    "path": "testData/colorHighlighting/funcAndMethod.go",
    "content": "package main\n\ntype <info descr=\"null\"><info descr=\"GO_PACKAGE_LOCAL_INTERFACE\">inner</info></info> interface {\n\t<info descr=\"null\"><info descr=\"GO_EXPORTED_FUNCTION\">Inner</info></info>() <info descr=\"null\"><info descr=\"GO_BUILTIN_TYPE_REFERENCE\">string</info></info>\n}\n\ntype (\n\t<info descr=\"null\"><info descr=\"GO_PACKAGE_LOCAL_INTERFACE\">de</info></info> interface {\n\t\t<info descr=\"null\"><info descr=\"GO_EXPORTED_FUNCTION\">Demo</info></info>() <info descr=\"null\"><info descr=\"GO_PACKAGE_LOCAL_INTERFACE\">inner</info></info>\n\t}\n\n\t<info descr=\"null\"><info descr=\"GO_PACKAGE_LOCAL_STRUCT\">dem</info></info> struct{}\n)\n\nfunc (<info descr=\"null\"><info descr=\"GO_METHOD_RECEIVER\">a</info></info> <info descr=\"null\"><info descr=\"GO_TYPE_REFERENCE\">dem</info></info>) <info descr=\"null\"><info descr=\"GO_EXPORTED_FUNCTION\">Demo</info></info>() <info descr=\"null\"><info descr=\"GO_PACKAGE_LOCAL_INTERFACE\">inner</info></info> {\n\treturn <info descr=\"null\"><info descr=\"GO_BUILTIN_TYPE_REFERENCE\">error</info></info>(\"demo\")\n}\n\nfunc <info descr=\"null\"><info descr=\"GO_LOCAL_FUNCTION\">main</info></info>() {\n\t<info descr=\"null\"><info descr=\"GO_LOCAL_VARIABLE\">b</info></info> := <info descr=\"null\"><info descr=\"GO_PACKAGE_LOCAL_STRUCT\">dem</info></info>{}\n\t<info descr=\"null\"><info descr=\"GO_LOCAL_VARIABLE\">b</info></info>.<info descr=\"null\"><info descr=\"GO_EXPORTED_FUNCTION\">Demo</info></info>().<info descr=\"null\"><info descr=\"GO_EXPORTED_FUNCTION\">Inner</info></info>()\n}"
  },
  {
    "path": "testData/colorHighlighting/label.go",
    "content": "package main\n\nfunc <info descr=\"null\"><info descr=\"GO_LOCAL_FUNCTION\">test</info></info>() <info descr=\"null\"><info descr=\"GO_BUILTIN_TYPE_REFERENCE\">int</info></info> {\n<info descr=\"null\"><info descr=\"GO_LABEL\">foo</info></info>:\n\tfor {\n\t\tcontinue <info descr=\"null\"><info descr=\"GO_LABEL\">foo</info></info>\n\t\tbreak <info descr=\"null\"><info descr=\"GO_LABEL\">foo</info></info>\n\t\tgoto <info descr=\"null\"><info descr=\"GO_LABEL\">foo</info></info>\n\t}\n\t<info descr=\"null\"><info descr=\"GO_LOCAL_VARIABLE\">foo</info></info> := 10\n\treturn <info descr=\"null\"><info descr=\"GO_LOCAL_VARIABLE\">foo</info></info>\n}\n"
  },
  {
    "path": "testData/colorHighlighting/octAndHex.go",
    "content": "package main\n\nvar <info descr=\"null\"><info descr=\"GO_PACKAGE_LOCAL_VARIABLE\">a</info></info> <info descr=\"null\"><info descr=\"GO_BUILTIN_TYPE_REFERENCE\">int</info></info> = <info descr=\"null\"><info descr=\"GO_NUMBER\">0112</info></info>\nvar <info descr=\"null\"><info descr=\"GO_PACKAGE_LOCAL_VARIABLE\">b</info></info> <info descr=\"null\"><info descr=\"GO_BUILTIN_TYPE_REFERENCE\">int</info></info> = <info descr=\"null\"><info descr=\"GO_NUMBER\">0x112</info></info>\nvar <info descr=\"null\"><info descr=\"GO_PACKAGE_LOCAL_VARIABLE\">c</info></info> <info descr=\"null\"><info descr=\"GO_BUILTIN_TYPE_REFERENCE\">int</info></info> = <info descr=\"null\"><info descr=\"GO_NUMBER\">0Xabf112</info></info>"
  },
  {
    "path": "testData/colorHighlighting/receiver.go",
    "content": "package main\n\nfunc (<info descr=\"null\"><info descr=\"GO_METHOD_RECEIVER\">ps</info></info> PublicStruct) <info descr=\"null\"><info descr=\"GO_EXPORTED_FUNCTION\">PublicFunc</info></info>() {\n\n}"
  },
  {
    "path": "testData/colorHighlighting/simple.go",
    "content": "package main\n\nimport `fmt`\n\nfunc <info descr=\"null\"><info descr=\"GO_LOCAL_FUNCTION\">main</info></info>() {\n  fmt.<info descr=\"null\"><info descr=\"GO_EXPORTED_FUNCTION\">Println</info></info>(\"Hello\")\n}"
  },
  {
    "path": "testData/colorHighlighting/structFields.go",
    "content": "package main\n\ntype <info descr=\"null\"><info descr=\"GO_PACKAGE_LOCAL_STRUCT\">type1</info></info> struct {\n\t<info descr=\"null\"><info descr=\"GO_STRUCT_LOCAL_MEMBER\">var1</info></info> <info descr=\"null\"><info descr=\"GO_BUILTIN_TYPE_REFERENCE\">int</info></info>\n}\n\nfunc <info descr=\"null\"><info descr=\"GO_LOCAL_FUNCTION\">main</info></info>() {\n\t<info descr=\"null\"><info descr=\"GO_LOCAL_VARIABLE\">struct1</info></info> := <info descr=\"null\"><info descr=\"GO_PACKAGE_LOCAL_STRUCT\">type1</info></info>{<info descr=\"null\"><info descr=\"GO_STRUCT_LOCAL_MEMBER\">var1</info></info>: 1}\n\t<info descr=\"null\"><info descr=\"GO_BUILTIN_FUNCTION\">println</info></info>(<info descr=\"null\"><info descr=\"GO_LOCAL_VARIABLE\">struct1</info></info>.<info descr=\"null\"><info descr=\"GO_STRUCT_LOCAL_MEMBER\">var1</info></info>)\n} "
  },
  {
    "path": "testData/colorHighlighting/types.go",
    "content": "package main\n\ntype (\n\t<info descr=\"null\"><info descr=\"GO_PACKAGE_EXPORTED_INTERFACE\">PublicInterface</info></info>  interface {\n\t\t<info descr=\"null\"><info descr=\"GO_EXPORTED_FUNCTION\">PublicFunc</info></info>() <info descr=\"null\"><info descr=\"GO_BUILTIN_TYPE_REFERENCE\">int</info></info>\n\t\t<info descr=\"null\"><info descr=\"GO_LOCAL_FUNCTION\">privateFunc</info></info>() <info descr=\"null\"><info descr=\"GO_BUILTIN_TYPE_REFERENCE\">int</info></info>\n\t}\n\n\t<info descr=\"null\"><info descr=\"GO_PACKAGE_LOCAL_INTERFACE\">private</info></info> interface {\n\t\t<info descr=\"null\"><info descr=\"GO_EXPORTED_FUNCTION\">PublicFunc</info></info>() <info descr=\"null\"><info descr=\"GO_BUILTIN_TYPE_REFERENCE\">int</info></info>\n\t\t<info descr=\"null\"><info descr=\"GO_LOCAL_FUNCTION\">privateFunc</info></info>() <info descr=\"null\"><info descr=\"GO_BUILTIN_TYPE_REFERENCE\">int</info></info>\n\t}\n\n\t<info descr=\"null\"><info descr=\"GO_PACKAGE_EXPORTED_STRUCT\">PublicStruct</info></info> struct {\n\n\t\t<info descr=\"null\"><info descr=\"GO_STRUCT_EXPORTED_MEMBER\">PublicField</info></info>  <info descr=\"null\"><info descr=\"GO_BUILTIN_TYPE_REFERENCE\">int</info></info>\n\t\t<info descr=\"null\"><info descr=\"GO_STRUCT_LOCAL_MEMBER\">privateField</info></info> <info descr=\"null\"><info descr=\"GO_BUILTIN_TYPE_REFERENCE\">int</info></info>\n\t}\n\n\t<info descr=\"null\"><info descr=\"GO_PACKAGE_LOCAL_STRUCT\">privateStruct</info></info> struct {\n\t\t<info descr=\"null\"><info descr=\"GO_STRUCT_EXPORTED_MEMBER\">PublicField</info></info>  <info descr=\"null\"><info descr=\"GO_BUILTIN_TYPE_REFERENCE\">int</info></info>\n\t\t<info descr=\"null\"><info descr=\"GO_STRUCT_LOCAL_MEMBER\">privateField</info></info> <info descr=\"null\"><info descr=\"GO_BUILTIN_TYPE_REFERENCE\">int</info></info>\n\t}\n\n\t<info descr=\"null\"><info descr=\"GO_TYPE_SPECIFICATION\">demoInt</info></info> <info descr=\"null\"><info descr=\"GO_BUILTIN_TYPE_REFERENCE\">int</info></info><EOLError descr=\"')' or identifier expected, got 'type'\"></EOLError>\n\t\n\ttype <info descr=\"null\"><info descr=\"GO_TYPE_SPECIFICATION\">Bla</info></info> <info descr=\"null\"><info descr=\"GO_BUILTIN_TYPE_REFERENCE\">int32</info></info>\n\n\tfunc (<info descr=\"null\"><info descr=\"GO_METHOD_RECEIVER\">b</info></info> *<info descr=\"null\"><info descr=\"GO_TYPE_REFERENCE\">Bla</info></info>) <info descr=\"null\"><info descr=\"GO_EXPORTED_FUNCTION\">Method1</info></info>() {}\n<error descr=\"')' unexpected\">)</error>"
  },
  {
    "path": "testData/completion/addSpaceAfterKeyword.go",
    "content": "package main\n\nfunc main() {\n  defe<caret>    \n}"
  },
  {
    "path": "testData/completion/addSpaceAfterKeyword_after.go",
    "content": "package main\n\nfunc main() {\n  defer <caret>   \n}"
  },
  {
    "path": "testData/completion/blockKeywords.go",
    "content": "package main\n\nfunc main() {\n  <caret>    \n}"
  },
  {
    "path": "testData/completion/blockKeywordsInsideCaseStatement.go",
    "content": "package main\n\nfunc main() {\n\tswitch a {\n\tcase 1: <caret>\n\t}\n}"
  },
  {
    "path": "testData/completion/blockKeywordsInsideOneLineFunction.go",
    "content": "package main\n\nfunc main() { <caret> }"
  },
  {
    "path": "testData/completion/chanKeyword.go",
    "content": "package foo\n\nvar c, c1, c2, c3, c4 ch<caret>"
  },
  {
    "path": "testData/completion/chanKeyword_2.go",
    "content": "package foo\n\nfunc findMarker(c <-<caret> int) int {\n\n}"
  },
  {
    "path": "testData/completion/chanKeyword_2_after.go",
    "content": "package foo\n\nfunc findMarker(c <-<caret> int) int {\n\n}"
  },
  {
    "path": "testData/completion/chanKeyword_3.go",
    "content": "package foo\n\nvar c, c1, c2, c3, c4 (ch<caret>)"
  },
  {
    "path": "testData/completion/chanKeyword_3_after.go",
    "content": "package foo\n\nvar c, c1, c2, c3, c4 (chan <caret>)"
  },
  {
    "path": "testData/completion/chanKeyword_after.go",
    "content": "package foo\n\nvar c, c1, c2, c3, c4 chan <caret>"
  },
  {
    "path": "testData/completion/doNotCompleteKeywordsInsideConstSpec.go",
    "content": "package foo\n\nconst a = <caret>"
  },
  {
    "path": "testData/completion/doNotCompleteKeywordsInsideSelectorExpression.go",
    "content": "package main\n\ntype demo struct{}\n\nfunc (d demo) FuncA() demo {\n    return d\n}\n\nfunc (d demo) FuncB() demo {\n    return d\n}\n\nfunc main() {\n    a := demo{}\n    a.FuncA().<caret>.FuncB()\n}"
  },
  {
    "path": "testData/completion/doNotRunAutoImportCompletionAfterDot.go",
    "content": "package main\n\ntype str struct {}\n\nfunc (a str) Demo() str {\n\treturn str{}\n}\n\nfunc main() {\n\ta := str{}\n\tb := a.Demo().D<caret>\n}"
  },
  {
    "path": "testData/completion/doNotRunAutoImportCompletionAfterDotAndSpace.go",
    "content": "package main\n\ntype str struct {}\n\nfunc (a str) Demo() str {\n\treturn str{}\n}\n\nfunc main() {\n\ta := str{}\n\tb := a.Demo().\n\tD<caret>\n}"
  },
  {
    "path": "testData/completion/doNotRunAutoImportCompletionAfterDotAndSpace_after.go",
    "content": "package main\n\ntype str struct {}\n\nfunc (a str) Demo() str {\n\treturn str{}\n}\n\nfunc main() {\n\ta := str{}\n\tb := a.Demo().\n\tDemo()\n}"
  },
  {
    "path": "testData/completion/doNotRunAutoImportCompletionAfterDot_after.go",
    "content": "package main\n\ntype str struct {}\n\nfunc (a str) Demo() str {\n\treturn str{}\n}\n\nfunc main() {\n\ta := str{}\n\tb := a.Demo().Demo()\n}"
  },
  {
    "path": "testData/completion/elseKeyword.go",
    "content": "package foo\n\nfunc bar() {\n  if 1 < 2 {\n    \n  } els<caret>\n}"
  },
  {
    "path": "testData/completion/elseKeywordRegression.go",
    "content": "package main\n\nfunc main() {\n    m := \"\"\n    if m == \"\" { \n    }\n    m.e<caret>\n}"
  },
  {
    "path": "testData/completion/elseKeyword_after.go",
    "content": "package foo\n\nfunc bar() {\n  if 1 < 2 {\n    \n  } else <caret>\n}"
  },
  {
    "path": "testData/completion/expressionCaseKeywordCompletion.go",
    "content": "package foo\n\nfunc hi() {\n\tvar a = 1\n\tswitch a {\n\tcase 1:\n\t\tprintln(1)\n\t\treturn nil\n\t\tcas<caret>\n\t}\n}"
  },
  {
    "path": "testData/completion/expressionCaseKeywordCompletion_after.go",
    "content": "package foo\n\nfunc hi() {\n\tvar a = 1\n\tswitch a {\n\tcase 1:\n\t\tprintln(1)\n\t\treturn nil\n\tcase :\n\t\t<caret>\n\t}\n}"
  },
  {
    "path": "testData/completion/expressionDefaultKeywordCompletion.go",
    "content": "package foo\n\nfunc hi() {\n\tvar a = 1\n\tswitch a {\n\tcase 1:\n\t\tprintln(1)\n\t\treturn nil\n\t\tdefa<caret>\n\t}\n}"
  },
  {
    "path": "testData/completion/expressionDefaultKeywordCompletion_after.go",
    "content": "package foo\n\nfunc hi() {\n\tvar a = 1\n\tswitch a {\n\tcase 1:\n\t\tprintln(1)\n\t\treturn nil\n\tdefault:\n\t\t<caret>\n\t}\n}"
  },
  {
    "path": "testData/completion/expressionKeywords.go",
    "content": "package main\n\nfunc main() {\n  println(&<caret>)\n}"
  },
  {
    "path": "testData/completion/forStatementKeywords.go",
    "content": "package foo\n\nfunc bar() {\n  for 1 {\n    <caret>\n  }\n}"
  },
  {
    "path": "testData/completion/forStatementKeywordsDoNotInsertSpace.go",
    "content": "package foo\n\nfunc bar() {\n  for 1 {\n    continu<caret>\n  }\n}"
  },
  {
    "path": "testData/completion/forStatementKeywordsDoNotInsertSpace_after.go",
    "content": "package foo\n\nfunc bar() {\n  for 1 {\n    continue<caret>\n  }\n}"
  },
  {
    "path": "testData/completion/forStatementKeywordsInsideFuncLit.go",
    "content": "package foo\n\nfunc bar() {\n  for 1 {\n    func() {\n      <caret>\n    }\n  }\n}"
  },
  {
    "path": "testData/completion/functionAsFunctionArgument.go",
    "content": "package main\n\nfunc main() {\n  println(fun<caret>)\n}"
  },
  {
    "path": "testData/completion/functionAsFunctionArgument_after.go",
    "content": "package main\n\nfunc main() {\n  println(func() {<caret>})\n}"
  },
  {
    "path": "testData/completion/functionAsVariableValue.go",
    "content": "package main\n\nfunc main() {\n  a := fun<caret>\n}"
  },
  {
    "path": "testData/completion/functionAsVariableValue_after.go",
    "content": "package main\n\nfunc main() {\n  a := func() {<caret>}\n}"
  },
  {
    "path": "testData/completion/functionInDefer.go",
    "content": "package main\n\nfunc main() {\n  defer fu<caret>    \n}"
  },
  {
    "path": "testData/completion/functionInDefer_after.go",
    "content": "package main\n\nfunc main() {\n  defer func() {<caret>}    \n}"
  },
  {
    "path": "testData/completion/functionInGo.go",
    "content": "package main\n\nfunc main() {\n  go fu<caret>    \n}"
  },
  {
    "path": "testData/completion/functionInGo_after.go",
    "content": "package main\n\nfunc main() {\n  go func() {<caret>}    \n}"
  },
  {
    "path": "testData/completion/ifKeywordAfterElse.go",
    "content": "package foo\n\nfunc bar() {\n  if 1 < 2 {\n    \n  }\n  else i<caret>\n}"
  },
  {
    "path": "testData/completion/ifKeywordAfterElse_after.go",
    "content": "package foo\n\nfunc bar() {\n  if 1 < 2 {\n    \n  }\n  else if  {\n<caret>\n}\n}"
  },
  {
    "path": "testData/completion/interfaceKeywordAsFunctionParameter.go",
    "content": "package foo\n\nfunc function(interf<caret>) {\n}"
  },
  {
    "path": "testData/completion/interfaceKeywordAsFunctionParameter_after.go",
    "content": "package foo\n\nfunc function(interface{<caret>}) {\n}"
  },
  {
    "path": "testData/completion/localFunctionInDifferentFiles.go",
    "content": "package test\n\nfunc hello(c Context){\n    c.red<caret>\n}\n"
  },
  {
    "path": "testData/completion/localFunctionInDifferentFiles_after.go",
    "content": "package test\n\nfunc hello(c Context){\n    c.redirect()<caret>\n}\n"
  },
  {
    "path": "testData/completion/localFunctionInDifferentFiles_context.go",
    "content": "package test\n\ntype Context struct {\n    Errors []string\n}\n\nfunc (c Context) redirect() {\n}"
  },
  {
    "path": "testData/completion/mapKeyword.go",
    "content": "package foo\n\nvar c, c1, c2, c3, c4 ma<caret>"
  },
  {
    "path": "testData/completion/mapKeywordInsertHandler.go",
    "content": "package foo\n\nvar c, c1, c2, c3, c4 (ma<caret>)"
  },
  {
    "path": "testData/completion/mapKeywordInsertHandlerDoNotInsertBrackets.go",
    "content": "package foo\n\nvar c, c1, c2, c3, c4 (ma<caret>)"
  },
  {
    "path": "testData/completion/mapKeywordInsertHandlerDoNotInsertBrackets_after.go",
    "content": "package foo\n\nvar c, c1, c2, c3, c4 (map[<caret>])"
  },
  {
    "path": "testData/completion/mapKeywordInsertHandler_after.go",
    "content": "package foo\n\nvar c, c1, c2, c3, c4 (map[<caret>])"
  },
  {
    "path": "testData/completion/mapKeyword_2.go",
    "content": "package foo\n\nvar c, c1, c2, c3, c4 (ma<caret>)"
  },
  {
    "path": "testData/completion/mapKeyword_2_after.go",
    "content": "package foo\n\nvar c, c1, c2, c3, c4 (map[<caret>])"
  },
  {
    "path": "testData/completion/mapKeyword_after.go",
    "content": "package foo\n\nvar c, c1, c2, c3, c4 map[<caret>]"
  },
  {
    "path": "testData/completion/packageKeyword.go",
    "content": "<caret>\n\nfunc main() {\n    \n}"
  },
  {
    "path": "testData/completion/packageKeywordInEmptyFile.go",
    "content": "<caret>"
  },
  {
    "path": "testData/completion/packageKeywordInEmptyFile_after.go",
    "content": "package <caret>"
  },
  {
    "path": "testData/completion/packageKeyword_after.go",
    "content": "package <caret>\n\nfunc main() {\n    \n}"
  },
  {
    "path": "testData/completion/rangeKeyword_1.go",
    "content": "package main\n\nfunc main() {\n\ta := 1\n\tfor a = ran<caret>\n}"
  },
  {
    "path": "testData/completion/rangeKeyword_1_after.go",
    "content": "package main\n\nfunc main() {\n\ta := 1\n\tfor a = range <caret>\n}"
  },
  {
    "path": "testData/completion/rangeKeyword_2.go",
    "content": "package main\n\nfunc main() {\n\tfor b := ran<caret>\n}"
  },
  {
    "path": "testData/completion/rangeKeyword_2_after.go",
    "content": "package main\n\nfunc main() {\n\tfor b := range <caret>\n}"
  },
  {
    "path": "testData/completion/rangeKeyword_3.go",
    "content": "package main\n\nfunc main() {\n\tfor ran<caret>\n}"
  },
  {
    "path": "testData/completion/rangeKeyword_3_after.go",
    "content": "package main\n\nfunc main() {\n\tfor range <caret>\n}"
  },
  {
    "path": "testData/completion/selectKeywordInsertHandler.go",
    "content": "package foo\n\nfunc bar() {\n  selec<caret>\n}"
  },
  {
    "path": "testData/completion/selectKeywordInsertHandler_after.go",
    "content": "package foo\n\nfunc bar() {\n  select {\n\t\n\t}\n}"
  },
  {
    "path": "testData/completion/structKeywordAsFunctionParameter.go",
    "content": "package foo\n\nfunc function(struc<caret>) {\n}"
  },
  {
    "path": "testData/completion/structKeywordAsFunctionParameter_after.go",
    "content": "package foo\n\nfunc function(struct{<caret>}) {\n}"
  },
  {
    "path": "testData/completion/topLevelKeywords.go",
    "content": "// comment\n// comment\npackage main\n\n<caret>\n\nfunc main() {\n    \n}"
  },
  {
    "path": "testData/completion/topLevelKeywords_2.go",
    "content": "package src\nvar name = 2\n<caret>\n\nfunc main() {\n\n}"
  },
  {
    "path": "testData/completion/typeCaseKeywordCompletion.go",
    "content": "package foo\n\nfunc bar(p interface{}) string {\n\tswitch _ := p.(type) {\n\tcase error:\n\t\treturn nil\n\t\tca<caret>\n\t}\n\treturn \"\"\n}"
  },
  {
    "path": "testData/completion/typeCaseKeywordCompletion_after.go",
    "content": "package foo\n\nfunc bar(p interface{}) string {\n\tswitch _ := p.(type) {\n\tcase error:\n\t\treturn nil\n\tcase :\n\t\t<caret>\n\t}\n\treturn \"\"\n}"
  },
  {
    "path": "testData/completion/typeDefaultKeywordCompletion.go",
    "content": "package foo\n\nfunc bar(p interface{}) string {\n\tswitch _ := p.(type) {\n\tcase error:\n\t\treturn nil\n\t\tdefa<caret>\n\t}\n\treturn \"\"\n}"
  },
  {
    "path": "testData/completion/typeDefaultKeywordCompletion_after.go",
    "content": "package foo\n\nfunc bar(p interface{}) string {\n\tswitch _ := p.(type) {\n\tcase error:\n\t\treturn nil\n\tdefault:\n\t\t<caret>\n\t}\n\treturn \"\"\n}"
  },
  {
    "path": "testData/completion/typeKeywordDoNotInsertBraces.go",
    "content": "package foo\n\ntype Bar interf<caret> {\n}"
  },
  {
    "path": "testData/completion/typeKeywordDoNotInsertBraces_after.go",
    "content": "package foo\n\ntype Bar interface {\n\t\n}"
  },
  {
    "path": "testData/completion/typeKeywordInsertBraces.go",
    "content": "package foo\n\ntype Bar interf<caret>"
  },
  {
    "path": "testData/completion/typeKeywordInsertBraces_after.go",
    "content": "package foo\n\ntype Bar interface {\n\t\n}"
  },
  {
    "path": "testData/completion/typeKeywords.go",
    "content": "package foo;\n\ntype Bar <caret>"
  },
  {
    "path": "testData/completion/typeKeywordsInsideParentheses.go",
    "content": "package foo;\n\ntype Bar (<caret>)"
  },
  {
    "path": "testData/coverage/coverage.out",
    "content": "mode: count\ncoverage.go:20.56,21.14 1 1\ncoverage.go:24.2,24.50 1 1\ncoverage.go:21.14,23.3 1 0\ncoverage.go:29.23,30.19 1 9\ncoverage2.go:33.2,39.10 3 9\ncoverage2.go:30.19,32.3 1 0\ncoverage2.go:43.56,45.14 2 1\nwithoutHits.go:30.19,32.3 1 0\n\nmerging.go:20.56,21.14 1 1\nmerging.go:24.2,24.50 1 1\nmerging.go:21.14,23.3 1 0\nmerging.go:29.23,30.19 1 9"
  },
  {
    "path": "testData/coverage/coverage_for_merge.out",
    "content": "mode: count\nmerging.go:20.56,21.14 1 1\nmerging.go:24.2,24.50 2 0\nmerging.go:21.14,23.3 1 1\nmerging.go:29.23,30.19 1 0\nmerging.go:31.23,32.19 1 0"
  },
  {
    "path": "testData/doc/commentEndsWithIndentedBlock_after.txt",
    "content": "<p>Clean returns the shortest path name equivalent to path\nby purely lexical processing.  It applies the following rules\niteratively until no further processing can be done:\n</p>\n<pre>\t1. Replace multiple slashes with a single slash.\n\t2. Eliminate each . path name element (the current directory).\n\t3. Eliminate each inner .. path name element (the parent directory)\n\t   along with the non-.. element that precedes it.\n\n\n\t4. Eliminate .. elements that begin a rooted path:\n\t   that is, replace &quot;/..&quot; by &quot;/&quot; at the beginning of a path.</pre>\n<p>\n</p>"
  },
  {
    "path": "testData/doc/commentEndsWithIndentedBlock_source.txt",
    "content": "Clean returns the shortest path name equivalent to path\nby purely lexical processing.  It applies the following rules\niteratively until no further processing can be done:\n\n\t1. Replace multiple slashes with a single slash.\n\t2. Eliminate each . path name element (the current directory).\n\t3. Eliminate each inner .. path name element (the parent directory)\n\t   along with the non-.. element that precedes it.\n\n\n\t4. Eliminate .. elements that begin a rooted path:\n\t   that is, replace \"/..\" by \"/\" at the beginning of a path.\n\n\n\n"
  },
  {
    "path": "testData/doc/constants.go",
    "content": "package a\n\ntype FooBar string\n\nconst (\n\tx FooBar = \"something\"\n)\n\nfunc foo(FooBar) {}\n\nfunc _() {\n\tfoo(x<caret>)\n}"
  },
  {
    "path": "testData/doc/constants.txt",
    "content": "<b>const x <a href=\"psi_element://#a.FooBar\">FooBar</a> = \"something\"</b>\n\n=====\nconst x <a href=\"psi_element://#a.FooBar\">FooBar</a> = \"something\"\n=====\nNo urls\n=====\nNo local urls"
  },
  {
    "path": "testData/doc/escape.go",
    "content": "package a; \nfunc _() {Replac<caret>e()}\n// If n < 0, there is no limit on the number of replacements.\nfunc Replace(s, old, new string, n int) string {return s}"
  },
  {
    "path": "testData/doc/escape.txt",
    "content": "<b>func Replace(s <a href=\"psi_element://builtin#builtin.string\">string</a>, old <a href=\"psi_element://builtin#builtin.string\">string</a>, new <a href=\"psi_element://builtin#builtin.string\">string</a>, n <a href=\"psi_element://builtin#builtin.int\">int</a>) <a href=\"psi_element://builtin#builtin.string\">string</a></b>\n<p>If n &lt; 0, there is no limit on the number of replacements.\n</p>\n\n=====\nfunc Replace(s <a href=\"psi_element://builtin#builtin.string\">string</a>, old <a href=\"psi_element://builtin#builtin.string\">string</a>, new <a href=\"psi_element://builtin#builtin.string\">string</a>, n <a href=\"psi_element://builtin#builtin.int\">int</a>) <a href=\"psi_element://builtin#builtin.string\">string</a>\n=====\nhttps://godoc.org/#Replace\n=====\nNo local urls"
  },
  {
    "path": "testData/doc/escapeReturnValues.go",
    "content": "package a; \nfunc _() {Replac<caret>e()}\n// If n < 0, there is no limit on the number of replacements.\nfunc Replace(s, old, new string, n int) <-chan string {return s}"
  },
  {
    "path": "testData/doc/escapeReturnValues.txt",
    "content": "<b>func Replace(s <a href=\"psi_element://builtin#builtin.string\">string</a>, old <a href=\"psi_element://builtin#builtin.string\">string</a>, new <a href=\"psi_element://builtin#builtin.string\">string</a>, n <a href=\"psi_element://builtin#builtin.int\">int</a>) &lt;-chan <a href=\"psi_element://builtin#builtin.string\">string</a></b>\n<p>If n &lt; 0, there is no limit on the number of replacements.\n</p>\n\n=====\nfunc Replace(s <a href=\"psi_element://builtin#builtin.string\">string</a>, old <a href=\"psi_element://builtin#builtin.string\">string</a>, new <a href=\"psi_element://builtin#builtin.string\">string</a>, n <a href=\"psi_element://builtin#builtin.int\">int</a>) &lt;-chan <a href=\"psi_element://builtin#builtin.string\">string</a>\n=====\nhttps://godoc.org/#Replace\n=====\nNo local urls"
  },
  {
    "path": "testData/doc/fieldDeclaration.go",
    "content": "package main\n// Demo1 struct thigy\ntype Demo1 struct {\n    Fiel<caret>d1 string\n    Field2 string\n}"
  },
  {
    "path": "testData/doc/fieldDeclaration.txt",
    "content": "=====\nNo navigation info\n=====\nNo urls\n=====\nNo local urls"
  },
  {
    "path": "testData/doc/fprintln.go",
    "content": "package a; import \"fmt\"; func foo() {fmt.Fprintl<caret>n(\"Hello\")}"
  },
  {
    "path": "testData/doc/fprintln.txt",
    "content": "<b>func Fprintln(w <a href=\"psi_element://io\">io</a>.<a href=\"psi_element://io#io.Writer\">Writer</a>, a ...interface{}) (n <a href=\"psi_element://builtin#builtin.int\">int</a>, err <a href=\"psi_element://builtin#builtin.error\">error</a>)</b>\n<p>Fprintln formats using the default formats for its operands and writes to w.\nSpaces are always added between operands and a newline is appended.\nIt returns the number of bytes written and any write error encountered.\n</p>\n\n=====\nfunc Fprintln(w <a href=\"psi_element://io\">io</a>.<a href=\"psi_element://io#io.Writer\">Writer</a>, a ...interface{}) (n <a href=\"psi_element://builtin#builtin.int\">int</a>, err <a href=\"psi_element://builtin#builtin.error\">error</a>)\n=====\nhttps://godoc.org/fmt#Fprintln\n=====\nNo local urls"
  },
  {
    "path": "testData/doc/functionType.go",
    "content": "package main\n\nfunc main() {\n  f<caret>oo()\n}\n\nfunc foo(i int, f func(s string, u uint32)) (f func(s string, u uint32)) {\n\n}"
  },
  {
    "path": "testData/doc/functionType.txt",
    "content": "<b>func foo(i <a href=\"psi_element://builtin#builtin.int\">int</a>, f func (s <a href=\"psi_element://builtin#builtin.string\">string</a>, u <a href=\"psi_element://builtin#builtin.uint32\">uint32</a>)) (f func (s <a href=\"psi_element://builtin#builtin.string\">string</a>, u <a href=\"psi_element://builtin#builtin.uint32\">uint32</a>))</b>\n\n=====\nfunc foo(i <a href=\"psi_element://builtin#builtin.int\">int</a>, f func (s <a href=\"psi_element://builtin#builtin.string\">string</a>, u <a href=\"psi_element://builtin#builtin.uint32\">uint32</a>)) (f func (s <a href=\"psi_element://builtin#builtin.string\">string</a>, u <a href=\"psi_element://builtin#builtin.uint32\">uint32</a>))\n=====\nhttps://godoc.org/#foo\n=====\nNo local urls"
  },
  {
    "path": "testData/doc/indentedBlock_after.txt",
    "content": "<p>Clean returns the shortest path name equivalent to path\nby purely lexical processing.  It applies the following rules\niteratively until no further processing can be done:\n</p>\n<pre>\t1. Replace multiple slashes with a single slash.\n\t2. Eliminate each . path name element (the current directory).\n\t3. Eliminate each inner .. path name element (the parent directory)\n\t   along with the non-.. element that precedes it.\n\n\n\t4. Eliminate .. elements that begin a rooted path:\n\t   that is, replace &quot;/..&quot; by &quot;/&quot; at the beginning of a path.</pre>\n<p>The returned path ends in a slash only if it is the root &quot;/&quot;.\n</p>"
  },
  {
    "path": "testData/doc/indentedBlock_source.txt",
    "content": "Clean returns the shortest path name equivalent to path\nby purely lexical processing.  It applies the following rules\niteratively until no further processing can be done:\n\n\t1. Replace multiple slashes with a single slash.\n\t2. Eliminate each . path name element (the current directory).\n\t3. Eliminate each inner .. path name element (the parent directory)\n\t   along with the non-.. element that precedes it.\n\n\n\t4. Eliminate .. elements that begin a rooted path:\n\t   that is, replace \"/..\" by \"/\" at the beginning of a path.\n\n\n\n\nThe returned path ends in a slash only if it is the root \"/\"."
  },
  {
    "path": "testData/doc/links_after.txt",
    "content": "<p>If the result of this process is an empty string, Clean\nreturns the string &quot;.&quot;.\n</p>\n<p>See also Rob Pike, &ldquo;Lexical File Names in Plan 9 or\nGetting Dot-Dot Right,&rdquo;\n<a href=\"http://plan9.bell-labs.com/sys/doc/lexnames.html\">http://plan9.bell-labs.com/sys/doc/lexnames.html</a>\n</p>"
  },
  {
    "path": "testData/doc/links_source.txt",
    "content": "If the result of this process is an empty string, Clean\nreturns the string \".\".\n\nSee also Rob Pike, ``Lexical File Names in Plan 9 or\nGetting Dot-Dot Right,''\nhttp://plan9.bell-labs.com/sys/doc/lexnames.html"
  },
  {
    "path": "testData/doc/method.go",
    "content": "package main\n\nimport `os`\n\nfunc _() {\n  var file, _ = os.Open(\"name\")\n  file.Na<caret>me()\n}"
  },
  {
    "path": "testData/doc/method.txt",
    "content": "<b>func Name() <a href=\"psi_element://builtin#builtin.string\">string</a></b>\n<p>Name returns the name of the file as presented to Open.\n</p>\n\n=====\nfunc Name() <a href=\"psi_element://builtin#builtin.string\">string</a>\n=====\nhttps://godoc.org/os#File.Name\n=====\nNo local urls"
  },
  {
    "path": "testData/doc/multiBlockDoc_after.txt",
    "content": "<p>MultiBlock func comment\n</p>\n<p>Second block\nSecond block\n</p>\n<p>Third block\n</p>"
  },
  {
    "path": "testData/doc/multiBlockDoc_source.txt",
    "content": "MultiBlock func comment\n\nSecond block\nSecond block\n\n\nThird block"
  },
  {
    "path": "testData/doc/multilineTypeListDefinition.go",
    "content": "package a; import \"docs\"; func foo() {docs.Multi<caret>Type()}"
  },
  {
    "path": "testData/doc/multilineTypeListDefinition.txt",
    "content": "<b>func MultiType(demo interface{}, err <a href=\"psi_element://builtin#builtin.error\">error</a>) ([]interface{}, <a href=\"psi_element://builtin#builtin.error\">error</a>)</b>\n<p>MultiType is a function like all other functions\n</p>\n\n=====\nfunc MultiType(demo interface{}, err <a href=\"psi_element://builtin#builtin.error\">error</a>) ([]interface{}, <a href=\"psi_element://builtin#builtin.error\">error</a>)\n=====\nhttps://godoc.org/docs#MultiType\n=====\nNo local urls"
  },
  {
    "path": "testData/doc/multilineVariable_1.go",
    "content": "package main\nimport \"docs\"\n\nfunc main() {\n\tprintln(docs.InnerVariab<caret>le_1)\n}"
  },
  {
    "path": "testData/doc/multilineVariable_1.txt",
    "content": "<b>var InnerVariable_1 <a href=\"psi_element://builtin#builtin.int\">int</a></b>\n<p>InnerVariable_1\n</p>\n\n=====\nvar InnerVariable_1 <a href=\"psi_element://builtin#builtin.int\">int</a>\n=====\nNo urls\n=====\nNo local urls"
  },
  {
    "path": "testData/doc/multilineVariable_2.go",
    "content": "package main\nimport \"docs\"\n\nfunc main() {\n\tprintln(docs.InnerVariab<caret>le_2)\n}"
  },
  {
    "path": "testData/doc/multilineVariable_2.txt",
    "content": "<b>var InnerVariable_2 <a href=\"psi_element://builtin#builtin.int\">int</a></b>\n<p>InnerVariable_2 \n</p>\n\n=====\nvar InnerVariable_2 <a href=\"psi_element://builtin#builtin.int\">int</a>\n=====\nNo urls\n=====\nNo local urls"
  },
  {
    "path": "testData/doc/multilineVariable_3.go",
    "content": "package main\nimport \"docs\"\n\nfunc main() {\n\tprintln(docs.InnerVariab<caret>le_3)\n}"
  },
  {
    "path": "testData/doc/multilineVariable_3.txt",
    "content": "<b>var InnerVariable_3 <a href=\"psi_element://builtin#builtin.int\">int</a></b>\n<p>InnerVariable_3 \n</p>\n\n=====\nvar InnerVariable_3 <a href=\"psi_element://builtin#builtin.int\">int</a>\n=====\nNo urls\n=====\nNo local urls"
  },
  {
    "path": "testData/doc/multilineVariable_4.go",
    "content": "package main\nimport \"docs\"\n\nfunc main() {\n\tprintln(docs.InnerVariab<caret>le_4)\n}"
  },
  {
    "path": "testData/doc/multilineVariable_4.txt",
    "content": "<b>var InnerVariable_4 <a href=\"psi_element://builtin#builtin.int\">int</a></b>\n<p>InnerVariable_4\n</p>\n\n=====\nvar InnerVariable_4 <a href=\"psi_element://builtin#builtin.int\">int</a>\n=====\nNo urls\n=====\nNo local urls"
  },
  {
    "path": "testData/doc/multilineVariable_5.go",
    "content": "package main\nimport \"docs\"\n\nfunc main() {\n\tprintln(docs.InnerVariab<caret>le_5)\n}"
  },
  {
    "path": "testData/doc/multilineVariable_5.txt",
    "content": "<b>var InnerVariable_5 <a href=\"psi_element://builtin#builtin.int\">int</a></b>\n<p>Global comment\n</p>\n\n=====\nvar InnerVariable_5 <a href=\"psi_element://builtin#builtin.int\">int</a>\n=====\nNo urls\n=====\nNo local urls"
  },
  {
    "path": "testData/doc/package.go",
    "content": "package a; import \"io<caret>\""
  },
  {
    "path": "testData/doc/package.txt",
    "content": "<b>Package io</b>\n<p><code>import \"io\"</code></p>\n<p>Package io provides basic interfaces to I/O primitives.\nIts primary job is to wrap existing implementations of such primitives,\nsuch as those in package os, into shared public interfaces that\nabstract the functionality, plus some other related primitives.\n</p>\n<p>Because these interfaces and primitives wrap lower-level operations with\nvarious implementations, unless otherwise informed clients should not\nassume they are safe for parallel execution.\n</p>\n\n=====\nNo navigation info\n=====\nhttps://godoc.org/io\n=====\nio"
  },
  {
    "path": "testData/doc/packageOnImportAlias.go",
    "content": "package a; import myIO \"io\";\n\nfunc _() {\n  myI<caret>O.EOF();\n}"
  },
  {
    "path": "testData/doc/packageOnImportAlias.txt",
    "content": "<b>Package io</b>\n<p><code>import \"io\"</code></p>\n<p>Package io provides basic interfaces to I/O primitives.\nIts primary job is to wrap existing implementations of such primitives,\nsuch as those in package os, into shared public interfaces that\nabstract the functionality, plus some other related primitives.\n</p>\n<p>Because these interfaces and primitives wrap lower-level operations with\nvarious implementations, unless otherwise informed clients should not\nassume they are safe for parallel execution.\n</p>\n\n=====\nNo navigation info\n=====\nhttps://godoc.org/io\n=====\nNo local urls"
  },
  {
    "path": "testData/doc/packageOnQualifier.go",
    "content": "package a; import \"io\";\n\nfunc _() {\n  i<caret>o.EOF();\n}"
  },
  {
    "path": "testData/doc/packageOnQualifier.txt",
    "content": "<b>Package io</b>\n<p><code>import \"io\"</code></p>\n<p>Package io provides basic interfaces to I/O primitives.\nIts primary job is to wrap existing implementations of such primitives,\nsuch as those in package os, into shared public interfaces that\nabstract the functionality, plus some other related primitives.\n</p>\n<p>Because these interfaces and primitives wrap lower-level operations with\nvarious implementations, unless otherwise informed clients should not\nassume they are safe for parallel execution.\n</p>\n\n=====\nNo navigation info\n=====\nhttps://godoc.org/io\n=====\nio"
  },
  {
    "path": "testData/doc/packageWithDoc.go",
    "content": "package a; import \"fm<caret>t\""
  },
  {
    "path": "testData/doc/packageWithDoc.txt",
    "content": "<b>Package fmt</b>\n<p><code>import \"fmt\"</code></p>\n<p>Package fmt implements formatted I/O with functions analogous\nto C's printf and scanf.  The format 'verbs' are derived from C's but\nare simpler.\n</p>\n\n=====\nNo navigation info\n=====\nhttps://godoc.org/fmt\n=====\nfmt"
  },
  {
    "path": "testData/doc/parameter.go",
    "content": "package main\n\nfunc function(foo string) {\n    println(fo<caret>o)\n}"
  },
  {
    "path": "testData/doc/parameter.txt",
    "content": "<b>var foo <a href=\"psi_element://builtin#builtin.string\">string</a></b>\n\n=====\nvar foo <a href=\"psi_element://builtin#builtin.string\">string</a>\n=====\nNo urls\n=====\nNo local urls"
  },
  {
    "path": "testData/doc/pointer.go",
    "content": "package main\n\ntype S struct {}\n\nfunc main() {\n\tfoo := new(S)\n\tfo<caret>o\n}"
  },
  {
    "path": "testData/doc/pointer.txt",
    "content": "<b>var foo *<a href=\"psi_element://#main.S\">S</a> = new(S)</b>\n\n=====\nvar foo *<a href=\"psi_element://#main.S\">S</a> = new(S)\n=====\nNo urls\n=====\nNo local urls"
  },
  {
    "path": "testData/doc/println.go",
    "content": "package a; import \"fmt\"; func foo() {fmt.Printl<caret>n}"
  },
  {
    "path": "testData/doc/println.txt",
    "content": "<b>func Println(a ...interface{}) (n <a href=\"psi_element://builtin#builtin.int\">int</a>, err <a href=\"psi_element://builtin#builtin.error\">error</a>)</b>\n<p>Println formats using the default formats for its operands and writes to standard output.\nSpaces are always added between operands and a newline is appended.\nIt returns the number of bytes written and any write error encountered.\n</p>\n\n=====\nfunc Println(a ...interface{}) (n <a href=\"psi_element://builtin#builtin.int\">int</a>, err <a href=\"psi_element://builtin#builtin.error\">error</a>)\n=====\nhttps://godoc.org/fmt#Println\n=====\nNo local urls"
  },
  {
    "path": "testData/doc/quotedStrings_after.txt",
    "content": "<p>Escape comment text for HTML. If nice is set,\nalso turn &ldquo; into &amp;ldquo; and &rdquo; into &amp;rdquo;.\n</p>\n<pre>   Escape comment text for HTML. If nice is set,\n   also turn `` into &amp;ldquo; and '' into &amp;rdquo;.</pre>\n<p>\n</p>"
  },
  {
    "path": "testData/doc/quotedStrings_source.txt",
    "content": "Escape comment text for HTML. If nice is set,\nalso turn `` into &ldquo; and '' into &rdquo;.\n   Escape comment text for HTML. If nice is set,\n   also turn `` into &ldquo; and '' into &rdquo;."
  },
  {
    "path": "testData/doc/receiver.go",
    "content": "package main\n\ntype a int\n\nfunc (foo a) method() {\n    println(fo<caret>o)\n}"
  },
  {
    "path": "testData/doc/receiver.txt",
    "content": "<b>var foo <a href=\"psi_element://#main.a\">a</a></b>\n\n=====\nvar foo <a href=\"psi_element://#main.a\">a</a>\n=====\nNo urls\n=====\nNo local urls"
  },
  {
    "path": "testData/doc/resultParameter.go",
    "content": "package main\n\nfunc function() (foo string) {\n    println(fo<caret>o)\n}"
  },
  {
    "path": "testData/doc/resultParameter.txt",
    "content": "<b>var foo <a href=\"psi_element://builtin#builtin.string\">string</a></b>\n\n=====\nvar foo <a href=\"psi_element://builtin#builtin.string\">string</a>\n=====\nNo urls\n=====\nNo local urls"
  },
  {
    "path": "testData/doc/signature.go",
    "content": "package a; \nfunc _() {Fo<caret>o()}\n// If n < 0, there is no limit on the number of replacements.\nfunc Foo(a map[int]*string, b (string), c string, int) (<-chan string, int) {return c}"
  },
  {
    "path": "testData/doc/signature.txt",
    "content": "<b>func Foo(a map[<a href=\"psi_element://builtin#builtin.int\">int</a>]*<a href=\"psi_element://builtin#builtin.string\">string</a>, b (<a href=\"psi_element://builtin#builtin.string\">string</a>), c <a href=\"psi_element://builtin#builtin.string\">string</a>, <a href=\"psi_element://builtin#builtin.int\">int</a>) (&lt;-chan <a href=\"psi_element://builtin#builtin.string\">string</a>, <a href=\"psi_element://builtin#builtin.int\">int</a>)</b>\n<p>If n &lt; 0, there is no limit on the number of replacements.\n</p>\n\n=====\nfunc Foo(a map[<a href=\"psi_element://builtin#builtin.int\">int</a>]*<a href=\"psi_element://builtin#builtin.string\">string</a>, b (<a href=\"psi_element://builtin#builtin.string\">string</a>), c <a href=\"psi_element://builtin#builtin.string\">string</a>, <a href=\"psi_element://builtin#builtin.int\">int</a>) (&lt;-chan <a href=\"psi_element://builtin#builtin.string\">string</a>, <a href=\"psi_element://builtin#builtin.int\">int</a>)\n=====\nhttps://godoc.org/#Foo\n=====\nNo local urls"
  },
  {
    "path": "testData/doc/specType.go",
    "content": "package main\n\nfunc main() {\n\tclient := &MyType{}\n\t_, err := cl<caret>ient.Foo()\n\tprintln(err)\n}\n\ntype MyType struct {\n\tMyField int\n}\n\nfunc (c *MyType) Foo() (resp *MyType, err error) {\n\treturn c, error(\"error\")\n}\n"
  },
  {
    "path": "testData/doc/specType.txt",
    "content": "<b>var client <a href=\"psi_element://#main.MyType\">MyType</a> = &MyType{}</b>\n\n=====\nvar client <a href=\"psi_element://#main.MyType\">MyType</a> = &MyType{}\n=====\nNo urls\n=====\nNo local urls"
  },
  {
    "path": "testData/doc/struct.go",
    "content": "package main\n\nvar st struct {\n  x int64\n  y int\n)\n\nfunc Test() {\n  s<caret>t = nil\n}"
  },
  {
    "path": "testData/doc/struct.txt",
    "content": "<b>var st struct {x <a href=\"psi_element://builtin#builtin.int64\">int64</a>; y <a href=\"psi_element://builtin#builtin.int\">int</a>}</b>\n\n=====\nvar st struct {x <a href=\"psi_element://builtin#builtin.int64\">int64</a>; y <a href=\"psi_element://builtin#builtin.int\">int</a>}\n=====\nNo urls\n=====\nNo local urls"
  },
  {
    "path": "testData/doc/structWithAnon.go",
    "content": "package main\n\nvar st struct {\n  int64\n  int\n  *string\n)\n\nfunc Test() {\n  s<caret>t = nil\n}"
  },
  {
    "path": "testData/doc/structWithAnon.txt",
    "content": "<b>var st struct {<a href=\"psi_element://builtin#builtin.int64\">int64</a>; <a href=\"psi_element://builtin#builtin.int\">int</a>; *<a href=\"psi_element://builtin#builtin.string\">string</a>}</b>\n\n=====\nvar st struct {<a href=\"psi_element://builtin#builtin.int64\">int64</a>; <a href=\"psi_element://builtin#builtin.int\">int</a>; *<a href=\"psi_element://builtin#builtin.string\">string</a>}\n=====\nNo urls\n=====\nNo local urls"
  },
  {
    "path": "testData/doc/typeInnerDefinitionWithoutComment.go",
    "content": "package main\n\n// my comment\ntype (\n  // my inner comment\n  MyType1 int64\n  MyType2 int64\n)\n\nfunc Test(t MyTy<caret>pe2) {\n  \n}"
  },
  {
    "path": "testData/doc/typeInnerDefinitionWithoutComment.txt",
    "content": "<b>type MyType2</b>\n<p>my comment\n</p>\n\n=====\ntype MyType2\n=====\nhttps://godoc.org/#MyType2\n=====\n#main.MyType2"
  },
  {
    "path": "testData/doc/typeResultDefinition.go",
    "content": "package a; import \"docs\"; func foo() {docs.Type<caret>Result()}"
  },
  {
    "path": "testData/doc/typeResultDefinition.txt",
    "content": "<b>func TypeResult(s <a href=\"psi_element://builtin#builtin.string\">string</a>) <a href=\"psi_element://builtin#builtin.string\">string</a></b>\n<p>TypeResult func comment\n</p>\n\n=====\nfunc TypeResult(s <a href=\"psi_element://builtin#builtin.string\">string</a>) <a href=\"psi_element://builtin#builtin.string\">string</a>\n=====\nhttps://godoc.org/docs#TypeResult\n=====\nNo local urls"
  },
  {
    "path": "testData/doc/typeSpec.go",
    "content": "package main\n\n// my comment\ntype MyType int64\n\nfunc Test(t MyTy<caret>pe) {\n  \n}"
  },
  {
    "path": "testData/doc/typeSpec.txt",
    "content": "<b>type MyType</b>\n<p>my comment\n</p>\n\n=====\ntype MyType\n=====\nhttps://godoc.org/#MyType\n=====\n#main.MyType"
  },
  {
    "path": "testData/doc/typeTopDefinition.go",
    "content": "package main\n\n// my comment\ntype (\n  // my inner comment\n  MyType1 int64\n  MyType2 int64\n)\n\nfunc Test(t MyTy<caret>pe1) {\n  \n}"
  },
  {
    "path": "testData/doc/typeTopDefinition.txt",
    "content": "<b>type MyType1</b>\n<p>my inner comment\n</p>\n\n=====\ntype MyType1\n=====\nhttps://godoc.org/#MyType1\n=====\n#main.MyType1"
  },
  {
    "path": "testData/doc/varShortDefinition.go",
    "content": "package main\n\nfunc main() {\n\tclient := &MyType{}\n\t_, err := client.Foo()\n\tprintln(er<caret>r)\n}\n\ntype MyType struct {\n\tMyField int\n}\n\nfunc (c *MyType) Foo() (resp *MyType, err error) {\n\treturn c, error(\"error\")\n}\n"
  },
  {
    "path": "testData/doc/varShortDefinition.txt",
    "content": "<b>var err <a href=\"psi_element://builtin#builtin.error\">error</a></b>\n\n=====\nvar err <a href=\"psi_element://builtin#builtin.error\">error</a>\n=====\nNo urls\n=====\nNo local urls"
  },
  {
    "path": "testData/doc/variable.go",
    "content": "package a; \n// test\nvar an = 1; func foo() {a<caret>n}"
  },
  {
    "path": "testData/doc/variable.txt",
    "content": "<b>var an <a href=\"psi_element://builtin#builtin.int\">int</a> = 1</b>\n<p>test\n</p>\n\n=====\nvar an <a href=\"psi_element://builtin#builtin.int\">int</a> = 1\n=====\nNo urls\n=====\nNo local urls"
  },
  {
    "path": "testData/doc/variableInSwitch.go",
    "content": "package main\n\ntype Foo struct {}\n\nfunc _() {\n\tvar err interface{}\n\tswitch err := err.(type) {\n\tcase Foo:\n\t\tprintln(e<caret>rr)\n\t}\n}"
  },
  {
    "path": "testData/doc/variableInSwitch.txt",
    "content": "<b>var err <a href=\"psi_element://#main.Foo\">Foo</a> = err</b>\n\n=====\nvar err <a href=\"psi_element://#main.Foo\">Foo</a> = err\n=====\nNo urls\n=====\nNo local urls"
  },
  {
    "path": "testData/editor/statement-mover/anonymousFunction-afterDown.go",
    "content": "package main\n\nfunc _() {\n  if {\n\t  A(func() {\n\t  })\n\n  }\n}\n\n\nfunc A(func()) {}"
  },
  {
    "path": "testData/editor/statement-mover/anonymousFunction-afterUp.go",
    "content": "package main\n\nfunc _() {\n  A(func() {\n  })\n  if {\n\n  }\n}\n\n\nfunc A(func()) {}"
  },
  {
    "path": "testData/editor/statement-mover/anonymousFunction.go",
    "content": "package main\n\nfunc _() {\n  A(fun<caret>c() {\n  })\n  if {\n\n  }\n}\n\n\nfunc A(func()) {}"
  },
  {
    "path": "testData/editor/statement-mover/anonymousFunctionAtAssignment-afterDown.go",
    "content": "package main\n\nfunc a() {\n  if {\n\t  var _ func() = func() {\n\t  }\n\n  }\n}\n\n\nfunc A(func()) {}"
  },
  {
    "path": "testData/editor/statement-mover/anonymousFunctionAtAssignment-afterUp.go",
    "content": "package main\n\nfunc a() {\n  var _ func() = func() {\n  }\n  if {\n\n  }\n}\n\n\nfunc A(func()) {}"
  },
  {
    "path": "testData/editor/statement-mover/anonymousFunctionAtAssignment.go",
    "content": "package main\n\nfunc a() {\n  var _ func() = <selection>func</selection>() {\n  }\n  if {\n\n  }\n}\n\n\nfunc A(func()) {}"
  },
  {
    "path": "testData/editor/statement-mover/functionDeclaration-afterDown.go",
    "content": "package main\n\nfunc main() {\n  var a int\n  if true {\n\n  }\n}"
  },
  {
    "path": "testData/editor/statement-mover/functionDeclaration-afterUp.go",
    "content": "package main\n\nfunc main() {\n  var a int\n  if true {\n\n  }\n}"
  },
  {
    "path": "testData/editor/statement-mover/functionDeclaration.go",
    "content": "package main\n\nfunc ma<caret>in() {\n  var a int\n  if true {\n\n  }\n}"
  },
  {
    "path": "testData/editor/statement-mover/functionDeclarationWithFewTopLevelDeclarations-afterUp.go",
    "content": "package main\n\nimport()\n\nfunc main() {\n  var a int\n  if true {\n\n  }\n}\n\nfunc _() {\n\n}"
  },
  {
    "path": "testData/editor/statement-mover/functionDeclarationWithFewTopLevelDeclarations.go",
    "content": "package main\n\nimport()\n\nfunc ma<caret>in() {\n  var a int\n  if true {\n\n  }\n}\n\nfunc _() {\n\n}"
  },
  {
    "path": "testData/editor/statement-mover/functionDeclarationWithFewTopLevelDeclarationsDown-afterDown.go",
    "content": "package main\n\nimport()\n\nfunc _() {\n\n}\n\nfunc main() {\n\tvar a int\n\tif true {\n\n\t}\n}\n"
  },
  {
    "path": "testData/editor/statement-mover/functionDeclarationWithFewTopLevelDeclarationsDown.go",
    "content": "package main\n\nimport()\n\nfunc ma<caret>in() {\n  var a int\n  if true {\n\n  }\n}\n\nfunc _() {\n\n}"
  },
  {
    "path": "testData/editor/statement-mover/import-afterUp.go",
    "content": "package main\n\nimport(\n\t\"fmt\"\n)\n\nimport()\n\nfunc main() {\n  var a int\n  if true {\n\n  }\n}\n\nfunc _() {\n\n}"
  },
  {
    "path": "testData/editor/statement-mover/import.go",
    "content": "package main\n\nimport()\n\nim<caret>port(\n    \"fmt\"\n)\n\nfunc main() {\n  var a int\n  if true {\n\n  }\n}\n\nfunc _() {\n\n}"
  },
  {
    "path": "testData/editor/statement-mover/importDown-afterDown.go",
    "content": "package main\n\nimport()\n\nimport(\n    \"fmt\"\n)\n\nfunc main() {\n  var a int\n  if true {\n\n  }\n}\n\nfunc _() {\n\n}"
  },
  {
    "path": "testData/editor/statement-mover/importDown.go",
    "content": "package main\n\nimport()\n\nim<caret>port(\n    \"fmt\"\n)\n\nfunc main() {\n  var a int\n  if true {\n\n  }\n}\n\nfunc _() {\n\n}"
  },
  {
    "path": "testData/editor/statement-mover/importWithCaretAtImportString-afterDown.go",
    "content": "package main\n\nimport(\n    \"fmt\"\n)\n"
  },
  {
    "path": "testData/editor/statement-mover/importWithCaretAtImportString-afterUp.go",
    "content": "package main\n\nimport(\n    \"fmt\"\n)\n"
  },
  {
    "path": "testData/editor/statement-mover/importWithCaretAtImportString.go",
    "content": "package main\n\nimport(\n    \"fm<caret>t\"\n)\n"
  },
  {
    "path": "testData/editor/statement-mover/importWithCaretAtLastImport-afterUp.go",
    "content": "package main\n\nimport(\n\t\"fmt\"\n)\n\nimport()\n\nfunc main() {\n  var a int\n  if true {\n\n  }\n}\n\nfunc _() {\n\n}"
  },
  {
    "path": "testData/editor/statement-mover/importWithCaretAtLastImport.go",
    "content": "package main\n\nimport()\n\nimport(\n    \"fmt\"\n<caret>)\n\nfunc main() {\n  var a int\n  if true {\n\n  }\n}\n\nfunc _() {\n\n}"
  },
  {
    "path": "testData/editor/statement-mover/insertedStatement-afterUp.go",
    "content": "package main\n\nfunc main() {\n  var a int\n\tif false {\n\n\t}\n\tif true {\n  }\n}"
  },
  {
    "path": "testData/editor/statement-mover/insertedStatement.go",
    "content": "package main\n\nfunc main() {\n  var a int\n  if true {\n      if false <caret>{\n\n      }\n  }\n}"
  },
  {
    "path": "testData/editor/statement-mover/insertedStatementDown-afterDown.go",
    "content": "package main\n\nfunc main() {\n  var a int\n  if true {\n  }\n\tif false {\n\n\t}\n}"
  },
  {
    "path": "testData/editor/statement-mover/insertedStatementDown.go",
    "content": "package main\n\nfunc main() {\n  var a int\n  if true {\n    if false <caret>{\n\n    }\n  }\n}"
  },
  {
    "path": "testData/editor/statement-mover/package-afterDown.go",
    "content": "package main\n\nimport()\n\nfunc main() {\n  var a int\n  if true {\n\n  }\n}\n\nfunc _() {\n\n}"
  },
  {
    "path": "testData/editor/statement-mover/package-afterUp.go",
    "content": "package main\n\nimport()\n\nfunc main() {\n  var a int\n  if true {\n\n  }\n}\n\nfunc _() {\n\n}"
  },
  {
    "path": "testData/editor/statement-mover/package.go",
    "content": "pack<caret>age main\n\nimport()\n\nfunc main() {\n  var a int\n  if true {\n\n  }\n}\n\nfunc _() {\n\n}"
  },
  {
    "path": "testData/editor/statement-mover/simpleStatement-afterDown.go",
    "content": "package main\n\nfunc main() {\n  if true {\n\t  var a int\n\n  }\n}"
  },
  {
    "path": "testData/editor/statement-mover/simpleStatement-afterUp.go",
    "content": "package main\n\nfunc main() {\n  var a int\n  if true {\n\n  }\n}"
  },
  {
    "path": "testData/editor/statement-mover/simpleStatement.go",
    "content": "package main\n\nfunc main() {\n  var <caret>a int\n  if true {\n\n  }\n}"
  },
  {
    "path": "testData/editor/statement-mover/statementInEndOfBlock-afterDown.go",
    "content": "package main\n\nfunc main() {\n  var a int\n  if true {\n\n  }\n}"
  },
  {
    "path": "testData/editor/statement-mover/statementInEndOfBlock-afterUp.go",
    "content": "package main\n\nfunc main() {\n\tif true {\n\n\t}\n\tvar a int\n}"
  },
  {
    "path": "testData/editor/statement-mover/statementInEndOfBlock.go",
    "content": "package main\n\nfunc main() {\n  var a int\n  if t<caret>rue {\n\n  }\n}"
  },
  {
    "path": "testData/editor/statement-mover/twoFunc-afterDown.go",
    "content": "package main\n\nimport()\n\nfunc main() {\n  var a int\n  if true {\n\n  }\n}\n\nfunc _() {\n\n}\n\nfunc asd() int  {\n  return 1\n}"
  },
  {
    "path": "testData/editor/statement-mover/twoFunc-afterUp.go",
    "content": "package main\n\nimport()\n\nfunc _() {\n\n}\n\nfunc asd() int  {\n\treturn 1\n}\n\nfunc main() {\n  var a int\n  if true {\n\n  }\n}\n"
  },
  {
    "path": "testData/editor/statement-mover/twoFunc.go",
    "content": "package main\n\nimport()\n\nfunc main() {\n  var a int\n  if true {\n\n  }\n}\n\nfunc _() {\n  <selection>\n}\n\nfunc asd() int<caret></selection>  {\n  return 1\n}"
  },
  {
    "path": "testData/editor/statement-mover/twoStatements-afterUp.go",
    "content": "package main\n\nimport()\n\nfunc main() {\n  var a int\n\tif true {\n\n\t}  else {\n\t}\n\tvar k string\n\n  if false {\n\n  }\n}\n\nfunc asd() int  {\n  return 1\n}"
  },
  {
    "path": "testData/editor/statement-mover/twoStatements.go",
    "content": "package main\n\nimport()\n\nfunc main() {\n  var a int\n\n  if true {\n\n  } <selection><caret> else {\n  }\n  </selection>var k string\n  if false {\n\n  }\n}\n\nfunc asd() int  {\n  return 1\n}"
  },
  {
    "path": "testData/editor/statement-mover/twoStatementsDown-afterDown.go",
    "content": "package main\n\nimport()\n\nfunc main() {\n  var a int\n\n  if false {\n\t  if true {\n\n\t  }  else {\n\n\t  }\n\t  var k string\n\n  }\n}\n\nfunc asd() int  {\n  return 1\n}"
  },
  {
    "path": "testData/editor/statement-mover/twoStatementsDown.go",
    "content": "package main\n\nimport()\n\nfunc main() {\n  var a int\n\n  if true {\n\n  } <selection><caret> else {\n\n  }\n  </selection>var k string\n  if false {\n\n  }\n}\n\nfunc asd() int  {\n  return 1\n}"
  },
  {
    "path": "testData/editor/statement-mover/varSpecTopLevelDeclaration-afterDown.go",
    "content": "package main\n\nvar (\n  a  int\n)"
  },
  {
    "path": "testData/editor/statement-mover/varSpecTopLevelDeclaration.go",
    "content": "package main\n\nvar (\n  a <caret> int\n)"
  },
  {
    "path": "testData/folding/compositeLiteral.go",
    "content": "package foo\n\ntype de struct <fold text='{...}'>{\n\tfield1 []int\n\tfield2 string\n\tfield3 int\n}</fold>\n\nfunc demo() <fold text='{...}'>{\n\td := de<fold text='{...}'>{\n\t\tfield1: []int<fold text='{...}'>{1, 2, 3}</fold>,\n\t\tfield2: \"string\",\n\t\tfield3: 1,\n\t}</fold>\n\t_ = d\n}</fold>\n"
  },
  {
    "path": "testData/folding/constDeclaration.go",
    "content": "package foo\n\nconst <fold text='(...)'>(\n\tdemo = 1\n\tdem = \"2\"\n)</fold>\n"
  },
  {
    "path": "testData/folding/emptyImportList.go",
    "content": "package foo\n\nfunc main() <fold text='{...}'>{\n}</fold>"
  },
  {
    "path": "testData/folding/forStatement.go",
    "content": "package foo\n\nfunc main() <fold text='{...}'>{\n\tfor <fold text='{...}'>{\n\t\tprintln()\n\t}</fold>\n\t\n\tsum := 0\n\tfor i := 0; i < 10; i++ <fold text='{...}'>{\n\t\tsum += i\n\t}</fold>\n}</fold>"
  },
  {
    "path": "testData/folding/ifStatement.go",
    "content": "package foo\n\nfunc main() <fold text='{...}'>{\n\tif (true) <fold text='{...}'>{\n\t\tprintln()\n\t}</fold> else <fold text='{...}'>{\n\t\tprintln()\n\t}</fold>\n}</fold>"
  },
  {
    "path": "testData/folding/importList.go",
    "content": "package src\n\nimport <fold text='...'>\"test\"\nimport (\n    \"test\"\n    \"package/path\"\n    \"fmt\"\n    \"encoding/binary\")\nimport \"other\"</fold>\n\nfunc main() <fold text='{...}'>{\n\n}</fold>\n\n"
  },
  {
    "path": "testData/folding/importListWithJustSingleImportKeyword.go",
    "content": "package src\n\nimport\n\nfunc main() <fold text='{...}'>{\n\n}</fold>\n\n"
  },
  {
    "path": "testData/folding/importListWithNewLineAfterKeyword.go",
    "content": "package src\n\nimport\n<fold text='...'>\"test\"\nimport (\n    \"test\"\n    \"package/path\"\n    \"fmt\"\n    \"encoding/binary\")\nimport \"other\"</fold>\n\nfunc main() <fold text='{...}'>{\n\n}</fold>\n\n"
  },
  {
    "path": "testData/folding/importListWithOnlyThreeSymbolsToFold.go",
    "content": "package src\n\nimport \"C\"\n\nfunc main() <fold text='{...}'>{\n\n}</fold>\n\n"
  },
  {
    "path": "testData/folding/importListWithoutSpaceBetweenKeywordAndParen.go",
    "content": "package src\n\nimport<fold text='...'>(\n    \"test\"\n    \"package/path\"\n    \"fmt\"\n    \"encoding/binary\")\nimport \"test\"\nimport \"other\"</fold>\n\nfunc main() <fold text='{...}'>{\n\n}</fold>\n\n"
  },
  {
    "path": "testData/folding/importListWithoutSpaceBetweenKeywordAndString.go",
    "content": "package src\n\nimport<fold text='...'>\"other\"\nimport(\n    \"test\"\n    \"package/path\"\n    \"fmt\"\n    \"encoding/binary\")\nimport \"test\"</fold>\n\nfunc main() <fold text='{...}'>{\n\n}</fold>\n\n"
  },
  {
    "path": "testData/folding/simple.go",
    "content": "package foo\n\nimport <fold text='...'>(\n  \"aaaa\"\n  \"fmt\"\n)</fold>\n\nfunc test() <fold text='{...}'>{\n  return 1\n}</fold>\n\nfunc (i int) test() <fold text='{...}'>{\n  return 1\n}</fold>\n\nSomeMethod(func() <fold text='{...}'>{\n    SomeOtherMethod(func() <fold text='{...}'>{\n        return 1\n    }</fold>)\n}</fold>)\n\ntype A struct <fold text='{...}'>{\n    in int\n}</fold>\n\ntype C interface <fold text='{...}'>{\n    Foo() int\n}</fold>\n\ntype D interface {\n  \n}\ntype T struct {\n  \n}\n"
  },
  {
    "path": "testData/folding/switchSelectCaseStatement.go",
    "content": "package foo\n\nfunc main() <fold text='{...}'>{\n\tch := make(chan int)\n\tselect <fold text='{...}'>{\n\tcase _ <- ch:<fold text='...'>\n\t\tprintln(\"demo\")</fold>\n\tcase _ <- ch:<fold text='...'>\n\t\tprintln(\"demo\")\n\t\tprintln(\"demo\")</fold>\n\t}</fold>\n\n\tswitch true <fold text='{...}'>{\n\tcase 1 == 2:<fold text='...'>\n\t\tprintln(\"demo\")</fold>\n\n\tcase 2 == 3:<fold text='...'>\n\t\tprintln(\"demo\")\n\t\tprintln(\"demo\")</fold>\n\n\tdefault:<fold text='...'>\n\t\tprintln(\"demo\")\n\t\tprintln(\"demo\")\n\t\tprintln(\"demo\")</fold>\n\t}</fold>\n\n\tswitch true <fold text='{...}'>{\n\tcase 3 == 4:<fold text='...'>\n\t\t<fold text='{...}'>{\n\t\t\tprintln(\"demo\")\n\t\t}</fold></fold>\n\n\tdefault:<fold text='...'>\n\t\tprintln(\"demo\")</fold>\n\t}</fold>\n\n}</fold>"
  },
  {
    "path": "testData/folding/typeDeclaration.go",
    "content": "package foo\n\ntype <fold text='(...)'>(\n\tdemo struct{}\n\tdem struct{}\n)</fold>\n"
  },
  {
    "path": "testData/folding/typeSwitchStatement.go",
    "content": "package main\n\nfunc main() <fold text='{...}'>{\n    var a interface{}\n    switch t := a.(type) {\n    case S:<fold text='...'>\n        println(t./*ref*/a)</fold>\n    case D:<fold text='...'>\n        break</fold>\n    }\n}</fold>"
  },
  {
    "path": "testData/folding/varDeclaration.go",
    "content": "package foo\n\nvar <fold text='(...)'>(\n\tdemo = 1\n\tdem = \"2\"\n)</fold>\n"
  },
  {
    "path": "testData/formatting/breakLines-after.go",
    "content": "package main\n\nimport ()\nimport ()\nimport ()\nimport (\n\tfoo \"io\"\n\tfoo \"io\"\n\n\tfoo \"io\"\n\n\tfoo \"io\"\n)\n\ntype Foo struct{}\ntype Foo struct{ bar in }\ntype Foo struct {\n\tbar in\n}\ntype Foo struct {\n}\ntype Foo struct {\n\n}\ntype Foo struct {\n\n}\ntype Foo struct {\n\tbar int\n\tbar int\n\n\tbar int\n\n\tbar int\n}\ntype Foo interface{}\ntype Foo interface{ bar() int }\ntype Foo interface {\n}\ntype Foo interface {\n\n}\ntype Foo interface {\n\n}\ntype Foo interface {\n\tbar() int\n\tbar() int\n\n\tbar() int\n\n\tbar() int\n}\n\nvar ()\nvar ()\nvar ()\nvar ()\nvar (\n\tfoo int = 1\n\tfoo int = 1\n\n\tfoo int = 1\n\n\tfoo int = 1\n)\n\nconst ()\nconst ()\nconst ()\nconst ()\nconst (\n\tfoo int = 1\n\tfoo int = 1\n\n\tfoo int = 1\n\n\tfoo int = 1\n)\n\nfunc foo() {}\nfunc foo() {\n}\nfunc foo() {\n\n}\n\nfunc foo() {\n\n}\nfunc foo() {\n\n\tprintln(\"bar\")\n\n}\nfunc main() {\n\tprintln(\"Hello, playground\")\n\n\tprintln(\"Hello, playground\")\n\n\tprintln(\"Hello, playground\")\n\tprintln(\"Hello, playground\")\n\n\tprintln(\"Hello, playground\")\n}\nfunc Hello(b int, a struct {\n\ti int\n\tj int\n\n\tj int\n\n\tj int\n}) Foo {\n\treturn \"hello\"\n}\nfunc Hello3(b int, a struct {\n\ti int; j int\n}) Foo {\n\treturn \"hello\"\n\n}\nfunc Hello2(interface {\n\tFoo\n}) {\n\treturn \"hello\"\n}\nfunc (string) methodName() {\n\n}"
  },
  {
    "path": "testData/formatting/breakLines.go",
    "content": "package main\n\nimport ()\nimport (\n\n)\nimport (\n\n\n\n)\nimport (\n\n\n\tfoo \"io\"\n\tfoo \"io\"\n\t\n\tfoo \"io\"\n\t\n\t\n\t\n\tfoo \"io\"\n\n\n)\ntype Foo struct {}\ntype Foo struct { bar in}\ntype Foo struct { \nbar in}\ntype Foo struct {\n}\ntype Foo struct {\n\n}\ntype Foo struct {\n\n\n\n}\ntype Foo struct {\n\n\n\tbar int\n\tbar int\n\t\n\tbar int\n\t\n\t\n\t\n\tbar int\n\n\n}\ntype Foo interface {}\ntype Foo interface {bar() int}\ntype Foo interface {\n}\ntype Foo interface {\n\n}\ntype Foo interface {\n\n\n\n}\ntype Foo interface {\n\n\n\tbar() int\n\tbar() int\n\t\n\tbar() int\n\t\n\t\n\t\n\tbar() int\n\n\n}\nvar ()\nvar (\n)\nvar (\n\n)\nvar (\n\n\n)\nvar (\n\n\n\tfoo int = 1\n\tfoo int = 1\n\t\n\tfoo int = 1\n\t\n\t\n\t\n\tfoo int = 1\n\n\n)\nconst ()\nconst (\n)\nconst (\n\n)\nconst (\n\n\n)\nconst (\n\n\n\tfoo int = 1\n\tfoo int = 1\n\t\n\tfoo int = 1\n\t\n\t\n\t\n\tfoo int = 1\n\n\n)\nfunc foo() { }\nfunc foo() {\n}\nfunc foo() {\n\n}\n\n\n\nfunc foo() {\n\n\n}\nfunc foo() {\n\n\n\tprintln(\"bar\")\n\n\n}\nfunc main() {\n\tprintln(\"Hello, playground\")\n\n\n\tprintln(\"Hello, playground\")\n\n\n\n\tprintln(\"Hello, playground\")\n\tprintln(\"Hello, playground\")\n\n\tprintln(\"Hello, playground\")\n}\nfunc Hello(b int, a struct {\n\n\n\ti int\n\tj int\n\t\n\tj int\n\t\n\t\n\t\n\tj int\n\n\n}) Foo {\n\treturn \"hello\"\n}\nfunc Hello3(b int, a struct {\n\n\n\ti int; j int\n\n\n}) Foo {\n\treturn \"hello\"\n\n}\nfunc Hello2(interface {\n\n\n\tFoo\n\n\n}) {\n\treturn \"hello\"\n}\nfunc (string) methodName() {\n\n}"
  },
  {
    "path": "testData/formatting/case2Enter-after.go",
    "content": "package main\n\nfunc main() {\n\tfor {\n\t\tselect {\n\t\tcase 1:\n\t\t\t\n\t\t}\n\t}\n}"
  },
  {
    "path": "testData/formatting/case2Enter.go",
    "content": "package main\n\nfunc main() {\n\tfor {\n\t\tselect {\n\t\tcase 1:<caret>\n\t\t}\n\t}\n}"
  },
  {
    "path": "testData/formatting/caseE-after.go",
    "content": "package manipulator\n\nfunc main() {\n\tswitch expr {\n\tcase\n\t}\n}"
  },
  {
    "path": "testData/formatting/caseE.go",
    "content": "package manipulator\n\nfunc main() {\n\tswitch expr {\n\t  cas<caret>\n\t}\n}"
  },
  {
    "path": "testData/formatting/caseEnter-after.go",
    "content": "package manipulator\n\nfunc main() {\n\tswitch expr {\n\tcase 1:\n\t\t\n\t}\n}"
  },
  {
    "path": "testData/formatting/caseEnter.go",
    "content": "package manipulator\n\nfunc main() {\n\tswitch expr {\n\tcase 1:<caret>\n\t}\n}"
  },
  {
    "path": "testData/formatting/commentIndentation-after.go",
    "content": "package main\n\nimport (\n// comment\n)\nimport (\n\t// comment\n\t`asdasd`\n\t// comment\n\t`asdasd`\n)\n\nconst (\n// comment\n)\nconst (\n\t// comment\n\ta = 1\n\t// comment\n\tb = 2\n)\n\nvar (\n// comment\n)\nvar (\n\t// comment\n\ta int = 1\n\t// comment\n\tb int = 1\n)\n\ntype (\n//comment\n)\n\ntype (\n\t// comment\n\ta struct{}\n\t// comment\n\tb struct{}\n)"
  },
  {
    "path": "testData/formatting/commentIndentation.go",
    "content": "package main\n\nimport (\n  // comment\n)\nimport (\n// comment\n  `asdasd`\n  // comment\n    `asdasd`\n)\n\nconst (\n  // comment\n)\nconst (\n// comment\n  a = 1\n  // comment\n    b = 2\n)\n\nvar (\n  // comment\n)\nvar (\n// comment\n  a int = 1\n  // comment\n    b int = 1\n)\n\ntype (\n  //comment\n)\n\ntype (\n// comment\n      a struct{}\n      // comment\n        b struct{}\n)"
  },
  {
    "path": "testData/formatting/constDeclaration-after.go",
    "content": "package constDeclarations\n\nconst Hello int = 5\nconst (\n\tHello int = 4\n)\nconst (\n\tHello int = 4\n)\nconst (\n\tHello int = 3\n)\nconst (\n\tHello int = 2\n)\nconst (\n\tHello int = 2\n)\n\nconst (\n\tHello int = 2\n\tHello2 int = 2\n)\nconst (\n\tHello int = 2\n\tHello2 int = 2\n)\nconst (\n\tHello int = 1\n\tHello2 int = 2\n)"
  },
  {
    "path": "testData/formatting/constDeclaration.go",
    "content": "package constDeclarations\n\nconst Hello       int      =    5\nconst ( Hello int = 4 )\nconst (\n\tHello int = 4\n)\nconst (\n\tHello int = 3\n\t)\nconst (\nHello int = 2\n)\nconst (\n\tHello int = 2)\n\nconst (Hello int = 2\n\tHello2 int = 2\n)\nconst (Hello int = 2\n\tHello2 int = 2)\nconst (\nHello int = 1\n\tHello2 int = 2)"
  },
  {
    "path": "testData/formatting/elseStatement-after.go",
    "content": "package bar\n\nfunc main() {\n\tif (true) {\n\n\t} else {\n\t\ttrue\n\t}\n\n\tif {} else {}\n}"
  },
  {
    "path": "testData/formatting/elseStatement.go",
    "content": "package bar\n\nfunc main() {\n\tif (true) {\n\n\t}else{\n\t\ttrue\n\t}\n\n\tif {}                else       {}\n}"
  },
  {
    "path": "testData/formatting/emptyStatementInForClause-after.go",
    "content": "package bar\n\nfunc main() {\n\tfor position, positionReported := 0, false; ; position++ {\n\t}\n}"
  },
  {
    "path": "testData/formatting/emptyStatementInForClause.go",
    "content": "package bar\n\nfunc main() {\n\tfor position,positionReported := 0,false;;position++ {\n\t}\n}"
  },
  {
    "path": "testData/formatting/expressionsContinuationIndent-after.go",
    "content": "package main\n\nfunc main() {\n\ts := \"hello\" +\n\t\t\"World\" +\n\t\t\"!!!\"\n\tb := Bla{}\n\tb.Method1().Method1().\n\t\tMethod1().Method1().\n\t\tMethod1()\n}"
  },
  {
    "path": "testData/formatting/expressionsContinuationIndent.go",
    "content": "package main\n\nfunc main() {\n\ts := \"hello\" +\n\t\"World\" +\n\t\"!!!\"\n\tb := Bla{}\n\tb.Method1().Method1().\n\tMethod1().Method1().\n\tMethod1()\n}"
  },
  {
    "path": "testData/formatting/simple-after.go",
    "content": "package main\n\nimport \"fmt\"\nimport \"os\"\nimport . \"database/sql\"\n\nimport (\n\t\"aaa\"\n\t\"bbb\"\n)\n\nconst (\n\tdefaultBufSize = 4096\n)\n\nvar (\n\tErrInvalidUnreadByte = errors.New(\"bufio: invalid use of UnreadByte\")\n\tErrInvalidUnreadRune = errors.New(\"bufio: invalid use of UnreadRune\")\n\tErrBufferFull = errors.New(\"bufio: buffer full\")\n\tErrNegativeCount = errors.New(\"bufio: negative count\")\n)\n\nfunc main(aaa string, rd io.Reader, error) (ok, ok) {\n\n\tb, ok := rd.(*Reader)\n\n\tfmt.Sprintln(\"Hello\", \"oghet\")\n\n\tsql.DB()\n\tconst aaa = iota\n\tvar bbb = iota\n\n\tswitch name {\n\n\t}\n\n\tgo foo()\n\n\tfor 1; 1; 1 {\n\n\t}\n\n\tif ascii85.Decode() {\n\n\t}\n\n\treturn 1, 1\n}\n\nvar b = map[string]int{}\n\nfunc f(n int) {\n\tfor i := 0; i < 10; i++ {\n\t\tfmt.Println(n, \":\", i)\n\t}\n}\n\nfunc main() {\n\tgo f(0)\n\tvar input string\n\tfmt.Scanln(&input)\n}\n\nfunc main23() {\n\ti := 1\n\n\tswitch i {\n\tcase 1:\n\t\tfmt.Print(\"1\")\n\t\tfmt.Print(\"1\")\n\t\tfmt.Print(\"1\")\n\t\tfmt.Print(\"1\")\n\tcase 2:\n\tdefault:\n\t\tfmt.Println(1)\n\n\n\t}\n}\n\nfunc main() {\n\tselect {\n\tcase a <- 1:\n\t\treturn a\n\tcase a, ok := <-c3:\n\t\tbreak\n\t//\n\tdefault:\n\t\treturn b\n\t}\n}\n\nfunc main() {\n\ttick := time.Tick(100 * time.Millisecond)\n\tboom := time.After(500 * time.Millisecond)\n\n\texample23123(\n\t\t\"test\",\n\t\t1,\n\t)\n\n\tfor {\n\t\tselect {\n\t\tcase <-tick:\n\t\t\tfmt.Println(\"tick.\")\n\t\tcase <-boom:\n\t\t\tfmt.Println(\"Boom!\")\n\t\t\treturn\n\t\tdefault:\n\t\t\tfmt.Println(\"    .\")\n\t\t\ttime.Sleep(50 * time.Millisecond)\n\t\t}\n\t}\n\n\tresponse := make(chan *http.Response, 1)\n\terrors := make(chan *error)\n\n\tgo func() {\n\t\tresp, err := http.Get(\"http://matt.aimonetti.net/\")\n\t\tif err != nil {\n\t\t\terrors <- &err\n\t\t}\n\t\tresponse <- resp\n\t}()\n\n\tfor {\n\t\tselect {\n\t\tcase r := <-response:\n\t\t\tfmt.Printf(\"%s\", r.Body)\n\t\t\treturn\n\t\tcase err := <-errors:\n\t\t\tlog.Fatal(err)\n\t\tcase <-time.After(2000 * time.Millisecond):\n\t\t\tfmt.Println(\"Timed out!\")\n\t\t\treturn\n\n\t\t}\n\t}\n}\n\ntype T struct {\n\tname        []string // name of the object\n\tvalue, a, b int      // its value\n}\n\ntype x struct {\n\tx, y int         // a\n\tu    float32     // b\n\t_    float32     // c\n\tA1   *[]int      // ca\n\tFFF  func()      // adsfasd\n\tX    interface{} /* adsf*/\n\tX1   interface{} /* adsf*/\n}\n\n// comment\n\n// comment\n\nimport \"A\"\n\n// comment\ntype x a\n\n// comment\nvar a int = 1\n\n// comment\nconst a = iota\n\n// comment\nfunc a() {}\n\n// comment\nfunc (p *int) Length() {}\n\ntype (\n\tFoo1 struct {\n\t\ta int\n\t}\n\n\tFoo2 struct {\n\t\tb int\n\t}\n\n\tF func(interface{}) interface{}\n)\n\nfunc Test(p interface{}) error {\n\tswitch p := p.(type) { // should be error: \"p declared and not used\"\n\tcase error:\n\t\treturn nil\n\t}\n\treturn nil\n}\n\ntype x struct {\n\tI1 interface{}\n\tI2 interface {\n\t   }\n\ti1 interface{ x() int }\n\ti2 interface {\n\t\t   x() int\n\t   }\n\n\tS2 struct{}\n\tS1 struct {\n\t   }\n\ts1 struct{ x int }\n\ts1 struct {\n\t\t   x int\n\t   }\n}\n\ntype B1 struct{ a string }\ntype B2 B1\n\nfunc (b B2) method() B2 {\n\treturn B2{}\n}\nfunc main() {\n\tb := B2{a: \"\"}\n\tb.method()\n}\n\ntype ArrayType struct {\n\tType Type\n}\ntype ArrayType struct {\n\tType Type\n}\n\nfunc zeroArray(t *Type) {\n\tat, _ := (*t).(*ArrayType)\n\tprintln(at.Type)\n\tprintln(at.Type.Size)\n}\n\ntype ArrayType struct {\n\tType Type\n}"
  },
  {
    "path": "testData/formatting/simple.go",
    "content": "package   main\n    import \"fmt\"\n    import  \"os\"\n          import   .  \"database/sql\"\n          \n          import (\"aaa\"\n          \"bbb\")\n    \n    \n        const (\n              defaultBufSize = 4096\n          )\n    \n        var     (\n                    ErrInvalidUnreadByte = errors.New(\"bufio: invalid use of UnreadByte\")\n            ErrInvalidUnreadRune = errors.New(\"bufio: invalid use of UnreadRune\")\n            ErrBufferFull = errors.New(\"bufio: buffer full\")\n            ErrNegativeCount = errors.New(\"bufio: negative count\")\n    )\n    \n    func   main   (aaa string, rd io.Reader, error  )    ( ok ,  ok) {\n    \n    b,  ok  :=    rd . ( *   Reader )\n    \n              fmt . Sprintln (  \"Hello\"  , \"oghet\" )\n    \n    \n            sql.DB  ( )   \n            const  aaa    = iota\n            var  bbb    = iota\n            \n            \n             switch name {\n             \n                 }\n                 \n                 go     foo()\n                 \n                 for   1;  1;    1 {\n                 \n                     }\n                 \n                     if          ascii85.Decode()    {\n                         \n                     }\n                 \n                 return   1   ,   1\n    }\n    \n    var b = map [ string   ]  int   {    }\n    \n    \n    func f(n int) {\n        for i := 0; i < 10; i++ {\n            fmt.Println(n, \":\", i)\n        }\n    }\n    \n    func    main()    {\n        go  f ( 0 )\n              var  input  string\n        fmt .   Scanln ( & input )\n    }\n\n\nfunc main23() {\n\ti := 1\n\n\t      switch i {\n\tcase 1:\n      fmt.Print(\"1\")\n            fmt.Print(\"1\")\n      fmt.Print(\"1\")\n                     fmt.Print(\"1\")\n\tcase 2:\n\tdefault:\n\t\tfmt.Println(1)\n\n\n\t}\n}\n\nfunc main() {\n\tselect {\n\tcase a <- 1\t\t:\t\t return a\n\tcase a, ok := <-c3\t\t\t:\t\t\t\tbreak\n\t//\n\tdefault:return b\n\t}\n}\n\n\nfunc main() {\n    tick := time.Tick(100 * time.Millisecond)\n    boom := time.After(500 * time.Millisecond)\n    \n    \n    example23123(\n    \t          \t\"test\",\n    \t\t              1,\n    \t)\n\n    for {\n            select {\n              case <-tick:\n                  fmt.Println(\"tick.\")\n                case <-boom:\n                fmt.Println(\"Boom!\")\n            return\n              default:\n            fmt.Println(\"    .\")\n            time.Sleep(50 * time.Millisecond)\n            }\n          }\n          \n          \n          response := make(   chan    *http.Response, 1)\n          \terrors := make(chan *error)\n          \n          \tgo func() {\n          \t\tresp, err := http.Get(\"http://matt.aimonetti.net/\")\n          \t\tif err != nil {\n          \t\t\terrors <- &err\n          \t\t}\n          \t\tresponse   <-     resp\n          \t}()\n          \n          \tfor {\n          \t\tselect {\n          \t\tcase r :=   <-   response:\n          \t\t\tfmt.Printf(\"%s\", r.Body)\n          \t\t\treturn\n          \t\tcase err := <-errors:\n          \t\t\tlog.Fatal(err)\n          \t\tcase <-time.After(2000 * time.Millisecond):\n          \t\t\tfmt.Println(\"Timed out!\")\n          \t\t\treturn\n          \n          \t\t}\n          \t}\n}\n\n\ntype T struct {\n\tname  [ ]string // name of the object\n\tvalue,  a, b int         // its value\n}\n\ntype x struct {\n\tx   ,    y    int         // a\n\tu    float32     // b\n\t_    float32     // c\n\tA1       *  [    ]int      // ca\n\tFFF  func(    )          // adsfasd\n\tX interface   {   } /* adsf*/\n\tX1   \t\tinterface { }      /* adsf*/\n}\n\n// comment\n\n// comment\n\nimport \"A\"\n\n// comment\ntype x a\n\n// comment\nvar a int = 1\n\n// comment\nconst a = iota\n\n// comment\nfunc a() {}\n\n// comment\nfunc (p *int) Length() {}\n\ntype (\nFoo1 struct {\na int\n}\n\nFoo2 struct {\nb int\n}\n\nF func(interface{}) interface{}\n)\n\nfunc Test(p interface{}) error {\n\tswitch p := p.(type) { // should be error: \"p declared and not used\"\n                \tcase error:\n\t\treturn nil\n\t}\n\treturn nil\n}\n\ntype x struct {\n\tI1 interface{}\n\tI2    interface {\n\t}\n\ti1 interface { x() int }\n\ti2 interface {\n\t\tx() int\n\t}\n\n\tS2 struct{}\n\tS1 struct {\n   }\n\ts1 struct{ x int }\n\ts1 struct {\n\t\tx int\n\t}\n}\n\n\ntype B1 struct{ a string }\ntype B2 B1\nfunc (b B2) method() B2 {\n\treturn B2{}\n}\nfunc main() {\n\tb := B2{a: \"\"}\n\tb.method()\n}\ntype ArrayType struct {\n\tType Type\n}\ntype ArrayType struct {\n\tType Type\n}\nfunc zeroArray(t *Type) {\n\tat, _ := (*t).(*ArrayType)\n\tprintln(at.Type)\n\tprintln(at.Type.Size)\n}\ntype ArrayType struct {\n\tType Type\n}"
  },
  {
    "path": "testData/formatting/spacesInArithmeticExpressions-after.go",
    "content": "package main\n\nfunc main() {\n\tvar i = 1\n\ti = i + 1\n\ti = i * 1\n\ti = i - 1\n\ti = i || 1\n\ti += i - 1\n}"
  },
  {
    "path": "testData/formatting/spacesInArithmeticExpressions.go",
    "content": "package main\n\nfunc main() {\n\tvar i=1\n\ti=i+   1\n\ti=i*1\n\ti=i-1\n\ti=i||1\n\ti+=i-1\n}"
  },
  {
    "path": "testData/formatting/switchEnter-after.go",
    "content": "package manipulator\n\nfunc main() {\n\tswitch expr {\n\t\n\t}\n}"
  },
  {
    "path": "testData/formatting/switchEnter.go",
    "content": "package manipulator\n\nfunc main() {\n\tswitch expr {<caret>}\n}"
  },
  {
    "path": "testData/formatting/typeEnter-after.go",
    "content": "package manipulator\ntype (\n\t\n)"
  },
  {
    "path": "testData/formatting/typeEnter.go",
    "content": "package manipulator\ntype (<caret>)"
  },
  {
    "path": "testData/formatting/varDeclaration-after.go",
    "content": "package varDeclarations\n\nvar Hello int = 5\nvar (\n\tHello int = 4\n)\nvar (\n\tHello int = 4\n)\nvar (\n\tHello int = 3\n)\nvar (\n\tHello int = 2\n)\nvar (\n\tHello int = 2\n)\n\nvar (\n\tHello int = 2\n\tHello2 int = 2\n)\nvar (\n\tHello int = 2\n\tHello2 int = 2\n)\nvar (\n\tHello int = 1\n\tHello2 int = 2\n)"
  },
  {
    "path": "testData/formatting/varDeclaration.go",
    "content": "package varDeclarations\n\nvar Hello       int      =    5\nvar ( Hello int = 4 )\nvar (\n\tHello int = 4\n)\nvar (\n\tHello int = 3\n\t)\nvar (\nHello int = 2\n)\nvar (\n\tHello int = 2)\n\nvar (Hello int = 2\n\tHello2 int = 2\n)\nvar (Hello int = 2\n\tHello2 int = 2)\nvar (\nHello int = 1\n\tHello2 int = 2)"
  },
  {
    "path": "testData/highlighting/anonymousFieldDefinition.go",
    "content": "package main\n\ntype MyType int\n\nvar <warning descr=\"Unused variable 't'\">t</warning> struct {\n  *int\n  string\n\n  <error descr=\"Invalid type []float64: must be typeName or *typeName\">[]float64</error>\n  <error descr=\"Invalid type map[int]int: must be typeName or *typeName\">map[int]int</error>\n  <error descr=\"Invalid type chan int64: must be typeName or *typeName\">chan int64</error>\n  <error descr=\"Invalid type *[]int32: must be typeName or *typeName\">*[]int32</error>\n  <error descr=\"Invalid type *(uint): must be typeName or *typeName\">*(uint)</error>\n  <error descr=\"Invalid type **float32: must be typeName or *typeName\">**float32</error>\n  <error descr=\"Invalid type *struct{}: must be typeName or *typeName\">*struct{}</error>\n}"
  },
  {
    "path": "testData/highlighting/assignToStructFieldInMap.go",
    "content": "package main\n\ntype data struct {\n\tname string\n}\n\nfunc _() {\n\ttype foo struct{ Name string }\n\n\tbad := map[string]foo{}\n\n\tfor key := range bad {\n\t\t<error descr=\"cannot assign to bad[key].Name\">bad[key].Name</error> = bad[key].Name + \" Updated\"\n\t}\n\n\tgood := map[string]*foo{}\n\tfor key := range good {\n\t\tgood[key].Name = good[key].Name + \" Updated\"\n\t}\n}\n\nfunc main() {\n\tm := map[string]data{\"x\": {\"one\"}}\n\t<error descr=\"cannot assign to m[\\\"x\\\"].name\">m[\"x\"].name</error> = \"two\"\n\tn := []data{{\"one\"}}\n\tn[0].name = \"two\"\n\tp := [1]data{{\"one\"}}\n\tp[0].name = \"two\"\n}\n"
  },
  {
    "path": "testData/highlighting/assignUsages.go",
    "content": "package main\n\nfunc main() {\n\t<error descr=\"Unused variable 'sum1'\">sum1</error> := 0\n\tsum1 = 10\n\n\tvar <error descr=\"Unused variable 'sum'\">sum</error> = 0\n\tsum = 10\n\n\tvar sum3 = 0\n\tsum3 += 10\n\n\tsum4 := 0\n\tsum4 += 10\n\t\n\tvar       i int\n\tf(func() { i  = 0; println(\"test\") })\n}\n\nfunc f(m func()) {\n\tm()\n}\n\nfunc foo() (int, int) {\n\treturn 4, 5\n}\n\nfunc returnTwo() (int, int) {\n\treturn 1, 2\n}\n\nfunc _() {\n\ta, b := ((returnTwo()))\n\t_, _ = a, b\n}\n\nfunc _() {\n\ta, b := <error descr=\"Multiple-value (returnTwo())() in single-value context\">(returnTwo())</error>, 1\n\t_, _ = a, b\n}\n\nfunc _() {\n\t<error descr=\"Assignment count mismatch: 1 = 2\"><error descr=\"Unused variable 'x'\">x</error> := foo(), foo()</error>\n\t<error descr=\"Assignment count mismatch: 1 = 2\"><error descr=\"Unresolved reference 'y'\">y</error> = foo(), foo()</error>\n}\n"
  },
  {
    "path": "testData/highlighting/assignmentToReceiver.go",
    "content": "package demo\n\nimport \"fmt\"\n\ntype demo struct {\n\tVal int\n}\n\nfunc (d *demo) change() {\n\t<weak_warning descr=\"Assignment to method receiver propagates only to callees but not to callers\">d = nil</weak_warning>\n\td.myVal()\n}\n\nfunc (d *demo) myVal() {\n\tfmt.Printf(\"my val: %#v\\n\", d)\n}\n\nfunc (d demo) change2() {\n\t<weak_warning descr=\"Assignment to method receiver doesn't propagate to other calls\">d = demo{}</weak_warning>\n\td.myVal()\n}\n\nfunc (d *demo) change3() {\n\td.Val = 3\n\td.myVal()\n}\n\nfunc _() {\n\td := &demo{}\n\td.myVal()\n\td.change()\n\td.myVal()\n\td.Val = 2\n\td.change2()\n\td.myVal()\n\td.change3()\n\td.myVal()\n}\n"
  },
  {
    "path": "testData/highlighting/avoidDuplicatedUnusedImportReports.go",
    "content": "package main\n\nimport <error descr=\"Unused import\">`pack1`</error>\nimport <error descr=\"Redeclared import\"><error descr=\"Unused import\">`pack2`</error></error>\nimport <error descr=\"Redeclared import\"><error descr=\"Unused import\">`pack3`</error></error>"
  },
  {
    "path": "testData/highlighting/backticks.go",
    "content": "package main;\n\nimport `fmt`\n\nfunc main() {\n    fmt.Println(`foo`)\n}"
  },
  {
    "path": "testData/highlighting/blankFields.go",
    "content": "package main\n\ntype BlankFields struct {\n\tA uint32\n\t_ int32\n\tB float64\n\t_ [4]int16\n\tC byte\n\t_ [7]byte\n\t_ struct {\n\t\tf [8]float32\n\t}\n}\n"
  },
  {
    "path": "testData/highlighting/blankImport.go",
    "content": "package main\n\nimport ( _ \"fmt\" )\n\nfunc main() {\n}"
  },
  {
    "path": "testData/highlighting/boxes.go",
    "content": "package main\n\nfunc Println(...interface{})  {\n\n}\n\nfunc main() {\n    bigBox := &BigBox{}\n    bigBox.BubbleGumsCount = 4          // correct...\n    bigBox.SmallBox.AnyMagicItem = true // also correct\n    v1:= bigBox.SmallBox\n    v2:= (&BigBox{}).SmallBox\n    //v3:= &BigBox{}.SmallBox  // todo: should be an error\n    A := v1.AnyMagicItem\n    B := v2.Color()\n    bigBox.AnyMagicItem = false || A + B\n    Println(v1)          // => 60\n    Println(v2)          // => 60\n    Println(bigBox.Capacity())          // => 60\n    Println(bigBox.SmallBox.Capacity()) // => 20\n\n    Println(bigBox.SmallBox.Color()) // => \"gray\"\n    Println(bigBox.Color())          // => \"gray\"\n}\n\nfunc (sb *SmallBox) Color() string {\n        return \"gray\"\n}\n\ntype SmallBox struct {\n        BubbleGumsCount int\n        AnyMagicItem    bool\n}\n\ntype BigBox struct {\n        SmallBox\n}\n\nfunc (sb *SmallBox) Capacity() int {\n        return 20\n}\n\nfunc (bb *BigBox) Capacity() int {\n        return bb.SmallBox.Capacity() * 3\n}\n\ntype <warning descr=\"Type 'string' collides with builtin type\">string</warning> string\ntype <warning descr=\"Type 'int' collides with builtin type\">int</warning> int\ntype <warning descr=\"Type 'bool' collides with builtin type\">bool</warning> bool\n\nconst (\n\ttrue, false  = 0 == 0, 0 != 0 // Untyped bool.\n)\n"
  },
  {
    "path": "testData/highlighting/break.go",
    "content": "package main\n\nimport \"fmt\"\n\nfunc _() {\n\tfor i := 0; i < 10; i++ {\n\t\tfmt.Printf(\"%d\\n\", i)\n\t\tf := func() {\n\t\t\t<error descr=\"Break statement not inside a for loop, select or switch\">break</error>\n\t\t}\n        f()\n\t\tbreak\n\t}\n\n\t<error descr=\"Break statement not inside a for loop, select or switch\">break</error>\n\n\tif 1 > 0 {\n\t\t<error descr=\"Break statement not inside a for loop, select or switch\">break</error>\n\t}\n\n\tfor i := 0; i < 10; i++ {\n\t\tdefer func() {\n\t\t\t<error descr=\"Break statement not inside a for loop, select or switch\">break</error>\n\t\t}()\n\n\t\tgo func() {\n\t\t\t<error descr=\"Break statement not inside a for loop, select or switch\">break</error>\n\t\t}()\n\n\t\tbreak\n\t}\n\tswitch <error descr=\"Cannot use '_' as value\">_</error> {\n\tdefault: <error descr=\"Cannot use '_' as value\">_</error>()\n\tcase 0, 1, 2, 3: <error descr=\"Cannot use '_' as value\">_</error>(); break;\n\tcase 4, 5, 6, 7: <error descr=\"Cannot use '_' as value\">_</error>()\n\t}\n\t\n\tselect {\n\tcase <error descr=\"Cannot use '_' as value\">_</error> <- 0:  break;\n\tcase <error descr=\"Cannot use '_' as value\">_</error> <- 1:\n\t}\n}"
  },
  {
    "path": "testData/highlighting/builtinFuncCalls.go",
    "content": "package main\n\nimport \"C\"\n\nfunc foo(interface{}) {}\n\ntype stringType string\ntype mapType map[string]string\n\nfunc main() {\n\tfoo(make<error descr=\"Missing argument to make\">()</error>)\n\tfoo(<error descr=\"`notAType` is not a type\">make(`notAType`)</error>)\n\tfoo(make(<error descr=\"Cannot make stringType\">stringType</error>))\n\tfoo(<error descr=\"Missing len argument to make\">make([]stringType)</error>)\n\tfoo(make([]stringType, 2))\n\tfoo(make([]stringType, 2, 3))\n\tfoo(<error descr=\"Too many arguments to make\">make([]stringType, 2, 3, 4)</error>)\n\n\tx := \"a\"\n\ty := 4\n\tfoo(make([]stringType, <error descr=\"Non-integer size argument to make\">x</error>))\n\tfoo(make([]stringType, 4, <error descr=\"Non-integer capacity argument to make\">\"foo\"</error>))\n\n\tfoo(make(<-chan int))\n\tfoo(make(chan int))\n\tfoo(make(chan int, 4))\n\tfoo(<error descr=\"Too many arguments to make\">make(<-chan int, 4, 5)</error>)\n\n\tfoo(make(map[string]string))\n\tfoo(make(map[string]string, y))\n\n\ttype test uint32\n\tfoo(make([]int, test(4)))\n\tfoo(make([]int, uint64(2)))\n\n\ttype c uint32\n\ttype b c\n\ttype a b\n\ttype d []c\n\ttype e d\n\tfoo(make([]int32, a(2)))\n\tfoo(make(e, a(4)))\n\n\tvar xyz interface{} = 1\n\tfoo(make(chan int, xyz.(int)))\n\n\ti := C.int(1)\n\tfoo(make([]*C.char, i))\n\t\n\tfoo(make(chan func(), 1.0))\n\tfoo(make(chan func(), 1e5))\n\tfoo(make(chan func(), '1'))\n\tfoo(make(chan func(), <error descr=\"Non-integer size argument to make\">true</error>))\n\tfoo(make(chan func(), <error descr=\"Non-integer size argument to make\">complex(17,4)</error>))\n\tfoo(make(chan func(), <error descr=\"Non-integer size argument to make\">\"1\"</error>))\n\n\ttype someChan chan int\n\ttype capChan someChan\n\n\tvar capTest1 e\n\tvar capTest2 a\n\tvar capTest3 capChan\n\tvar capTest4 int\n        oldCh := (*(chan *[]byte))((nil))\n        if oldCh != nil && cap(*oldCh) != 0 {\n        }\n\tfoo(cap<error descr=\"not enough arguments in call to cap\">()</error>)\n\tfoo(cap<error descr=\"too many arguments in call to cap\">(capTest1, capTest2)</error>)\n\tfoo(cap(capTest1))\n\tfoo(cap(<error descr=\"Invalid argument for cap\">capTest2</error>))\n\tfoo(cap(capTest3))\n\tfoo(cap(<error descr=\"Invalid argument for cap\">capTest4</error>))\n\tfoo(cap(<error descr=\"Invalid argument for cap\">map[string]struct{}{}</error>))\n\tfoo(cap(&[4]string{\"a\", \"b\", \"c\", \"d\"}))\n\tfoo(cap([]string{}))\n}\n\nfunc _() {\n\tvar x <error>IntegerType</error> = 3\n\tprintln(x)\n}"
  },
  {
    "path": "testData/highlighting/cgotest.go",
    "content": "package main\n\nimport (\n\t\"fmt\"\n\t\"unsafe\"\n)\n\n// struct x {\n// \tint y, z;\n// };\n//\n// int sum(struct x a) {\n// \treturn a.y + a.z;\n// }\n//\n/*\ntypedef struct {\nint x;\nunsigned char y;\nchar *name;\n} S;\n\nS* some_C_function_call() {\n\treturn 0;\n}\n*/\nimport \"C\"\n\ntype X struct{ Y, Z int32 }\n\nvar s C.struct_x\nvar s1 *C.struct_x\n\nfunc main() {\n\ts2 := C.some_C_function_call()\n\tif (false) {\n\t\tfmt.Println(s2.x)\n                fmt.Println(s2.x.y.y.wad.sd.asd.ad()) // todo[ignatov]: update test data with a valid sample\n\t}\n\n\ta := &X{5, 7}\n\tfmt.Println(s.y)\n\tfmt.Println(s1)\n\tfmt.Println(a, \"->\", C.sum(*((*C.struct_x)(unsafe.Pointer(a)))))\n\n\tcs := C.S{}\n\tfmt.Println(cs.x)\n\tfmt.Println(cs.y)\n\tfmt.Println(cs.name)\n}"
  },
  {
    "path": "testData/highlighting/chan.go",
    "content": "package main\n\nimport \"fmt\"\n\ntype Struct struct {\n\tString string\n}\n\nfunc GetChan() chan Struct {\n\tc := make(chan Struct, 1)\n\tc <- Struct{\"foo\"}\n\tclose(c)\n\treturn c\n}\n\nfunc main() {\n\tc := GetChan()\n\tfor s := range c {\n\t\tprintln(s.String)\n\t}\n\n}\n\ntype Neuron struct {\n\tID int\n}\n\ntype Signal struct {\n\tValue float64\n\tID    string\n}\n\nfunc (s *Signal) IsNull() bool {\n\tif s.Value != 0 {\n\t\treturn false\n\t}\n\treturn true\n}\n\ntype Dendrit chan *Signal\n\nfunc (d Dendrit) Sinops(n *Neuron) {\n\tfor {\n\t\tselect {\n\t\tcase signal := \t<-d:\n\t\t\tif signal.IsNull() { // not found method\n\t\t\t\tcontinue\n\t\t\t}\n\t\t// Value not found also\n\t\t\tfmt.Printf(\"NID=%d\\t<- %g (IN)\\n\", n.ID, signal.Value)\n\t\tdefault:\n\t\t\tcontinue\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "testData/highlighting/check.go",
    "content": "package check\n\nimport \"fmt\"\n\nfunc init() {\n  fmt.<error>TestStringer</error>(nil)\n}"
  },
  {
    "path": "testData/highlighting/checkSamePackage_test.go",
    "content": "package check\n\nfunc init() {\n  TestStringer(nil)\n}"
  },
  {
    "path": "testData/highlighting/check_test.go",
    "content": "package check\n\nimport \"fmt\"\n\nfunc init() {\n  fmt.<error descr=\"Unresolved reference 'TestStringer'\">TestStringer</error>(nil)\n}"
  },
  {
    "path": "testData/highlighting/commentStart.go",
    "content": "<weak_warning descr=\"Package comment should be of the form 'Package commentstart ...'\">// demo</weak_warning>\npackage commentstart\n\ntype (\n\t<weak_warning descr=\"Comment should start with 'Hello'\">// help</weak_warning>\n\tHello struct{}\n\n\t<weak_warning descr=\"Comment should start with 'Helloi'\">// help</weak_warning>\n\tHelloi interface{}\n)\n\n<weak_warning descr=\"Comment should start with 'Helllo'\">// help</weak_warning>\ntype Helllo struct{}\n\n<weak_warning descr=\"Comment should start with 'Hellloi'\">// help</weak_warning>\ntype Hellloi interface{}\n\nconst (\n\t<weak_warning descr=\"Comment should start with 'Helloc'\">// help</weak_warning>\n\t<warning descr=\"Unused constant 'Helloc'\">Helloc</warning> = 3\n)\n\n<weak_warning descr=\"Comment should start with 'Hellloc'\">// help</weak_warning>\nconst <warning descr=\"Unused constant 'Hellloc'\">Hellloc</warning>, <warning descr=\"Unused constant 'hellloc2'\">hellloc2</warning> = 1, 2\n\nvar (\n\t<weak_warning descr=\"Comment should start with 'Hello1'\"><weak_warning descr=\"Comment should start with 'Hellow1'\">// help</weak_warning></weak_warning>\n\tHello1, Hellow1 int\n)\n\n<weak_warning descr=\"Comment should start with 'Hello2'\">// help</weak_warning>\nvar Hello2 int\n\n<weak_warning descr=\"Comment should start with 'Hellllo'\">// Helllo</weak_warning>\nfunc (a Helllo) Hellllo() {\n\t_ = Hello1\n\t_ = Hellow1\n\t_ = Hello2\n}\n\n// Demo does things  -> correct\nfunc Demo() {\n\tDemo2()\n}\n\n<weak_warning descr=\"Comment should start with 'Demo2'\">// Demo does other things -> incorrect</weak_warning>\nfunc Demo2() {\n\tDemo()\n\tDemo3()\n\tDemo4()\n\tDemo5()\n\tDemo6()\n\tDemo7()\n\tDemo8()\n\tDemo9()\n}\n\n<weak_warning descr=\"Comment should be meaningful or it should be removed\">// Demo3</weak_warning>\nfunc Demo3() {}\n\n// A Demo4 does things  -> correct\nfunc Demo4() {}\n\n// An Demo5 does things  -> correct\nfunc Demo5() {}\n\n// The Demo6 does things  -> correct\nfunc Demo6() {}\n\n// Demo7 does things  -> correct\n//\n// Deprecated: use other thing\nfunc Demo7() {}\n\n// Demo8 does things  -> correct\n//\n// Deprecated: use other thing\n\nfunc Demo8() {}\n\n// Demo does things  -> correct\n//\n// Deprecated: use other thing\n\n// Demo9 demo\nfunc Demo9() {}\n"
  },
  {
    "path": "testData/highlighting/composite.go",
    "content": "package main\n\nimport \"fmt\"\n\ntype demo struct {\n    Field string\n}\n\nfunc getMore() (_, _, _ *demo) {\n    return &demo{\"demo1\"}, &demo{\"demo2\"}, &demo{\"demo3\"}\n}\n\nfunc main() {\n    d1, d2, d3 := getMore()\n    fmt.Printf(\"%s %s %d\", d1.Field, d2.Field, d3.Field)\n}"
  },
  {
    "path": "testData/highlighting/consts.go",
    "content": "package main\nimport \"fmt\"\n\ntype T int\ntype TT int\n\nconst (\n    A , <warning descr=\"Unused constant 'X'\">X</warning>, <warning descr=\"Unused constant 'Y'\">Y</warning> = T(iota), 1, T(1)\n)\nconst (\n    B = T(iota)\n    C\n    D TT = 1\n)\n\nfunc (t T) String() string {\n    return \"t\"\n}\n\nfunc (t TT) AnotherString() string {\n    return \"tt\"\n}\n\nfunc main() {\n    fmt.Println(A.String())\n    fmt.Println(B.String())\n    fmt.Println(C.String())\n    fmt.Println(D.AnotherString())\n}"
  },
  {
    "path": "testData/highlighting/continue.go",
    "content": "package main\n\nimport \"fmt\"\n\nfunc _() {\n\tfor i := 0; i < 10; i++ {\n\t\tfmt.Printf(\"%d\\n\", i)\n\t\tf := func() {\n\t\t\t<error>continue</error>\n\t\t}\n        f()\n\t\tcontinue\n\t}\n\n\t<error>continue</error>\n\n\tif 1 > 0 {\n\t\t<error>continue</error>\n\t}\n\n    for i := 0; i < 10; i++ {\n\t\tdefer func() {\n\t\t\t<error>continue</error>\n\t\t}()\n\n\t\tgo func() {\n\t\t\t<error>continue</error>\n\t\t}()\n\n\t\tcontinue\n\t}\n}"
  },
  {
    "path": "testData/highlighting/cyclicDefinition.go",
    "content": "package main\n\nvar Foo1 = <error descr=\"Cyclic definition detected\">Foo1</error>\nconst Bar1 = <error descr=\"Cyclic definition detected\">Bar1</error>\n\nvar (\n\tFoo int = 1 + <error descr=\"Cyclic definition detected\">Foo</error>\n)\n\nconst (\n\tBar, Demo int = 1 + <error descr=\"Cyclic definition detected\">Bar</error> + 1 + <error descr=\"Cyclic definition detected\">Bar</error>, 1\n)\n\nfunc _() {\n\t_, _, _ = Foo, Bar, Demo\n}\n"
  },
  {
    "path": "testData/highlighting/deferGo.go",
    "content": "package demo\n\nfunc _() {\n\t<weak_warning descr=\"defer should not call recover() directly\">defer recover()</weak_warning>\n\t<weak_warning descr=\"defer should not call panic() directly\">defer panic(\"ads\")</weak_warning>\n\tdefer <error descr=\"defer requires function call, not conversion\">int(0)</error>\n\n\n\t<weak_warning descr=\"go should not call recover() directly\">go recover()</weak_warning>\n\t<weak_warning descr=\"go should not call panic() directly\">go panic(\"ads\")</weak_warning>\n\tgo <error descr=\"go requires function call, not conversion\">int(0)</error>\n}\n"
  },
  {
    "path": "testData/highlighting/deferInLoop.go",
    "content": "package deferinloop\n\nfunc noop() {}\n\ntype b int\n\nfunc (a b) meth() {\n\tfor {\n\t\t<weak_warning descr=\"Possible resource leak, 'defer' is called in a for loop.\">defer</weak_warning> noop()\n\t}\n}\n\nfunc _() {\n\tfor {\n\t\tfunc (){\n\t\t\tdefer noop()\n\t\t}()\n\t}\n\n\tfunc (){\n\t\tdefer noop()\n\t}()\n\n\tfor {\n\t\tswitch 1 {\n\t\tcase 2: <weak_warning descr=\"Possible resource leak, 'defer' is called in a for loop.\">defer</weak_warning> noop();\n\t\t}\n\t}\n\n\tdefer noop();\n\tfor {\n\t\t<weak_warning descr=\"Possible resource leak, 'defer' is called in a for loop.\">defer</weak_warning> noop()\n\t}\n}\n\n"
  },
  {
    "path": "testData/highlighting/doNotReportNonLastMultiResolvedImport.go",
    "content": "package main\n\nimport \"to_import/unique\"\nimport _ \"to_import/sha<caret>red\"\n\nfunc main() {\n\tunique.Foo()\n}"
  },
  {
    "path": "testData/highlighting/embeddedInterfacePointer.go",
    "content": "package demo\n\ntype (\n\tdemo interface {}\n\tdemo2 interface {}\n\tdem struct {\n\t\t<error descr=\"Embedded type cannot be a pointer to interface\">*demo</error>\n\t\tdemo2\n\t}\n)\n"
  },
  {
    "path": "testData/highlighting/equalinif.go",
    "content": "package equalinif\n\nfunc _() {\n\ta := 1\n\tb := 2\n\tif <error descr=\"a = b used as value\">a = b</error> {\n\t\tprintln(\"a = b\")\n\t} else {\n\t\tprintln(\"a != b\")\n\t}\n\n\tif <error descr=\"a := b used as value\"><error descr=\"Unused variable 'a'\">a</error> := b</error> {\n\t\tprintln(\"a = b\")\n\t} else {\n\t\tprintln(\"a != b\")\n\t}\n\n\tif a = b; a != 1 {\n\t\tprintln(\"a = b\")\n\t} else {\n\t\tprintln(\"a != b\")\n\t}\n\n\tif a := b; a == 1 {\n\t\tprintln(\"a = b\")\n\t} else {\n\t\tprintln(\"a != b\")\n\t}\n}\n"
  },
  {
    "path": "testData/highlighting/exportedOwnDeclaration.go",
    "content": "package exportedowndeclaration\n\nconst Hello1, hello2 = 1, 2\n\nconst Hello3, <weak_warning desc=\"Exported const 'Hello4' should have its own declaration\">Hello4</weak_warning> = 3, 4\n\nvar Hello5, hello6 int\n\nvar Hello7, <weak_warning desc=\"Exported var 'Hello8' should have its own declaration\">Hello8</weak_warning> int\n\nvar (\n\tHello9, <weak_warning desc=\"Exported var 'Hello10' should have its own declaration\">Hello10</weak_warning> int\n\tHello11, <weak_warning desc=\"Exported var 'Hello12' should have its own declaration\">Hello12</weak_warning> int\n)\n\nfunc _() {\n\t_, _, _, _ = Hello5, hello6, Hello7, Hello8\n\t_, _, _, _ = Hello9, Hello10, Hello11, Hello12\n}\n"
  },
  {
    "path": "testData/highlighting/fields.go",
    "content": "package main\n\nimport (\n    \"fmt\"\n)\n\nvar <warning>unused</warning> int = 1\n\nvar langId = \"es\"\nfunc main() {\n    lId := \"es\"\n\n    _ = map[string]string{langId: \"hola\"}\n    _ = map[string]string{lId: \"hola\"}\n    _ = map[interface{}]string{foo1: \"hola\", }\n}\n\nfunc _() {\n\ttype test struct {\n\t\tfield1 string\n\t}\n\tfield2 := \"\"\n\t_ = field2\n\t_ = test{<error>field2</error>: \"\"}\n}\n\nfunc foo1() {\n\n}\n\ntype Par []struct{\n    Key   string\n    Value string\n}\n\nfunc <warning>main1</warning>(i interface{}) {\n    // it works\n    t := i.(Par)\n    _ = t[0].Key\n\n    // it fails\n    switch t := i.(type) {\n        case Par:\n        a := t\n        _ = t[0].Key\n        _ = a[0].Key\n    }\n}\n\ntype Some struct {\n    field int\n}\n\nfunc <warning>prtMain</warning>() {\n    ptr := &Some{1}\n    _ = (*ptr).field\n}\n\ntype User struct {\n    ID int\n    Name string\n}\n\nfunc <warning>main23</warning>() {\n    members := []User{{ID: 2}, {ID: 3}}\n    members2 := []*User{{ID: 2}  }\n    members3 := []*struct{ID int}{{ID: 2}  }\n    members4 := []*User{&User{ID: 2}, &User{ID: 3}}\n\n    fmt.Println(len(members))\n    fmt.Println(len(members2))\n    fmt.Println(len(members3))\n    fmt.Println(len(members4))\n}   \n\nfunc <warning>main345</warning>() {\n    type T1 string\n    fmt.Println(T1(\"1\"))\n} "
  },
  {
    "path": "testData/highlighting/fileRead.go",
    "content": "package main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"os\"\n)\n\nfunc check(e error) {\n\tif e != nil {\n\t\tpanic(e)\n\t}\n}\n\nfunc main() {\n\tfmt.Println(\"Reading your file now\")\n\n\tfileHandle, err := os.Open(\"/Path/to/your/file/fileName\")\n\n\tcheck(err)\n\tdefer fileHandle.Close()\n\n\tnewReader := bufio.NewScanner(fileHandle)\n\toutput := \"\"\n\n\tfor newReader.Scan() {\n\t\toutput += newReader.Text()\n\t}\n\n\tfmt.Println(\"The contents of the file =>\", output)\n}"
  },
  {
    "path": "testData/highlighting/forRange.go",
    "content": "package main\n\nimport (\n    \"fmt\"\n    \"time\"\n)\n\nfunc main() {\n    var tick = 0\n    for range time.NewTicker(1 * time.Second).C {\n        fmt.Println(\"Tick\")\n        tick++\n        if tick > 3 {\n            break\n        }\n    }\n    \n    for _, _ = range \"abc\"  {\n    }\n    for _ = range \"abc\"  {\n    }\n}\n\ntype d_type [32]uintptr\n\ntype Bits struct {\n\ta []uint64\n\tb [3]uint64\n\tc [3+3]uint64\n\td d_type\n}\n\nfunc _(a *Bits) {\n\tfor i, x := range <error descr=\"Cannot range over data (type *[]uint64)\">&a.a</error> {\n\t\tfmt.Println(i)\n\t\tfmt.Println(x)\n\t}\n\tfor i, x := range  &a.b {\n\t\tfmt.Println(i)\n\t\tfmt.Println(x)\n\t}\n\tfor i, x := range &a.c {\n\t\tfmt.Println(i)\n\t\tfmt.Println(x)\n\t}\n\tfor i, x := range &a.d {\n\t\tfmt.Println(i)\n\t\tfmt.Println(x)\n\t}\n\n\tfor i, x := range <error descr=\"Cannot range over data (type int, int)\">a2()</error> {\n        \t\tfmt.Println(i)\n        \t\tfmt.Println(x)\n        \t}\n}\n\nfunc a2() (value int, error int){\n    value, error = 2, 3\n    return\n}"
  },
  {
    "path": "testData/highlighting/funcCall.go",
    "content": "package mongo\n\nimport \"fmt\"\n\ntype Collection struct{}\ntype CollectionLoaderInterface interface {\n    MangoCollection(string) *Collection\n}\n\nfunc <warning descr=\"Unused function 'Collection'\">Collection</warning>(parent interface{},collection string) *Collection{\n     switch parent := parent.(type) {\n          case CollectionLoaderInterface:\n          return parent.MangoCollection(collection)\n     }\n     return nil\n}\n\nfunc <warning>main1</warning>(err error) {\n    switch err.(type) {\n        case nil: return\n    }\n}\n\ntype advSearch struct {\n    Genres struct {\n        Generals  []string\n        Thematics struct {\n            Genres  []string\n            Missing bool\n        }\n        Demographics struct {\n            Genres  []string\n            Missing bool\n        }\n    }\n}\n\nfunc <warning>search</warning>() bool {\n    m := advSearch{}\n    return m.Genres.Demographics.Missing\n}\n\n\nfunc g(a, b, _ int) (int, int) {\n    return a, b\n}\n\nfunc f(_, _ int) {\n}\n\nfunc <warning>test</warning>() {\n    f(g(1, 2, 3))\n}\n\nfunc <warning>test2</warning>() (bool, string) {\n    ch := make(chan string)\n    var str string\n    var isOpen bool\n    select {\n    case str = <-ch :\n    case str, isOpen = <-ch:\n    case s, ok := <-ch:\n        str = s\n        isOpen = ok\n    case s := <-ch:\n        str = s\n    }\n    return isOpen, str\n}\n\n\nfunc <warning>Test23</warning>() (err error) {\n    var c chan int\n    select {\n    case <error>err</error> := (<-c):\n    }\n    return err\n}\n\nfunc Demo() error {\n    return fmt.Errorf(\"err %s\", \"a\")\n}\n\nfunc <warning>main</warning>() {\n    var err error\n\n    switch  {\n    case 1==2:\n        err := Demo()\n        panic(err)\n    default:\n        err = Demo()\n        panic(err)\n    }\n    //panic(err)\n}\n\nfunc <warning>main2</warning>() {\n    ch := make(chan string, 2)\n    ch <- \"first\"\n    ch <- \"second\"\n\n    select {\n    case a := <-ch:\n        println(a)\n    }\n\n    var (\n        a int // marked as unused variable `a`\n    )\n\n    select {\n    case a = <-ch:\n        println(a)\n    }\n    println(a)\n}\n\ntype d struct{\n    A string\n}\n\nfunc (a *d) Func() (*d, error) {\n    return a, nil\n}\n\nfunc de(x string) *d {\n    return &d{A: x}\n}\n\nfunc demo23(a *d, _ error) string {\n    return a.A\n}\n\nfunc <warning>main23</warning>() {\n    _ = demo23(de(\"1\").Func())\n}\n\nfunc foo_m(_ int) {\n}\n\nfunc bar_m() (int, int) {\n\treturn 0, 0\n}\n\nfunc <warning>main127</warning>() {\n\tfoo_m<error>(bar_m())</error>\n}\n\ntype AnInterface interface {\n\tMyMethod() error\n}\n\ntype bar struct {}\n\nfunc (*bar) MyMethod() error {\n\treturn nil\n}\n\ntype mystruct struct {}\n\nfunc (x *mystruct) getAnInterface() AnInterface {\n\treturn &bar{}\n}\n\nvar getAnInterface = (*mystruct).getAnInterface\n\nfunc _() {\n\tfmt.Println(getAnInterface(&mystruct{}).MyMethod())\n}\n\ntype (\n\tfuncTiOn func() ([]string, Cmd)\n\n\tCmd interface {\n\t\tIni(keys map[string]string)\n\t}\n)\n\nvar (\n\tfuncs = []funcTiOn{}\n)\n\nfunc _() {\n \tfor idx := range funcs {\n\t\t_, handler := funcs[idx]()\n\t\thandler.Ini(map[string]string{})\n\t}\n\n\tfor _, val := range funcs {\n\t\t_, handler := val()\n\t\thandler.Ini(map[string]string{})\n\t}\n}\n\ntype Decoder func(p int) (size int)\n\nfunc (e Decoder) ConvertString(s string) string { return s }\nfunc NewDecoder(_ string) Decoder { return nil }\n\nfunc _() {\n\tdc := NewDecoder(\"GB18030\")\n\tdc(1)\n \tfmt.Println(dc.ConvertString(\"abc123\"))\n}\n\ntype dnsNameTest struct {\n\tname   string\n\tresult bool\n}\n\nvar dnsNameTests = []dnsNameTest{\n\t{\"_xmpp-server._tcp.google.com\", true},\n}\n\nfunc _() {\n\tfor _, tc := range dnsNameTests {\n\t\tprintln(tc.name)\n\t\tprintln(tc.result)\n\t}\n\n\t// append loses return type\n\tdnsNameTests2 := append(dnsNameTests, []dnsNameTest{})\n\tfor _, tc := range dnsNameTests2 {\n\t\tprintln(tc.name)\n\t\tprintln(tc.result)\n\t}\n}"
  },
  {
    "path": "testData/highlighting/funcLiteral.go",
    "content": "package main\nimport \"fmt\"\n\ntype Mutex struct {\n    state int32\n    sema  uint32\n}\n\nvar a = func() Mutex {\n    return Mutex{}\n}()\n\nfunc main() {\n    fmt.Println(a.sema)\n}"
  },
  {
    "path": "testData/highlighting/funcType.go",
    "content": "package main\n\ntype demoStr struct {\n    Field string\n}\n\ntype f func() *demoStr\n\nfunc DemoFunc() f {\n    return func () *demoStr {\n        return &demoStr{Field: \"dmeo\"}\n    }\n}\n\nfunc main() {\n    fun := DemoFunc()\n    field := fun()\n    _ = field.Field\n}\n\ntype A struct {\n}\n\nfunc (self *A) chain() *A{\n    return self\n}\n\nfunc getAnA() (_ *A) {\n    return &A{}\n}\n\nfunc _() {\n    getAnA().chain()\n}\n\nfunc _(callback func() (interface{}, error)) {\n\tif _, err := callback(); err != nil {\n\t\terr.Error()\n\t}\n}\n\nfunc _(callback func() error) {\n\tif err := callback(); err != nil {\n\t\terr.Error()\n\t}\n}\n\nfunc _(fn func() (i int, e error)) {\n\ti, e :=  fn()\n\tprint(i)\n\tprint(e.Error())\n}\n\nfunc _(fn func() (_ error)) {\n\terr := fn()\n\terr.Error()\n}\n\nfunc _(fn func() error) {\n\terr := fn()\n\terr.Error()\n}\n\ntype TestStruct struct {\n\tSomeId int\n}\n\ntype DataSlice []*TestStruct\n\nfunc _() {\n\tdata := DataSlice{}\n\tfor _, element := range *data {\n\t\tif element.SomeId > 20 {\n\t\t\tprintln(\"some text\")\n\t\t}\n\t}\n}\n\nfunc FA() (int, string) {\n\treturn 0, \"abc\"\n}\n\nfunc FB(_ int, _ string) {\n}\n\nfunc _() {\n\tFB(123, \"abc\")\n\tFB(FA())\n}"
  },
  {
    "path": "testData/highlighting/functionTypes.go",
    "content": "package main\n\nimport \"fmt\"\n\ntype t struct {\n}\n\nfunc (t t) foo() {\n}\n\nfunc startConvert() (<warning descr=\"Unused named return parameter 'fin'\">fin</warning>, <warning descr=\"Unused named return parameter 'fill'\">fill</warning> t, <warning descr=\"Unused named return parameter 'e'\">e</warning> error) {\n\treturn t{}, t{}, nil\n}\n\nfunc main() {\n\ta1, b1, e := startConvert()\n\ta1.foo()\n\tb1.foo()\n\tfmt.Println(e)\n}"
  },
  {
    "path": "testData/highlighting/gh2147.go",
    "content": "package main\n\nimport \"sync\"\n\ntype myMutex sync.Mutex\n\nvar (\n\tpathLock sync.RWMutex\n)\n\nfunc _() {\n\tpathLock.RLock()\n\tdefer pathLock.RUnlock()\n}\n\nfunc main() {\n\tvar mtx myMutex\n\tmtx.<error descr=\"Unresolved reference 'Lock'\">Lock</error>()\n\tmtx.<error descr=\"Unresolved reference 'Unlock'\">Unlock</error>()\n}\n"
  },
  {
    "path": "testData/highlighting/githubIssue2099.go",
    "content": "package main\n\n// Tests https://github.com/go-lang-plugin-org/go-lang-idea-plugin/issues/2099.\n\ntype Interf interface {\n\tHello()\n}\n\ntype demo interface {\n\tInterf\n\tInterf()\n}\n"
  },
  {
    "path": "testData/highlighting/importIgnoringDirectories.go",
    "content": "package test\n\nimport `to_import/<error descr=\"Cannot resolve file '.name'\">.name</error>`\nimport `to_import/<error descr=\"Cannot resolve file '_name'\">_name</error>`\nimport `to_import/<error descr=\"Cannot resolve file 'testdata'\">testdata</error>`"
  },
  {
    "path": "testData/highlighting/importUsedAsName.go",
    "content": "package demo\n\nimport \"fmt\"\nimport _ \"fmt\"\nimport iio \"io\"\n\nfunc _() {\n\tfmt.Println(\"demo\")\n\tdemo := true\n\t _, _ = iio.EOF, demo\n}\n\nfunc demo() (int, int) {\n\treturn 1, 2\n}\n\nfunc _() {\n\t<warning descr=\"Variable 'fmt' collides with imported package name\">fmt</warning> := \"demo\"\n\t<warning descr=\"Variable 'iio' collides with imported package name\">iio</warning> := 1\n\t_, _ = iio, fmt\n\ta, _ := demo()\n\t_ = a\n}\n"
  },
  {
    "path": "testData/highlighting/indexedStringAssign.go",
    "content": "package main\n\nfunc main() {\n\tvar s string = \"hello\"\n\t<error descr=\"Cannot assign to 's[0]'\">s[0]</error> = 0\n\tfor <error descr=\"Cannot assign to 's[0]'\">s[0]</error> = range \"asdf\"{\n\t}\n}"
  },
  {
    "path": "testData/highlighting/infiniteFor.go",
    "content": "package infiniteFor\n\nfunc _() {\n\tfor {\n\t\tprintln(\"\")\n\t}\n\n\tfor i:=0; i<10; i++ {\n\n\t}\n\n\tfor range []byte{} {\n\t}\n\n\tfor i:=0; i<10; i++ {\n\t\tprintln(\"hello\")\n\t}\n\n\t<error descr=\"Infinite for loop\">for {\n\t}</error>\n}\n\n"
  },
  {
    "path": "testData/highlighting/init.go",
    "content": "package main\n\nfunc init() {\n\tprintln(\"Hello\")\n}\n\nfunc main() {\n\t<error>init</error>()\n\tprintln(\" world!\")\n\ta{}.init()\n}\n\nfunc _() {\n\tvar init = func() {\n\t\tprintln(\"HA\")\n\t}\n\tinit()\n\tprintln(\" world!\")\n}\n\ntype a struct {\n\n}\n\nfunc (s a) init() {\n\tprintln(\"sa\")\n}"
  },
  {
    "path": "testData/highlighting/innerTypesFromTestDataPackage.go",
    "content": "package main; \nimport \"to_import/<error descr=\"Cannot resolve file 'testdata'\">testdata</error>\"; \n\ntype Outer struct { *testdata.<error descr=\"Unresolved type 'Reader'\">Reader</error> };\nfunc main() {}"
  },
  {
    "path": "testData/highlighting/interfaces.go",
    "content": "package main\n\nimport \"fmt\"\n\nfunc main() {\n    c := Parent{&Child{}, &impl{}}\n    c.Get(1,1,1) // too many arguments in call to c.Get\n}\n\ntype Parent struct {\n    *Child\n    Interface\n}\ntype Child struct { Unimplemented }\ntype Interface interface { Get(...int) }\ntype impl struct { }\nfunc (r impl) Get(...int) { fmt.Println(\"HERE\") }\ntype Unimplemented interface { Get(s string) }"
  },
  {
    "path": "testData/highlighting/iota.go",
    "content": "package main\n\nconst (\n\tFooConst = iota\n\tBarConst\n)\n\nvar (\n\tFooVar = <error>iota</error>\n)\n\nfunc _() {\n\tconst name = iota\n\tprintln(<error>iota</error>)\n\tiota := 123\n\tprintln(iota)\n\tprintln(name)\n        println(FooConst)\n        println(BarConst)\n        println(FooVar)\n}\n\nfunc main() {\n\n}"
  },
  {
    "path": "testData/highlighting/iota2.go",
    "content": "package main\n\nconst iota = 2\n\nfunc main() {\n\tprintln(iota)\n}"
  },
  {
    "path": "testData/highlighting/labels.go",
    "content": "package main\n\nfunc _() {\n\tinvalid:\n\touter:\n\tfor {\n\t\tinner:\n\t\tfor {\n\t\t\tbreak <error descr=\"Unresolved label 'invalid'\">invalid</error>\n\t\t\tbreak inner\n\t\t\tbreak outer\n\t\t}\n\t\t\n\t\t_:\n\t\tfor {\n\t\t\tbreak <error descr=\"Unresolved label '_'\">_</error>\n\t\t}\n\n\t\tbreak <error descr=\"Unresolved label 'invalid'\">invalid</error>;\n\t\tbreak <error descr=\"Unresolved label 'inner'\">inner</error>;\n\t\tbreak outer;\n\t\tfunc () {\n\t\t\tfuncLit:\n\t\t\tfor {\n\t\t\t\tbreak <error descr=\"Unresolved label 'invalid'\">invalid</error>;\n\t\t\t\tbreak <error descr=\"Unresolved label 'inner'\">inner</error>;\n\t\t\t\tbreak <error descr=\"Unresolved label 'outer'\">outer</error>;\n\t\t\t\tbreak funcLit;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunc _() {\n\tLabel:\n\tif (false) {\n\t\tgoto Label\n\t}\n\tfunc() {\n\t\tif (false) {\n\t\t\tgoto Label\n\t\t}\n\t\tLabel:\n\t}()\n}\n\nfunc _() {\n\tLabel:\n\tif (false) {\n\t\tgoto Label\n\t}\n\tfunc() {\n\t\tgoto <error descr=\"Unresolved label 'Label'\">Label</error>\n\t}()\n}"
  },
  {
    "path": "testData/highlighting/literalValues.go",
    "content": "package main\n\ntype S struct {\n\ta int\n}\n\nfunc main() {\n\t_ = map[string]S{\n\t\t\"key\": {a: 5},\n\t}\n\t_ = map[string][]S{\n\t\t\"key\": {{a: 5}},\n\t}\n\t_ = map[string][][]S{\n\t\t\"key\": {{{a: 5}}},\n\t}\n\t_ = map[string][][][]S{\n\t\t\"key\": {{{{a: 5}}}},\n\t}\n}"
  },
  {
    "path": "testData/highlighting/mainWithWrongSignature.go",
    "content": "package main\n\nfunc <error descr=\"Duplicate function name\">main</error>() {\n\tprintln(\"Hello\")\n}\n\nfunc <error descr=\"Duplicate function name\">main</error><error descr=\"main function must have no arguments and no return values\">(int)</error> {\n\n}\n\nfunc <error descr=\"Duplicate function name\">main</error>() <error descr=\"main function must have no arguments and no return values\">int</error> {\n\n<error descr=\"Missing return at end of function\">}</error>\n\nfunc <error descr=\"Duplicate function name\">main</error><error descr=\"main function must have no arguments and no return values\">(int)</error> <error descr=\"main function must have no arguments and no return values\">int</error> {\n\n<error descr=\"Missing return at end of function\">}</error>\n\nfunc <error descr=\"Duplicate function name\">main</error>() () {}"
  },
  {
    "path": "testData/highlighting/methodExpr.go",
    "content": "package main\n\nimport (\n\t\"fmt\"\n)\n\ntype Vertex struct {\n\tX, Y float64\n}\n\nfunc main() {\n\tv := Vertex{3, 4}\n\tfmt.Print(v.Abs())\n}\n\nfunc (v *Vertex) Abs() float64 {\n\treturn (*v).X * v.X + v.Y * v.Y\n}\n\ntype T struct {\n\ta int\n}\nfunc (tv  T) Mv(int) int { return 0 }  // value receiver\nfunc (tp *T) Mp(float32) float32 { return 1 }  // pointer receiver\n\nvar t T\n\nfunc _() {\n\tt.Mv(7)\n\tT.Mv(t, 7) // todo: rework resolve for method expression\n\t(T).Mv(t, 7)\n\tf1 := T.Mv; f1(t, 7)\n\tf2 := (T).Mv; f2(t, 7)\n\tfmt.Println((*T).Mp())\n\tfmt.Println((*T).Mv())\n}\n\ntype Type interface {\n    Size() int64\n}\n\ntype ArrayType struct {\n    Type Type\n}\n\nfunc (t ArrayType) Size() int64 {\n\treturn 1\n}\n\nfunc _(t *Type) {\n    at, _ := (*t).(*ArrayType)\n    println(at.Type)\n    println(at.Type.Size())\n}"
  },
  {
    "path": "testData/highlighting/methodOnNonLocalType.go",
    "content": "package demo2031\n\nimport (\n\t\"time\"\n)\n\ntype Duration time.Duration\n\nfunc (_ *<error descr=\"Unresolved type 'string'\">string</error>) Demo() {\n\n}\n\nfunc (_ <error descr=\"Unresolved type 'int'\">int</error>) Demo() {\n\n}\n\nfunc (_ <error descr=\"Unresolved type 'ScanState'\">ScanState</error>) Demo() {\n\n}\n\nfunc (_ *Duration) UnmarshalText(data []byte) (error) {\n\t_ = data\n\treturn nil\n}"
  },
  {
    "path": "testData/highlighting/mismatch.go",
    "content": "package main\n\ntype validate interface {\n    validate() (bool, error)\n    void()\n}\n\nfunc main() {\n    var s validate\n    err := <error descr=\"Multiple-value s.validate() in single-value context\">s.validate()</error>\n    _ = err\n    v := <error descr=\"s.void() used as value\"><error descr=\"s.void() doesn't return a value\">s.void()</error></error>\n    _ = v\n    shortDeclarationWithoutExpressions :=<error descr=\"<expression> expected, got ';'\"> </error>;\n    _ = shortDeclarationWithoutExpressions\n}"
  },
  {
    "path": "testData/highlighting/mixedNamedUnnamedParameters.go",
    "content": "package main\n\nfunc _(<warning descr=\"Unused parameter 'int1'\">int1</warning>, <warning descr=\"Unused parameter 'string1'\">string1</warning>, <warning descr=\"Unused parameter 'a1'\">a1</warning> error) (<warning descr=\"Unused named return parameter 'int'\">int</warning>, <warning descr=\"Unused named return parameter 'string'\">string</warning>, <warning descr=\"Unused named return parameter 'a'\">a</warning> error) {\n\treturn 1, \"a\", nil\n}\n\nfunc _(int, string, error) (int, string, error) {\n\treturn 1, \"a\", nil\n}\n\nfunc _<error descr=\"Function has both named and unnamed parameters '(a1, b1 int, string, error)'\">(a1, b1 int, string, error)</error> (<error descr=\"Unresolved type 'a'\">a</error>, <error descr=\"Unresolved type 'b'\">b</error>, int, string, error) {\n\treturn 1, 2, \"a\", nil\n}\n\ntype d int\n\nfunc (d) _(int1, string1, a1 error) (<warning descr=\"Unused named return parameter 'int'\">int</warning>, <warning descr=\"Unused named return parameter 'string'\">string</warning>, <warning descr=\"Unused named return parameter 'a'\">a</warning> error) {\n\treturn 1, \"a\", nil\n}\n\nfunc (d) _(int, string, error) (int, string, error) {\n\treturn 1, \"a\", nil\n}\n\nfunc (d) _<error descr=\"Method has both named and unnamed parameters '(a1, b1 int, string, error)'\">(a1, b1 int, string, error)</error> <error descr=\"Method has both named and unnamed return parameters '(a, b int, string, error)'\">(a, b int, string, error)</error> {\n\treturn 1, 2, \"a\", nil\n}\n\nfunc main() {\n\tx := func(int1, string1, a1 error) (int, string, a error) {\n\t\treturn 1, \"a\", nil\n\t}\n\n\ty := func(int, string, error) (int, string, error) {\n\t\treturn 1, \"a\", nil\n\t}\n\n\tz := func<error descr=\"Closure has both named and unnamed parameters '(a1, b1 int, string, error)'\">(a1, b1 int, string, error)</error> <error descr=\"Closure has both named and unnamed return parameters '(a, b int, string, error)'\">(a, b int, string, error)</error> {\n\t\treturn 1, 2, \"a\", nil\n\t}\n\n\t_, _, _ = x, y, z\n}\n"
  },
  {
    "path": "testData/highlighting/nil.go",
    "content": "package nil\n\nfunc <warning>nilAssign</warning>() {\n\tvar a, b, c = 1, <error>nil</error>, 2\n\t_, _, _ = a, b, c\n\n\td, e, f := 1, <error>nil</error>, 2\n\t_, _, _ = d, e, f\n\n\tconst g, h, i = 1, <error>nil</error>, 2\n\t_, _, _ = g, h, i\n}\n\nfunc <warning>nilVar</warning>() {\n\tvar nil = 123\n\tvar a = nil\n\t_ = a\n}\n"
  },
  {
    "path": "testData/highlighting/placeholderCount.go",
    "content": "package placeholderCount\n\nimport \"fmt\"\nimport \"log\"\nimport \"testing\"\nimport \"unsafe\"\nimport \"C\"\n\nconst (\n\tmyFormatConst      = \"%d %d %#[1]x %#x %2.f %d %2.2f %.f %.3f %[9]*.[2]*[3]f %d %f %#[1]x %#x %[2]d %v % d\"\n\tmyWrongFormatConst = \"%d %d %#[1]x %#x %2.f %d %2.2f %.f %.3f %[9]*.[2]*[3]f %d %f %#[1]x %#x %[2]d %v % d\"\n)\n\nfunc printf(string, ...int) {\n\n}\n\nvar s string = \"%d\"\nconst s1 = <error descr=\"Cyclic definition detected\">s1</error>\nconst s2 = 1\n\nfunc _(t *testing.T) {\n\tfmt.Printf(<warning descr=\"Got 1 placeholder(s) for 2 arguments(s)\">s</warning>, 1, 2)\n\n\tfmt.Printf(<warning descr=\"Value used for formatting text does not appear to be a string\">s1</warning>, 1, 2)\n\n\tfmt.Printf(<warning descr=\"Value used for formatting text does not appear to be a string\">s2</warning>, 1, 2)\n\n\tfmt.Errorf(\"%d %d %#[1]x %#x %2.f %d %2.2f %.f %.3f %[9]*.[2]*[3]f %d %f %#[1]x %#x %[2]d %v % d\",\n\t\t1, 2, 3, 4, 5, 6, 7, 8, 9,\n\t)\n\tfmt.Fprintf(nil, \"%d %d %#[1]x %#x %2.f %d %2.2f %.f %.3f %[9]*.[2]*[3]f %d %f %#[1]x %#x %[2]d %v % d\",\n\t\t1, 2, 3, 4, 5, 6, 7, 8, 9,\n\t)\n\tfmt.Fscanf(nil, \"%d %d %#[1]x %#x %2.f %d %2.2f %.f %.3f %[9]*.[2]*[3]f %d %f %#[1]x %#x %[2]d %v % d\",\n\t\t1, 2, 3, 4, 5, 6, 7, 8, 9,\n\t)\n\tfmt.Printf(\"%d %d %#[1]x %#x %2.f %d %2.2f %.f %.3f %[9]*.[2]*[3]f %d %f %#[1]x %#x %[2]d %v % d\",\n\t\t1, 2, 3, 4, 5, 6, 7, 8, 9,\n\t)\n\tfmt.Scanf(\"%d %d %#[1]x %#x %2.f %d %2.2f %.f %.3f %[9]*.[2]*[3]f %d %f %#[1]x %#x %[2]d %v % d\",\n\t\t1, 2, 3, 4, 5, 6, 7, 8, 9,\n\t)\n\tfmt.Sprintf(\"%d %d %#[1]x %#x %2.f %d %2.2f %.f %.3f %[9]*.[2]*[3]f %d %f %#[1]x %#x %[2]d %v % d\",\n\t\t1, 2, 3, 4, 5, 6, 7, 8, 9,\n\t)\n\tfmt.Sscanf(nil, \"%d %d %#[1]x %#x %2.f %d %2.2f %.f %.3f %[9]*.[2]*[3]f %d %f %#[1]x %#x %[2]d %v % d\",\n\t\t1, 2, 3, 4, 5, 6, 7, 8, 9,\n\t)\n\tlog.Fatalf(\"%d %d %#[1]x %#x %2.f %d %2.2f %.f %.3f %[9]*.[2]*[3]f %d %f %#[1]x %#x %[2]d %v % d\",\n\t\t1, 2, 3, 4, 5, 6, 7, 8, 9,\n\t)\n\tlog.Panicf(\"%d %d %#[1]x %#x %2.f %d %2.2f %.f %.3f %[9]*.[2]*[3]f %d %f %#[1]x %#x %[2]d %v % d\",\n\t\t1, 2, 3, 4, 5, 6, 7, 8, 9,\n\t)\n\tlog.Printf(\"%d %d %#[1]x %#x %2.f %d %2.2f %.f %.3f %[9]*.[2]*[3]f %d %f %#[1]x %#x %[2]d %v % d\",\n\t\t1, 2, 3, 4, 5, 6, 7, 8, 9,\n\t)\n\n\tfmt.Printf(\"eq (as-is): %.3f%% score: %v offset: %v descr: [%v]\\n\", 3.14, 1, 1, \"descr\")\n\n\tfmt.Printf(\"a: %+v\", 1)\n\n\tfmt.Printf(\"%-4d\", 999)\n\n\tfmt.Printf(\"a: %%%+v\", 1)\n\n\tfmt.Printf(<warning descr=\"Got 0 placeholder(s) for 1 arguments(s)\">\"a: %%%%+v\"</warning>, 1)\n\n\tfmt.Printf(\"#%02X%02X%02X\", 1, 2, 3)\n\n\tfmt.Printf(<warning descr=\"Got 3 placeholder(s) for 4 arguments(s)\">\"#%02X%02X%02X\"</warning>, 1, 2, 3, 4)\n\n\tmyFormatVar := \"%d %d %#[1]x %#x %2.f %d %2.2f %.f %.3f %[9]*.[2]*[3]f %d %f %#[1]x %#x %[2]d %v % d\"\n\tlog.Printf(myFormatVar, 1, 2, 3, 4, 5, 6, 7, 8, 9)\n\n\tmyWrongFormatVar := \"%d %d %#[1]x %#x %2.f %d %2.2f %.f %.3f %[9]*.[2]*[3]f %d %f %#[1]x %#x %[2]d %v % d\"\n\tlog.Printf(<warning descr=\"Got 9 placeholder(s) for 8 arguments(s)\">myWrongFormatVar</warning>, 1, 2, 3, 4, 5, 6, 7, 8)\n\n\tlog.Printf(myFormatConst, 1, 2, 3, 4, 5, 6, 7, 8, 9)\n\tt.Errorf(myFormatConst, 1, 2, 3, 4, 5, 6, 7, 8, 9)\n\tt.Fatalf(myFormatConst, 1, 2, 3, 4, 5, 6, 7, 8, 9)\n\tt.Logf(myFormatConst, 1, 2, 3, 4, 5, 6, 7, 8, 9)\n\tt.Skipf(myFormatConst, 1, 2, 3, 4, 5, 6, 7, 8, 9)\n\n\tlog.Printf(<warning descr=\"Got 9 placeholder(s) for 8 arguments(s)\">myWrongFormatConst</warning>, 1, 2, 3, 4, 5, 6, 7, 8)\n\tt.Errorf(<warning descr=\"Got 9 placeholder(s) for 8 arguments(s)\">myWrongFormatConst</warning>, 1, 2, 3, 4, 5, 6, 7, 8)\n\tt.Fatalf(<warning descr=\"Got 9 placeholder(s) for 8 arguments(s)\">myWrongFormatConst</warning>, 1, 2, 3, 4, 5, 6, 7, 8)\n\tt.Logf(<warning descr=\"Got 9 placeholder(s) for 8 arguments(s)\">myWrongFormatConst</warning>, 1, 2, 3, 4, 5, 6, 7, 8)\n\tt.Skipf(<warning descr=\"Got 9 placeholder(s) for 8 arguments(s)\">myWrongFormatConst</warning>, 1, 2, 3, 4, 5, 6, 7, 8)\n\n\tprintf(\"%d\", 1)\n\tprintf(\"%[2]d %[1]d\", 1, 2)\n\tprintf(\"%[2]d %[1]d %d\", 1, 2)\n\tprintf(\"%[2]d %[1]d %[2]d\", 1, 2)\n\tprintf(\"%d\")\n\n\tmyNonFormatFunc := func () int {\n\t\treturn 1\n\t}\n\tlog.Printf(<warning descr=\"Value used for formatting text does not appear to be a string\">myNonFormatFunc()</warning>, 1, 2, 3, 4, 5, 6, 7, 8, 9)\n\n\tlog.Printf(<warning descr=\"Got 9 placeholder(s) for 8 arguments(s)\">\"%d %d %#[1]x %#x %2.f %d %2.2f %.f %.3f %[9]*.[2]*[3]f %d %f %#[1]x %#x %[2]d %v % d\"</warning>,\n\t\t1, 2, 3, 4, 5, 6, 7, 8,\n\t)\n\tfmt.Sprintf(<warning descr=\"Got 1 placeholder(s) for 0 arguments(s)\">\"%d\"</warning>)\n\n\tlog.Printf(<warning descr=\"Got 7 placeholder(s) for 13 arguments(s)\">\"%d %d %#[1]x %#x %f %2.f %2.2f %.f %.3f %[3]*.[2]*[1]f %d %d %#[1]x %#x %*[2]d %v % d\"</warning>,\n\t\t1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,\n\t)\n\tfmt.Sprintf(<warning descr=\"Got 1 placeholder(s) for 2 arguments(s)\">\"%d\"</warning>, 1, 2)\n\n\tfmt.Print(<warning descr=\"Possible formatting directive in '\\\"%[2]*.[1]*[3]d\\\"'\">\"%[2]*.[1]*[3]d\"</warning>, 2, 3, myNonFormatFunc)\n\tfmt.Print(<warning descr=\"Possible formatting directive in '\\\"%[2]*.[1]*[3]d\\\"'\">\"%[2]*.[1]*[3]d\"</warning>, 2, 3, printf)\n\n\tfmt.Println(\"demo<warning descr=\"Function already ends with new line\">\\n</warning>\", 2, 3, <warning descr=\"Argument 'myNonFormatFunc' is not a function call\">myNonFormatFunc</warning>)\n\tfmt.Println(\"demo<warning descr=\"Function already ends with new line\">\\n</warning>\", 2, 3, <warning descr=\"Argument 'printf' is not a function call\">printf</warning>)\n\n\tfmt.Print(\"demo\\n\", 2, 3, <warning descr=\"Argument 'myNonFormatFunc' is not a function call\">myNonFormatFunc</warning>)\n\tfmt.Print(\"demo\\n\", 2, 3, <warning descr=\"Argument 'printf' is not a function call\">printf</warning>)\n\n\ttype X struct{ Y, Z int32 }\n\ta := &X{5, 7}\n\tfmt.Println(a, \"->\", C.sum(*((*C.struct_x)(unsafe.Pointer(a)))))\n\n\tfmt.Sprintf(\"asdadad <warning descr=\"Unrecognized formatting verb '%O' call\">%O</warning> asdadad\", \"demo\")\n\tfmt.Printf(\"%[<warning descr=\"Index value [0] is not allowed\">0</warning>]d\", 1)\n}\n\nfunc _(format string, args ...interface{}) {\n\tfmt.Fprintf(nil, \"\\nError: \"+format+\"\\n\", args...)\n}\n"
  },
  {
    "path": "testData/highlighting/placeholderCountVet.go",
    "content": "// Copyright 2010 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// This file contains tests for the printf checker.\n\npackage testdata\n\nimport (\n\t\"fmt\"\n\t\"math\"\n\t\"os\"\n\t\"unsafe\" // just for test case printing unsafe.Pointer\n)\n\nfunc <warning descr=\"Unused function 'UnsafePointerPrintfTest'\">UnsafePointerPrintfTest</warning>() {\n\tvar up unsafe.Pointer\n\tfmt.Printf(\"%p, %x %X\", up, up, up)\n}\n\n// Error methods that do not satisfy the Error interface and should be checked.\ntype errorTest1 int\n\nfunc (errorTest1) Error(...interface{}) string {\n\treturn \"hi\"\n}\n\ntype errorTest2 int // Analogous to testing's *T type.\nfunc (errorTest2) Error(...interface{}) {\n}\n\ntype errorTest3 int\n\nfunc (errorTest3) Error() { // No return value.\n}\n\ntype errorTest4 int\n\nfunc (errorTest4) Error() int { // Different return type.\n\treturn 3\n}\n\ntype errorTest5 int\n\nfunc (errorTest5) <warning descr=\"Method 'error' collides with builtin type\">error</warning>() { // niladic; don't complain if no args (was bug)\n}\n\n// This function never executes, but it serves as a simple test for the program.\n// Test with make test.\nfunc <warning descr=\"Unused function 'PrintfTests'\">PrintfTests</warning>() {\n\tvar b bool\n\tvar i int\n\tvar r rune\n\tvar s string\n\tvar x float64\n\tvar p *int\n\tvar imap map[int]int\n\tvar fslice []float64\n\tvar c complex64\n\t// Some good format/argtypes\n\tfmt.Printf(<warning descr=\"Value used for formatting text does not appear to contain a placeholder\">\"\"</warning>)\n\tfmt.Printf(\"%b %b %b\", 3, i, x)\n\tfmt.Printf(\"%c %c %c %c\", 3, i, 'x', r)\n\tfmt.Printf(\"%d %d %d\", 3, i, imap)\n\tfmt.Printf(\"%e %e %e %e\", 3e9, x, fslice, c)\n\tfmt.Printf(\"%E %E %E %E\", 3e9, x, fslice, c)\n\tfmt.Printf(\"%f %f %f %f\", 3e9, x, fslice, c)\n\tfmt.Printf(\"%F %F %F %F\", 3e9, x, fslice, c)\n\tfmt.Printf(\"%g %g %g %g\", 3e9, x, fslice, c)\n\tfmt.Printf(\"%G %G %G %G\", 3e9, x, fslice, c)\n\tfmt.Printf(\"%b %b %b %b\", 3e9, x, fslice, c)\n\tfmt.Printf(\"%o %o\", 3, i)\n\tfmt.Printf(\"%p %p\", p, nil)\n\tfmt.Printf(\"%q %q %q %q\", 3, i, 'x', r)\n\tfmt.Printf(\"%s %s %s\", \"hi\", s, []byte{65})\n\tfmt.Printf(\"%t %t\", true, b)\n\tfmt.Printf(\"%T %T\", 3, i)\n\tfmt.Printf(\"%U %U\", 3, i)\n\tfmt.Printf(\"%v %v\", 3, i)\n\tfmt.Printf(\"%x %x %x %x\", 3, i, \"hi\", s)\n\tfmt.Printf(\"%X %X %X %X\", 3, i, \"hi\", s)\n\tfmt.Printf(\"%.*s %d %g\", 3, \"hi\", 23, 2.3)\n\tfmt.Printf(\"%s\", &stringerv)\n\tfmt.Printf(\"%v\", &stringerv)\n\tfmt.Printf(\"%T\", &stringerv)\n\tfmt.Printf(\"%v\", notstringerv)\n\tfmt.Printf(\"%T\", notstringerv)\n\tfmt.Printf(\"%q\", stringerarrayv)\n\tfmt.Printf(\"%v\", stringerarrayv)\n\tfmt.Printf(\"%s\", stringerarrayv)\n\tfmt.Printf(\"%v\", notstringerarrayv)\n\tfmt.Printf(\"%T\", notstringerarrayv)\n\tfmt.Printf(\"%d\", new(Formatter))\n\tfmt.Printf(\"%*%\", 2)               // Ridiculous but allowed.\n\tfmt.Printf(\"%s\", interface{}(nil)) // Nothing useful we can say.\n\n\tfmt.Printf(\"%g\", 1+2i)\n\t// Some bad format/argTypes\n\tfmt.Printf(\"%b\", \"hi\")                     // ERROR \"arg .hi. for printf verb %b of wrong type\"\n\tfmt.Printf(\"%t\", c)                        // ERROR \"arg c for printf verb %t of wrong type\"\n\tfmt.Printf(\"%t\", 1+2i)                     // ERROR \"arg 1 \\+ 2i for printf verb %t of wrong type\"\n\tfmt.Printf(\"%c\", 2.3)                      // ERROR \"arg 2.3 for printf verb %c of wrong type\"\n\tfmt.Printf(\"%d\", 2.3)                      // ERROR \"arg 2.3 for printf verb %d of wrong type\"\n\tfmt.Printf(\"%e\", \"hi\")                     // ERROR \"arg .hi. for printf verb %e of wrong type\"\n\tfmt.Printf(\"%E\", true)                     // ERROR \"arg true for printf verb %E of wrong type\"\n\tfmt.Printf(\"%f\", \"hi\")                     // ERROR \"arg .hi. for printf verb %f of wrong type\"\n\tfmt.Printf(\"%F\", 'x')                      // ERROR \"arg 'x' for printf verb %F of wrong type\"\n\tfmt.Printf(\"%g\", \"hi\")                     // ERROR \"arg .hi. for printf verb %g of wrong type\"\n\tfmt.Printf(\"%g\", imap)                     // ERROR \"arg imap for printf verb %g of wrong type\"\n\tfmt.Printf(\"%G\", i)                        // ERROR \"arg i for printf verb %G of wrong type\"\n\tfmt.Printf(\"%o\", x)                        // ERROR \"arg x for printf verb %o of wrong type\"\n\tfmt.Printf(\"%p\", 23)                       // ERROR \"arg 23 for printf verb %p of wrong type\"\n\tfmt.Printf(\"%q\", x)                        // ERROR \"arg x for printf verb %q of wrong type\"\n\tfmt.Printf(\"%s\", b)                        // ERROR \"arg b for printf verb %s of wrong type\"\n\tfmt.Printf(\"%s\", byte(65))                 // ERROR \"arg byte\\(65\\) for printf verb %s of wrong type\"\n\tfmt.Printf(\"%t\", 23)                       // ERROR \"arg 23 for printf verb %t of wrong type\"\n\tfmt.Printf(\"%U\", x)                        // ERROR \"arg x for printf verb %U of wrong type\"\n\tfmt.Printf(\"%x\", nil)                      // ERROR \"arg nil for printf verb %x of wrong type\"\n\tfmt.Printf(\"%X\", 2.3)                      // ERROR \"arg 2.3 for printf verb %X of wrong type\"\n\tfmt.Printf(\"%s\", stringerv)                // ERROR \"arg stringerv for printf verb %s of wrong type\"\n\tfmt.Printf(\"%t\", stringerv)                // ERROR \"arg stringerv for printf verb %t of wrong type\"\n\tfmt.Printf(\"%q\", notstringerv)             // ERROR \"arg notstringerv for printf verb %q of wrong type\"\n\tfmt.Printf(\"%t\", notstringerv)             // ERROR \"arg notstringerv for printf verb %t of wrong type\"\n\tfmt.Printf(\"%t\", stringerarrayv)           // ERROR \"arg stringerarrayv for printf verb %t of wrong type\"\n\tfmt.Printf(\"%t\", notstringerarrayv)        // ERROR \"arg notstringerarrayv for printf verb %t of wrong type\"\n\tfmt.Printf(\"%q\", notstringerarrayv)        // ERROR \"arg notstringerarrayv for printf verb %q of wrong type\"\n\tfmt.Printf(\"%d\", Formatter(true))          // correct (the type is responsible for formatting)\n\tfmt.Printf(\"%s\", nonemptyinterface)        // correct (the dynamic type of nonemptyinterface may be a stringer)\n\tfmt.Printf(\"%.*s %d %g\", 3, \"hi\", 23, 'x') // ERROR \"arg 'x' for printf verb %g of wrong type\"\n\tfmt.Println()                              // not an error\n\tfmt.Println(<warning descr=\"Possible formatting directive in '\\\"%s\\\"'\">\"%s\"</warning>, \"hi\")                    // ERROR \"possible formatting directive in Println call\"\n\tfmt.Printf(<warning descr=\"Got 1 placeholder(s) for 2 arguments(s)\">\"%s\"</warning>, \"hi\", 3)                  // ERROR \"wrong number of args for format in Printf call\"\n\t_ = fmt.Sprintf(<warning descr=\"Got 1 placeholder(s) for 2 arguments(s)\">\"%\"+(\"s\")</warning>, \"hi\", 3)        // ERROR \"wrong number of args for format in Sprintf call\"\n\tfmt.Printf(\"%s%%%d\", \"hi\", 3)              // correct\n\tfmt.Printf(\"%08s\", \"woo\")                  // correct\n\tfmt.Printf(\"% 8s\", \"woo\")                  // correct\n\tfmt.Printf(\"%.*d\", 3, 3)                   // correct\n\tfmt.Printf(<warning descr=\"Got 2 placeholder(s) for 4 arguments(s)\">\"%.*d\"</warning>, 3, 3, 3, 3)             // ERROR \"wrong number of args for format in Printf call.*4 args\"\n\tfmt.Printf(\"%.*d\", \"hi\", 3)                // ERROR \"arg .hi. for \\* in printf format not of type int\"\n\tfmt.Printf(\"%.*d\", i, 3)                   // correct\n\tfmt.Printf(\"%.*d\", s, 3)                   // ERROR \"arg s for \\* in printf format not of type int\"\n\tfmt.Printf(\"%*%\", 0.22)                    // ERROR \"arg 0.22 for \\* in printf format not of type int\"\n\tfmt.Printf(\"%q %q\", multi()...)            // ok\n\tfmt.Printf(\"%#q\", `blah`)                  // ok\n\tprintf(\"now is the time\", \"buddy\")         // ERROR \"no formatting directive\"\n\tPrintf(\"now is the time\", \"buddy\")         // ERROR \"no formatting directive\"\n\tPrintf(\"hi\")                               // ok\n\tconst format = \"%s %s\\n\"\n\tPrintf(format, \"hi\", \"there\")\n\tPrintf(format, \"hi\")              // ERROR \"missing argument for Printf..%s..: format reads arg 2, have only 1\"\n\tPrintf(\"%s %d %.3v %q\", \"str\", 4) // ERROR \"missing argument for Printf..%.3v..: format reads arg 3, have only 2\"\n\tf := new(stringer)\n\tf.Warn(0, \"%s\", \"hello\", 3)  // ERROR \"possible formatting directive in Warn call\"\n\tf.Warnf(0, \"%s\", \"hello\", 3) // ERROR \"wrong number of args for format in Warnf call\"\n\tf.Warnf(0, \"%r\", \"hello\")    // ERROR \"unrecognized printf verb\"\n\tf.Warnf(0, \"%#s\", \"hello\")   // ERROR \"unrecognized printf flag\"\n\tPrintf(\"d%\", 2)              // ERROR \"missing verb at end of format string in Printf call\"\n\tPrintf(\"%d\", percentDV)\n\tPrintf(\"%d\", &percentDV)\n\tPrintf(\"%d\", notPercentDV)  // ERROR \"arg notPercentDV for printf verb %d of wrong type\"\n\tPrintf(\"%d\", &notPercentDV) // ERROR \"arg &notPercentDV for printf verb %d of wrong type\"\n\tPrintf(\"%p\", &notPercentDV) // Works regardless: we print it as a pointer.\n\tPrintf(\"%s\", percentSV)\n\tPrintf(\"%s\", &percentSV)\n\t// Good argument reorderings.\n\tPrintf(\"%[1]d\", 3)\n\tPrintf(\"%[1]*d\", 3, 1)\n\tPrintf(\"%[2]*[1]d\", 1, 3)\n\tPrintf(\"%[2]*.[1]*[3]d\", 2, 3, 4)\n\tfmt.Fprintf(os.Stderr, \"%[2]*.[1]*[3]d\", 2, 3, 4) // Use Fprintf to make sure we count arguments correctly.\n\t// Bad argument reorderings.\n\tPrintf(\"%[xd\", 3)                    // ERROR \"illegal syntax for printf argument index\"\n\tPrintf(\"%[x]d\", 3)                   // ERROR \"illegal syntax for printf argument index\"\n\tPrintf(\"%[3]*s\", \"hi\", 2)            // ERROR \"missing argument for Printf.* reads arg 3, have only 2\"\n\t_ = fmt.Sprintf(<warning descr=\"Got 3 placeholder(s) for 1 arguments(s)\">\"%[3]d\"</warning>, 2)          // ERROR \"missing argument for Sprintf.* reads arg 3, have only 1\"\n\tPrintf(\"%[2]*.[1]*[3]d\", 2, \"hi\", 4) // ERROR \"arg .hi. for \\* in printf format not of type int\"\n\tPrintf(\"%[0]s\", \"arg1\")              // ERROR \"index value \\[0\\] for Printf.*; indexes start at 1\"\n\tPrintf(\"%[0]d\", 1)                   // ERROR \"index value \\[0\\] for Printf.*; indexes start at 1\"\n\t// Something that satisfies the error interface.\n\tvar e error\n\tfmt.Println(e.Error()) // ok\n\t// Something that looks like an error interface but isn't, such as the (*T).Error method\n\t// in the testing package.\n\tvar et1 errorTest1\n\tfmt.Println(et1.Error())        // ERROR \"no args in Error call\"\n\tfmt.Println(et1.Error(\"hi\"))    // ok\n\tfmt.Println(et1.Error(<warning descr=\"Possible formatting directive in '\\\"%d\\\"'\">\"%d\"</warning>, 3)) // ERROR \"possible formatting directive in Error call\"\n\tvar et2 errorTest2\n\tet2.Error()        // ERROR \"no args in Error call\"\n\tet2.Error(\"hi\")    // ok, not an error method.\n\tet2.Error(<warning descr=\"Possible formatting directive in '\\\"%d\\\"'\">\"%d\"</warning>, 3) // ERROR \"possible formatting directive in Error call\"\n\tvar et3 errorTest3\n\tet3.Error() // ok, not an error method.\n\tvar et4 errorTest4\n\tet4.Error() // ok, not an error method.\n\tvar et5 errorTest5\n\tet5.error() // ok, not an error method.\n\t// Can't print a function.\n\tPrintf(\"%d\", someFunction) // ERROR \"arg someFunction in printf call is a function value, not a function call\"\n\tPrintf(\"%v\", someFunction) // ERROR \"arg someFunction in printf call is a function value, not a function call\"\n\tPrintln(<warning descr=\"Argument 'someFunction' is not a function call\">someFunction</warning>)      // ERROR \"arg someFunction in Println call is a function value, not a function call\"\n\tPrintf(\"%p\", someFunction) // ok: maybe someone wants to see the pointer\n\tPrintf(\"%T\", someFunction) // ok: maybe someone wants to see the type\n\t// Bug: used to recur forever.\n\tPrintf(\"%p %x\", recursiveStructV, recursiveStructV.next)\n\tPrintf(\"%p %x\", recursiveStruct1V, recursiveStruct1V.next)\n\tPrintf(\"%p %x\", recursiveSliceV, recursiveSliceV)\n\tPrintf(\"%p %x\", recursiveMapV, recursiveMapV)\n\t// Special handling for Log.\n\tmath.<error descr=\"Unresolved reference 'Log'\">Log</error>(3)  // OK\n\t<error descr=\"Unresolved reference 'Log'\">Log</error>(3)       // OK\n\t<error descr=\"Unresolved reference 'Log'\">Log</error>(\"%d\", 3) // ERROR \"possible formatting directive in Log call\"\n\t<error descr=\"Unresolved reference 'Logf'\">Logf</error>(\"%d\", 3)\n\t<error descr=\"Unresolved reference 'Logf'\">Logf</error>(\"%d\", \"hi\") // ERROR \"arg .hi. for printf verb %d of wrong type: untyped string\"\n\n}\n\n// A function we use as a function value; it has no other purpose.\nfunc someFunction() {\n}\n\nfunc Println(<warning descr=\"Unused parameter 'args'\">args</warning> ...interface{}) {\n\tpanic(\"don't call - testing only\")\n}\n\n// Printf is used by the test so we must declare it.\nfunc Printf(<warning descr=\"Unused parameter 'format'\">format</warning> string, <warning descr=\"Unused parameter 'args'\">args</warning> ...interface{}) {\n\tpanic(\"don't call - testing only\")\n}\n\n// printf is used by the test so we must declare it.\nfunc printf(<warning descr=\"Unused parameter 'format'\">format</warning> string, <warning descr=\"Unused parameter 'args'\">args</warning> ...interface{}) {\n\tpanic(\"don't call - testing only\")\n}\n\n// multi is used by the test.\nfunc multi() []interface{} {\n\tpanic(\"don't call - testing only\")\n}\n\ntype stringer float64\n\nvar stringerv stringer\n\nfunc (*stringer) String() string {\n\treturn \"string\"\n}\n\nfunc (*stringer) Warn(int, ...interface{}) string {\n\treturn \"warn\"\n}\n\nfunc (*stringer) Warnf(int, string, ...interface{}) string {\n\treturn \"warnf\"\n}\n\ntype notstringer struct {\n\tf float64\n}\n\nvar notstringerv notstringer\n\ntype stringerarray [4]float64\n\nfunc (stringerarray) String() string {\n\treturn \"string\"\n}\n\nvar stringerarrayv stringerarray\n\ntype notstringerarray [4]float64\n\nvar notstringerarrayv notstringerarray\n\nvar nonemptyinterface = interface {\n\tf()\n}(nil)\n\n// A data type we can print with \"%d\".\ntype percentDStruct struct {\n\ta int\n\tb []byte\n\tc *float64\n}\n\nvar percentDV percentDStruct\n\n// A data type we cannot print correctly with \"%d\".\ntype notPercentDStruct struct {\n\ta int\n\tb []byte\n\tc bool\n}\n\nvar notPercentDV notPercentDStruct\n\n// A data type we can print with \"%s\".\ntype percentSStruct struct {\n\ta string\n\tb []byte\n\tc stringerarray\n}\n\nvar percentSV percentSStruct\n\ntype recursiveStringer int\n\nfunc (s recursiveStringer) String() string {\n\t_ = fmt.Sprintf(\"%d\", s)\n\t_ = fmt.Sprintf(\"%#v\", s)\n\t_ = fmt.Sprintf(\"%v\", s)  // ERROR \"arg s for printf causes recursive call to String method\"\n\t_ = fmt.Sprintf(\"%v\", &s) // ERROR \"arg &s for printf causes recursive call to String method\"\n\t_ = fmt.Sprintf(\"%T\", s)  // ok; does not recursively call String\n\treturn fmt.Sprintln(s)    // ERROR \"arg s in Sprintln call causes recursive call to String method\"\n}\n\ntype recursivePtrStringer int\n\nfunc (p *recursivePtrStringer) String() string {\n\t_ = fmt.Sprintf(\"%v\", *p)\n\treturn fmt.Sprintln(p) // ERROR \"arg p in Sprintln call causes recursive call to String method\"\n}\n\ntype Formatter bool\n\nfunc (*Formatter) Format(fmt.State, rune) {\n}\n\ntype RecursiveSlice []RecursiveSlice\n\nvar recursiveSliceV = &RecursiveSlice{}\n\ntype RecursiveMap map[int]RecursiveMap\n\nvar recursiveMapV = make(RecursiveMap)\n\ntype RecursiveStruct struct {\n\tnext *RecursiveStruct\n}\n\nvar recursiveStructV = &RecursiveStruct{}\n\ntype RecursiveStruct1 struct {\n\tnext *<error descr=\"Unresolved type 'Recursive2Struct'\">Recursive2Struct</error>\n}\n\ntype RecursiveStruct2 struct {\n\tnext *<error descr=\"Unresolved type 'Recursive1Struct'\">Recursive1Struct</error>\n}\n\nvar recursiveStruct1V = &RecursiveStruct1{}\n\n// Fix for issue 7149: Missing return type on String method caused fault.\nfunc (<error descr=\"Unresolved type 'int'\">int</error>) String() {\n\treturn \"\"\n}\n"
  },
  {
    "path": "testData/highlighting/pointers.go",
    "content": "package main\n\ntype T int\nfunc (T) M() {}\nvar w *T\nvar x *T\nvar y **T\nvar z ***T\n\nfunc main() {\n  w.M()\n  x.M()\n  y.M()\n  z.<error>M</error>()\n}\n\ntype Name struct {\n\taaa int\n}\n\ntype B *Name\n\nfunc _(b *B) {\n\tb.<error>aaa</error>\n}\n\nfunc _() {\n        b := new(B)\n\tb.<error>aaa</error>\n}"
  },
  {
    "path": "testData/highlighting/rangeIterationOnIllegalType.go",
    "content": "package main\n\nimport \"fmt\"\n\ntype TestStruct struct {\n\tSomeId int\n}\n\ntype DataSlice []*TestStruct\n\nfunc _() {\n\tdata := &DataSlice{}\n\tfor _, element := range <error descr=\"Cannot range over data\">data</error> {  // here we should have an error: cannot range over data (type *DataSlice)\n\t\tif element.SomeId > 20 {\n\t\t\tprintln(\"some text\")\n\t\t}\n\t}\n}\n\nfunc _() {\n\tdata := DataSlice{}\n\tfor _, element := range <error descr=\"Cannot range over data\">&data</error> {  // here we should have an error: cannot range over cannot range over &data (type *DataSlice)\n\t\tif element.SomeId > 20 {\n\t\t\tprintln(\"some text\")\n\t\t}\n\t}\n}\n\nfunc main() {\n\tnums := []int{2, 3, 4}\n\tsum := 0\n\n\tfor _, num := range nums {\n\t\tsum += num\n\t}\n\tfmt.Println(\"sum:\", sum)\n\n\tfor i, num := range nums {\n\t\tif num == 3 {\n\t\t\tfmt.Println(\"index:\", i)\n\t\t}\n\t}\n\n\tkvs := map[string]string{\"a\": \"apple\", \"b\": \"banana\"}\n\tfor k, v := range kvs {\n\t\tfmt.Printf(\"%s -> %s\\n\", k, v)\n\t}\n\n\tfor i, c := range \"go\" {\n\t\tfmt.Println(i, c)\n\t}\n}\n"
  },
  {
    "path": "testData/highlighting/ranges.go",
    "content": "package main\n\nimport \"fmt\"\n\nfunc append1([]Type, ...Type) []Type\ntype Type int\ntype <warning descr=\"Type 'int' collides with builtin type\">int</warning> int\ntype <warning descr=\"Type 'string' collides with builtin type\">string</warning> string\n\nfunc println1(o... interface {}) {\n    fmt.Println(o)\n}\ntype Person struct {\n    Name  string\n    Likes []string\n}\n\ntype (\n    Packet struct {\n        path string\n    }\n\n    Plugin struct {\n        Path    string\n        Packets Packets\n    }\n    Packets []*Packet\n)\n\nfunc main() {\n    var people []*Person\n\n    likes := make(map[string][]*Person)\n    for _, p := range people {\n        for _, l := range p.Likes {\n            likes[l] = append1(likes[l], p)\n        }\n    }\n\n    for k, v := range likes {\n         println1(k)\n         println1(v[1].Likes)\n    }\n\n    var <error descr=\"Unused variable 'people'\">people</error> []*Person // todo: should be redeclared\n    for <error descr=\"Unused variable 'a'\">a</error>, p := range people {\n        println(p.Likes)\n    }\n\n    for _, p2 := range create() {\n        println(p2.Likes)\n    }\n\n    var p Plugin = nil\n    for _, p := range p.Packets {\n        println(p.path)\n    }\n\n    for _, <error descr=\"Unused variable 'd'\">d</error> := range <error descr=\"Unresolved reference 'd'\">d</error>.Packets {\n    }\n}\nfunc create() []*Person {return make([]*Person, 0)}\n\ntype myStruct struct {\n    MyVal bool\n}\n\ntype myChanType chan myStruct\n\nfunc chanFn(c myChanType) {\n    for v := range c {\n             fmt.Printf(\"Got %v\\n\", v.MyVal) // v.MyVal is unresolved\n    }\n}\n\nfunc _() {\n    ch := make(myChanType)\n    go chanFn(ch)\n    ch <- myStruct{true}\n}\n\n\ntype sampleType struct {\n    a int\n}\n\ntype a_ b_\ntype b_ sampleChan\ntype sampleChan chan sampleType\n\nfunc sample() a_ {\n\treturn make(chan sampleType, 3)\n}\n\nfunc _() {\n\tc := sample()\n\tc <- sampleType{1}\n\tc <- sampleType{2}\n\tc <- sampleType{3}\n\tclose(c)\n\n\tfor t := range (((c))) {\n\t\tprintln(t.a)\n\t}\n}"
  },
  {
    "path": "testData/highlighting/receiverType.go",
    "content": "package main\n\nimport (\n\t\"fmt\"\n)\n\ntype Vertex struct {\n\tX, Y float64\n}\n\nfunc main() {\n\tv := Vertex{3, 4}\n\tfmt.Print(v.Abs())\n}\n\nfunc (v *Vertex) Abs() float64 {\n\treturn   (*v).X*v.X + v.Y*v.Y\n}\n\nfunc (<error descr=\"Unresolved type 'Abs'\">Abs</error>) methodOnFunction() {\n}"
  },
  {
    "path": "testData/highlighting/recv.go",
    "content": "package main\n\nfunc main() {\n    var ch = make(chan int)\n    select {\n    case <error>test</error> := <-ch: {\n        test := 1\n        print(test)\n    }\n    }\n}"
  },
  {
    "path": "testData/highlighting/redeclaredImportAsFunction.go",
    "content": "package demo\n\nimport \"fmt\"\n\nfunc _() {\n  fmt.Println(\"Hello\")\n}\n\nfunc <error descr=\"import \\\"fmt\\\" redeclared in this block\">fmt</error>() {}\n\n"
  },
  {
    "path": "testData/highlighting/relativeImportIgnoringDirectories.go",
    "content": "package test\n\nimport `./<error descr=\"Cannot resolve file '.name'\">.name</error>`\nimport <error descr=\"Redeclared import\">`./<error descr=\"Cannot resolve file '_name'\">_name</error>`</error>\nimport `./<error descr=\"Cannot resolve file 'testdata'\">testdata</error>`"
  },
  {
    "path": "testData/highlighting/request.go",
    "content": "package foo\n\nimport \"net/http\"\n\ntype Request interface {\n    GetHttpRequest() *http.Request\n}\n\nfunc _(r *http.Request) {\n    print(r.URL.Path)\n}"
  },
  {
    "path": "testData/highlighting/reservedWordUsedAsName.go",
    "content": "package main\n\ntype <warning descr=\"Type 'byte' collides with builtin type\">byte</warning> struct{}\ntype <warning descr=\"Type 'string' collides with builtin type\">string</warning> interface{}\n\nfunc <warning descr=\"Function 'uint' collides with builtin type\"><warning descr=\"Unused function 'uint'\">uint</warning></warning>() {}\n\nfunc (u byte) <warning descr=\"Method 'uint' collides with builtin type\">uint</warning>() {}\n\nfunc main() {\n\tconst <warning descr=\"Constant 'int' collides with builtin type\"><warning descr=\"Unused constant 'int'\">int</warning></warning> = 1\n\t<warning descr=\"Variable 'string' collides with builtin type\">string</warning> := \"\"\n\t_ = string\n}\n"
  },
  {
    "path": "testData/highlighting/returns.go",
    "content": "package main\n\nfunc main() {\n    Ok1() + \n    Ok2(42) +\n    Ok3() +\n    Ok4() +\n    Ok5() +\n    Ok6() +\n    Ok7() +\n    Ok8() +\n    NoReturn1() +\n    NoReturn2() +\n    NoReturn3(1) +\n    NoReturn4(1) +\n    NoReturn5(1) +\n    NoReturn6(1) +\n    NoReturn65(1) +\n    NoReturn7(1) +\n    NoReturn8(1) +\n    NoReturn9(1) \n    \n    Ok9()\n    SwitchType(nil)\n    \n    rsaPKCS1v15SignatureAlgorithmForHashID(42)\n    rsaPKCS1v15SignatureAlgorithmForHashID2(42)\n    \n    func() int {\n    <error descr=\"Missing return at end of function\">}</error>\n}\n\nfunc Ok1() int {\n    return 3\n    /*  */\n    //\n}\n\nfunc Ok2(a int) int {\n    if a > 0 {\n        return 3\n    }\n    panic(\"NO!\")\n}\n\nfunc Ok3() int {\n    Label:\n    return 3\n}\n\nfunc Ok4() bool {\n    for {\n        println(\"to infinity and beyond!\")\n    }\n}\n\nfunc Ok5() bool {\n    a := 0\n    if a > 0 {\n        return true\n    }else if a < 0 {\n        return true\n    }else {\n        return false\n    }\n}\n\nfunc Ok6() bool {\n    a := make(chan bool)\n    select {\n    case <-a:\n        return false\n    default:\n        return true\n    }\n}\n\nfunc Ok7() bool {\n    a := 3\n    switch a {\n        case 1:\n        return false\n        case 2:\n        return true\n        default:\n        return true\n    }\n}\n\nfunc Ok8() bool {\n    for a := 0;; a++ {\n\n    }\n}\n\nfunc Ok9() (){\n    for a := 0;; a++ {\n\n    }\n}\n\nfunc NoReturn1() int {\n<error descr=\"Missing return at end of function\">}</error>\n\nfunc NoReturn2() (int, int) {\n<error descr=\"Missing return at end of function\">}</error>\n\n\nfunc NoReturn3(a int) (int, int) {\n    if a == 5 {\n        return a, a\n    }\n<error descr=\"Missing return at end of function\">}</error>\n\nfunc NoReturn4(int) (int, int) {\n    a := 3\n    for a > 0 {\n\n    }\n<error descr=\"Missing return at end of function\">}</error>\n\nfunc NoReturn5(int) (int, int) {\n    a := 3\n    if a > 0 {\n        return 0, 0\n    }\n<error descr=\"Missing return at end of function\">}</error>\n\nfunc NoReturn6(int) (int, int) {\n    a := 3\n    if a > 0 {\n        return 0, 0\n    }else if a < 2 {\n        return 0, 0\n    }\n<error descr=\"Missing return at end of function\">}</error>\n\nfunc NoReturn65(int) (int, int) {\n    a := 3\n    if a > 0 {\n        return 0, 0\n    }else {\n\n    }\n<error descr=\"Missing return at end of function\">}</error>\n\nfunc NoReturn7(int) (int, int) {\n    a := 3\n    switch a {\n        case 1:\n        return 0, 0\n    }\n<error descr=\"Missing return at end of function\">}</error>\n\nfunc NoReturn8(int) (int, int) {\n    a := 3\n    switch a {\n        case 1:\n        return 0, 0\n        default:\n    }\n<error descr=\"Missing return at end of function\">}</error>\n\nfunc NoReturn9(int) (int, int) {\n    a := make(chan bool)\n    select {\n    case <-a:\n        return 0, 0\n    default:\n    }\n<error descr=\"Missing return at end of function\">}</error>\n\nfunc SwitchType(err error) int {\n    switch err.(type) {\n        case nil: return 1\n    }\n<error descr=\"Missing return at end of function\">}</error>\n\nfunc rsaPKCS1v15SignatureAlgorithmForHashID(hashID int) string {\n\tswitch {\n\tcase hashID == 512: return \"asd2\"\n\tcase hashID == 512: return \"asd1\"\n\tcase hashID == 512: fallthrough\n\tdefault: return \"asdas\"\n\t}\n}\n\nfunc rsaPKCS1v15SignatureAlgorithmForHashID2(hashID int) string {\n\tswitch {\n\tcase hashID == 512: return \"asd2\"\n\tcase hashID == 512: return \"asd1\"\n\tcase hashID == 512:\n\tdefault: return \"asdas\"\n\t}\n<error descr=\"Missing return at end of function\">}</error>\n"
  },
  {
    "path": "testData/highlighting/selector.go",
    "content": "package main\n\nimport \"<error>db</error>\"\n\ntype search struct {\n    generals []string\n}\n\ntype context struct {\n    Db db.<error>Database</error>\n}\n\nfunc <warning>initDb</warning>(c context) {\n    <error>_</error> := c.Db.<error>search</error>\n}"
  },
  {
    "path": "testData/highlighting/shortVars.go",
    "content": "package main\n\nimport \"fmt\"\n\nfunc main() {\n    fmt.Println(test())\n    \n    y := 1\n        <error>y, _</error> := 10, 1\n    fmt.Println(y)\n}\n\nfunc f1() int {return 1}\nfunc f2() (int, int) {return 1, 2}\n\nfunc test() int {\n    x := f1()\n    y, z := f2()\n\n    <error>x</error> := f1()\n    <error>y,   z</error>     := f2()\n\n    fmt.Println(test21313())\n    fmt.Println(Test2())\n\n    x, a := f2() // Ok: `x` is reused and `a` is new\n    b, x := f2() // Ok: `b` is new and `x` is reused\n\n    return x + y + z + a + b // Just to avoid unused variable error\n}\n\nfunc test21313() (<warning descr=\"Unused named return parameter 'err'\">err</warning> int) {\n    {\n        err := 1\n        return err\n    }\n    return 1\n}\n\nfunc bar() error {\n    return nil\n}\n\nfunc Test2() (err error) {\n    <error>err</error> := bar()\n    if err := bar(); err != nil {\n        return err\n    } else {\n        err := bar()\n        return err\n    }\n    \n    switch err := bar(); {  // missing switch expression means \"true\"\n        case err != nil: return -err\n        default: return err\n    }\n    \n    var c chan int\n    // todo: fix inspection\n    //noinspection GoVarDeclaration\n    select {\n    case err, ok := (<-c):\n        println(err)\n        println(ok)\n    }\n    \n    return err\n}\n\nfunc _(<warning descr=\"Unused parameter 'i'\">i</warning> int) {\n    for i := 1; i < 3; i++ {\n        _ = i\n    }\n\n    if i := 1; i > 0 {\n        _ = i\n    }\n\n    switch i := 1; {\n        case true: _ = i\n    }\n}\n\nfunc _() string {\n\tselect {\n\tcase <error>s</error> := <- <error>ch</error>:\n\tcase <error>a</error> := <- <error>s</error>:\n\t}\n\treturn <error>s</error>\n}"
  },
  {
    "path": "testData/highlighting/simple.go",
    "content": "package main\n\nimport \"<error descr=\"Cannot resolve file ''\"></error>\"\nimport fmt \"<error descr=\"Cannot resolve file ''\"></error>\"\nimport \"net/http\"\nimport \"io\"\n\nfunc x(string) {}\n\nfunc  main() {\n    println([]string<error descr=\"'!=', '%', '&', '&^', '(', ')', '*', '+', ',', '-', '.', '...', '/', <, <<, <=, '==', '>', '>=', '>>', '^', '{' or '|' expected, got ')'\">)</error>\n    ((<error descr=\"Type string is not an expression\">string</error>))\n    x((string)(\"foo\"))\n    x(<error descr=\"Type string is not an expression\">string</error> + <error descr=\"Type string is not an expression\">string</error>)\n    var b Boom\n    Boom.Run(b, aaa{})\n    <error descr=\"Type string is not an expression\">string</error>\n\ttest := <error descr=\"Unresolved reference 'test'\">test</error>\n\tPrintln(test)\n\ttest.<EOLError descr=\"'!=', '%', '&', '&^', '(', '*', '+', '++', '-', '--', '/', <, <<, <=, <expression>, '==', '>', '>=', '>>', '^', identifier or '|' expected, got '}'\"></EOLError>\n}\n\ntype aaa aaa\n\ntype Boom struct {\n   err aaa\n}\n\nfunc (b *Boom) Run(a aaa) (r1 aaa, r2 aaa) {\n   b.err + a + r1 + r2\n<error descr=\"Missing return at end of function\">}</error>\n\nfunc _() int {\nLabel:\n\tgoto Label\n}\n\nfunc _() int {\n\tfor i := 1; ; i++ {\n\t\tbreak\n\t}\n<error descr=\"Missing return at end of function\">}</error>\n\nfunc _() int {\n\tLabel:\n\tfor i := 1; ; i++ {\n\t\tbreak Label\n\t}\n<error descr=\"Missing return at end of function\">}</error>\n\nfunc _() int {\n\tLabel:\n\tfor i := 1; ; i++ {\n\t\tif (true ) {\n\t\t\tbreak Label\n\t\t}\n \t}\n<error descr=\"Missing return at end of function\">}</error>\n\nfunc _() int {\n\tLabel:\n\tfor i := 1; ; i++ {\n\t\tgoto Label\n \t}\n}\n\n\nfunc _() int {\n\tfor true {\n\t\treturn 1\n\t}\n<error descr=\"Missing return at end of function\">}</error>\n\nfunc _() int {\n\tfor i := 1; ; i++ {\n\t}\n}\n\nfunc _() int {\n\tfor i := 1; i < 10; i++ {\n\t\treturn 1\n\t}\n<error descr=\"Missing return at end of function\">}</error>\n\nfunc <error descr=\"Duplicate function name\">foo</error>() {\n    i := 1\n    for (i) {return 0}\n    if (i) {return <error descr=\"Unresolved reference 'j'\">j</error>}\n\n    headers := []int{1}\n    for _, h := range headers {\n      h++\n    }\n}\n\nvar nil int\n\ntype <warning descr=\"Type 'int' collides with builtin type\">int</warning> int\ntype <warning descr=\"Type 'byte' collides with builtin type\">byte</warning> byte\ntype <warning descr=\"Type 'bool' collides with builtin type\">bool</warning> bool\ntype <warning descr=\"Type 'float32' collides with builtin type\">float32</warning> float32\ntype <warning descr=\"Type 'string' collides with builtin type\">string</warning> string\n\ntype T struct {\n\ta int\n}\nfunc (tv  T) Mv(int) int         { return 0 }  // value receiver\nfunc (tp *T) Mp(float32) float32 { return 1 }  // pointer receiver\n\nvar t T\n\nfunc _() {\n    t.Mv(7)\n    T.Mv(t, 7)\n    (T).Mv(t, 7)\n    f1 := T.Mv; f1(t, 7)\n    f2 := (T).Mv; f2(t, 7)\n    <error descr=\"Use of package fmt without selector\">fmt</error>\n    f1(<error descr=\"Use of package fmt without selector\">fmt</error>)\n}\n\nfunc <error descr=\"Duplicate function name\">foo</error>() {\n    a := &A{}\n    b := &B{b:\"bbb\"}\n    e := &Empty{}\n    y := make(<error descr=\"Cannot make A\">A</error>, 10)\n    z := new(A)\n\n    y.hola()\n    z.hola()\n\n    a.hola()\n    b.hola()\n    e.hola()\n    b.b = \"jj\"\n}\n\ntype B struct {\n    *A\n    b string\n}\ntype A struct {\n    *Empty\n    a int\n}\ntype Empty struct {\n}\nfunc (this *Empty) hola() {\n}\n\ntype AA struct {\n    N int\n}\nfunc _(b *AA) {\n     b.N\n}\n\nfunc _(interface{}, ...interface{}) {\n}\n\nfunc _(o interface{}) {\n  func(i interface{}) {\n    Println(o)\n    Println(i)\n  }\n}\n\nfunc _(integers []int) []int {\n  ch := make(chan int)\n  <error descr=\"Unused variable 'responses'\">responses</error> := []int{}\n  for _, <error descr=\"Unused variable 'i'\">i</error> := range integers {\n      go func(j int) {\n          ch <- j * j\n      }(<error descr=\"Unresolved reference 'j'\">j</error>)\n  }\n  for _, i := range integers {\n      go func(j int) {\n          ch <- j * j\n      }(i)\n  }\n  <error descr=\"Unused variable 'err'\">err</error> := 1\n  _, err = 1, 1\n  return integers\n}\n\nfunc Println(...interface{})  {\n}\n\nfunc _() {\n\ttype connError struct {\n\t\tcn  int\n\t}\n\tch := make(chan connError)\n\tPrintln(ch.<error descr=\"Unresolved reference 'cn'\">cn</error>)\n}\n\ntype ConnStatus interface {\n\tStatus() int32\n\tError() error\n}\n\nfunc Bind() <-chan ConnStatus {\n\tch := make(chan ConnStatus, 1)\n\treturn ch\n}\n\nfunc _() {\n\ta := Bind()\n\tfor c := range a {\n\t\tPrintln(\"Connection status:\", c.Status())\n\t}\n}\n\ntype Iface interface {\n  Boo() int\n}\n\nconst name1 int = 10\n\nfunc _(st interface {Foo()}, st1 Iface) {\n    <error descr=\"Cannot assign to constant\">name1</error>, <error descr=\"Cannot assign to constant\">name1</error> = 1, 2\n    for <error descr=\"Cannot assign to constant\">name1</error> = range <error descr=\"Cannot range over data (type interface {...})\">st</error> {\n        \n    }\n    for <error descr=\"Cannot assign to constant\">name1</error> = range <error descr=\"Cannot range over data (type interface {...})\">st</error> {\n        \n    }\n    Println(<error descr=\"st.Foo() used as value\">st.Foo()</error> + st1.Boo())\n}\n\n// No new variables on left side\nfunc _() {\n\tc := make(chan int)\n\t\n\tselect {\n\tcase <error descr=\"No new variables on left side of :=\">_</error> := <-c:\n\t\tprintln(\"Ololo\")\n\tdefault:\n\t}\n\tfor <error descr=\"No new variables on left side of :=\">_</error> := range \"asd\"  {\n\t}\n\tif <error descr=\"_ := 1 used as value\"><error descr=\"No new variables on left side of :=\">_</error> := 1</error> {\n\t\treturn\n\t}\n\t\n\tbuzz := 0\n\tprintln(buzz)\n\n\t<error descr=\"No new variables on left side of :=\">buzz</error> := <-c\n\tbuzz = <-c\n}\n\nfunc _() { goto Label1; Label1: 1; goto <error descr=\"Unresolved label 'Label2'\">Label2</error>}\n\ntype compositeA struct { int }\ntype compositeB struct { byte }\n\nfunc _ () {\n\ta0, b0 := composite1()\n\tPrintln(a0.int, b0.byte)\n\ta1, b1 := new(compositeA), new(compositeB)\n\tPrintln(a1.int, b1.byte)\n\ta2, b2 := composite2()\n\tPrintln(a2.int, b2.byte)\n}\n\nfunc composite1() (*compositeA, *compositeB) {\n\treturn new(compositeA), new(compositeB)\n}\nfunc composite2() (*compositeA, *compositeB) {\n\treturn new(compositeA), new(compositeB)\n}\n\nfunc _(o interface {test1() int}) {\n\tPrintln(o.test1())\n}\n\nfunc _() (int) {\n\t type connError struct { err int }\n\tch := make(chan connError)\n  select {\n\t\tcase ce  := <-ch:\n\t\treturn ce.err\n\t}\n}\n\ntype Item struct {\n\tKey string\n\tValue []byte\n}\n\nfunc _() {\n\tm := GetMulti()\n\tv := m[\"AA\"].Value\n\tPrintln(v)\n\tPrintln(GetMulti()[\"AA\"].Key)\n}\n\nfunc GetMulti() (map[string]*Item) {\n\tm := make(map[string]*Item)\n\tm[\"AA\"] = &Item{}\n\treturn m\n}\n\ntype WebService struct { rootPath string }\nfunc (w *WebService) Path(string) *WebService { return w }\nfunc (w *WebService) GET(string) *RouteBuilder { return new(RouteBuilder) }\ntype RouteBuilder struct { bool }\nfunc (w *WebService) Route(*RouteBuilder) *WebService { return w }\nfunc _() {\n\tws1 := new(WebService).Path(\"/\")\n\tws1.GET(\"\").bool\n\tws1.Route(ws1.GET(\"/{type}/{id}\"))\n}\n\ntype ServiceError struct {\n\tCode    int\n\tMessage string\n}\n\ntype ForSwitch struct {\n\tValue interface{}\n}\n\nfunc _(x ForSwitch) {\n\tswitch <error descr=\"Unused variable 'x'\">x</error> := x.Value.(type) {\n\t}\n}\n\nfunc _() {\n  err := nil\n  switch err.(type) {\n    case ServiceError:\n            ser := <error descr=\"Invalid type assertion: err.(ServiceError), (non-interface type int on left)\">err</error>.(ServiceError)\n            Println(ser.Code)\n            Println([]byte(ser.Message))\n    }\n}\n\nfunc _(err interface{}) {\n\tswitch err.(type) {\n\tcase ServiceError:\n\t\tser := err.(ServiceError)\n\t\tPrintln(ser.Code)\n\t\tPrintln([]byte(ser.Message))\n\t}\n}\n\ntype Request struct {\n    Request *http.Request\n}\n\nfunc _(r *Request)  {\n    r.Request.URL\n}\n\ntype ReadCloser interface {\n    io.Reader\n    io.Closer\n}\n\nfunc _(b ReadCloser)  {\n    b.<error descr=\"Unresolved reference 'Closer'\">Closer</error>()\n    b.Close()\n}\n\nfunc _() {\nvar tempregexs = []struct {\n    template, regex         string\n    literalCount, varCount int\n}{\n    {\"\", \"^(/.*)?$\", 0, 0},\n    {\"/a/{b}/c/\", \"^/a/([^/]+?)/c(/.*)?$\", 2, 1},\n    {\"/{a}/{b}/{c-d-e}/\", \"^/([^/]+?)/([^/]+?)/([^/]+?)(/.*)?$\", 0, 3},\n    {\"/{p}/abcde\", \"^/([^/]+?)/abcde(/.*)?$\", 5, 1},\n}\n    for <error descr=\"Unused variable 'i'\">i</error>, fixture := range tempregexs {\n          fixture.regex\n    }\n}\n\ntype Route struct {\n}\n\nfunc (r Route) matchesContentType() {\n}\n\nfunc _() {\n    rs := []Route{}\n    for _, each := range rs {\n        if each.matchesContentType() {\n        }\n    }\n    var rs2, <error descr=\"Unused variable 'i'\">i</error> = makeTuple()\n    for _, each := range rs2 {\n        if each.matchesContentType() {\n        }\n    }\n}\n\nfunc makeTuple() ([]Route, int) {\n  return []Route{}, 1\n}\n\ntype Greeting struct {\n    Author  string\n    Content string\n}\n\nfunc _() {\n    greetings := make([]Greeting, 0, 10)\n    for i, value := range greetings {\n        if (value.Content == \"\") {\n            greetings[i].Content = \"<Empty>\"\n        }\n    }\n}\n\ntype R struct {\n    Body int \n}\n\nfunc _() {\n    response := make(chan *R, 1)\n    r := <- response\n    Println(r.Body)\n    Println(response.<error descr=\"Unresolved reference 'Body'\">Body</error>)\n}\n\nfunc _(<warning descr=\"Unused parameter 'a'\">a</warning> int, <error descr=\"Duplicate argument 'a'\">a</error> int, <warning descr=\"Unused parameter 'c'\">c</warning>, <warning descr=\"Unused parameter 'd'\">d</warning>, <error descr=\"Duplicate argument 'c'\">c</error> int) (<error descr=\"Duplicate argument 'a'\">a</error>, <error descr=\"Duplicate argument 'd'\">d</error>, <warning descr=\"Unused named return parameter 'x'\">x</warning> int) {\n  return 1,1,1\n}\n\nfunc _(int,  <error descr=\"Can only use '...' as final argument in list\">...</error> int, string) (_,_,_ int) {\n    return 1,1,1\n}\n\nfunc _(_ int, _, _<error descr=\"Can only use '...' as final argument in list\">...</error> int) (_,_,_ <error descr=\"Cannot use '...' in output argument list\">...</error>int) {\n    return 1,1,1\n}\n\ntype RGBA struct {\n    R, G, B, A uint8\n}\n\ntype (\n    Color RGBA\n)\n\nfunc _(col Color) string {\n    Println(col.B)  \n    \n    var testdata *struct {\n        a *[7]int\n    }\n    Println(testdata.a)\n<error descr=\"Missing return at end of function\">}</error>\n\nfunc _(col Color) () {\n    Println(col.B)  \n    \n    var testdata *struct {\n        a *[7]int\n    }\n    Println(testdata.a)\n}\n\ntype Name struct {\n}\n\ntype B Name\n\nfunc (self *Name) Foo(int) {\n}\n\nfunc _(b B, c Color) {\n\tb.<error descr=\"Unresolved reference 'Foo'\">Foo</error>(1)\n\tc.A\n}\n\nvar <warning descr=\"Unused variable 'Name11'\">Name11</warning> string  = \"\"\nvar <warning descr=\"Unused variable 'nmame11'\">nmame11</warning> string  = \"\"\n\nfunc _() int {\n      y, z := 1,3\n      if y == z {}  // Just to avoid unused variable error\n      {\n              y, z := 1, 2 // Should not be an error for vars y and z shadow y and z from the outer scope\n              if y == z {}  // Just to avoid unused variable error\n      }\n      return 1\n}\n\nfunc init() {\n    \n}\n\nfunc _() int {\n    {\n        return 1\n    }\n}\n\nfunc _(<warning descr=\"Unused parameter 'bar'\">bar</warning> func(baz    int)) {\n      <error descr=\"Unresolved reference 'baz'\">baz</error>\n}\n\ntype Ormer interface {\n\tInsert(interface{})\n}\n\nfunc _(o Ormer) {\n\t(*o).Insert(1)\n}\n\ntype Conn interface {\n\tDo(commandName string, args ...interface{}) (reply interface{}, err error)\n}\n\nfunc String(interface{}, error) {\n}\n \nfunc _(c Conn) {\n\tString(c.Do(\"GET\", \"somekey\"))\n}\n\ntype MyType string\n\nfunc (t MyType) Get(string) string { return \"hello\" }\n\nfunc _() {\n\tst := MyType(\"tag\")\n\tst.Get(\"key\") // <- unresolved Get\n}\n\ntype TestStruct struct {\n\tSomeId int\n}\n\ntype DataSlice []*TestStruct\n\nfunc NewDataSlice() *DataSlice {\n\treturn &DataSlice{}\n}\n\nfunc _() {\n\tdata := NewDataSlice()\n\tfor _, element := range <error descr=\"Cannot range over data (type *DataSlice)\">data</error> {\n\t\tif  element.SomeId > 20 {\n\t\t\tprintln(\"some text\")\n\t\t}\n\t}\n}\n\ntype Params struct { }\n\ntype Image interface { }\n\ntype ServerFunc func(params Params) (*Image, error)\n\nfunc (f ServerFunc) Get(params Params) (*Image, error) {\n\treturn f(params)\n}\n\ntype Server interface {\n\tGet(Params) (*Image, error)\n}\n\nfunc _() {\n\tserver := ServerFunc(func(Params) (*Image, error) {\n\t\treturn nil, nil\n\t})\n\tserver.Get(Params{})\n}\n\nfunc _() {\n\ttype (\n\t\tclient struct {\n\t\t\tmessage chan string\n\t\t}\n\t\tclientList struct {\n\t\t\tm (((map[string]*client)))\n\t\t}\n\t)\n\tcl := clientList{m: make(map[string]*client)}\n\tmessage := \"\"\n\tfor _, c := range cl.m {\n\t\tc.message <- message\n\t}\n}\n\nfunc _() {\n\taddr := \"test\"\n\tx := struct {\n\t\taddr string\n\t}{addr: addr}\n\tPrintln(x)\n}\n\nfunc _() {\n\ttests:=[]struct{ want int}{}\n\tprintln(tests)\n\twant := \"\"\n\tPrintln(want)\n}\n\ntype SensorFactory struct {\n\tSensors map[string]string\n}\n\nfunc _() *SensorFactory {\n\tfactory := new (SensorFactory)\n\tfactory.Sensors = make(map[string]string)\n\treturn factory\n}\n\ntype Conn1 interface {\n\tClose() error\n}\n\nfunc _() {\n\tclientList := make(map[int]struct{\n\t\tmessage chan string\n\t\tconn *Conn1\n\t})\n\tmessage := \"\"\n\tfor _, c := range clientList {\n\t\tselect {\n\t\tcase c.message <- message:\n\t\tdefault:\n\t\t\t(*c.conn).Close()\n\t\t}\n\t}\n}\n\ntype inner_t struct{}\nfunc (aa inner_t) foo() { }\n\nfunc _() {\n\tc := 10\n\tvar fun = func(c inner_t) {\n\t\tc.foo();\n\t}\n\tfun(inner_t{})\n\tprint(c)\n}\n\ntype B1 struct {a string}\ntype B2 B1\n\nfunc (b B2) method() B2 {\n\treturn B2{}\n}\n\nfunc _() {\n\tb := B2{a:\"\"}\n \tb.method()\n}\n\nfunc z(int) {}\n\nfunc _() {\n    var f float64\n    f = 12.345\n    var i int\n    i = int(f)\n    z(i)\n    i = <error descr=\"Missing argument to conversion to int: int().\">int()</error>\n    z(i)\n    i = <error descr=\"Too many arguments to conversion to int: int(3, 4).\">int(3, 4)</error>\n}\ntype myIFace string\n\nfunc (myIFace) Boo() int {\n    return 444\n}\n\ntype someInterface interface {\n    Foo() string\n}\n\ntype someStringType string\n\ntype anotherStringType someStringType\n\nfunc (someStringType) Foo() string {\n    return \"what\"\n}\n\nfunc (anotherStringType) Foo() string {\n    return \"what\"\n}\n\nfunc _() {\n    var x someInterface\n    x = someStringType(\"something\")\n    if z, ok := x.(someStringType); ok {\n        if len(string(z)) > 0 {}\n    }\n\n    x = <error descr=\"Type anotherStringType is not an expression\">anotherStringType</error>\n    if z, ok := x.(someStringType); ok {\n        if len(string(z)) > 0 {}\n    }\n}\n\ntype interf1 interface{}\ntype interf2 interf1\ntype interf3 interf2\n\nfunc _() {\n    var x string\n    if _, ok := <error descr=\"Invalid type assertion: x.(string), (non-interface type string on left)\">x</error>.(string); ok {\n    }\n    var y interf3\n    if _, ok := y.(string); ok {\n    }\n}\nfunc _() {\n    var x map[string]string\n    x = map[string]string{<error descr=\"Missing key in map literal\">\"a\"</error>, <error descr=\"Missing key in map literal\">\"b\"</error>}\n    if len(x) > 2 {}\n}\n\ntype someInterface interface{}\n\nfunc _() {\n    var x Boom\n    var y someInterface\n    y = x\n    if _, ok := y.(Boom); ok {\n\n    }\n    switch z := y.(type) {\n    case Boom:\n        z.Run(aaa{})\n    case *Boom:\n        z.Run(aaa{})\n    }\n}\n\ntype baseType interface {\n\tMethod() string\n}\n\ntype middleType struct {\n\tbaseType\n}\n\nfunc (c *middleType) /*def*/Method() string {\n\treturn \"Hi!\"\n}\n\ntype leafType struct {\n\tmiddleType\n}\n\nfunc _() {\n\tvar leaf = leafType{}\n\tprintln(leaf./*ref*/Method())\n\n\tvar middle = middleType{}\n\tprintln(middle./*ref*/Method())\n}\n\n// The only acceptable declarations of init at the top level: as a function with no params\n// or as a method.\nvar <error descr=\"Cannot declare init, must be a function\"><warning descr=\"Unused variable 'init'\">init</warning> = 4</error>\n\ntype (\n    someNotInitType string\n    <error descr=\"Cannot declare init, must be a function\">init int</error>\n)\n\nconst (\n    <warning descr=\"Unused constant 'someConst'\">someConst</warning> = 1\n    <error descr=\"Cannot declare init, must be a function\"><warning descr=\"Unused constant 'init'\">init</warning> = 4</error>\n)\n\ntype someInitType struct{}\n\nfunc (someInitType) init() {}\n\nfunc <error descr=\"Duplicate function name\">init</error><error descr=\"init function must have no arguments and no return values\">(int)</error> {}\n\nfunc init() <error descr=\"init function must have no arguments and no return values\">int</error> {\n    return 4\n}\ntype GroupSlice []Group\n\ntype Group int\n\nfunc (gs *GroupSlice) Merge(groups ...*Group) error {\n    for _, g := range groups {\n        if err := (*gs).merge(g); err != nil {\n            return err\n        }\n    }\n    return nil\n}\n\nfunc (gs *GroupSlice) merge(*Group) error {\n    return nil\n}\n\ntype TestType struct{}\n\nfunc (t TestType) func1() {\n}\n\nfunc test90() (\nTestType,\nerror,\n) {\n\treturn TestType{}, nil\n}\n\nfunc _() {\n\tt, _ := test90()\n\tt.func1()\n}\n\nfunc _(key1, key2 int) (string, error) {\n\ttype MyStruct struct {\n\t\tName  string\n\t\tLabel string\n\t}\n\n\tvar cache map[int]((map[int]MyStruct)) = make((map[int]((map[int]MyStruct))))\n\ttmp1, _ := cache[key1]\n\ttmp2, _ := tmp1[key2]\n\treturn tmp2.Name, nil\n}\n\n// do not resolve inside type\nfunc _() {\n        var _ func(variableInFunctionType float64)\n\tprintln(<error descr=\"Unresolved reference 'variableInFunctionType'\">variableInFunctionType</error>)\n}\n\nfunc _() {\n\t_ = 'a';<error descr=\"Missing '\">'a</error><error descr=\"Unresolved reference 'aa'\"><error descr=\"',', ';', <-, <NL>, <assign op> or '}' expected, got 'aa'\">a</error>a</error><error descr=\"Missing '\"><error descr=\"',', ';', <-, <NL>, <assign op> or '}' expected, got ''''\">'</error>'</error>\n\t_ = <error descr=\"Empty character literal or unescaped ' in character literal\">'''</error>\n\t_ = <error descr=\"Missing '\">'\n</error>\t;_ = <error descr=\"Missing '\">' </error><error descr=\"',', ';', <NL> or '}' expected, got 'a'\"> </error><error descr=\"Unresolved reference 'a'\">a</error>\n\t_ = 'a'\n\t_ = <error descr=\"Missing '\">'a</error><error descr=\"',', ';', <NL> or '}' expected, got ''\n'\"> </error><error descr=\"Missing '\">'\n</error>}\n\nfunc _() {\n\t_ = \"a\"<error descr=\"',', ';', <NL> or '}' expected, got '\\\"aaa'\"> </error><error descr=\"New line in string\">\"aaa</error>\n\t_ = \"\"\n\t_ = <error descr=\"New line in string\">\"</error>\n\t_ = <error descr=\"New line in string\">\"  a</error>\n}\n\ntype foo23213 struct {\n    bar string\n}\n\nvar (\n    _ = [](*foo23213){\n        {\n            bar: \"whatever\",\n        }, {\n\n        },\n    }\n)\n\nfunc (c <error>bufio</error>.Reader) aa(d <error>bufio</error>.MaxScanTokenSize){}"
  },
  {
    "path": "testData/highlighting/sliceWithThirdIndex.go",
    "content": "package main\nvar (\n  a = [10]int{}\n  _ = a[1: 2: 3]\n)\nfunc main(){\n\n}"
  },
  {
    "path": "testData/highlighting/slices.go",
    "content": "package main\n\nimport \"fmt\"\n\ntype Foo struct {\n    F int\n}\n\nfunc bar() int {\n    slice0 := make([]Foo, 10)\n    slice1 := slice0[1:1:1]\n    slice1[0].F = 1\n    return slice1[0].F\n}\n\nfunc main() {\n    fmt.Println(bar())\n    main2()\n}\n\ntype Foo2 struct {\n    Test int\n}\n\nfunc main2() {\n    var a *[]Foo2\n    (*a)[0].Test // todo: should be an error\n    var b *[]Foo2\n    b[0].Test // todo: should be an error\n\n    test(a)\n}\n\nfunc test(a *[]Foo2) {\n    fmt.Println((*a)[0].Test)\n\n    for _, c := range *a {\n        fmt.Println(c.Test)\n    }\n}\n\ntype Param struct {\n    Id string\n}\n\ntype Params []Param\n\nfunc <warning>hola</warning>(params Params) {\n    params[0].Id\n}\n\ntype Params []Param\n\nfunc <warning>hola2</warning>(params []Param) {\n    params[0].Id  // the inspector find the Id field\n}\n\ntype File struct {\n    Contents string\n}\n\nfunc <warning>sourceReader</warning>(files <-chan *File) {\n    for file := range files {\n        file.Contents\n    }\n}\n\ntype FooSl struct {\n\ta int\n}\n\ntype Baz [5]FooSl\ntype ZOO Baz\n\nfunc _(){\n\tb := &ZOO{}\n\tb[0].a = 1\n}\n\ntype typ1 struct {\n}\n\ntype typ2 struct {\n\tt1 typ1\n}\n\nfunc (t typ1) F() {\n\tprint(\"t1.F()\")\n}\n\nfunc _() {\n\tt2 := typ2{t1:typ1{}}\n\tt1 := &t2.t1\n\tt1.F()\n}"
  },
  {
    "path": "testData/highlighting/specTypes.go",
    "content": "package main\n\ntype MyType struct {\n\tErr   string\n}\n\ntype t MyType\ntype d t\n\nfunc (a t) foo(){}\nfunc (a d) too(){}\n\nfunc main()  {\n\te := MyType{\n\t\tErr: \"hello\",\n\t}\n\tout := d(e)\n\tprintln(out.Err)\n}\n\ntype a int\nfunc (a) foo() int { return 1 }\ntype b int\nfunc (b) bar() int { return 2 }\n\ntype c struct {\n\ta\n\tb\n}\n\nfunc _() {\n\tc := new(c)\n\tprintln(c.foo())\n\tprintln(c.bar())\n}"
  },
  {
    "path": "testData/highlighting/stop.go",
    "content": "package main\n\ntype T interface {\n    Method1() T\n    Method2()\n}\n\ntype T2 int\n\nfunc (t T2) F1() {\n}\n\nfunc (t T2) F2() T2 {\n    return nil\n}\n\nfunc main() {\n    var x T\n    <error descr=\"x.Method1().Method2() used as value\">x.Method1().Method2()</error>.<error descr=\"Unresolved reference 'Method2'\">Method2</error>()\n    var x1 T2\n    <error descr=\"x1.F2().F1() used as value\">x1.F2().F1()</error>.<error descr=\"Unresolved reference 'F1'\">F1</error>()\n}\n\n"
  },
  {
    "path": "testData/highlighting/stringInStructSliceWithThirdIndex.go",
    "content": "package main\ntype t struct { s string }\nvar (\n  p = t {\"asd\"}\n  _ = p.s[1:2<error descr=\"Invalid operation p.s[1:2:3] (3-index slice of string)\">:3</error>]\n)\nfunc main(){\n\n}"
  },
  {
    "path": "testData/highlighting/stringIndexIsByte.go",
    "content": "package main\n\nimport \"fmt\"\n\nfunc main() {\n\tx := \"text\"\n\tif <error descr=\"Mismatched types: byte and string\">x[0] == \"t\"</error> && x[1] == 't' {\n\t\tfmt.Println(x[0])\n\t}\n\n\tvalid := x[1] == 't'\n\tvalid = x[0:2] == \"te\"\n\tvalid = x[:2] == \"te\"\n\tvalid = x[2:] == \"xt\"\n\tvalid = x[:] == \"xt\"\n\n\tfmt.Println(valid)\n\n\tinvalid := <error descr=\"Mismatched types: byte and string\">x[2] == \"xt\"</error>\n\tinvalid = <error descr=\"Mismatched types: byte and string\">\"t\" == x[0]</error>\n\tinvalid = <error descr=\"Mismatched types: byte and string\">x[3] == \"x\"</error>\n\tinvalid = <error descr=\"Mismatched types: byte and string\">x[3] != \"x\"</error>\n\tinvalid = <error descr=\"Mismatched types: byte and string\">x[3] >= \"x\"</error>\n\tinvalid = <error descr=\"Mismatched types: byte and string\">x[3] <= \"x\"</error>\n\tinvalid = <error descr=\"Mismatched types: byte and string\">x[3] > \"x\"</error>\n\tinvalid = <error descr=\"Mismatched types: byte and string\">x[3] < \"x\"</error>\n\n\tfmt.Println(invalid)\n\n}"
  },
  {
    "path": "testData/highlighting/stringSliceWithThirdIndex.go",
    "content": "package main\n\nvar _ = \"asdasd\"[1:2<error descr=\"Invalid operation \\\"asdasd\\\"[1:2:3] (3-index slice of string)\">:3</error>]\n\nfunc main(){\n\n}"
  },
  {
    "path": "testData/highlighting/struct.go",
    "content": "package main\n\nimport . \"fmt\"\nimport \"net/url\"\n\ntype alias Formatter\n\ntype <warning descr=\"Type 'int' collides with builtin type\">int</warning> int\n\ntype Car struct { wheelCount int }\nfunc (car Car) numberOfWheels() int { return car.wheelCount }\n\ntype Ferrari struct { Car }\n\nfunc <warning>Println</warning>(...interface{})  { // should be redeclared!\n//   fmt.Println(o...)\n}\n\nfunc (f Ferrari) sayHiToSchumacher() { Println(\"Hi Schumacher!\") }\n\ntype AstonMartin struct { Car }\n\nfunc (a AstonMartin) sayHiToBond() { Println(\"Hi Bond, James Bond!\") }\n\ntype E struct {\n    *E\n}\n\nfunc (e E) foo() {\n}\n\ntype Type int\n\nfunc <warning descr=\"Function 'new' collides with builtin function\">new</warning>(Type) *Type\n\ntype T int\nfunc (t T) name()  {\n}\n\nfunc foo() *T {\n    return new(T)\n}\n\nfunc doubleFoo() (*T, *T) {\n    return foo(), foo()\n}\n\nfunc (t T) createT() *T {\n    return new(T)\n}\n\nfunc main() {\n    e := E{}\n    e.foo()\n    f := Ferrari{Car{4}}\n    Println(\"A Ferrari has this many wheels:\", f.numberOfWheels())\n    f.sayHiToSchumacher()\n\n    c := Car{4}\n    Println(\"A Car has this many wheels:\", c.wheelCount)\n    Println(\"A Car has this many wheels:\", c.numberOfWheels())\n\n    a := AstonMartin{Car{4}}\n    Println(\"An Aston Martin has this many wheels:\", a.numberOfWheels())\n    a.sayHiToBond()\n\n    t := foo()\n    t.name()\n    t2 := t.createT()\n    Println(t2)\n    t3 := <error>doubleFoo()</error>\n    Println(t3)\n}\n\ntype inte struct {\n    aa int\n    <error>aa</error>, bbb int\n    byte1 struct {\n        aaa\n        <error>aaa</error>\n    }\n}\n\ntype aaa interface {\n    String() int\n}\n\ntype inte2 struct {\n    byte1 struct {\n        int\n        <error>int</error>\n    }\n    <error>byte1</error> struct {\n        int\n        <error>int</error>\n    }\n}\n\ntype aaa interface {\n    Str()\n    <error>Str</error>() interface {\n          A()\n          b()\n          <error>A</error>()\n    }\n}\n\ntype A struct {\n    b int\n    c int\n}\n\nfunc <warning>NewA</warning>(b int) *A {\n    return &A{\n        b: b, // Reported error: \"unknown field b\", but that is not correct\n        c: 1,\n    }\n}\n\nfunc _() {\n\ttr := &url.Userinfo{\n\t\t<error descr=\"Unknown field 'username' in struct literal\">username</error>:\"Name\",\n\t}\n\t_ = tr\n}\n\n\ntype Mtx struct {\n\tstate int32\n\tsema  uint32\n}\n\nfunc (m *Mtx) Lock() {\n\n}\n\nfunc (m *Mtx) Unlock() {\n\n}\n\ntype Locker interface {\n\tLock()\n\tUnlock()\n}\n\ntype TMtx struct {\n\tM struct {\n\t\t  Mtx\n\t  }\n}\n\nfunc _() {\n\tt := TMtx{}\n\tt.M.Lock()\n\tt.M.Unlock()\n}"
  },
  {
    "path": "testData/highlighting/structTags.go",
    "content": "package demo\n\ntype demoBrokenTags struct {\n\tCorrectMultipleTags string `json:\"demo,something,something\" dark:\"side\"`\n\tCorrectSingleTag    string `json:\"demo,something,something\"`\n\tWrongTag1           string <warning>`json: \"demo\"`</warning>\n\tWrongTag2           string <warning>`json:\"demo`</warning>\n\tWrongTag3           string <warning>`json:demo`</warning>\n\tWrongTag4           string <warning>` json:demo`</warning>\n\tWrongTag5           string <warning>\"json:demo\"</warning>\n\tWrongTag6           string <warning>\"json:'demo'\"</warning>\n\tWrongTag7           string <warning>`json:\"demo\"; bson:\"demo\"`</warning>\n\tWrongTag8           string `\n}\n<EOLError></EOLError>"
  },
  {
    "path": "testData/highlighting/stubParams.go",
    "content": "package main\n\nimport (\n    \"os\"\n)\n\nfunc <warning>writeValues</warning>(outfile string) string {\n   file, _ := os.Create(outfile)\n   return file.Name()\n}\n\n"
  },
  {
    "path": "testData/highlighting/templates.go",
    "content": "package main\n\nimport \"text/template\"\n\nfunc main() {\n    template.Must(template.ParseGlob(\"templates/*\"))\n}\n"
  },
  {
    "path": "testData/highlighting/typeConversion.go",
    "content": "package main\n\ntype (\n       int64Val int64\n       boolVal  bool\n       Value    interface {\n               Demo()\n       }\n)\n\nfunc (int64Val) Demo() {}\nfunc (boolVal) Demo() {}\n\nfunc _(x, y Value) {\n       switch x := x.(type) {\n       case boolVal:\n               y := y.(boolVal)\n               _, _ = x, y\n       case int64Val:\n               b := int64(y.(int64Val))\n               _ = b\n       }\n\n}\n\nfunc main() {}"
  },
  {
    "path": "testData/highlighting/typeLiterals.go",
    "content": "package main;\nimport \"fmt\"\ntype WaitGroup struct {\n    counter int32; waiters int32; sema *uint32\n}\nfunc main() { fmt.Println(WaitGroup{sema:nil}) }\nfunc <warning>main3</warning>() { fmt.Println(WaitGroup{<error>s1ema</error>:nil}) }\nfunc <warning>main2</warning>() { fmt.Println(<error>WaitGrou1p</error>{<error>sema</error>:nil}) }\n\nfunc _() {\n\ttype policyTableEntry struct {\n\t\tPrefix     string\n\t\tPrecedence uint8\n\t\tLabel      uint8\n\t}\n\n\ttype policyTable []policyTableEntry\n\n\tvar _ = policyTable{\n\t\t{\n\t\t\tPrefix:     \"test\",\n\t\t\tPrecedence: 50,\n\t\t\tLabel:      0,\n\t\t},\n\t\t{\n\t\t\tPrefix:     \"test2\",\n\t\t\tPrecedence: 40,\n\t\t\tLabel:      1,\n\t\t},\n\t}\n}\n\ntype Response struct { ResponseWriter }\ntype ResponseWriter interface { Header() Header }\ntype Header int\n\nfunc (h Header) Add(_, _ string) { }\n\nfunc (r Response) AddHeader(header string, value string) Response {\n\trr := r.Header()\n\trr.Add(\"\", \"\")\n\tr.Header().Add(header, value)\n\treturn r\n}\n\ntype Foo struct {\n\tA int\n}\n\ntype Zoo Foo\ntype Bar Zoo\n\nfunc _() {\n\tfmt.Println(Test())\n}\n\nfunc Test() Bar {\n\tfmt.Println(Foo{A:1})\n\tfmt.Println(Zoo{A:1})\n\treturn Bar{A: 1}\n}\n\ntype setAuthRequest auth\ntype auth struct {\n\tType   int32\n\tScheme string\n\tAuth   []byte\n}\n\nfunc _(scheme string, auth []byte) *setAuthRequest {\n\treturn &setAuthRequest{Type: 0, Scheme: scheme, Auth: auth}\n}"
  },
  {
    "path": "testData/highlighting/unaryMinus.go",
    "content": "package main\n\ntype bar int\n\ntype foo struct {\n\ta bar\n}\n\nfunc (b bar) printValue() {\n\tprintln(b)\n}\n\nfunc main() {\n\tt := foo {\n\t\ta:4,\n\t}\n\tt.a.printValue()\n\t(-t.a).printValue()\n}\n"
  },
  {
    "path": "testData/highlighting/unaryPointer.go",
    "content": "package main\n\ntype Rat struct {\n\ta, b int\n}\n\n\ntype Ad struct {\n\tPrice Rat\n}\n\nfunc (x *Rat) Cmp(*Rat) int {\n\treturn 1\n}\n\nfunc main() {\n\trat := &Rat{1, 1}\n\ti1 := Ad{}.Price\n\ti :=  &i1\n\ti.Cmp(rat)\n}\n"
  },
  {
    "path": "testData/highlighting/underscoreUsedAsValue.go",
    "content": "package main\n\nvar demov = <error descr=\"Cannot use '_' as value\">_</error>\nvar (\n\tdemov1, demov2 = <error descr=\"Cannot use '_' as value\">_</error>, <error descr=\"Cannot use '_' as value\">_</error>\n)\nconst democ = <error descr=\"Cannot use '_' as value\">_</error>\nconst (\n\tdemoc1, democ2 = <error descr=\"Cannot use '_' as value\">_</error>, <error descr=\"Cannot use '_' as value\">_</error>\n)\n\nfunc main() {\n\tprintln(<error descr=\"Cannot use '_' as value\">_</error>, \"hello1\")\n\ta, b:= 1, <error descr=\"Cannot use '_' as value\">_</error>\n\t_, _, _, _ = a, b, demov, democ\n\t_, _, _, _ = demov1, demov2, democ1, democ2\n\tc := 1 + <error descr=\"Cannot use '_' as value\">_</error> + (<error descr=\"Cannot use '_' as value\">_</error>)\n\tprintln(<error descr=\"Cannot use '_' as value\">_</error> + (<error descr=\"Cannot use '_' as value\">_</error>))\n\tprintln(c)\n\n\tselect {\n\tcase <error descr=\"Cannot use '_' as value\">_</error> <- 0: break;\n\tcase <error descr=\"Cannot use '_' as value\">_</error> <- 1: break;\n\tcase _ = <- 1: break;\n\t}\n\n\tfor _, _ = range <error descr=\"Cannot use '_' as value\">_</error>  {\n\t}\n}\n"
  },
  {
    "path": "testData/highlighting/unusedParameter.go",
    "content": "package main\n\ntype (\n\tde interface {\n\t\tDemo(x, y int)\n\t}\n\n\tdemoo func(p int) (size int)\n\n\tdem string\n)\n\nfunc (d dem) demo(hello string) (<warning descr=\"Unused named return parameter 'err'\">err</warning> int) {\n\tprintln(\"hello\")\n\treturn nil\n}\n\nfunc demo(hello string) {\n\tfunc(hello string) {\n\t\tprintln(hello)\n\t}(hello)\n}\n\nfunc demo2(<warning descr=\"Unused parameter 'hello'\">hello</warning> string) {\n\tfunc(hello string) {\n\t\tprintln(hello)\n\t}(\"hello\")\n}\n\nfunc demo3(hello string) {\n\tfunc() {\n\t\tprintln(hello)\n\t}()\n}\n\nfunc _(bar func(baz int) (foo int)) {\n\t_ = bar\n}\n\nfunc _(fn func() (i int, e error)) {\n\ti, e :=  fn()\n\tprint(i)\n\tprint(e.Error())\n}\n\nfunc main() {\n\tdemo(\"hello\")\n\tdemo2(\"hello\")\n\tdemo3(\"hello\")\n\ta := dem(\"hello\")\n\ta.demo(\"hello\")\n\n\t*(*func(width int) struct{})(nil)\n}\n"
  },
  {
    "path": "testData/highlighting/unusedParameter_test.go",
    "content": "package main\n\nimport \"testing\"\n\nfunc TestName(t *testing.T) {\n\t\n}\n\nfunc _(<warning descr=\"Unused parameter 't'\">t</warning> *testing.T) {\n\t\n}\n"
  },
  {
    "path": "testData/highlighting/varBlocks.go",
    "content": "package main\n\nimport \"fmt\"\n\nfunc main() {\n    fmt.Println(<warning descr=\"Final return type of 'test()' is a function not a function call\">test()</warning>)\n    fmt.Println(<warning descr=\"Final return type of 'test2()' is a function not a function call\">test2()</warning>)\n    test3()\n    test4()\n    test5()\n}\n\nfunc foo() int {\n    return 1\n}\n\nfunc test() func() int {\n    fff := foo\n    return func() int {\n        r := fff()\n        return r\n    }\n}\n\nfunc test2() func () int {\n    f := foo\n    return func() int {\n        r := 1\n        r = f()\n        return r\n    }\n}\n\nfunc test3() {\n\tif x := 10; x < 9 {\n\t\tfmt.Println(x)\n\t} else {\n\t\tfmt.Println(\"not x\")\n\t}\n\tfmt.Println(<error descr=\"Unresolved reference 'x'\">x</error>)\n}\n\n\nfunc test4() {\n\tx := 5\n\tif x := 10; x < 9 {\n\t\tfmt.Println(x, \"exists here\")\n\t} else {\t\t\n\t\tfmt.Println(\"and here!\", x)\n\t}\n\tfmt.Println(x)\n}\n\n\nfunc test5() {\n    <error descr=\"Unused variable 'xy'\">xy</error> := 5\n    if xy := 10; xy < 9 {\n        fmt.Println(xy, \"exists here\")\n    } else {\n        fmt.Println(\"and here!\", xy)\n    }\n}\n\nfunc _() {\n\tfs := *(*func(width int) struct{})(nil)\n\twidth := 1\n\t_, _ = fs, width\n}\n\nfunc _() {\n\t*(*func(width int) struct{})(nil)\n\twidth := 1\n\t_ = width\n}"
  },
  {
    "path": "testData/highlighting/varToImport.go",
    "content": "package main\n\nimport \"fmt\"\nimport \"time\"\n\nvar (\n\t<warning descr=\"Unused variable 'fmt'\"><warning descr=\"Variable 'fmt' collides with imported package name\">fmt</warning></warning>, _ = fmt.Print(1)  // fmt redeclared in this block\n                                                                    // previous declaration at *.go:3\n)\n\nfunc main() { }\n\nfunc _() {\n\t<warning descr=\"Variable 'time' collides with imported package name\">time</warning> := time.Now()\n\tfmt.Println(time.Hour())\n}\n"
  },
  {
    "path": "testData/highlighting/variadic.go",
    "content": "package main\n\nimport \"fmt\"\nimport \"go/ast\"\n\ntype Ref struct {\n\tExpr    *ast.Expr\n}\n\ntype Closer interface {\n    Close()\n}\n\ntype CloseImpl struct {}\n\nfunc (impl *CloseImpl) Close() {\n    fmt.Println(\"closed\")\n}\n\ntype File struct {\n    name string\n    Closer\n}\n\nfunc getFile() *File {\n    return &File{\"hello\", &CloseImpl{}}\n}\n\nfunc main() {\n    f1 := &File{\"hello\", &CloseImpl{}}\n    f1.Close()\n\n    f2 := getFile()\n    f2.Close() // Unresolved reference Close\n}\n\ntype User interface {\n    Name() string\n}\n\nfunc _(users ...User)  { users[0].Name() }\nfunc _(users ...*User) { users[0].<error>Name</error>() } \nfunc _(users User)     { users[0].<error>Name</error>() }\nfunc _(users ...User)  { users.<error>Name</error>() }\n\nfunc _(users *User)    { (*users).Name() }\nfunc _(users User)     { users.Name() }\n\nfunc (r *Ref) Pos() {\n\tl1 := *r.Expr\n\tl1.Pos()\n\n\tl2 := (*r.Expr)\n\tl2.Pos()\n\n\t*r.Expr.<error>Pos</error> ()\n\t(*r.Expr).Pos()\n}"
  },
  {
    "path": "testData/highlighting/vars.go",
    "content": "package main\n\nimport \"fmt\"\nimport \"net/http\"\nimport \"time\"\n\nfunc main() {\n\tb := 1\n\tb, a := 11, 1\n\tfmt.Println(b, a)\n\tc := simple(10)\n\tfmt.Println(c)\n\tFoo()\n\tFoo2()\n        fmt.Println(http.ErrMissingFile)\n}\n\nfunc simple(a int) int {\n\ta, b := 1, 2\n\treturn a + b\n}\n\nfunc Foo() {\n    <error descr=\"Unused variable 'err'\">err</error> := 1\n    err = 2\n}\n\nfunc Foo2() {\n    <error descr=\"Unused variable 'err'\">err</error> := 1\n    err,x := 2,1\n    fmt.Println(x)\n}\n\nfunc _(p interface{}) error {\n\tswitch <error descr=\"Unused variable 'p'\">p</error> := p.(type) {\n\t\tcase error:\n\t\treturn nil\n\t}\n\treturn nil\n}\n\ntype Image interface {\n\tAt(x, y int)\n}\n\ntype Image2 interface {\n}\n\n\nfunc _() {\n\tvar p Image\n\tswitch q := p.(type) {\n\tcase Image:\n\t\tfmt.Println(\"draw.Image\")\n\t\tswitch p.(type) {\n\t\tcase Image2:\n\t\t\tq.At(0,0)\n\t\t}\n\tcase Image2:\n\t\tq.<error descr=\"Unresolved reference 'At'\">At</error>(0,0)\n\tdefault:\n\t\tfmt.Println(\"default\")\n\t\tq.At(0, 0)\n\t}\n}\n\n\nvar (\n\tinterval1 = time.Second\n\tinterval2 = time.Second * 5\n)\n\nfunc TestIdeaTimeApi() {\n\tinterval1.Nanoseconds()\n\tfmt.Printf(\"%T %T\", interval1, interval2)\n\tfmt.Printf(\"%d %d\", interval1.Nanoseconds(), interval2.Nanoseconds())\n}\n\nfunc _() {\n\tfmt.Println(interval2)\n\tfmt.Println(time.Second * 5)\n\tf(time.Second)\n\tTestIdeaTimeApi()\n}\n\nfunc f(d time.Duration) {\n\tfmt.Println((d * time.Second).Nanoseconds())\n\tfmt.Println(d * time.Second * time.Second)\n}\n\nfunc _() {\n\t<warning descr=\"Variable 'time' collides with imported package name\">time</warning> := time.Now();\n\tfmt.Println(time) \n}\n"
  },
  {
    "path": "testData/highlighting/vendoringImportPaths.go",
    "content": "package a\n\nimport \"vendoringPackage\"\nimport \"<error descr=\"Cannot resolve file 'subVendoringPackage'\">subVendoringPackage</error>\"\n\nfunc _() {\n  vendoringPackage.Hello();\n  subVendoringPackage.<error descr=\"Unresolved reference 'Hello'\">Hello</error>();\n}"
  },
  {
    "path": "testData/highlighting/voidFunctionUsedAsValue.go",
    "content": "package main;\n\nfunc withParameter(int) { }\nfunc withEmptyResult() () { }\nfunc withReturnValue() int { return 1 }\n\nfunc main() {\n\tgo withParameter(2)\n\tdefer withParameter(2)\n\n\tprintln(<error descr=\"withParameter(3) used as value\">withParameter(3)</error>)\n\t<error descr=\"withParameter(1) used as value\">withParameter(1)</error> = 2\n\twithParameter(2)\n\n\tprintln(<error descr=\"withEmptyResult() used as value\">withEmptyResult()</error>)\n\t<error descr=\"withEmptyResult() used as value\">withEmptyResult()</error> = 2\n\twithEmptyResult()\n\n\n\tprintln(<error descr=\"func() {}() used as value\">func() {}()</error>)\n\t<error descr=\"func() {}() used as value\">func() {}()</error> = 2\n\tfunc() {}()\n\n\tprintln(withReturnValue())\n\twithReturnValue() = 2\n\twithReturnValue\n\n\tprintln(func() int { return 1 }())\n\tfunc() int { return 1 }() = 2\n\tfunc() int { return 1 }()\n}"
  },
  {
    "path": "testData/imports/optimize/doNotOptimizeSideEffectImports.go",
    "content": "package main\n\nimport _ \"fmt\"\n\nfunc main() {\n\n}"
  },
  {
    "path": "testData/imports/optimize/doNotOptimizeSideEffectImports_after.go",
    "content": "package main\n\nimport _ \"fmt\"\n\nfunc main() {\n\n}"
  },
  {
    "path": "testData/imports/optimize/duplicatedImportsWithDifferentString.go",
    "content": "package main\n\nimport \"asdf\"\nimport <error descr=\"Redundant alias\">fmt</error> \"fmt\"\nimport <error descr=\"Redeclared import\">fmt \"math\"</error>\nimport <error descr=\"Redeclared import\">\"fmt\"</error>\n\nfunc main() {\n  fmt.Printf(\"a2\",a2)\n}"
  },
  {
    "path": "testData/imports/optimize/duplicatedImportsWithDifferentString_after.go",
    "content": "package main\n\nimport \"fmt\"\nimport fmt \"math\"\n\nfunc main() {\n  fmt.Printf(\"a2\",a2)\n}"
  },
  {
    "path": "testData/imports/optimize/duplicatedImportsWithSameString.go",
    "content": "package main\n\nimport \"asdf\"\nimport <error descr=\"Redundant alias\">fmt</error> \"fmt\"\nimport <error descr=\"Redeclared import\"><error descr=\"Redundant alias\">fmt</error> \"fmt\"</error>\nimport <error descr=\"Redeclared import\">\"fmt\"</error>\n\nfunc main() {\n  fmt.Printf(\"a2\",a2)\n}"
  },
  {
    "path": "testData/imports/optimize/duplicatedImportsWithSameStringAndDifferentQuotes.go",
    "content": "package foo\n\nimport `fmt`\nimport <error descr=\"Redeclared import\">\"fmt\"</error>\n\nfunc main() {\n  fmt.Println(\"Hi\")\n}"
  },
  {
    "path": "testData/imports/optimize/duplicatedImportsWithSameStringAndDifferentQuotes_after.go",
    "content": "package foo\n\nimport `fmt`\n\nfunc main() {\n  fmt.Println(\"Hi\")\n}"
  },
  {
    "path": "testData/imports/optimize/duplicatedImportsWithSameString_after.go",
    "content": "package main\n\nimport \"fmt\"\n\nfunc main() {\n  fmt.Printf(\"a2\",a2)\n}"
  },
  {
    "path": "testData/imports/optimize/importDirectoryWithoutPackages.go",
    "content": "package main\n\nimport (\n  <error descr=\"Unused import\">\"emptyDirectory\"</error>\n  \"fmt\"\n)\n\nfunc main() {\n  fmt.Println(\"Halo\");\n}"
  },
  {
    "path": "testData/imports/optimize/importDirectoryWithoutPackages_after.go",
    "content": "package main\n\nimport (\n  \"fmt\"\n)\n\nfunc main() {\n  fmt.Println(\"Halo\");\n}"
  },
  {
    "path": "testData/imports/optimize/importPackageWithMainFiles.go",
    "content": "package main\n\nimport \"withmain\"\n\nfunc Bar(r *withmain.SomeType) {\n\n}\n"
  },
  {
    "path": "testData/imports/optimize/importPackageWithMainFiles_after.go",
    "content": "package main\n\nimport \"withmain\"\n\nfunc Bar(r *withmain.SomeType) {\n\n}\n"
  },
  {
    "path": "testData/imports/optimize/importWithMultiplePackages.go",
    "content": "<error descr=\"package expected, got 'import'\">import</error> pack\n\nfunc main() {\n  pack.Test()\n}"
  },
  {
    "path": "testData/imports/optimize/importWithMultiplePackages_after.go",
    "content": "import pack\n\nfunc main() {\n  pack.Test()\n}"
  },
  {
    "path": "testData/imports/optimize/importWithSameIdentifier.go",
    "content": "package main\n\nimport <error descr=\"Redundant alias\">fmt</error> \"fmt\"\nimport <error descr=\"Redeclared import\">fmt \"math\"</error>\nimport <error descr=\"Redundant alias\">bar</error> \"foo/bar\"\n\nfunc main() {\n  fmt.Printf(\"a2\",a2)\n  fmt.Println(bar.Hello)\n}"
  },
  {
    "path": "testData/imports/optimize/importWithSameIdentifier_after.go",
    "content": "package main\n\nimport \"fmt\"\nimport fmt \"math\"\nimport \"foo/bar\"\n\nfunc main() {\n  fmt.Printf(\"a2\",a2)\n  fmt.Println(bar.Hello)\n}"
  },
  {
    "path": "testData/imports/optimize/redundantImportQualifier.go",
    "content": "package main\n\nimport <error descr=\"Redundant alias\">fmt</error> \"fmt\"\n\nfunc _() {\n  fmt.Println(\"Hello\")\n}\n"
  },
  {
    "path": "testData/imports/optimize/redundantImportQualifier_after.go",
    "content": "package main\n\nimport \"fmt\"\n\nfunc _() {\n  fmt.Println(\"Hello\")\n}\n"
  },
  {
    "path": "testData/imports/optimize/unusedDuplicatedImports.go",
    "content": "package main\n\nimport \"asdf\"\nimport <error descr=\"Redeclared import\">\"asdf\"</error>\nimport <error descr=\"Redeclared import\"><error descr=\"Redundant alias\">asdf</error> \"asdf\"</error>\n\nfunc main() {\n  fmt.Printf(\"a2\",a2)\n}"
  },
  {
    "path": "testData/imports/optimize/unusedDuplicatedImports_after.go",
    "content": "package main\n\nfunc main() {\n  fmt.Printf(\"a2\",a2)\n}"
  },
  {
    "path": "testData/imports/optimize/unusedImplicitImports.go",
    "content": "package main\n\nimport . \"fmt\"\nimport <error descr=\"Unused import\">. \"math\"</error>\n\nfunc main() {\n    Printf(\"asd\")\n}"
  },
  {
    "path": "testData/imports/optimize/unusedImplicitImports_after.go",
    "content": "package main\n\nimport . \"fmt\"\n\nfunc main() {\n    Printf(\"asd\")\n}"
  },
  {
    "path": "testData/imports/optimize/unusedImports.go",
    "content": "package main\n\nimport \"asdf\"\nimport \"encoding/json\"\nimport (\n  <error descr=\"Unused import\">\"math\"</error>\n  <error descr=\"Redeclared import\"><error descr=\"Unused import\">\"math\"</error></error>\n)\nimport \"fmt\"\n\nfunc main() {\n  fmt.Printf(\"a2\",a2)\n}\n\ntype testStruct struct  {\n\tv string\n}\n\nfunc test(json testStruct) {\n\treturn json.v\n}"
  },
  {
    "path": "testData/imports/optimize/unusedImportsQuickFix.go",
    "content": "package main\n\nimport \"asdf\"\nimport \"encoding/json\"\nimport (\n  <error descr=\"Unused import\">\"m<caret>ath\"</error>\n  <error descr=\"Redeclared import\"><error descr=\"Unused import\">\"math\"</error></error>\n)\nimport \"fmt\"\n\nfunc main() {\n  fmt.Printf(\"a2\",a2)\n}\n\ntype testStruct struct  {\n\tv string\n}\n\nfunc test(json testStruct) {\n\treturn json.v\n}"
  },
  {
    "path": "testData/imports/optimize/unusedImportsQuickFix_after.go",
    "content": "package main\n\nimport \"fmt\"\n\nfunc main() {\n  fmt.Printf(\"a2\",a2)\n}\n\ntype testStruct struct  {\n\tv string\n}\n\nfunc test(json testStruct) {\n\treturn json.v\n}"
  },
  {
    "path": "testData/imports/optimize/unusedImportsWithBacktick.go",
    "content": "package main\n\nimport `asdf`\nimport (\n  <error descr=\"Unused import\">`math`</error>\n  <error descr=\"Redeclared import\"><error descr=\"Unused import\">`math`</error></error>\n)\nimport `fmt`\n\nfunc main() {\n  fmt.Printf(\"a2\",a2)\n}"
  },
  {
    "path": "testData/imports/optimize/unusedImportsWithBacktick_after.go",
    "content": "package main\n\nimport `fmt`\n\nfunc main() {\n  fmt.Printf(\"a2\",a2)\n}"
  },
  {
    "path": "testData/imports/optimize/unusedImportsWithSemicolon.go",
    "content": "package main\n\nimport \"asdf\";\nimport (\n  <error descr=\"Unused import\">\"math\"</error>\n  <error descr=\"Redeclared import\"><error descr=\"Unused import\">\"math\"</error></error>\n);\nimport \"fmt\";\n\nfunc main() {\n  fmt.Printf(\"a2\",a2)\n}"
  },
  {
    "path": "testData/imports/optimize/unusedImportsWithSemicolon_after.go",
    "content": "package main\n\nimport \"fmt\";\n\nfunc main() {\n  fmt.Printf(\"a2\",a2)\n}"
  },
  {
    "path": "testData/imports/optimize/unusedImports_after.go",
    "content": "package main\n\nimport \"fmt\"\n\nfunc main() {\n  fmt.Printf(\"a2\",a2)\n}\n\ntype testStruct struct  {\n\tv string\n}\n\nfunc test(json testStruct) {\n\treturn json.v\n}"
  },
  {
    "path": "testData/imports/optimize/usedDuplicatedImports.go",
    "content": "package main\n\nimport \"asdf\"\nimport \"fmt\"\nimport <error descr=\"Redeclared import\"><error descr=\"Redundant alias\">fmt</error> \"fmt\"</error>\nimport <error descr=\"Redeclared import\">\"fmt\"</error>\n\nfunc main() {\n  fmt.Printf(\"a2\",a2)\n}"
  },
  {
    "path": "testData/imports/optimize/usedDuplicatedImports_after.go",
    "content": "package main\n\nimport \"fmt\"\n\nfunc main() {\n  fmt.Printf(\"a2\",a2)\n}"
  },
  {
    "path": "testData/imports/optimize/usedImplicitImports.go",
    "content": "package main\n\nimport . \"fmt\"\nimport . \"math\"\n\nfunc main() {\n  Printf(\"a2\", Abs(1))\n}"
  },
  {
    "path": "testData/imports/optimize/usedImplicitImports_after.go",
    "content": "package main\n\nimport . \"fmt\"\nimport . \"math\"\n\nfunc main() {\n  Printf(\"a2\", Abs(1))\n}"
  },
  {
    "path": "testData/inspections/anon-field/simple-after.go",
    "content": "package main;\n\ntype TypeName ***int\n\nvar a struct {\n  TypeName\n}"
  },
  {
    "path": "testData/inspections/anon-field/simple.go",
    "content": "package main;\n\nvar a struct {\n  <error descr=\"Invalid type ***int: must be typeName or *typeName\">***int<caret></error>\n}"
  },
  {
    "path": "testData/inspections/go-defer-function-call/conversions.go",
    "content": "package main\n\ntype int struct {}\n\nfunc _() {\n\tdefer <error descr=\"defer requires function call, not conversion\">int(0)</error>\n\tdefer <error descr=\"Expression in defer must be function call\">(func() int)(x)</error>\n}"
  },
  {
    "path": "testData/inspections/go-defer-function-call/deferRecover-after.go",
    "content": "package main\n\nfunc main() {\n\tdefer func() {\n\t\tif r := recover(); r != nil {\n\n\t\t}\n\t}()\n}"
  },
  {
    "path": "testData/inspections/go-defer-function-call/deferRecover.go",
    "content": "package main\n\nfunc main() {\n\t<weak_warning descr=\"defer should not call recover() directly\">defer recover<caret>()</weak_warning>\n}"
  },
  {
    "path": "testData/inspections/go-defer-function-call/funcLiteral-after.go",
    "content": "package main\n\nfunc _() {\n    go func() {}()\n}"
  },
  {
    "path": "testData/inspections/go-defer-function-call/funcLiteral.go",
    "content": "package main\n\nfunc _() {\n    go <error descr=\"Expression in go must be function call\">fu<caret>nc(){}</error>\n}"
  },
  {
    "path": "testData/inspections/go-defer-function-call/literal.go",
    "content": "package main\n\nfunc _() {\n    defer <error descr=\"Expression in defer must be function call\"><caret>1</error>\n}"
  },
  {
    "path": "testData/inspections/go-defer-function-call/parens-after.go",
    "content": "package main\n\nfunc _() {\n    defer func() {}()\n}"
  },
  {
    "path": "testData/inspections/go-defer-function-call/parens.go",
    "content": "package main\n\nfunc _() {\n    defer <error descr=\"Expression in defer must be function call\"><error descr=\"Expression in defer must not be parenthesized\">(<error descr=\"fu<caret>nc(){}() used as value\">func(){}()</error>)</error></error>\n}"
  },
  {
    "path": "testData/inspections/go-defer-function-call/parensFunctionType-after.go",
    "content": "package main\n\nfunc _() {\n    defer (func() {})()\n}"
  },
  {
    "path": "testData/inspections/go-defer-function-call/parensFunctionType.go",
    "content": "package main\n\nfunc _() {\n    defer <error descr=\"Expression in defer must be function call\"><error descr=\"Expression in defer must not be parenthesized\">(fu<caret>nc(){})</error></error>\n}"
  },
  {
    "path": "testData/inspections/go-defer-function-call/twiceParens-after.go",
    "content": "package main\n\nfunc _() {\n    defer 1\n}"
  },
  {
    "path": "testData/inspections/go-defer-function-call/twiceParens.go",
    "content": "package main\n\nfunc _() {\n    defer <error descr=\"Expression in defer must be function call\"><error descr=\"Expression in defer must not be parenthesized\">((<caret>1))</error></error>\n}"
  },
  {
    "path": "testData/inspections/go-defer-function-call/valid.go",
    "content": "package main\n\nfunc _() {\n    defer func(){}()\n    go func(){}()\n}"
  },
  {
    "path": "testData/inspections/go-empty-declaration/constVoidDeclaration-after.go",
    "content": "package main\n\nfunc _() {\n\n}"
  },
  {
    "path": "testData/inspections/go-empty-declaration/constVoidDeclaration.go",
    "content": "package main\n\n<warning>const(\n\n)<caret></warning>\n\nfunc _() {\n\n}"
  },
  {
    "path": "testData/inspections/go-empty-declaration/importVoidDeclarationWithUpperComment.go",
    "content": "package main\n\n// comment to import\nimport (\n\n)<caret>\n\nfunc _() {\n\n}"
  },
  {
    "path": "testData/inspections/go-empty-declaration/notVoidImportDeclaration.go",
    "content": "package main\n\nimport (\n  \"fmt\"\n  )<caret>\n\nfunc _() {\n\n}"
  },
  {
    "path": "testData/inspections/go-empty-declaration/twoVoidImportsWithOneComment-after.go",
    "content": "package main\n\n//comment\nimport ()\n\nfunc _() {\n\n}"
  },
  {
    "path": "testData/inspections/go-empty-declaration/twoVoidImportsWithOneComment.go",
    "content": "package main\n\n//comment\nimport ()\n<warning descr=\"Empty declaration 'import ()'\">import ()<caret></warning>\n\nfunc _() {\n\n}"
  },
  {
    "path": "testData/inspections/go-empty-declaration/typeVoidDeclaration-after.go",
    "content": "package main\n\nfunc _() {\n\n}"
  },
  {
    "path": "testData/inspections/go-empty-declaration/typeVoidDeclaration.go",
    "content": "package main\n\n<warning descr=\"Empty declaration 'type( )'\">type(\n)<caret></warning>\n\nfunc _() {\n\n}"
  },
  {
    "path": "testData/inspections/go-empty-declaration/varVoidDeclarationInFunction.go",
    "content": "package main\n\nfunc _() {\n  var()<caret>\n\n}"
  },
  {
    "path": "testData/inspections/go-empty-declaration/varVoidDeclarationNotInFunction-after.go",
    "content": "package main\n\nfunc _() {\n\n\n}"
  },
  {
    "path": "testData/inspections/go-empty-declaration/varVoidDeclarationNotInFunction.go",
    "content": "package main\n\n  <warning descr=\"Empty declaration 'var()'\">var()<caret></warning>\n\nfunc _() {\n\n\n}"
  },
  {
    "path": "testData/inspections/go-empty-declaration/varVoidDeclarationWithInnerComment.go",
    "content": "package main\n\n\nvar(\n  // comment\n)\n\nfunc _() {\n\n}"
  },
  {
    "path": "testData/inspections/go-simplify/compositeLitWithArrays-after.go",
    "content": "package main\n\ntype T struct {\n\tx, y int\n}\n\nvar _ = [42]T{\n      10: {1,2},\n}\n\nfunc main (){\n}"
  },
  {
    "path": "testData/inspections/go-simplify/compositeLitWithArrays.go",
    "content": "package main\n\ntype T struct {\n\tx, y int\n}\n\nvar _ = [42]T{\n      10: <warning descr=\"Redundant type declaration\">T<caret></warning>{1,2},\n}\n\nfunc main (){\n}"
  },
  {
    "path": "testData/inspections/go-simplify/compositeLitWithArraysInBrackets.go",
    "content": "package main\n\ntype T struct {\n\tx, y int\n}\n\nvar _ = [][]int{\n\t([]int<caret>{}),\n\t([]int{1, 2}),\n}\n\nfunc main (){\n}"
  },
  {
    "path": "testData/inspections/go-simplify/compositeLitWithInsertedArrays-after.go",
    "content": "package main\n\ntype T struct {\n\tx, y int\n}\n\nvar _ = [][][]int{\n\t{\n\t\t{0, 1, 2, 3},\n\t},\n}\n\nfunc main (){\n}"
  },
  {
    "path": "testData/inspections/go-simplify/compositeLitWithInsertedArrays.go",
    "content": "package main\n\ntype T struct {\n\tx, y int\n}\n\nvar _ = [][][]int{\n\t[][]int{\n\t\t[]int<caret>{0, 1, 2, 3},\n\t},\n}\n\nfunc main (){\n}"
  },
  {
    "path": "testData/inspections/go-simplify/compositeLitWithInterface.go",
    "content": "package main\n\ntype T struct {\n\tx, y int\n}\n\nvar _ = []interface{}{\n\tT<caret>{},\n\t10: T{1, 2},\n\t20: T{3, 4},\n}\n\nfunc main (){\n}"
  },
  {
    "path": "testData/inspections/go-simplify/compositeLitWithKeysAndSimpleRedundantTypeDecl-after.go",
    "content": "package main\n\ntype T struct {\n\tx, y int\n}\n\nvar _ = [42]T{\n      10: {1,2},\n}\n\nfunc main (){\n}"
  },
  {
    "path": "testData/inspections/go-simplify/compositeLitWithKeysAndSimpleRedundantTypeDecl.go",
    "content": "package main\n\ntype T struct {\n\tx, y int\n}\n\nvar _ = [42]T{\n      10: <warning descr=\"Redundant type declaration\">T<caret></warning>{1,2},\n}\n\nfunc main (){\n}"
  },
  {
    "path": "testData/inspections/go-simplify/compositeLitWithMap-after.go",
    "content": "package main\n\ntype T struct {\n\tx, y int\n}\n\nvar _ = map[string]T{\n\t\"foo\": {},\n}\n\nfunc main (){\n}"
  },
  {
    "path": "testData/inspections/go-simplify/compositeLitWithMap.go",
    "content": "package main\n\ntype T struct {\n\tx, y int\n}\n\nvar _ = map[string]T{\n\t\"foo\": <warning descr=\"Redundant type declaration\">T<caret></warning>{},\n}\n\nfunc main (){\n}"
  },
  {
    "path": "testData/inspections/go-simplify/compositeLitWithMapOfStruct-after.go",
    "content": "package main\n\ntype T struct {\n\tx, y int\n}\n\nvar _ = map[string]struct { + test\n\tx, y int\n}{\n\t\"bal\": {3, 4},\n}\n\nfunc main (){\n}"
  },
  {
    "path": "testData/inspections/go-simplify/compositeLitWithMapOfStruct.go",
    "content": "package main\n\ntype T struct {\n\tx, y int\n}\n\nvar _ = map[string]struct {\n\tx, y int\n}{\n\t\"bal\": struct{x, y int }<caret>{3, 4},\n}\n\nfunc main (){\n}"
  },
  {
    "path": "testData/inspections/go-simplify/compositeLitWithMapWithPointerAndStruct-after.go",
    "content": "package main\n\nvar _ = map[string]*struct {\n\tx, y int\n}{\n\t\"bal\": {3, 4},\n}\n\nfunc main (){\n}"
  },
  {
    "path": "testData/inspections/go-simplify/compositeLitWithMapWithPointerAndStruct.go",
    "content": "package main\n\nvar _ = map[string]*struct {\n\tx, y int\n}{\n\t\"bal\": &struct<caret>{ x, y int }{3, 4},\n}\n\nfunc main (){\n}"
  },
  {
    "path": "testData/inspections/go-simplify/compositeLitWithOneSimpleRedundantTypeDecl-after.go",
    "content": "package main\n\ntype T struct {\n\tx, y int\n}\n\nvar _ = [42]T{\n\t{},\n}\n\nfunc main (){\n}"
  },
  {
    "path": "testData/inspections/go-simplify/compositeLitWithOneSimpleRedundantTypeDecl.go",
    "content": "package main\n\ntype T struct {\n\tx, y int\n}\n\nvar _ = [42]T{\n\t<warning descr=\"Redundant type declaration\">T<caret></warning>{},\n}\n\nfunc main (){\n}"
  },
  {
    "path": "testData/inspections/go-simplify/compositeLitWithPointerAndStructAndInsertedElement-after.go",
    "content": "package main\n\nvar _ = []*[]*[]int{\n\t{\n\t\t{0, 1, 2, 3},\n\t},\n}\n\nfunc main (){\n}"
  },
  {
    "path": "testData/inspections/go-simplify/compositeLitWithPointerAndStructAndInsertedElement.go",
    "content": "package main\n\nvar _ = []*[]*[]int{\n\t&[]*[]int{\n\t\t&[]int<caret>{0, 1, 2, 3},\n\t},\n}\n\nfunc main (){\n}"
  },
  {
    "path": "testData/inspections/go-simplify/compositeLitWithPointers-after.go",
    "content": "package main\n\ntype T struct {\n\tx, y int\n}\n\nvar _ = []*T{\n\t{1, 2},\n}\n\nfunc main (){\n}"
  },
  {
    "path": "testData/inspections/go-simplify/compositeLitWithPointers.go",
    "content": "package main\n\ntype T struct {\n\tx, y int\n}\n\nvar _ = []*T{\n\t<warning descr=\"Redundant type declaration\">&T<caret></warning>{1, 2},\n}\n\nfunc main (){\n}"
  },
  {
    "path": "testData/inspections/go-simplify/compositeLitWithPointersNoFix.go",
    "content": "package main\n\ntype T struct {\n\tx, y int\n}\n\nvar _ = []*T{\n\tT<caret>{1, 2},\n}\n\nfunc main (){\n}"
  },
  {
    "path": "testData/inspections/go-simplify/compositeLitWithStruct-after.go",
    "content": "package main\n\ntype T struct {\n\tx, y int\n}\n\nvar _ = map[string]struct {\n\tx, y int\n}{\n\t{3, 4},\n}\n\nfunc main (){\n}"
  },
  {
    "path": "testData/inspections/go-simplify/compositeLitWithStruct.go",
    "content": "package main\n\ntype T struct {\n\tx, y int\n}\n\nvar _ = []struct {\n\tx, y int\n}{\n\tstruct{ x, y <caret>int }{3, 4},\n}\n\nfunc main (){\n}"
  },
  {
    "path": "testData/inspections/go-simplify/compositeLitWithTwoDimensionalArray-after.go",
    "content": "package main\n\ntype T struct {\n\tx, y int\n}\n\nvar _ = [][]int{\n\t{3, 4},\n}\n\nfunc main (){\n}"
  },
  {
    "path": "testData/inspections/go-simplify/compositeLitWithTwoDimensionalArray.go",
    "content": "package main\n\ntype T struct {\n\tx, y int\n}\n\nvar _ = [][]int{\n\t[]int<caret>{3, 4},\n}\n\nfunc main (){\n}"
  },
  {
    "path": "testData/inspections/go-simplify/rangeSimplifyWithOneArg.go",
    "content": "package main\n\nfunc _() {\n\n  var x []int\n\n  for a <caret>= range x {\n\n  }\n}"
  },
  {
    "path": "testData/inspections/go-simplify/rangeSimplifyWithOneBlankAndOneNotBlankArgs.go",
    "content": "package p\n\nfunc _() {\n\n  var x []int\n\n  for _, a = range x {\n\n  }\n}"
  },
  {
    "path": "testData/inspections/go-simplify/rangeSimplifyWithOneBlankArg-after.go",
    "content": "package main\n\nfunc _() {\n\n  var x []int\n\n  for range x {\n\n  }\n}"
  },
  {
    "path": "testData/inspections/go-simplify/rangeSimplifyWithOneBlankArg.go",
    "content": "package main\n\nfunc _() {\n\n  var x []int\n\n  for <warning descr=\"Redundant '_' expression\">_ =<caret> </warning>range x {\n\n  }\n}"
  },
  {
    "path": "testData/inspections/go-simplify/rangeSimplifyWithOneNotBlankAndOneBlankArgs-after.go",
    "content": "package main\n\nfunc _() {\n\n  var x []int\n\n  for a = range x {\n\n  }\n}"
  },
  {
    "path": "testData/inspections/go-simplify/rangeSimplifyWithOneNotBlankAndOneBlankArgs.go",
    "content": "package main\n\nfunc _() {\n\n  var x []int\n\n  for a<warning descr=\"Redundant '_' expression\">, _<caret></warning> = range x {\n\n  }\n}"
  },
  {
    "path": "testData/inspections/go-simplify/rangeSimplifyWithTwoArgs.go",
    "content": "package p\n\nfunc _() {\n\n  var x []int\n\n  for a, b = range <caret>x {\n\n  }\n}"
  },
  {
    "path": "testData/inspections/go-simplify/rangeSimplifyWithTwoBlankArgs-after.go",
    "content": "package p\n\nfunc _() {\n\n  var x []int\n\n  for range x {\n\n  }\n}"
  },
  {
    "path": "testData/inspections/go-simplify/rangeSimplifyWithTwoBlankArgs.go",
    "content": "package p\n\nfunc _() {\n\n  var x []int\n\n  for <warning descr=\"Redundant '_' expression\">_, _ =<caret> </warning>range x {\n\n  }\n}"
  },
  {
    "path": "testData/inspections/go-simplify/rangeSimplifyWithVarAssign-after.go",
    "content": "package main\n\nfunc _() {\n\n  var x []int\n\n  for a := range x {\n\n  }\n}"
  },
  {
    "path": "testData/inspections/go-simplify/rangeSimplifyWithVarAssign.go",
    "content": "package main\n\nfunc _() {\n\n  var x []int\n\n  for a<warning descr=\"Redundant '_' expression\">, _<caret></warning> := range x {\n\n  }\n}"
  },
  {
    "path": "testData/inspections/go-simplify/slice-after.go",
    "content": "package main\n\nvar (\n  a [10]byte\n  b [20]int\n\n  t struct {\n    s byte\n  }\n\n  _ = a[0: ]\n)\n\nfunc main (){\n}"
  },
  {
    "path": "testData/inspections/go-simplify/slice.go",
    "content": "package main\n\nvar (\n  a [10]byte\n  b [20]int\n\n  t struct {\n    s byte\n  }\n\n  _ = a[0: <warning descr=\"Redundant index\">len(a)<caret></warning>]\n)\n\nfunc main (){\n}"
  },
  {
    "path": "testData/inspections/go-simplify/sliceWithLenAnotherArray.go",
    "content": "package main\n\nvar (\n  a [10]byte\n  b [20]int\n\n  t struct {\n    s byte\n  }\n\n  _ = b[0: len(a)]\n)\n\nfunc main (){\n}"
  },
  {
    "path": "testData/inspections/go-simplify/sliceWithOnlySecondIndex-after.go",
    "content": "package main\n\nvar (\n  a [10]byte\n\n  _ = a[: ]\n)\n\nfunc main (){\n}"
  },
  {
    "path": "testData/inspections/go-simplify/sliceWithOnlySecondIndex.go",
    "content": "package main\n\nvar (\n  a [10]byte\n\n  _ = a[: <warning descr=\"Redundant index\">len(a)<caret></warning>]\n)\n\nfunc main (){\n}"
  },
  {
    "path": "testData/inspections/go-simplify/sliceWithRedeclaredLen.go",
    "content": "package main\n\nvar a [10]byte\n\nfunc len(o [10]byte) int {\n\treturn 1;\n}\n\nfunc main (){\n  _ = a[0: len(a)]\n}"
  },
  {
    "path": "testData/inspections/go-simplify/sliceWithStructIndex.go",
    "content": "package main\n\nvar (\n  a [10]byte\n  b [20]int\n\n  t struct {\n    s []byte\n  }\n\n  _ = t.s[0: len(t.s)]\n)\n\nfunc main (){\n}"
  },
  {
    "path": "testData/inspections/go-simplify/sliceWithThreeIndexes.go",
    "content": "package main\n\nvar (\n  a [10]byte\n  b [20]int\n\n  t struct {\n    s []byte\n  }\n\n  _ = a[0: len(a): len(a)]\n)\n\nfunc main (){\n}"
  },
  {
    "path": "testData/inspections/go-struct-initialization/quickFix-after.go",
    "content": "package foo\n\nimport \"io\"\n\nfunc _() {\n\t_ = io.LimitedReader{\n\t\tR: nil,\n\t}\n}"
  },
  {
    "path": "testData/inspections/go-struct-initialization/quickFix.go",
    "content": "package foo\n\nimport \"io\"\n\nfunc _() {\n\t_ = io.LimitedReader{\n\t\t<weak_warning descr=\"Unnamed field initialization\"><caret>nil</weak_warning>,\n\t}\n}"
  },
  {
    "path": "testData/inspections/go-struct-initialization/uninitializedStructImportedOnly.go",
    "content": "package demo2094\n\nimport \"io\"\nimport \"os\"\n\ntype demo struct {\n\ta string\n\tb int32\n\tc string\n}\n\ntype bemo struct {\n\tdemo\n\tx string\n}\n\ntype MyStruct struct {\n\ta string\n\tb []MyElem\n\tc [3]MyElem\n\td map[string]MyElem\n}\n\ntype MyElem struct {\n\tfoo string\n}\n\nfunc _() struct {\n\tx string\n} {\n\t// good defs\n\t_ = []MyStruct{\n\t\t{\n\t\t\ta: \"bar\",\n\t\t\tb: []MyElem{\n\t\t\t\t{foo: \"foo\"},\n\t\t\t\t{foo: \"foo\"},\n\t\t\t\t{foo: \"foo\"},\n\t\t\t},\n\t\t\tc: [3]MyElem{\n\t\t\t\t{foo: \"foo\"},\n\t\t\t\t{foo: \"foo\"},\n\t\t\t\t{foo: \"foo\"},\n\t\t\t},\n\t\t\td: map[string]MyElem{\n\t\t\t\t\"foo\": {foo: \"foo\"},\n\t\t\t\t\"bar\": {foo: \"foo\"},\n\t\t\t\t\"baz\": {foo: \"foo\"},\n\t\t\t},\n\t\t},\n\t}\n\n\t_ = map[string]MyStruct{\n\t\t\"foo\": {\n\t\t\ta: \"bar\",\n\t\t\tb: []MyElem{\n\t\t\t\t{foo: \"foo\"},\n\t\t\t\t{foo: \"foo\"},\n\t\t\t\t{foo: \"foo\"},\n\t\t\t},\n\t\t\tc: [3]MyElem{\n\t\t\t\t{foo: \"foo\"},\n\t\t\t\t{foo: \"foo\"},\n\t\t\t\t{foo: \"foo\"},\n\t\t\t},\n\t\t\td: map[string]MyElem{\n\t\t\t\t\"foo\": {foo: \"foo\"},\n\t\t\t\t\"bar\": {foo: \"foo\"},\n\t\t\t\t\"baz\": {foo: \"foo\"},\n\t\t\t},\n\t\t},\n\t}\n\n\t_ = struct{ x string }{x: \"demo\"}\n\t_ = demo{a: \"demo\"}\n\t_ = demo{a: \"demo\", b: 1}\n\n\t// bad defs\n\t_ = demo{\"demo\"}\n\tb, _ := demo{\"demo\"}, 1\n\t_ = demo{\n\t\t\"demo\",\n\t\t1,\n\t\t\"demo\",\n\t}\n\n\t_ = demo{\n\t\ta: \"demo\",\n\t\t1,\n\t}\n\t_ = bemo{x: \"demo\"}\n\t_ = b\n\treturn struct{ x string }{\"demo\"}\n}\n\ntype Item struct {\n\tName string\n}\n\ntype Menu []Item\n\nfunc _() {\n\t// good defs\n\t_ = Menu{\n\t\t{Name: \"home\"},\n\t}\n\n\t_ = os.LinkError{\n\t\tOp:  \"string\",\n\t\tOld: \"string\",\n\t\tNew: \"string\",\n\t\tErr: nil,\n\t}\n\n\t// bad defs\n\t_ = io.LimitedReader{\n\t\t<weak_warning descr=\"Unnamed field initialization\">nil</weak_warning>,\n\t}\n\t_ = os.LinkError{\n\t\t<weak_warning descr=\"Unnamed field initialization\">\"string\"</weak_warning>,\n\t\t<weak_warning descr=\"Unnamed field initialization\">\"string\"</weak_warning>,\n\t\t<weak_warning descr=\"Unnamed field initialization\">\"string\"</weak_warning>,\n\t\t<weak_warning descr=\"Unnamed field initialization\">nil</weak_warning>,\n\t}\n}\n\ntype assertion struct {\n\tquery string\n}\n\nfunc _() {\n\ttests := []struct {\n\t\tassertions []assertion\n\t}{\n\t\t{\n\t\t\tassertions: []assertion{\n\t\t\t\t{\n\t\t\t\t\tquery: \"foo\",\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}\n\n\t_ = tests\n}\n"
  },
  {
    "path": "testData/inspections/go-struct-initialization/uninitializedStructWithLocal.go",
    "content": "package demo2094\n\nimport \"io\"\nimport \"os\"\n\ntype demo struct {\n\ta string\n\tb int32\n\tc string\n}\n\ntype bemo struct {\n\tdemo\n\tx string\n}\n\ntype MyStruct struct {\n\ta string\n\tb []MyElem\n\tc [3]MyElem\n\td map[string]MyElem\n}\n\ntype MyElem struct {\n\tfoo string\n}\n\nfunc _() struct {\n\tx string\n} {\n\t// good defs\n\t_ = []MyStruct{\n\t\t{\n\t\t\ta: \"bar\",\n\t\t\tb: []MyElem{\n\t\t\t\t{foo: \"foo\"},\n\t\t\t\t{foo: \"foo\"},\n\t\t\t\t{foo: \"foo\"},\n\t\t\t},\n\t\t\tc: [3]MyElem{\n\t\t\t\t{foo: \"foo\"},\n\t\t\t\t{foo: \"foo\"},\n\t\t\t\t{foo: \"foo\"},\n\t\t\t},\n\t\t\td: map[string]MyElem{\n\t\t\t\t\"foo\": {foo: \"foo\"},\n\t\t\t\t\"bar\": {foo: \"foo\"},\n\t\t\t\t\"baz\": {foo: \"foo\"},\n\t\t\t},\n\t\t},\n\t}\n\n\t_ = map[string]MyStruct{\n\t\t\"foo\": {\n\t\t\ta: \"bar\",\n\t\t\tb: []MyElem{\n\t\t\t\t{foo: \"foo\"},\n\t\t\t\t{foo: \"foo\"},\n\t\t\t\t{foo: \"foo\"},\n\t\t\t},\n\t\t\tc: [3]MyElem{\n\t\t\t\t{foo: \"foo\"},\n\t\t\t\t{foo: \"foo\"},\n\t\t\t\t{foo: \"foo\"},\n\t\t\t},\n\t\t\td: map[string]MyElem{\n\t\t\t\t\"foo\": {foo: \"foo\"},\n\t\t\t\t\"bar\": {foo: \"foo\"},\n\t\t\t\t\"baz\": {foo: \"foo\"},\n\t\t\t},\n\t\t},\n\t}\n\n\t_ = struct{ x string }{x: \"demo\"}\n\t_ = demo{a: \"demo\"}\n\t_ = demo{a: \"demo\", b: 1}\n\n\t// bad defs\n\t_ = demo{<weak_warning descr=\"Unnamed field initialization\">\"demo\"</weak_warning>}\n\tb, _ := demo{<weak_warning descr=\"Unnamed field initialization\">\"demo\"</weak_warning>}, 1\n\t_ = demo{\n\t\t<weak_warning descr=\"Unnamed field initialization\">\"demo\"</weak_warning>,\n\t\t<weak_warning descr=\"Unnamed field initialization\">1</weak_warning>,\n\t\t<weak_warning descr=\"Unnamed field initialization\">\"demo\"</weak_warning>,\n\t}\n\n\t_ = demo{\n\t\ta: \"demo\",\n\t\t<weak_warning descr=\"Unnamed field initialization\">1</weak_warning>,\n\t}\n\t_ = bemo{x: \"demo\"}\n\t_ = b\n\treturn struct{ x string }{<weak_warning descr=\"Unnamed field initialization\">\"demo\"</weak_warning>}\n}\n\ntype Item struct {\n\tName string\n}\n\ntype Menu []Item\n\nfunc _() {\n\t// good defs\n\t_ = Menu{\n\t\t{Name: \"home\"},\n\t}\n\n\t_ = os.LinkError{\n\t\tOp:  \"string\",\n\t\tOld: \"string\",\n\t\tNew: \"string\",\n\t\tErr: nil,\n\t}\n\n\t// bad defs\n\t_ = io.LimitedReader{\n\t\t<weak_warning descr=\"Unnamed field initialization\">nil</weak_warning>,\n\t}\n\t_ = os.LinkError{\n\t\t<weak_warning descr=\"Unnamed field initialization\">\"string\"</weak_warning>,\n\t\t<weak_warning descr=\"Unnamed field initialization\">\"string\"</weak_warning>,\n\t\t<weak_warning descr=\"Unnamed field initialization\">\"string\"</weak_warning>,\n\t\t<weak_warning descr=\"Unnamed field initialization\">nil</weak_warning>,\n\t}\n}\n\ntype assertion struct {\n\tquery string\n}\n\nfunc _() {\n\ttests := []struct {\n\t\tassertions []assertion\n\t}{\n\t\t{\n\t\t\tassertions: []assertion{\n\t\t\t\t{\n\t\t\t\t\tquery: \"foo\",\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}\n\n\t_ = tests\n}\n"
  },
  {
    "path": "testData/inspections/suppression/fix/commClauseStatementSuppressionFix-after-highlighting.go",
    "content": "package main\n\nfunc _() {\n\t//noinspection ALL\n\tselect {\n\tcase foo <- bar:\n\t}\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/commClauseStatementSuppressionFix-after.go",
    "content": "package main\n\nfunc _() {\n\t//noinspection ALL\n\tselect {\n\tcase foo <- bar:\n\t}\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/commClauseStatementSuppressionFix.go",
    "content": "package main\n\nfunc _() {\n\tselect {\n\tcase fo<caret>o <- bar:\n\t}\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/firstImportStatement-after-highlighting.go",
    "content": "package main\n//noinspection GoUnresolvedReference\nimport \"package1\"\nimport \"<error descr=\"Cannot resolve file 'package2'\">package2</error>\"\n\nfunc test() {\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/firstImportStatement-after.go",
    "content": "package main\n//noinspection GoUnresolvedReference\nimport \"package1\"\nimport \"package2\"\n\nfunc test() {\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/firstImportStatement.go",
    "content": "package main\nimport \"package<caret>1\"\nimport \"package2\"\n\nfunc test() {\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/functionAllSuppressionFix-after-highlighting.go",
    "content": "package newmath\n\n//noinspection ALL\nfunc TestFunction() {\n    Te<caret>st(\"Sqrt(%v) = %v, want %v\")\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/functionAllSuppressionFix-after.go",
    "content": "package newmath\n\n//noinspection ALL\nfunc TestFunction() {\n\tTe<caret>st(\"Sqrt(%v) = %v, want %v\")\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/functionAllSuppressionFix.go",
    "content": "package newmath\n\nfunc TestFunction() {\n\tTe<caret>st(\"Sqrt(%v) = %v, want %v\")\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/functionAllSuppressionFixWithExistingComment-after-highlighting.go",
    "content": "package newmath\n\n//noinspection ALL\nfunc TestFunction() {\n    Te<caret>st(\"Sqrt(%v) = %v, want %v\")\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/functionAllSuppressionFixWithExistingComment-after.go",
    "content": "package newmath\n\n//noinspection ALL\nfunc TestFunction() {\n\tTe<caret>st(\"Sqrt(%v) = %v, want %v\")\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/functionAllSuppressionFixWithExistingComment.go",
    "content": "package newmath\n\n//noinspection SomeInspection\nfunc TestFunction() {\n\tTe<caret>st(\"Sqrt(%v) = %v, want %v\")\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/functionSuppressionFix-after-highlighting.go",
    "content": "package newmath\n\n//noinspection GoUnresolvedReference\nfunc TestFunction() {\n    Te<caret>st(\"Sqrt(%v) = %v, want %v\")\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/functionSuppressionFix-after.go",
    "content": "package newmath\n\n//noinspection GoUnresolvedReference\nfunc TestFunction() {\n\tTe<caret>st(\"Sqrt(%v) = %v, want %v\")\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/functionSuppressionFix.go",
    "content": "package newmath\n\nfunc TestFunction() {\n\tTe<caret>st(\"Sqrt(%v) = %v, want %v\")\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/functionSuppressionFixWithExistingComment-after-highlighting.go",
    "content": "package newmath\n\n//noinspection SomeInspection,GoUnresolvedReference\nfunc TestFunction() {\n    Te<caret>st(\"Sqrt(%v) = %v, want %v\")\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/functionSuppressionFixWithExistingComment-after.go",
    "content": "package newmath\n\n//noinspection SomeInspection,GoUnresolvedReference\nfunc TestFunction() {\n\tTe<caret>st(\"Sqrt(%v) = %v, want %v\")\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/functionSuppressionFixWithExistingComment.go",
    "content": "package newmath\n\n//noinspection SomeInspection\nfunc TestFunction() {\n\tTe<caret>st(\"Sqrt(%v) = %v, want %v\")\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/importStatement-after-highlighting.go",
    "content": "package main\nimport \"<error descr=\"Cannot resolve file 'package1'\">package1</error>\"\n//noinspection GoUnresolvedReference\nimport \"package2\"\n\nfunc test() {\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/importStatement-after.go",
    "content": "package main\nimport \"package1\"\n//noinspection GoUnresolvedReference\nimport \"package2\"\n\nfunc test() {\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/importStatement.go",
    "content": "package main\nimport \"package1\"\nimport \"package<caret>2\"\n\nfunc test() {\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/innerVariableDeclarationSuppressionFix.go",
    "content": "package newmath\n\nfunc TestFunction() {\n\tvar var<caret>1 = 1;\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/innerVariableDeclarationSuppressionFix2-after-highlighting.go",
    "content": "package newmath\n\nfunc TestFunction() {\n\t//noinspection GoUnusedVariable\n\tvar var1 = 1;\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/innerVariableDeclarationSuppressionFix2-after.go",
    "content": "package newmath\n\nfunc TestFunction() {\n\t//noinspection GoUnusedVariable\n\tvar var1 = 1;\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/innerVariableDeclarationSuppressionFix2.go",
    "content": "package newmath\n\nfunc TestFunction() {\n\tvar var<caret>1 = 1;\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/innerVariableDeclarationSuppressionFix3-after-highlighting.go",
    "content": "package newmath\n\n//noinspection GoUnusedVariable\nfunc TestFunction() {\n  var var1 = 1;\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/innerVariableDeclarationSuppressionFix3-after.go",
    "content": "package newmath\n\n//noinspection GoUnusedVariable\nfunc TestFunction() {\n\tvar var<caret>1 = 1;\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/innerVariableDeclarationSuppressionFix3.go",
    "content": "package newmath\n\nfunc TestFunction() {\n\tvar var<caret>1 = 1;\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/packageClause-after-highlighting.go",
    "content": "//noinspection GoMultiplePackages\npackage otherPackage\n"
  },
  {
    "path": "testData/inspections/suppression/fix/packageClause-after.go",
    "content": "//noinspection GoMultiplePackages\npackage otherPackage\n"
  },
  {
    "path": "testData/inspections/suppression/fix/packageClause.go",
    "content": "package otherPacka<caret>ge\n"
  },
  {
    "path": "testData/inspections/suppression/fix/packageClauseSuppressAll-after-highlighting.go",
    "content": "//noinspection ALL\npackage otherPackage\n"
  },
  {
    "path": "testData/inspections/suppression/fix/packageClauseSuppressAll-after.go",
    "content": "//noinspection ALL\npackage otherPackage\n"
  },
  {
    "path": "testData/inspections/suppression/fix/packageClauseSuppressAll.go",
    "content": "package otherPacka<caret>ge\n"
  },
  {
    "path": "testData/inspections/suppression/fix/selectCaseAllSuppressionFix-after-highlighting.go",
    "content": "package main\n\nfunc _() {\n\tselect {\n\t//noinspection ALL\n\tcase foo <- bar:\n\t\tprintln(fo<caret>o)\n\t}\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/selectCaseAllSuppressionFix-after.go",
    "content": "package main\n\nfunc _() {\n\tselect {\n\t//noinspection ALL\n\tcase foo <- bar:\n\t\tprintln(fo<caret>o)\n\t}\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/selectCaseAllSuppressionFix.go",
    "content": "package main\n\nfunc _() {\n\tselect {\n\tcase foo <- bar:\n\t\tprintln(fo<caret>o)\n\t}\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/selectCaseAllSuppressionFixWithExistingComment-after-highlighting.go",
    "content": "package main\n\nfunc _() {\n\tselect {\n\t//noinspection ALL\n\tcase foo <- bar:\n\t\tprintln(fo<caret>o)\n\t}\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/selectCaseAllSuppressionFixWithExistingComment-after.go",
    "content": "package main\n\nfunc _() {\n\tselect {\n\t//noinspection ALL\n\tcase foo <- bar:\n\t\tprintln(fo<caret>o)\n\t}\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/selectCaseAllSuppressionFixWithExistingComment.go",
    "content": "package main\n\nfunc _() {\n\tselect {\n\t//noinspection BlaBlaBla\n\tcase foo <- bar:\n\t\tprintln(fo<caret>o)\n\t}\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/selectCaseSuppressionFix-after-highlighting.go",
    "content": "package main\n\nfunc _() {\n\tselect {\n\t//noinspection ALL\n\tcase foo <- bar:\n\t\tprintln(foo)\n\t}\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/selectCaseSuppressionFix-after.go",
    "content": "package main\n\nfunc _() {\n\tselect {\n\t//noinspection ALL\n\tcase foo <- bar:\n\t\tprintln(foo)\n\t}\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/selectCaseSuppressionFix.go",
    "content": "package main\n\nfunc _() {\n\tselect {\n\tcase foo <- bar:\n\t\tprintln(fo<caret>o)\n\t}\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/selectCaseSuppressionFixWithExistingComment-after-highlighting.go",
    "content": "package main\n\nfunc _() {\n\tselect {\n\t//noinspection ALL\n\tcase foo <- bar:\n\t\tprintln(fo<caret>o)\n\t}\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/selectCaseSuppressionFixWithExistingComment-after.go",
    "content": "package main\n\nfunc _() {\n\tselect {\n\t//noinspection ALL\n\tcase foo <- bar:\n\t\tprintln(fo<caret>o)\n\t}\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/selectCaseSuppressionFixWithExistingComment.go",
    "content": "package main\n\nfunc _() {\n\tselect {\n\t//noinspection BlaBlaBla\n\tcase foo <- bar:\n\t\tprintln(fo<caret>o)\n\t}\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/statementAllSuppressionFix-after-highlighting.go",
    "content": "package newmath\n\nfunc TestFunction() {\n\t//noinspection ALL\n\tTest(\"Sqrt(%v) = %v, want %v\")\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/statementAllSuppressionFix-after.go",
    "content": "package newmath\n\nfunc TestFunction() {\n\t//noinspection ALL\n\tTest(\"Sqrt(%v) = %v, want %v\")\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/statementAllSuppressionFix.go",
    "content": "package newmath\n\nfunc TestFunction() {\n\tTe<caret>st(\"Sqrt(%v) = %v, want %v\")\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/statementAllSuppressionFixWithExistingComment-after-highlighting.go",
    "content": "package newmath\n\nfunc TestFunction() {\n\t//noinspection ALL\n\tTest(\"Sqrt(%v) = %v, want %v\")\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/statementAllSuppressionFixWithExistingComment-after.go",
    "content": "package newmath\n\nfunc TestFunction() {\n\t//noinspection ALL\n\tTest(\"Sqrt(%v) = %v, want %v\")\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/statementAllSuppressionFixWithExistingComment.go",
    "content": "package newmath\n\nfunc TestFunction() {\n\t//noinspection SomeInspection\n\tTe<caret>st(\"Sqrt(%v) = %v, want %v\")\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/statementSuppressionFix-after-highlighting.go",
    "content": "package newmath\n\nfunc TestFunction() {\n\t//noinspection GoUnresolvedReference\n\tTest(\"Sqrt(%v) = %v, want %v\")\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/statementSuppressionFix-after.go",
    "content": "package newmath\n\nfunc TestFunction() {\n\t//noinspection GoUnresolvedReference\n\tTest(\"Sqrt(%v) = %v, want %v\")\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/statementSuppressionFix.go",
    "content": "package newmath\n\nfunc TestFunction() {\n\tTe<caret>st(\"Sqrt(%v) = %v, want %v\")\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/statementSuppressionFixWithExistingComment-after-highlighting.go",
    "content": "package newmath\n\nfunc TestFunction() {\n\t//noinspection SomeInspection,GoUnresolvedReference\n\tTest(\"Sqrt(%v) = %v, want %v\")\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/statementSuppressionFixWithExistingComment-after.go",
    "content": "package newmath\n\nfunc TestFunction() {\n\t//noinspection SomeInspection,GoUnresolvedReference\n\tTest(\"Sqrt(%v) = %v, want %v\")\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/statementSuppressionFixWithExistingComment.go",
    "content": "package newmath\n\nfunc TestFunction() {\n\t//noinspection SomeInspection\n\tTe<caret>st(\"Sqrt(%v) = %v, want %v\")\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/suppressedNestedSelect.go",
    "content": "package main\n\nfunc _() {\n    select {\n    //noinspection GoUnresolvedReference\n    case foo <- bar:\n      select {\n      case foo <- bar:\n        break\n      }\n    }\n    \n    \n    select {\n    //noinspection GoUnresolvedReference\n    case foo <- bar:\n      select {\n      case foo <- bar:\n        break\n      }\n    }\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/switchCaseAllSuppressionFix-after-highlighting.go",
    "content": "package main\n\nfunc _() {\n\tswitch 1 {\n\t//noinspection ALL\n\tcase foo:\n\t\tprintln(foo)\n\t}\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/switchCaseAllSuppressionFix-after.go",
    "content": "package main\n\nfunc _() {\n\tswitch 1 {\n\t//noinspection ALL\n\tcase foo:\n\t\tprintln(foo)\n\t}\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/switchCaseAllSuppressionFix.go",
    "content": "package main\n\nfunc _() {\n\tswitch 1 {\n\tcase foo:\n\t\tprintln(f<caret>oo)\n\t}\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/switchCaseAllSuppressionFixWithExistingComment-after-highlighting.go",
    "content": "package main\n\nfunc _() {\n\tswitch 1 {\n\t//noinspection ALL\n\tcase foo:\n\t\tprintln(foo)\n\t}\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/switchCaseAllSuppressionFixWithExistingComment-after.go",
    "content": "package main\n\nfunc _() {\n\tswitch 1 {\n\t//noinspection ALL\n\tcase foo:\n\t\tprintln(foo)\n\t}\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/switchCaseAllSuppressionFixWithExistingComment.go",
    "content": "package main\n\nfunc _() {\n\tswitch 1 {\n\t//noinspection BlaBlaBla\n\tcase foo:\n\t\tprintln(f<caret>oo)\n\t}\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/switchCaseSuppressionFix-after-highlighting.go",
    "content": "package main\n\nfunc _() {\n\tswitch 1 {\n\t//noinspection ALL\n\tcase foo:\n\t\tprintln(foo)\n\t}\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/switchCaseSuppressionFix-after.go",
    "content": "package main\n\nfunc _() {\n\tswitch 1 {\n\t//noinspection ALL\n\tcase foo:\n\t\tprintln(foo)\n\t}\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/switchCaseSuppressionFix.go",
    "content": "package main\n\nfunc _() {\n\tswitch 1 {\n\tcase foo:\n\t\tprintln(f<caret>oo)\n\t}\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/switchCaseSuppressionFixWithExistingComment-after-highlighting.go",
    "content": "package main\n\nfunc _() {\n\tswitch 1 {\n\t//noinspection ALL\n\tcase foo:\n\t\tprintln(foo)\n\t}\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/switchCaseSuppressionFixWithExistingComment-after.go",
    "content": "package main\n\nfunc _() {\n\tswitch 1 {\n\t//noinspection ALL\n\tcase foo:\n\t\tprintln(foo)\n\t}\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/switchCaseSuppressionFixWithExistingComment.go",
    "content": "package main\n\nfunc _() {\n\tswitch 1 {\n\t//noinspection BlaBlaBla\n\tcase foo:\n\t\tprintln(f<caret>oo)\n\t}\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/variableDeclarationAllSuppressionFix-after-highlighting.go",
    "content": "package newmath\n\n//noinspection ALL\nvar var1 = 1;\n\nfunc TestFunction() {\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/variableDeclarationAllSuppressionFix-after.go",
    "content": "package newmath\n\n//noinspection ALL\nvar var1 = 1;\n\nfunc TestFunction() {\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/variableDeclarationAllSuppressionFix.go",
    "content": "package newmath\n\nvar va<caret>r1 = 1;\n\nfunc TestFunction() {\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/variableDeclarationAllSuppressionFixWithExistingComment-after-highlighting.go",
    "content": "package newmath\n\n//noinspection ALL\nvar var1 = 1;\n\nfunc TestFunction() {\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/variableDeclarationAllSuppressionFixWithExistingComment-after.go",
    "content": "package newmath\n\n//noinspection ALL\nvar var1 = 1;\n\nfunc TestFunction() {\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/variableDeclarationAllSuppressionFixWithExistingComment.go",
    "content": "package newmath\n\n//noinspection SomeInspection\nvar var<caret>1 = 1;\n\nfunc TestFunction() {\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/variableDeclarationSuppressionFix-after-highlighting.go",
    "content": "package newmath\n\n//noinspection GoUnusedGlobalVariable\nvar var1 = 1;\n\nfunc TestFunction() {\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/variableDeclarationSuppressionFix-after.go",
    "content": "package newmath\n\n//noinspection GoUnusedGlobalVariable\nvar var1 = 1;\n\nfunc TestFunction() {\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/variableDeclarationSuppressionFix.go",
    "content": "package newmath\n\nvar va<caret>r1 = 1;\n\nfunc TestFunction() {\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/variableDeclarationSuppressionFixWithExistingComment-after-highlighting.go",
    "content": "package newmath\n\n//noinspection SomeInspection,GoUnusedGlobalVariable\nvar var1 = 1;\n\nfunc TestFunction() {\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/variableDeclarationSuppressionFixWithExistingComment-after.go",
    "content": "package newmath\n\n//noinspection SomeInspection,GoUnusedGlobalVariable\nvar var1 = 1;\n\nfunc TestFunction() {\n}"
  },
  {
    "path": "testData/inspections/suppression/fix/variableDeclarationSuppressionFixWithExistingComment.go",
    "content": "package newmath\n\n//noinspection SomeInspection\nvar var<caret>1 = 1;\n\nfunc TestFunction() {\n}"
  },
  {
    "path": "testData/inspections/test-signatures/benchmark_test-after.go",
    "content": "package a\n\nimport \"testing\"\n\nfunc Benchmark(b *testing.B) {\n}\n"
  },
  {
    "path": "testData/inspections/test-signatures/benchmark_test.go",
    "content": "package a\n\nimport \"testing\"\n\nfunc <error>Benchmark<caret></error> (t *testing.T) {\n}\n"
  },
  {
    "path": "testData/inspections/test-signatures/exampleNonEmptySignature_test-after.go",
    "content": "package a\n\nimport \"testing\"\n\nfunc ExampleFunction() {\n}\n"
  },
  {
    "path": "testData/inspections/test-signatures/exampleNonEmptySignature_test.go",
    "content": "package a\n\nimport \"testing\"\n\nfunc <error>ExampleFunction<caret></error> (t *testing.T) {\n}\n"
  },
  {
    "path": "testData/inspections/test-signatures/exampleWithReturnValue_test-after.go",
    "content": "package a\n\nimport . \"testing\"\n\nfunc ExampleA() {\n}\n"
  },
  {
    "path": "testData/inspections/test-signatures/exampleWithReturnValue_test.go",
    "content": "package a\n\nimport . \"testing\"\n\nfunc <error>ExampleA<caret></error> () int {\n}\n"
  },
  {
    "path": "testData/inspections/test-signatures/testLocalTestingImport_test-after.go",
    "content": "package a\n\nimport . \"testing\"\n\nfunc TestLocalImport(t *T) {\n}\n"
  },
  {
    "path": "testData/inspections/test-signatures/testLocalTestingImport_test.go",
    "content": "package a\n\nimport . \"testing\"\n\nfunc <error>TestLocalImport<caret></error> (t *testing.T) {\n}\n"
  },
  {
    "path": "testData/inspections/test-signatures/testMain_test-after.go",
    "content": "package a\n\nimport \"testing\"\n\nfunc TestMain(m *testing.M) {\n}\n"
  },
  {
    "path": "testData/inspections/test-signatures/testMain_test.go",
    "content": "package a\n\nimport \"testing\"\n\nfunc <error>TestMain<caret></error> (t *testing.T) {\n}\n"
  },
  {
    "path": "testData/inspections/test-signatures/testNoTestingImport_test-after.go",
    "content": "package a\n\nimport \"testing\"\n\nfunc TestNoImportEmptySignature(t *testing.T) {\n}\n\nfunc TestNoImport (t *testing.T) {\n}\n"
  },
  {
    "path": "testData/inspections/test-signatures/testNoTestingImport_test.go",
    "content": "package a\n\nfunc <error>TestNoImportEmptySignature<caret></error> () {\n}\n\nfunc <error>TestNoImport</error> (t *testing.T) {\n}\n"
  },
  {
    "path": "testData/inspections/test-signatures/testWithReturnValue_test-after.go",
    "content": "package a\n\nimport . \"testing\"\n\nfunc TestA(t *T) {\n}\n"
  },
  {
    "path": "testData/inspections/test-signatures/testWithReturnValue_test.go",
    "content": "package a\n\nimport . \"testing\"\n\nfunc <error>TestA<caret></error> (t *T) int {\n}\n"
  },
  {
    "path": "testData/inspections/test-signatures/testWrongTestingAlias_test-after.go",
    "content": "package a\n\nimport t \"testing\"\nfunc TestSignature<caret>(t *t.T) {\n}\n"
  },
  {
    "path": "testData/inspections/test-signatures/testWrongTestingAlias_test.go",
    "content": "package a\n\nimport t \"testing\"\nfunc <error>TestSignature<caret></error> (t *testing.T) {\n}\n"
  },
  {
    "path": "testData/inspections/unused-label/deleteLabelFix-after.go",
    "content": "package main\n\nfunc _() {\n\tprintln(\"unused\")\n}"
  },
  {
    "path": "testData/inspections/unused-label/deleteLabelFix.go",
    "content": "package main\n\nfunc _() {\n<error descr=\"Unused label 'UnusedLabel'\">Un<caret>usedLabel</error>:\n    println(\"unused\")\n}"
  },
  {
    "path": "testData/inspections/unused-label/renameToBlankFix-after.go",
    "content": "package main\n\nfunc _() {\n_:\n    println(\"unused\")\n}"
  },
  {
    "path": "testData/inspections/unused-label/renameToBlankFix.go",
    "content": "package main\n\nfunc _() {\n<error descr=\"Unused label 'UnusedLabel'\">Unus<caret>edLabel</error>:\n    println(\"unused\")\n}"
  },
  {
    "path": "testData/inspections/unused-label/simple.go",
    "content": "package main\n\nfunc _() {\n<error descr=\"Unused label 'UnusedLabel'\">UnusedLabel</error>:\n    println(\"unused\")\nUsedLabel:\n    println(\"used\")\n    goto UsedLabel\n_:\n    println(\"blank\")\n}"
  },
  {
    "path": "testData/intentions/add-missing-body/simple-after.go",
    "content": "package main\n\nfunc _() int {\n\t<caret>\n}"
  },
  {
    "path": "testData/intentions/add-missing-body/simple.go",
    "content": "package main\n\nfunc _<caret>() int"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/anonymousField-after.go",
    "content": "package main\n\ntype S struct {\n\tstring\n}\n\nfunc main() {\n\ts := S{string: \"bar\"}\n\t_ = \"foo\"\n\tprint(s.string)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/anonymousField.go",
    "content": "package main\n\ntype S struct {\n\tstring\n}\n\nfunc main() {\n\ts := S{}\n\t_, s.string = \"foo\", \"bar\"<caret>\n\tprint(s.string)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/caretAtValue-after.go",
    "content": "package main\n\ntype S struct {\n\tfoo string\n}\n\nfunc main() {\n\tvar b string\n\ts := S{foo: \"bar\"}\n\tb = \"b\"\n\tprint(s.foo)\n\tprint(b)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/caretAtValue.go",
    "content": "package main\n\ntype S struct {\n\tfoo string\n}\n\nfunc main() {\n\tvar b string\n\ts := S{}\n\ts.foo, b = <caret>\"bar\", \"b\"\n\tprint(s.foo)\n\tprint(b)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/duplicateFields-after.go",
    "content": "package main\n\ntype S struct {\n\tfoo string\n\tbar string\n}\n\nfunc main() {\n\ts := S{bar: \"bar\"}\n\ts.foo, s.foo = \"foo\", \"bar1\"\n\tprint(s.foo)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/duplicateFields.go",
    "content": "package main\n\ntype S struct {\n\tfoo string\n\tbar string\n}\n\nfunc main() {\n\ts := S{}\n\ts.foo, s.foo<caret>, s.bar= \"foo\", \"bar1\", \"bar\"\n\tprint(s.foo)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/existingDeclaration.go",
    "content": "package main\n\ntype S struct {\n\tfoo string\n}\n\nfunc main() {\n\ts := S{foo: \"foo\"}\n\t<caret>s.foo = \"bar\"\n\tprint(s.foo)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/existingField-after.go",
    "content": "package main\n\ntype S struct {\n\tfoo string\n\tb string\n}\n\nfunc main() {\n\ts := S{b: \"a\", foo: \"bar\"}\n\n\tprint(s.foo)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/existingField.go",
    "content": "package main\n\ntype S struct {\n\tfoo string\n\tb string\n}\n\nfunc main() {\n\ts := S{b: \"a\"}\n\t<caret>s.foo = \"bar\"\n\tprint(s.foo)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/fieldExchange-after.go",
    "content": "package main\n\ntype S struct {\n\tfoo string\n}\n\nfunc main() {\n\tvar b, s S\n\ts, b.foo = S{foo: \"bar\"}, \"foo\"\n\n\tprint(s.foo)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/fieldExchange.go",
    "content": "package main\n\ntype S struct {\n\tfoo string\n}\n\nfunc main() {\n\tvar b, s S\n\ts, b.foo = S{}, \"foo\"\n\ts.foo <caret>= \"bar\"\n\tprint(s.foo)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/fieldExtractedFromParens-after.go",
    "content": "package main\n\ntype S struct {\n\tfoo string\n}\n\nfunc main() {\n\ts := S{foo: \"bar\"}\n\n\tprint(s.foo)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/fieldExtractedFromParens.go",
    "content": "package main\n\ntype S struct {\n\tfoo string\n}\n\nfunc main() {\n\ts := S{}\n\t(s.foo) <caret>= \"bar\"\n\tprint(s.foo)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/invalidAssignment-after.go",
    "content": "package main\n\ntype S struct {\n\tfoo string\n\tbar string\n}\n\nfunc str2() (string, string) {\n\treturn \"foo\", \"bar\"\n}\n\nfunc main() {\n\tvar a string\n\ts := S{foo: str2(), bar: \"bar\"}\n\n\tprint(s.foo)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/invalidAssignment.go",
    "content": "package main\n\ntype S struct {\n\tfoo string\n\tbar string\n}\n\nfunc str2() (string, string) {\n\treturn \"foo\", \"bar\"\n}\n\nfunc main() {\n\tvar a string\n\ts := S{}\n\ts.foo, s.bar<caret> = str2(), \"bar\"\n\tprint(s.foo)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/justAssignedFieldParens.go",
    "content": "package main\n\ntype S struct {\n\tfoo string\n\tbar string\n}\n\nfunc main() {\n\tvar s S\n\tvar str string\n\ts, (str) = S{}, \"bar\"\n\ts.foo, (s.bar)<caret> = \"foo\", ((str))\n\tprint(s.foo)\n\tprint(str)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/justAssignedVar-after.go",
    "content": "package main\n\ntype S struct {\n\tfoo string\n\tbar string\n}\n\nfunc main() {\n\tvar s S\n\tvar str string\n\ts, str = S{foo: \"foo\"}, \"bar\"\n\ts.bar = str\n\tprint(s.foo)\n\tprint(str)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/justAssignedVar.go",
    "content": "package main\n\ntype S struct {\n\tfoo string\n\tbar string\n}\n\nfunc main() {\n\tvar s S\n\tvar str string\n\ts, str = S{}, \"bar\"\n\ts.foo<caret>, s.bar = \"foo\", str\n\tprint(s.foo)\n\tprint(str)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/justAssignedVarBothParens.go",
    "content": "package main\n\ntype S struct {\n\tfoo string\n\tbar string\n}\n\nfunc main() {\n\tvar s S\n\tvar str string\n\ts, (str) = S{}, \"bar\"\n\ts.foo, s.bar<caret> = \"foo\", ((str))\n\tprint(s.foo)\n\tprint(str)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/justAssignedVarWrongCaret.go",
    "content": "package main\n\ntype S struct {\n\tfoo string\n\tbar string\n}\n\nfunc main() {\n\tvar s S\n\tvar str string\n\ts, str = S{}, \"bar\"\n\ts.foo, s.bar<caret> = \"foo\", str\n\tprint(s.foo)\n\tprint(str)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/justAssignedVarWrongCaretWithParens.go",
    "content": "package main\n\ntype S struct {\n\tfoo string\n\tbar string\n}\n\nfunc main() {\n\tvar s S\n\tvar str string\n\ts, str = S{}, \"bar\"\n\ts.foo, s.bar<caret> = \"foo\", ((str))\n\tprint(s.foo)\n\tprint(str)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/justInitializedVar-after.go",
    "content": "package main\n\ntype S struct {\n\tfoo string\n\tbar string\n}\n\nfunc main() {\n\ts, str := S{foo: \"foo\"}, \"bar\"\n\ts.bar = str\n\tprint(s.foo)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/justInitializedVar.go",
    "content": "package main\n\ntype S struct {\n\tfoo string\n\tbar string\n}\n\nfunc main() {\n\ts, str := S{}, \"bar\"\n\ts.foo<caret>, s.bar = \"foo\", str\n\tprint(s.foo)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/justInitializedVarWrongCaret.go",
    "content": "package main\n\ntype S struct {\n\tfoo string\n\tbar string\n}\n\n\nfunc main() {\n\ts, str := S{}, \"bar\"\n\ts.foo, s.bar<caret> = \"foo\", str\n\tprint(s.foo)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/multiReturnFunction.go",
    "content": "package main\n\ntype S struct {\n\tfoo int\n\tbar int\n}\n\nfunc int2() (int, int) {\n\treturn 1, 2\n}\n\nfunc main() {\n\ts := S{}\n\t<caret>s.foo, s.bar= int2()\n\tprint(s.foo)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/multipleAssignmentsLeftmost-after.go",
    "content": "package main\n\ntype S struct {\n\tfoo string\n}\n\nfunc main() {\n\tvar b, a string\n\ts := S{foo: \"bar\"}\n\tb, a = \"b\", \"a\"\n\tprint(s.foo)\n\tprint(b)\n\tprint(a)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/multipleAssignmentsLeftmost.go",
    "content": "package main\n\ntype S struct {\n\tfoo string\n}\n\nfunc main() {\n\tvar b, a string\n\ts := S{}\n\t<caret>s.foo, b, a = \"bar\", \"b\", \"a\"\n\tprint(s.foo)\n\tprint(b)\n\tprint(a)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/multipleAssignmentsMiddle-after.go",
    "content": "package main\n\ntype S struct {\n\tfoo string\n}\n\nfunc main() {\n\tvar b, a string\n\ts := S{foo: \"bar\"}\n\ta, b = \"a\", \"c\"\n\tprint(s.foo)\n\tprint(b)\n\tprint(a)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/multipleAssignmentsMiddle.go",
    "content": "package main\n\ntype S struct {\n\tfoo string\n}\n\nfunc main() {\n\tvar b, a string\n\ts := S{}\n\ta, <caret>s.foo, b = \"a\", \"bar\", \"c\"\n\tprint(s.foo)\n\tprint(b)\n\tprint(a)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/multipleAssignmentsRightmost-after.go",
    "content": "package main\n\ntype S struct {\n\tfoo string\n}\n\nfunc main() {\n\tvar b, a string\n\ts := S{foo: \"bar\"}\n\ta, b = \"a\", \"b\"\n\tprint(s.foo)\n\tprint(b)\n\tprint(a)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/multipleAssignmentsRightmost.go",
    "content": "package main\n\ntype S struct {\n\tfoo string\n}\n\nfunc main() {\n\tvar b, a string\n\ts := S{}\n\ta, b, <caret>s.foo = \"a\", \"b\", \"bar\"\n\tprint(s.foo)\n\tprint(b)\n\tprint(a)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/multipleFields-after.go",
    "content": "package main\n\ntype S struct {\n\tfoo string\n\tbar string\n}\n\ntype B struct {\n\tx int\n}\n\nfunc main() {\n\ts, b := S{foo: \"foo\", bar: \"bar\"}, B{}\n\tb.x = 3\n\tprint(s.foo)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/multipleFields.go",
    "content": "package main\n\ntype S struct {\n\tfoo string\n\tbar string\n}\n\ntype B struct {\n\tx int\n}\n\nfunc main() {\n\ts, b := S{}, B{}\n\ts.foo, b.x, s.bar<caret>= \"foo\", 3, \"bar\"\n\tprint(s.foo)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/multipleFieldsPartlyAssigned-after.go",
    "content": "package main\n\ntype S struct {\n\tfoo string\n\tbar string\n}\n\nfunc main() {\n\ts := S{foo: \"oof\", bar: \"bar\"}\n\ts.foo = \"foo\"\n\tprint(s.foo)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/multipleFieldsPartlyAssigned.go",
    "content": "package main\n\ntype S struct {\n\tfoo string\n\tbar string\n}\n\nfunc main() {\n\ts := S{foo: \"oof\"}\n\ts.foo, s.bar = \"foo\", \"bar\"<caret>\n\tprint(s.foo)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/multipleFieldsSameStructureCaretAtValue-after.go",
    "content": "package main\n\ntype S struct {\n\tfoo string\n\tbar string\n}\n\nfunc main() {\n\tvar a int\n\ts := S{foo: \"foo\", bar: \"bar\"}\n\ta = 3\n\tprint(s.foo)\n\tprint(a)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/multipleFieldsSameStructureCaretAtValue.go",
    "content": "package main\n\ntype S struct {\n\tfoo string\n\tbar string\n}\n\nfunc main() {\n\tvar a int\n\ts := S{}\n\ts.foo, a, s.bar = \"foo\", 3, \"bar\"<caret>\n\tprint(s.foo)\n\tprint(a)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/notExistingField.go",
    "content": "package main\n\ntype S struct {\n\tfoo string\n}\n\nfunc main() {\n\ts := S{}\n\t<caret>s.x = \"bar\"\n\tprint(s.foo)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/oneLineFieldDeclaration-after.go",
    "content": "package main\n\ntype S struct {\n\tbar, foo string\n}\n\nfunc main() {\n\ts := S{foo: \"bar\"}\n\n\tprint(s.foo)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/oneLineFieldDeclaration.go",
    "content": "package main\n\ntype S struct {\n\tbar, foo string\n}\n\nfunc main() {\n\ts := S{}\n\ts.foo <caret>= \"bar\"\n\tprint(s.foo)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/simple-after.go",
    "content": "package main\n\ntype S struct {\n\tfoo string\n}\n\nfunc main() {\n\ts := S{foo: \"bar\"}\n\n\tprint(s.foo)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/simple.go",
    "content": "package main\n\ntype S struct {\n\tfoo string\n}\n\nfunc main() {\n\ts := S{}\n\ts.foo <caret>= \"bar\"\n\tprint(s.foo)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/structAssignment-after.go",
    "content": "package main\n\ntype S struct {\n\tfoo string\n}\n\nfunc main() {\n\tvar s S\n\ts = S{foo: \"bar\"}\n\n\tprint(s.foo)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/structAssignment.go",
    "content": "package main\n\ntype S struct {\n\tfoo string\n}\n\nfunc main() {\n\tvar s S\n\ts = S{}\n\ts.foo <caret>= \"bar\"\n\tprint(s.foo)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/structAssignmentMultipleAssignee-after.go",
    "content": "package main\n\ntype S struct {\n\tfoo string\n}\n\nfunc main() {\n\tvar s S\n\tvar a, b string\n\ta, s, b = \"a\", S{foo: \"bar\"}, \"b\"\n\n\tprint(s.foo)\n\tprint(a)\n\tprint(b)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/structAssignmentMultipleAssignee.go",
    "content": "package main\n\ntype S struct {\n\tfoo string\n}\n\nfunc main() {\n\tvar s S\n\tvar a, b string\n\ta, s, b = \"a\", S{}, \"b\"\n\ts.foo <caret>= \"bar\"\n\tprint(s.foo)\n\tprint(a)\n\tprint(b)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/twoSameStructures-after.go",
    "content": "package main\n\ntype S struct {\n\tfoo string\n}\n\nfunc main() {\n\ts, b := S{}, S{foo: \"foo\"}\n\ts.foo = \"bar\"\n\tprint(s.foo)\n\tprint(b.foo)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/twoSameStructures.go",
    "content": "package main\n\ntype S struct {\n\tfoo string\n}\n\nfunc main() {\n\ts, b := S{}, S{}\n\ts.foo, b.foo<caret> = \"bar\", \"foo\"\n\tprint(s.foo)\n\tprint(b.foo)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/twoSameStructuresAssignment-after.go",
    "content": "package main\n\ntype S struct {\n\tfoo string\n}\n\nfunc main() {\n\tvar s, b S\n\ts, b = S{}, S{foo: \"foo\"}\n\ts.foo = \"bar\"\n\tprint(s.foo)\n\tprint(b.foo)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/twoSameStructuresAssignment.go",
    "content": "package main\n\ntype S struct {\n\tfoo string\n}\n\nfunc main() {\n\tvar s, b S\n\ts, b = S{}, S{}\n\ts.foo, b.foo<caret> = \"bar\", \"foo\"\n\tprint(s.foo)\n\tprint(b.foo)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/withParens-after.go",
    "content": "package main\n\ntype S struct {\n\tstring\n}\n\nfunc main() {\n\ts := S{string: \"bar\"}\n\t(_) = \"foo\"\n\tprint(s.string)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/withParens.go",
    "content": "package main\n\ntype S struct {\n\tstring\n}\n\nfunc main() {\n\ts := S{}\n\t(_), ((s.string)) = \"foo\", \"bar\"<caret>\n\tprint(s.string)\n}"
  },
  {
    "path": "testData/intentions/move-to-struct-initialization/wrongStruct.go",
    "content": "package main\n\ntype S struct {\n\tfoo string\n}\n\ntype B struct {\n\tbar string\n}\n\nfunc main() {\n\tvar s S\n\tb := B{}\n\ts.foo <caret>= \"bar\"\n\tprint(b.foo)\n}"
  },
  {
    "path": "testData/lexer/basicTypes.go",
    "content": "var (\n    ToBe   bool       = false\n    MaxInt uint64     = 1<<64 - 1\n    z      complex128 = cmplx.Sqrt(-5 + 12i)\n)"
  },
  {
    "path": "testData/lexer/basicTypes.txt",
    "content": "var ('var')\nGO_WHITESPACE (' ')\n( ('(')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nidentifier ('ToBe')\nGO_WHITESPACE ('   ')\nidentifier ('bool')\nGO_WHITESPACE ('       ')\n= ('=')\nGO_WHITESPACE (' ')\nidentifier ('false')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nidentifier ('MaxInt')\nGO_WHITESPACE (' ')\nidentifier ('uint64')\nGO_WHITESPACE ('     ')\n= ('=')\nGO_WHITESPACE (' ')\nint ('1')\n<< ('<<')\nint ('64')\nGO_WHITESPACE (' ')\n- ('-')\nGO_WHITESPACE (' ')\nint ('1')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nidentifier ('z')\nGO_WHITESPACE ('      ')\nidentifier ('complex128')\nGO_WHITESPACE (' ')\n= ('=')\nGO_WHITESPACE (' ')\nidentifier ('cmplx')\n. ('.')\nidentifier ('Sqrt')\n( ('(')\n- ('-')\nint ('5')\nGO_WHITESPACE (' ')\n+ ('+')\nGO_WHITESPACE (' ')\ndecimali ('12i')\n) (')')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\n) (')')\n"
  },
  {
    "path": "testData/lexer/constants.go",
    "content": "const Pi = 3.14\n\nconst (\n    Big   = 1 << 100\n    Small = Big >> 99\n)"
  },
  {
    "path": "testData/lexer/constants.txt",
    "content": "const ('const')\nGO_WHITESPACE (' ')\nidentifier ('Pi')\nGO_WHITESPACE (' ')\n= ('=')\nGO_WHITESPACE (' ')\nfloat ('3.14')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n\\n')\nconst ('const')\nGO_WHITESPACE (' ')\n( ('(')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nidentifier ('Big')\nGO_WHITESPACE ('   ')\n= ('=')\nGO_WHITESPACE (' ')\nint ('1')\nGO_WHITESPACE (' ')\n<< ('<<')\nGO_WHITESPACE (' ')\nint ('100')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nidentifier ('Small')\nGO_WHITESPACE (' ')\n= ('=')\nGO_WHITESPACE (' ')\nidentifier ('Big')\nGO_WHITESPACE (' ')\n>> ('>>')\nGO_WHITESPACE (' ')\nint ('99')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\n) (')')\n"
  },
  {
    "path": "testData/lexer/couldNotMatch.go",
    "content": "// errorcheck\n\n// Copyright 2012 The Go Authors.  All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage p\n\nconst (\n\t_ = iota\n\t_\u0007 // ERROR \"illegal character|invalid character\"\n\t_\b  // ERROR \"illegal character|invalid character\"\n\t_\u000b  // ERROR \"illegal character|invalid character\"\n\t_\f  // ERROR \"illegal character|invalid character\"\n)\n"
  },
  {
    "path": "testData/lexer/couldNotMatch.txt",
    "content": "GO_LINE_COMMENT ('// errorcheck')\nGO_WS_NEW_LINES ('\\n\\n')\nGO_LINE_COMMENT ('// Copyright 2012 The Go Authors.  All rights reserved.')\nGO_WS_NEW_LINES ('\\n')\nGO_LINE_COMMENT ('// Use of this source code is governed by a BSD-style')\nGO_WS_NEW_LINES ('\\n')\nGO_LINE_COMMENT ('// license that can be found in the LICENSE file.')\nGO_WS_NEW_LINES ('\\n\\n')\npackage ('package')\nGO_WHITESPACE (' ')\nidentifier ('p')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n\\n')\nconst ('const')\nGO_WHITESPACE (' ')\n( ('(')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('\t')\nidentifier ('_')\nGO_WHITESPACE (' ')\n= ('=')\nGO_WHITESPACE (' ')\nidentifier ('iota')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('\t')\nidentifier ('_')\nBAD_CHARACTER ('\u0007')\nGO_WHITESPACE (' ')\nGO_LINE_COMMENT ('// ERROR \"illegal character|invalid character\"')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('\t')\nidentifier ('_')\nBAD_CHARACTER ('\b')\nGO_WHITESPACE ('  ')\nGO_LINE_COMMENT ('// ERROR \"illegal character|invalid character\"')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('\t')\nidentifier ('_')\n<NL> ('')\nGO_WS_NEW_LINES ('\u000b')\nGO_WHITESPACE ('  ')\nGO_LINE_COMMENT ('// ERROR \"illegal character|invalid character\"')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('\t')\nidentifier ('_')\nGO_WHITESPACE ('\f  ')\nGO_LINE_COMMENT ('// ERROR \"illegal character|invalid character\"')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\n) (')')"
  },
  {
    "path": "testData/lexer/escapedQuote.go",
    "content": "package newmath\n\nimport \"testing\"\n\nconst c = '\\a'\nconst c = '\\\\'\nconst c = '\\'\nconst c = '\\\nconst c = '\nconst c = '\\n\nconst c = 'n\nconst c = \"\\n\nconst c = \"\\\nconst c = \"\\n\nconst c = \"n\nconst c = \"\n\n'a'\n'ä'\n'本'\n'\\t'\n'\\000'\n'\\007'\n'\\377'\n'\\x07'\n'\\xff'\n'\\u12e4'\n'\\U00101234'\n\n'\\''         // rune literal containing single quote character\n'aa'         // illegal: too many characters\n'\\xa'        // illegal: too few hexadecimal digits\n'\\0'         // illegal: too few octal digits\n'\\uDFFF'     // illegal: surrogate half\n'\\U00110000' // illegal: invalid Unicode code point"
  },
  {
    "path": "testData/lexer/escapedQuote.txt",
    "content": "package ('package')\nGO_WHITESPACE (' ')\nidentifier ('newmath')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n\\n')\nimport ('import')\nGO_WHITESPACE (' ')\nstring ('\"testing\"')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n\\n')\nconst ('const')\nGO_WHITESPACE (' ')\nidentifier ('c')\nGO_WHITESPACE (' ')\n= ('=')\nGO_WHITESPACE (' ')\nchar (''\\a'')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nconst ('const')\nGO_WHITESPACE (' ')\nidentifier ('c')\nGO_WHITESPACE (' ')\n= ('=')\nGO_WHITESPACE (' ')\nchar (''\\\\'')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nconst ('const')\nGO_WHITESPACE (' ')\nidentifier ('c')\nGO_WHITESPACE (' ')\n= ('=')\nGO_WHITESPACE (' ')\nBAD_CHARACTER (''\\'')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nconst ('const')\nGO_WHITESPACE (' ')\nidentifier ('c')\nGO_WHITESPACE (' ')\n= ('=')\nGO_WHITESPACE (' ')\nBAD_CHARACTER (''')\nBAD_CHARACTER ('\\')\nGO_WS_NEW_LINES ('\\n')\nconst ('const')\nGO_WHITESPACE (' ')\nidentifier ('c')\nGO_WHITESPACE (' ')\n= ('=')\nGO_WHITESPACE (' ')\nchar (''\\n')\nconst ('const')\nGO_WHITESPACE (' ')\nidentifier ('c')\nGO_WHITESPACE (' ')\n= ('=')\nGO_WHITESPACE (' ')\nchar (''\\n')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nconst ('const')\nGO_WHITESPACE (' ')\nidentifier ('c')\nGO_WHITESPACE (' ')\n= ('=')\nGO_WHITESPACE (' ')\nchar (''n')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nconst ('const')\nGO_WHITESPACE (' ')\nidentifier ('c')\nGO_WHITESPACE (' ')\n= ('=')\nGO_WHITESPACE (' ')\nstring ('\"\\n')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nconst ('const')\nGO_WHITESPACE (' ')\nidentifier ('c')\nGO_WHITESPACE (' ')\n= ('=')\nGO_WHITESPACE (' ')\nstring ('\"')\nBAD_CHARACTER ('\\')\nGO_WS_NEW_LINES ('\\n')\nconst ('const')\nGO_WHITESPACE (' ')\nidentifier ('c')\nGO_WHITESPACE (' ')\n= ('=')\nGO_WHITESPACE (' ')\nstring ('\"\\n')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nconst ('const')\nGO_WHITESPACE (' ')\nidentifier ('c')\nGO_WHITESPACE (' ')\n= ('=')\nGO_WHITESPACE (' ')\nstring ('\"n')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nconst ('const')\nGO_WHITESPACE (' ')\nidentifier ('c')\nGO_WHITESPACE (' ')\n= ('=')\nGO_WHITESPACE (' ')\nstring ('\"')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n\\n')\nchar (''a'')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nchar (''ä'')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nchar (''本'')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nchar (''\\t'')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nchar (''\\000'')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nchar (''\\007'')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nchar (''\\377'')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nchar (''\\x07'')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nchar (''\\xff'')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nchar (''\\u12e4'')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nchar (''\\U00101234'')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n\\n')\nchar (''\\''')\nGO_WHITESPACE ('         ')\nGO_LINE_COMMENT ('// rune literal containing single quote character')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nchar (''a')\nidentifier ('a')\nchar ('' ')\nGO_WHITESPACE ('        ')\nGO_LINE_COMMENT ('// illegal: too many characters')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nBAD_CHARACTER (''')\nBAD_CHARACTER ('\\')\nidentifier ('xa')\nchar ('' ')\nGO_WHITESPACE ('       ')\nGO_LINE_COMMENT ('// illegal: too few hexadecimal digits')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nBAD_CHARACTER (''')\nBAD_CHARACTER ('\\')\nint ('0')\nchar ('' ')\nGO_WHITESPACE ('        ')\nGO_LINE_COMMENT ('// illegal: too few octal digits')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nchar (''\\uDFFF'')\nGO_WHITESPACE ('     ')\nGO_LINE_COMMENT ('// illegal: surrogate half')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nchar (''\\U00110000'')\nGO_WHITESPACE (' ')\nGO_LINE_COMMENT ('// illegal: invalid Unicode code point')"
  },
  {
    "path": "testData/lexer/for.go",
    "content": "func main() {\n    sum := 0\n    for i := 0; i < 10; i++ {\n        sum += i\n    }\n    for ; sum < 1000; {\n        sum += sum\n    }\n    for sum < 1000 {\n        sum += sum\n    }\n    for {\n      fmt.Println(sum)\n      break\n    }\n}"
  },
  {
    "path": "testData/lexer/for.txt",
    "content": "func ('func')\nGO_WHITESPACE (' ')\nidentifier ('main')\n( ('(')\n) (')')\nGO_WHITESPACE (' ')\n{ ('{')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nidentifier ('sum')\nGO_WHITESPACE (' ')\n:= (':=')\nGO_WHITESPACE (' ')\nint ('0')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nfor ('for')\nGO_WHITESPACE (' ')\nidentifier ('i')\nGO_WHITESPACE (' ')\n:= (':=')\nGO_WHITESPACE (' ')\nint ('0')\n; (';')\nGO_WHITESPACE (' ')\nidentifier ('i')\nGO_WHITESPACE (' ')\n< ('<')\nGO_WHITESPACE (' ')\nint ('10')\n; (';')\nGO_WHITESPACE (' ')\nidentifier ('i')\n++ ('++')\nGO_WHITESPACE (' ')\n{ ('{')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('        ')\nidentifier ('sum')\nGO_WHITESPACE (' ')\n+= ('+=')\nGO_WHITESPACE (' ')\nidentifier ('i')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\n} ('}')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nfor ('for')\nGO_WHITESPACE (' ')\n; (';')\nGO_WHITESPACE (' ')\nidentifier ('sum')\nGO_WHITESPACE (' ')\n< ('<')\nGO_WHITESPACE (' ')\nint ('1000')\n; (';')\nGO_WHITESPACE (' ')\n{ ('{')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('        ')\nidentifier ('sum')\nGO_WHITESPACE (' ')\n+= ('+=')\nGO_WHITESPACE (' ')\nidentifier ('sum')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\n} ('}')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nfor ('for')\nGO_WHITESPACE (' ')\nidentifier ('sum')\nGO_WHITESPACE (' ')\n< ('<')\nGO_WHITESPACE (' ')\nint ('1000')\nGO_WHITESPACE (' ')\n{ ('{')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('        ')\nidentifier ('sum')\nGO_WHITESPACE (' ')\n+= ('+=')\nGO_WHITESPACE (' ')\nidentifier ('sum')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\n} ('}')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nfor ('for')\nGO_WHITESPACE (' ')\n{ ('{')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('      ')\nidentifier ('fmt')\n. ('.')\nidentifier ('Println')\n( ('(')\nidentifier ('sum')\n) (')')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('      ')\nbreak ('break')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\n} ('}')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\n} ('}')\n"
  },
  {
    "path": "testData/lexer/functionArguments.go",
    "content": "func add(x int, y int) int {\n    return x + y\n}\n\nfunc add(x, y int) int {\n    return x + y\n}\n"
  },
  {
    "path": "testData/lexer/functionArguments.txt",
    "content": "func ('func')\nGO_WHITESPACE (' ')\nidentifier ('add')\n( ('(')\nidentifier ('x')\nGO_WHITESPACE (' ')\nidentifier ('int')\n, (',')\nGO_WHITESPACE (' ')\nidentifier ('y')\nGO_WHITESPACE (' ')\nidentifier ('int')\n) (')')\nGO_WHITESPACE (' ')\nidentifier ('int')\nGO_WHITESPACE (' ')\n{ ('{')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nreturn ('return')\nGO_WHITESPACE (' ')\nidentifier ('x')\nGO_WHITESPACE (' ')\n+ ('+')\nGO_WHITESPACE (' ')\nidentifier ('y')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\n} ('}')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n\\n')\nfunc ('func')\nGO_WHITESPACE (' ')\nidentifier ('add')\n( ('(')\nidentifier ('x')\n, (',')\nGO_WHITESPACE (' ')\nidentifier ('y')\nGO_WHITESPACE (' ')\nidentifier ('int')\n) (')')\nGO_WHITESPACE (' ')\nidentifier ('int')\nGO_WHITESPACE (' ')\n{ ('{')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nreturn ('return')\nGO_WHITESPACE (' ')\nidentifier ('x')\nGO_WHITESPACE (' ')\n+ ('+')\nGO_WHITESPACE (' ')\nidentifier ('y')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\n} ('}')\n"
  },
  {
    "path": "testData/lexer/helloWorld.go",
    "content": "package main\n\nimport (\n    \"fmt\"\n    \"net\"\n    \"os\"\n    \"time\"\n)\n\nfunc main() {\n    fmt.Println(\"Welcome to the playground!\")\n\n    fmt.Println(\"The time is\", time.Now())\n\n    fmt.Println(\"And if you try to open a file:\")\n    fmt.Println(os.Open(\"filename\"))\n\n    fmt.Println(\"Or access the network:\")\n    fmt.Println(net.Dial(\"tcp\", \"google.com\"))\n}"
  },
  {
    "path": "testData/lexer/helloWorld.txt",
    "content": "package ('package')\nGO_WHITESPACE (' ')\nidentifier ('main')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n\\n')\nimport ('import')\nGO_WHITESPACE (' ')\n( ('(')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nstring ('\"fmt\"')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nstring ('\"net\"')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nstring ('\"os\"')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nstring ('\"time\"')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\n) (')')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n\\n')\nfunc ('func')\nGO_WHITESPACE (' ')\nidentifier ('main')\n( ('(')\n) (')')\nGO_WHITESPACE (' ')\n{ ('{')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nidentifier ('fmt')\n. ('.')\nidentifier ('Println')\n( ('(')\nstring ('\"Welcome to the playground!\"')\n) (')')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n\\n')\nGO_WHITESPACE ('    ')\nidentifier ('fmt')\n. ('.')\nidentifier ('Println')\n( ('(')\nstring ('\"The time is\"')\n, (',')\nGO_WHITESPACE (' ')\nidentifier ('time')\n. ('.')\nidentifier ('Now')\n( ('(')\n) (')')\n) (')')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n\\n')\nGO_WHITESPACE ('    ')\nidentifier ('fmt')\n. ('.')\nidentifier ('Println')\n( ('(')\nstring ('\"And if you try to open a file:\"')\n) (')')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nidentifier ('fmt')\n. ('.')\nidentifier ('Println')\n( ('(')\nidentifier ('os')\n. ('.')\nidentifier ('Open')\n( ('(')\nstring ('\"filename\"')\n) (')')\n) (')')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n\\n')\nGO_WHITESPACE ('    ')\nidentifier ('fmt')\n. ('.')\nidentifier ('Println')\n( ('(')\nstring ('\"Or access the network:\"')\n) (')')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nidentifier ('fmt')\n. ('.')\nidentifier ('Println')\n( ('(')\nidentifier ('net')\n. ('.')\nidentifier ('Dial')\n( ('(')\nstring ('\"tcp\"')\n, (',')\nGO_WHITESPACE (' ')\nstring ('\"google.com\"')\n) (')')\n) (')')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\n} ('}')\n"
  },
  {
    "path": "testData/lexer/if.go",
    "content": "func sqrt(x float64) string {\n    if x < 0 {\n        return sqrt(-x) + \"i\"\n    }\n    return fmt.Sprint(math.Sqrt(x))\n}\n\nfunc pow(x, n, lim float64) float64 {\n    if v := math.Pow(x, n); v < lim {\n        return v\n    }\n    return lim\n}\n\nfunc powElse(x, n, lim float64) float64 {\n    if v := math.Pow(x, n); v < lim {\n        return v\n    } else {\n        fmt.Printf(\"%g >= %g\\n\", v, lim)\n    }\n    // can't use v here, though\n    return lim\n}"
  },
  {
    "path": "testData/lexer/if.txt",
    "content": "func ('func')\nGO_WHITESPACE (' ')\nidentifier ('sqrt')\n( ('(')\nidentifier ('x')\nGO_WHITESPACE (' ')\nidentifier ('float64')\n) (')')\nGO_WHITESPACE (' ')\nidentifier ('string')\nGO_WHITESPACE (' ')\n{ ('{')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nif ('if')\nGO_WHITESPACE (' ')\nidentifier ('x')\nGO_WHITESPACE (' ')\n< ('<')\nGO_WHITESPACE (' ')\nint ('0')\nGO_WHITESPACE (' ')\n{ ('{')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('        ')\nreturn ('return')\nGO_WHITESPACE (' ')\nidentifier ('sqrt')\n( ('(')\n- ('-')\nidentifier ('x')\n) (')')\nGO_WHITESPACE (' ')\n+ ('+')\nGO_WHITESPACE (' ')\nstring ('\"i\"')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\n} ('}')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nreturn ('return')\nGO_WHITESPACE (' ')\nidentifier ('fmt')\n. ('.')\nidentifier ('Sprint')\n( ('(')\nidentifier ('math')\n. ('.')\nidentifier ('Sqrt')\n( ('(')\nidentifier ('x')\n) (')')\n) (')')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\n} ('}')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n\\n')\nfunc ('func')\nGO_WHITESPACE (' ')\nidentifier ('pow')\n( ('(')\nidentifier ('x')\n, (',')\nGO_WHITESPACE (' ')\nidentifier ('n')\n, (',')\nGO_WHITESPACE (' ')\nidentifier ('lim')\nGO_WHITESPACE (' ')\nidentifier ('float64')\n) (')')\nGO_WHITESPACE (' ')\nidentifier ('float64')\nGO_WHITESPACE (' ')\n{ ('{')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nif ('if')\nGO_WHITESPACE (' ')\nidentifier ('v')\nGO_WHITESPACE (' ')\n:= (':=')\nGO_WHITESPACE (' ')\nidentifier ('math')\n. ('.')\nidentifier ('Pow')\n( ('(')\nidentifier ('x')\n, (',')\nGO_WHITESPACE (' ')\nidentifier ('n')\n) (')')\n; (';')\nGO_WHITESPACE (' ')\nidentifier ('v')\nGO_WHITESPACE (' ')\n< ('<')\nGO_WHITESPACE (' ')\nidentifier ('lim')\nGO_WHITESPACE (' ')\n{ ('{')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('        ')\nreturn ('return')\nGO_WHITESPACE (' ')\nidentifier ('v')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\n} ('}')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nreturn ('return')\nGO_WHITESPACE (' ')\nidentifier ('lim')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\n} ('}')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n\\n')\nfunc ('func')\nGO_WHITESPACE (' ')\nidentifier ('powElse')\n( ('(')\nidentifier ('x')\n, (',')\nGO_WHITESPACE (' ')\nidentifier ('n')\n, (',')\nGO_WHITESPACE (' ')\nidentifier ('lim')\nGO_WHITESPACE (' ')\nidentifier ('float64')\n) (')')\nGO_WHITESPACE (' ')\nidentifier ('float64')\nGO_WHITESPACE (' ')\n{ ('{')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nif ('if')\nGO_WHITESPACE (' ')\nidentifier ('v')\nGO_WHITESPACE (' ')\n:= (':=')\nGO_WHITESPACE (' ')\nidentifier ('math')\n. ('.')\nidentifier ('Pow')\n( ('(')\nidentifier ('x')\n, (',')\nGO_WHITESPACE (' ')\nidentifier ('n')\n) (')')\n; (';')\nGO_WHITESPACE (' ')\nidentifier ('v')\nGO_WHITESPACE (' ')\n< ('<')\nGO_WHITESPACE (' ')\nidentifier ('lim')\nGO_WHITESPACE (' ')\n{ ('{')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('        ')\nreturn ('return')\nGO_WHITESPACE (' ')\nidentifier ('v')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\n} ('}')\nGO_WHITESPACE (' ')\nelse ('else')\nGO_WHITESPACE (' ')\n{ ('{')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('        ')\nidentifier ('fmt')\n. ('.')\nidentifier ('Printf')\n( ('(')\nstring ('\"%g >= %g\\n\"')\n, (',')\nGO_WHITESPACE (' ')\nidentifier ('v')\n, (',')\nGO_WHITESPACE (' ')\nidentifier ('lim')\n) (')')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\n} ('}')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nGO_LINE_COMMENT ('// can't use v here, though')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nreturn ('return')\nGO_WHITESPACE (' ')\nidentifier ('lim')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\n} ('}')\n"
  },
  {
    "path": "testData/lexer/imports.go",
    "content": "import (\n    \"fmt\"\n    \"math\"\n)\n\nimport \"fmt\" \nimport \"math\"\n"
  },
  {
    "path": "testData/lexer/imports.txt",
    "content": "import ('import')\nGO_WHITESPACE (' ')\n( ('(')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nstring ('\"fmt\"')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nstring ('\"math\"')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\n) (')')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n\\n')\nimport ('import')\nGO_WHITESPACE (' ')\nstring ('\"fmt\"')\nGO_WHITESPACE (' ')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nimport ('import')\nGO_WHITESPACE (' ')\nstring ('\"math\"')\n"
  },
  {
    "path": "testData/lexer/multipleResult.go",
    "content": "func swap(x, y string) (string, string) {\n    return y, x\n}\n\nfunc main() {\n    a, b := swap(\"hello\", \"world\")\n    fmt.Println(a, b)\n}"
  },
  {
    "path": "testData/lexer/multipleResult.txt",
    "content": "func ('func')\nGO_WHITESPACE (' ')\nidentifier ('swap')\n( ('(')\nidentifier ('x')\n, (',')\nGO_WHITESPACE (' ')\nidentifier ('y')\nGO_WHITESPACE (' ')\nidentifier ('string')\n) (')')\nGO_WHITESPACE (' ')\n( ('(')\nidentifier ('string')\n, (',')\nGO_WHITESPACE (' ')\nidentifier ('string')\n) (')')\nGO_WHITESPACE (' ')\n{ ('{')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nreturn ('return')\nGO_WHITESPACE (' ')\nidentifier ('y')\n, (',')\nGO_WHITESPACE (' ')\nidentifier ('x')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\n} ('}')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n\\n')\nfunc ('func')\nGO_WHITESPACE (' ')\nidentifier ('main')\n( ('(')\n) (')')\nGO_WHITESPACE (' ')\n{ ('{')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nidentifier ('a')\n, (',')\nGO_WHITESPACE (' ')\nidentifier ('b')\nGO_WHITESPACE (' ')\n:= (':=')\nGO_WHITESPACE (' ')\nidentifier ('swap')\n( ('(')\nstring ('\"hello\"')\n, (',')\nGO_WHITESPACE (' ')\nstring ('\"world\"')\n) (')')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nidentifier ('fmt')\n. ('.')\nidentifier ('Println')\n( ('(')\nidentifier ('a')\n, (',')\nGO_WHITESPACE (' ')\nidentifier ('b')\n) (')')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\n} ('}')\n"
  },
  {
    "path": "testData/lexer/namedResult.go",
    "content": "func split(sum int) (x, y int) {\n    x = sum * 4 / 9\n    y = sum - x\n    return\n}"
  },
  {
    "path": "testData/lexer/namedResult.txt",
    "content": "func ('func')\nGO_WHITESPACE (' ')\nidentifier ('split')\n( ('(')\nidentifier ('sum')\nGO_WHITESPACE (' ')\nidentifier ('int')\n) (')')\nGO_WHITESPACE (' ')\n( ('(')\nidentifier ('x')\n, (',')\nGO_WHITESPACE (' ')\nidentifier ('y')\nGO_WHITESPACE (' ')\nidentifier ('int')\n) (')')\nGO_WHITESPACE (' ')\n{ ('{')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nidentifier ('x')\nGO_WHITESPACE (' ')\n= ('=')\nGO_WHITESPACE (' ')\nidentifier ('sum')\nGO_WHITESPACE (' ')\n* ('*')\nGO_WHITESPACE (' ')\nint ('4')\nGO_WHITESPACE (' ')\n/ ('/')\nGO_WHITESPACE (' ')\nint ('9')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nidentifier ('y')\nGO_WHITESPACE (' ')\n= ('=')\nGO_WHITESPACE (' ')\nidentifier ('sum')\nGO_WHITESPACE (' ')\n- ('-')\nGO_WHITESPACE (' ')\nidentifier ('x')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nreturn ('return')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\n} ('}')\n"
  },
  {
    "path": "testData/lexer/pointers.go",
    "content": "func main() {\n    p := Vertex{1, 2}\n    q := &p\n    q.X = 1e9\n    fmt.Println(p)\n}"
  },
  {
    "path": "testData/lexer/pointers.txt",
    "content": "func ('func')\nGO_WHITESPACE (' ')\nidentifier ('main')\n( ('(')\n) (')')\nGO_WHITESPACE (' ')\n{ ('{')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nidentifier ('p')\nGO_WHITESPACE (' ')\n:= (':=')\nGO_WHITESPACE (' ')\nidentifier ('Vertex')\n{ ('{')\nint ('1')\n, (',')\nGO_WHITESPACE (' ')\nint ('2')\n} ('}')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nidentifier ('q')\nGO_WHITESPACE (' ')\n:= (':=')\nGO_WHITESPACE (' ')\n& ('&')\nidentifier ('p')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nidentifier ('q')\n. ('.')\nidentifier ('X')\nGO_WHITESPACE (' ')\n= ('=')\nGO_WHITESPACE (' ')\nfloat ('1e9')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nidentifier ('fmt')\n. ('.')\nidentifier ('Println')\n( ('(')\nidentifier ('p')\n) (')')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\n} ('}')\n"
  },
  {
    "path": "testData/lexer/rangeFor.go",
    "content": "package main\n\nimport \"fmt\"\n\nvar pow = []int{1, 2, 4, 8, 16, 32, 64, 128}\n\nfunc main() {\n    for i, v := range pow {\n        fmt.Printf(\"2**%d = %d\\n\", i, v)\n    }\n    for i := range pow {\n        pow[i] = 1 << uint(i)\n    }\n    for _, value := range pow {\n        fmt.Printf(\"%d\\n\", value)\n    }\n}"
  },
  {
    "path": "testData/lexer/rangeFor.txt",
    "content": "package ('package')\nGO_WHITESPACE (' ')\nidentifier ('main')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n\\n')\nimport ('import')\nGO_WHITESPACE (' ')\nstring ('\"fmt\"')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n\\n')\nvar ('var')\nGO_WHITESPACE (' ')\nidentifier ('pow')\nGO_WHITESPACE (' ')\n= ('=')\nGO_WHITESPACE (' ')\n[ ('[')\n] (']')\nidentifier ('int')\n{ ('{')\nint ('1')\n, (',')\nGO_WHITESPACE (' ')\nint ('2')\n, (',')\nGO_WHITESPACE (' ')\nint ('4')\n, (',')\nGO_WHITESPACE (' ')\nint ('8')\n, (',')\nGO_WHITESPACE (' ')\nint ('16')\n, (',')\nGO_WHITESPACE (' ')\nint ('32')\n, (',')\nGO_WHITESPACE (' ')\nint ('64')\n, (',')\nGO_WHITESPACE (' ')\nint ('128')\n} ('}')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n\\n')\nfunc ('func')\nGO_WHITESPACE (' ')\nidentifier ('main')\n( ('(')\n) (')')\nGO_WHITESPACE (' ')\n{ ('{')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nfor ('for')\nGO_WHITESPACE (' ')\nidentifier ('i')\n, (',')\nGO_WHITESPACE (' ')\nidentifier ('v')\nGO_WHITESPACE (' ')\n:= (':=')\nGO_WHITESPACE (' ')\nrange ('range')\nGO_WHITESPACE (' ')\nidentifier ('pow')\nGO_WHITESPACE (' ')\n{ ('{')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('        ')\nidentifier ('fmt')\n. ('.')\nidentifier ('Printf')\n( ('(')\nstring ('\"2**%d = %d\\n\"')\n, (',')\nGO_WHITESPACE (' ')\nidentifier ('i')\n, (',')\nGO_WHITESPACE (' ')\nidentifier ('v')\n) (')')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\n} ('}')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nfor ('for')\nGO_WHITESPACE (' ')\nidentifier ('i')\nGO_WHITESPACE (' ')\n:= (':=')\nGO_WHITESPACE (' ')\nrange ('range')\nGO_WHITESPACE (' ')\nidentifier ('pow')\nGO_WHITESPACE (' ')\n{ ('{')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('        ')\nidentifier ('pow')\n[ ('[')\nidentifier ('i')\n] (']')\nGO_WHITESPACE (' ')\n= ('=')\nGO_WHITESPACE (' ')\nint ('1')\nGO_WHITESPACE (' ')\n<< ('<<')\nGO_WHITESPACE (' ')\nidentifier ('uint')\n( ('(')\nidentifier ('i')\n) (')')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\n} ('}')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nfor ('for')\nGO_WHITESPACE (' ')\nidentifier ('_')\n, (',')\nGO_WHITESPACE (' ')\nidentifier ('value')\nGO_WHITESPACE (' ')\n:= (':=')\nGO_WHITESPACE (' ')\nrange ('range')\nGO_WHITESPACE (' ')\nidentifier ('pow')\nGO_WHITESPACE (' ')\n{ ('{')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('        ')\nidentifier ('fmt')\n. ('.')\nidentifier ('Printf')\n( ('(')\nstring ('\"%d\\n\"')\n, (',')\nGO_WHITESPACE (' ')\nidentifier ('value')\n) (')')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\n} ('}')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\n} ('}')\n"
  },
  {
    "path": "testData/lexer/slices.go",
    "content": "package main\n\nimport \"fmt\"\n\nfunc main() {\n    p := []int{2, 3, 5, 7, 11, 13}\n    fmt.Println(\"p ==\", p)\n\n    for i := 0; i < len(p); i++ {\n        fmt.Printf(\"p[%d] == %d\\n\",\n            i, p[i])\n    }\n    \n    fmt.Println(\"p[1:4] ==\", p[1:4])\n\n    // missing low index implies 0\n    fmt.Println(\"p[:3] ==\", p[:3])\n\n    // missing high index implies len(s)\n    fmt.Println(\"p[4:] ==\", p[4:])\n}"
  },
  {
    "path": "testData/lexer/slices.txt",
    "content": "package ('package')\nGO_WHITESPACE (' ')\nidentifier ('main')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n\\n')\nimport ('import')\nGO_WHITESPACE (' ')\nstring ('\"fmt\"')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n\\n')\nfunc ('func')\nGO_WHITESPACE (' ')\nidentifier ('main')\n( ('(')\n) (')')\nGO_WHITESPACE (' ')\n{ ('{')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nidentifier ('p')\nGO_WHITESPACE (' ')\n:= (':=')\nGO_WHITESPACE (' ')\n[ ('[')\n] (']')\nidentifier ('int')\n{ ('{')\nint ('2')\n, (',')\nGO_WHITESPACE (' ')\nint ('3')\n, (',')\nGO_WHITESPACE (' ')\nint ('5')\n, (',')\nGO_WHITESPACE (' ')\nint ('7')\n, (',')\nGO_WHITESPACE (' ')\nint ('11')\n, (',')\nGO_WHITESPACE (' ')\nint ('13')\n} ('}')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nidentifier ('fmt')\n. ('.')\nidentifier ('Println')\n( ('(')\nstring ('\"p ==\"')\n, (',')\nGO_WHITESPACE (' ')\nidentifier ('p')\n) (')')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n\\n')\nGO_WHITESPACE ('    ')\nfor ('for')\nGO_WHITESPACE (' ')\nidentifier ('i')\nGO_WHITESPACE (' ')\n:= (':=')\nGO_WHITESPACE (' ')\nint ('0')\n; (';')\nGO_WHITESPACE (' ')\nidentifier ('i')\nGO_WHITESPACE (' ')\n< ('<')\nGO_WHITESPACE (' ')\nidentifier ('len')\n( ('(')\nidentifier ('p')\n) (')')\n; (';')\nGO_WHITESPACE (' ')\nidentifier ('i')\n++ ('++')\nGO_WHITESPACE (' ')\n{ ('{')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('        ')\nidentifier ('fmt')\n. ('.')\nidentifier ('Printf')\n( ('(')\nstring ('\"p[%d] == %d\\n\"')\n, (',')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('            ')\nidentifier ('i')\n, (',')\nGO_WHITESPACE (' ')\nidentifier ('p')\n[ ('[')\nidentifier ('i')\n] (']')\n) (')')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\n} ('}')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nidentifier ('fmt')\n. ('.')\nidentifier ('Println')\n( ('(')\nstring ('\"p[1:4] ==\"')\n, (',')\nGO_WHITESPACE (' ')\nidentifier ('p')\n[ ('[')\nint ('1')\n: (':')\nint ('4')\n] (']')\n) (')')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n\\n')\nGO_WHITESPACE ('    ')\nGO_LINE_COMMENT ('// missing low index implies 0')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nidentifier ('fmt')\n. ('.')\nidentifier ('Println')\n( ('(')\nstring ('\"p[:3] ==\"')\n, (',')\nGO_WHITESPACE (' ')\nidentifier ('p')\n[ ('[')\n: (':')\nint ('3')\n] (']')\n) (')')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n\\n')\nGO_WHITESPACE ('    ')\nGO_LINE_COMMENT ('// missing high index implies len(s)')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nidentifier ('fmt')\n. ('.')\nidentifier ('Println')\n( ('(')\nstring ('\"p[4:] ==\"')\n, (',')\nGO_WHITESPACE (' ')\nidentifier ('p')\n[ ('[')\nint ('4')\n: (':')\n] (']')\n) (')')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\n} ('}')\n"
  },
  {
    "path": "testData/lexer/structs.go",
    "content": "type Vertex struct {\n    X int\n    Y int\n}\n\nfunc main() {\n    p := Vertex{1, 2}\n    q := &p\n    q.X = 1e9\n    fmt.Println(p)\n}"
  },
  {
    "path": "testData/lexer/structs.txt",
    "content": "type ('type')\nGO_WHITESPACE (' ')\nidentifier ('Vertex')\nGO_WHITESPACE (' ')\nstruct ('struct')\nGO_WHITESPACE (' ')\n{ ('{')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nidentifier ('X')\nGO_WHITESPACE (' ')\nidentifier ('int')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nidentifier ('Y')\nGO_WHITESPACE (' ')\nidentifier ('int')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\n} ('}')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n\\n')\nfunc ('func')\nGO_WHITESPACE (' ')\nidentifier ('main')\n( ('(')\n) (')')\nGO_WHITESPACE (' ')\n{ ('{')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nidentifier ('p')\nGO_WHITESPACE (' ')\n:= (':=')\nGO_WHITESPACE (' ')\nidentifier ('Vertex')\n{ ('{')\nint ('1')\n, (',')\nGO_WHITESPACE (' ')\nint ('2')\n} ('}')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nidentifier ('q')\nGO_WHITESPACE (' ')\n:= (':=')\nGO_WHITESPACE (' ')\n& ('&')\nidentifier ('p')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nidentifier ('q')\n. ('.')\nidentifier ('X')\nGO_WHITESPACE (' ')\n= ('=')\nGO_WHITESPACE (' ')\nfloat ('1e9')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nidentifier ('fmt')\n. ('.')\nidentifier ('Println')\n( ('(')\nidentifier ('p')\n) (')')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\n} ('}')\n"
  },
  {
    "path": "testData/lexer/utf16.go",
    "content": "𝓐"
  },
  {
    "path": "testData/lexer/utf16.txt",
    "content": "identifier ('𝓐')"
  },
  {
    "path": "testData/lexer/variables.go",
    "content": "var x, y, z int\nvar c, python, java bool\n\nvar x, y, z int = 1, 2, 3\nvar c, python, java = true, false, \"no!\"\n\nfunc main() {\n    c, python, java := true, false, \"no!\"\n}"
  },
  {
    "path": "testData/lexer/variables.txt",
    "content": "var ('var')\nGO_WHITESPACE (' ')\nidentifier ('x')\n, (',')\nGO_WHITESPACE (' ')\nidentifier ('y')\n, (',')\nGO_WHITESPACE (' ')\nidentifier ('z')\nGO_WHITESPACE (' ')\nidentifier ('int')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nvar ('var')\nGO_WHITESPACE (' ')\nidentifier ('c')\n, (',')\nGO_WHITESPACE (' ')\nidentifier ('python')\n, (',')\nGO_WHITESPACE (' ')\nidentifier ('java')\nGO_WHITESPACE (' ')\nidentifier ('bool')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n\\n')\nvar ('var')\nGO_WHITESPACE (' ')\nidentifier ('x')\n, (',')\nGO_WHITESPACE (' ')\nidentifier ('y')\n, (',')\nGO_WHITESPACE (' ')\nidentifier ('z')\nGO_WHITESPACE (' ')\nidentifier ('int')\nGO_WHITESPACE (' ')\n= ('=')\nGO_WHITESPACE (' ')\nint ('1')\n, (',')\nGO_WHITESPACE (' ')\nint ('2')\n, (',')\nGO_WHITESPACE (' ')\nint ('3')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\nvar ('var')\nGO_WHITESPACE (' ')\nidentifier ('c')\n, (',')\nGO_WHITESPACE (' ')\nidentifier ('python')\n, (',')\nGO_WHITESPACE (' ')\nidentifier ('java')\nGO_WHITESPACE (' ')\n= ('=')\nGO_WHITESPACE (' ')\nidentifier ('true')\n, (',')\nGO_WHITESPACE (' ')\nidentifier ('false')\n, (',')\nGO_WHITESPACE (' ')\nstring ('\"no!\"')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n\\n')\nfunc ('func')\nGO_WHITESPACE (' ')\nidentifier ('main')\n( ('(')\n) (')')\nGO_WHITESPACE (' ')\n{ ('{')\nGO_WS_NEW_LINES ('\\n')\nGO_WHITESPACE ('    ')\nidentifier ('c')\n, (',')\nGO_WHITESPACE (' ')\nidentifier ('python')\n, (',')\nGO_WHITESPACE (' ')\nidentifier ('java')\nGO_WHITESPACE (' ')\n:= (':=')\nGO_WHITESPACE (' ')\nidentifier ('true')\n, (',')\nGO_WHITESPACE (' ')\nidentifier ('false')\n, (',')\nGO_WHITESPACE (' ')\nstring ('\"no!\"')\n<NL> ('')\nGO_WS_NEW_LINES ('\\n')\n} ('}')\n"
  },
  {
    "path": "testData/marker/Go.go",
    "content": "package main\n\nfunc recv(value int, ch chan bool) {\n\tif value < 0 {\n\t\tch <- true\n\t\treturn\n\t}\n\tgo recv(value - 1, ch)<caret>\n}"
  },
  {
    "path": "testData/marker/Recursive.go",
    "content": "package main\n\nfunc Recursive(number int) int {\n\tif number == 1 {\n\t\treturn number\n\t}\n\treturn number + Recursive(number-1)<caret>\n}\n"
  },
  {
    "path": "testData/mockSdk-1.1.2/src/pkg/bufio/scan.go",
    "content": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage bufio\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n\t\"io\"\n\t\"unicode/utf8\"\n)\n\n// Scanner provides a convenient interface for reading data such as\n// a file of newline-delimited lines of text. Successive calls to\n// the Scan method will step through the 'tokens' of a file, skipping\n// the bytes between the tokens. The specification of a token is\n// defined by a split function of type SplitFunc; the default split\n// function breaks the input into lines with line termination stripped. Split\n// functions are defined in this package for scanning a file into\n// lines, bytes, UTF-8-encoded runes, and space-delimited words. The\n// client may instead provide a custom split function.\n//\n// Scanning stops unrecoverably at EOF, the first I/O error, or a token too\n// large to fit in the buffer. When a scan stops, the reader may have\n// advanced arbitrarily far past the last token. Programs that need more\n// control over error handling or large tokens, or must run sequential scans\n// on a reader, should use bufio.Reader instead.\n//\ntype Scanner struct {\n\tr            io.Reader // The reader provided by the client.\n\tsplit        SplitFunc // The function to split the tokens.\n\tmaxTokenSize int       // Maximum size of a token; modified by tests.\n\ttoken        []byte    // Last token returned by split.\n\tbuf          []byte    // Buffer used as argument to split.\n\tstart        int       // First non-processed byte in buf.\n\tend          int       // End of data in buf.\n\terr          error     // Sticky error.\n\tempties      int       // Count of successive empty tokens.\n}\n\n// SplitFunc is the signature of the split function used to tokenize the\n// input. The arguments are an initial substring of the remaining unprocessed\n// data and a flag, atEOF, that reports whether the Reader has no more data\n// to give. The return values are the number of bytes to advance the input\n// and the next token to return to the user, plus an error, if any. If the\n// data does not yet hold a complete token, for instance if it has no newline\n// while scanning lines, SplitFunc can return (0, nil, nil) to signal the\n// Scanner to read more data into the slice and try again with a longer slice\n// starting at the same point in the input.\n//\n// If the returned error is non-nil, scanning stops and the error\n// is returned to the client.\n//\n// The function is never called with an empty data slice unless atEOF\n// is true. If atEOF is true, however, data may be non-empty and,\n// as always, holds unprocessed text.\ntype SplitFunc func(data []byte, atEOF bool) (advance int, token []byte, err error)\n\n// Errors returned by Scanner.\nvar (\n\tErrTooLong         = errors.New(\"bufio.Scanner: token too long\")\n\tErrNegativeAdvance = errors.New(\"bufio.Scanner: SplitFunc returns negative advance count\")\n\tErrAdvanceTooFar   = errors.New(\"bufio.Scanner: SplitFunc returns advance count beyond input\")\n)\n\nconst (\n\t// MaxScanTokenSize is the maximum size used to buffer a token.\n\t// The actual maximum token size may be smaller as the buffer\n\t// may need to include, for instance, a newline.\n\tMaxScanTokenSize = 64 * 1024\n)\n\n// NewScanner returns a new Scanner to read from r.\n// The split function defaults to ScanLines.\nfunc NewScanner(r io.Reader) *Scanner {\n\treturn &Scanner{\n\t\tr:            r,\n\t\tsplit:        ScanLines,\n\t\tmaxTokenSize: MaxScanTokenSize,\n\t\tbuf:          make([]byte, 4096), // Plausible starting size; needn't be large.\n\t}\n}\n\n// Err returns the first non-EOF error that was encountered by the Scanner.\nfunc (s *Scanner) Err() error {\n\tif s.err == io.EOF {\n\t\treturn nil\n\t}\n\treturn s.err\n}\n\n// Bytes returns the most recent token generated by a call to Scan.\n// The underlying array may point to data that will be overwritten\n// by a subsequent call to Scan. It does no allocation.\nfunc (s *Scanner) Bytes() []byte {\n\treturn s.token\n}\n\n// Text returns the most recent token generated by a call to Scan\n// as a newly allocated string holding its bytes.\nfunc (s *Scanner) Text() string {\n\treturn string(s.token)\n}\n\n// Scan advances the Scanner to the next token, which will then be\n// available through the Bytes or Text method. It returns false when the\n// scan stops, either by reaching the end of the input or an error.\n// After Scan returns false, the Err method will return any error that\n// occurred during scanning, except that if it was io.EOF, Err\n// will return nil.\n// Scan panics if the split function returns 100 empty tokens without\n// advancing the input. This is a common error mode for scanners.\nfunc (s *Scanner) Scan() bool {\n\t// Loop until we have a token.\n\tfor {\n\t\t// See if we can get a token with what we already have.\n\t\t// If we've run out of data but have an error, give the split function\n\t\t// a chance to recover any remaining, possibly empty token.\n\t\tif s.end > s.start || s.err != nil {\n\t\t\tadvance, token, err := s.split(s.buf[s.start:s.end], s.err != nil)\n\t\t\tif err != nil {\n\t\t\t\ts.setErr(err)\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tif !s.advance(advance) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\ts.token = token\n\t\t\tif token != nil {\n\t\t\t\tif s.err == nil || advance > 0 {\n\t\t\t\t\ts.empties = 0\n\t\t\t\t} else {\n\t\t\t\t\t// Returning tokens not advancing input at EOF.\n\t\t\t\t\ts.empties++\n\t\t\t\t\tif s.empties > 100 {\n\t\t\t\t\t\tpanic(\"bufio.Scan: 100 empty tokens without progressing\")\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\t\t// We cannot generate a token with what we are holding.\n\t\t// If we've already hit EOF or an I/O error, we are done.\n\t\tif s.err != nil {\n\t\t\t// Shut it down.\n\t\t\ts.start = 0\n\t\t\ts.end = 0\n\t\t\treturn false\n\t\t}\n\t\t// Must read more data.\n\t\t// First, shift data to beginning of buffer if there's lots of empty space\n\t\t// or space is needed.\n\t\tif s.start > 0 && (s.end == len(s.buf) || s.start > len(s.buf)/2) {\n\t\t\tcopy(s.buf, s.buf[s.start:s.end])\n\t\t\ts.end -= s.start\n\t\t\ts.start = 0\n\t\t}\n\t\t// Is the buffer full? If so, resize.\n\t\tif s.end == len(s.buf) {\n\t\t\tif len(s.buf) >= s.maxTokenSize {\n\t\t\t\ts.setErr(ErrTooLong)\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tnewSize := len(s.buf) * 2\n\t\t\tif newSize > s.maxTokenSize {\n\t\t\t\tnewSize = s.maxTokenSize\n\t\t\t}\n\t\t\tnewBuf := make([]byte, newSize)\n\t\t\tcopy(newBuf, s.buf[s.start:s.end])\n\t\t\ts.buf = newBuf\n\t\t\ts.end -= s.start\n\t\t\ts.start = 0\n\t\t\tcontinue\n\t\t}\n\t\t// Finally we can read some input. Make sure we don't get stuck with\n\t\t// a misbehaving Reader. Officially we don't need to do this, but let's\n\t\t// be extra careful: Scanner is for safe, simple jobs.\n\t\tfor loop := 0; ; {\n\t\t\tn, err := s.r.Read(s.buf[s.end:len(s.buf)])\n\t\t\ts.end += n\n\t\t\tif err != nil {\n\t\t\t\ts.setErr(err)\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tif n > 0 {\n\t\t\t\ts.empties = 0\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tloop++\n\t\t\tif loop > maxConsecutiveEmptyReads {\n\t\t\t\ts.setErr(io.ErrNoProgress)\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n}\n\n// advance consumes n bytes of the buffer. It reports whether the advance was legal.\nfunc (s *Scanner) advance(n int) bool {\n\tif n < 0 {\n\t\ts.setErr(ErrNegativeAdvance)\n\t\treturn false\n\t}\n\tif n > s.end-s.start {\n\t\ts.setErr(ErrAdvanceTooFar)\n\t\treturn false\n\t}\n\ts.start += n\n\treturn true\n}\n\n// setErr records the first error encountered.\nfunc (s *Scanner) setErr(err error) {\n\tif s.err == nil || s.err == io.EOF {\n\t\ts.err = err\n\t}\n}\n\n// Split sets the split function for the Scanner. If called, it must be\n// called before Scan. The default split function is ScanLines.\nfunc (s *Scanner) Split(split SplitFunc) {\n\ts.split = split\n}\n\n// Split functions\n\n// ScanBytes is a split function for a Scanner that returns each byte as a token.\nfunc ScanBytes(data []byte, atEOF bool) (advance int, token []byte, err error) {\n\tif atEOF && len(data) == 0 {\n\t\treturn 0, nil, nil\n\t}\n\treturn 1, data[0:1], nil\n}\n\nvar errorRune = []byte(string(utf8.RuneError))\n\n// ScanRunes is a split function for a Scanner that returns each\n// UTF-8-encoded rune as a token. The sequence of runes returned is\n// equivalent to that from a range loop over the input as a string, which\n// means that erroneous UTF-8 encodings translate to U+FFFD = \"\\xef\\xbf\\xbd\".\n// Because of the Scan interface, this makes it impossible for the client to\n// distinguish correctly encoded replacement runes from encoding errors.\nfunc ScanRunes(data []byte, atEOF bool) (advance int, token []byte, err error) {\n\tif atEOF && len(data) == 0 {\n\t\treturn 0, nil, nil\n\t}\n\n\t// Fast path 1: ASCII.\n\tif data[0] < utf8.RuneSelf {\n\t\treturn 1, data[0:1], nil\n\t}\n\n\t// Fast path 2: Correct UTF-8 decode without error.\n\t_, width := utf8.DecodeRune(data)\n\tif width > 1 {\n\t\t// It's a valid encoding. Width cannot be one for a correctly encoded\n\t\t// non-ASCII rune.\n\t\treturn width, data[0:width], nil\n\t}\n\n\t// We know it's an error: we have width==1 and implicitly r==utf8.RuneError.\n\t// Is the error because there wasn't a full rune to be decoded?\n\t// FullRune distinguishes correctly between erroneous and incomplete encodings.\n\tif !atEOF && !utf8.FullRune(data) {\n\t\t// Incomplete; get more bytes.\n\t\treturn 0, nil, nil\n\t}\n\n\t// We have a real UTF-8 encoding error. Return a properly encoded error rune\n\t// but advance only one byte. This matches the behavior of a range loop over\n\t// an incorrectly encoded string.\n\treturn 1, errorRune, nil\n}\n\n// dropCR drops a terminal \\r from the data.\nfunc dropCR(data []byte) []byte {\n\tif len(data) > 0 && data[len(data)-1] == '\\r' {\n\t\treturn data[0 : len(data)-1]\n\t}\n\treturn data\n}\n\n// ScanLines is a split function for a Scanner that returns each line of\n// text, stripped of any trailing end-of-line marker. The returned line may\n// be empty. The end-of-line marker is one optional carriage return followed\n// by one mandatory newline. In regular expression notation, it is `\\r?\\n`.\n// The last non-empty line of input will be returned even if it has no\n// newline.\nfunc ScanLines(data []byte, atEOF bool) (advance int, token []byte, err error) {\n\tif atEOF && len(data) == 0 {\n\t\treturn 0, nil, nil\n\t}\n\tif i := bytes.IndexByte(data, '\\n'); i >= 0 {\n\t\t// We have a full newline-terminated line.\n\t\treturn i + 1, dropCR(data[0:i]), nil\n\t}\n\t// If we're at EOF, we have a final, non-terminated line. Return it.\n\tif atEOF {\n\t\treturn len(data), dropCR(data), nil\n\t}\n\t// Request more data.\n\treturn 0, nil, nil\n}\n\n// isSpace reports whether the character is a Unicode white space character.\n// We avoid dependency on the unicode package, but check validity of the implementation\n// in the tests.\nfunc isSpace(r rune) bool {\n\tif r <= '\\u00FF' {\n\t\t// Obvious ASCII ones: \\t through \\r plus space. Plus two Latin-1 oddballs.\n\t\tswitch r {\n\t\tcase ' ', '\\t', '\\n', '\\v', '\\f', '\\r':\n\t\t\treturn true\n\t\tcase '\\u0085', '\\u00A0':\n\t\t\treturn true\n\t\t}\n\t\treturn false\n\t}\n\t// High-valued ones.\n\tif '\\u2000' <= r && r <= '\\u200a' {\n\t\treturn true\n\t}\n\tswitch r {\n\tcase '\\u1680', '\\u2028', '\\u2029', '\\u202f', '\\u205f', '\\u3000':\n\t\treturn true\n\t}\n\treturn false\n}\n\n// ScanWords is a split function for a Scanner that returns each\n// space-separated word of text, with surrounding spaces deleted. It will\n// never return an empty string. The definition of space is set by\n// unicode.IsSpace.\nfunc ScanWords(data []byte, atEOF bool) (advance int, token []byte, err error) {\n\t// Skip leading spaces.\n\tstart := 0\n\tfor width := 0; start < len(data); start += width {\n\t\tvar r rune\n\t\tr, width = utf8.DecodeRune(data[start:])\n\t\tif !isSpace(r) {\n\t\t\tbreak\n\t\t}\n\t}\n\t// Scan until space, marking end of word.\n\tfor width, i := 0, start; i < len(data); i += width {\n\t\tvar r rune\n\t\tr, width = utf8.DecodeRune(data[i:])\n\t\tif isSpace(r) {\n\t\t\treturn i + width, data[start:i], nil\n\t\t}\n\t}\n\t// If we're at EOF, we have a final, non-empty, non-terminated word. Return it.\n\tif atEOF && len(data) > start {\n\t\treturn len(data), data[start:], nil\n\t}\n\t// Request more data.\n\treturn start, nil, nil\n}\n"
  },
  {
    "path": "testData/mockSdk-1.1.2/src/pkg/builtin/builtin.go",
    "content": "// Copyright 2011 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n/*\n\tPackage builtin provides documentation for Go's predeclared identifiers.\n\tThe items documented here are not actually in package builtin\n\tbut their descriptions here allow godoc to present documentation\n\tfor the language's special identifiers.\n*/\npackage builtin\n\n// bool is the set of boolean values, true and false.\ntype bool bool\n\n// true and false are the two untyped boolean values.\nconst (\n\ttrue  = 0 == 0 // Untyped bool.\n\tfalse = 0 != 0 // Untyped bool.\n)\n\n// uint8 is the set of all unsigned 8-bit integers.\n// Range: 0 through 255.\ntype uint8 uint8\n\n// uint16 is the set of all unsigned 16-bit integers.\n// Range: 0 through 65535.\ntype uint16 uint16\n\n// uint32 is the set of all unsigned 32-bit integers.\n// Range: 0 through 4294967295.\ntype uint32 uint32\n\n// uint64 is the set of all unsigned 64-bit integers.\n// Range: 0 through 18446744073709551615.\ntype uint64 uint64\n\n// int8 is the set of all signed 8-bit integers.\n// Range: -128 through 127.\ntype int8 int8\n\n// int16 is the set of all signed 16-bit integers.\n// Range: -32768 through 32767.\ntype int16 int16\n\n// int32 is the set of all signed 32-bit integers.\n// Range: -2147483648 through 2147483647.\ntype int32 int32\n\n// int64 is the set of all signed 64-bit integers.\n// Range: -9223372036854775808 through 9223372036854775807.\ntype int64 int64\n\n// float32 is the set of all IEEE-754 32-bit floating-point numbers.\ntype float32 float32\n\n// float64 is the set of all IEEE-754 64-bit floating-point numbers.\ntype float64 float64\n\n// complex64 is the set of all complex numbers with float32 real and\n// imaginary parts.\ntype complex64 complex64\n\n// complex128 is the set of all complex numbers with float64 real and\n// imaginary parts.\ntype complex128 complex128\n\n// string is the set of all strings of 8-bit bytes, conventionally but not\n// necessarily representing UTF-8-encoded text. A string may be empty, but\n// not nil. Values of string type are immutable.\ntype string string\n\n// int is a signed integer type that is at least 32 bits in size. It is a\n// distinct type, however, and not an alias for, say, int32.\ntype int int\n\n// uint is an unsigned integer type that is at least 32 bits in size. It is a\n// distinct type, however, and not an alias for, say, uint32.\ntype uint uint\n\n// uintptr is an integer type that is large enough to hold the bit pattern of\n// any pointer.\ntype uintptr uintptr\n\n// byte is an alias for uint8 and is equivalent to uint8 in all ways. It is\n// used, by convention, to distinguish byte values from 8-bit unsigned\n// integer values.\ntype byte byte\n\n// rune is an alias for int32 and is equivalent to int32 in all ways. It is\n// used, by convention, to distinguish character values from integer values.\ntype rune rune\n\n// iota is a predeclared identifier representing the untyped integer ordinal\n// number of the current const specification in a (usually parenthesized)\n// const declaration. It is zero-indexed.\nconst iota = 0 // Untyped int.\n\n// nil is a predeclared identifier representing the zero value for a\n// pointer, channel, func, interface, map, or slice type.\nvar nil Type // Type must be a pointer, channel, func, interface, map, or slice type\n\n// Type is here for the purposes of documentation only. It is a stand-in\n// for any Go type, but represents the same type for any given function\n// invocation.\ntype Type int\n\n// Type1 is here for the purposes of documentation only. It is a stand-in\n// for any Go type, but represents the same type for any given function\n// invocation.\ntype Type1 int\n\n// IntegerType is here for the purposes of documentation only. It is a stand-in\n// for any integer type: int, uint, int8 etc.\ntype IntegerType int\n\n// FloatType is here for the purposes of documentation only. It is a stand-in\n// for either float type: float32 or float64.\ntype FloatType float32\n\n// ComplexType is here for the purposes of documentation only. It is a\n// stand-in for either complex type: complex64 or complex128.\ntype ComplexType complex64\n\n// The append built-in function appends elements to the end of a slice. If\n// it has sufficient capacity, the destination is resliced to accommodate the\n// new elements. If it does not, a new underlying array will be allocated.\n// Append returns the updated slice. It is therefore necessary to store the\n// result of append, often in the variable holding the slice itself:\n//\tslice = append(slice, elem1, elem2)\n//\tslice = append(slice, anotherSlice...)\n// As a special case, it is legal to append a string to a byte slice, like this:\n//\tslice = append([]byte(\"hello \"), \"world\"...)\nfunc append(slice []Type, elems ...Type) []Type\n\n// The copy built-in function copies elements from a source slice into a\n// destination slice. (As a special case, it also will copy bytes from a\n// string to a slice of bytes.) The source and destination may overlap. Copy\n// returns the number of elements copied, which will be the minimum of\n// len(src) and len(dst).\nfunc copy(dst, src []Type) int\n\n// The delete built-in function deletes the element with the specified key\n// (m[key]) from the map. If m is nil or there is no such element, delete\n// is a no-op.\nfunc delete(m map[Type]Type1, key Type)\n\n// The len built-in function returns the length of v, according to its type:\n//\tArray: the number of elements in v.\n//\tPointer to array: the number of elements in *v (even if v is nil).\n//\tSlice, or map: the number of elements in v; if v is nil, len(v) is zero.\n//\tString: the number of bytes in v.\n//\tChannel: the number of elements queued (unread) in the channel buffer;\n//\tif v is nil, len(v) is zero.\nfunc len(v Type) int\n\n// The cap built-in function returns the capacity of v, according to its type:\n//\tArray: the number of elements in v (same as len(v)).\n//\tPointer to array: the number of elements in *v (same as len(v)).\n//\tSlice: the maximum length the slice can reach when resliced;\n//\tif v is nil, cap(v) is zero.\n//\tChannel: the channel buffer capacity, in units of elements;\n//\tif v is nil, cap(v) is zero.\nfunc cap(v Type) int\n\n// The make built-in function allocates and initializes an object of type\n// slice, map, or chan (only). Like new, the first argument is a type, not a\n// value. Unlike new, make's return type is the same as the type of its\n// argument, not a pointer to it. The specification of the result depends on\n// the type:\n//\tSlice: The size specifies the length. The capacity of the slice is\n//\tequal to its length. A second integer argument may be provided to\n//\tspecify a different capacity; it must be no smaller than the\n//\tlength, so make([]int, 0, 10) allocates a slice of length 0 and\n//\tcapacity 10.\n//\tMap: An initial allocation is made according to the size but the\n//\tresulting map has length 0. The size may be omitted, in which case\n//\ta small starting size is allocated.\n//\tChannel: The channel's buffer is initialized with the specified\n//\tbuffer capacity. If zero, or the size is omitted, the channel is\n//\tunbuffered.\nfunc make(Type, size IntegerType) Type\n\n// The new built-in function allocates memory. The first argument is a type,\n// not a value, and the value returned is a pointer to a newly\n// allocated zero value of that type.\nfunc new(Type) *Type\n\n// The complex built-in function constructs a complex value from two\n// floating-point values. The real and imaginary parts must be of the same\n// size, either float32 or float64 (or assignable to them), and the return\n// value will be the corresponding complex type (complex64 for float32,\n// complex128 for float64).\nfunc complex(r, i FloatType) ComplexType\n\n// The real built-in function returns the real part of the complex number c.\n// The return value will be floating point type corresponding to the type of c.\nfunc real(c ComplexType) FloatType\n\n// The imag built-in function returns the imaginary part of the complex\n// number c. The return value will be floating point type corresponding to\n// the type of c.\nfunc imag(c ComplexType) FloatType\n\n// The close built-in function closes a channel, which must be either\n// bidirectional or send-only. It should be executed only by the sender,\n// never the receiver, and has the effect of shutting down the channel after\n// the last sent value is received. After the last value has been received\n// from a closed channel c, any receive from c will succeed without\n// blocking, returning the zero value for the channel element. The form\n//\tx, ok := <-c\n// will also set ok to false for a closed channel.\nfunc close(c chan<- Type)\n\n// The panic built-in function stops normal execution of the current\n// goroutine. When a function F calls panic, normal execution of F stops\n// immediately. Any functions whose execution was deferred by F are run in\n// the usual way, and then F returns to its caller. To the caller G, the\n// invocation of F then behaves like a call to panic, terminating G's\n// execution and running any deferred functions. This continues until all\n// functions in the executing goroutine have stopped, in reverse order. At\n// that point, the program is terminated and the error condition is reported,\n// including the value of the argument to panic. This termination sequence\n// is called panicking and can be controlled by the built-in function\n// recover.\nfunc panic(v interface{})\n\n// The recover built-in function allows a program to manage behavior of a\n// panicking goroutine. Executing a call to recover inside a deferred\n// function (but not any function called by it) stops the panicking sequence\n// by restoring normal execution and retrieves the error value passed to the\n// call of panic. If recover is called outside the deferred function it will\n// not stop a panicking sequence. In this case, or when the goroutine is not\n// panicking, or if the argument supplied to panic was nil, recover returns\n// nil. Thus the return value from recover reports whether the goroutine is\n// panicking.\nfunc recover() interface{}\n\n// The print built-in function formats its arguments in an implementation-\n// specific way and writes the result to standard error.\n// Print is useful for bootstrapping and debugging; it is not guaranteed\n// to stay in the language.\nfunc print(args ...Type)\n\n// The println built-in function formats its arguments in an implementation-\n// specific way and writes the result to standard error.\n// Spaces are always added between arguments and a newline is appended.\n// Println is useful for bootstrapping and debugging; it is not guaranteed\n// to stay in the language.\nfunc println(args ...Type)\n\n// The error built-in interface type is the conventional interface for\n// representing an error condition, with the nil value representing no error.\ntype error interface {\n\tError() string\n}\n"
  },
  {
    "path": "testData/mockSdk-1.1.2/src/pkg/dirName/doesNotMatchDirectory.go",
    "content": "package otherPackage\n\nfunc PackageNameTesting() string {\n    return \"otherPackage\"\n}\n\nfunc FunctionInPackageThatDoesNotMatchDirectoryName() string {\n    return \"otherPackage\"\n}"
  },
  {
    "path": "testData/mockSdk-1.1.2/src/pkg/dirName/packageMatchesDirectory.go",
    "content": "package dirName\n\nfunc PackageNameTesting() string {\n    return \"hi\"\n}\n\nfunc FunctionInPackageThatMatchesDirectoryName() string {\n    return \"otherPackage\"\n}"
  },
  {
    "path": "testData/mockSdk-1.1.2/src/pkg/doc/dirs.go",
    "content": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage main\n\nimport (\n\t\"go/build\"\n\t\"log\"\n\t\"os\"\n\t\"path\"\n\t\"path/filepath\"\n\t\"strings\"\n)\n\n// Dirs is a structure for scanning the directory tree.\n// Its Next method returns the next Go source directory it finds.\n// Although it can be used to scan the tree multiple times, it\n// only walks the tree once, caching the data it finds.\ntype Dirs struct {\n\tscan   chan string // directories generated by walk.\n\tpaths  []string    // Cache of known paths.\n\toffset int         // Counter for Next.\n}\n\nvar dirs Dirs\n\nfunc init() {\n\tdirs.paths = make([]string, 0, 1000)\n\tdirs.scan = make(chan string)\n\tgo dirs.walk()\n}\n\n// Reset puts the scan back at the beginning.\nfunc (d *Dirs) Reset() {\n\td.offset = 0\n}\n\n// Next returns the next directory in the scan. The boolean\n// is false when the scan is done.\nfunc (d *Dirs) Next() (string, bool) {\n\tif d.offset < len(d.paths) {\n\t\tpath := d.paths[d.offset]\n\t\td.offset++\n\t\treturn path, true\n\t}\n\tpath, ok := <-d.scan\n\tif !ok {\n\t\treturn \"\", false\n\t}\n\td.paths = append(d.paths, path)\n\td.offset++\n\treturn path, ok\n}\n\n// walk walks the trees in GOROOT and GOPATH.\nfunc (d *Dirs) walk() {\n\td.bfsWalkRoot(build.Default.GOROOT)\n\tfor _, root := range splitGopath() {\n\t\td.bfsWalkRoot(root)\n\t}\n\tclose(d.scan)\n}\n\n// bfsWalkRoot walks a single directory hierarchy in breadth-first lexical order.\n// Each Go source directory it finds is delivered on d.scan.\nfunc (d *Dirs) bfsWalkRoot(root string) {\n\troot = path.Join(root, \"src\")\n\n\t// this is the queue of directories to examine in this pass.\n\tthis := []string{}\n\t// next is the queue of directories to examine in the next pass.\n\tnext := []string{root}\n\n\tfor len(next) > 0 {\n\t\tthis, next = next, this[0:0]\n\t\tfor _, dir := range this {\n\t\t\tfd, err := os.Open(dir)\n\t\t\tif err != nil {\n\t\t\t\tlog.Printf(\"error opening %s: %v\", dir, err)\n\t\t\t\treturn // TODO? There may be entry before the error.\n\t\t\t}\n\t\t\tentries, err := fd.Readdir(0)\n\t\t\tfd.Close()\n\t\t\tif err != nil {\n\t\t\t\tlog.Printf(\"error reading %s: %v\", dir, err)\n\t\t\t\treturn // TODO? There may be entry before the error.\n\t\t\t}\n\t\t\thasGoFiles := false\n\t\t\tfor _, entry := range entries {\n\t\t\t\tname := entry.Name()\n\t\t\t\t// For plain files, remember if this directory contains any .go\n\t\t\t\t// source files, but ignore them otherwise.\n\t\t\t\tif !entry.IsDir() {\n\t\t\t\t\tif !hasGoFiles && strings.HasSuffix(name, \".go\") {\n\t\t\t\t\t\thasGoFiles = true\n\t\t\t\t\t}\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\t// Entry is a directory.\n\t\t\t\t// No .git or other dot nonsense please.\n\t\t\t\tif strings.HasPrefix(name, \".\") {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\t// Remember this (fully qualified) directory for the next pass.\n\t\t\t\tnext = append(next, filepath.Join(dir, name))\n\t\t\t}\n\t\t\tif hasGoFiles {\n\t\t\t\t// It's a candidate.\n\t\t\t\td.scan <- dir\n\t\t\t}\n\t\t}\n\n\t}\n}\n"
  },
  {
    "path": "testData/mockSdk-1.1.2/src/pkg/doc/doc_test.go",
    "content": "// Copyright 2015 The Go Authors.  All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage main\n\nimport (\n\t\"bytes\"\n\t\"flag\"\n\t\"regexp\"\n\t\"runtime\"\n\t\"strings\"\n\t\"testing\"\n)\n\nfunc maybeSkip(t *testing.T) {\n\tif strings.HasPrefix(runtime.GOOS, \"nacl\") {\n\t\tt.Skip(\"nacl does not have a full file tree\")\n\t}\n\tif runtime.GOOS == \"darwin\" && strings.HasPrefix(runtime.GOARCH, \"arm\") {\n\t\tt.Skip(\"darwin/arm does not have a full file tree\")\n\t}\n}\n\nconst (\n\tdataDir = \"testdata\"\n\tbinary  = \"testdoc\"\n)\n\ntype test struct {\n\tname string\n\targs []string // Arguments to \"[go] doc\".\n\tyes  []string // Regular expressions that should match.\n\tno   []string // Regular expressions that should not match.\n}\n\nconst p = \"cmd/doc/testdata\"\n\nvar tests = []test{\n\t// Sanity check.\n\t{\n\t\t\"sanity check\",\n\t\t[]string{p},\n\t\t[]string{`type ExportedType struct`},\n\t\tnil,\n\t},\n\n\t// Package dump includes import, package statement.\n\t{\n\t\t\"package clause\",\n\t\t[]string{p},\n\t\t[]string{`package pkg.*cmd/doc/testdata`},\n\t\tnil,\n\t},\n\n\t// Constants.\n\t// Package dump\n\t{\n\t\t\"full package\",\n\t\t[]string{p},\n\t\t[]string{\n\t\t\t`Package comment`,\n\t\t\t`const ExportedConstant = 1`,                            // Simple constant.\n\t\t\t`const ConstOne = 1`,                                    // First entry in constant block.\n\t\t\t`const ConstFive ...`,                                   // From block starting with unexported constant.\n\t\t\t`var ExportedVariable = 1`,                              // Simple variable.\n\t\t\t`var VarOne = 1`,                                        // First entry in variable block.\n\t\t\t`func ExportedFunc\\(a int\\) bool`,                       // Function.\n\t\t\t`type ExportedType struct { ... }`,                      // Exported type.\n\t\t\t`const ExportedTypedConstant ExportedType = iota`,       // Typed constant.\n\t\t\t`const ExportedTypedConstant_unexported unexportedType`, // Typed constant, exported for unexported type.\n\t\t},\n\t\t[]string{\n\t\t\t`const internalConstant = 2`,        // No internal constants.\n\t\t\t`var internalVariable = 2`,          // No internal variables.\n\t\t\t`func internalFunc(a int) bool`,     // No internal functions.\n\t\t\t`Comment about exported constant`,   // No comment for single constant.\n\t\t\t`Comment about exported variable`,   // No comment for single variable.\n\t\t\t`Comment about block of constants.`, // No comment for constant block.\n\t\t\t`Comment about block of variables.`, // No comment for variable block.\n\t\t\t`Comment before ConstOne`,           // No comment for first entry in constant block.\n\t\t\t`Comment before VarOne`,             // No comment for first entry in variable block.\n\t\t\t`ConstTwo = 2`,                      // No second entry in constant block.\n\t\t\t`VarTwo = 2`,                        // No second entry in variable block.\n\t\t\t`VarFive = 5`,                       // From block starting with unexported variable.\n\t\t\t`type unexportedType`,               // No unexported type.\n\t\t\t`unexportedTypedConstant`,           // No unexported typed constant.\n\t\t\t`Field`,                             // No fields.\n\t\t\t`Method`,                            // No methods.\n\t\t},\n\t},\n\t// Package dump -u\n\t{\n\t\t\"full package with u\",\n\t\t[]string{`-u`, p},\n\t\t[]string{\n\t\t\t`const ExportedConstant = 1`,      // Simple constant.\n\t\t\t`const internalConstant = 2`,      // Internal constants.\n\t\t\t`func internalFunc\\(a int\\) bool`, // Internal functions.\n\t\t},\n\t\t[]string{\n\t\t\t`Comment about exported constant`,  // No comment for simple constant.\n\t\t\t`Comment about block of constants`, // No comment for constant block.\n\t\t\t`Comment about internal function`,  // No comment for internal function.\n\t\t},\n\t},\n\n\t// Single constant.\n\t{\n\t\t\"single constant\",\n\t\t[]string{p, `ExportedConstant`},\n\t\t[]string{\n\t\t\t`Comment about exported constant`, // Include comment.\n\t\t\t`const ExportedConstant = 1`,\n\t\t},\n\t\tnil,\n\t},\n\t// Single constant -u.\n\t{\n\t\t\"single constant with -u\",\n\t\t[]string{`-u`, p, `internalConstant`},\n\t\t[]string{\n\t\t\t`Comment about internal constant`, // Include comment.\n\t\t\t`const internalConstant = 2`,\n\t\t},\n\t\tnil,\n\t},\n\t// Block of constants.\n\t{\n\t\t\"block of constants\",\n\t\t[]string{p, `ConstTwo`},\n\t\t[]string{\n\t\t\t`Comment before ConstOne.\\n.*ConstOne = 1`,    // First...\n\t\t\t`ConstTwo = 2.*Comment on line with ConstTwo`, // And second show up.\n\t\t\t`Comment about block of constants`,            // Comment does too.\n\t\t},\n\t\t[]string{\n\t\t\t`constThree`, // No unexported constant.\n\t\t},\n\t},\n\t// Block of constants -u.\n\t{\n\t\t\"block of constants with -u\",\n\t\t[]string{\"-u\", p, `constThree`},\n\t\t[]string{\n\t\t\t`constThree = 3.*Comment on line with constThree`,\n\t\t},\n\t\tnil,\n\t},\n\n\t// Single variable.\n\t{\n\t\t\"single variable\",\n\t\t[]string{p, `ExportedVariable`},\n\t\t[]string{\n\t\t\t`ExportedVariable`, // Include comment.\n\t\t\t`var ExportedVariable = 1`,\n\t\t},\n\t\tnil,\n\t},\n\t// Single variable -u.\n\t{\n\t\t\"single variable with -u\",\n\t\t[]string{`-u`, p, `internalVariable`},\n\t\t[]string{\n\t\t\t`Comment about internal variable`, // Include comment.\n\t\t\t`var internalVariable = 2`,\n\t\t},\n\t\tnil,\n\t},\n\t// Block of variables.\n\t{\n\t\t\"block of variables\",\n\t\t[]string{p, `VarTwo`},\n\t\t[]string{\n\t\t\t`Comment before VarOne.\\n.*VarOne = 1`,    // First...\n\t\t\t`VarTwo = 2.*Comment on line with VarTwo`, // And second show up.\n\t\t\t`Comment about block of variables`,        // Comment does too.\n\t\t},\n\t\t[]string{\n\t\t\t`varThree= 3`, // No unexported variable.\n\t\t},\n\t},\n\t// Block of variables -u.\n\t{\n\t\t\"block of variables with -u\",\n\t\t[]string{\"-u\", p, `varThree`},\n\t\t[]string{\n\t\t\t`varThree = 3.*Comment on line with varThree`,\n\t\t},\n\t\tnil,\n\t},\n\n\t// Function.\n\t{\n\t\t\"function\",\n\t\t[]string{p, `ExportedFunc`},\n\t\t[]string{\n\t\t\t`Comment about exported function`, // Include comment.\n\t\t\t`func ExportedFunc\\(a int\\) bool`,\n\t\t},\n\t\tnil,\n\t},\n\t// Function -u.\n\t{\n\t\t\"function with -u\",\n\t\t[]string{\"-u\", p, `internalFunc`},\n\t\t[]string{\n\t\t\t`Comment about internal function`, // Include comment.\n\t\t\t`func internalFunc\\(a int\\) bool`,\n\t\t},\n\t\tnil,\n\t},\n\n\t// Type.\n\t{\n\t\t\"type\",\n\t\t[]string{p, `ExportedType`},\n\t\t[]string{\n\t\t\t`Comment about exported type`, // Include comment.\n\t\t\t`type ExportedType struct`,    // Type definition.\n\t\t\t`Comment before exported field.*\\n.*ExportedField +int` +\n\t\t\t\t`.*Comment on line with exported field.`,\n\t\t\t`Has unexported fields`,\n\t\t\t`func \\(ExportedType\\) ExportedMethod\\(a int\\) bool`,\n\t\t\t`const ExportedTypedConstant ExportedType = iota`, // Must include associated constant.\n\t\t\t`func ExportedTypeConstructor\\(\\) \\*ExportedType`, // Must include constructor.\n\t\t},\n\t\t[]string{\n\t\t\t`unexportedField`,                // No unexported field.\n\t\t\t`Comment about exported method.`, // No comment about exported method.\n\t\t\t`unexportedMethod`,               // No unexported method.\n\t\t\t`unexportedTypedConstant`,        // No unexported constant.\n\t\t},\n\t},\n\t// Type -u with unexported fields.\n\t{\n\t\t\"type with unexported fields and -u\",\n\t\t[]string{\"-u\", p, `ExportedType`},\n\t\t[]string{\n\t\t\t`Comment about exported type`, // Include comment.\n\t\t\t`type ExportedType struct`,    // Type definition.\n\t\t\t`Comment before exported field.*\\n.*ExportedField +int`,\n\t\t\t`unexportedField int.*Comment on line with unexported field.`,\n\t\t\t`func \\(ExportedType\\) unexportedMethod\\(a int\\) bool`,\n\t\t\t`unexportedTypedConstant`,\n\t\t},\n\t\t[]string{\n\t\t\t`Has unexported fields`,\n\t\t},\n\t},\n\t// Unexported type with -u.\n\t{\n\t\t\"unexported type with -u\",\n\t\t[]string{\"-u\", p, `unexportedType`},\n\t\t[]string{\n\t\t\t`Comment about unexported type`, // Include comment.\n\t\t\t`type unexportedType int`,       // Type definition.\n\t\t\t`func \\(unexportedType\\) ExportedMethod\\(\\) bool`,\n\t\t\t`func \\(unexportedType\\) unexportedMethod\\(\\) bool`,\n\t\t\t`ExportedTypedConstant_unexported unexportedType = iota`,\n\t\t\t`const unexportedTypedConstant unexportedType = 1`,\n\t\t},\n\t\tnil,\n\t},\n\n\t// Interface.\n\t{\n\t\t\"type\",\n\t\t[]string{p, `ExportedInterface`},\n\t\t[]string{\n\t\t\t`Comment about exported interface`, // Include comment.\n\t\t\t`type ExportedInterface interface`, // Interface definition.\n\t\t\t`Comment before exported method.*\\n.*ExportedMethod\\(\\)` +\n\t\t\t\t`.*Comment on line with exported method`,\n\t\t\t`Has unexported methods`,\n\t\t},\n\t\t[]string{\n\t\t\t`unexportedField`,               // No unexported field.\n\t\t\t`Comment about exported method`, // No comment about exported method.\n\t\t\t`unexportedMethod`,              // No unexported method.\n\t\t\t`unexportedTypedConstant`,       // No unexported constant.\n\t\t},\n\t},\n\t// Interface -u with unexported methods.\n\t{\n\t\t\"type with unexported methods and -u\",\n\t\t[]string{\"-u\", p, `ExportedInterface`},\n\t\t[]string{\n\t\t\t`Comment about exported interface`, // Include comment.\n\t\t\t`type ExportedInterface interface`, // Interface definition.\n\t\t\t`Comment before exported method.*\\n.*ExportedMethod\\(\\)` +\n\t\t\t\t`.*Comment on line with exported method`,\n\t\t\t`unexportedMethod\\(\\).*Comment on line with unexported method.`,\n\t\t},\n\t\t[]string{\n\t\t\t`Has unexported methods`,\n\t\t},\n\t},\n\n\t// Method.\n\t{\n\t\t\"method\",\n\t\t[]string{p, `ExportedType.ExportedMethod`},\n\t\t[]string{\n\t\t\t`func \\(ExportedType\\) ExportedMethod\\(a int\\) bool`,\n\t\t\t`Comment about exported method.`,\n\t\t},\n\t\tnil,\n\t},\n\t// Method  with -u.\n\t{\n\t\t\"method with -u\",\n\t\t[]string{\"-u\", p, `ExportedType.unexportedMethod`},\n\t\t[]string{\n\t\t\t`func \\(ExportedType\\) unexportedMethod\\(a int\\) bool`,\n\t\t\t`Comment about unexported method.`,\n\t\t},\n\t\tnil,\n\t},\n\n\t// Case matching off.\n\t{\n\t\t\"case matching off\",\n\t\t[]string{p, `casematch`},\n\t\t[]string{\n\t\t\t`CaseMatch`,\n\t\t\t`Casematch`,\n\t\t},\n\t\tnil,\n\t},\n\n\t// Case matching on.\n\t{\n\t\t\"case matching on\",\n\t\t[]string{\"-c\", p, `Casematch`},\n\t\t[]string{\n\t\t\t`Casematch`,\n\t\t},\n\t\t[]string{\n\t\t\t`CaseMatch`,\n\t\t},\n\t},\n}\n\nfunc TestDoc(t *testing.T) {\n\tmaybeSkip(t)\n\tfor _, test := range tests {\n\t\tvar b bytes.Buffer\n\t\tvar flagSet flag.FlagSet\n\t\terr := do(&b, &flagSet, test.args)\n\t\tif err != nil {\n\t\t\tt.Fatalf(\"%s: %s\\n\", test.name, err)\n\t\t}\n\t\toutput := b.Bytes()\n\t\tfailed := false\n\t\tfor j, yes := range test.yes {\n\t\t\tre, err := regexp.Compile(yes)\n\t\t\tif err != nil {\n\t\t\t\tt.Fatalf(\"%s.%d: compiling %#q: %s\", test.name, j, yes, err)\n\t\t\t}\n\t\t\tif !re.Match(output) {\n\t\t\t\tt.Errorf(\"%s.%d: no match for %s %#q\", test.name, j, test.args, yes)\n\t\t\t\tfailed = true\n\t\t\t}\n\t\t}\n\t\tfor j, no := range test.no {\n\t\t\tre, err := regexp.Compile(no)\n\t\t\tif err != nil {\n\t\t\t\tt.Fatalf(\"%s.%d: compiling %#q: %s\", test.name, j, no, err)\n\t\t\t}\n\t\t\tif re.Match(output) {\n\t\t\t\tt.Errorf(\"%s.%d: incorrect match for %s %#q\", test.name, j, test.args, no)\n\t\t\t\tfailed = true\n\t\t\t}\n\t\t}\n\t\tif failed {\n\t\t\tt.Logf(\"\\n%s\", output)\n\t\t}\n\t}\n}\n\n// Test the code to try multiple packages. Our test case is\n//\tgo doc rand.Float64\n// This needs to find math/rand.Float64; however crypto/rand, which doesn't\n// have the symbol, usually appears first in the directory listing.\nfunc TestMultiplePackages(t *testing.T) {\n\tif testing.Short() {\n\t\tt.Skip(\"scanning file system takes too long\")\n\t}\n\tmaybeSkip(t)\n\tvar b bytes.Buffer // We don't care about the output.\n\t// Make sure crypto/rand does not have the symbol.\n\t{\n\t\tvar flagSet flag.FlagSet\n\t\terr := do(&b, &flagSet, []string{\"crypto/rand.float64\"})\n\t\tif err == nil {\n\t\t\tt.Errorf(\"expected error from crypto/rand.float64\")\n\t\t} else if !strings.Contains(err.Error(), \"no symbol float64\") {\n\t\t\tt.Errorf(\"unexpected error %q from crypto/rand.float64\", err)\n\t\t}\n\t}\n\t// Make sure math/rand does have the symbol.\n\t{\n\t\tvar flagSet flag.FlagSet\n\t\terr := do(&b, &flagSet, []string{\"math/rand.float64\"})\n\t\tif err != nil {\n\t\t\tt.Errorf(\"unexpected error %q from math/rand.float64\", err)\n\t\t}\n\t}\n\t// Try the shorthand.\n\t{\n\t\tvar flagSet flag.FlagSet\n\t\terr := do(&b, &flagSet, []string{\"rand.float64\"})\n\t\tif err != nil {\n\t\t\tt.Errorf(\"unexpected error %q from rand.float64\", err)\n\t\t}\n\t}\n\t// Now try a missing symbol. We should see both packages in the error.\n\t{\n\t\tvar flagSet flag.FlagSet\n\t\terr := do(&b, &flagSet, []string{\"rand.doesnotexit\"})\n\t\tif err == nil {\n\t\t\tt.Errorf(\"expected error from rand.doesnotexit\")\n\t\t} else {\n\t\t\terrStr := err.Error()\n\t\t\tif !strings.Contains(errStr, \"no symbol\") {\n\t\t\t\tt.Errorf(\"error %q should contain 'no symbol\", errStr)\n\t\t\t}\n\t\t\tif !strings.Contains(errStr, \"crypto/rand\") {\n\t\t\t\tt.Errorf(\"error %q should contain crypto/rand\", errStr)\n\t\t\t}\n\t\t\tif !strings.Contains(errStr, \"math/rand\") {\n\t\t\t\tt.Errorf(\"error %q should contain math/rand\", errStr)\n\t\t\t}\n\t\t}\n\t}\n}\n\ntype trimTest struct {\n\tpath   string\n\tprefix string\n\tresult string\n\tok     bool\n}\n\nvar trimTests = []trimTest{\n\t{\"\", \"\", \"\", true},\n\t{\"/usr/gopher\", \"/usr/gopher\", \"/usr/gopher\", true},\n\t{\"/usr/gopher/bar\", \"/usr/gopher\", \"bar\", true},\n\t{\"/usr/gopher\", \"/usr/gopher\", \"/usr/gopher\", true},\n\t{\"/usr/gopherflakes\", \"/usr/gopher\", \"/usr/gopherflakes\", false},\n\t{\"/usr/gopher/bar\", \"/usr/zot\", \"/usr/gopher/bar\", false},\n}\n\nfunc TestTrim(t *testing.T) {\n\tfor _, test := range trimTests {\n\t\tresult, ok := trim(test.path, test.prefix)\n\t\tif ok != test.ok {\n\t\t\tt.Errorf(\"%s %s expected %t got %t\", test.path, test.prefix, test.ok, ok)\n\t\t\tcontinue\n\t\t}\n\t\tif result != test.result {\n\t\t\tt.Errorf(\"%s %s expected %q got %q\", test.path, test.prefix, test.result, result)\n\t\t\tcontinue\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "testData/mockSdk-1.1.2/src/pkg/doc/main.go",
    "content": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Doc (usually run as go doc) accepts zero, one or two arguments.\n//\n// Zero arguments:\n//\tgo doc\n// Show the documentation for the package in the current directory.\n//\n// One argument:\n//\tgo doc <pkg>\n//\tgo doc <sym>[.<method>]\n//\tgo doc [<pkg>.]<sym>[.<method>]\n//\tgo doc [<pkg>.][<sym>.]<method>\n// The first item in this list that succeeds is the one whose documentation\n// is printed. If there is a symbol but no package, the package in the current\n// directory is chosen. However, if the argument begins with a capital\n// letter it is always assumed to be a symbol in the current directory.\n//\n// Two arguments:\n//\tgo doc <pkg> <sym>[.<method>]\n//\n// Show the documentation for the package, symbol, and method. The\n// first argument must be a full package path. This is similar to the\n// command-line usage for the godoc command.\n//\n// For commands, unless the -cmd flag is present \"go doc command\"\n// shows only the package-level docs for the package.\n//\n// For complete documentation, run \"go help doc\".\npackage main\n\nimport (\n\t\"bytes\"\n\t\"flag\"\n\t\"fmt\"\n\t\"go/build\"\n\t\"io\"\n\t\"log\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"unicode\"\n\t\"unicode/utf8\"\n)\n\nvar (\n\tunexported bool // -u flag\n\tmatchCase  bool // -c flag\n\tshowCmd    bool // -cmd flag\n)\n\n// usage is a replacement usage function for the flags package.\nfunc usage() {\n\tfmt.Fprintf(os.Stderr, \"Usage of [go] doc:\\n\")\n\tfmt.Fprintf(os.Stderr, \"\\tgo doc\\n\")\n\tfmt.Fprintf(os.Stderr, \"\\tgo doc <pkg>\\n\")\n\tfmt.Fprintf(os.Stderr, \"\\tgo doc <sym>[.<method>]\\n\")\n\tfmt.Fprintf(os.Stderr, \"\\tgo doc [<pkg>].<sym>[.<method>]\\n\")\n\tfmt.Fprintf(os.Stderr, \"\\tgo doc <pkg> <sym>[.<method>]\\n\")\n\tfmt.Fprintf(os.Stderr, \"For more information run\\n\")\n\tfmt.Fprintf(os.Stderr, \"\\tgo help doc\\n\\n\")\n\tfmt.Fprintf(os.Stderr, \"Flags:\\n\")\n\tflag.PrintDefaults()\n\tos.Exit(2)\n}\n\nfunc main() {\n\tlog.SetFlags(0)\n\tlog.SetPrefix(\"doc: \")\n\terr := do(os.Stdout, flag.CommandLine, os.Args[1:])\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n}\n\n// do is the workhorse, broken out of main to make testing easier.\nfunc do(writer io.Writer, flagSet *flag.FlagSet, args []string) (err error) {\n\tflagSet.Usage = usage\n\tunexported = false\n\tmatchCase = false\n\tflagSet.BoolVar(&unexported, \"u\", false, \"show unexported symbols as well as exported\")\n\tflagSet.BoolVar(&matchCase, \"c\", false, \"symbol matching honors case (paths not affected)\")\n\tflagSet.BoolVar(&showCmd, \"cmd\", false, \"show symbols with package docs even if package is a command\")\n\tflagSet.Parse(args)\n\tvar paths []string\n\tvar symbol, method string\n\t// Loop until something is printed.\n\tdirs.Reset()\n\tfor i := 0; ; i++ {\n\t\tbuildPackage, userPath, sym, more := parseArgs(flagSet.Args())\n\t\tif i > 0 && !more { // Ignore the \"more\" bit on the first iteration.\n\t\t\treturn failMessage(paths, symbol, method)\n\t\t}\n\t\tsymbol, method = parseSymbol(sym)\n\t\tpkg := parsePackage(writer, buildPackage, userPath)\n\t\tpaths = append(paths, pkg.prettyPath())\n\n\t\tdefer func() {\n\t\t\tpkg.flush()\n\t\t\te := recover()\n\t\t\tif e == nil {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tpkgError, ok := e.(PackageError)\n\t\t\tif ok {\n\t\t\t\terr = pkgError\n\t\t\t\treturn\n\t\t\t}\n\t\t\tpanic(e)\n\t\t}()\n\n\t\t// The builtin package needs special treatment: its symbols are lower\n\t\t// case but we want to see them, always.\n\t\tif pkg.build.ImportPath == \"builtin\" {\n\t\t\tunexported = true\n\t\t}\n\n\t\tswitch {\n\t\tcase symbol == \"\":\n\t\t\tpkg.packageDoc() // The package exists, so we got some output.\n\t\t\treturn\n\t\tcase method == \"\":\n\t\t\tif pkg.symbolDoc(symbol) {\n\t\t\t\treturn\n\t\t\t}\n\t\tdefault:\n\t\t\tif pkg.methodDoc(symbol, method) {\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t}\n}\n\n// failMessage creates a nicely formatted error message when there is no result to show.\nfunc failMessage(paths []string, symbol, method string) error {\n\tvar b bytes.Buffer\n\tif len(paths) > 1 {\n\t\tb.WriteString(\"s\")\n\t}\n\tb.WriteString(\" \")\n\tfor i, path := range paths {\n\t\tif i > 0 {\n\t\t\tb.WriteString(\", \")\n\t\t}\n\t\tb.WriteString(path)\n\t}\n\tif method == \"\" {\n\t\treturn fmt.Errorf(\"no symbol %s in package%s\", symbol, &b)\n\t}\n\treturn fmt.Errorf(\"no method %s.%s in package%s\", symbol, method, &b)\n}\n\n// parseArgs analyzes the arguments (if any) and returns the package\n// it represents, the part of the argument the user used to identify\n// the path (or \"\" if it's the current package) and the symbol\n// (possibly with a .method) within that package.\n// parseSymbol is used to analyze the symbol itself.\n// The boolean final argument reports whether it is possible that\n// there may be more directories worth looking at. It will only\n// be true if the package path is a partial match for some directory\n// and there may be more matches. For example, if the argument\n// is rand.Float64, we must scan both crypto/rand and math/rand\n// to find the symbol, and the first call will return crypto/rand, true.\nfunc parseArgs(args []string) (pkg *build.Package, path, symbol string, more bool) {\n\tswitch len(args) {\n\tdefault:\n\t\tusage()\n\tcase 0:\n\t\t// Easy: current directory.\n\t\treturn importDir(pwd()), \"\", \"\", false\n\tcase 1:\n\t\t// Done below.\n\tcase 2:\n\t\t// Package must be importable.\n\t\tpkg, err := build.Import(args[0], \"\", build.ImportComment)\n\t\tif err != nil {\n\t\t\tlog.Fatalf(\"%s\", err)\n\t\t}\n\t\treturn pkg, args[0], args[1], false\n\t}\n\t// Usual case: one argument.\n\targ := args[0]\n\t// If it contains slashes, it begins with a package path.\n\t// First, is it a complete package path as it is? If so, we are done.\n\t// This avoids confusion over package paths that have other\n\t// package paths as their prefix.\n\tpkg, err := build.Import(arg, \"\", build.ImportComment)\n\tif err == nil {\n\t\treturn pkg, arg, \"\", false\n\t}\n\t// Another disambiguator: If the symbol starts with an upper\n\t// case letter, it can only be a symbol in the current directory.\n\t// Kills the problem caused by case-insensitive file systems\n\t// matching an upper case name as a package name.\n\tif isUpper(arg) {\n\t\tpkg, err := build.ImportDir(\".\", build.ImportComment)\n\t\tif err == nil {\n\t\t\treturn pkg, \"\", arg, false\n\t\t}\n\t}\n\t// If it has a slash, it must be a package path but there is a symbol.\n\t// It's the last package path we care about.\n\tslash := strings.LastIndex(arg, \"/\")\n\t// There may be periods in the package path before or after the slash\n\t// and between a symbol and method.\n\t// Split the string at various periods to see what we find.\n\t// In general there may be ambiguities but this should almost always\n\t// work.\n\tvar period int\n\t// slash+1: if there's no slash, the value is -1 and start is 0; otherwise\n\t// start is the byte after the slash.\n\tfor start := slash + 1; start < len(arg); start = period + 1 {\n\t\tperiod = strings.Index(arg[start:], \".\")\n\t\tsymbol := \"\"\n\t\tif period < 0 {\n\t\t\tperiod = len(arg)\n\t\t} else {\n\t\t\tperiod += start\n\t\t\tsymbol = arg[period+1:]\n\t\t}\n\t\t// Have we identified a package already?\n\t\tpkg, err := build.Import(arg[0:period], \"\", build.ImportComment)\n\t\tif err == nil {\n\t\t\treturn pkg, arg[0:period], symbol, false\n\t\t}\n\t\t// See if we have the basename or tail of a package, as in json for encoding/json\n\t\t// or ivy/value for robpike.io/ivy/value.\n\t\t// Launch findPackage as a goroutine so it can return multiple paths if required.\n\t\tpath, ok := findPackage(arg[0:period])\n\t\tif ok {\n\t\t\treturn importDir(path), arg[0:period], symbol, true\n\t\t}\n\t\tdirs.Reset() // Next iteration of for loop must scan all the directories again.\n\t}\n\t// If it has a slash, we've failed.\n\tif slash >= 0 {\n\t\tlog.Fatalf(\"no such package %s\", arg[0:period])\n\t}\n\t// Guess it's a symbol in the current directory.\n\treturn importDir(pwd()), \"\", arg, false\n}\n\n// importDir is just an error-catching wrapper for build.ImportDir.\nfunc importDir(dir string) *build.Package {\n\tpkg, err := build.ImportDir(dir, build.ImportComment)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\treturn pkg\n}\n\n// parseSymbol breaks str apart into a symbol and method.\n// Both may be missing or the method may be missing.\n// If present, each must be a valid Go identifier.\nfunc parseSymbol(str string) (symbol, method string) {\n\tif str == \"\" {\n\t\treturn\n\t}\n\telem := strings.Split(str, \".\")\n\tswitch len(elem) {\n\tcase 1:\n\tcase 2:\n\t\tmethod = elem[1]\n\t\tisIdentifier(method)\n\tdefault:\n\t\tlog.Printf(\"too many periods in symbol specification\")\n\t\tusage()\n\t}\n\tsymbol = elem[0]\n\tisIdentifier(symbol)\n\treturn\n}\n\n// isIdentifier checks that the name is valid Go identifier, and\n// logs and exits if it is not.\nfunc isIdentifier(name string) {\n\tif len(name) == 0 {\n\t\tlog.Fatal(\"empty symbol\")\n\t}\n\tfor i, ch := range name {\n\t\tif unicode.IsLetter(ch) || ch == '_' || i > 0 && unicode.IsDigit(ch) {\n\t\t\tcontinue\n\t\t}\n\t\tlog.Fatalf(\"invalid identifier %q\", name)\n\t}\n}\n\n// isExported reports whether the name is an exported identifier.\n// If the unexported flag (-u) is true, isExported returns true because\n// it means that we treat the name as if it is exported.\nfunc isExported(name string) bool {\n\treturn unexported || isUpper(name)\n}\n\n// isUpper reports whether the name starts with an upper case letter.\nfunc isUpper(name string) bool {\n\tch, _ := utf8.DecodeRuneInString(name)\n\treturn unicode.IsUpper(ch)\n}\n\n// findPackage returns the full file name path that first matches the\n// (perhaps partial) package path pkg. The boolean reports if any match was found.\nfunc findPackage(pkg string) (string, bool) {\n\tif pkg == \"\" || isUpper(pkg) { // Upper case symbol cannot be a package name.\n\t\treturn \"\", false\n\t}\n\tpkgString := filepath.Clean(string(filepath.Separator) + pkg)\n\tfor {\n\t\tpath, ok := dirs.Next()\n\t\tif !ok {\n\t\t\treturn \"\", false\n\t\t}\n\t\tif strings.HasSuffix(path, pkgString) {\n\t\t\treturn path, true\n\t\t}\n\t}\n}\n\n// splitGopath splits $GOPATH into a list of roots.\nfunc splitGopath() []string {\n\treturn filepath.SplitList(build.Default.GOPATH)\n}\n\n// pwd returns the current directory.\nfunc pwd() string {\n\twd, err := os.Getwd()\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\treturn wd\n}\n"
  },
  {
    "path": "testData/mockSdk-1.1.2/src/pkg/doc/pkg.go",
    "content": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"go/ast\"\n\t\"go/build\"\n\t\"go/doc\"\n\t\"go/format\"\n\t\"go/parser\"\n\t\"go/token\"\n\t\"io\"\n\t\"log\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"unicode\"\n\t\"unicode/utf8\"\n)\n\nconst (\n\tpunchedCardWidth = 80 // These things just won't leave us alone.\n\tindentedWidth    = punchedCardWidth - len(indent)\n\tindent           = \"    \"\n)\n\ntype Package struct {\n\twriter     io.Writer // Destination for output.\n\tname       string    // Package name, json for encoding/json.\n\tuserPath   string    // String the user used to find this package.\n\tunexported bool\n\tmatchCase  bool\n\tpkg        *ast.Package // Parsed package.\n\tfile       *ast.File    // Merged from all files in the package\n\tdoc        *doc.Package\n\tbuild      *build.Package\n\tfs         *token.FileSet // Needed for printing.\n\tbuf        bytes.Buffer\n}\n\ntype PackageError string // type returned by pkg.Fatalf.\n\nfunc (p PackageError) Error() string {\n\treturn string(p)\n}\n\n// prettyPath returns a version of the package path that is suitable for an\n// error message. It obeys the import comment if present. Also, since\n// pkg.build.ImportPath is sometimes the unhelpful \"\" or \".\", it looks for a\n// directory name in GOROOT or GOPATH if that happens.\nfunc (pkg *Package) prettyPath() string {\n\tpath := pkg.build.ImportComment\n\tif path == \"\" {\n\t\tpath = pkg.build.ImportPath\n\t}\n\tif path != \".\" && path != \"\" {\n\t\treturn path\n\t}\n\t// Convert the source directory into a more useful path.\n\t// Also convert everything to slash-separated paths for uniform handling.\n\tpath = filepath.Clean(filepath.ToSlash(pkg.build.Dir))\n\t// Can we find a decent prefix?\n\tgoroot := filepath.Join(build.Default.GOROOT, \"src\")\n\tif p, ok := trim(path, filepath.ToSlash(goroot)); ok {\n\t\treturn p\n\t}\n\tfor _, gopath := range splitGopath() {\n\t\tif p, ok := trim(path, filepath.ToSlash(gopath)); ok {\n\t\t\treturn p\n\t\t}\n\t}\n\treturn path\n}\n\n// trim trims the directory prefix from the path, paying attention\n// to the path separator. If they are the same string or the prefix\n// is not present the original is returned. The boolean reports whether\n// the prefix is present. That path and prefix have slashes for separators.\nfunc trim(path, prefix string) (string, bool) {\n\tif !strings.HasPrefix(path, prefix) {\n\t\treturn path, false\n\t}\n\tif path == prefix {\n\t\treturn path, true\n\t}\n\tif path[len(prefix)] == '/' {\n\t\treturn path[len(prefix)+1:], true\n\t}\n\treturn path, false // Textual prefix but not a path prefix.\n}\n\n// pkg.Fatalf is like log.Fatalf, but panics so it can be recovered in the\n// main do function, so it doesn't cause an exit. Allows testing to work\n// without running a subprocess. The log prefix will be added when\n// logged in main; it is not added here.\nfunc (pkg *Package) Fatalf(format string, args ...interface{}) {\n\tpanic(PackageError(fmt.Sprintf(format, args...)))\n}\n\n// parsePackage turns the build package we found into a parsed package\n// we can then use to generate documentation.\nfunc parsePackage(writer io.Writer, pkg *build.Package, userPath string) *Package {\n\tfs := token.NewFileSet()\n\t// include tells parser.ParseDir which files to include.\n\t// That means the file must be in the build package's GoFiles or CgoFiles\n\t// list only (no tag-ignored files, tests, swig or other non-Go files).\n\tinclude := func(info os.FileInfo) bool {\n\t\tfor _, name := range pkg.GoFiles {\n\t\t\tif name == info.Name() {\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\t\tfor _, name := range pkg.CgoFiles {\n\t\t\tif name == info.Name() {\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\t\treturn false\n\t}\n\tpkgs, err := parser.ParseDir(fs, pkg.Dir, include, parser.ParseComments)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\t// Make sure they are all in one package.\n\tif len(pkgs) != 1 {\n\t\tlog.Fatalf(\"multiple packages in directory %s\", pkg.Dir)\n\t}\n\tastPkg := pkgs[pkg.Name]\n\n\t// TODO: go/doc does not include typed constants in the constants\n\t// list, which is what we want. For instance, time.Sunday is of type\n\t// time.Weekday, so it is defined in the type but not in the\n\t// Consts list for the package. This prevents\n\t//\tgo doc time.Sunday\n\t// from finding the symbol. Work around this for now, but we\n\t// should fix it in go/doc.\n\t// A similar story applies to factory functions.\n\tdocPkg := doc.New(astPkg, pkg.ImportPath, doc.AllDecls)\n\tfor _, typ := range docPkg.Types {\n\t\tdocPkg.Consts = append(docPkg.Consts, typ.Consts...)\n\t\tdocPkg.Vars = append(docPkg.Vars, typ.Vars...)\n\t\tdocPkg.Funcs = append(docPkg.Funcs, typ.Funcs...)\n\t}\n\n\treturn &Package{\n\t\twriter:   writer,\n\t\tname:     pkg.Name,\n\t\tuserPath: userPath,\n\t\tpkg:      astPkg,\n\t\tfile:     ast.MergePackageFiles(astPkg, 0),\n\t\tdoc:      docPkg,\n\t\tbuild:    pkg,\n\t\tfs:       fs,\n\t}\n}\n\nfunc (pkg *Package) Printf(format string, args ...interface{}) {\n\tfmt.Fprintf(&pkg.buf, format, args...)\n}\n\nfunc (pkg *Package) flush() {\n\t_, err := pkg.writer.Write(pkg.buf.Bytes())\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tpkg.buf.Reset() // Not needed, but it's a flush.\n}\n\nvar newlineBytes = []byte(\"\\n\\n\") // We never ask for more than 2.\n\n// newlines guarantees there are n newlines at the end of the buffer.\nfunc (pkg *Package) newlines(n int) {\n\tfor !bytes.HasSuffix(pkg.buf.Bytes(), newlineBytes[:n]) {\n\t\tpkg.buf.WriteRune('\\n')\n\t}\n}\n\n// emit prints the node.\nfunc (pkg *Package) emit(comment string, node ast.Node) {\n\tif node != nil {\n\t\terr := format.Node(&pkg.buf, pkg.fs, node)\n\t\tif err != nil {\n\t\t\tlog.Fatal(err)\n\t\t}\n\t\tif comment != \"\" {\n\t\t\tpkg.newlines(1)\n\t\t\tdoc.ToText(&pkg.buf, comment, \"    \", indent, indentedWidth)\n\t\t\tpkg.newlines(2) // Blank line after comment to separate from next item.\n\t\t} else {\n\t\t\tpkg.newlines(1)\n\t\t}\n\t}\n}\n\nvar formatBuf bytes.Buffer // Reusable to avoid allocation.\n\n// formatNode is a helper function for printing.\nfunc (pkg *Package) formatNode(node ast.Node) []byte {\n\tformatBuf.Reset()\n\tformat.Node(&formatBuf, pkg.fs, node)\n\treturn formatBuf.Bytes()\n}\n\n// oneLineFunc prints a function declaration as a single line.\nfunc (pkg *Package) oneLineFunc(decl *ast.FuncDecl) {\n\tdecl.Doc = nil\n\tdecl.Body = nil\n\tpkg.emit(\"\", decl)\n}\n\n// oneLineValueGenDecl prints a var or const declaration as a single line.\nfunc (pkg *Package) oneLineValueGenDecl(decl *ast.GenDecl) {\n\tdecl.Doc = nil\n\tdotDotDot := \"\"\n\tif len(decl.Specs) > 1 {\n\t\tdotDotDot = \" ...\"\n\t}\n\t// Find the first relevant spec.\n\tfor i, spec := range decl.Specs {\n\t\tvalueSpec := spec.(*ast.ValueSpec) // Must succeed; we can't mix types in one genDecl.\n\t\tif !isExported(valueSpec.Names[0].Name) {\n\t\t\tcontinue\n\t\t}\n\t\ttyp := \"\"\n\t\tif valueSpec.Type != nil {\n\t\t\ttyp = fmt.Sprintf(\" %s\", pkg.formatNode(valueSpec.Type))\n\t\t}\n\t\tval := \"\"\n\t\tif i < len(valueSpec.Values) && valueSpec.Values[i] != nil {\n\t\t\tval = fmt.Sprintf(\" = %s\", pkg.formatNode(valueSpec.Values[i]))\n\t\t}\n\t\tpkg.Printf(\"%s %s%s%s%s\\n\", decl.Tok, valueSpec.Names[0], typ, val, dotDotDot)\n\t\tbreak\n\t}\n}\n\n// oneLineTypeDecl prints a type declaration as a single line.\nfunc (pkg *Package) oneLineTypeDecl(spec *ast.TypeSpec) {\n\tspec.Doc = nil\n\tspec.Comment = nil\n\tswitch spec.Type.(type) {\n\tcase *ast.InterfaceType:\n\t\tpkg.Printf(\"type %s interface { ... }\\n\", spec.Name)\n\tcase *ast.StructType:\n\t\tpkg.Printf(\"type %s struct { ... }\\n\", spec.Name)\n\tdefault:\n\t\tpkg.Printf(\"type %s %s\\n\", spec.Name, pkg.formatNode(spec.Type))\n\t}\n}\n\n// packageDoc prints the docs for the package (package doc plus one-liners of the rest).\nfunc (pkg *Package) packageDoc() {\n\tdefer pkg.flush()\n\tif pkg.showInternals() {\n\t\tpkg.packageClause(false)\n\t}\n\n\tdoc.ToText(&pkg.buf, pkg.doc.Doc, \"\", indent, indentedWidth)\n\tpkg.newlines(1)\n\n\tif !pkg.showInternals() {\n\t\t// Show only package docs for commands.\n\t\treturn\n\t}\n\n\tpkg.newlines(2) // Guarantee blank line before the components.\n\tpkg.valueSummary(pkg.doc.Consts)\n\tpkg.valueSummary(pkg.doc.Vars)\n\tpkg.funcSummary(pkg.doc.Funcs)\n\tpkg.typeSummary()\n\tpkg.bugs()\n}\n\n// showInternals reports whether we should show the internals\n// of a package as opposed to just the package docs.\n// Used to decide whether to suppress internals for commands.\n// Called only by Package.packageDoc.\nfunc (pkg *Package) showInternals() bool {\n\treturn pkg.pkg.Name != \"main\" || showCmd\n}\n\n// packageClause prints the package clause.\n// The argument boolean, if true, suppresses the output if the\n// user's argument is identical to the actual package path or\n// is empty, meaning it's the current directory.\nfunc (pkg *Package) packageClause(checkUserPath bool) {\n\tif checkUserPath {\n\t\tif pkg.userPath == \"\" || pkg.userPath == pkg.build.ImportPath {\n\t\t\treturn\n\t\t}\n\t}\n\timportPath := pkg.build.ImportComment\n\tif importPath == \"\" {\n\t\timportPath = pkg.build.ImportPath\n\t}\n\tpkg.Printf(\"package %s // import %q\\n\\n\", pkg.name, importPath)\n\tif importPath != pkg.build.ImportPath {\n\t\tpkg.Printf(\"WARNING: package source is installed in %q\\n\", pkg.build.ImportPath)\n\t}\n}\n\n// valueSummary prints a one-line summary for each set of values and constants.\nfunc (pkg *Package) valueSummary(values []*doc.Value) {\n\tfor _, value := range values {\n\t\tpkg.oneLineValueGenDecl(value.Decl)\n\t}\n}\n\n// funcSummary prints a one-line summary for each function.\nfunc (pkg *Package) funcSummary(funcs []*doc.Func) {\n\tfor _, fun := range funcs {\n\t\tdecl := fun.Decl\n\t\t// Exported functions only. The go/doc package does not include methods here.\n\t\tif isExported(fun.Name) {\n\t\t\tpkg.oneLineFunc(decl)\n\t\t}\n\t}\n}\n\n// typeSummary prints a one-line summary for each type.\nfunc (pkg *Package) typeSummary() {\n\tfor _, typ := range pkg.doc.Types {\n\t\tfor _, spec := range typ.Decl.Specs {\n\t\t\ttypeSpec := spec.(*ast.TypeSpec) // Must succeed.\n\t\t\tif isExported(typeSpec.Name.Name) {\n\t\t\t\tpkg.oneLineTypeDecl(typeSpec)\n\t\t\t}\n\t\t}\n\t}\n}\n\n// bugs prints the BUGS information for the package.\n// TODO: Provide access to TODOs and NOTEs as well (very noisy so off by default)?\nfunc (pkg *Package) bugs() {\n\tif pkg.doc.Notes[\"BUG\"] == nil {\n\t\treturn\n\t}\n\tpkg.Printf(\"\\n\")\n\tfor _, note := range pkg.doc.Notes[\"BUG\"] {\n\t\tpkg.Printf(\"%s: %v\\n\", \"BUG\", note.Body)\n\t}\n}\n\n// findValues finds the doc.Values that describe the symbol.\nfunc (pkg *Package) findValues(symbol string, docValues []*doc.Value) (values []*doc.Value) {\n\tfor _, value := range docValues {\n\t\tfor _, name := range value.Names {\n\t\t\tif match(symbol, name) {\n\t\t\t\tvalues = append(values, value)\n\t\t\t}\n\t\t}\n\t}\n\treturn\n}\n\n// findFuncs finds the doc.Funcs that describes the symbol.\nfunc (pkg *Package) findFuncs(symbol string) (funcs []*doc.Func) {\n\tfor _, fun := range pkg.doc.Funcs {\n\t\tif match(symbol, fun.Name) {\n\t\t\tfuncs = append(funcs, fun)\n\t\t}\n\t}\n\treturn\n}\n\n// findTypes finds the doc.Types that describes the symbol.\n// If symbol is empty, it finds all exported types.\nfunc (pkg *Package) findTypes(symbol string) (types []*doc.Type) {\n\tfor _, typ := range pkg.doc.Types {\n\t\tif symbol == \"\" && isExported(typ.Name) || match(symbol, typ.Name) {\n\t\t\ttypes = append(types, typ)\n\t\t}\n\t}\n\treturn\n}\n\n// findTypeSpec returns the ast.TypeSpec within the declaration that defines the symbol.\n// The name must match exactly.\nfunc (pkg *Package) findTypeSpec(decl *ast.GenDecl, symbol string) *ast.TypeSpec {\n\tfor _, spec := range decl.Specs {\n\t\ttypeSpec := spec.(*ast.TypeSpec) // Must succeed.\n\t\tif symbol == typeSpec.Name.Name {\n\t\t\treturn typeSpec\n\t\t}\n\t}\n\treturn nil\n}\n\n// symbolDoc prints the docs for symbol. There may be multiple matches.\n// If symbol matches a type, output includes its methods factories and associated constants.\n// If there is no top-level symbol, symbolDoc looks for methods that match.\nfunc (pkg *Package) symbolDoc(symbol string) bool {\n\tdefer pkg.flush()\n\tfound := false\n\t// Functions.\n\tfor _, fun := range pkg.findFuncs(symbol) {\n\t\tif !found {\n\t\t\tpkg.packageClause(true)\n\t\t}\n\t\t// Symbol is a function.\n\t\tdecl := fun.Decl\n\t\tdecl.Body = nil\n\t\tpkg.emit(fun.Doc, decl)\n\t\tfound = true\n\t}\n\t// Constants and variables behave the same.\n\tvalues := pkg.findValues(symbol, pkg.doc.Consts)\n\tvalues = append(values, pkg.findValues(symbol, pkg.doc.Vars)...)\n\tfor _, value := range values {\n\t\t// Print each spec only if there is at least one exported symbol in it.\n\t\t// (See issue 11008.)\n\t\t// TODO: Should we elide unexported symbols from a single spec?\n\t\t// It's an unlikely scenario, probably not worth the trouble.\n\t\t// TODO: Would be nice if go/doc did this for us.\n\t\tspecs := make([]ast.Spec, 0, len(value.Decl.Specs))\n\t\tfor _, spec := range value.Decl.Specs {\n\t\t\tvspec := spec.(*ast.ValueSpec)\n\t\t\tfor _, ident := range vspec.Names {\n\t\t\t\tif isExported(ident.Name) {\n\t\t\t\t\tspecs = append(specs, vspec)\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif len(specs) == 0 {\n\t\t\tcontinue\n\t\t}\n\t\tvalue.Decl.Specs = specs\n\t\tif !found {\n\t\t\tpkg.packageClause(true)\n\t\t}\n\t\tpkg.emit(value.Doc, value.Decl)\n\t\tfound = true\n\t}\n\t// Types.\n\tfor _, typ := range pkg.findTypes(symbol) {\n\t\tif !found {\n\t\t\tpkg.packageClause(true)\n\t\t}\n\t\tdecl := typ.Decl\n\t\tspec := pkg.findTypeSpec(decl, typ.Name)\n\t\ttrimUnexportedElems(spec)\n\t\t// If there are multiple types defined, reduce to just this one.\n\t\tif len(decl.Specs) > 1 {\n\t\t\tdecl.Specs = []ast.Spec{spec}\n\t\t}\n\t\tpkg.emit(typ.Doc, decl)\n\t\t// Show associated methods, constants, etc.\n\t\tif len(typ.Consts) > 0 || len(typ.Vars) > 0 || len(typ.Funcs) > 0 || len(typ.Methods) > 0 {\n\t\t\tpkg.Printf(\"\\n\")\n\t\t}\n\t\tpkg.valueSummary(typ.Consts)\n\t\tpkg.valueSummary(typ.Vars)\n\t\tpkg.funcSummary(typ.Funcs)\n\t\tpkg.funcSummary(typ.Methods)\n\t\tfound = true\n\t}\n\tif !found {\n\t\t// See if there are methods.\n\t\tif !pkg.printMethodDoc(\"\", symbol) {\n\t\t\treturn false\n\t\t}\n\t}\n\treturn true\n}\n\n// trimUnexportedElems modifies spec in place to elide unexported fields from\n// structs and methods from interfaces (unless the unexported flag is set).\nfunc trimUnexportedElems(spec *ast.TypeSpec) {\n\tif unexported {\n\t\treturn\n\t}\n\tswitch typ := spec.Type.(type) {\n\tcase *ast.StructType:\n\t\ttyp.Fields = trimUnexportedFields(typ.Fields, \"fields\")\n\tcase *ast.InterfaceType:\n\t\ttyp.Methods = trimUnexportedFields(typ.Methods, \"methods\")\n\t}\n}\n\n// trimUnexportedFields returns the field list trimmed of unexported fields.\nfunc trimUnexportedFields(fields *ast.FieldList, what string) *ast.FieldList {\n\ttrimmed := false\n\tlist := make([]*ast.Field, 0, len(fields.List))\n\tfor _, field := range fields.List {\n\t\t// Trims if any is unexported. Good enough in practice.\n\t\tok := true\n\t\tfor _, name := range field.Names {\n\t\t\tif !isExported(name.Name) {\n\t\t\t\ttrimmed = true\n\t\t\t\tok = false\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\tif ok {\n\t\t\tlist = append(list, field)\n\t\t}\n\t}\n\tif !trimmed {\n\t\treturn fields\n\t}\n\tunexportedField := &ast.Field{\n\t\tType: &ast.Ident{\n\t\t\t// Hack: printer will treat this as a field with a named type.\n\t\t\t// Setting Name and NamePos to (\"\", fields.Closing-1) ensures that\n\t\t\t// when Pos and End are called on this field, they return the\n\t\t\t// position right before closing '}' character.\n\t\t\tName:    \"\",\n\t\t\tNamePos: fields.Closing - 1,\n\t\t},\n\t\tComment: &ast.CommentGroup{\n\t\t\tList: []*ast.Comment{{Text: fmt.Sprintf(\"// Has unexported %s.\\n\", what)}},\n\t\t},\n\t}\n\treturn &ast.FieldList{\n\t\tOpening: fields.Opening,\n\t\tList:    append(list, unexportedField),\n\t\tClosing: fields.Closing,\n\t}\n}\n\n// printMethodDoc prints the docs for matches of symbol.method.\n// If symbol is empty, it prints all methods that match the name.\n// It reports whether it found any methods.\nfunc (pkg *Package) printMethodDoc(symbol, method string) bool {\n\tdefer pkg.flush()\n\ttypes := pkg.findTypes(symbol)\n\tif types == nil {\n\t\tif symbol == \"\" {\n\t\t\treturn false\n\t\t}\n\t\tpkg.Fatalf(\"symbol %s is not a type in package %s installed in %q\", symbol, pkg.name, pkg.build.ImportPath)\n\t}\n\tfound := false\n\tfor _, typ := range types {\n\t\tfor _, meth := range typ.Methods {\n\t\t\tif match(method, meth.Name) {\n\t\t\t\tdecl := meth.Decl\n\t\t\t\tdecl.Body = nil\n\t\t\t\tpkg.emit(meth.Doc, decl)\n\t\t\t\tfound = true\n\t\t\t}\n\t\t}\n\t}\n\treturn found\n}\n\n// methodDoc prints the docs for matches of symbol.method.\nfunc (pkg *Package) methodDoc(symbol, method string) bool {\n\tdefer pkg.flush()\n\treturn pkg.printMethodDoc(symbol, method)\n}\n\n// match reports whether the user's symbol matches the program's.\n// A lower-case character in the user's string matches either case in the program's.\n// The program string must be exported.\nfunc match(user, program string) bool {\n\tif !isExported(program) {\n\t\treturn false\n\t}\n\tif matchCase {\n\t\treturn user == program\n\t}\n\tfor _, u := range user {\n\t\tp, w := utf8.DecodeRuneInString(program)\n\t\tprogram = program[w:]\n\t\tif u == p {\n\t\t\tcontinue\n\t\t}\n\t\tif unicode.IsLower(u) && simpleFold(u) == simpleFold(p) {\n\t\t\tcontinue\n\t\t}\n\t\treturn false\n\t}\n\treturn program == \"\"\n}\n\n// simpleFold returns the minimum rune equivalent to r\n// under Unicode-defined simple case folding.\nfunc simpleFold(r rune) rune {\n\tfor {\n\t\tr1 := unicode.SimpleFold(r)\n\t\tif r1 <= r {\n\t\t\treturn r1 // wrapped around, found min\n\t\t}\n\t\tr = r1\n\t}\n}\n"
  },
  {
    "path": "testData/mockSdk-1.1.2/src/pkg/doc/testdata/pkg.go",
    "content": "// Copyright 2015 The Go Authors.  All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package comment.\npackage pkg\n\n// Constants\n\n// Comment about exported constant.\nconst ExportedConstant = 1\n\n// Comment about internal constant.\nconst internalConstant = 2\n\n// Comment about block of constants.\nconst (\n\t// Comment before ConstOne.\n\tConstOne   = 1\n\tConstTwo   = 2 // Comment on line with ConstTwo.\n\tconstThree = 3 // Comment on line with constThree.\n)\n\n// Const block where first entry is unexported.\nconst (\n\tconstFour = iota\n\tConstFive\n\tConstSix\n)\n\n// Variables\n\n// Comment about exported variable.\nvar ExportedVariable = 1\n\n// Comment about internal variable.\nvar internalVariable = 2\n\n// Comment about block of variables.\nvar (\n\t// Comment before VarOne.\n\tVarOne   = 1\n\tVarTwo   = 2 // Comment on line with VarTwo.\n\tvarThree = 3 // Comment on line with varThree.\n)\n\n// Var block where first entry is unexported.\nvar (\n\tvarFour = 4\n\tVarFive = 5\n\tvarSix  = 6\n)\n\n// Comment about exported function.\nfunc ExportedFunc(a int) bool\n\n// Comment about internal function.\nfunc internalFunc(a int) bool\n\n// Comment about exported type.\ntype ExportedType struct {\n\t// Comment before exported field.\n\tExportedField   int // Comment on line with exported field.\n\tunexportedField int // Comment on line with unexported field.\n}\n\n// Comment about exported method.\nfunc (ExportedType) ExportedMethod(a int) bool {\n\treturn true\n}\n\n// Comment about unexported method.\nfunc (ExportedType) unexportedMethod(a int) bool {\n\treturn true\n}\n\n// Constants tied to ExportedType. (The type is a struct so this isn't valid Go,\n// but it parses and that's all we need.)\nconst (\n\tExportedTypedConstant ExportedType = iota\n)\n\n// Comment about constructor for exported type.\nfunc ExportedTypeConstructor() *ExportedType {\n\treturn nil\n}\n\nconst unexportedTypedConstant ExportedType = 1 // In a separate section to test -u.\n\n// Comment about exported interface.\ntype ExportedInterface interface {\n\t// Comment before exported method.\n\tExportedMethod()   // Comment on line with exported method.\n\tunexportedMethod() // Comment on line with unexported method.\n}\n\n// Comment about unexported type.\ntype unexportedType int\n\nfunc (unexportedType) ExportedMethod() bool {\n\treturn true\n}\n\nfunc (unexportedType) unexportedMethod() bool {\n\treturn true\n}\n\n// Constants tied to unexportedType.\nconst (\n\tExportedTypedConstant_unexported unexportedType = iota\n)\n\nconst unexportedTypedConstant unexportedType = 1 // In a separate section to test -u.\n\n// For case matching.\nconst CaseMatch = 1\nconst Casematch = 2\n"
  },
  {
    "path": "testData/mockSdk-1.1.2/src/pkg/docs/docs.go",
    "content": "package docs\n\n// TypeResult func comment\nfunc TypeResult(s string) string {\n    return s\n}\n\n// MultiType is a function like all other functions\nfunc MultiType(\n        demo interface{},\n        err error,\n    ) (\n    []interface{},\n    error,\n    ) {\n    return []interface{}{}, err\n}\n\n// Global comment\nvar (\n\t// InnerVariable_1\n\tInnerVariable_1,\n\t// InnerVariable_2 \n\tInnerVariable_2,\n\t// InnerVariable_3 \n\tInnerVariable_3 int\n\t// InnerVariable_4\n\tInnerVariable_4 int\n\tInnerVariable_5 int\n)"
  },
  {
    "path": "testData/mockSdk-1.1.2/src/pkg/emptyDirectory/.doNotDelete",
    "content": ""
  },
  {
    "path": "testData/mockSdk-1.1.2/src/pkg/fmt/doc.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n/*\n\tPackage fmt implements formatted I/O with functions analogous\n\tto C's printf and scanf.  The format 'verbs' are derived from C's but\n\tare simpler.\n*/\npackage fmt\n"
  },
  {
    "path": "testData/mockSdk-1.1.2/src/pkg/fmt/format.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage fmt\n\nimport (\n\t\"strconv\"\n\t\"unicode/utf8\"\n)\n\nconst (\n\tnByte = 65 // %b of an int64, plus a sign.\n\n\tldigits = \"0123456789abcdef\"\n\tudigits = \"0123456789ABCDEF\"\n)\n\nconst (\n\tsigned   = true\n\tunsigned = false\n)\n\nvar padZeroBytes = make([]byte, nByte)\nvar padSpaceBytes = make([]byte, nByte)\n\nvar newline = []byte{'\\n'}\n\nfunc init() {\n\tfor i := 0; i < nByte; i++ {\n\t\tpadZeroBytes[i] = '0'\n\t\tpadSpaceBytes[i] = ' '\n\t}\n}\n\n// A fmt is the raw formatter used by Printf etc.\n// It prints into a buffer that must be set up separately.\ntype fmt struct {\n\tintbuf [nByte]byte\n\tbuf    *buffer\n\t// width, precision\n\twid  int\n\tprec int\n\t// flags\n\twidPresent  bool\n\tprecPresent bool\n\tminus       bool\n\tplus        bool\n\tsharp       bool\n\tspace       bool\n\tunicode     bool\n\tuniQuote    bool // Use 'x'= prefix for %U if printable.\n\tzero        bool\n}\n\nfunc (f *fmt) clearflags() {\n\tf.wid = 0\n\tf.widPresent = false\n\tf.prec = 0\n\tf.precPresent = false\n\tf.minus = false\n\tf.plus = false\n\tf.sharp = false\n\tf.space = false\n\tf.unicode = false\n\tf.uniQuote = false\n\tf.zero = false\n}\n\nfunc (f *fmt) init(buf *buffer) {\n\tf.buf = buf\n\tf.clearflags()\n}\n\n// computePadding computes left and right padding widths (only one will be non-zero).\nfunc (f *fmt) computePadding(width int) (padding []byte, leftWidth, rightWidth int) {\n\tleft := !f.minus\n\tw := f.wid\n\tif w < 0 {\n\t\tleft = false\n\t\tw = -w\n\t}\n\tw -= width\n\tif w > 0 {\n\t\tif left && f.zero {\n\t\t\treturn padZeroBytes, w, 0\n\t\t}\n\t\tif left {\n\t\t\treturn padSpaceBytes, w, 0\n\t\t} else {\n\t\t\t// can't be zero padding on the right\n\t\t\treturn padSpaceBytes, 0, w\n\t\t}\n\t}\n\treturn\n}\n\n// writePadding generates n bytes of padding.\nfunc (f *fmt) writePadding(n int, padding []byte) {\n\tfor n > 0 {\n\t\tm := n\n\t\tif m > nByte {\n\t\t\tm = nByte\n\t\t}\n\t\tf.buf.Write(padding[0:m])\n\t\tn -= m\n\t}\n}\n\n// pad appends b to f.buf, padded on left (w > 0) or right (w < 0 or f.minus).\nfunc (f *fmt) pad(b []byte) {\n\tif !f.widPresent || f.wid == 0 {\n\t\tf.buf.Write(b)\n\t\treturn\n\t}\n\tpadding, left, right := f.computePadding(len(b))\n\tif left > 0 {\n\t\tf.writePadding(left, padding)\n\t}\n\tf.buf.Write(b)\n\tif right > 0 {\n\t\tf.writePadding(right, padding)\n\t}\n}\n\n// padString appends s to buf, padded on left (w > 0) or right (w < 0 or f.minus).\nfunc (f *fmt) padString(s string) {\n\tif !f.widPresent || f.wid == 0 {\n\t\tf.buf.WriteString(s)\n\t\treturn\n\t}\n\tpadding, left, right := f.computePadding(utf8.RuneCountInString(s))\n\tif left > 0 {\n\t\tf.writePadding(left, padding)\n\t}\n\tf.buf.WriteString(s)\n\tif right > 0 {\n\t\tf.writePadding(right, padding)\n\t}\n}\n\nvar (\n\ttrueBytes  = []byte(\"true\")\n\tfalseBytes = []byte(\"false\")\n)\n\n// fmt_boolean formats a boolean.\nfunc (f *fmt) fmt_boolean(v bool) {\n\tif v {\n\t\tf.pad(trueBytes)\n\t} else {\n\t\tf.pad(falseBytes)\n\t}\n}\n\n// integer; interprets prec but not wid.  Once formatted, result is sent to pad()\n// and then flags are cleared.\nfunc (f *fmt) integer(a int64, base uint64, signedness bool, digits string) {\n\t// precision of 0 and value of 0 means \"print nothing\"\n\tif f.precPresent && f.prec == 0 && a == 0 {\n\t\treturn\n\t}\n\n\tvar buf []byte = f.intbuf[0:]\n\tnegative := signedness == signed && a < 0\n\tif negative {\n\t\ta = -a\n\t}\n\n\t// two ways to ask for extra leading zero digits: %.3d or %03d.\n\t// apparently the first cancels the second.\n\tprec := 0\n\tif f.precPresent {\n\t\tprec = f.prec\n\t\tf.zero = false\n\t} else if f.zero && f.widPresent && !f.minus && f.wid > 0 {\n\t\tprec = f.wid\n\t\tif negative || f.plus || f.space {\n\t\t\tprec-- // leave room for sign\n\t\t}\n\t}\n\n\t// format a into buf, ending at buf[i].  (printing is easier right-to-left.)\n\t// a is made into unsigned ua.  we could make things\n\t// marginally faster by splitting the 32-bit case out into a separate\n\t// block but it's not worth the duplication, so ua has 64 bits.\n\ti := len(f.intbuf)\n\tua := uint64(a)\n\tfor ua >= base {\n\t\ti--\n\t\tbuf[i] = digits[ua%base]\n\t\tua /= base\n\t}\n\ti--\n\tbuf[i] = digits[ua]\n\tfor i > 0 && prec > nByte-i {\n\t\ti--\n\t\tbuf[i] = '0'\n\t}\n\n\t// Various prefixes: 0x, -, etc.\n\tif f.sharp {\n\t\tswitch base {\n\t\tcase 8:\n\t\t\tif buf[i] != '0' {\n\t\t\t\ti--\n\t\t\t\tbuf[i] = '0'\n\t\t\t}\n\t\tcase 16:\n\t\t\ti--\n\t\t\tbuf[i] = 'x' + digits[10] - 'a'\n\t\t\ti--\n\t\t\tbuf[i] = '0'\n\t\t}\n\t}\n\tif f.unicode {\n\t\ti--\n\t\tbuf[i] = '+'\n\t\ti--\n\t\tbuf[i] = 'U'\n\t}\n\n\tif negative {\n\t\ti--\n\t\tbuf[i] = '-'\n\t} else if f.plus {\n\t\ti--\n\t\tbuf[i] = '+'\n\t} else if f.space {\n\t\ti--\n\t\tbuf[i] = ' '\n\t}\n\n\t// If we want a quoted char for %#U, move the data up to make room.\n\tif f.unicode && f.uniQuote && a >= 0 && a <= utf8.MaxRune && strconv.IsPrint(rune(a)) {\n\t\truneWidth := utf8.RuneLen(rune(a))\n\t\twidth := 1 + 1 + runeWidth + 1 // space, quote, rune, quote\n\t\tcopy(buf[i-width:], buf[i:])   // guaranteed to have enough room.\n\t\ti -= width\n\t\t// Now put \" 'x'\" at the end.\n\t\tj := len(buf) - width\n\t\tbuf[j] = ' '\n\t\tj++\n\t\tbuf[j] = '\\''\n\t\tj++\n\t\tutf8.EncodeRune(buf[j:], rune(a))\n\t\tj += runeWidth\n\t\tbuf[j] = '\\''\n\t}\n\n\tf.pad(buf[i:])\n}\n\n// truncate truncates the string to the specified precision, if present.\nfunc (f *fmt) truncate(s string) string {\n\tif f.precPresent && f.prec < utf8.RuneCountInString(s) {\n\t\tn := f.prec\n\t\tfor i := range s {\n\t\t\tif n == 0 {\n\t\t\t\ts = s[:i]\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tn--\n\t\t}\n\t}\n\treturn s\n}\n\n// fmt_s formats a string.\nfunc (f *fmt) fmt_s(s string) {\n\ts = f.truncate(s)\n\tf.padString(s)\n}\n\n// fmt_sbx formats a string or byte slice as a hexadecimal encoding of its bytes.\nfunc (f *fmt) fmt_sbx(s string, b []byte, digits string) {\n\tn := len(b)\n\tif b == nil {\n\t\tn = len(s)\n\t}\n\tx := digits[10] - 'a' + 'x'\n\t// TODO: Avoid buffer by pre-padding.\n\tvar buf []byte\n\tfor i := 0; i < n; i++ {\n\t\tif i > 0 && f.space {\n\t\t\tbuf = append(buf, ' ')\n\t\t}\n\t\tif f.sharp {\n\t\t\tbuf = append(buf, '0', x)\n\t\t}\n\t\tvar c byte\n\t\tif b == nil {\n\t\t\tc = s[i]\n\t\t} else {\n\t\t\tc = b[i]\n\t\t}\n\t\tbuf = append(buf, digits[c>>4], digits[c&0xF])\n\t}\n\tf.pad(buf)\n}\n\n// fmt_sx formats a string as a hexadecimal encoding of its bytes.\nfunc (f *fmt) fmt_sx(s, digits string) {\n\tf.fmt_sbx(s, nil, digits)\n}\n\n// fmt_bx formats a byte slice as a hexadecimal encoding of its bytes.\nfunc (f *fmt) fmt_bx(b []byte, digits string) {\n\tf.fmt_sbx(\"\", b, digits)\n}\n\n// fmt_q formats a string as a double-quoted, escaped Go string constant.\nfunc (f *fmt) fmt_q(s string) {\n\ts = f.truncate(s)\n\tvar quoted string\n\tif f.sharp && strconv.CanBackquote(s) {\n\t\tquoted = \"`\" + s + \"`\"\n\t} else {\n\t\tif f.plus {\n\t\t\tquoted = strconv.QuoteToASCII(s)\n\t\t} else {\n\t\t\tquoted = strconv.Quote(s)\n\t\t}\n\t}\n\tf.padString(quoted)\n}\n\n// fmt_qc formats the integer as a single-quoted, escaped Go character constant.\n// If the character is not valid Unicode, it will print '\\ufffd'.\nfunc (f *fmt) fmt_qc(c int64) {\n\tvar quoted []byte\n\tif f.plus {\n\t\tquoted = strconv.AppendQuoteRuneToASCII(f.intbuf[0:0], rune(c))\n\t} else {\n\t\tquoted = strconv.AppendQuoteRune(f.intbuf[0:0], rune(c))\n\t}\n\tf.pad(quoted)\n}\n\n// floating-point\n\nfunc doPrec(f *fmt, def int) int {\n\tif f.precPresent {\n\t\treturn f.prec\n\t}\n\treturn def\n}\n\n// formatFloat formats a float64; it is an efficient equivalent to  f.pad(strconv.FormatFloat()...).\nfunc (f *fmt) formatFloat(v float64, verb byte, prec, n int) {\n\t// We leave one byte at the beginning of f.intbuf for a sign if needed,\n\t// and make it a space, which we might be able to use.\n\tf.intbuf[0] = ' '\n\tslice := strconv.AppendFloat(f.intbuf[0:1], v, verb, prec, n)\n\t// Add a plus sign or space to the floating-point string representation if missing and required.\n\t// The formatted number starts at slice[1].\n\tswitch slice[1] {\n\tcase '-', '+':\n\t\t// We're set; drop the leading space.\n\t\tslice = slice[1:]\n\tdefault:\n\t\t// There's no sign, but we might need one.\n\t\tif f.plus {\n\t\t\tslice[0] = '+'\n\t\t} else if f.space {\n\t\t\t// space is already there\n\t\t} else {\n\t\t\tslice = slice[1:]\n\t\t}\n\t}\n\tf.pad(slice)\n}\n\n// fmt_e64 formats a float64 in the form -1.23e+12.\nfunc (f *fmt) fmt_e64(v float64) { f.formatFloat(v, 'e', doPrec(f, 6), 64) }\n\n// fmt_E64 formats a float64 in the form -1.23E+12.\nfunc (f *fmt) fmt_E64(v float64) { f.formatFloat(v, 'E', doPrec(f, 6), 64) }\n\n// fmt_f64 formats a float64 in the form -1.23.\nfunc (f *fmt) fmt_f64(v float64) { f.formatFloat(v, 'f', doPrec(f, 6), 64) }\n\n// fmt_g64 formats a float64 in the 'f' or 'e' form according to size.\nfunc (f *fmt) fmt_g64(v float64) { f.formatFloat(v, 'g', doPrec(f, -1), 64) }\n\n// fmt_G64 formats a float64 in the 'f' or 'E' form according to size.\nfunc (f *fmt) fmt_G64(v float64) { f.formatFloat(v, 'G', doPrec(f, -1), 64) }\n\n// fmt_fb64 formats a float64 in the form -123p3 (exponent is power of 2).\nfunc (f *fmt) fmt_fb64(v float64) { f.formatFloat(v, 'b', 0, 64) }\n\n// float32\n// cannot defer to float64 versions\n// because it will get rounding wrong in corner cases.\n\n// fmt_e32 formats a float32 in the form -1.23e+12.\nfunc (f *fmt) fmt_e32(v float32) { f.formatFloat(float64(v), 'e', doPrec(f, 6), 32) }\n\n// fmt_E32 formats a float32 in the form -1.23E+12.\nfunc (f *fmt) fmt_E32(v float32) { f.formatFloat(float64(v), 'E', doPrec(f, 6), 32) }\n\n// fmt_f32 formats a float32 in the form -1.23.\nfunc (f *fmt) fmt_f32(v float32) { f.formatFloat(float64(v), 'f', doPrec(f, 6), 32) }\n\n// fmt_g32 formats a float32 in the 'f' or 'e' form according to size.\nfunc (f *fmt) fmt_g32(v float32) { f.formatFloat(float64(v), 'g', doPrec(f, -1), 32) }\n\n// fmt_G32 formats a float32 in the 'f' or 'E' form according to size.\nfunc (f *fmt) fmt_G32(v float32) { f.formatFloat(float64(v), 'G', doPrec(f, -1), 32) }\n\n// fmt_fb32 formats a float32 in the form -123p3 (exponent is power of 2).\nfunc (f *fmt) fmt_fb32(v float32) { f.formatFloat(float64(v), 'b', 0, 32) }\n\n// fmt_c64 formats a complex64 according to the verb.\nfunc (f *fmt) fmt_c64(v complex64, verb rune) {\n\tf.buf.WriteByte('(')\n\tr := real(v)\n\toldPlus := f.plus\n\tfor i := 0; ; i++ {\n\t\tswitch verb {\n\t\tcase 'e':\n\t\t\tf.fmt_e32(r)\n\t\tcase 'E':\n\t\t\tf.fmt_E32(r)\n\t\tcase 'f':\n\t\t\tf.fmt_f32(r)\n\t\tcase 'g':\n\t\t\tf.fmt_g32(r)\n\t\tcase 'G':\n\t\t\tf.fmt_G32(r)\n\t\t}\n\t\tif i != 0 {\n\t\t\tbreak\n\t\t}\n\t\tf.plus = true\n\t\tr = imag(v)\n\t}\n\tf.plus = oldPlus\n\tf.buf.Write(irparenBytes)\n}\n\n// fmt_c128 formats a complex128 according to the verb.\nfunc (f *fmt) fmt_c128(v complex128, verb rune) {\n\tf.buf.WriteByte('(')\n\tr := real(v)\n\toldPlus := f.plus\n\tfor i := 0; ; i++ {\n\t\tswitch verb {\n\t\tcase 'e':\n\t\t\tf.fmt_e64(r)\n\t\tcase 'E':\n\t\t\tf.fmt_E64(r)\n\t\tcase 'f':\n\t\t\tf.fmt_f64(r)\n\t\tcase 'g':\n\t\t\tf.fmt_g64(r)\n\t\tcase 'G':\n\t\t\tf.fmt_G64(r)\n\t\t}\n\t\tif i != 0 {\n\t\t\tbreak\n\t\t}\n\t\tf.plus = true\n\t\tr = imag(v)\n\t}\n\tf.plus = oldPlus\n\tf.buf.Write(irparenBytes)\n}\n"
  },
  {
    "path": "testData/mockSdk-1.1.2/src/pkg/fmt/print.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage fmt\n\nimport (\n\t\"errors\"\n\t\"io\"\n\t\"os\"\n\t\"reflect\"\n\t\"sync\"\n\t\"unicode/utf8\"\n)\n\n// Some constants in the form of bytes, to avoid string overhead.\n// Needlessly fastidious, I suppose.\nvar (\n\tcommaSpaceBytes = []byte(\", \")\n\tnilAngleBytes   = []byte(\"<nil>\")\n\tnilParenBytes   = []byte(\"(nil)\")\n\tnilBytes        = []byte(\"nil\")\n\tmapBytes        = []byte(\"map[\")\n\tmissingBytes    = []byte(\"(MISSING)\")\n\tpanicBytes      = []byte(\"(PANIC=\")\n\textraBytes      = []byte(\"%!(EXTRA \")\n\tirparenBytes    = []byte(\"i)\")\n\tbytesBytes      = []byte(\"[]byte{\")\n\tbadWidthBytes   = []byte(\"%!(BADWIDTH)\")\n\tbadPrecBytes    = []byte(\"%!(BADPREC)\")\n\tnoVerbBytes     = []byte(\"%!(NOVERB)\")\n)\n\n// State represents the printer state passed to custom formatters.\n// It provides access to the io.Writer interface plus information about\n// the flags and options for the operand's format specifier.\ntype State interface {\n\t// Write is the function to call to emit formatted output to be printed.\n\tWrite(b []byte) (ret int, err error)\n\t// Width returns the value of the width option and whether it has been set.\n\tWidth() (wid int, ok bool)\n\t// Precision returns the value of the precision option and whether it has been set.\n\tPrecision() (prec int, ok bool)\n\n\t// Flag returns whether the flag c, a character, has been set.\n\tFlag(c int) bool\n}\n\n// Formatter is the interface implemented by values with a custom formatter.\n// The implementation of Format may call Sprint(f) or Fprint(f) etc.\n// to generate its output.\ntype Formatter interface {\n\tFormat(f State, c rune)\n}\n\n// Stringer is implemented by any value that has a String method,\n// which defines the ``native'' format for that value.\n// The String method is used to print values passed as an operand\n// to any format that accepts a string or to an unformatted printer\n// such as Print.\ntype Stringer interface {\n\tString() string\n}\n\n// GoStringer is implemented by any value that has a GoString method,\n// which defines the Go syntax for that value.\n// The GoString method is used to print values passed as an operand\n// to a %#v format.\ntype GoStringer interface {\n\tGoString() string\n}\n\n// Use simple []byte instead of bytes.Buffer to avoid large dependency.\ntype buffer []byte\n\nfunc (b *buffer) Write(p []byte) (n int, err error) {\n\t*b = append(*b, p...)\n\treturn len(p), nil\n}\n\nfunc (b *buffer) WriteString(s string) (n int, err error) {\n\t*b = append(*b, s...)\n\treturn len(s), nil\n}\n\nfunc (b *buffer) WriteByte(c byte) error {\n\t*b = append(*b, c)\n\treturn nil\n}\n\nfunc (bp *buffer) WriteRune(r rune) error {\n\tif r < utf8.RuneSelf {\n\t\t*bp = append(*bp, byte(r))\n\t\treturn nil\n\t}\n\n\tb := *bp\n\tn := len(b)\n\tfor n+utf8.UTFMax > cap(b) {\n\t\tb = append(b, 0)\n\t}\n\tw := utf8.EncodeRune(b[n:n+utf8.UTFMax], r)\n\t*bp = b[:n+w]\n\treturn nil\n}\n\ntype pp struct {\n\tn         int\n\tpanicking bool\n\terroring  bool // printing an error condition\n\tbuf       buffer\n\t// field holds the current item, as an interface{}.\n\tfield interface{}\n\t// value holds the current item, as a reflect.Value, and will be\n\t// the zero Value if the item has not been reflected.\n\tvalue   reflect.Value\n\truneBuf [utf8.UTFMax]byte\n\tfmt     fmt\n}\n\n// A cache holds a set of reusable objects.\n// The slice is a stack (LIFO).\n// If more are needed, the cache creates them by calling new.\ntype cache struct {\n\tmu    sync.Mutex\n\tsaved []interface{}\n\tnew   func() interface{}\n}\n\nfunc (c *cache) put(x interface{}) {\n\tc.mu.Lock()\n\tif len(c.saved) < cap(c.saved) {\n\t\tc.saved = append(c.saved, x)\n\t}\n\tc.mu.Unlock()\n}\n\nfunc (c *cache) get() interface{} {\n\tc.mu.Lock()\n\tn := len(c.saved)\n\tif n == 0 {\n\t\tc.mu.Unlock()\n\t\treturn c.new()\n\t}\n\tx := c.saved[n-1]\n\tc.saved = c.saved[0 : n-1]\n\tc.mu.Unlock()\n\treturn x\n}\n\nfunc newCache(f func() interface{}) *cache {\n\treturn &cache{saved: make([]interface{}, 0, 100), new: f}\n}\n\nvar ppFree = newCache(func() interface{} { return new(pp) })\n\n// newPrinter allocates a new pp struct or grab a cached one.\nfunc newPrinter() *pp {\n\tp := ppFree.get().(*pp)\n\tp.panicking = false\n\tp.erroring = false\n\tp.fmt.init(&p.buf)\n\treturn p\n}\n\n// free saves used pp structs in ppFree; avoids an allocation per invocation.\nfunc (p *pp) free() {\n\t// Don't hold on to pp structs with large buffers.\n\tif cap(p.buf) > 1024 {\n\t\treturn\n\t}\n\tp.buf = p.buf[:0]\n\tp.field = nil\n\tp.value = reflect.Value{}\n\tppFree.put(p)\n}\n\nfunc (p *pp) Width() (wid int, ok bool) { return p.fmt.wid, p.fmt.widPresent }\n\nfunc (p *pp) Precision() (prec int, ok bool) { return p.fmt.prec, p.fmt.precPresent }\n\nfunc (p *pp) Flag(b int) bool {\n\tswitch b {\n\tcase '-':\n\t\treturn p.fmt.minus\n\tcase '+':\n\t\treturn p.fmt.plus\n\tcase '#':\n\t\treturn p.fmt.sharp\n\tcase ' ':\n\t\treturn p.fmt.space\n\tcase '0':\n\t\treturn p.fmt.zero\n\t}\n\treturn false\n}\n\nfunc (p *pp) add(c rune) {\n\tp.buf.WriteRune(c)\n}\n\n// Implement Write so we can call Fprintf on a pp (through State), for\n// recursive use in custom verbs.\nfunc (p *pp) Write(b []byte) (ret int, err error) {\n\treturn p.buf.Write(b)\n}\n\n// These routines end in 'f' and take a format string.\n\n// Fprintf formats according to a format specifier and writes to w.\n// It returns the number of bytes written and any write error encountered.\nfunc Fprintf(w io.Writer, format string, a ...interface{}) (n int, err error) {\n\tp := newPrinter()\n\tp.doPrintf(format, a)\n\tn64, err := w.Write(p.buf)\n\tp.free()\n\treturn int(n64), err\n}\n\n// Printf formats according to a format specifier and writes to standard output.\n// It returns the number of bytes written and any write error encountered.\nfunc Printf(format string, a ...interface{}) (n int, err error) {\n\treturn Fprintf(os.Stdout, format, a...)\n}\n\n// Sprintf formats according to a format specifier and returns the resulting string.\nfunc Sprintf(format string, a ...interface{}) string {\n\tp := newPrinter()\n\tp.doPrintf(format, a)\n\ts := string(p.buf)\n\tp.free()\n\treturn s\n}\n\n// Errorf formats according to a format specifier and returns the string\n// as a value that satisfies error.\nfunc Errorf(format string, a ...interface{}) error {\n\treturn errors.New(Sprintf(format, a...))\n}\n\n// These routines do not take a format string\n\n// Fprint formats using the default formats for its operands and writes to w.\n// Spaces are added between operands when neither is a string.\n// It returns the number of bytes written and any write error encountered.\nfunc Fprint(w io.Writer, a ...interface{}) (n int, err error) {\n\tp := newPrinter()\n\tp.doPrint(a, false, false)\n\tn64, err := w.Write(p.buf)\n\tp.free()\n\treturn int(n64), err\n}\n\n// Print formats using the default formats for its operands and writes to standard output.\n// Spaces are added between operands when neither is a string.\n// It returns the number of bytes written and any write error encountered.\nfunc Print(a ...interface{}) (n int, err error) {\n\treturn Fprint(os.Stdout, a...)\n}\n\n// Sprint formats using the default formats for its operands and returns the resulting string.\n// Spaces are added between operands when neither is a string.\nfunc Sprint(a ...interface{}) string {\n\tp := newPrinter()\n\tp.doPrint(a, false, false)\n\ts := string(p.buf)\n\tp.free()\n\treturn s\n}\n\n// These routines end in 'ln', do not take a format string,\n// always add spaces between operands, and add a newline\n// after the last operand.\n\n// Fprintln formats using the default formats for its operands and writes to w.\n// Spaces are always added between operands and a newline is appended.\n// It returns the number of bytes written and any write error encountered.\nfunc Fprintln(w io.Writer, a ...interface{}) (n int, err error) {\n\tp := newPrinter()\n\tp.doPrint(a, true, true)\n\tn64, err := w.Write(p.buf)\n\tp.free()\n\treturn int(n64), err\n}\n\n// Println formats using the default formats for its operands and writes to standard output.\n// Spaces are always added between operands and a newline is appended.\n// It returns the number of bytes written and any write error encountered.\nfunc Println(a ...interface{}) (n int, err error) {\n\treturn Fprintln(os.Stdout, a...)\n}\n\n// Sprintln formats using the default formats for its operands and returns the resulting string.\n// Spaces are always added between operands and a newline is appended.\nfunc Sprintln(a ...interface{}) string {\n\tp := newPrinter()\n\tp.doPrint(a, true, true)\n\ts := string(p.buf)\n\tp.free()\n\treturn s\n}\n\n// getField gets the i'th arg of the struct value.\n// If the arg itself is an interface, return a value for\n// the thing inside the interface, not the interface itself.\nfunc getField(v reflect.Value, i int) reflect.Value {\n\tval := v.Field(i)\n\tif val.Kind() == reflect.Interface && !val.IsNil() {\n\t\tval = val.Elem()\n\t}\n\treturn val\n}\n\n// parsenum converts ASCII to integer.  num is 0 (and isnum is false) if no number present.\nfunc parsenum(s string, start, end int) (num int, isnum bool, newi int) {\n\tif start >= end {\n\t\treturn 0, false, end\n\t}\n\tfor newi = start; newi < end && '0' <= s[newi] && s[newi] <= '9'; newi++ {\n\t\tnum = num*10 + int(s[newi]-'0')\n\t\tisnum = true\n\t}\n\treturn\n}\n\nfunc (p *pp) unknownType(v interface{}) {\n\tif v == nil {\n\t\tp.buf.Write(nilAngleBytes)\n\t\treturn\n\t}\n\tp.buf.WriteByte('?')\n\tp.buf.WriteString(reflect.TypeOf(v).String())\n\tp.buf.WriteByte('?')\n}\n\nfunc (p *pp) badVerb(verb rune) {\n\tp.erroring = true\n\tp.add('%')\n\tp.add('!')\n\tp.add(verb)\n\tp.add('(')\n\tswitch {\n\tcase p.field != nil:\n\t\tp.buf.WriteString(reflect.TypeOf(p.field).String())\n\t\tp.add('=')\n\t\tp.printField(p.field, 'v', false, false, 0)\n\tcase p.value.IsValid():\n\t\tp.buf.WriteString(p.value.Type().String())\n\t\tp.add('=')\n\t\tp.printValue(p.value, 'v', false, false, 0)\n\tdefault:\n\t\tp.buf.Write(nilAngleBytes)\n\t}\n\tp.add(')')\n\tp.erroring = false\n}\n\nfunc (p *pp) fmtBool(v bool, verb rune) {\n\tswitch verb {\n\tcase 't', 'v':\n\t\tp.fmt.fmt_boolean(v)\n\tdefault:\n\t\tp.badVerb(verb)\n\t}\n}\n\n// fmtC formats a rune for the 'c' format.\nfunc (p *pp) fmtC(c int64) {\n\tr := rune(c) // Check for overflow.\n\tif int64(r) != c {\n\t\tr = utf8.RuneError\n\t}\n\tw := utf8.EncodeRune(p.runeBuf[0:utf8.UTFMax], r)\n\tp.fmt.pad(p.runeBuf[0:w])\n}\n\nfunc (p *pp) fmtInt64(v int64, verb rune) {\n\tswitch verb {\n\tcase 'b':\n\t\tp.fmt.integer(v, 2, signed, ldigits)\n\tcase 'c':\n\t\tp.fmtC(v)\n\tcase 'd', 'v':\n\t\tp.fmt.integer(v, 10, signed, ldigits)\n\tcase 'o':\n\t\tp.fmt.integer(v, 8, signed, ldigits)\n\tcase 'q':\n\t\tif 0 <= v && v <= utf8.MaxRune {\n\t\t\tp.fmt.fmt_qc(v)\n\t\t} else {\n\t\t\tp.badVerb(verb)\n\t\t}\n\tcase 'x':\n\t\tp.fmt.integer(v, 16, signed, ldigits)\n\tcase 'U':\n\t\tp.fmtUnicode(v)\n\tcase 'X':\n\t\tp.fmt.integer(v, 16, signed, udigits)\n\tdefault:\n\t\tp.badVerb(verb)\n\t}\n}\n\n// fmt0x64 formats a uint64 in hexadecimal and prefixes it with 0x or\n// not, as requested, by temporarily setting the sharp flag.\nfunc (p *pp) fmt0x64(v uint64, leading0x bool) {\n\tsharp := p.fmt.sharp\n\tp.fmt.sharp = leading0x\n\tp.fmt.integer(int64(v), 16, unsigned, ldigits)\n\tp.fmt.sharp = sharp\n}\n\n// fmtUnicode formats a uint64 in U+1234 form by\n// temporarily turning on the unicode flag and tweaking the precision.\nfunc (p *pp) fmtUnicode(v int64) {\n\tprecPresent := p.fmt.precPresent\n\tsharp := p.fmt.sharp\n\tp.fmt.sharp = false\n\tprec := p.fmt.prec\n\tif !precPresent {\n\t\t// If prec is already set, leave it alone; otherwise 4 is minimum.\n\t\tp.fmt.prec = 4\n\t\tp.fmt.precPresent = true\n\t}\n\tp.fmt.unicode = true // turn on U+\n\tp.fmt.uniQuote = sharp\n\tp.fmt.integer(int64(v), 16, unsigned, udigits)\n\tp.fmt.unicode = false\n\tp.fmt.uniQuote = false\n\tp.fmt.prec = prec\n\tp.fmt.precPresent = precPresent\n\tp.fmt.sharp = sharp\n}\n\nfunc (p *pp) fmtUint64(v uint64, verb rune, goSyntax bool) {\n\tswitch verb {\n\tcase 'b':\n\t\tp.fmt.integer(int64(v), 2, unsigned, ldigits)\n\tcase 'c':\n\t\tp.fmtC(int64(v))\n\tcase 'd':\n\t\tp.fmt.integer(int64(v), 10, unsigned, ldigits)\n\tcase 'v':\n\t\tif goSyntax {\n\t\t\tp.fmt0x64(v, true)\n\t\t} else {\n\t\t\tp.fmt.integer(int64(v), 10, unsigned, ldigits)\n\t\t}\n\tcase 'o':\n\t\tp.fmt.integer(int64(v), 8, unsigned, ldigits)\n\tcase 'q':\n\t\tif 0 <= v && v <= utf8.MaxRune {\n\t\t\tp.fmt.fmt_qc(int64(v))\n\t\t} else {\n\t\t\tp.badVerb(verb)\n\t\t}\n\tcase 'x':\n\t\tp.fmt.integer(int64(v), 16, unsigned, ldigits)\n\tcase 'X':\n\t\tp.fmt.integer(int64(v), 16, unsigned, udigits)\n\tcase 'U':\n\t\tp.fmtUnicode(int64(v))\n\tdefault:\n\t\tp.badVerb(verb)\n\t}\n}\n\nfunc (p *pp) fmtFloat32(v float32, verb rune) {\n\tswitch verb {\n\tcase 'b':\n\t\tp.fmt.fmt_fb32(v)\n\tcase 'e':\n\t\tp.fmt.fmt_e32(v)\n\tcase 'E':\n\t\tp.fmt.fmt_E32(v)\n\tcase 'f':\n\t\tp.fmt.fmt_f32(v)\n\tcase 'g', 'v':\n\t\tp.fmt.fmt_g32(v)\n\tcase 'G':\n\t\tp.fmt.fmt_G32(v)\n\tdefault:\n\t\tp.badVerb(verb)\n\t}\n}\n\nfunc (p *pp) fmtFloat64(v float64, verb rune) {\n\tswitch verb {\n\tcase 'b':\n\t\tp.fmt.fmt_fb64(v)\n\tcase 'e':\n\t\tp.fmt.fmt_e64(v)\n\tcase 'E':\n\t\tp.fmt.fmt_E64(v)\n\tcase 'f':\n\t\tp.fmt.fmt_f64(v)\n\tcase 'g', 'v':\n\t\tp.fmt.fmt_g64(v)\n\tcase 'G':\n\t\tp.fmt.fmt_G64(v)\n\tdefault:\n\t\tp.badVerb(verb)\n\t}\n}\n\nfunc (p *pp) fmtComplex64(v complex64, verb rune) {\n\tswitch verb {\n\tcase 'e', 'E', 'f', 'F', 'g', 'G':\n\t\tp.fmt.fmt_c64(v, verb)\n\tcase 'v':\n\t\tp.fmt.fmt_c64(v, 'g')\n\tdefault:\n\t\tp.badVerb(verb)\n\t}\n}\n\nfunc (p *pp) fmtComplex128(v complex128, verb rune) {\n\tswitch verb {\n\tcase 'e', 'E', 'f', 'F', 'g', 'G':\n\t\tp.fmt.fmt_c128(v, verb)\n\tcase 'v':\n\t\tp.fmt.fmt_c128(v, 'g')\n\tdefault:\n\t\tp.badVerb(verb)\n\t}\n}\n\nfunc (p *pp) fmtString(v string, verb rune, goSyntax bool) {\n\tswitch verb {\n\tcase 'v':\n\t\tif goSyntax {\n\t\t\tp.fmt.fmt_q(v)\n\t\t} else {\n\t\t\tp.fmt.fmt_s(v)\n\t\t}\n\tcase 's':\n\t\tp.fmt.fmt_s(v)\n\tcase 'x':\n\t\tp.fmt.fmt_sx(v, ldigits)\n\tcase 'X':\n\t\tp.fmt.fmt_sx(v, udigits)\n\tcase 'q':\n\t\tp.fmt.fmt_q(v)\n\tdefault:\n\t\tp.badVerb(verb)\n\t}\n}\n\nfunc (p *pp) fmtBytes(v []byte, verb rune, goSyntax bool, typ reflect.Type, depth int) {\n\tif verb == 'v' || verb == 'd' {\n\t\tif goSyntax {\n\t\t\tif typ == nil {\n\t\t\t\tp.buf.Write(bytesBytes)\n\t\t\t} else {\n\t\t\t\tp.buf.WriteString(typ.String())\n\t\t\t\tp.buf.WriteByte('{')\n\t\t\t}\n\t\t} else {\n\t\t\tp.buf.WriteByte('[')\n\t\t}\n\t\tfor i, c := range v {\n\t\t\tif i > 0 {\n\t\t\t\tif goSyntax {\n\t\t\t\t\tp.buf.Write(commaSpaceBytes)\n\t\t\t\t} else {\n\t\t\t\t\tp.buf.WriteByte(' ')\n\t\t\t\t}\n\t\t\t}\n\t\t\tp.printField(c, 'v', p.fmt.plus, goSyntax, depth+1)\n\t\t}\n\t\tif goSyntax {\n\t\t\tp.buf.WriteByte('}')\n\t\t} else {\n\t\t\tp.buf.WriteByte(']')\n\t\t}\n\t\treturn\n\t}\n\tswitch verb {\n\tcase 's':\n\t\tp.fmt.fmt_s(string(v))\n\tcase 'x':\n\t\tp.fmt.fmt_bx(v, ldigits)\n\tcase 'X':\n\t\tp.fmt.fmt_bx(v, udigits)\n\tcase 'q':\n\t\tp.fmt.fmt_q(string(v))\n\tdefault:\n\t\tp.badVerb(verb)\n\t}\n}\n\nfunc (p *pp) fmtPointer(value reflect.Value, verb rune, goSyntax bool) {\n\tuse0x64 := true\n\tswitch verb {\n\tcase 'p', 'v':\n\t\t// ok\n\tcase 'b', 'd', 'o', 'x', 'X':\n\t\tuse0x64 = false\n\t\t// ok\n\tdefault:\n\t\tp.badVerb(verb)\n\t\treturn\n\t}\n\n\tvar u uintptr\n\tswitch value.Kind() {\n\tcase reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.Slice, reflect.UnsafePointer:\n\t\tu = value.Pointer()\n\tdefault:\n\t\tp.badVerb(verb)\n\t\treturn\n\t}\n\n\tif goSyntax {\n\t\tp.add('(')\n\t\tp.buf.WriteString(value.Type().String())\n\t\tp.add(')')\n\t\tp.add('(')\n\t\tif u == 0 {\n\t\t\tp.buf.Write(nilBytes)\n\t\t} else {\n\t\t\tp.fmt0x64(uint64(u), true)\n\t\t}\n\t\tp.add(')')\n\t} else if verb == 'v' && u == 0 {\n\t\tp.buf.Write(nilAngleBytes)\n\t} else {\n\t\tif use0x64 {\n\t\t\tp.fmt0x64(uint64(u), !p.fmt.sharp)\n\t\t} else {\n\t\t\tp.fmtUint64(uint64(u), verb, false)\n\t\t}\n\t}\n}\n\nvar (\n\tintBits     = reflect.TypeOf(0).Bits()\n\tfloatBits   = reflect.TypeOf(0.0).Bits()\n\tcomplexBits = reflect.TypeOf(1i).Bits()\n\tuintptrBits = reflect.TypeOf(uintptr(0)).Bits()\n)\n\nfunc (p *pp) catchPanic(field interface{}, verb rune) {\n\tif err := recover(); err != nil {\n\t\t// If it's a nil pointer, just say \"<nil>\". The likeliest causes are a\n\t\t// Stringer that fails to guard against nil or a nil pointer for a\n\t\t// value receiver, and in either case, \"<nil>\" is a nice result.\n\t\tif v := reflect.ValueOf(field); v.Kind() == reflect.Ptr && v.IsNil() {\n\t\t\tp.buf.Write(nilAngleBytes)\n\t\t\treturn\n\t\t}\n\t\t// Otherwise print a concise panic message. Most of the time the panic\n\t\t// value will print itself nicely.\n\t\tif p.panicking {\n\t\t\t// Nested panics; the recursion in printField cannot succeed.\n\t\t\tpanic(err)\n\t\t}\n\t\tp.buf.WriteByte('%')\n\t\tp.add(verb)\n\t\tp.buf.Write(panicBytes)\n\t\tp.panicking = true\n\t\tp.printField(err, 'v', false, false, 0)\n\t\tp.panicking = false\n\t\tp.buf.WriteByte(')')\n\t}\n}\n\nfunc (p *pp) handleMethods(verb rune, plus, goSyntax bool, depth int) (wasString, handled bool) {\n\tif p.erroring {\n\t\treturn\n\t}\n\t// Is it a Formatter?\n\tif formatter, ok := p.field.(Formatter); ok {\n\t\thandled = true\n\t\twasString = false\n\t\tdefer p.catchPanic(p.field, verb)\n\t\tformatter.Format(p, verb)\n\t\treturn\n\t}\n\t// Must not touch flags before Formatter looks at them.\n\tif plus {\n\t\tp.fmt.plus = false\n\t}\n\n\t// If we're doing Go syntax and the field knows how to supply it, take care of it now.\n\tif goSyntax {\n\t\tp.fmt.sharp = false\n\t\tif stringer, ok := p.field.(GoStringer); ok {\n\t\t\twasString = false\n\t\t\thandled = true\n\t\t\tdefer p.catchPanic(p.field, verb)\n\t\t\t// Print the result of GoString unadorned.\n\t\t\tp.fmtString(stringer.GoString(), 's', false)\n\t\t\treturn\n\t\t}\n\t} else {\n\t\t// If a string is acceptable according to the format, see if\n\t\t// the value satisfies one of the string-valued interfaces.\n\t\t// Println etc. set verb to %v, which is \"stringable\".\n\t\tswitch verb {\n\t\tcase 'v', 's', 'x', 'X', 'q':\n\t\t\t// Is it an error or Stringer?\n\t\t\t// The duplication in the bodies is necessary:\n\t\t\t// setting wasString and handled, and deferring catchPanic,\n\t\t\t// must happen before calling the method.\n\t\t\tswitch v := p.field.(type) {\n\t\t\tcase error:\n\t\t\t\twasString = false\n\t\t\t\thandled = true\n\t\t\t\tdefer p.catchPanic(p.field, verb)\n\t\t\t\tp.printField(v.Error(), verb, plus, false, depth)\n\t\t\t\treturn\n\n\t\t\tcase Stringer:\n\t\t\t\twasString = false\n\t\t\t\thandled = true\n\t\t\t\tdefer p.catchPanic(p.field, verb)\n\t\t\t\tp.printField(v.String(), verb, plus, false, depth)\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t}\n\thandled = false\n\treturn\n}\n\nfunc (p *pp) printField(field interface{}, verb rune, plus, goSyntax bool, depth int) (wasString bool) {\n\tp.field = field\n\tp.value = reflect.Value{}\n\n\tif field == nil {\n\t\tif verb == 'T' || verb == 'v' {\n\t\t\tp.fmt.pad(nilAngleBytes)\n\t\t} else {\n\t\t\tp.badVerb(verb)\n\t\t}\n\t\treturn false\n\t}\n\n\t// Special processing considerations.\n\t// %T (the value's type) and %p (its address) are special; we always do them first.\n\tswitch verb {\n\tcase 'T':\n\t\tp.printField(reflect.TypeOf(field).String(), 's', false, false, 0)\n\t\treturn false\n\tcase 'p':\n\t\tp.fmtPointer(reflect.ValueOf(field), verb, goSyntax)\n\t\treturn false\n\t}\n\n\t// Clear flags for base formatters.\n\t// handleMethods needs them, so we must restore them later.\n\t// We could call handleMethods here and avoid this work, but\n\t// handleMethods is expensive enough to be worth delaying.\n\toldPlus := p.fmt.plus\n\toldSharp := p.fmt.sharp\n\tif plus {\n\t\tp.fmt.plus = false\n\t}\n\tif goSyntax {\n\t\tp.fmt.sharp = false\n\t}\n\n\t// Some types can be done without reflection.\n\tswitch f := field.(type) {\n\tcase bool:\n\t\tp.fmtBool(f, verb)\n\tcase float32:\n\t\tp.fmtFloat32(f, verb)\n\tcase float64:\n\t\tp.fmtFloat64(f, verb)\n\tcase complex64:\n\t\tp.fmtComplex64(complex64(f), verb)\n\tcase complex128:\n\t\tp.fmtComplex128(f, verb)\n\tcase int:\n\t\tp.fmtInt64(int64(f), verb)\n\tcase int8:\n\t\tp.fmtInt64(int64(f), verb)\n\tcase int16:\n\t\tp.fmtInt64(int64(f), verb)\n\tcase int32:\n\t\tp.fmtInt64(int64(f), verb)\n\tcase int64:\n\t\tp.fmtInt64(f, verb)\n\tcase uint:\n\t\tp.fmtUint64(uint64(f), verb, goSyntax)\n\tcase uint8:\n\t\tp.fmtUint64(uint64(f), verb, goSyntax)\n\tcase uint16:\n\t\tp.fmtUint64(uint64(f), verb, goSyntax)\n\tcase uint32:\n\t\tp.fmtUint64(uint64(f), verb, goSyntax)\n\tcase uint64:\n\t\tp.fmtUint64(f, verb, goSyntax)\n\tcase uintptr:\n\t\tp.fmtUint64(uint64(f), verb, goSyntax)\n\tcase string:\n\t\tp.fmtString(f, verb, goSyntax)\n\t\twasString = verb == 's' || verb == 'v'\n\tcase []byte:\n\t\tp.fmtBytes(f, verb, goSyntax, nil, depth)\n\t\twasString = verb == 's'\n\tdefault:\n\t\t// Restore flags in case handleMethods finds a Formatter.\n\t\tp.fmt.plus = oldPlus\n\t\tp.fmt.sharp = oldSharp\n\t\t// If the type is not simple, it might have methods.\n\t\tif wasString, handled := p.handleMethods(verb, plus, goSyntax, depth); handled {\n\t\t\treturn wasString\n\t\t}\n\t\t// Need to use reflection\n\t\treturn p.printReflectValue(reflect.ValueOf(field), verb, plus, goSyntax, depth)\n\t}\n\tp.field = nil\n\treturn\n}\n\n// printValue is like printField but starts with a reflect value, not an interface{} value.\nfunc (p *pp) printValue(value reflect.Value, verb rune, plus, goSyntax bool, depth int) (wasString bool) {\n\tif !value.IsValid() {\n\t\tif verb == 'T' || verb == 'v' {\n\t\t\tp.buf.Write(nilAngleBytes)\n\t\t} else {\n\t\t\tp.badVerb(verb)\n\t\t}\n\t\treturn false\n\t}\n\n\t// Special processing considerations.\n\t// %T (the value's type) and %p (its address) are special; we always do them first.\n\tswitch verb {\n\tcase 'T':\n\t\tp.printField(value.Type().String(), 's', false, false, 0)\n\t\treturn false\n\tcase 'p':\n\t\tp.fmtPointer(value, verb, goSyntax)\n\t\treturn false\n\t}\n\n\t// Handle values with special methods.\n\t// Call always, even when field == nil, because handleMethods clears p.fmt.plus for us.\n\tp.field = nil // Make sure it's cleared, for safety.\n\tif value.CanInterface() {\n\t\tp.field = value.Interface()\n\t}\n\tif wasString, handled := p.handleMethods(verb, plus, goSyntax, depth); handled {\n\t\treturn wasString\n\t}\n\n\treturn p.printReflectValue(value, verb, plus, goSyntax, depth)\n}\n\n// printReflectValue is the fallback for both printField and printValue.\n// It uses reflect to print the value.\nfunc (p *pp) printReflectValue(value reflect.Value, verb rune, plus, goSyntax bool, depth int) (wasString bool) {\n\toldValue := p.value\n\tp.value = value\nBigSwitch:\n\tswitch f := value; f.Kind() {\n\tcase reflect.Bool:\n\t\tp.fmtBool(f.Bool(), verb)\n\tcase reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:\n\t\tp.fmtInt64(f.Int(), verb)\n\tcase reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:\n\t\tp.fmtUint64(uint64(f.Uint()), verb, goSyntax)\n\tcase reflect.Float32, reflect.Float64:\n\t\tif f.Type().Size() == 4 {\n\t\t\tp.fmtFloat32(float32(f.Float()), verb)\n\t\t} else {\n\t\t\tp.fmtFloat64(float64(f.Float()), verb)\n\t\t}\n\tcase reflect.Complex64, reflect.Complex128:\n\t\tif f.Type().Size() == 8 {\n\t\t\tp.fmtComplex64(complex64(f.Complex()), verb)\n\t\t} else {\n\t\t\tp.fmtComplex128(complex128(f.Complex()), verb)\n\t\t}\n\tcase reflect.String:\n\t\tp.fmtString(f.String(), verb, goSyntax)\n\tcase reflect.Map:\n\t\tif goSyntax {\n\t\t\tp.buf.WriteString(f.Type().String())\n\t\t\tif f.IsNil() {\n\t\t\t\tp.buf.WriteString(\"(nil)\")\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tp.buf.WriteByte('{')\n\t\t} else {\n\t\t\tp.buf.Write(mapBytes)\n\t\t}\n\t\tkeys := f.MapKeys()\n\t\tfor i, key := range keys {\n\t\t\tif i > 0 {\n\t\t\t\tif goSyntax {\n\t\t\t\t\tp.buf.Write(commaSpaceBytes)\n\t\t\t\t} else {\n\t\t\t\t\tp.buf.WriteByte(' ')\n\t\t\t\t}\n\t\t\t}\n\t\t\tp.printValue(key, verb, plus, goSyntax, depth+1)\n\t\t\tp.buf.WriteByte(':')\n\t\t\tp.printValue(f.MapIndex(key), verb, plus, goSyntax, depth+1)\n\t\t}\n\t\tif goSyntax {\n\t\t\tp.buf.WriteByte('}')\n\t\t} else {\n\t\t\tp.buf.WriteByte(']')\n\t\t}\n\tcase reflect.Struct:\n\t\tif goSyntax {\n\t\t\tp.buf.WriteString(value.Type().String())\n\t\t}\n\t\tp.add('{')\n\t\tv := f\n\t\tt := v.Type()\n\t\tfor i := 0; i < v.NumField(); i++ {\n\t\t\tif i > 0 {\n\t\t\t\tif goSyntax {\n\t\t\t\t\tp.buf.Write(commaSpaceBytes)\n\t\t\t\t} else {\n\t\t\t\t\tp.buf.WriteByte(' ')\n\t\t\t\t}\n\t\t\t}\n\t\t\tif plus || goSyntax {\n\t\t\t\tif f := t.Field(i); f.Name != \"\" {\n\t\t\t\t\tp.buf.WriteString(f.Name)\n\t\t\t\t\tp.buf.WriteByte(':')\n\t\t\t\t}\n\t\t\t}\n\t\t\tp.printValue(getField(v, i), verb, plus, goSyntax, depth+1)\n\t\t}\n\t\tp.buf.WriteByte('}')\n\tcase reflect.Interface:\n\t\tvalue := f.Elem()\n\t\tif !value.IsValid() {\n\t\t\tif goSyntax {\n\t\t\t\tp.buf.WriteString(f.Type().String())\n\t\t\t\tp.buf.Write(nilParenBytes)\n\t\t\t} else {\n\t\t\t\tp.buf.Write(nilAngleBytes)\n\t\t\t}\n\t\t} else {\n\t\t\twasString = p.printValue(value, verb, plus, goSyntax, depth+1)\n\t\t}\n\tcase reflect.Array, reflect.Slice:\n\t\t// Byte slices are special.\n\t\tif typ := f.Type(); typ.Elem().Kind() == reflect.Uint8 {\n\t\t\tvar bytes []byte\n\t\t\tif f.Kind() == reflect.Slice {\n\t\t\t\tbytes = f.Bytes()\n\t\t\t} else if f.CanAddr() {\n\t\t\t\tbytes = f.Slice(0, f.Len()).Bytes()\n\t\t\t} else {\n\t\t\t\t// We have an array, but we cannot Slice() a non-addressable array,\n\t\t\t\t// so we build a slice by hand. This is a rare case but it would be nice\n\t\t\t\t// if reflection could help a little more.\n\t\t\t\tbytes = make([]byte, f.Len())\n\t\t\t\tfor i := range bytes {\n\t\t\t\t\tbytes[i] = byte(f.Index(i).Uint())\n\t\t\t\t}\n\t\t\t}\n\t\t\tp.fmtBytes(bytes, verb, goSyntax, typ, depth)\n\t\t\twasString = verb == 's'\n\t\t\tbreak\n\t\t}\n\t\tif goSyntax {\n\t\t\tp.buf.WriteString(value.Type().String())\n\t\t\tif f.Kind() == reflect.Slice && f.IsNil() {\n\t\t\t\tp.buf.WriteString(\"(nil)\")\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tp.buf.WriteByte('{')\n\t\t} else {\n\t\t\tp.buf.WriteByte('[')\n\t\t}\n\t\tfor i := 0; i < f.Len(); i++ {\n\t\t\tif i > 0 {\n\t\t\t\tif goSyntax {\n\t\t\t\t\tp.buf.Write(commaSpaceBytes)\n\t\t\t\t} else {\n\t\t\t\t\tp.buf.WriteByte(' ')\n\t\t\t\t}\n\t\t\t}\n\t\t\tp.printValue(f.Index(i), verb, plus, goSyntax, depth+1)\n\t\t}\n\t\tif goSyntax {\n\t\t\tp.buf.WriteByte('}')\n\t\t} else {\n\t\t\tp.buf.WriteByte(']')\n\t\t}\n\tcase reflect.Ptr:\n\t\tv := f.Pointer()\n\t\t// pointer to array or slice or struct?  ok at top level\n\t\t// but not embedded (avoid loops)\n\t\tif v != 0 && depth == 0 {\n\t\t\tswitch a := f.Elem(); a.Kind() {\n\t\t\tcase reflect.Array, reflect.Slice:\n\t\t\t\tp.buf.WriteByte('&')\n\t\t\t\tp.printValue(a, verb, plus, goSyntax, depth+1)\n\t\t\t\tbreak BigSwitch\n\t\t\tcase reflect.Struct:\n\t\t\t\tp.buf.WriteByte('&')\n\t\t\t\tp.printValue(a, verb, plus, goSyntax, depth+1)\n\t\t\t\tbreak BigSwitch\n\t\t\t}\n\t\t}\n\t\tfallthrough\n\tcase reflect.Chan, reflect.Func, reflect.UnsafePointer:\n\t\tp.fmtPointer(value, verb, goSyntax)\n\tdefault:\n\t\tp.unknownType(f)\n\t}\n\tp.value = oldValue\n\treturn wasString\n}\n\n// intFromArg gets the fieldnumth element of a. On return, isInt reports whether the argument has type int.\nfunc intFromArg(a []interface{}, end, i, fieldnum int) (num int, isInt bool, newi, newfieldnum int) {\n\tnewi, newfieldnum = end, fieldnum\n\tif i < end && fieldnum < len(a) {\n\t\tnum, isInt = a[fieldnum].(int)\n\t\tnewi, newfieldnum = i+1, fieldnum+1\n\t}\n\treturn\n}\n\nfunc (p *pp) doPrintf(format string, a []interface{}) {\n\tend := len(format)\n\tfieldnum := 0 // we process one field per non-trivial format\n\tfor i := 0; i < end; {\n\t\tlasti := i\n\t\tfor i < end && format[i] != '%' {\n\t\t\ti++\n\t\t}\n\t\tif i > lasti {\n\t\t\tp.buf.WriteString(format[lasti:i])\n\t\t}\n\t\tif i >= end {\n\t\t\t// done processing format string\n\t\t\tbreak\n\t\t}\n\n\t\t// Process one verb\n\t\ti++\n\t\t// flags and widths\n\t\tp.fmt.clearflags()\n\tF:\n\t\tfor ; i < end; i++ {\n\t\t\tswitch format[i] {\n\t\t\tcase '#':\n\t\t\t\tp.fmt.sharp = true\n\t\t\tcase '0':\n\t\t\t\tp.fmt.zero = true\n\t\t\tcase '+':\n\t\t\t\tp.fmt.plus = true\n\t\t\tcase '-':\n\t\t\t\tp.fmt.minus = true\n\t\t\tcase ' ':\n\t\t\t\tp.fmt.space = true\n\t\t\tdefault:\n\t\t\t\tbreak F\n\t\t\t}\n\t\t}\n\t\t// do we have width?\n\t\tif i < end && format[i] == '*' {\n\t\t\tp.fmt.wid, p.fmt.widPresent, i, fieldnum = intFromArg(a, end, i, fieldnum)\n\t\t\tif !p.fmt.widPresent {\n\t\t\t\tp.buf.Write(badWidthBytes)\n\t\t\t}\n\t\t} else {\n\t\t\tp.fmt.wid, p.fmt.widPresent, i = parsenum(format, i, end)\n\t\t}\n\t\t// do we have precision?\n\t\tif i+1 < end && format[i] == '.' {\n\t\t\tif format[i+1] == '*' {\n\t\t\t\tp.fmt.prec, p.fmt.precPresent, i, fieldnum = intFromArg(a, end, i+1, fieldnum)\n\t\t\t\tif !p.fmt.precPresent {\n\t\t\t\t\tp.buf.Write(badPrecBytes)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tp.fmt.prec, p.fmt.precPresent, i = parsenum(format, i+1, end)\n\t\t\t\tif !p.fmt.precPresent {\n\t\t\t\t\tp.fmt.prec = 0\n\t\t\t\t\tp.fmt.precPresent = true\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif i >= end {\n\t\t\tp.buf.Write(noVerbBytes)\n\t\t\tcontinue\n\t\t}\n\t\tc, w := utf8.DecodeRuneInString(format[i:])\n\t\ti += w\n\t\t// percent is special - absorbs no operand\n\t\tif c == '%' {\n\t\t\tp.buf.WriteByte('%') // We ignore width and prec.\n\t\t\tcontinue\n\t\t}\n\t\tif fieldnum >= len(a) { // out of operands\n\t\t\tp.buf.WriteByte('%')\n\t\t\tp.add(c)\n\t\t\tp.buf.Write(missingBytes)\n\t\t\tcontinue\n\t\t}\n\t\tfield := a[fieldnum]\n\t\tfieldnum++\n\n\t\tgoSyntax := c == 'v' && p.fmt.sharp\n\t\tplus := c == 'v' && p.fmt.plus\n\t\tp.printField(field, c, plus, goSyntax, 0)\n\t}\n\n\tif fieldnum < len(a) {\n\t\tp.buf.Write(extraBytes)\n\t\tfor ; fieldnum < len(a); fieldnum++ {\n\t\t\tfield := a[fieldnum]\n\t\t\tif field != nil {\n\t\t\t\tp.buf.WriteString(reflect.TypeOf(field).String())\n\t\t\t\tp.buf.WriteByte('=')\n\t\t\t}\n\t\t\tp.printField(field, 'v', false, false, 0)\n\t\t\tif fieldnum+1 < len(a) {\n\t\t\t\tp.buf.Write(commaSpaceBytes)\n\t\t\t}\n\t\t}\n\t\tp.buf.WriteByte(')')\n\t}\n}\n\nfunc (p *pp) doPrint(a []interface{}, addspace, addnewline bool) {\n\tprevString := false\n\tfor fieldnum := 0; fieldnum < len(a); fieldnum++ {\n\t\tp.fmt.clearflags()\n\t\t// always add spaces if we're doing Println\n\t\tfield := a[fieldnum]\n\t\tif fieldnum > 0 {\n\t\t\tisString := field != nil && reflect.TypeOf(field).Kind() == reflect.String\n\t\t\tif addspace || !isString && !prevString {\n\t\t\t\tp.buf.WriteByte(' ')\n\t\t\t}\n\t\t}\n\t\tprevString = p.printField(field, 'v', false, false, 0)\n\t}\n\tif addnewline {\n\t\tp.buf.WriteByte('\\n')\n\t}\n}\n"
  },
  {
    "path": "testData/mockSdk-1.1.2/src/pkg/fmt/scan.go",
    "content": "// Copyright 2010 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage fmt\n\nimport (\n\t\"errors\"\n\t\"io\"\n\t\"math\"\n\t\"os\"\n\t\"reflect\"\n\t\"strconv\"\n\t\"unicode/utf8\"\n)\n\n// runeUnreader is the interface to something that can unread runes.\n// If the object provided to Scan does not satisfy this interface,\n// a local buffer will be used to back up the input, but its contents\n// will be lost when Scan returns.\ntype runeUnreader interface {\n\tUnreadRune() error\n}\n\n// ScanState represents the scanner state passed to custom scanners.\n// Scanners may do rune-at-a-time scanning or ask the ScanState\n// to discover the next space-delimited token.\ntype ScanState interface {\n\t// ReadRune reads the next rune (Unicode code point) from the input.\n\t// If invoked during Scanln, Fscanln, or Sscanln, ReadRune() will\n\t// return EOF after returning the first '\\n' or when reading beyond\n\t// the specified width.\n\tReadRune() (r rune, size int, err error)\n\t// UnreadRune causes the next call to ReadRune to return the same rune.\n\tUnreadRune() error\n\t// SkipSpace skips space in the input. Newlines are treated as space\n\t// unless the scan operation is Scanln, Fscanln or Sscanln, in which case\n\t// a newline is treated as EOF.\n\tSkipSpace()\n\t// Token skips space in the input if skipSpace is true, then returns the\n\t// run of Unicode code points c satisfying f(c).  If f is nil,\n\t// !unicode.IsSpace(c) is used; that is, the token will hold non-space\n\t// characters.  Newlines are treated as space unless the scan operation\n\t// is Scanln, Fscanln or Sscanln, in which case a newline is treated as\n\t// EOF.  The returned slice points to shared data that may be overwritten\n\t// by the next call to Token, a call to a Scan function using the ScanState\n\t// as input, or when the calling Scan method returns.\n\tToken(skipSpace bool, f func(rune) bool) (token []byte, err error)\n\t// Width returns the value of the width option and whether it has been set.\n\t// The unit is Unicode code points.\n\tWidth() (wid int, ok bool)\n\t// Because ReadRune is implemented by the interface, Read should never be\n\t// called by the scanning routines and a valid implementation of\n\t// ScanState may choose always to return an error from Read.\n\tRead(buf []byte) (n int, err error)\n}\n\n// Scanner is implemented by any value that has a Scan method, which scans\n// the input for the representation of a value and stores the result in the\n// receiver, which must be a pointer to be useful.  The Scan method is called\n// for any argument to Scan, Scanf, or Scanln that implements it.\ntype Scanner interface {\n\tScan(state ScanState, verb rune) error\n}\n\n// Scan scans text read from standard input, storing successive\n// space-separated values into successive arguments.  Newlines count\n// as space.  It returns the number of items successfully scanned.\n// If that is less than the number of arguments, err will report why.\nfunc Scan(a ...interface{}) (n int, err error) {\n\treturn Fscan(os.Stdin, a...)\n}\n\n// Scanln is similar to Scan, but stops scanning at a newline and\n// after the final item there must be a newline or EOF.\nfunc Scanln(a ...interface{}) (n int, err error) {\n\treturn Fscanln(os.Stdin, a...)\n}\n\n// Scanf scans text read from standard input, storing successive\n// space-separated values into successive arguments as determined by\n// the format.  It returns the number of items successfully scanned.\nfunc Scanf(format string, a ...interface{}) (n int, err error) {\n\treturn Fscanf(os.Stdin, format, a...)\n}\n\ntype stringReader string\n\nfunc (r *stringReader) Read(b []byte) (n int, err error) {\n\tn = copy(b, *r)\n\t*r = (*r)[n:]\n\tif n == 0 {\n\t\terr = io.EOF\n\t}\n\treturn\n}\n\n// Sscan scans the argument string, storing successive space-separated\n// values into successive arguments.  Newlines count as space.  It\n// returns the number of items successfully scanned.  If that is less\n// than the number of arguments, err will report why.\nfunc Sscan(str string, a ...interface{}) (n int, err error) {\n\treturn Fscan((*stringReader)(&str), a...)\n}\n\n// Sscanln is similar to Sscan, but stops scanning at a newline and\n// after the final item there must be a newline or EOF.\nfunc Sscanln(str string, a ...interface{}) (n int, err error) {\n\treturn Fscanln((*stringReader)(&str), a...)\n}\n\n// Sscanf scans the argument string, storing successive space-separated\n// values into successive arguments as determined by the format.  It\n// returns the number of items successfully parsed.\nfunc Sscanf(str string, format string, a ...interface{}) (n int, err error) {\n\treturn Fscanf((*stringReader)(&str), format, a...)\n}\n\n// Fscan scans text read from r, storing successive space-separated\n// values into successive arguments.  Newlines count as space.  It\n// returns the number of items successfully scanned.  If that is less\n// than the number of arguments, err will report why.\nfunc Fscan(r io.Reader, a ...interface{}) (n int, err error) {\n\ts, old := newScanState(r, true, false)\n\tn, err = s.doScan(a)\n\ts.free(old)\n\treturn\n}\n\n// Fscanln is similar to Fscan, but stops scanning at a newline and\n// after the final item there must be a newline or EOF.\nfunc Fscanln(r io.Reader, a ...interface{}) (n int, err error) {\n\ts, old := newScanState(r, false, true)\n\tn, err = s.doScan(a)\n\ts.free(old)\n\treturn\n}\n\n// Fscanf scans text read from r, storing successive space-separated\n// values into successive arguments as determined by the format.  It\n// returns the number of items successfully parsed.\nfunc Fscanf(r io.Reader, format string, a ...interface{}) (n int, err error) {\n\ts, old := newScanState(r, false, false)\n\tn, err = s.doScanf(format, a)\n\ts.free(old)\n\treturn\n}\n\n// scanError represents an error generated by the scanning software.\n// It's used as a unique signature to identify such errors when recovering.\ntype scanError struct {\n\terr error\n}\n\nconst eof = -1\n\n// ss is the internal implementation of ScanState.\ntype ss struct {\n\trr       io.RuneReader // where to read input\n\tbuf      buffer        // token accumulator\n\tpeekRune rune          // one-rune lookahead\n\tprevRune rune          // last rune returned by ReadRune\n\tcount    int           // runes consumed so far.\n\tatEOF    bool          // already read EOF\n\tssave\n}\n\n// ssave holds the parts of ss that need to be\n// saved and restored on recursive scans.\ntype ssave struct {\n\tvalidSave  bool // is or was a part of an actual ss.\n\tnlIsEnd    bool // whether newline terminates scan\n\tnlIsSpace  bool // whether newline counts as white space\n\tfieldLimit int  // max value of ss.count for this field; fieldLimit <= limit\n\tlimit      int  // max value of ss.count.\n\tmaxWid     int  // width of this field.\n}\n\n// The Read method is only in ScanState so that ScanState\n// satisfies io.Reader. It will never be called when used as\n// intended, so there is no need to make it actually work.\nfunc (s *ss) Read(buf []byte) (n int, err error) {\n\treturn 0, errors.New(\"ScanState's Read should not be called. Use ReadRune\")\n}\n\nfunc (s *ss) ReadRune() (r rune, size int, err error) {\n\tif s.peekRune >= 0 {\n\t\ts.count++\n\t\tr = s.peekRune\n\t\tsize = utf8.RuneLen(r)\n\t\ts.prevRune = r\n\t\ts.peekRune = -1\n\t\treturn\n\t}\n\tif s.atEOF || s.nlIsEnd && s.prevRune == '\\n' || s.count >= s.fieldLimit {\n\t\terr = io.EOF\n\t\treturn\n\t}\n\n\tr, size, err = s.rr.ReadRune()\n\tif err == nil {\n\t\ts.count++\n\t\ts.prevRune = r\n\t} else if err == io.EOF {\n\t\ts.atEOF = true\n\t}\n\treturn\n}\n\nfunc (s *ss) Width() (wid int, ok bool) {\n\tif s.maxWid == hugeWid {\n\t\treturn 0, false\n\t}\n\treturn s.maxWid, true\n}\n\n// The public method returns an error; this private one panics.\n// If getRune reaches EOF, the return value is EOF (-1).\nfunc (s *ss) getRune() (r rune) {\n\tr, _, err := s.ReadRune()\n\tif err != nil {\n\t\tif err == io.EOF {\n\t\t\treturn eof\n\t\t}\n\t\ts.error(err)\n\t}\n\treturn\n}\n\n// mustReadRune turns io.EOF into a panic(io.ErrUnexpectedEOF).\n// It is called in cases such as string scanning where an EOF is a\n// syntax error.\nfunc (s *ss) mustReadRune() (r rune) {\n\tr = s.getRune()\n\tif r == eof {\n\t\ts.error(io.ErrUnexpectedEOF)\n\t}\n\treturn\n}\n\nfunc (s *ss) UnreadRune() error {\n\tif u, ok := s.rr.(runeUnreader); ok {\n\t\tu.UnreadRune()\n\t} else {\n\t\ts.peekRune = s.prevRune\n\t}\n\ts.prevRune = -1\n\ts.count--\n\treturn nil\n}\n\nfunc (s *ss) error(err error) {\n\tpanic(scanError{err})\n}\n\nfunc (s *ss) errorString(err string) {\n\tpanic(scanError{errors.New(err)})\n}\n\nfunc (s *ss) Token(skipSpace bool, f func(rune) bool) (tok []byte, err error) {\n\tdefer func() {\n\t\tif e := recover(); e != nil {\n\t\t\tif se, ok := e.(scanError); ok {\n\t\t\t\terr = se.err\n\t\t\t} else {\n\t\t\t\tpanic(e)\n\t\t\t}\n\t\t}\n\t}()\n\tif f == nil {\n\t\tf = notSpace\n\t}\n\ts.buf = s.buf[:0]\n\ttok = s.token(skipSpace, f)\n\treturn\n}\n\n// space is a copy of the unicode.White_Space ranges,\n// to avoid depending on package unicode.\nvar space = [][2]uint16{\n\t{0x0009, 0x000d},\n\t{0x0020, 0x0020},\n\t{0x0085, 0x0085},\n\t{0x00a0, 0x00a0},\n\t{0x1680, 0x1680},\n\t{0x180e, 0x180e},\n\t{0x2000, 0x200a},\n\t{0x2028, 0x2029},\n\t{0x202f, 0x202f},\n\t{0x205f, 0x205f},\n\t{0x3000, 0x3000},\n}\n\nfunc isSpace(r rune) bool {\n\tif r >= 1<<16 {\n\t\treturn false\n\t}\n\trx := uint16(r)\n\tfor _, rng := range space {\n\t\tif rx < rng[0] {\n\t\t\treturn false\n\t\t}\n\t\tif rx <= rng[1] {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\n// notSpace is the default scanning function used in Token.\nfunc notSpace(r rune) bool {\n\treturn !isSpace(r)\n}\n\n// SkipSpace provides Scan methods the ability to skip space and newline\n// characters in keeping with the current scanning mode set by format strings\n// and Scan/Scanln.\nfunc (s *ss) SkipSpace() {\n\ts.skipSpace(false)\n}\n\n// readRune is a structure to enable reading UTF-8 encoded code points\n// from an io.Reader.  It is used if the Reader given to the scanner does\n// not already implement io.RuneReader.\ntype readRune struct {\n\treader  io.Reader\n\tbuf     [utf8.UTFMax]byte // used only inside ReadRune\n\tpending int               // number of bytes in pendBuf; only >0 for bad UTF-8\n\tpendBuf [utf8.UTFMax]byte // bytes left over\n}\n\n// readByte returns the next byte from the input, which may be\n// left over from a previous read if the UTF-8 was ill-formed.\nfunc (r *readRune) readByte() (b byte, err error) {\n\tif r.pending > 0 {\n\t\tb = r.pendBuf[0]\n\t\tcopy(r.pendBuf[0:], r.pendBuf[1:])\n\t\tr.pending--\n\t\treturn\n\t}\n\tn, err := io.ReadFull(r.reader, r.pendBuf[0:1])\n\tif n != 1 {\n\t\treturn 0, err\n\t}\n\treturn r.pendBuf[0], err\n}\n\n// unread saves the bytes for the next read.\nfunc (r *readRune) unread(buf []byte) {\n\tcopy(r.pendBuf[r.pending:], buf)\n\tr.pending += len(buf)\n}\n\n// ReadRune returns the next UTF-8 encoded code point from the\n// io.Reader inside r.\nfunc (r *readRune) ReadRune() (rr rune, size int, err error) {\n\tr.buf[0], err = r.readByte()\n\tif err != nil {\n\t\treturn 0, 0, err\n\t}\n\tif r.buf[0] < utf8.RuneSelf { // fast check for common ASCII case\n\t\trr = rune(r.buf[0])\n\t\treturn\n\t}\n\tvar n int\n\tfor n = 1; !utf8.FullRune(r.buf[0:n]); n++ {\n\t\tr.buf[n], err = r.readByte()\n\t\tif err != nil {\n\t\t\tif err == io.EOF {\n\t\t\t\terr = nil\n\t\t\t\tbreak\n\t\t\t}\n\t\t\treturn\n\t\t}\n\t}\n\trr, size = utf8.DecodeRune(r.buf[0:n])\n\tif size < n { // an error\n\t\tr.unread(r.buf[size:n])\n\t}\n\treturn\n}\n\nvar ssFree = newCache(func() interface{} { return new(ss) })\n\n// newScanState allocates a new ss struct or grab a cached one.\nfunc newScanState(r io.Reader, nlIsSpace, nlIsEnd bool) (s *ss, old ssave) {\n\t// If the reader is a *ss, then we've got a recursive\n\t// call to Scan, so re-use the scan state.\n\ts, ok := r.(*ss)\n\tif ok {\n\t\told = s.ssave\n\t\ts.limit = s.fieldLimit\n\t\ts.nlIsEnd = nlIsEnd || s.nlIsEnd\n\t\ts.nlIsSpace = nlIsSpace\n\t\treturn\n\t}\n\n\ts = ssFree.get().(*ss)\n\tif rr, ok := r.(io.RuneReader); ok {\n\t\ts.rr = rr\n\t} else {\n\t\ts.rr = &readRune{reader: r}\n\t}\n\ts.nlIsSpace = nlIsSpace\n\ts.nlIsEnd = nlIsEnd\n\ts.prevRune = -1\n\ts.peekRune = -1\n\ts.atEOF = false\n\ts.limit = hugeWid\n\ts.fieldLimit = hugeWid\n\ts.maxWid = hugeWid\n\ts.validSave = true\n\ts.count = 0\n\treturn\n}\n\n// free saves used ss structs in ssFree; avoid an allocation per invocation.\nfunc (s *ss) free(old ssave) {\n\t// If it was used recursively, just restore the old state.\n\tif old.validSave {\n\t\ts.ssave = old\n\t\treturn\n\t}\n\t// Don't hold on to ss structs with large buffers.\n\tif cap(s.buf) > 1024 {\n\t\treturn\n\t}\n\ts.buf = s.buf[:0]\n\ts.rr = nil\n\tssFree.put(s)\n}\n\n// skipSpace skips spaces and maybe newlines.\nfunc (s *ss) skipSpace(stopAtNewline bool) {\n\tfor {\n\t\tr := s.getRune()\n\t\tif r == eof {\n\t\t\treturn\n\t\t}\n\t\tif r == '\\n' {\n\t\t\tif stopAtNewline {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tif s.nlIsSpace {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\ts.errorString(\"unexpected newline\")\n\t\t\treturn\n\t\t}\n\t\tif !isSpace(r) {\n\t\t\ts.UnreadRune()\n\t\t\tbreak\n\t\t}\n\t}\n}\n\n// token returns the next space-delimited string from the input.  It\n// skips white space.  For Scanln, it stops at newlines.  For Scan,\n// newlines are treated as spaces.\nfunc (s *ss) token(skipSpace bool, f func(rune) bool) []byte {\n\tif skipSpace {\n\t\ts.skipSpace(false)\n\t}\n\t// read until white space or newline\n\tfor {\n\t\tr := s.getRune()\n\t\tif r == eof {\n\t\t\tbreak\n\t\t}\n\t\tif !f(r) {\n\t\t\ts.UnreadRune()\n\t\t\tbreak\n\t\t}\n\t\ts.buf.WriteRune(r)\n\t}\n\treturn s.buf\n}\n\n// typeError indicates that the type of the operand did not match the format\nfunc (s *ss) typeError(field interface{}, expected string) {\n\ts.errorString(\"expected field of type pointer to \" + expected + \"; found \" + reflect.TypeOf(field).String())\n}\n\nvar complexError = errors.New(\"syntax error scanning complex number\")\nvar boolError = errors.New(\"syntax error scanning boolean\")\n\nfunc indexRune(s string, r rune) int {\n\tfor i, c := range s {\n\t\tif c == r {\n\t\t\treturn i\n\t\t}\n\t}\n\treturn -1\n}\n\n// consume reads the next rune in the input and reports whether it is in the ok string.\n// If accept is true, it puts the character into the input token.\nfunc (s *ss) consume(ok string, accept bool) bool {\n\tr := s.getRune()\n\tif r == eof {\n\t\treturn false\n\t}\n\tif indexRune(ok, r) >= 0 {\n\t\tif accept {\n\t\t\ts.buf.WriteRune(r)\n\t\t}\n\t\treturn true\n\t}\n\tif r != eof && accept {\n\t\ts.UnreadRune()\n\t}\n\treturn false\n}\n\n// peek reports whether the next character is in the ok string, without consuming it.\nfunc (s *ss) peek(ok string) bool {\n\tr := s.getRune()\n\tif r != eof {\n\t\ts.UnreadRune()\n\t}\n\treturn indexRune(ok, r) >= 0\n}\n\nfunc (s *ss) notEOF() {\n\t// Guarantee there is data to be read.\n\tif r := s.getRune(); r == eof {\n\t\tpanic(io.EOF)\n\t}\n\ts.UnreadRune()\n}\n\n// accept checks the next rune in the input.  If it's a byte (sic) in the string, it puts it in the\n// buffer and returns true. Otherwise it return false.\nfunc (s *ss) accept(ok string) bool {\n\treturn s.consume(ok, true)\n}\n\n// okVerb verifies that the verb is present in the list, setting s.err appropriately if not.\nfunc (s *ss) okVerb(verb rune, okVerbs, typ string) bool {\n\tfor _, v := range okVerbs {\n\t\tif v == verb {\n\t\t\treturn true\n\t\t}\n\t}\n\ts.errorString(\"bad verb %\" + string(verb) + \" for \" + typ)\n\treturn false\n}\n\n// scanBool returns the value of the boolean represented by the next token.\nfunc (s *ss) scanBool(verb rune) bool {\n\ts.skipSpace(false)\n\ts.notEOF()\n\tif !s.okVerb(verb, \"tv\", \"boolean\") {\n\t\treturn false\n\t}\n\t// Syntax-checking a boolean is annoying.  We're not fastidious about case.\n\tswitch s.getRune() {\n\tcase '0':\n\t\treturn false\n\tcase '1':\n\t\treturn true\n\tcase 't', 'T':\n\t\tif s.accept(\"rR\") && (!s.accept(\"uU\") || !s.accept(\"eE\")) {\n\t\t\ts.error(boolError)\n\t\t}\n\t\treturn true\n\tcase 'f', 'F':\n\t\tif s.accept(\"aA\") && (!s.accept(\"lL\") || !s.accept(\"sS\") || !s.accept(\"eE\")) {\n\t\t\ts.error(boolError)\n\t\t}\n\t\treturn false\n\t}\n\treturn false\n}\n\n// Numerical elements\nconst (\n\tbinaryDigits      = \"01\"\n\toctalDigits       = \"01234567\"\n\tdecimalDigits     = \"0123456789\"\n\thexadecimalDigits = \"0123456789aAbBcCdDeEfF\"\n\tsign              = \"+-\"\n\tperiod            = \".\"\n\texponent          = \"eEp\"\n)\n\n// getBase returns the numeric base represented by the verb and its digit string.\nfunc (s *ss) getBase(verb rune) (base int, digits string) {\n\ts.okVerb(verb, \"bdoUxXv\", \"integer\") // sets s.err\n\tbase = 10\n\tdigits = decimalDigits\n\tswitch verb {\n\tcase 'b':\n\t\tbase = 2\n\t\tdigits = binaryDigits\n\tcase 'o':\n\t\tbase = 8\n\t\tdigits = octalDigits\n\tcase 'x', 'X', 'U':\n\t\tbase = 16\n\t\tdigits = hexadecimalDigits\n\t}\n\treturn\n}\n\n// scanNumber returns the numerical string with specified digits starting here.\nfunc (s *ss) scanNumber(digits string, haveDigits bool) string {\n\tif !haveDigits {\n\t\ts.notEOF()\n\t\tif !s.accept(digits) {\n\t\t\ts.errorString(\"expected integer\")\n\t\t}\n\t}\n\tfor s.accept(digits) {\n\t}\n\treturn string(s.buf)\n}\n\n// scanRune returns the next rune value in the input.\nfunc (s *ss) scanRune(bitSize int) int64 {\n\ts.notEOF()\n\tr := int64(s.getRune())\n\tn := uint(bitSize)\n\tx := (r << (64 - n)) >> (64 - n)\n\tif x != r {\n\t\ts.errorString(\"overflow on character value \" + string(r))\n\t}\n\treturn r\n}\n\n// scanBasePrefix reports whether the integer begins with a 0 or 0x,\n// and returns the base, digit string, and whether a zero was found.\n// It is called only if the verb is %v.\nfunc (s *ss) scanBasePrefix() (base int, digits string, found bool) {\n\tif !s.peek(\"0\") {\n\t\treturn 10, decimalDigits, false\n\t}\n\ts.accept(\"0\")\n\tfound = true // We've put a digit into the token buffer.\n\t// Special cases for '0' && '0x'\n\tbase, digits = 8, octalDigits\n\tif s.peek(\"xX\") {\n\t\ts.consume(\"xX\", false)\n\t\tbase, digits = 16, hexadecimalDigits\n\t}\n\treturn\n}\n\n// scanInt returns the value of the integer represented by the next\n// token, checking for overflow.  Any error is stored in s.err.\nfunc (s *ss) scanInt(verb rune, bitSize int) int64 {\n\tif verb == 'c' {\n\t\treturn s.scanRune(bitSize)\n\t}\n\ts.skipSpace(false)\n\ts.notEOF()\n\tbase, digits := s.getBase(verb)\n\thaveDigits := false\n\tif verb == 'U' {\n\t\tif !s.consume(\"U\", false) || !s.consume(\"+\", false) {\n\t\t\ts.errorString(\"bad unicode format \")\n\t\t}\n\t} else {\n\t\ts.accept(sign) // If there's a sign, it will be left in the token buffer.\n\t\tif verb == 'v' {\n\t\t\tbase, digits, haveDigits = s.scanBasePrefix()\n\t\t}\n\t}\n\ttok := s.scanNumber(digits, haveDigits)\n\ti, err := strconv.ParseInt(tok, base, 64)\n\tif err != nil {\n\t\ts.error(err)\n\t}\n\tn := uint(bitSize)\n\tx := (i << (64 - n)) >> (64 - n)\n\tif x != i {\n\t\ts.errorString(\"integer overflow on token \" + tok)\n\t}\n\treturn i\n}\n\n// scanUint returns the value of the unsigned integer represented\n// by the next token, checking for overflow.  Any error is stored in s.err.\nfunc (s *ss) scanUint(verb rune, bitSize int) uint64 {\n\tif verb == 'c' {\n\t\treturn uint64(s.scanRune(bitSize))\n\t}\n\ts.skipSpace(false)\n\ts.notEOF()\n\tbase, digits := s.getBase(verb)\n\thaveDigits := false\n\tif verb == 'U' {\n\t\tif !s.consume(\"U\", false) || !s.consume(\"+\", false) {\n\t\t\ts.errorString(\"bad unicode format \")\n\t\t}\n\t} else if verb == 'v' {\n\t\tbase, digits, haveDigits = s.scanBasePrefix()\n\t}\n\ttok := s.scanNumber(digits, haveDigits)\n\ti, err := strconv.ParseUint(tok, base, 64)\n\tif err != nil {\n\t\ts.error(err)\n\t}\n\tn := uint(bitSize)\n\tx := (i << (64 - n)) >> (64 - n)\n\tif x != i {\n\t\ts.errorString(\"unsigned integer overflow on token \" + tok)\n\t}\n\treturn i\n}\n\n// floatToken returns the floating-point number starting here, no longer than swid\n// if the width is specified. It's not rigorous about syntax because it doesn't check that\n// we have at least some digits, but Atof will do that.\nfunc (s *ss) floatToken() string {\n\ts.buf = s.buf[:0]\n\t// NaN?\n\tif s.accept(\"nN\") && s.accept(\"aA\") && s.accept(\"nN\") {\n\t\treturn string(s.buf)\n\t}\n\t// leading sign?\n\ts.accept(sign)\n\t// Inf?\n\tif s.accept(\"iI\") && s.accept(\"nN\") && s.accept(\"fF\") {\n\t\treturn string(s.buf)\n\t}\n\t// digits?\n\tfor s.accept(decimalDigits) {\n\t}\n\t// decimal point?\n\tif s.accept(period) {\n\t\t// fraction?\n\t\tfor s.accept(decimalDigits) {\n\t\t}\n\t}\n\t// exponent?\n\tif s.accept(exponent) {\n\t\t// leading sign?\n\t\ts.accept(sign)\n\t\t// digits?\n\t\tfor s.accept(decimalDigits) {\n\t\t}\n\t}\n\treturn string(s.buf)\n}\n\n// complexTokens returns the real and imaginary parts of the complex number starting here.\n// The number might be parenthesized and has the format (N+Ni) where N is a floating-point\n// number and there are no spaces within.\nfunc (s *ss) complexTokens() (real, imag string) {\n\t// TODO: accept N and Ni independently?\n\tparens := s.accept(\"(\")\n\treal = s.floatToken()\n\ts.buf = s.buf[:0]\n\t// Must now have a sign.\n\tif !s.accept(\"+-\") {\n\t\ts.error(complexError)\n\t}\n\t// Sign is now in buffer\n\timagSign := string(s.buf)\n\timag = s.floatToken()\n\tif !s.accept(\"i\") {\n\t\ts.error(complexError)\n\t}\n\tif parens && !s.accept(\")\") {\n\t\ts.error(complexError)\n\t}\n\treturn real, imagSign + imag\n}\n\n// convertFloat converts the string to a float64value.\nfunc (s *ss) convertFloat(str string, n int) float64 {\n\tif p := indexRune(str, 'p'); p >= 0 {\n\t\t// Atof doesn't handle power-of-2 exponents,\n\t\t// but they're easy to evaluate.\n\t\tf, err := strconv.ParseFloat(str[:p], n)\n\t\tif err != nil {\n\t\t\t// Put full string into error.\n\t\t\tif e, ok := err.(*strconv.NumError); ok {\n\t\t\t\te.Num = str\n\t\t\t}\n\t\t\ts.error(err)\n\t\t}\n\t\tn, err := strconv.Atoi(str[p+1:])\n\t\tif err != nil {\n\t\t\t// Put full string into error.\n\t\t\tif e, ok := err.(*strconv.NumError); ok {\n\t\t\t\te.Num = str\n\t\t\t}\n\t\t\ts.error(err)\n\t\t}\n\t\treturn math.Ldexp(f, n)\n\t}\n\tf, err := strconv.ParseFloat(str, n)\n\tif err != nil {\n\t\ts.error(err)\n\t}\n\treturn f\n}\n\n// convertComplex converts the next token to a complex128 value.\n// The atof argument is a type-specific reader for the underlying type.\n// If we're reading complex64, atof will parse float32s and convert them\n// to float64's to avoid reproducing this code for each complex type.\nfunc (s *ss) scanComplex(verb rune, n int) complex128 {\n\tif !s.okVerb(verb, floatVerbs, \"complex\") {\n\t\treturn 0\n\t}\n\ts.skipSpace(false)\n\ts.notEOF()\n\tsreal, simag := s.complexTokens()\n\treal := s.convertFloat(sreal, n/2)\n\timag := s.convertFloat(simag, n/2)\n\treturn complex(real, imag)\n}\n\n// convertString returns the string represented by the next input characters.\n// The format of the input is determined by the verb.\nfunc (s *ss) convertString(verb rune) (str string) {\n\tif !s.okVerb(verb, \"svqx\", \"string\") {\n\t\treturn \"\"\n\t}\n\ts.skipSpace(false)\n\ts.notEOF()\n\tswitch verb {\n\tcase 'q':\n\t\tstr = s.quotedString()\n\tcase 'x':\n\t\tstr = s.hexString()\n\tdefault:\n\t\tstr = string(s.token(true, notSpace)) // %s and %v just return the next word\n\t}\n\treturn\n}\n\n// quotedString returns the double- or back-quoted string represented by the next input characters.\nfunc (s *ss) quotedString() string {\n\ts.notEOF()\n\tquote := s.getRune()\n\tswitch quote {\n\tcase '`':\n\t\t// Back-quoted: Anything goes until EOF or back quote.\n\t\tfor {\n\t\t\tr := s.mustReadRune()\n\t\t\tif r == quote {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\ts.buf.WriteRune(r)\n\t\t}\n\t\treturn string(s.buf)\n\tcase '\"':\n\t\t// Double-quoted: Include the quotes and let strconv.Unquote do the backslash escapes.\n\t\ts.buf.WriteRune(quote)\n\t\tfor {\n\t\t\tr := s.mustReadRune()\n\t\t\ts.buf.WriteRune(r)\n\t\t\tif r == '\\\\' {\n\t\t\t\t// In a legal backslash escape, no matter how long, only the character\n\t\t\t\t// immediately after the escape can itself be a backslash or quote.\n\t\t\t\t// Thus we only need to protect the first character after the backslash.\n\t\t\t\tr := s.mustReadRune()\n\t\t\t\ts.buf.WriteRune(r)\n\t\t\t} else if r == '\"' {\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\tresult, err := strconv.Unquote(string(s.buf))\n\t\tif err != nil {\n\t\t\ts.error(err)\n\t\t}\n\t\treturn result\n\tdefault:\n\t\ts.errorString(\"expected quoted string\")\n\t}\n\treturn \"\"\n}\n\n// hexDigit returns the value of the hexadecimal digit\nfunc (s *ss) hexDigit(d rune) int {\n\tdigit := int(d)\n\tswitch digit {\n\tcase '0', '1', '2', '3', '4', '5', '6', '7', '8', '9':\n\t\treturn digit - '0'\n\tcase 'a', 'b', 'c', 'd', 'e', 'f':\n\t\treturn 10 + digit - 'a'\n\tcase 'A', 'B', 'C', 'D', 'E', 'F':\n\t\treturn 10 + digit - 'A'\n\t}\n\ts.errorString(\"Scan: illegal hex digit\")\n\treturn 0\n}\n\n// hexByte returns the next hex-encoded (two-character) byte from the input.\n// There must be either two hexadecimal digits or a space character in the input.\nfunc (s *ss) hexByte() (b byte, ok bool) {\n\trune1 := s.getRune()\n\tif rune1 == eof {\n\t\treturn\n\t}\n\tif isSpace(rune1) {\n\t\ts.UnreadRune()\n\t\treturn\n\t}\n\trune2 := s.mustReadRune()\n\treturn byte(s.hexDigit(rune1)<<4 | s.hexDigit(rune2)), true\n}\n\n// hexString returns the space-delimited hexpair-encoded string.\nfunc (s *ss) hexString() string {\n\ts.notEOF()\n\tfor {\n\t\tb, ok := s.hexByte()\n\t\tif !ok {\n\t\t\tbreak\n\t\t}\n\t\ts.buf.WriteByte(b)\n\t}\n\tif len(s.buf) == 0 {\n\t\ts.errorString(\"Scan: no hex data for %x string\")\n\t\treturn \"\"\n\t}\n\treturn string(s.buf)\n}\n\nconst floatVerbs = \"beEfFgGv\"\n\nconst hugeWid = 1 << 30\n\n// scanOne scans a single value, deriving the scanner from the type of the argument.\nfunc (s *ss) scanOne(verb rune, field interface{}) {\n\ts.buf = s.buf[:0]\n\tvar err error\n\t// If the parameter has its own Scan method, use that.\n\tif v, ok := field.(Scanner); ok {\n\t\terr = v.Scan(s, verb)\n\t\tif err != nil {\n\t\t\tif err == io.EOF {\n\t\t\t\terr = io.ErrUnexpectedEOF\n\t\t\t}\n\t\t\ts.error(err)\n\t\t}\n\t\treturn\n\t}\n\n\tswitch v := field.(type) {\n\tcase *bool:\n\t\t*v = s.scanBool(verb)\n\tcase *complex64:\n\t\t*v = complex64(s.scanComplex(verb, 64))\n\tcase *complex128:\n\t\t*v = s.scanComplex(verb, 128)\n\tcase *int:\n\t\t*v = int(s.scanInt(verb, intBits))\n\tcase *int8:\n\t\t*v = int8(s.scanInt(verb, 8))\n\tcase *int16:\n\t\t*v = int16(s.scanInt(verb, 16))\n\tcase *int32:\n\t\t*v = int32(s.scanInt(verb, 32))\n\tcase *int64:\n\t\t*v = s.scanInt(verb, 64)\n\tcase *uint:\n\t\t*v = uint(s.scanUint(verb, intBits))\n\tcase *uint8:\n\t\t*v = uint8(s.scanUint(verb, 8))\n\tcase *uint16:\n\t\t*v = uint16(s.scanUint(verb, 16))\n\tcase *uint32:\n\t\t*v = uint32(s.scanUint(verb, 32))\n\tcase *uint64:\n\t\t*v = s.scanUint(verb, 64)\n\tcase *uintptr:\n\t\t*v = uintptr(s.scanUint(verb, uintptrBits))\n\t// Floats are tricky because you want to scan in the precision of the result, not\n\t// scan in high precision and convert, in order to preserve the correct error condition.\n\tcase *float32:\n\t\tif s.okVerb(verb, floatVerbs, \"float32\") {\n\t\t\ts.skipSpace(false)\n\t\t\ts.notEOF()\n\t\t\t*v = float32(s.convertFloat(s.floatToken(), 32))\n\t\t}\n\tcase *float64:\n\t\tif s.okVerb(verb, floatVerbs, \"float64\") {\n\t\t\ts.skipSpace(false)\n\t\t\ts.notEOF()\n\t\t\t*v = s.convertFloat(s.floatToken(), 64)\n\t\t}\n\tcase *string:\n\t\t*v = s.convertString(verb)\n\tcase *[]byte:\n\t\t// We scan to string and convert so we get a copy of the data.\n\t\t// If we scanned to bytes, the slice would point at the buffer.\n\t\t*v = []byte(s.convertString(verb))\n\tdefault:\n\t\tval := reflect.ValueOf(v)\n\t\tptr := val\n\t\tif ptr.Kind() != reflect.Ptr {\n\t\t\ts.errorString(\"Scan: type not a pointer: \" + val.Type().String())\n\t\t\treturn\n\t\t}\n\t\tswitch v := ptr.Elem(); v.Kind() {\n\t\tcase reflect.Bool:\n\t\t\tv.SetBool(s.scanBool(verb))\n\t\tcase reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:\n\t\t\tv.SetInt(s.scanInt(verb, v.Type().Bits()))\n\t\tcase reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:\n\t\t\tv.SetUint(s.scanUint(verb, v.Type().Bits()))\n\t\tcase reflect.String:\n\t\t\tv.SetString(s.convertString(verb))\n\t\tcase reflect.Slice:\n\t\t\t// For now, can only handle (renamed) []byte.\n\t\t\ttyp := v.Type()\n\t\t\tif typ.Elem().Kind() != reflect.Uint8 {\n\t\t\t\ts.errorString(\"Scan: can't handle type: \" + val.Type().String())\n\t\t\t}\n\t\t\tstr := s.convertString(verb)\n\t\t\tv.Set(reflect.MakeSlice(typ, len(str), len(str)))\n\t\t\tfor i := 0; i < len(str); i++ {\n\t\t\t\tv.Index(i).SetUint(uint64(str[i]))\n\t\t\t}\n\t\tcase reflect.Float32, reflect.Float64:\n\t\t\ts.skipSpace(false)\n\t\t\ts.notEOF()\n\t\t\tv.SetFloat(s.convertFloat(s.floatToken(), v.Type().Bits()))\n\t\tcase reflect.Complex64, reflect.Complex128:\n\t\t\tv.SetComplex(s.scanComplex(verb, v.Type().Bits()))\n\t\tdefault:\n\t\t\ts.errorString(\"Scan: can't handle type: \" + val.Type().String())\n\t\t}\n\t}\n}\n\n// errorHandler turns local panics into error returns.\nfunc errorHandler(errp *error) {\n\tif e := recover(); e != nil {\n\t\tif se, ok := e.(scanError); ok { // catch local error\n\t\t\t*errp = se.err\n\t\t} else if eof, ok := e.(error); ok && eof == io.EOF { // out of input\n\t\t\t*errp = eof\n\t\t} else {\n\t\t\tpanic(e)\n\t\t}\n\t}\n}\n\n// doScan does the real work for scanning without a format string.\nfunc (s *ss) doScan(a []interface{}) (numProcessed int, err error) {\n\tdefer errorHandler(&err)\n\tfor _, field := range a {\n\t\ts.scanOne('v', field)\n\t\tnumProcessed++\n\t}\n\t// Check for newline if required.\n\tif !s.nlIsSpace {\n\t\tfor {\n\t\t\tr := s.getRune()\n\t\t\tif r == '\\n' || r == eof {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tif !isSpace(r) {\n\t\t\t\ts.errorString(\"Scan: expected newline\")\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\treturn\n}\n\n// advance determines whether the next characters in the input match\n// those of the format.  It returns the number of bytes (sic) consumed\n// in the format. Newlines included, all runs of space characters in\n// either input or format behave as a single space. This routine also\n// handles the %% case.  If the return value is zero, either format\n// starts with a % (with no following %) or the input is empty.\n// If it is negative, the input did not match the string.\nfunc (s *ss) advance(format string) (i int) {\n\tfor i < len(format) {\n\t\tfmtc, w := utf8.DecodeRuneInString(format[i:])\n\t\tif fmtc == '%' {\n\t\t\t// %% acts like a real percent\n\t\t\tnextc, _ := utf8.DecodeRuneInString(format[i+w:]) // will not match % if string is empty\n\t\t\tif nextc != '%' {\n\t\t\t\treturn\n\t\t\t}\n\t\t\ti += w // skip the first %\n\t\t}\n\t\tsawSpace := false\n\t\tfor isSpace(fmtc) && i < len(format) {\n\t\t\tsawSpace = true\n\t\t\ti += w\n\t\t\tfmtc, w = utf8.DecodeRuneInString(format[i:])\n\t\t}\n\t\tif sawSpace {\n\t\t\t// There was space in the format, so there should be space (EOF)\n\t\t\t// in the input.\n\t\t\tinputc := s.getRune()\n\t\t\tif inputc == eof || inputc == '\\n' {\n\t\t\t\t// If we've reached a newline, stop now; don't read ahead.\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif !isSpace(inputc) {\n\t\t\t\t// Space in format but not in input: error\n\t\t\t\ts.errorString(\"expected space in input to match format\")\n\t\t\t}\n\t\t\ts.skipSpace(true)\n\t\t\tcontinue\n\t\t}\n\t\tinputc := s.mustReadRune()\n\t\tif fmtc != inputc {\n\t\t\ts.UnreadRune()\n\t\t\treturn -1\n\t\t}\n\t\ti += w\n\t}\n\treturn\n}\n\n// doScanf does the real work when scanning with a format string.\n//  At the moment, it handles only pointers to basic types.\nfunc (s *ss) doScanf(format string, a []interface{}) (numProcessed int, err error) {\n\tdefer errorHandler(&err)\n\tend := len(format) - 1\n\t// We process one item per non-trivial format\n\tfor i := 0; i <= end; {\n\t\tw := s.advance(format[i:])\n\t\tif w > 0 {\n\t\t\ti += w\n\t\t\tcontinue\n\t\t}\n\t\t// Either we failed to advance, we have a percent character, or we ran out of input.\n\t\tif format[i] != '%' {\n\t\t\t// Can't advance format.  Why not?\n\t\t\tif w < 0 {\n\t\t\t\ts.errorString(\"input does not match format\")\n\t\t\t}\n\t\t\t// Otherwise at EOF; \"too many operands\" error handled below\n\t\t\tbreak\n\t\t}\n\t\ti++ // % is one byte\n\n\t\t// do we have 20 (width)?\n\t\tvar widPresent bool\n\t\ts.maxWid, widPresent, i = parsenum(format, i, end)\n\t\tif !widPresent {\n\t\t\ts.maxWid = hugeWid\n\t\t}\n\t\ts.fieldLimit = s.limit\n\t\tif f := s.count + s.maxWid; f < s.fieldLimit {\n\t\t\ts.fieldLimit = f\n\t\t}\n\n\t\tc, w := utf8.DecodeRuneInString(format[i:])\n\t\ti += w\n\n\t\tif numProcessed >= len(a) { // out of operands\n\t\t\ts.errorString(\"too few operands for format %\" + format[i-w:])\n\t\t\tbreak\n\t\t}\n\t\tfield := a[numProcessed]\n\n\t\ts.scanOne(c, field)\n\t\tnumProcessed++\n\t\ts.fieldLimit = s.limit\n\t}\n\tif numProcessed < len(a) {\n\t\ts.errorString(\"too many operands\")\n\t}\n\treturn\n}\n"
  },
  {
    "path": "testData/mockSdk-1.1.2/src/pkg/fmt/stringer_test.go",
    "content": "// Copyright 2010 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage fmt_test\n\nimport (\n\t. \"fmt\"\n\t\"testing\"\n)\n\ntype TI int\ntype TI8 int8\ntype TI16 int16\ntype TI32 int32\ntype TI64 int64\ntype TU uint\ntype TU8 uint8\ntype TU16 uint16\ntype TU32 uint32\ntype TU64 uint64\ntype TUI uintptr\ntype TF float64\ntype TF32 float32\ntype TF64 float64\ntype TB bool\ntype TS string\n\nfunc (v TI) String() string   { return Sprintf(\"I: %d\", int(v)) }\nfunc (v TI8) String() string  { return Sprintf(\"I8: %d\", int8(v)) }\nfunc (v TI16) String() string { return Sprintf(\"I16: %d\", int16(v)) }\nfunc (v TI32) String() string { return Sprintf(\"I32: %d\", int32(v)) }\nfunc (v TI64) String() string { return Sprintf(\"I64: %d\", int64(v)) }\nfunc (v TU) String() string   { return Sprintf(\"U: %d\", uint(v)) }\nfunc (v TU8) String() string  { return Sprintf(\"U8: %d\", uint8(v)) }\nfunc (v TU16) String() string { return Sprintf(\"U16: %d\", uint16(v)) }\nfunc (v TU32) String() string { return Sprintf(\"U32: %d\", uint32(v)) }\nfunc (v TU64) String() string { return Sprintf(\"U64: %d\", uint64(v)) }\nfunc (v TUI) String() string  { return Sprintf(\"UI: %d\", uintptr(v)) }\nfunc (v TF) String() string   { return Sprintf(\"F: %f\", float64(v)) }\nfunc (v TF32) String() string { return Sprintf(\"F32: %f\", float32(v)) }\nfunc (v TF64) String() string { return Sprintf(\"F64: %f\", float64(v)) }\nfunc (v TB) String() string   { return Sprintf(\"B: %t\", bool(v)) }\nfunc (v TS) String() string   { return Sprintf(\"S: %q\", string(v)) }\n\nfunc check(t *testing.T, got, want string) {\n\tif got != want {\n\t\tt.Error(got, \"!=\", want)\n\t}\n}\n\nfunc TestStringer(t *testing.T) {\n\ts := Sprintf(\"%v %v %v %v %v\", TI(0), TI8(1), TI16(2), TI32(3), TI64(4))\n\tcheck(t, s, \"I: 0 I8: 1 I16: 2 I32: 3 I64: 4\")\n\ts = Sprintf(\"%v %v %v %v %v %v\", TU(5), TU8(6), TU16(7), TU32(8), TU64(9), TUI(10))\n\tcheck(t, s, \"U: 5 U8: 6 U16: 7 U32: 8 U64: 9 UI: 10\")\n\ts = Sprintf(\"%v %v %v\", TF(1.0), TF32(2.0), TF64(3.0))\n\tcheck(t, s, \"F: 1.000000 F32: 2.000000 F64: 3.000000\")\n\ts = Sprintf(\"%v %v\", TB(true), TS(\"x\"))\n\tcheck(t, s, \"B: true S: \\\"x\\\"\")\n}\n"
  },
  {
    "path": "testData/mockSdk-1.1.2/src/pkg/go/ast/ast.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package ast declares the types used to represent syntax trees for Go\n// packages.\n//\npackage ast\n\nimport (\n\t\"go/token\"\n\t\"strings\"\n\t\"unicode\"\n\t\"unicode/utf8\"\n)\n\n// ----------------------------------------------------------------------------\n// Interfaces\n//\n// There are 3 main classes of nodes: Expressions and type nodes,\n// statement nodes, and declaration nodes. The node names usually\n// match the corresponding Go spec production names to which they\n// correspond. The node fields correspond to the individual parts\n// of the respective productions.\n//\n// All nodes contain position information marking the beginning of\n// the corresponding source text segment; it is accessible via the\n// Pos accessor method. Nodes may contain additional position info\n// for language constructs where comments may be found between parts\n// of the construct (typically any larger, parenthesized subpart).\n// That position information is needed to properly position comments\n// when printing the construct.\n\n// All node types implement the Node interface.\ntype Node interface {\n\tPos() token.Pos // position of first character belonging to the node\n\tEnd() token.Pos // position of first character immediately after the node\n}\n\n// All expression nodes implement the Expr interface.\ntype Expr interface {\n\tNode\n\texprNode()\n}\n\n// All statement nodes implement the Stmt interface.\ntype Stmt interface {\n\tNode\n\tstmtNode()\n}\n\n// All declaration nodes implement the Decl interface.\ntype Decl interface {\n\tNode\n\tdeclNode()\n}\n\n// ----------------------------------------------------------------------------\n// Comments\n\n// A Comment node represents a single //-style or /*-style comment.\ntype Comment struct {\n\tSlash token.Pos // position of \"/\" starting the comment\n\tText  string    // comment text (excluding '\\n' for //-style comments)\n}\n\nfunc (c *Comment) Pos() token.Pos { return c.Slash }\nfunc (c *Comment) End() token.Pos { return token.Pos(int(c.Slash) + len(c.Text)) }\n\n// A CommentGroup represents a sequence of comments\n// with no other tokens and no empty lines between.\n//\ntype CommentGroup struct {\n\tList []*Comment // len(List) > 0\n}\n\nfunc (g *CommentGroup) Pos() token.Pos { return g.List[0].Pos() }\nfunc (g *CommentGroup) End() token.Pos { return g.List[len(g.List)-1].End() }\n\nfunc isWhitespace(ch byte) bool { return ch == ' ' || ch == '\\t' || ch == '\\n' || ch == '\\r' }\n\nfunc stripTrailingWhitespace(s string) string {\n\ti := len(s)\n\tfor i > 0 && isWhitespace(s[i-1]) {\n\t\ti--\n\t}\n\treturn s[0:i]\n}\n\n// Text returns the text of the comment.\n// Comment markers (//, /*, and */), the first space of a line comment, and\n// leading and trailing empty lines are removed. Multiple empty lines are\n// reduced to one, and trailing space on lines is trimmed. Unless the result\n// is empty, it is newline-terminated.\n//\nfunc (g *CommentGroup) Text() string {\n\tif g == nil {\n\t\treturn \"\"\n\t}\n\tcomments := make([]string, len(g.List))\n\tfor i, c := range g.List {\n\t\tcomments[i] = string(c.Text)\n\t}\n\n\tlines := make([]string, 0, 10) // most comments are less than 10 lines\n\tfor _, c := range comments {\n\t\t// Remove comment markers.\n\t\t// The parser has given us exactly the comment text.\n\t\tswitch c[1] {\n\t\tcase '/':\n\t\t\t//-style comment (no newline at the end)\n\t\t\tc = c[2:]\n\t\t\t// strip first space - required for Example tests\n\t\t\tif len(c) > 0 && c[0] == ' ' {\n\t\t\t\tc = c[1:]\n\t\t\t}\n\t\tcase '*':\n\t\t\t/*-style comment */\n\t\t\tc = c[2 : len(c)-2]\n\t\t}\n\n\t\t// Split on newlines.\n\t\tcl := strings.Split(c, \"\\n\")\n\n\t\t// Walk lines, stripping trailing white space and adding to list.\n\t\tfor _, l := range cl {\n\t\t\tlines = append(lines, stripTrailingWhitespace(l))\n\t\t}\n\t}\n\n\t// Remove leading blank lines; convert runs of\n\t// interior blank lines to a single blank line.\n\tn := 0\n\tfor _, line := range lines {\n\t\tif line != \"\" || n > 0 && lines[n-1] != \"\" {\n\t\t\tlines[n] = line\n\t\t\tn++\n\t\t}\n\t}\n\tlines = lines[0:n]\n\n\t// Add final \"\" entry to get trailing newline from Join.\n\tif n > 0 && lines[n-1] != \"\" {\n\t\tlines = append(lines, \"\")\n\t}\n\n\treturn strings.Join(lines, \"\\n\")\n}\n\n// ----------------------------------------------------------------------------\n// Expressions and types\n\n// A Field represents a Field declaration list in a struct type,\n// a method list in an interface type, or a parameter/result declaration\n// in a signature.\n//\ntype Field struct {\n\tDoc     *CommentGroup // associated documentation; or nil\n\tNames   []*Ident      // field/method/parameter names; or nil if anonymous field\n\tType    Expr          // field/method/parameter type\n\tTag     *BasicLit     // field tag; or nil\n\tComment *CommentGroup // line comments; or nil\n}\n\nfunc (f *Field) Pos() token.Pos {\n\tif len(f.Names) > 0 {\n\t\treturn f.Names[0].Pos()\n\t}\n\treturn f.Type.Pos()\n}\n\nfunc (f *Field) End() token.Pos {\n\tif f.Tag != nil {\n\t\treturn f.Tag.End()\n\t}\n\treturn f.Type.End()\n}\n\n// A FieldList represents a list of Fields, enclosed by parentheses or braces.\ntype FieldList struct {\n\tOpening token.Pos // position of opening parenthesis/brace, if any\n\tList    []*Field  // field list; or nil\n\tClosing token.Pos // position of closing parenthesis/brace, if any\n}\n\nfunc (f *FieldList) Pos() token.Pos {\n\tif f.Opening.IsValid() {\n\t\treturn f.Opening\n\t}\n\t// the list should not be empty in this case;\n\t// be conservative and guard against bad ASTs\n\tif len(f.List) > 0 {\n\t\treturn f.List[0].Pos()\n\t}\n\treturn token.NoPos\n}\n\nfunc (f *FieldList) End() token.Pos {\n\tif f.Closing.IsValid() {\n\t\treturn f.Closing + 1\n\t}\n\t// the list should not be empty in this case;\n\t// be conservative and guard against bad ASTs\n\tif n := len(f.List); n > 0 {\n\t\treturn f.List[n-1].End()\n\t}\n\treturn token.NoPos\n}\n\n// NumFields returns the number of (named and anonymous fields) in a FieldList.\nfunc (f *FieldList) NumFields() int {\n\tn := 0\n\tif f != nil {\n\t\tfor _, g := range f.List {\n\t\t\tm := len(g.Names)\n\t\t\tif m == 0 {\n\t\t\t\tm = 1 // anonymous field\n\t\t\t}\n\t\t\tn += m\n\t\t}\n\t}\n\treturn n\n}\n\n// An expression is represented by a tree consisting of one\n// or more of the following concrete expression nodes.\n//\ntype (\n\t// A BadExpr node is a placeholder for expressions containing\n\t// syntax errors for which no correct expression nodes can be\n\t// created.\n\t//\n\tBadExpr struct {\n\t\tFrom, To token.Pos // position range of bad expression\n\t}\n\n\t// An Ident node represents an identifier.\n\tIdent struct {\n\t\tNamePos token.Pos // identifier position\n\t\tName    string    // identifier name\n\t\tObj     *Object   // denoted object; or nil\n\t}\n\n\t// An Ellipsis node stands for the \"...\" type in a\n\t// parameter list or the \"...\" length in an array type.\n\t//\n\tEllipsis struct {\n\t\tEllipsis token.Pos // position of \"...\"\n\t\tElt      Expr      // ellipsis element type (parameter lists only); or nil\n\t}\n\n\t// A BasicLit node represents a literal of basic type.\n\tBasicLit struct {\n\t\tValuePos token.Pos   // literal position\n\t\tKind     token.Token // token.INT, token.FLOAT, token.IMAG, token.CHAR, or token.STRING\n\t\tValue    string      // literal string; e.g. 42, 0x7f, 3.14, 1e-9, 2.4i, 'a', '\\x7f', \"foo\" or `\\m\\n\\o`\n\t}\n\n\t// A FuncLit node represents a function literal.\n\tFuncLit struct {\n\t\tType *FuncType  // function type\n\t\tBody *BlockStmt // function body\n\t}\n\n\t// A CompositeLit node represents a composite literal.\n\tCompositeLit struct {\n\t\tType   Expr      // literal type; or nil\n\t\tLbrace token.Pos // position of \"{\"\n\t\tElts   []Expr    // list of composite elements; or nil\n\t\tRbrace token.Pos // position of \"}\"\n\t}\n\n\t// A ParenExpr node represents a parenthesized expression.\n\tParenExpr struct {\n\t\tLparen token.Pos // position of \"(\"\n\t\tX      Expr      // parenthesized expression\n\t\tRparen token.Pos // position of \")\"\n\t}\n\n\t// A SelectorExpr node represents an expression followed by a selector.\n\tSelectorExpr struct {\n\t\tX   Expr   // expression\n\t\tSel *Ident // field selector\n\t}\n\n\t// An IndexExpr node represents an expression followed by an index.\n\tIndexExpr struct {\n\t\tX      Expr      // expression\n\t\tLbrack token.Pos // position of \"[\"\n\t\tIndex  Expr      // index expression\n\t\tRbrack token.Pos // position of \"]\"\n\t}\n\n\t// An SliceExpr node represents an expression followed by slice indices.\n\tSliceExpr struct {\n\t\tX      Expr      // expression\n\t\tLbrack token.Pos // position of \"[\"\n\t\tLow    Expr      // begin of slice range; or nil\n\t\tHigh   Expr      // end of slice range; or nil\n\t\tMax    Expr      // maximum capacity of slice; or nil\n\t\tSlice3 bool      // true if 3-index slice (2 colons present)\n\t\tRbrack token.Pos // position of \"]\"\n\t}\n\n\t// A TypeAssertExpr node represents an expression followed by a\n\t// type assertion.\n\t//\n\tTypeAssertExpr struct {\n\t\tX      Expr      // expression\n\t\tLparen token.Pos // position of \"(\"\n\t\tType   Expr      // asserted type; nil means type switch X.(type)\n\t\tRparen token.Pos // position of \")\"\n\t}\n\n\t// A CallExpr node represents an expression followed by an argument list.\n\tCallExpr struct {\n\t\tFun      Expr      // function expression\n\t\tLparen   token.Pos // position of \"(\"\n\t\tArgs     []Expr    // function arguments; or nil\n\t\tEllipsis token.Pos // position of \"...\", if any\n\t\tRparen   token.Pos // position of \")\"\n\t}\n\n\t// A StarExpr node represents an expression of the form \"*\" Expression.\n\t// Semantically it could be a unary \"*\" expression, or a pointer type.\n\t//\n\tStarExpr struct {\n\t\tStar token.Pos // position of \"*\"\n\t\tX    Expr      // operand\n\t}\n\n\t// A UnaryExpr node represents a unary expression.\n\t// Unary \"*\" expressions are represented via StarExpr nodes.\n\t//\n\tUnaryExpr struct {\n\t\tOpPos token.Pos   // position of Op\n\t\tOp    token.Token // operator\n\t\tX     Expr        // operand\n\t}\n\n\t// A BinaryExpr node represents a binary expression.\n\tBinaryExpr struct {\n\t\tX     Expr        // left operand\n\t\tOpPos token.Pos   // position of Op\n\t\tOp    token.Token // operator\n\t\tY     Expr        // right operand\n\t}\n\n\t// A KeyValueExpr node represents (key : value) pairs\n\t// in composite literals.\n\t//\n\tKeyValueExpr struct {\n\t\tKey   Expr\n\t\tColon token.Pos // position of \":\"\n\t\tValue Expr\n\t}\n)\n\n// The direction of a channel type is indicated by one\n// of the following constants.\n//\ntype ChanDir int\n\nconst (\n\tSEND ChanDir = 1 << iota\n\tRECV\n)\n\n// A type is represented by a tree consisting of one\n// or more of the following type-specific expression\n// nodes.\n//\ntype (\n\t// An ArrayType node represents an array or slice type.\n\tArrayType struct {\n\t\tLbrack token.Pos // position of \"[\"\n\t\tLen    Expr      // Ellipsis node for [...]T array types, nil for slice types\n\t\tElt    Expr      // element type\n\t}\n\n\t// A StructType node represents a struct type.\n\tStructType struct {\n\t\tStruct     token.Pos  // position of \"struct\" keyword\n\t\tFields     *FieldList // list of field declarations\n\t\tIncomplete bool       // true if (source) fields are missing in the Fields list\n\t}\n\n\t// Pointer types are represented via StarExpr nodes.\n\n\t// A FuncType node represents a function type.\n\tFuncType struct {\n\t\tFunc    token.Pos  // position of \"func\" keyword (token.NoPos if there is no \"func\")\n\t\tParams  *FieldList // (incoming) parameters; non-nil\n\t\tResults *FieldList // (outgoing) results; or nil\n\t}\n\n\t// An InterfaceType node represents an interface type.\n\tInterfaceType struct {\n\t\tInterface  token.Pos  // position of \"interface\" keyword\n\t\tMethods    *FieldList // list of methods\n\t\tIncomplete bool       // true if (source) methods are missing in the Methods list\n\t}\n\n\t// A MapType node represents a map type.\n\tMapType struct {\n\t\tMap   token.Pos // position of \"map\" keyword\n\t\tKey   Expr\n\t\tValue Expr\n\t}\n\n\t// A ChanType node represents a channel type.\n\tChanType struct {\n\t\tBegin token.Pos // position of \"chan\" keyword or \"<-\" (whichever comes first)\n\t\tArrow token.Pos // position of \"<-\" (token.NoPos if there is no \"<-\")\n\t\tDir   ChanDir   // channel direction\n\t\tValue Expr      // value type\n\t}\n)\n\n// Pos and End implementations for expression/type nodes.\n//\nfunc (x *BadExpr) Pos() token.Pos  { return x.From }\nfunc (x *Ident) Pos() token.Pos    { return x.NamePos }\nfunc (x *Ellipsis) Pos() token.Pos { return x.Ellipsis }\nfunc (x *BasicLit) Pos() token.Pos { return x.ValuePos }\nfunc (x *FuncLit) Pos() token.Pos  { return x.Type.Pos() }\nfunc (x *CompositeLit) Pos() token.Pos {\n\tif x.Type != nil {\n\t\treturn x.Type.Pos()\n\t}\n\treturn x.Lbrace\n}\nfunc (x *ParenExpr) Pos() token.Pos      { return x.Lparen }\nfunc (x *SelectorExpr) Pos() token.Pos   { return x.X.Pos() }\nfunc (x *IndexExpr) Pos() token.Pos      { return x.X.Pos() }\nfunc (x *SliceExpr) Pos() token.Pos      { return x.X.Pos() }\nfunc (x *TypeAssertExpr) Pos() token.Pos { return x.X.Pos() }\nfunc (x *CallExpr) Pos() token.Pos       { return x.Fun.Pos() }\nfunc (x *StarExpr) Pos() token.Pos       { return x.Star }\nfunc (x *UnaryExpr) Pos() token.Pos      { return x.OpPos }\nfunc (x *BinaryExpr) Pos() token.Pos     { return x.X.Pos() }\nfunc (x *KeyValueExpr) Pos() token.Pos   { return x.Key.Pos() }\nfunc (x *ArrayType) Pos() token.Pos      { return x.Lbrack }\nfunc (x *StructType) Pos() token.Pos     { return x.Struct }\nfunc (x *FuncType) Pos() token.Pos {\n\tif x.Func.IsValid() || x.Params == nil { // see issue 3870\n\t\treturn x.Func\n\t}\n\treturn x.Params.Pos() // interface method declarations have no \"func\" keyword\n}\nfunc (x *InterfaceType) Pos() token.Pos { return x.Interface }\nfunc (x *MapType) Pos() token.Pos       { return x.Map }\nfunc (x *ChanType) Pos() token.Pos      { return x.Begin }\n\nfunc (x *BadExpr) End() token.Pos { return x.To }\nfunc (x *Ident) End() token.Pos   { return token.Pos(int(x.NamePos) + len(x.Name)) }\nfunc (x *Ellipsis) End() token.Pos {\n\tif x.Elt != nil {\n\t\treturn x.Elt.End()\n\t}\n\treturn x.Ellipsis + 3 // len(\"...\")\n}\nfunc (x *BasicLit) End() token.Pos       { return token.Pos(int(x.ValuePos) + len(x.Value)) }\nfunc (x *FuncLit) End() token.Pos        { return x.Body.End() }\nfunc (x *CompositeLit) End() token.Pos   { return x.Rbrace + 1 }\nfunc (x *ParenExpr) End() token.Pos      { return x.Rparen + 1 }\nfunc (x *SelectorExpr) End() token.Pos   { return x.Sel.End() }\nfunc (x *IndexExpr) End() token.Pos      { return x.Rbrack + 1 }\nfunc (x *SliceExpr) End() token.Pos      { return x.Rbrack + 1 }\nfunc (x *TypeAssertExpr) End() token.Pos { return x.Rparen + 1 }\nfunc (x *CallExpr) End() token.Pos       { return x.Rparen + 1 }\nfunc (x *StarExpr) End() token.Pos       { return x.X.End() }\nfunc (x *UnaryExpr) End() token.Pos      { return x.X.End() }\nfunc (x *BinaryExpr) End() token.Pos     { return x.Y.End() }\nfunc (x *KeyValueExpr) End() token.Pos   { return x.Value.End() }\nfunc (x *ArrayType) End() token.Pos      { return x.Elt.End() }\nfunc (x *StructType) End() token.Pos     { return x.Fields.End() }\nfunc (x *FuncType) End() token.Pos {\n\tif x.Results != nil {\n\t\treturn x.Results.End()\n\t}\n\treturn x.Params.End()\n}\nfunc (x *InterfaceType) End() token.Pos { return x.Methods.End() }\nfunc (x *MapType) End() token.Pos       { return x.Value.End() }\nfunc (x *ChanType) End() token.Pos      { return x.Value.End() }\n\n// exprNode() ensures that only expression/type nodes can be\n// assigned to an ExprNode.\n//\nfunc (*BadExpr) exprNode()        {}\nfunc (*Ident) exprNode()          {}\nfunc (*Ellipsis) exprNode()       {}\nfunc (*BasicLit) exprNode()       {}\nfunc (*FuncLit) exprNode()        {}\nfunc (*CompositeLit) exprNode()   {}\nfunc (*ParenExpr) exprNode()      {}\nfunc (*SelectorExpr) exprNode()   {}\nfunc (*IndexExpr) exprNode()      {}\nfunc (*SliceExpr) exprNode()      {}\nfunc (*TypeAssertExpr) exprNode() {}\nfunc (*CallExpr) exprNode()       {}\nfunc (*StarExpr) exprNode()       {}\nfunc (*UnaryExpr) exprNode()      {}\nfunc (*BinaryExpr) exprNode()     {}\nfunc (*KeyValueExpr) exprNode()   {}\n\nfunc (*ArrayType) exprNode()     {}\nfunc (*StructType) exprNode()    {}\nfunc (*FuncType) exprNode()      {}\nfunc (*InterfaceType) exprNode() {}\nfunc (*MapType) exprNode()       {}\nfunc (*ChanType) exprNode()      {}\n\n// ----------------------------------------------------------------------------\n// Convenience functions for Idents\n\n// NewIdent creates a new Ident without position.\n// Useful for ASTs generated by code other than the Go parser.\n//\nfunc NewIdent(name string) *Ident { return &Ident{token.NoPos, name, nil} }\n\n// IsExported reports whether name is an exported Go symbol\n// (that is, whether it begins with an upper-case letter).\n//\nfunc IsExported(name string) bool {\n\tch, _ := utf8.DecodeRuneInString(name)\n\treturn unicode.IsUpper(ch)\n}\n\n// IsExported reports whether id is an exported Go symbol\n// (that is, whether it begins with an uppercase letter).\n//\nfunc (id *Ident) IsExported() bool { return IsExported(id.Name) }\n\nfunc (id *Ident) String() string {\n\tif id != nil {\n\t\treturn id.Name\n\t}\n\treturn \"<nil>\"\n}\n\n// ----------------------------------------------------------------------------\n// Statements\n\n// A statement is represented by a tree consisting of one\n// or more of the following concrete statement nodes.\n//\ntype (\n\t// A BadStmt node is a placeholder for statements containing\n\t// syntax errors for which no correct statement nodes can be\n\t// created.\n\t//\n\tBadStmt struct {\n\t\tFrom, To token.Pos // position range of bad statement\n\t}\n\n\t// A DeclStmt node represents a declaration in a statement list.\n\tDeclStmt struct {\n\t\tDecl Decl // *GenDecl with CONST, TYPE, or VAR token\n\t}\n\n\t// An EmptyStmt node represents an empty statement.\n\t// The \"position\" of the empty statement is the position\n\t// of the immediately preceding semicolon.\n\t//\n\tEmptyStmt struct {\n\t\tSemicolon token.Pos // position of preceding \";\"\n\t}\n\n\t// A LabeledStmt node represents a labeled statement.\n\tLabeledStmt struct {\n\t\tLabel *Ident\n\t\tColon token.Pos // position of \":\"\n\t\tStmt  Stmt\n\t}\n\n\t// An ExprStmt node represents a (stand-alone) expression\n\t// in a statement list.\n\t//\n\tExprStmt struct {\n\t\tX Expr // expression\n\t}\n\n\t// A SendStmt node represents a send statement.\n\tSendStmt struct {\n\t\tChan  Expr\n\t\tArrow token.Pos // position of \"<-\"\n\t\tValue Expr\n\t}\n\n\t// An IncDecStmt node represents an increment or decrement statement.\n\tIncDecStmt struct {\n\t\tX      Expr\n\t\tTokPos token.Pos   // position of Tok\n\t\tTok    token.Token // INC or DEC\n\t}\n\n\t// An AssignStmt node represents an assignment or\n\t// a short variable declaration.\n\t//\n\tAssignStmt struct {\n\t\tLhs    []Expr\n\t\tTokPos token.Pos   // position of Tok\n\t\tTok    token.Token // assignment token, DEFINE\n\t\tRhs    []Expr\n\t}\n\n\t// A GoStmt node represents a go statement.\n\tGoStmt struct {\n\t\tGo   token.Pos // position of \"go\" keyword\n\t\tCall *CallExpr\n\t}\n\n\t// A DeferStmt node represents a defer statement.\n\tDeferStmt struct {\n\t\tDefer token.Pos // position of \"defer\" keyword\n\t\tCall  *CallExpr\n\t}\n\n\t// A ReturnStmt node represents a return statement.\n\tReturnStmt struct {\n\t\tReturn  token.Pos // position of \"return\" keyword\n\t\tResults []Expr    // result expressions; or nil\n\t}\n\n\t// A BranchStmt node represents a break, continue, goto,\n\t// or fallthrough statement.\n\t//\n\tBranchStmt struct {\n\t\tTokPos token.Pos   // position of Tok\n\t\tTok    token.Token // keyword token (BREAK, CONTINUE, GOTO, FALLTHROUGH)\n\t\tLabel  *Ident      // label name; or nil\n\t}\n\n\t// A BlockStmt node represents a braced statement list.\n\tBlockStmt struct {\n\t\tLbrace token.Pos // position of \"{\"\n\t\tList   []Stmt\n\t\tRbrace token.Pos // position of \"}\"\n\t}\n\n\t// An IfStmt node represents an if statement.\n\tIfStmt struct {\n\t\tIf   token.Pos // position of \"if\" keyword\n\t\tInit Stmt      // initialization statement; or nil\n\t\tCond Expr      // condition\n\t\tBody *BlockStmt\n\t\tElse Stmt // else branch; or nil\n\t}\n\n\t// A CaseClause represents a case of an expression or type switch statement.\n\tCaseClause struct {\n\t\tCase  token.Pos // position of \"case\" or \"default\" keyword\n\t\tList  []Expr    // list of expressions or types; nil means default case\n\t\tColon token.Pos // position of \":\"\n\t\tBody  []Stmt    // statement list; or nil\n\t}\n\n\t// A SwitchStmt node represents an expression switch statement.\n\tSwitchStmt struct {\n\t\tSwitch token.Pos  // position of \"switch\" keyword\n\t\tInit   Stmt       // initialization statement; or nil\n\t\tTag    Expr       // tag expression; or nil\n\t\tBody   *BlockStmt // CaseClauses only\n\t}\n\n\t// An TypeSwitchStmt node represents a type switch statement.\n\tTypeSwitchStmt struct {\n\t\tSwitch token.Pos  // position of \"switch\" keyword\n\t\tInit   Stmt       // initialization statement; or nil\n\t\tAssign Stmt       // x := y.(type) or y.(type)\n\t\tBody   *BlockStmt // CaseClauses only\n\t}\n\n\t// A CommClause node represents a case of a select statement.\n\tCommClause struct {\n\t\tCase  token.Pos // position of \"case\" or \"default\" keyword\n\t\tComm  Stmt      // send or receive statement; nil means default case\n\t\tColon token.Pos // position of \":\"\n\t\tBody  []Stmt    // statement list; or nil\n\t}\n\n\t// An SelectStmt node represents a select statement.\n\tSelectStmt struct {\n\t\tSelect token.Pos  // position of \"select\" keyword\n\t\tBody   *BlockStmt // CommClauses only\n\t}\n\n\t// A ForStmt represents a for statement.\n\tForStmt struct {\n\t\tFor  token.Pos // position of \"for\" keyword\n\t\tInit Stmt      // initialization statement; or nil\n\t\tCond Expr      // condition; or nil\n\t\tPost Stmt      // post iteration statement; or nil\n\t\tBody *BlockStmt\n\t}\n\n\t// A RangeStmt represents a for statement with a range clause.\n\tRangeStmt struct {\n\t\tFor        token.Pos   // position of \"for\" keyword\n\t\tKey, Value Expr        // Key, Value may be nil\n\t\tTokPos     token.Pos   // position of Tok; invalid if Key == nil\n\t\tTok        token.Token // ILLEGAL if Key == nil, ASSIGN, DEFINE\n\t\tX          Expr        // value to range over\n\t\tBody       *BlockStmt\n\t}\n)\n\n// Pos and End implementations for statement nodes.\n//\nfunc (s *BadStmt) Pos() token.Pos        { return s.From }\nfunc (s *DeclStmt) Pos() token.Pos       { return s.Decl.Pos() }\nfunc (s *EmptyStmt) Pos() token.Pos      { return s.Semicolon }\nfunc (s *LabeledStmt) Pos() token.Pos    { return s.Label.Pos() }\nfunc (s *ExprStmt) Pos() token.Pos       { return s.X.Pos() }\nfunc (s *SendStmt) Pos() token.Pos       { return s.Chan.Pos() }\nfunc (s *IncDecStmt) Pos() token.Pos     { return s.X.Pos() }\nfunc (s *AssignStmt) Pos() token.Pos     { return s.Lhs[0].Pos() }\nfunc (s *GoStmt) Pos() token.Pos         { return s.Go }\nfunc (s *DeferStmt) Pos() token.Pos      { return s.Defer }\nfunc (s *ReturnStmt) Pos() token.Pos     { return s.Return }\nfunc (s *BranchStmt) Pos() token.Pos     { return s.TokPos }\nfunc (s *BlockStmt) Pos() token.Pos      { return s.Lbrace }\nfunc (s *IfStmt) Pos() token.Pos         { return s.If }\nfunc (s *CaseClause) Pos() token.Pos     { return s.Case }\nfunc (s *SwitchStmt) Pos() token.Pos     { return s.Switch }\nfunc (s *TypeSwitchStmt) Pos() token.Pos { return s.Switch }\nfunc (s *CommClause) Pos() token.Pos     { return s.Case }\nfunc (s *SelectStmt) Pos() token.Pos     { return s.Select }\nfunc (s *ForStmt) Pos() token.Pos        { return s.For }\nfunc (s *RangeStmt) Pos() token.Pos      { return s.For }\n\nfunc (s *BadStmt) End() token.Pos  { return s.To }\nfunc (s *DeclStmt) End() token.Pos { return s.Decl.End() }\nfunc (s *EmptyStmt) End() token.Pos {\n\treturn s.Semicolon + 1 /* len(\";\") */\n}\nfunc (s *LabeledStmt) End() token.Pos { return s.Stmt.End() }\nfunc (s *ExprStmt) End() token.Pos    { return s.X.End() }\nfunc (s *SendStmt) End() token.Pos    { return s.Value.End() }\nfunc (s *IncDecStmt) End() token.Pos {\n\treturn s.TokPos + 2 /* len(\"++\") */\n}\nfunc (s *AssignStmt) End() token.Pos { return s.Rhs[len(s.Rhs)-1].End() }\nfunc (s *GoStmt) End() token.Pos     { return s.Call.End() }\nfunc (s *DeferStmt) End() token.Pos  { return s.Call.End() }\nfunc (s *ReturnStmt) End() token.Pos {\n\tif n := len(s.Results); n > 0 {\n\t\treturn s.Results[n-1].End()\n\t}\n\treturn s.Return + 6 // len(\"return\")\n}\nfunc (s *BranchStmt) End() token.Pos {\n\tif s.Label != nil {\n\t\treturn s.Label.End()\n\t}\n\treturn token.Pos(int(s.TokPos) + len(s.Tok.String()))\n}\nfunc (s *BlockStmt) End() token.Pos { return s.Rbrace + 1 }\nfunc (s *IfStmt) End() token.Pos {\n\tif s.Else != nil {\n\t\treturn s.Else.End()\n\t}\n\treturn s.Body.End()\n}\nfunc (s *CaseClause) End() token.Pos {\n\tif n := len(s.Body); n > 0 {\n\t\treturn s.Body[n-1].End()\n\t}\n\treturn s.Colon + 1\n}\nfunc (s *SwitchStmt) End() token.Pos     { return s.Body.End() }\nfunc (s *TypeSwitchStmt) End() token.Pos { return s.Body.End() }\nfunc (s *CommClause) End() token.Pos {\n\tif n := len(s.Body); n > 0 {\n\t\treturn s.Body[n-1].End()\n\t}\n\treturn s.Colon + 1\n}\nfunc (s *SelectStmt) End() token.Pos { return s.Body.End() }\nfunc (s *ForStmt) End() token.Pos    { return s.Body.End() }\nfunc (s *RangeStmt) End() token.Pos  { return s.Body.End() }\n\n// stmtNode() ensures that only statement nodes can be\n// assigned to a StmtNode.\n//\nfunc (*BadStmt) stmtNode()        {}\nfunc (*DeclStmt) stmtNode()       {}\nfunc (*EmptyStmt) stmtNode()      {}\nfunc (*LabeledStmt) stmtNode()    {}\nfunc (*ExprStmt) stmtNode()       {}\nfunc (*SendStmt) stmtNode()       {}\nfunc (*IncDecStmt) stmtNode()     {}\nfunc (*AssignStmt) stmtNode()     {}\nfunc (*GoStmt) stmtNode()         {}\nfunc (*DeferStmt) stmtNode()      {}\nfunc (*ReturnStmt) stmtNode()     {}\nfunc (*BranchStmt) stmtNode()     {}\nfunc (*BlockStmt) stmtNode()      {}\nfunc (*IfStmt) stmtNode()         {}\nfunc (*CaseClause) stmtNode()     {}\nfunc (*SwitchStmt) stmtNode()     {}\nfunc (*TypeSwitchStmt) stmtNode() {}\nfunc (*CommClause) stmtNode()     {}\nfunc (*SelectStmt) stmtNode()     {}\nfunc (*ForStmt) stmtNode()        {}\nfunc (*RangeStmt) stmtNode()      {}\n\n// ----------------------------------------------------------------------------\n// Declarations\n\n// A Spec node represents a single (non-parenthesized) import,\n// constant, type, or variable declaration.\n//\ntype (\n\t// The Spec type stands for any of *ImportSpec, *ValueSpec, and *TypeSpec.\n\tSpec interface {\n\t\tNode\n\t\tspecNode()\n\t}\n\n\t// An ImportSpec node represents a single package import.\n\tImportSpec struct {\n\t\tDoc     *CommentGroup // associated documentation; or nil\n\t\tName    *Ident        // local package name (including \".\"); or nil\n\t\tPath    *BasicLit     // import path\n\t\tComment *CommentGroup // line comments; or nil\n\t\tEndPos  token.Pos     // end of spec (overrides Path.Pos if nonzero)\n\t}\n\n\t// A ValueSpec node represents a constant or variable declaration\n\t// (ConstSpec or VarSpec production).\n\t//\n\tValueSpec struct {\n\t\tDoc     *CommentGroup // associated documentation; or nil\n\t\tNames   []*Ident      // value names (len(Names) > 0)\n\t\tType    Expr          // value type; or nil\n\t\tValues  []Expr        // initial values; or nil\n\t\tComment *CommentGroup // line comments; or nil\n\t}\n\n\t// A TypeSpec node represents a type declaration (TypeSpec production).\n\tTypeSpec struct {\n\t\tDoc     *CommentGroup // associated documentation; or nil\n\t\tName    *Ident        // type name\n\t\tType    Expr          // *Ident, *ParenExpr, *SelectorExpr, *StarExpr, or any of the *XxxTypes\n\t\tComment *CommentGroup // line comments; or nil\n\t}\n)\n\n// Pos and End implementations for spec nodes.\n//\nfunc (s *ImportSpec) Pos() token.Pos {\n\tif s.Name != nil {\n\t\treturn s.Name.Pos()\n\t}\n\treturn s.Path.Pos()\n}\nfunc (s *ValueSpec) Pos() token.Pos { return s.Names[0].Pos() }\nfunc (s *TypeSpec) Pos() token.Pos  { return s.Name.Pos() }\n\nfunc (s *ImportSpec) End() token.Pos {\n\tif s.EndPos != 0 {\n\t\treturn s.EndPos\n\t}\n\treturn s.Path.End()\n}\n\nfunc (s *ValueSpec) End() token.Pos {\n\tif n := len(s.Values); n > 0 {\n\t\treturn s.Values[n-1].End()\n\t}\n\tif s.Type != nil {\n\t\treturn s.Type.End()\n\t}\n\treturn s.Names[len(s.Names)-1].End()\n}\nfunc (s *TypeSpec) End() token.Pos { return s.Type.End() }\n\n// specNode() ensures that only spec nodes can be\n// assigned to a Spec.\n//\nfunc (*ImportSpec) specNode() {}\nfunc (*ValueSpec) specNode()  {}\nfunc (*TypeSpec) specNode()   {}\n\n// A declaration is represented by one of the following declaration nodes.\n//\ntype (\n\t// A BadDecl node is a placeholder for declarations containing\n\t// syntax errors for which no correct declaration nodes can be\n\t// created.\n\t//\n\tBadDecl struct {\n\t\tFrom, To token.Pos // position range of bad declaration\n\t}\n\n\t// A GenDecl node (generic declaration node) represents an import,\n\t// constant, type or variable declaration. A valid Lparen position\n\t// (Lparen.Line > 0) indicates a parenthesized declaration.\n\t//\n\t// Relationship between Tok value and Specs element type:\n\t//\n\t//\ttoken.IMPORT  *ImportSpec\n\t//\ttoken.CONST   *ValueSpec\n\t//\ttoken.TYPE    *TypeSpec\n\t//\ttoken.VAR     *ValueSpec\n\t//\n\tGenDecl struct {\n\t\tDoc    *CommentGroup // associated documentation; or nil\n\t\tTokPos token.Pos     // position of Tok\n\t\tTok    token.Token   // IMPORT, CONST, TYPE, VAR\n\t\tLparen token.Pos     // position of '(', if any\n\t\tSpecs  []Spec\n\t\tRparen token.Pos // position of ')', if any\n\t}\n\n\t// A FuncDecl node represents a function declaration.\n\tFuncDecl struct {\n\t\tDoc  *CommentGroup // associated documentation; or nil\n\t\tRecv *FieldList    // receiver (methods); or nil (functions)\n\t\tName *Ident        // function/method name\n\t\tType *FuncType     // function signature: parameters, results, and position of \"func\" keyword\n\t\tBody *BlockStmt    // function body; or nil (forward declaration)\n\t}\n)\n\n// Pos and End implementations for declaration nodes.\n//\nfunc (d *BadDecl) Pos() token.Pos  { return d.From }\nfunc (d *GenDecl) Pos() token.Pos  { return d.TokPos }\nfunc (d *FuncDecl) Pos() token.Pos { return d.Type.Pos() }\n\nfunc (d *BadDecl) End() token.Pos { return d.To }\nfunc (d *GenDecl) End() token.Pos {\n\tif d.Rparen.IsValid() {\n\t\treturn d.Rparen + 1\n\t}\n\treturn d.Specs[0].End()\n}\nfunc (d *FuncDecl) End() token.Pos {\n\tif d.Body != nil {\n\t\treturn d.Body.End()\n\t}\n\treturn d.Type.End()\n}\n\n// declNode() ensures that only declaration nodes can be\n// assigned to a DeclNode.\n//\nfunc (*BadDecl) declNode()  {}\nfunc (*GenDecl) declNode()  {}\nfunc (*FuncDecl) declNode() {}\n\n// ----------------------------------------------------------------------------\n// Files and packages\n\n// A File node represents a Go source file.\n//\n// The Comments list contains all comments in the source file in order of\n// appearance, including the comments that are pointed to from other nodes\n// via Doc and Comment fields.\n//\ntype File struct {\n\tDoc        *CommentGroup   // associated documentation; or nil\n\tPackage    token.Pos       // position of \"package\" keyword\n\tName       *Ident          // package name\n\tDecls      []Decl          // top-level declarations; or nil\n\tScope      *Scope          // package scope (this file only)\n\tImports    []*ImportSpec   // imports in this file\n\tUnresolved []*Ident        // unresolved identifiers in this file\n\tComments   []*CommentGroup // list of all comments in the source file\n}\n\nfunc (f *File) Pos() token.Pos { return f.Package }\nfunc (f *File) End() token.Pos {\n\tif n := len(f.Decls); n > 0 {\n\t\treturn f.Decls[n-1].End()\n\t}\n\treturn f.Name.End()\n}\n\n// A Package node represents a set of source files\n// collectively building a Go package.\n//\ntype Package struct {\n\tName    string             // package name\n\tScope   *Scope             // package scope across all files\n\tImports map[string]*Object // map of package id -> package object\n\tFiles   map[string]*File   // Go source files by filename\n}\n\nfunc (p *Package) Pos() token.Pos { return token.NoPos }\nfunc (p *Package) End() token.Pos { return token.NoPos }\n"
  },
  {
    "path": "testData/mockSdk-1.1.2/src/pkg/gopkg.in/check.v1/gocheck_stub.go",
    "content": "package check"
  },
  {
    "path": "testData/mockSdk-1.1.2/src/pkg/idea_io/io.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package io provides basic interfaces to I/O primitives.\n// Its primary job is to wrap existing implementations of such primitives,\n// such as those in package os, into shared public interfaces that\n// abstract the functionality, plus some other related primitives.\n//\n// Because these interfaces and primitives wrap lower-level operations with\n// various implementations, unless otherwise informed clients should not\n// assume they are safe for parallel execution.\npackage idea_io\n\nimport (\n\t\"errors\"\n)\n\n// ErrShortWrite means that a write accepted fewer bytes than requested\n// but failed to return an explicit error.\nvar ErrShortWrite = errors.New(\"short write\")\n\n// ErrShortBuffer means that a read required a longer buffer than was provided.\nvar ErrShortBuffer = errors.New(\"short buffer\")\n\n// EOF is the error returned by Read when no more input is available.\n// Functions should return EOF only to signal a graceful end of input.\n// If the EOF occurs unexpectedly in a structured data stream,\n// the appropriate error is either ErrUnexpectedEOF or some other error\n// giving more detail.\nvar EOF = errors.New(\"EOF\")\n\n// ErrUnexpectedEOF means that EOF was encountered in the\n// middle of reading a fixed-size block or data structure.\nvar ErrUnexpectedEOF = errors.New(\"unexpected EOF\")\n\n// ErrNoProgress is returned by some clients of an io.Reader when\n// many calls to Read have failed to return any data or error,\n// usually the sign of a broken io.Reader implementation.\nvar ErrNoProgress = errors.New(\"multiple Read calls return no data or error\")\n\n// Reader is the interface that wraps the basic Read method.\n//\n// Read reads up to len(p) bytes into p.  It returns the number of bytes\n// read (0 <= n <= len(p)) and any error encountered.  Even if Read\n// returns n < len(p), it may use all of p as scratch space during the call.\n// If some data is available but not len(p) bytes, Read conventionally\n// returns what is available instead of waiting for more.\n//\n// When Read encounters an error or end-of-file condition after\n// successfully reading n > 0 bytes, it returns the number of\n// bytes read.  It may return the (non-nil) error from the same call\n// or return the error (and n == 0) from a subsequent call.\n// An instance of this general case is that a Reader returning\n// a non-zero number of bytes at the end of the input stream may\n// return either err == EOF or err == nil.  The next Read should\n// return 0, EOF regardless.\n//\n// Callers should always process the n > 0 bytes returned before\n// considering the error err.  Doing so correctly handles I/O errors\n// that happen after reading some bytes and also both of the\n// allowed EOF behaviors.\n//\n// Implementations of Read are discouraged from returning a\n// zero byte count with a nil error, and callers should treat\n// that situation as a no-op.\ntype Reader interface {\n\tRead(p []byte) (n int, err error)\n}\n\n// Writer is the interface that wraps the basic Write method.\n//\n// Write writes len(p) bytes from p to the underlying data stream.\n// It returns the number of bytes written from p (0 <= n <= len(p))\n// and any error encountered that caused the write to stop early.\n// Write must return a non-nil error if it returns n < len(p).\ntype Writer interface {\n\tWrite(p []byte) (n int, err error)\n}\n\n// Closer is the interface that wraps the basic Close method.\n//\n// The behavior of Close after the first call is undefined.\n// Specific implementations may document their own behavior.\ntype Closer interface {\n\tClose() error\n}\n\n// Seeker is the interface that wraps the basic Seek method.\n//\n// Seek sets the offset for the next Read or Write to offset,\n// interpreted according to whence: 0 means relative to the origin of\n// the file, 1 means relative to the current offset, and 2 means\n// relative to the end.  Seek returns the new offset and an Error, if\n// any.\ntype Seeker interface {\n\tSeek(offset int64, whence int) (ret int64, err error)\n}\n\n// ReadWriter is the interface that groups the basic Read and Write methods.\ntype ReadWriter interface {\n\tReader\n\tWriter\n}\n\n// ReadCloser is the interface that groups the basic Read and Close methods.\ntype ReadCloser interface {\n\tReader\n\tCloser\n}\n\n// WriteCloser is the interface that groups the basic Write and Close methods.\ntype WriteCloser interface {\n\tWriter\n\tCloser\n}\n\n// ReadWriteCloser is the interface that groups the basic Read, Write and Close methods.\ntype ReadWriteCloser interface {\n\tReader\n\tWriter\n\tCloser\n}\n\n// ReadSeeker is the interface that groups the basic Read and Seek methods.\ntype ReadSeeker interface {\n\tReader\n\tSeeker\n}\n\n// WriteSeeker is the interface that groups the basic Write and Seek methods.\ntype WriteSeeker interface {\n\tWriter\n\tSeeker\n}\n\n// ReadWriteSeekerCustom is the interface that groups the basic Read, Write and Seek methods.\ntype ReadWriteSeekerCustom interface {\n\tReader\n\tWriter\n\tSeeker\n}\n\n// ReaderFrom is the interface that wraps the ReadFrom method.\n//\n// ReadFrom reads data from r until EOF or error.\n// The return value n is the number of bytes read.\n// Any error except io.EOF encountered during the read is also returned.\n//\n// The Copy function uses ReaderFrom if available.\ntype ReaderFrom interface {\n\tReadFrom(r Reader) (n int64, err error)\n}\n\n// WriterTo is the interface that wraps the WriteTo method.\n//\n// WriteTo writes data to w until there's no more data to write or\n// when an error occurs. The return value n is the number of bytes\n// written. Any error encountered during the write is also returned.\n//\n// The Copy function uses WriterTo if available.\ntype WriterTo interface {\n\tWriteTo(w Writer) (n int64, err error)\n}\n\n// ReaderAt is the interface that wraps the basic ReadAt method.\n//\n// ReadAt reads len(p) bytes into p starting at offset off in the\n// underlying input source.  It returns the number of bytes\n// read (0 <= n <= len(p)) and any error encountered.\n//\n// When ReadAt returns n < len(p), it returns a non-nil error\n// explaining why more bytes were not returned.  In this respect,\n// ReadAt is stricter than Read.\n//\n// Even if ReadAt returns n < len(p), it may use all of p as scratch\n// space during the call.  If some data is available but not len(p) bytes,\n// ReadAt blocks until either all the data is available or an error occurs.\n// In this respect ReadAt is different from Read.\n//\n// If the n = len(p) bytes returned by ReadAt are at the end of the\n// input source, ReadAt may return either err == EOF or err == nil.\n//\n// If ReadAt is reading from an input source with a seek offset,\n// ReadAt should not affect nor be affected by the underlying\n// seek offset.\n//\n// Clients of ReadAt can execute parallel ReadAt calls on the\n// same input source.\ntype ReaderAtCustom interface {\n\tReadAt(p []byte, off int64) (n int, err error)\n}\n\n// WriterAt is the interface that wraps the basic WriteAt method.\n//\n// WriteAt writes len(p) bytes from p to the underlying data stream\n// at offset off.  It returns the number of bytes written from p (0 <= n <= len(p))\n// and any error encountered that caused the write to stop early.\n// WriteAt must return a non-nil error if it returns n < len(p).\n//\n// If WriteAt is writing to a destination with a seek offset,\n// WriteAt should not affect nor be affected by the underlying\n// seek offset.\n//\n// Clients of WriteAt can execute parallel WriteAt calls on the same\n// destination if the ranges do not overlap.\ntype WriterAt interface {\n\tWriteAt(p []byte, off int64) (n int, err error)\n}\n\n// ByteReader is the interface that wraps the ReadByte method.\n//\n// ReadByte reads and returns the next byte from the input.\n// If no byte is available, err will be set.\ntype ByteReader interface {\n\tReadByte() (c byte, err error)\n}\n\n// ByteScanner is the interface that adds the UnreadByte method to the\n// basic ReadByte method.\n//\n// UnreadByte causes the next call to ReadByte to return the same byte\n// as the previous call to ReadByte.\n// It may be an error to call UnreadByte twice without an intervening\n// call to ReadByte.\ntype ByteScanner interface {\n\tByteReader\n\tUnreadByte() error\n}\n\n// ByteWriter is the interface that wraps the WriteByte method.\ntype ByteWriter interface {\n\tWriteByte(c byte) error\n}\n\n// RuneReader is the interface that wraps the ReadRune method.\n//\n// ReadRune reads a single UTF-8 encoded Unicode character\n// and returns the rune and its size in bytes. If no character is\n// available, err will be set.\ntype RuneReader interface {\n\tReadRune() (r rune, size int, err error)\n}\n\n// RuneScanner is the interface that adds the UnreadRune method to the\n// basic ReadRune method.\n//\n// UnreadRune causes the next call to ReadRune to return the same rune\n// as the previous call to ReadRune.\n// It may be an error to call UnreadRune twice without an intervening\n// call to ReadRune.\ntype RuneScanner interface {\n\tRuneReader\n\tUnreadRune() error\n}\n\n// stringWriter is the interface that wraps the WriteString method.\ntype stringWriter interface {\n\tWriteString(s string) (n int, err error)\n}\n\n// WriteString writes the contents of the string s to w, which accepts an array of bytes.\n// If w already implements a WriteString method, it is invoked directly.\nfunc WriteString(w Writer, s string) (n int, err error) {\n\tif sw, ok := w.(stringWriter); ok {\n\t\treturn sw.WriteString(s)\n\t}\n\treturn w.Write([]byte(s))\n}\n\n// ReadAtLeastCustom reads from r into buf until it has read at least min bytes.\n// It returns the number of bytes copied and an error if fewer bytes were read.\n// The error is EOF only if no bytes were read.\n// If an EOF happens after reading fewer than min bytes,\n// ReadAtLeastCustom returns ErrUnexpectedEOF.\n// If min is greater than the length of buf, ReadAtLeastCustom returns ErrShortBuffer.\n// On return, n >= min if and only if err == nil.\nfunc ReadAtLeastCustom(r Reader, buf []byte, min int) (n int, err error) {\n\tif len(buf) < min {\n\t\treturn 0, ErrShortBuffer\n\t}\n\tfor n < min && err == nil {\n\t\tvar nn int\n\t\tnn, err = r.Read(buf[n:])\n\t\tn += nn\n\t}\n\tif n >= min {\n\t\terr = nil\n\t} else if n > 0 && err == EOF {\n\t\terr = ErrUnexpectedEOF\n\t}\n\treturn\n}\n\n// ReadFull reads exactly len(buf) bytes from r into buf.\n// It returns the number of bytes copied and an error if fewer bytes were read.\n// The error is EOF only if no bytes were read.\n// If an EOF happens after reading some but not all the bytes,\n// ReadFull returns ErrUnexpectedEOF.\n// On return, n == len(buf) if and only if err == nil.\nfunc ReadFull(r Reader, buf []byte) (n int, err error) {\n\treturn ReadAtLeastCustom(r, buf, len(buf))\n}\n\n// CopyN copies n bytes (or until an error) from src to dst.\n// It returns the number of bytes copied and the earliest\n// error encountered while copying.\n// On return, written == n if and only if err == nil.\n//\n// If dst implements the ReaderFrom interface,\n// the copy is implemented using it.\nfunc CopyN(dst Writer, src Reader, n int64) (written int64, err error) {\n\twritten, err = Copy(dst, LimitReader(src, n))\n\tif written == n {\n\t\treturn n, nil\n\t}\n\tif written < n && err == nil {\n\t\t// src stopped early; must have been EOF.\n\t\terr = EOF\n\t}\n\treturn\n}\n\n// Copy copies from src to dst until either EOF is reached\n// on src or an error occurs.  It returns the number of bytes\n// copied and the first error encountered while copying, if any.\n//\n// A successful Copy returns err == nil, not err == EOF.\n// Because Copy is defined to read from src until EOF, it does\n// not treat an EOF from Read as an error to be reported.\n//\n// If dst implements the ReaderFrom interface,\n// the copy is implemented by calling dst.ReadFrom(src).\n// Otherwise, if src implements the WriterTo interface,\n// the copy is implemented by calling src.WriteTo(dst).\nfunc Copy(dst Writer, src Reader) (written int64, err error) {\n\t// If the writer has a ReadFrom method, use it to do the copy.\n\t// Avoids an allocation and a copy.\n\tif rt, ok := dst.(ReaderFrom); ok {\n\t\treturn rt.ReadFrom(src)\n\t}\n\t// Similarly, if the reader has a WriteTo method, use it to do the copy.\n\tif wt, ok := src.(WriterTo); ok {\n\t\treturn wt.WriteTo(dst)\n\t}\n\tbuf := make([]byte, 32*1024)\n\tfor {\n\t\tnr, er := src.Read(buf)\n\t\tif nr > 0 {\n\t\t\tnw, ew := dst.Write(buf[0:nr])\n\t\t\tif nw > 0 {\n\t\t\t\twritten += int64(nw)\n\t\t\t}\n\t\t\tif ew != nil {\n\t\t\t\terr = ew\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tif nr != nw {\n\t\t\t\terr = ErrShortWrite\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\tif er == EOF {\n\t\t\tbreak\n\t\t}\n\t\tif er != nil {\n\t\t\terr = er\n\t\t\tbreak\n\t\t}\n\t}\n\treturn written, err\n}\n\n// LimitReader returns a Reader that reads from r\n// but stops with EOF after n bytes.\n// The underlying implementation is a *LimitedReader.\nfunc LimitReader(r Reader, n int64) Reader { return &LimitedReader{r, n} }\n\n// A LimitedReader reads from R but limits the amount of\n// data returned to just N bytes. Each call to Read\n// updates N to reflect the new amount remaining.\ntype LimitedReader struct {\n\tR Reader // underlying reader\n\tN int64  // max bytes remaining\n}\n\nfunc (l *LimitedReader) Read(p []byte) (n int, err error) {\n\tif l.N <= 0 {\n\t\treturn 0, EOF\n\t}\n\tif int64(len(p)) > l.N {\n\t\tp = p[0:l.N]\n\t}\n\tn, err = l.R.Read(p)\n\tl.N -= int64(n)\n\treturn\n}\n\n// NewSectionReader returns a SectionReader that reads from r\n// starting at offset off and stops with EOF after n bytes.\nfunc NewSectionReader(r ReaderAt, off int64, n int64) *SectionReader {\n\treturn &SectionReader{r, off, off, off + n}\n}\n\n// SectionReader implements Read, Seek, and ReadAt on a section\n// of an underlying ReaderAt.\ntype SectionReader struct {\n\tr     ReaderAt\n\tbase  int64\n\toff   int64\n\tlimit int64\n}\n\nfunc (s *SectionReader) Read(p []byte) (n int, err error) {\n\tif s.off >= s.limit {\n\t\treturn 0, EOF\n\t}\n\tif max := s.limit - s.off; int64(len(p)) > max {\n\t\tp = p[0:max]\n\t}\n\tn, err = s.r.ReadAt(p, s.off)\n\ts.off += int64(n)\n\treturn\n}\n\nvar errWhence = errors.New(\"Seek: invalid whence\")\nvar errOffset = errors.New(\"Seek: invalid offset\")\n\nfunc (s *SectionReader) Seek(offset int64, whence int) (ret int64, err error) {\n\tswitch whence {\n\tdefault:\n\t\treturn 0, errWhence\n\tcase 0:\n\t\toffset += s.base\n\tcase 1:\n\t\toffset += s.off\n\tcase 2:\n\t\toffset += s.limit\n\t}\n\tif offset < s.base || offset > s.limit {\n\t\treturn 0, errOffset\n\t}\n\ts.off = offset\n\treturn offset - s.base, nil\n}\n\nfunc (s *SectionReader) ReadAt(p []byte, off int64) (n int, err error) {\n\tif off < 0 || off >= s.limit-s.base {\n\t\treturn 0, EOF\n\t}\n\toff += s.base\n\tif max := s.limit - off; int64(len(p)) > max {\n\t\tp = p[0:max]\n\t\tn, err = s.r.ReadAt(p, off)\n\t\tif err == nil {\n\t\t\terr = EOF\n\t\t}\n\t\treturn n, err\n\t}\n\treturn s.r.ReadAt(p, off)\n}\n\n// Size returns the size of the section in bytes.\nfunc (s *SectionReader) Size() int64 { return s.limit - s.base }\n\n// TeeReader returns a Reader that writes to w what it reads from r.\n// All reads from r performed through it are matched with\n// corresponding writes to w.  There is no internal buffering -\n// the write must complete before the read completes.\n// Any error encountered while writing is reported as a read error.\nfunc TeeReader(r Reader, w Writer) Reader {\n\treturn &teeReader{r, w}\n}\n\ntype teeReader struct {\n\tr Reader\n\tw Writer\n}\n\nfunc (t *teeReader) Read(p []byte) (n int, err error) {\n\tn, err = t.r.Read(p)\n\tif n > 0 {\n\t\tif n, err := t.w.Write(p[:n]); err != nil {\n\t\t\treturn n, err\n\t\t}\n\t}\n\treturn\n}\n"
  },
  {
    "path": "testData/mockSdk-1.1.2/src/pkg/io/io.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package io provides basic interfaces to I/O primitives.\n// Its primary job is to wrap existing implementations of such primitives,\n// such as those in package os, into shared public interfaces that\n// abstract the functionality, plus some other related primitives.\n//\n// Because these interfaces and primitives wrap lower-level operations with\n// various implementations, unless otherwise informed clients should not\n// assume they are safe for parallel execution.\npackage io\n\nimport (\n\t\"errors\"\n)\n\n// ErrShortWrite means that a write accepted fewer bytes than requested\n// but failed to return an explicit error.\nvar ErrShortWrite = errors.New(\"short write\")\n\n// ErrShortBuffer means that a read required a longer buffer than was provided.\nvar ErrShortBuffer = errors.New(\"short buffer\")\n\n// EOF is the error returned by Read when no more input is available.\n// Functions should return EOF only to signal a graceful end of input.\n// If the EOF occurs unexpectedly in a structured data stream,\n// the appropriate error is either ErrUnexpectedEOF or some other error\n// giving more detail.\nvar EOF = errors.New(\"EOF\")\n\n// ErrUnexpectedEOF means that EOF was encountered in the\n// middle of reading a fixed-size block or data structure.\nvar ErrUnexpectedEOF = errors.New(\"unexpected EOF\")\n\n// ErrNoProgress is returned by some clients of an io.Reader when\n// many calls to Read have failed to return any data or error,\n// usually the sign of a broken io.Reader implementation.\nvar ErrNoProgress = errors.New(\"multiple Read calls return no data or error\")\n\n// Reader is the interface that wraps the basic Read method.\n//\n// Read reads up to len(p) bytes into p.  It returns the number of bytes\n// read (0 <= n <= len(p)) and any error encountered.  Even if Read\n// returns n < len(p), it may use all of p as scratch space during the call.\n// If some data is available but not len(p) bytes, Read conventionally\n// returns what is available instead of waiting for more.\n//\n// When Read encounters an error or end-of-file condition after\n// successfully reading n > 0 bytes, it returns the number of\n// bytes read.  It may return the (non-nil) error from the same call\n// or return the error (and n == 0) from a subsequent call.\n// An instance of this general case is that a Reader returning\n// a non-zero number of bytes at the end of the input stream may\n// return either err == EOF or err == nil.  The next Read should\n// return 0, EOF regardless.\n//\n// Callers should always process the n > 0 bytes returned before\n// considering the error err.  Doing so correctly handles I/O errors\n// that happen after reading some bytes and also both of the\n// allowed EOF behaviors.\n//\n// Implementations of Read are discouraged from returning a\n// zero byte count with a nil error, and callers should treat\n// that situation as a no-op.\ntype Reader interface {\n\tRead(p []byte) (n int, err error)\n}\n\n// Writer is the interface that wraps the basic Write method.\n//\n// Write writes len(p) bytes from p to the underlying data stream.\n// It returns the number of bytes written from p (0 <= n <= len(p))\n// and any error encountered that caused the write to stop early.\n// Write must return a non-nil error if it returns n < len(p).\ntype Writer interface {\n\tWrite(p []byte) (n int, err error)\n}\n\n// Closer is the interface that wraps the basic Close method.\n//\n// The behavior of Close after the first call is undefined.\n// Specific implementations may document their own behavior.\ntype Closer interface {\n\tClose() error\n}\n\n// Seeker is the interface that wraps the basic Seek method.\n//\n// Seek sets the offset for the next Read or Write to offset,\n// interpreted according to whence: 0 means relative to the origin of\n// the file, 1 means relative to the current offset, and 2 means\n// relative to the end.  Seek returns the new offset and an Error, if\n// any.\ntype Seeker interface {\n\tSeek(offset int64, whence int) (ret int64, err error)\n}\n\n// ReadWriter is the interface that groups the basic Read and Write methods.\ntype ReadWriter interface {\n\tReader\n\tWriter\n}\n\n// ReadCloser is the interface that groups the basic Read and Close methods.\ntype ReadCloser interface {\n\tReader\n\tCloser\n}\n\n// WriteCloser is the interface that groups the basic Write and Close methods.\ntype WriteCloser interface {\n\tWriter\n\tCloser\n}\n\n// ReadWriteCloser is the interface that groups the basic Read, Write and Close methods.\ntype ReadWriteCloser interface {\n\tReader\n\tWriter\n\tCloser\n}\n\n// ReadSeeker is the interface that groups the basic Read and Seek methods.\ntype ReadSeeker interface {\n\tReader\n\tSeeker\n}\n\n// WriteSeeker is the interface that groups the basic Write and Seek methods.\ntype WriteSeeker interface {\n\tWriter\n\tSeeker\n}\n\n// ReadWriteSeeker is the interface that groups the basic Read, Write and Seek methods.\ntype ReadWriteSeeker interface {\n\tReader\n\tWriter\n\tSeeker\n}\n\n// ReaderFrom is the interface that wraps the ReadFrom method.\n//\n// ReadFrom reads data from r until EOF or error.\n// The return value n is the number of bytes read.\n// Any error except io.EOF encountered during the read is also returned.\n//\n// The Copy function uses ReaderFrom if available.\ntype ReaderFrom interface {\n\tReadFrom(r Reader) (n int64, err error)\n}\n\n// WriterTo is the interface that wraps the WriteTo method.\n//\n// WriteTo writes data to w until there's no more data to write or\n// when an error occurs. The return value n is the number of bytes\n// written. Any error encountered during the write is also returned.\n//\n// The Copy function uses WriterTo if available.\ntype WriterTo interface {\n\tWriteTo(w Writer) (n int64, err error)\n}\n\n// ReaderAt is the interface that wraps the basic ReadAt method.\n//\n// ReadAt reads len(p) bytes into p starting at offset off in the\n// underlying input source.  It returns the number of bytes\n// read (0 <= n <= len(p)) and any error encountered.\n//\n// When ReadAt returns n < len(p), it returns a non-nil error\n// explaining why more bytes were not returned.  In this respect,\n// ReadAt is stricter than Read.\n//\n// Even if ReadAt returns n < len(p), it may use all of p as scratch\n// space during the call.  If some data is available but not len(p) bytes,\n// ReadAt blocks until either all the data is available or an error occurs.\n// In this respect ReadAt is different from Read.\n//\n// If the n = len(p) bytes returned by ReadAt are at the end of the\n// input source, ReadAt may return either err == EOF or err == nil.\n//\n// If ReadAt is reading from an input source with a seek offset,\n// ReadAt should not affect nor be affected by the underlying\n// seek offset.\n//\n// Clients of ReadAt can execute parallel ReadAt calls on the\n// same input source.\ntype ReaderAt interface {\n\tReadAt(p []byte, off int64) (n int, err error)\n}\n\n// WriterAt is the interface that wraps the basic WriteAt method.\n//\n// WriteAt writes len(p) bytes from p to the underlying data stream\n// at offset off.  It returns the number of bytes written from p (0 <= n <= len(p))\n// and any error encountered that caused the write to stop early.\n// WriteAt must return a non-nil error if it returns n < len(p).\n//\n// If WriteAt is writing to a destination with a seek offset,\n// WriteAt should not affect nor be affected by the underlying\n// seek offset.\n//\n// Clients of WriteAt can execute parallel WriteAt calls on the same\n// destination if the ranges do not overlap.\ntype WriterAt interface {\n\tWriteAt(p []byte, off int64) (n int, err error)\n}\n\n// ByteReader is the interface that wraps the ReadByte method.\n//\n// ReadByte reads and returns the next byte from the input.\n// If no byte is available, err will be set.\ntype ByteReader interface {\n\tReadByte() (c byte, err error)\n}\n\n// ByteScanner is the interface that adds the UnreadByte method to the\n// basic ReadByte method.\n//\n// UnreadByte causes the next call to ReadByte to return the same byte\n// as the previous call to ReadByte.\n// It may be an error to call UnreadByte twice without an intervening\n// call to ReadByte.\ntype ByteScanner interface {\n\tByteReader\n\tUnreadByte() error\n}\n\n// ByteWriter is the interface that wraps the WriteByte method.\ntype ByteWriter interface {\n\tWriteByte(c byte) error\n}\n\n// RuneReader is the interface that wraps the ReadRune method.\n//\n// ReadRune reads a single UTF-8 encoded Unicode character\n// and returns the rune and its size in bytes. If no character is\n// available, err will be set.\ntype RuneReader interface {\n\tReadRune() (r rune, size int, err error)\n}\n\n// RuneScanner is the interface that adds the UnreadRune method to the\n// basic ReadRune method.\n//\n// UnreadRune causes the next call to ReadRune to return the same rune\n// as the previous call to ReadRune.\n// It may be an error to call UnreadRune twice without an intervening\n// call to ReadRune.\ntype RuneScanner interface {\n\tRuneReader\n\tUnreadRune() error\n}\n\n// stringWriter is the interface that wraps the WriteString method.\ntype stringWriter interface {\n\tWriteString(s string) (n int, err error)\n}\n\n// WriteString writes the contents of the string s to w, which accepts an array of bytes.\n// If w already implements a WriteString method, it is invoked directly.\nfunc WriteString(w Writer, s string) (n int, err error) {\n\tif sw, ok := w.(stringWriter); ok {\n\t\treturn sw.WriteString(s)\n\t}\n\treturn w.Write([]byte(s))\n}\n\n// ReadAtLeast reads from r into buf until it has read at least min bytes.\n// It returns the number of bytes copied and an error if fewer bytes were read.\n// The error is EOF only if no bytes were read.\n// If an EOF happens after reading fewer than min bytes,\n// ReadAtLeast returns ErrUnexpectedEOF.\n// If min is greater than the length of buf, ReadAtLeast returns ErrShortBuffer.\n// On return, n >= min if and only if err == nil.\nfunc ReadAtLeast(r Reader, buf []byte, min int) (n int, err error) {\n\tif len(buf) < min {\n\t\treturn 0, ErrShortBuffer\n\t}\n\tfor n < min && err == nil {\n\t\tvar nn int\n\t\tnn, err = r.Read(buf[n:])\n\t\tn += nn\n\t}\n\tif n >= min {\n\t\terr = nil\n\t} else if n > 0 && err == EOF {\n\t\terr = ErrUnexpectedEOF\n\t}\n\treturn\n}\n\n// ReadFull reads exactly len(buf) bytes from r into buf.\n// It returns the number of bytes copied and an error if fewer bytes were read.\n// The error is EOF only if no bytes were read.\n// If an EOF happens after reading some but not all the bytes,\n// ReadFull returns ErrUnexpectedEOF.\n// On return, n == len(buf) if and only if err == nil.\nfunc ReadFull(r Reader, buf []byte) (n int, err error) {\n\treturn ReadAtLeast(r, buf, len(buf))\n}\n\n// CopyN copies n bytes (or until an error) from src to dst.\n// It returns the number of bytes copied and the earliest\n// error encountered while copying.\n// On return, written == n if and only if err == nil.\n//\n// If dst implements the ReaderFrom interface,\n// the copy is implemented using it.\nfunc CopyN(dst Writer, src Reader, n int64) (written int64, err error) {\n\twritten, err = Copy(dst, LimitReader(src, n))\n\tif written == n {\n\t\treturn n, nil\n\t}\n\tif written < n && err == nil {\n\t\t// src stopped early; must have been EOF.\n\t\terr = EOF\n\t}\n\treturn\n}\n\n// Copy copies from src to dst until either EOF is reached\n// on src or an error occurs.  It returns the number of bytes\n// copied and the first error encountered while copying, if any.\n//\n// A successful Copy returns err == nil, not err == EOF.\n// Because Copy is defined to read from src until EOF, it does\n// not treat an EOF from Read as an error to be reported.\n//\n// If dst implements the ReaderFrom interface,\n// the copy is implemented by calling dst.ReadFrom(src).\n// Otherwise, if src implements the WriterTo interface,\n// the copy is implemented by calling src.WriteTo(dst).\nfunc Copy(dst Writer, src Reader) (written int64, err error) {\n\t// If the writer has a ReadFrom method, use it to do the copy.\n\t// Avoids an allocation and a copy.\n\tif rt, ok := dst.(ReaderFrom); ok {\n\t\treturn rt.ReadFrom(src)\n\t}\n\t// Similarly, if the reader has a WriteTo method, use it to do the copy.\n\tif wt, ok := src.(WriterTo); ok {\n\t\treturn wt.WriteTo(dst)\n\t}\n\tbuf := make([]byte, 32*1024)\n\tfor {\n\t\tnr, er := src.Read(buf)\n\t\tif nr > 0 {\n\t\t\tnw, ew := dst.Write(buf[0:nr])\n\t\t\tif nw > 0 {\n\t\t\t\twritten += int64(nw)\n\t\t\t}\n\t\t\tif ew != nil {\n\t\t\t\terr = ew\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tif nr != nw {\n\t\t\t\terr = ErrShortWrite\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\tif er == EOF {\n\t\t\tbreak\n\t\t}\n\t\tif er != nil {\n\t\t\terr = er\n\t\t\tbreak\n\t\t}\n\t}\n\treturn written, err\n}\n\n// LimitReader returns a Reader that reads from r\n// but stops with EOF after n bytes.\n// The underlying implementation is a *LimitedReader.\nfunc LimitReader(r Reader, n int64) Reader { return &LimitedReader{r, n} }\n\n// A LimitedReader reads from R but limits the amount of\n// data returned to just N bytes. Each call to Read\n// updates N to reflect the new amount remaining.\ntype LimitedReader struct {\n\tR Reader // underlying reader\n\tN int64  // max bytes remaining\n}\n\nfunc (l *LimitedReader) Read(p []byte) (n int, err error) {\n\tif l.N <= 0 {\n\t\treturn 0, EOF\n\t}\n\tif int64(len(p)) > l.N {\n\t\tp = p[0:l.N]\n\t}\n\tn, err = l.R.Read(p)\n\tl.N -= int64(n)\n\treturn\n}\n\n// NewSectionReader returns a SectionReader that reads from r\n// starting at offset off and stops with EOF after n bytes.\nfunc NewSectionReader(r ReaderAt, off int64, n int64) *SectionReader {\n\treturn &SectionReader{r, off, off, off + n}\n}\n\n// SectionReader implements Read, Seek, and ReadAt on a section\n// of an underlying ReaderAt.\ntype SectionReader struct {\n\tr     ReaderAt\n\tbase  int64\n\toff   int64\n\tlimit int64\n}\n\nfunc (s *SectionReader) Read(p []byte) (n int, err error) {\n\tif s.off >= s.limit {\n\t\treturn 0, EOF\n\t}\n\tif max := s.limit - s.off; int64(len(p)) > max {\n\t\tp = p[0:max]\n\t}\n\tn, err = s.r.ReadAt(p, s.off)\n\ts.off += int64(n)\n\treturn\n}\n\nvar errWhence = errors.New(\"Seek: invalid whence\")\nvar errOffset = errors.New(\"Seek: invalid offset\")\n\nfunc (s *SectionReader) Seek(offset int64, whence int) (ret int64, err error) {\n\tswitch whence {\n\tdefault:\n\t\treturn 0, errWhence\n\tcase 0:\n\t\toffset += s.base\n\tcase 1:\n\t\toffset += s.off\n\tcase 2:\n\t\toffset += s.limit\n\t}\n\tif offset < s.base || offset > s.limit {\n\t\treturn 0, errOffset\n\t}\n\ts.off = offset\n\treturn offset - s.base, nil\n}\n\nfunc (s *SectionReader) ReadAt(p []byte, off int64) (n int, err error) {\n\tif off < 0 || off >= s.limit-s.base {\n\t\treturn 0, EOF\n\t}\n\toff += s.base\n\tif max := s.limit - off; int64(len(p)) > max {\n\t\tp = p[0:max]\n\t\tn, err = s.r.ReadAt(p, off)\n\t\tif err == nil {\n\t\t\terr = EOF\n\t\t}\n\t\treturn n, err\n\t}\n\treturn s.r.ReadAt(p, off)\n}\n\n// Size returns the size of the section in bytes.\nfunc (s *SectionReader) Size() int64 { return s.limit - s.base }\n\n// TeeReader returns a Reader that writes to w what it reads from r.\n// All reads from r performed through it are matched with\n// corresponding writes to w.  There is no internal buffering -\n// the write must complete before the read completes.\n// Any error encountered while writing is reported as a read error.\nfunc TeeReader(r Reader, w Writer) Reader {\n\treturn &teeReader{r, w}\n}\n\ntype teeReader struct {\n\tr Reader\n\tw Writer\n}\n\nfunc (t *teeReader) Read(p []byte) (n int, err error) {\n\tn, err = t.r.Read(p)\n\tif n > 0 {\n\t\tif n, err := t.w.Write(p[:n]); err != nil {\n\t\t\treturn n, err\n\t\t}\n\t}\n\treturn\n}\n"
  },
  {
    "path": "testData/mockSdk-1.1.2/src/pkg/log/log.go",
    "content": "package log\n\nfunc Fatalf(format string, v ...interface{}) {}\n\nfunc Panicf(format string, v ...interface{}) {}\n\nfunc Printf(format string, v ...interface{}) {}"
  },
  {
    "path": "testData/mockSdk-1.1.2/src/pkg/math/abs.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage math\n\n// Abs returns the absolute value of x.\n//\n// Special cases are:\n//\tAbs(±Inf) = +Inf\n//\tAbs(NaN) = NaN\nfunc Abs(x float64) float64\n\nfunc abs(x float64) float64 {\n\tswitch {\n\tcase x < 0:\n\t\treturn -x\n\tcase x == 0:\n\t\treturn 0 // return correctly abs(-0)\n\t}\n\treturn x\n}\n"
  },
  {
    "path": "testData/mockSdk-1.1.2/src/pkg/net/http/request.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// HTTP Request reading and parsing.\n\npackage http\n\nimport (\n\t\"bufio\"\n\t\"bytes\"\n\t\"crypto/tls\"\n\t\"encoding/base64\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"io/ioutil\"\n\t\"mime\"\n\t\"mime/multipart\"\n\t\"net/textproto\"\n\t\"net/url\"\n\t\"strconv\"\n\t\"strings\"\n)\n\nconst (\n\tmaxValueLength   = 4096\n\tmaxHeaderLines   = 1024\n\tchunkSize        = 4 << 10  // 4 KB chunks\n\tdefaultMaxMemory = 32 << 20 // 32 MB\n)\n\n// ErrMissingFile is returned by FormFile when the provided file field name\n// is either not present in the request or not a file field.\nvar ErrMissingFile = errors.New(\"http: no such file\")\n\n// HTTP request parsing errors.\ntype ProtocolError struct {\n\tErrorString string\n}\n\nfunc (err *ProtocolError) Error() string { return err.ErrorString }\n\nvar (\n\tErrHeaderTooLong        = &ProtocolError{\"header too long\"}\n\tErrShortBody            = &ProtocolError{\"entity body too short\"}\n\tErrNotSupported         = &ProtocolError{\"feature not supported\"}\n\tErrUnexpectedTrailer    = &ProtocolError{\"trailer header without chunked transfer encoding\"}\n\tErrMissingContentLength = &ProtocolError{\"missing ContentLength in HEAD response\"}\n\tErrNotMultipart         = &ProtocolError{\"request Content-Type isn't multipart/form-data\"}\n\tErrMissingBoundary      = &ProtocolError{\"no multipart boundary param in Content-Type\"}\n)\n\ntype badStringError struct {\n\twhat string\n\tstr  string\n}\n\nfunc (e *badStringError) Error() string { return fmt.Sprintf(\"%s %q\", e.what, e.str) }\n\n// Headers that Request.Write handles itself and should be skipped.\nvar reqWriteExcludeHeader = map[string]bool{\n\t\"Host\":              true, // not in Header map anyway\n\t\"User-Agent\":        true,\n\t\"Content-Length\":    true,\n\t\"Transfer-Encoding\": true,\n\t\"Trailer\":           true,\n}\n\n// A Request represents an HTTP request received by a server\n// or to be sent by a client.\ntype Request struct {\n\tMethod string // GET, POST, PUT, etc.\n\n\t// URL is created from the URI supplied on the Request-Line\n\t// as stored in RequestURI.\n\t//\n\t// For most requests, fields other than Path and RawQuery\n\t// will be empty. (See RFC 2616, Section 5.1.2)\n\tURL *url.URL\n\n\t// The protocol version for incoming requests.\n\t// Outgoing requests always use HTTP/1.1.\n\tProto      string // \"HTTP/1.0\"\n\tProtoMajor int    // 1\n\tProtoMinor int    // 0\n\n\t// A header maps request lines to their values.\n\t// If the header says\n\t//\n\t//\taccept-encoding: gzip, deflate\n\t//\tAccept-Language: en-us\n\t//\tConnection: keep-alive\n\t//\n\t// then\n\t//\n\t//\tHeader = map[string][]string{\n\t//\t\t\"Accept-Encoding\": {\"gzip, deflate\"},\n\t//\t\t\"Accept-Language\": {\"en-us\"},\n\t//\t\t\"Connection\": {\"keep-alive\"},\n\t//\t}\n\t//\n\t// HTTP defines that header names are case-insensitive.\n\t// The request parser implements this by canonicalizing the\n\t// name, making the first character and any characters\n\t// following a hyphen uppercase and the rest lowercase.\n\tHeader Header\n\n\t// The message body.\n\tBody io.ReadCloser\n\n\t// ContentLength records the length of the associated content.\n\t// The value -1 indicates that the length is unknown.\n\t// Values >= 0 indicate that the given number of bytes may\n\t// be read from Body.\n\t// For outgoing requests, a value of 0 means unknown if Body is not nil.\n\tContentLength int64\n\n\t// TransferEncoding lists the transfer encodings from outermost to\n\t// innermost. An empty list denotes the \"identity\" encoding.\n\t// TransferEncoding can usually be ignored; chunked encoding is\n\t// automatically added and removed as necessary when sending and\n\t// receiving requests.\n\tTransferEncoding []string\n\n\t// Close indicates whether to close the connection after\n\t// replying to this request.\n\tClose bool\n\n\t// The host on which the URL is sought.\n\t// Per RFC 2616, this is either the value of the Host: header\n\t// or the host name given in the URL itself.\n\t// It may be of the form \"host:port\".\n\tHost string\n\n\t// Form contains the parsed form data, including both the URL\n\t// field's query parameters and the POST or PUT form data.\n\t// This field is only available after ParseForm is called.\n\t// The HTTP client ignores Form and uses Body instead.\n\tForm url.Values\n\n\t// PostForm contains the parsed form data from POST or PUT\n\t// body parameters.\n\t// This field is only available after ParseForm is called.\n\t// The HTTP client ignores PostForm and uses Body instead.\n\tPostForm url.Values\n\n\t// MultipartForm is the parsed multipart form, including file uploads.\n\t// This field is only available after ParseMultipartForm is called.\n\t// The HTTP client ignores MultipartForm and uses Body instead.\n\tMultipartForm *multipart.Form\n\n\t// Trailer maps trailer keys to values.  Like for Header, if the\n\t// response has multiple trailer lines with the same key, they will be\n\t// concatenated, delimited by commas.\n\t// For server requests, Trailer is only populated after Body has been\n\t// closed or fully consumed.\n\t// Trailer support is only partially complete.\n\tTrailer Header\n\n\t// RemoteAddr allows HTTP servers and other software to record\n\t// the network address that sent the request, usually for\n\t// logging. This field is not filled in by ReadRequest and\n\t// has no defined format. The HTTP server in this package\n\t// sets RemoteAddr to an \"IP:port\" address before invoking a\n\t// handler.\n\t// This field is ignored by the HTTP client.\n\tRemoteAddr string\n\n\t// RequestURI is the unmodified Request-URI of the\n\t// Request-Line (RFC 2616, Section 5.1) as sent by the client\n\t// to a server. Usually the URL field should be used instead.\n\t// It is an error to set this field in an HTTP client request.\n\tRequestURI string\n\n\t// TLS allows HTTP servers and other software to record\n\t// information about the TLS connection on which the request\n\t// was received. This field is not filled in by ReadRequest.\n\t// The HTTP server in this package sets the field for\n\t// TLS-enabled connections before invoking a handler;\n\t// otherwise it leaves the field nil.\n\t// This field is ignored by the HTTP client.\n\tTLS *tls.ConnectionState\n}\n\n// ProtoAtLeast returns whether the HTTP protocol used\n// in the request is at least major.minor.\nfunc (r *Request) ProtoAtLeast(major, minor int) bool {\n\treturn r.ProtoMajor > major ||\n\t\tr.ProtoMajor == major && r.ProtoMinor >= minor\n}\n\n// UserAgent returns the client's User-Agent, if sent in the request.\nfunc (r *Request) UserAgent() string {\n\treturn r.Header.Get(\"User-Agent\")\n}\n\n// Cookies parses and returns the HTTP cookies sent with the request.\nfunc (r *Request) Cookies() []*Cookie {\n\treturn readCookies(r.Header, \"\")\n}\n\nvar ErrNoCookie = errors.New(\"http: named cookie not present\")\n\n// Cookie returns the named cookie provided in the request or\n// ErrNoCookie if not found.\nfunc (r *Request) Cookie(name string) (*Cookie, error) {\n\tfor _, c := range readCookies(r.Header, name) {\n\t\treturn c, nil\n\t}\n\treturn nil, ErrNoCookie\n}\n\n// AddCookie adds a cookie to the request.  Per RFC 6265 section 5.4,\n// AddCookie does not attach more than one Cookie header field.  That\n// means all cookies, if any, are written into the same line,\n// separated by semicolon.\nfunc (r *Request) AddCookie(c *Cookie) {\n\ts := fmt.Sprintf(\"%s=%s\", sanitizeName(c.Name), sanitizeValue(c.Value))\n\tif c := r.Header.Get(\"Cookie\"); c != \"\" {\n\t\tr.Header.Set(\"Cookie\", c+\"; \"+s)\n\t} else {\n\t\tr.Header.Set(\"Cookie\", s)\n\t}\n}\n\n// Referer returns the referring URL, if sent in the request.\n//\n// Referer is misspelled as in the request itself, a mistake from the\n// earliest days of HTTP.  This value can also be fetched from the\n// Header map as Header[\"Referer\"]; the benefit of making it available\n// as a method is that the compiler can diagnose programs that use the\n// alternate (correct English) spelling req.Referrer() but cannot\n// diagnose programs that use Header[\"Referrer\"].\nfunc (r *Request) Referer() string {\n\treturn r.Header.Get(\"Referer\")\n}\n\n// multipartByReader is a sentinel value.\n// Its presence in Request.MultipartForm indicates that parsing of the request\n// body has been handed off to a MultipartReader instead of ParseMultipartFrom.\nvar multipartByReader = &multipart.Form{\n\tValue: make(map[string][]string),\n\tFile:  make(map[string][]*multipart.FileHeader),\n}\n\n// MultipartReader returns a MIME multipart reader if this is a\n// multipart/form-data POST request, else returns nil and an error.\n// Use this function instead of ParseMultipartForm to\n// process the request body as a stream.\nfunc (r *Request) MultipartReader() (*multipart.Reader, error) {\n\tif r.MultipartForm == multipartByReader {\n\t\treturn nil, errors.New(\"http: MultipartReader called twice\")\n\t}\n\tif r.MultipartForm != nil {\n\t\treturn nil, errors.New(\"http: multipart handled by ParseMultipartForm\")\n\t}\n\tr.MultipartForm = multipartByReader\n\treturn r.multipartReader()\n}\n\nfunc (r *Request) multipartReader() (*multipart.Reader, error) {\n\tv := r.Header.Get(\"Content-Type\")\n\tif v == \"\" {\n\t\treturn nil, ErrNotMultipart\n\t}\n\td, params, err := mime.ParseMediaType(v)\n\tif err != nil || d != \"multipart/form-data\" {\n\t\treturn nil, ErrNotMultipart\n\t}\n\tboundary, ok := params[\"boundary\"]\n\tif !ok {\n\t\treturn nil, ErrMissingBoundary\n\t}\n\treturn multipart.NewReader(r.Body, boundary), nil\n}\n\n// Return value if nonempty, def otherwise.\nfunc valueOrDefault(value, def string) string {\n\tif value != \"\" {\n\t\treturn value\n\t}\n\treturn def\n}\n\nconst defaultUserAgent = \"Go 1.1 package http\"\n\n// Write writes an HTTP/1.1 request -- header and body -- in wire format.\n// This method consults the following fields of the request:\n//\tHost\n//\tURL\n//\tMethod (defaults to \"GET\")\n//\tHeader\n//\tContentLength\n//\tTransferEncoding\n//\tBody\n//\n// If Body is present, Content-Length is <= 0 and TransferEncoding\n// hasn't been set to \"identity\", Write adds \"Transfer-Encoding:\n// chunked\" to the header. Body is closed after it is sent.\nfunc (r *Request) Write(w io.Writer) error {\n\treturn r.write(w, false, nil)\n}\n\n// WriteProxy is like Write but writes the request in the form\n// expected by an HTTP proxy.  In particular, WriteProxy writes the\n// initial Request-URI line of the request with an absolute URI, per\n// section 5.1.2 of RFC 2616, including the scheme and host.\n// In either case, WriteProxy also writes a Host header, using\n// either r.Host or r.URL.Host.\nfunc (r *Request) WriteProxy(w io.Writer) error {\n\treturn r.write(w, true, nil)\n}\n\n// extraHeaders may be nil\nfunc (req *Request) write(w io.Writer, usingProxy bool, extraHeaders Header) error {\n\thost := req.Host\n\tif host == \"\" {\n\t\tif req.URL == nil {\n\t\t\treturn errors.New(\"http: Request.Write on Request with no Host or URL set\")\n\t\t}\n\t\thost = req.URL.Host\n\t}\n\n\truri := req.URL.RequestURI()\n\tif usingProxy && req.URL.Scheme != \"\" && req.URL.Opaque == \"\" {\n\t\truri = req.URL.Scheme + \"://\" + host + ruri\n\t} else if req.Method == \"CONNECT\" && req.URL.Path == \"\" {\n\t\t// CONNECT requests normally give just the host and port, not a full URL.\n\t\truri = host\n\t}\n\t// TODO(bradfitz): escape at least newlines in ruri?\n\n\t// Wrap the writer in a bufio Writer if it's not already buffered.\n\t// Don't always call NewWriter, as that forces a bytes.Buffer\n\t// and other small bufio Writers to have a minimum 4k buffer\n\t// size.\n\tvar bw *bufio.Writer\n\tif _, ok := w.(io.ByteWriter); !ok {\n\t\tbw = bufio.NewWriter(w)\n\t\tw = bw\n\t}\n\n\tfmt.Fprintf(w, \"%s %s HTTP/1.1\\r\\n\", valueOrDefault(req.Method, \"GET\"), ruri)\n\n\t// Header lines\n\tfmt.Fprintf(w, \"Host: %s\\r\\n\", host)\n\n\t// Use the defaultUserAgent unless the Header contains one, which\n\t// may be blank to not send the header.\n\tuserAgent := defaultUserAgent\n\tif req.Header != nil {\n\t\tif ua := req.Header[\"User-Agent\"]; len(ua) > 0 {\n\t\t\tuserAgent = ua[0]\n\t\t}\n\t}\n\tif userAgent != \"\" {\n\t\tfmt.Fprintf(w, \"User-Agent: %s\\r\\n\", userAgent)\n\t}\n\n\t// Process Body,ContentLength,Close,Trailer\n\ttw, err := newTransferWriter(req)\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = tw.WriteHeader(w)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// TODO: split long values?  (If so, should share code with Conn.Write)\n\terr = req.Header.WriteSubset(w, reqWriteExcludeHeader)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif extraHeaders != nil {\n\t\terr = extraHeaders.Write(w)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tio.WriteString(w, \"\\r\\n\")\n\n\t// Write body and trailer\n\terr = tw.WriteBody(w)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif bw != nil {\n\t\treturn bw.Flush()\n\t}\n\treturn nil\n}\n\n// ParseHTTPVersion parses a HTTP version string.\n// \"HTTP/1.0\" returns (1, 0, true).\nfunc ParseHTTPVersion(vers string) (major, minor int, ok bool) {\n\tconst Big = 1000000 // arbitrary upper bound\n\tswitch vers {\n\tcase \"HTTP/1.1\":\n\t\treturn 1, 1, true\n\tcase \"HTTP/1.0\":\n\t\treturn 1, 0, true\n\t}\n\tif !strings.HasPrefix(vers, \"HTTP/\") {\n\t\treturn 0, 0, false\n\t}\n\tdot := strings.Index(vers, \".\")\n\tif dot < 0 {\n\t\treturn 0, 0, false\n\t}\n\tmajor, err := strconv.Atoi(vers[5:dot])\n\tif err != nil || major < 0 || major > Big {\n\t\treturn 0, 0, false\n\t}\n\tminor, err = strconv.Atoi(vers[dot+1:])\n\tif err != nil || minor < 0 || minor > Big {\n\t\treturn 0, 0, false\n\t}\n\treturn major, minor, true\n}\n\n// NewRequest returns a new Request given a method, URL, and optional body.\nfunc NewRequest(method, urlStr string, body io.Reader) (*Request, error) {\n\tu, err := url.Parse(urlStr)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\trc, ok := body.(io.ReadCloser)\n\tif !ok && body != nil {\n\t\trc = ioutil.NopCloser(body)\n\t}\n\treq := &Request{\n\t\tMethod:     method,\n\t\tURL:        u,\n\t\tProto:      \"HTTP/1.1\",\n\t\tProtoMajor: 1,\n\t\tProtoMinor: 1,\n\t\tHeader:     make(Header),\n\t\tBody:       rc,\n\t\tHost:       u.Host,\n\t}\n\tif body != nil {\n\t\tswitch v := body.(type) {\n\t\tcase *bytes.Buffer:\n\t\t\treq.ContentLength = int64(v.Len())\n\t\tcase *bytes.Reader:\n\t\t\treq.ContentLength = int64(v.Len())\n\t\tcase *strings.Reader:\n\t\t\treq.ContentLength = int64(v.Len())\n\t\t}\n\t}\n\n\treturn req, nil\n}\n\n// SetBasicAuth sets the request's Authorization header to use HTTP\n// Basic Authentication with the provided username and password.\n//\n// With HTTP Basic Authentication the provided username and password\n// are not encrypted.\nfunc (r *Request) SetBasicAuth(username, password string) {\n\ts := username + \":\" + password\n\tr.Header.Set(\"Authorization\", \"Basic \"+base64.StdEncoding.EncodeToString([]byte(s)))\n}\n\n// parseRequestLine parses \"GET /foo HTTP/1.1\" into its three parts.\nfunc parseRequestLine(line string) (method, requestURI, proto string, ok bool) {\n\ts1 := strings.Index(line, \" \")\n\ts2 := strings.Index(line[s1+1:], \" \")\n\tif s1 < 0 || s2 < 0 {\n\t\treturn\n\t}\n\ts2 += s1 + 1\n\treturn line[:s1], line[s1+1 : s2], line[s2+1:], true\n}\n\n// TODO(bradfitz): use a sync.Cache when available\nvar textprotoReaderCache = make(chan *textproto.Reader, 4)\n\nfunc newTextprotoReader(br *bufio.Reader) *textproto.Reader {\n\tselect {\n\tcase r := <-textprotoReaderCache:\n\t\tr.R = br\n\t\treturn r\n\tdefault:\n\t\treturn textproto.NewReader(br)\n\t}\n}\n\nfunc putTextprotoReader(r *textproto.Reader) {\n\tr.R = nil\n\tselect {\n\tcase textprotoReaderCache <- r:\n\tdefault:\n\t}\n}\n\n// ReadRequest reads and parses a request from b.\nfunc ReadRequest(b *bufio.Reader) (req *Request, err error) {\n\n\ttp := newTextprotoReader(b)\n\treq = new(Request)\n\n\t// First line: GET /index.html HTTP/1.0\n\tvar s string\n\tif s, err = tp.ReadLine(); err != nil {\n\t\treturn nil, err\n\t}\n\tdefer func() {\n\t\tputTextprotoReader(tp)\n\t\tif err == io.EOF {\n\t\t\terr = io.ErrUnexpectedEOF\n\t\t}\n\t}()\n\n\tvar ok bool\n\treq.Method, req.RequestURI, req.Proto, ok = parseRequestLine(s)\n\tif !ok {\n\t\treturn nil, &badStringError{\"malformed HTTP request\", s}\n\t}\n\trawurl := req.RequestURI\n\tif req.ProtoMajor, req.ProtoMinor, ok = ParseHTTPVersion(req.Proto); !ok {\n\t\treturn nil, &badStringError{\"malformed HTTP version\", req.Proto}\n\t}\n\n\t// CONNECT requests are used two different ways, and neither uses a full URL:\n\t// The standard use is to tunnel HTTPS through an HTTP proxy.\n\t// It looks like \"CONNECT www.google.com:443 HTTP/1.1\", and the parameter is\n\t// just the authority section of a URL. This information should go in req.URL.Host.\n\t//\n\t// The net/rpc package also uses CONNECT, but there the parameter is a path\n\t// that starts with a slash. It can be parsed with the regular URL parser,\n\t// and the path will end up in req.URL.Path, where it needs to be in order for\n\t// RPC to work.\n\tjustAuthority := req.Method == \"CONNECT\" && !strings.HasPrefix(rawurl, \"/\")\n\tif justAuthority {\n\t\trawurl = \"http://\" + rawurl\n\t}\n\n\tif req.URL, err = url.ParseRequestURI(rawurl); err != nil {\n\t\treturn nil, err\n\t}\n\n\tif justAuthority {\n\t\t// Strip the bogus \"http://\" back off.\n\t\treq.URL.Scheme = \"\"\n\t}\n\n\t// Subsequent lines: Key: value.\n\tmimeHeader, err := tp.ReadMIMEHeader()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treq.Header = Header(mimeHeader)\n\n\t// RFC2616: Must treat\n\t//\tGET /index.html HTTP/1.1\n\t//\tHost: www.google.com\n\t// and\n\t//\tGET http://www.google.com/index.html HTTP/1.1\n\t//\tHost: doesntmatter\n\t// the same.  In the second case, any Host line is ignored.\n\treq.Host = req.URL.Host\n\tif req.Host == \"\" {\n\t\treq.Host = req.Header.get(\"Host\")\n\t}\n\tdelete(req.Header, \"Host\")\n\n\tfixPragmaCacheControl(req.Header)\n\n\t// TODO: Parse specific header values:\n\t//\tAccept\n\t//\tAccept-Encoding\n\t//\tAccept-Language\n\t//\tAuthorization\n\t//\tCache-Control\n\t//\tConnection\n\t//\tDate\n\t//\tExpect\n\t//\tFrom\n\t//\tIf-Match\n\t//\tIf-Modified-Since\n\t//\tIf-None-Match\n\t//\tIf-Range\n\t//\tIf-Unmodified-Since\n\t//\tMax-Forwards\n\t//\tProxy-Authorization\n\t//\tReferer [sic]\n\t//\tTE (transfer-codings)\n\t//\tTrailer\n\t//\tTransfer-Encoding\n\t//\tUpgrade\n\t//\tUser-Agent\n\t//\tVia\n\t//\tWarning\n\n\terr = readTransfer(req, b)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn req, nil\n}\n\n// MaxBytesReader is similar to io.LimitReader but is intended for\n// limiting the size of incoming request bodies. In contrast to\n// io.LimitReader, MaxBytesReader's result is a ReadCloser, returns a\n// non-EOF error for a Read beyond the limit, and Closes the\n// underlying reader when its Close method is called.\n//\n// MaxBytesReader prevents clients from accidentally or maliciously\n// sending a large request and wasting server resources.\nfunc MaxBytesReader(w ResponseWriter, r io.ReadCloser, n int64) io.ReadCloser {\n\treturn &maxBytesReader{w: w, r: r, n: n}\n}\n\ntype maxBytesReader struct {\n\tw       ResponseWriter\n\tr       io.ReadCloser // underlying reader\n\tn       int64         // max bytes remaining\n\tstopped bool\n}\n\nfunc (l *maxBytesReader) Read(p []byte) (n int, err error) {\n\tif l.n <= 0 {\n\t\tif !l.stopped {\n\t\t\tl.stopped = true\n\t\t\tif res, ok := l.w.(*response); ok {\n\t\t\t\tres.requestTooLarge()\n\t\t\t}\n\t\t}\n\t\treturn 0, errors.New(\"http: request body too large\")\n\t}\n\tif int64(len(p)) > l.n {\n\t\tp = p[:l.n]\n\t}\n\tn, err = l.r.Read(p)\n\tl.n -= int64(n)\n\treturn\n}\n\nfunc (l *maxBytesReader) Close() error {\n\treturn l.r.Close()\n}\n\nfunc copyValues(dst, src url.Values) {\n\tfor k, vs := range src {\n\t\tfor _, value := range vs {\n\t\t\tdst.Add(k, value)\n\t\t}\n\t}\n}\n\nfunc parsePostForm(r *Request) (vs url.Values, err error) {\n\tif r.Body == nil {\n\t\terr = errors.New(\"missing form body\")\n\t\treturn\n\t}\n\tct := r.Header.Get(\"Content-Type\")\n\tct, _, err = mime.ParseMediaType(ct)\n\tswitch {\n\tcase ct == \"application/x-www-form-urlencoded\":\n\t\tvar reader io.Reader = r.Body\n\t\tmaxFormSize := int64(1<<63 - 1)\n\t\tif _, ok := r.Body.(*maxBytesReader); !ok {\n\t\t\tmaxFormSize = int64(10 << 20) // 10 MB is a lot of text.\n\t\t\treader = io.LimitReader(r.Body, maxFormSize+1)\n\t\t}\n\t\tb, e := ioutil.ReadAll(reader)\n\t\tif e != nil {\n\t\t\tif err == nil {\n\t\t\t\terr = e\n\t\t\t}\n\t\t\tbreak\n\t\t}\n\t\tif int64(len(b)) > maxFormSize {\n\t\t\terr = errors.New(\"http: POST too large\")\n\t\t\treturn\n\t\t}\n\t\tvs, e = url.ParseQuery(string(b))\n\t\tif err == nil {\n\t\t\terr = e\n\t\t}\n\tcase ct == \"multipart/form-data\":\n\t\t// handled by ParseMultipartForm (which is calling us, or should be)\n\t\t// TODO(bradfitz): there are too many possible\n\t\t// orders to call too many functions here.\n\t\t// Clean this up and write more tests.\n\t\t// request_test.go contains the start of this,\n\t\t// in TestRequestMultipartCallOrder.\n\t}\n\treturn\n}\n\n// ParseForm parses the raw query from the URL and updates r.Form.\n//\n// For POST or PUT requests, it also parses the request body as a form and\n// put the results into both r.PostForm and r.Form.\n// POST and PUT body parameters take precedence over URL query string values\n// in r.Form.\n//\n// If the request Body's size has not already been limited by MaxBytesReader,\n// the size is capped at 10MB.\n//\n// ParseMultipartForm calls ParseForm automatically.\n// It is idempotent.\nfunc (r *Request) ParseForm() error {\n\tvar err error\n\tif r.PostForm == nil {\n\t\tif r.Method == \"POST\" || r.Method == \"PUT\" {\n\t\t\tr.PostForm, err = parsePostForm(r)\n\t\t}\n\t\tif r.PostForm == nil {\n\t\t\tr.PostForm = make(url.Values)\n\t\t}\n\t}\n\tif r.Form == nil {\n\t\tif len(r.PostForm) > 0 {\n\t\t\tr.Form = make(url.Values)\n\t\t\tcopyValues(r.Form, r.PostForm)\n\t\t}\n\t\tvar newValues url.Values\n\t\tif r.URL != nil {\n\t\t\tvar e error\n\t\t\tnewValues, e = url.ParseQuery(r.URL.RawQuery)\n\t\t\tif err == nil {\n\t\t\t\terr = e\n\t\t\t}\n\t\t}\n\t\tif newValues == nil {\n\t\t\tnewValues = make(url.Values)\n\t\t}\n\t\tif r.Form == nil {\n\t\t\tr.Form = newValues\n\t\t} else {\n\t\t\tcopyValues(r.Form, newValues)\n\t\t}\n\t}\n\treturn err\n}\n\n// ParseMultipartForm parses a request body as multipart/form-data.\n// The whole request body is parsed and up to a total of maxMemory bytes of\n// its file parts are stored in memory, with the remainder stored on\n// disk in temporary files.\n// ParseMultipartForm calls ParseForm if necessary.\n// After one call to ParseMultipartForm, subsequent calls have no effect.\nfunc (r *Request) ParseMultipartForm(maxMemory int64) error {\n\tif r.MultipartForm == multipartByReader {\n\t\treturn errors.New(\"http: multipart handled by MultipartReader\")\n\t}\n\tif r.Form == nil {\n\t\terr := r.ParseForm()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tif r.MultipartForm != nil {\n\t\treturn nil\n\t}\n\n\tmr, err := r.multipartReader()\n\tif err == ErrNotMultipart {\n\t\treturn nil\n\t} else if err != nil {\n\t\treturn err\n\t}\n\n\tf, err := mr.ReadForm(maxMemory)\n\tif err != nil {\n\t\treturn err\n\t}\n\tfor k, v := range f.Value {\n\t\tr.Form[k] = append(r.Form[k], v...)\n\t}\n\tr.MultipartForm = f\n\n\treturn nil\n}\n\n// FormValue returns the first value for the named component of the query.\n// POST and PUT body parameters take precedence over URL query string values.\n// FormValue calls ParseMultipartForm and ParseForm if necessary.\n// To access multiple values of the same key use ParseForm.\nfunc (r *Request) FormValue(key string) string {\n\tif r.Form == nil {\n\t\tr.ParseMultipartForm(defaultMaxMemory)\n\t}\n\tif vs := r.Form[key]; len(vs) > 0 {\n\t\treturn vs[0]\n\t}\n\treturn \"\"\n}\n\n// PostFormValue returns the first value for the named component of the POST\n// or PUT request body. URL query parameters are ignored.\n// PostFormValue calls ParseMultipartForm and ParseForm if necessary.\nfunc (r *Request) PostFormValue(key string) string {\n\tif r.PostForm == nil {\n\t\tr.ParseMultipartForm(defaultMaxMemory)\n\t}\n\tif vs := r.PostForm[key]; len(vs) > 0 {\n\t\treturn vs[0]\n\t}\n\treturn \"\"\n}\n\n// FormFile returns the first file for the provided form key.\n// FormFile calls ParseMultipartForm and ParseForm if necessary.\nfunc (r *Request) FormFile(key string) (multipart.File, *multipart.FileHeader, error) {\n\tif r.MultipartForm == multipartByReader {\n\t\treturn nil, nil, errors.New(\"http: multipart handled by MultipartReader\")\n\t}\n\tif r.MultipartForm == nil {\n\t\terr := r.ParseMultipartForm(defaultMaxMemory)\n\t\tif err != nil {\n\t\t\treturn nil, nil, err\n\t\t}\n\t}\n\tif r.MultipartForm != nil && r.MultipartForm.File != nil {\n\t\tif fhs := r.MultipartForm.File[key]; len(fhs) > 0 {\n\t\t\tf, err := fhs[0].Open()\n\t\t\treturn f, fhs[0], err\n\t\t}\n\t}\n\treturn nil, nil, ErrMissingFile\n}\n\nfunc (r *Request) expectsContinue() bool {\n\treturn hasToken(r.Header.get(\"Expect\"), \"100-continue\")\n}\n\nfunc (r *Request) wantsHttp10KeepAlive() bool {\n\tif r.ProtoMajor != 1 || r.ProtoMinor != 0 {\n\t\treturn false\n\t}\n\treturn hasToken(r.Header.get(\"Connection\"), \"keep-alive\")\n}\n\nfunc (r *Request) wantsClose() bool {\n\treturn hasToken(r.Header.get(\"Connection\"), \"close\")\n}\n"
  },
  {
    "path": "testData/mockSdk-1.1.2/src/pkg/net/internal/internal.go",
    "content": "package internalSdkPackage\n\nimport \"fmt\"\n\nfunc InternalSdkFunction() {\n  fmt.Println(\"I'm internal SDK function\")\n}"
  },
  {
    "path": "testData/mockSdk-1.1.2/src/pkg/net/url/url.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package url parses URLs and implements query escaping.\n// See RFC 3986.\npackage url\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n\t\"sort\"\n\t\"strconv\"\n\t\"strings\"\n)\n\n// Error reports an error and the operation and URL that caused it.\ntype Error struct {\n\tOp  string\n\tURL string\n\tErr error\n}\n\nfunc (e *Error) Error() string { return e.Op + \" \" + e.URL + \": \" + e.Err.Error() }\n\nfunc ishex(c byte) bool {\n\tswitch {\n\tcase '0' <= c && c <= '9':\n\t\treturn true\n\tcase 'a' <= c && c <= 'f':\n\t\treturn true\n\tcase 'A' <= c && c <= 'F':\n\t\treturn true\n\t}\n\treturn false\n}\n\nfunc unhex(c byte) byte {\n\tswitch {\n\tcase '0' <= c && c <= '9':\n\t\treturn c - '0'\n\tcase 'a' <= c && c <= 'f':\n\t\treturn c - 'a' + 10\n\tcase 'A' <= c && c <= 'F':\n\t\treturn c - 'A' + 10\n\t}\n\treturn 0\n}\n\ntype encoding int\n\nconst (\n\tencodePath encoding = 1 + iota\n\tencodeUserPassword\n\tencodeQueryComponent\n\tencodeFragment\n)\n\ntype EscapeError string\n\nfunc (e EscapeError) Error() string {\n\treturn \"invalid URL escape \" + strconv.Quote(string(e))\n}\n\n// Return true if the specified character should be escaped when\n// appearing in a URL string, according to RFC 3986.\nfunc shouldEscape(c byte, mode encoding) bool {\n\t// §2.3 Unreserved characters (alphanum)\n\tif 'A' <= c && c <= 'Z' || 'a' <= c && c <= 'z' || '0' <= c && c <= '9' {\n\t\treturn false\n\t}\n\n\tswitch c {\n\tcase '-', '_', '.', '~': // §2.3 Unreserved characters (mark)\n\t\treturn false\n\n\tcase '$', '&', '+', ',', '/', ':', ';', '=', '?', '@': // §2.2 Reserved characters (reserved)\n\t\t// Different sections of the URL allow a few of\n\t\t// the reserved characters to appear unescaped.\n\t\tswitch mode {\n\t\tcase encodePath: // §3.3\n\t\t\t// The RFC allows : @ & = + $ but saves / ; , for assigning\n\t\t\t// meaning to individual path segments. This package\n\t\t\t// only manipulates the path as a whole, so we allow those\n\t\t\t// last two as well. That leaves only ? to escape.\n\t\t\treturn c == '?'\n\n\t\tcase encodeUserPassword: // §3.2.1\n\t\t\t// The RFC allows ';', ':', '&', '=', '+', '$', and ',' in\n\t\t\t// userinfo, so we must escape only '@', '/', and '?'.\n\t\t\t// The parsing of userinfo treats ':' as special so we must escape\n\t\t\t// that too.\n\t\t\treturn c == '@' || c == '/' || c == '?' || c == ':'\n\n\t\tcase encodeQueryComponent: // §3.4\n\t\t\t// The RFC reserves (so we must escape) everything.\n\t\t\treturn true\n\n\t\tcase encodeFragment: // §4.1\n\t\t\t// The RFC text is silent but the grammar allows\n\t\t\t// everything, so escape nothing.\n\t\t\treturn false\n\t\t}\n\t}\n\n\t// Everything else must be escaped.\n\treturn true\n}\n\n// QueryUnescape does the inverse transformation of QueryEscape, converting\n// %AB into the byte 0xAB and '+' into ' ' (space). It returns an error if\n// any % is not followed by two hexadecimal digits.\nfunc QueryUnescape(s string) (string, error) {\n\treturn unescape(s, encodeQueryComponent)\n}\n\n// unescape unescapes a string; the mode specifies\n// which section of the URL string is being unescaped.\nfunc unescape(s string, mode encoding) (string, error) {\n\t// Count %, check that they're well-formed.\n\tn := 0\n\thasPlus := false\n\tfor i := 0; i < len(s); {\n\t\tswitch s[i] {\n\t\tcase '%':\n\t\t\tn++\n\t\t\tif i+2 >= len(s) || !ishex(s[i+1]) || !ishex(s[i+2]) {\n\t\t\t\ts = s[i:]\n\t\t\t\tif len(s) > 3 {\n\t\t\t\t\ts = s[0:3]\n\t\t\t\t}\n\t\t\t\treturn \"\", EscapeError(s)\n\t\t\t}\n\t\t\ti += 3\n\t\tcase '+':\n\t\t\thasPlus = mode == encodeQueryComponent\n\t\t\ti++\n\t\tdefault:\n\t\t\ti++\n\t\t}\n\t}\n\n\tif n == 0 && !hasPlus {\n\t\treturn s, nil\n\t}\n\n\tt := make([]byte, len(s)-2*n)\n\tj := 0\n\tfor i := 0; i < len(s); {\n\t\tswitch s[i] {\n\t\tcase '%':\n\t\t\tt[j] = unhex(s[i+1])<<4 | unhex(s[i+2])\n\t\t\tj++\n\t\t\ti += 3\n\t\tcase '+':\n\t\t\tif mode == encodeQueryComponent {\n\t\t\t\tt[j] = ' '\n\t\t\t} else {\n\t\t\t\tt[j] = '+'\n\t\t\t}\n\t\t\tj++\n\t\t\ti++\n\t\tdefault:\n\t\t\tt[j] = s[i]\n\t\t\tj++\n\t\t\ti++\n\t\t}\n\t}\n\treturn string(t), nil\n}\n\n// QueryEscape escapes the string so it can be safely placed\n// inside a URL query.\nfunc QueryEscape(s string) string {\n\treturn escape(s, encodeQueryComponent)\n}\n\nfunc escape(s string, mode encoding) string {\n\tspaceCount, hexCount := 0, 0\n\tfor i := 0; i < len(s); i++ {\n\t\tc := s[i]\n\t\tif shouldEscape(c, mode) {\n\t\t\tif c == ' ' && mode == encodeQueryComponent {\n\t\t\t\tspaceCount++\n\t\t\t} else {\n\t\t\t\thexCount++\n\t\t\t}\n\t\t}\n\t}\n\n\tif spaceCount == 0 && hexCount == 0 {\n\t\treturn s\n\t}\n\n\tt := make([]byte, len(s)+2*hexCount)\n\tj := 0\n\tfor i := 0; i < len(s); i++ {\n\t\tswitch c := s[i]; {\n\t\tcase c == ' ' && mode == encodeQueryComponent:\n\t\t\tt[j] = '+'\n\t\t\tj++\n\t\tcase shouldEscape(c, mode):\n\t\t\tt[j] = '%'\n\t\t\tt[j+1] = \"0123456789ABCDEF\"[c>>4]\n\t\t\tt[j+2] = \"0123456789ABCDEF\"[c&15]\n\t\t\tj += 3\n\t\tdefault:\n\t\t\tt[j] = s[i]\n\t\t\tj++\n\t\t}\n\t}\n\treturn string(t)\n}\n\n// A URL represents a parsed URL (technically, a URI reference).\n// The general form represented is:\n//\n//\tscheme://[userinfo@]host/path[?query][#fragment]\n//\n// URLs that do not start with a slash after the scheme are interpreted as:\n//\n//\tscheme:opaque[?query][#fragment]\n//\n// Note that the Path field is stored in decoded form: /%47%6f%2f becomes /Go/.\n// A consequence is that it is impossible to tell which slashes in the Path were\n// slashes in the raw URL and which were %2f. This distinction is rarely important,\n// but when it is a client must use other routines to parse the raw URL or construct\n// the parsed URL. For example, an HTTP server can consult req.RequestURI, and\n// an HTTP client can use URL{Host: \"example.com\", Opaque: \"//example.com/Go%2f\"}\n// instead of URL{Host: \"example.com\", Path: \"/Go/\"}.\ntype URL struct {\n\tScheme   string\n\tOpaque   string    // encoded opaque data\n\tUser     *Userinfo // username and password information\n\tHost     string    // host or host:port\n\tPath     string\n\tRawQuery string // encoded query values, without '?'\n\tFragment string // fragment for references, without '#'\n}\n\n// User returns a Userinfo containing the provided username\n// and no password set.\nfunc User(username string) *Userinfo {\n\treturn &Userinfo{username, \"\", false}\n}\n\n// UserPassword returns a Userinfo containing the provided username\n// and password.\n// This functionality should only be used with legacy web sites.\n// RFC 2396 warns that interpreting Userinfo this way\n// ``is NOT RECOMMENDED, because the passing of authentication\n// information in clear text (such as URI) has proven to be a\n// security risk in almost every case where it has been used.''\nfunc UserPassword(username, password string) *Userinfo {\n\treturn &Userinfo{username, password, true}\n}\n\n// The Userinfo type is an immutable encapsulation of username and\n// password details for a URL. An existing Userinfo value is guaranteed\n// to have a username set (potentially empty, as allowed by RFC 2396),\n// and optionally a password.\ntype Userinfo struct {\n\tusername    string\n\tpassword    string\n\tpasswordSet bool\n}\n\n// Username returns the username.\nfunc (u *Userinfo) Username() string {\n\treturn u.username\n}\n\n// Password returns the password in case it is set, and whether it is set.\nfunc (u *Userinfo) Password() (string, bool) {\n\tif u.passwordSet {\n\t\treturn u.password, true\n\t}\n\treturn \"\", false\n}\n\n// String returns the encoded userinfo information in the standard form\n// of \"username[:password]\".\nfunc (u *Userinfo) String() string {\n\ts := escape(u.username, encodeUserPassword)\n\tif u.passwordSet {\n\t\ts += \":\" + escape(u.password, encodeUserPassword)\n\t}\n\treturn s\n}\n\n// Maybe rawurl is of the form scheme:path.\n// (Scheme must be [a-zA-Z][a-zA-Z0-9+-.]*)\n// If so, return scheme, path; else return \"\", rawurl.\nfunc getscheme(rawurl string) (scheme, path string, err error) {\n\tfor i := 0; i < len(rawurl); i++ {\n\t\tc := rawurl[i]\n\t\tswitch {\n\t\tcase 'a' <= c && c <= 'z' || 'A' <= c && c <= 'Z':\n\t\t// do nothing\n\t\tcase '0' <= c && c <= '9' || c == '+' || c == '-' || c == '.':\n\t\t\tif i == 0 {\n\t\t\t\treturn \"\", rawurl, nil\n\t\t\t}\n\t\tcase c == ':':\n\t\t\tif i == 0 {\n\t\t\t\treturn \"\", \"\", errors.New(\"missing protocol scheme\")\n\t\t\t}\n\t\t\treturn rawurl[0:i], rawurl[i+1:], nil\n\t\tdefault:\n\t\t\t// we have encountered an invalid character,\n\t\t\t// so there is no valid scheme\n\t\t\treturn \"\", rawurl, nil\n\t\t}\n\t}\n\treturn \"\", rawurl, nil\n}\n\n// Maybe s is of the form t c u.\n// If so, return t, c u (or t, u if cutc == true).\n// If not, return s, \"\".\nfunc split(s string, c string, cutc bool) (string, string) {\n\ti := strings.Index(s, c)\n\tif i < 0 {\n\t\treturn s, \"\"\n\t}\n\tif cutc {\n\t\treturn s[0:i], s[i+len(c):]\n\t}\n\treturn s[0:i], s[i:]\n}\n\n// Parse parses rawurl into a URL structure.\n// The rawurl may be relative or absolute.\nfunc Parse(rawurl string) (url *URL, err error) {\n\t// Cut off #frag\n\tu, frag := split(rawurl, \"#\", true)\n\tif url, err = parse(u, false); err != nil {\n\t\treturn nil, err\n\t}\n\tif frag == \"\" {\n\t\treturn url, nil\n\t}\n\tif url.Fragment, err = unescape(frag, encodeFragment); err != nil {\n\t\treturn nil, &Error{\"parse\", rawurl, err}\n\t}\n\treturn url, nil\n}\n\n// ParseRequestURI parses rawurl into a URL structure.  It assumes that\n// rawurl was received in an HTTP request, so the rawurl is interpreted\n// only as an absolute URI or an absolute path.\n// The string rawurl is assumed not to have a #fragment suffix.\n// (Web browsers strip #fragment before sending the URL to a web server.)\nfunc ParseRequestURI(rawurl string) (url *URL, err error) {\n\treturn parse(rawurl, true)\n}\n\n// parse parses a URL from a string in one of two contexts.  If\n// viaRequest is true, the URL is assumed to have arrived via an HTTP request,\n// in which case only absolute URLs or path-absolute relative URLs are allowed.\n// If viaRequest is false, all forms of relative URLs are allowed.\nfunc parse(rawurl string, viaRequest bool) (url *URL, err error) {\n\tvar rest string\n\n\tif rawurl == \"\" && viaRequest {\n\t\terr = errors.New(\"empty url\")\n\t\tgoto Error\n\t}\n\turl = new(URL)\n\n\tif rawurl == \"*\" {\n\t\turl.Path = \"*\"\n\t\treturn\n\t}\n\n\t// Split off possible leading \"http:\", \"mailto:\", etc.\n\t// Cannot contain escaped characters.\n\tif url.Scheme, rest, err = getscheme(rawurl); err != nil {\n\t\tgoto Error\n\t}\n\turl.Scheme = strings.ToLower(url.Scheme)\n\n\trest, url.RawQuery = split(rest, \"?\", true)\n\n\tif !strings.HasPrefix(rest, \"/\") {\n\t\tif url.Scheme != \"\" {\n\t\t\t// We consider rootless paths per RFC 3986 as opaque.\n\t\t\turl.Opaque = rest\n\t\t\treturn url, nil\n\t\t}\n\t\tif viaRequest {\n\t\t\terr = errors.New(\"invalid URI for request\")\n\t\t\tgoto Error\n\t\t}\n\t}\n\n\tif (url.Scheme != \"\" || !viaRequest && !strings.HasPrefix(rest, \"///\")) && strings.HasPrefix(rest, \"//\") {\n\t\tvar authority string\n\t\tauthority, rest = split(rest[2:], \"/\", false)\n\t\turl.User, url.Host, err = parseAuthority(authority)\n\t\tif err != nil {\n\t\t\tgoto Error\n\t\t}\n\t\tif strings.Contains(url.Host, \"%\") {\n\t\t\terr = errors.New(\"hexadecimal escape in host\")\n\t\t\tgoto Error\n\t\t}\n\t}\n\tif url.Path, err = unescape(rest, encodePath); err != nil {\n\t\tgoto Error\n\t}\n\treturn url, nil\n\nError:\n\treturn nil, &Error{\"parse\", rawurl, err}\n}\n\nfunc parseAuthority(authority string) (user *Userinfo, host string, err error) {\n\ti := strings.LastIndex(authority, \"@\")\n\tif i < 0 {\n\t\thost = authority\n\t\treturn\n\t}\n\tuserinfo, host := authority[:i], authority[i+1:]\n\tif strings.Index(userinfo, \":\") < 0 {\n\t\tif userinfo, err = unescape(userinfo, encodeUserPassword); err != nil {\n\t\t\treturn\n\t\t}\n\t\tuser = User(userinfo)\n\t} else {\n\t\tusername, password := split(userinfo, \":\", true)\n\t\tif username, err = unescape(username, encodeUserPassword); err != nil {\n\t\t\treturn\n\t\t}\n\t\tif password, err = unescape(password, encodeUserPassword); err != nil {\n\t\t\treturn\n\t\t}\n\t\tuser = UserPassword(username, password)\n\t}\n\treturn\n}\n\n// String reassembles the URL into a valid URL string.\n// The general form of the result is one of:\n//\n//\tscheme:opaque\n//\tscheme://userinfo@host/path?query#fragment\n//\n// If u.Opaque is non-empty, String uses the first form;\n// otherwise it uses the second form.\n//\n// In the second form, the following rules apply:\n//\t- if u.Scheme is empty, scheme: is omitted.\n//\t- if u.User is nil, userinfo@ is omitted.\n//\t- if u.Host is empty, host/ is omitted.\n//\t- if u.Scheme and u.Host are empty and u.User is nil,\n//\t   the entire scheme://userinfo@host/ is omitted.\n//\t- if u.Host is non-empty and u.Path begins with a /,\n//\t   the form host/path does not add its own /.\n//\t- if u.RawQuery is empty, ?query is omitted.\n//\t- if u.Fragment is empty, #fragment is omitted.\nfunc (u *URL) String() string {\n\tvar buf bytes.Buffer\n\tif u.Scheme != \"\" {\n\t\tbuf.WriteString(u.Scheme)\n\t\tbuf.WriteByte(':')\n\t}\n\tif u.Opaque != \"\" {\n\t\tbuf.WriteString(u.Opaque)\n\t} else {\n\t\tif u.Scheme != \"\" || u.Host != \"\" || u.User != nil {\n\t\t\tbuf.WriteString(\"//\")\n\t\t\tif ui := u.User; ui != nil {\n\t\t\t\tbuf.WriteString(ui.String())\n\t\t\t\tbuf.WriteByte('@')\n\t\t\t}\n\t\t\tif h := u.Host; h != \"\" {\n\t\t\t\tbuf.WriteString(h)\n\t\t\t}\n\t\t}\n\t\tif u.Path != \"\" && u.Path[0] != '/' && u.Host != \"\" {\n\t\t\tbuf.WriteByte('/')\n\t\t}\n\t\tbuf.WriteString(escape(u.Path, encodePath))\n\t}\n\tif u.RawQuery != \"\" {\n\t\tbuf.WriteByte('?')\n\t\tbuf.WriteString(u.RawQuery)\n\t}\n\tif u.Fragment != \"\" {\n\t\tbuf.WriteByte('#')\n\t\tbuf.WriteString(escape(u.Fragment, encodeFragment))\n\t}\n\treturn buf.String()\n}\n\n// Values maps a string key to a list of values.\n// It is typically used for query parameters and form values.\n// Unlike in the http.Header map, the keys in a Values map\n// are case-sensitive.\ntype Values map[string][]string\n\n// Get gets the first value associated with the given key.\n// If there are no values associated with the key, Get returns\n// the empty string. To access multiple values, use the map\n// directly.\nfunc (v Values) Get(key string) string {\n\tif v == nil {\n\t\treturn \"\"\n\t}\n\tvs, ok := v[key]\n\tif !ok || len(vs) == 0 {\n\t\treturn \"\"\n\t}\n\treturn vs[0]\n}\n\n// Set sets the key to value. It replaces any existing\n// values.\nfunc (v Values) Set(key, value string) {\n\tv[key] = []string{value}\n}\n\n// Add adds the value to key. It appends to any existing\n// values associated with key.\nfunc (v Values) Add(key, value string) {\n\tv[key] = append(v[key], value)\n}\n\n// Del deletes the values associated with key.\nfunc (v Values) Del(key string) {\n\tdelete(v, key)\n}\n\n// ParseQuery parses the URL-encoded query string and returns\n// a map listing the values specified for each key.\n// ParseQuery always returns a non-nil map containing all the\n// valid query parameters found; err describes the first decoding error\n// encountered, if any.\nfunc ParseQuery(query string) (m Values, err error) {\n\tm = make(Values)\n\terr = parseQuery(m, query)\n\treturn\n}\n\nfunc parseQuery(m Values, query string) (err error) {\n\tfor query != \"\" {\n\t\tkey := query\n\t\tif i := strings.IndexAny(key, \"&;\"); i >= 0 {\n\t\t\tkey, query = key[:i], key[i+1:]\n\t\t} else {\n\t\t\tquery = \"\"\n\t\t}\n\t\tif key == \"\" {\n\t\t\tcontinue\n\t\t}\n\t\tvalue := \"\"\n\t\tif i := strings.Index(key, \"=\"); i >= 0 {\n\t\t\tkey, value = key[:i], key[i+1:]\n\t\t}\n\t\tkey, err1 := QueryUnescape(key)\n\t\tif err1 != nil {\n\t\t\tif err == nil {\n\t\t\t\terr = err1\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\t\tvalue, err1 = QueryUnescape(value)\n\t\tif err1 != nil {\n\t\t\tif err == nil {\n\t\t\t\terr = err1\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\t\tm[key] = append(m[key], value)\n\t}\n\treturn err\n}\n\n// Encode encodes the values into ``URL encoded'' form\n// (\"bar=baz&foo=quux\") sorted by key.\nfunc (v Values) Encode() string {\n\tif v == nil {\n\t\treturn \"\"\n\t}\n\tvar buf bytes.Buffer\n\tkeys := make([]string, 0, len(v))\n\tfor k := range v {\n\t\tkeys = append(keys, k)\n\t}\n\tsort.Strings(keys)\n\tfor _, k := range keys {\n\t\tvs := v[k]\n\t\tprefix := QueryEscape(k) + \"=\"\n\t\tfor _, v := range vs {\n\t\t\tif buf.Len() > 0 {\n\t\t\t\tbuf.WriteByte('&')\n\t\t\t}\n\t\t\tbuf.WriteString(prefix)\n\t\t\tbuf.WriteString(QueryEscape(v))\n\t\t}\n\t}\n\treturn buf.String()\n}\n\n// resolvePath applies special path segments from refs and applies\n// them to base, per RFC 3986.\nfunc resolvePath(base, ref string) string {\n\tvar full string\n\tif ref == \"\" {\n\t\tfull = base\n\t} else if ref[0] != '/' {\n\t\ti := strings.LastIndex(base, \"/\")\n\t\tfull = base[:i+1] + ref\n\t} else {\n\t\tfull = ref\n\t}\n\tif full == \"\" {\n\t\treturn \"\"\n\t}\n\tvar dst []string\n\tsrc := strings.Split(full, \"/\")\n\tfor _, elem := range src {\n\t\tswitch elem {\n\t\tcase \".\":\n\t\t\t// drop\n\t\tcase \"..\":\n\t\t\tif len(dst) > 0 {\n\t\t\t\tdst = dst[:len(dst)-1]\n\t\t\t}\n\t\tdefault:\n\t\t\tdst = append(dst, elem)\n\t\t}\n\t}\n\tif last := src[len(src)-1]; last == \".\" || last == \"..\" {\n\t\t// Add final slash to the joined path.\n\t\tdst = append(dst, \"\")\n\t}\n\treturn \"/\" + strings.TrimLeft(strings.Join(dst, \"/\"), \"/\")\n}\n\n// IsAbs returns true if the URL is absolute.\nfunc (u *URL) IsAbs() bool {\n\treturn u.Scheme != \"\"\n}\n\n// Parse parses a URL in the context of the receiver.  The provided URL\n// may be relative or absolute.  Parse returns nil, err on parse\n// failure, otherwise its return value is the same as ResolveReference.\nfunc (u *URL) Parse(ref string) (*URL, error) {\n\trefurl, err := Parse(ref)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn u.ResolveReference(refurl), nil\n}\n\n// ResolveReference resolves a URI reference to an absolute URI from\n// an absolute base URI, per RFC 3986 Section 5.2.  The URI reference\n// may be relative or absolute.  ResolveReference always returns a new\n// URL instance, even if the returned URL is identical to either the\n// base or reference. If ref is an absolute URL, then ResolveReference\n// ignores base and returns a copy of ref.\nfunc (u *URL) ResolveReference(ref *URL) *URL {\n\turl := *ref\n\tif ref.Scheme == \"\" {\n\t\turl.Scheme = u.Scheme\n\t}\n\tif ref.Scheme != \"\" || ref.Host != \"\" || ref.User != nil {\n\t\t// The \"absoluteURI\" or \"net_path\" cases.\n\t\turl.Path = resolvePath(ref.Path, \"\")\n\t\treturn &url\n\t}\n\tif ref.Opaque != \"\" {\n\t\turl.User = nil\n\t\turl.Host = \"\"\n\t\turl.Path = \"\"\n\t\treturn &url\n\t}\n\tif ref.Path == \"\" {\n\t\tif ref.RawQuery == \"\" {\n\t\t\turl.RawQuery = u.RawQuery\n\t\t\tif ref.Fragment == \"\" {\n\t\t\t\turl.Fragment = u.Fragment\n\t\t\t}\n\t\t}\n\t}\n\t// The \"abs_path\" or \"rel_path\" cases.\n\turl.Host = u.Host\n\turl.User = u.User\n\turl.Path = resolvePath(u.Path, ref.Path)\n\treturn &url\n}\n\n// Query parses RawQuery and returns the corresponding values.\nfunc (u *URL) Query() Values {\n\tv, _ := ParseQuery(u.RawQuery)\n\treturn v\n}\n\n// RequestURI returns the encoded path?query or opaque?query\n// string that would be used in an HTTP request for u.\nfunc (u *URL) RequestURI() string {\n\tresult := u.Opaque\n\tif result == \"\" {\n\t\tresult = escape(u.Path, encodePath)\n\t\tif result == \"\" {\n\t\t\tresult = \"/\"\n\t\t}\n\t} else {\n\t\tif strings.HasPrefix(result, \"//\") {\n\t\t\tresult = u.Scheme + \":\" + result\n\t\t}\n\t}\n\tif u.RawQuery != \"\" {\n\t\tresult += \"?\" + u.RawQuery\n\t}\n\treturn result\n}\n"
  },
  {
    "path": "testData/mockSdk-1.1.2/src/pkg/os/file.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package os provides a platform-independent interface to operating system\n// functionality. The design is Unix-like, although the error handling is\n// Go-like; failing calls return values of type error rather than error numbers.\n// Often, more information is available within the error. For example,\n// if a call that takes a file name fails, such as Open or Stat, the error\n// will include the failing file name when printed and will be of type\n// *PathError, which may be unpacked for more information.\n//\n// The os interface is intended to be uniform across all operating systems.\n// Features not generally available appear in the system-specific package syscall.\n//\n// Here is a simple example, opening a file and reading some of it.\n//\n//\tfile, err := os.Open(\"file.go\") // For read access.\n//\tif err != nil {\n//\t\tlog.Fatal(err)\n//\t}\n//\n// If the open fails, the error string will be self-explanatory, like\n//\n//\topen file.go: no such file or directory\n//\n// The file's data can then be read into a slice of bytes. Read and\n// Write take their byte counts from the length of the argument slice.\n//\n//\tdata := make([]byte, 100)\n//\tcount, err := file.Read(data)\n//\tif err != nil {\n//\t\tlog.Fatal(err)\n//\t}\n//\tfmt.Printf(\"read %d bytes: %q\\n\", count, data[:count])\n//\npackage os\n\nimport (\n\t\"io\"\n\t\"syscall\"\n)\n\ntype File struct {\n\t*file\n}\n\nfunc (file *File) Close() error {\n\tif file == nil {\n\t\treturn ErrInvalid\n\t}\n\treturn file.file.close()\n}\n\n// file is the real representation of *File.\n// The extra level of indirection ensures that no clients of os\n// can overwrite this data, which could cause the finalizer\n// to close the wrong file descriptor.\ntype file struct {\n\tfd      int\n\tname    string\n\tdirinfo *dirInfo // nil unless directory being read\n\tnepipe  int32    // number of consecutive EPIPE in Write\n}\n\n// Name returns the name of the file as presented to Open.\nfunc (f *File) Name() string { return f.name }\n\n// Stdin, Stdout, and Stderr are open Files pointing to the standard input,\n// standard output, and standard error file descriptors.\nvar (\n\tStdin  = NewFile(uintptr(syscall.Stdin), \"/dev/stdin\")\n\tStdout = NewFile(uintptr(syscall.Stdout), \"/dev/stdout\")\n\tStderr = NewFile(uintptr(syscall.Stderr), \"/dev/stderr\")\n)\n\n// Flags to Open wrapping those of the underlying system. Not all flags\n// may be implemented on a given system.\nconst (\n\tO_RDONLY int = syscall.O_RDONLY // open the file read-only.\n\tO_WRONLY int = syscall.O_WRONLY // open the file write-only.\n\tO_RDWR   int = syscall.O_RDWR   // open the file read-write.\n\tO_APPEND int = syscall.O_APPEND // append data to the file when writing.\n\tO_CREATE int = syscall.O_CREAT  // create a new file if none exists.\n\tO_EXCL   int = syscall.O_EXCL   // used with O_CREATE, file must not exist\n\tO_SYNC   int = syscall.O_SYNC   // open for synchronous I/O.\n\tO_TRUNC  int = syscall.O_TRUNC  // if possible, truncate file when opened.\n)\n\n// Seek whence values.\nconst (\n\tSEEK_SET int = 0 // seek relative to the origin of the file\n\tSEEK_CUR int = 1 // seek relative to the current offset\n\tSEEK_END int = 2 // seek relative to the end\n)\n\n// LinkError records an error during a link or symlink or rename\n// system call and the paths that caused it.\ntype LinkError struct {\n\tOp  string\n\tOld string\n\tNew string\n\tErr error\n}\n\nfunc (e *LinkError) Error() string {\n\treturn e.Op + \" \" + e.Old + \" \" + e.New + \": \" + e.Err.Error()\n}\n\n// Read reads up to len(b) bytes from the File.\n// It returns the number of bytes read and an error, if any.\n// EOF is signaled by a zero count with err set to io.EOF.\nfunc (f *File) Read(b []byte) (n int, err error) {\n\tif f == nil {\n\t\treturn 0, ErrInvalid\n\t}\n\tn, e := f.read(b)\n\tif n < 0 {\n\t\tn = 0\n\t}\n\tif n == 0 && len(b) > 0 && e == nil {\n\t\treturn 0, io.EOF\n\t}\n\tif e != nil {\n\t\terr = &PathError{\"read\", f.name, e}\n\t}\n\treturn n, err\n}\n\n// ReadAt reads len(b) bytes from the File starting at byte offset off.\n// It returns the number of bytes read and the error, if any.\n// ReadAt always returns a non-nil error when n < len(b).\n// At end of file, that error is io.EOF.\nfunc (f *File) ReadAt(b []byte, off int64) (n int, err error) {\n\tif f == nil {\n\t\treturn 0, ErrInvalid\n\t}\n\tfor len(b) > 0 {\n\t\tm, e := f.pread(b, off)\n\t\tif m == 0 && e == nil {\n\t\t\treturn n, io.EOF\n\t\t}\n\t\tif e != nil {\n\t\t\terr = &PathError{\"read\", f.name, e}\n\t\t\tbreak\n\t\t}\n\t\tn += m\n\t\tb = b[m:]\n\t\toff += int64(m)\n\t}\n\treturn\n}\n\n// Write writes len(b) bytes to the File.\n// It returns the number of bytes written and an error, if any.\n// Write returns a non-nil error when n != len(b).\nfunc (f *File) Write(b []byte) (n int, err error) {\n\tif f == nil {\n\t\treturn 0, ErrInvalid\n\t}\n\tn, e := f.write(b)\n\tif n < 0 {\n\t\tn = 0\n\t}\n\tif n != len(b) {\n\t\terr = io.ErrShortWrite\n\t}\n\n\tepipecheck(f, e)\n\n\tif e != nil {\n\t\terr = &PathError{\"write\", f.name, e}\n\t}\n\treturn n, err\n}\n\n// WriteAt writes len(b) bytes to the File starting at byte offset off.\n// It returns the number of bytes written and an error, if any.\n// WriteAt returns a non-nil error when n != len(b).\nfunc (f *File) WriteAt(b []byte, off int64) (n int, err error) {\n\tif f == nil {\n\t\treturn 0, ErrInvalid\n\t}\n\tfor len(b) > 0 {\n\t\tm, e := f.pwrite(b, off)\n\t\tif e != nil {\n\t\t\terr = &PathError{\"write\", f.name, e}\n\t\t\tbreak\n\t\t}\n\t\tn += m\n\t\tb = b[m:]\n\t\toff += int64(m)\n\t}\n\treturn\n}\n\n// Seek sets the offset for the next Read or Write on file to offset, interpreted\n// according to whence: 0 means relative to the origin of the file, 1 means\n// relative to the current offset, and 2 means relative to the end.\n// It returns the new offset and an error, if any.\nfunc (f *File) Seek(offset int64, whence int) (ret int64, err error) {\n\tif f == nil {\n\t\treturn 0, ErrInvalid\n\t}\n\tr, e := f.seek(offset, whence)\n\tif e == nil && f.dirinfo != nil && r != 0 {\n\t\te = syscall.EISDIR\n\t}\n\tif e != nil {\n\t\treturn 0, &PathError{\"seek\", f.name, e}\n\t}\n\treturn r, nil\n}\n\n// WriteString is like Write, but writes the contents of string s rather than\n// a slice of bytes.\nfunc (f *File) WriteString(s string) (ret int, err error) {\n\tif f == nil {\n\t\treturn 0, ErrInvalid\n\t}\n\treturn f.Write([]byte(s))\n}\n\n// Mkdir creates a new directory with the specified name and permission bits.\n// If there is an error, it will be of type *PathError.\nfunc Mkdir(name string, perm FileMode) error {\n\te := syscall.Mkdir(name, syscallMode(perm))\n\tif e != nil {\n\t\treturn &PathError{\"mkdir\", name, e}\n\t}\n\treturn nil\n}\n\n// Chdir changes the current working directory to the named directory.\n// If there is an error, it will be of type *PathError.\nfunc Chdir(dir string) error {\n\tif e := syscall.Chdir(dir); e != nil {\n\t\treturn &PathError{\"chdir\", dir, e}\n\t}\n\treturn nil\n}\n\n// Chdir changes the current working directory to the file,\n// which must be a directory.\n// If there is an error, it will be of type *PathError.\nfunc (f *File) Chdir() error {\n\tif f == nil {\n\t\treturn ErrInvalid\n\t}\n\tif e := syscall.Fchdir(f.fd); e != nil {\n\t\treturn &PathError{\"chdir\", f.name, e}\n\t}\n\treturn nil\n}\n\n// Open opens the named file for reading.  If successful, methods on\n// the returned file can be used for reading; the associated file\n// descriptor has mode O_RDONLY.\n// If there is an error, it will be of type *PathError.\nfunc Open(name string) (file *File, err error) {\n\treturn OpenFile(name, O_RDONLY, 0)\n}\n\n// Create creates the named file mode 0666 (before umask), truncating\n// it if it already exists.  If successful, methods on the returned\n// File can be used for I/O; the associated file descriptor has mode\n// O_RDWR.\n// If there is an error, it will be of type *PathError.\nfunc Create(name string) (file *File, err error) {\n\treturn OpenFile(name, O_RDWR|O_CREATE|O_TRUNC, 0666)\n}\n\n// lstat is overridden in tests.\nvar lstat = Lstat\n\n// Rename renames (moves) a file. OS-specific restrictions might apply.\nfunc Rename(oldpath, newpath string) error {\n\treturn rename(oldpath, newpath)\n}\n\n// Many functions in package syscall return a count of -1 instead of 0.\n// Using fixCount(call()) instead of call() corrects the count.\nfunc fixCount(n int, err error) (int, error) {\n\tif n < 0 {\n\t\tn = 0\n\t}\n\treturn n, err\n}\n"
  },
  {
    "path": "testData/mockSdk-1.1.2/src/pkg/regexp/regexp.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package regexp implements regular expression search.\n//\n// The syntax of the regular expressions accepted is the same\n// general syntax used by Perl, Python, and other languages.\n// More precisely, it is the syntax accepted by RE2 and described at\n// https://golang.org/s/re2syntax, except for \\C.\n// For an overview of the syntax, run\n//   go doc regexp/syntax\n//\n// The regexp implementation provided by this package is\n// guaranteed to run in time linear in the size of the input.\n// (This is a property not guaranteed by most open source\n// implementations of regular expressions.) For more information\n// about this property, see\n//\thttp://swtch.com/~rsc/regexp/regexp1.html\n// or any book about automata theory.\n//\n// All characters are UTF-8-encoded code points.\n//\n// There are 16 methods of Regexp that match a regular expression and identify\n// the matched text.  Their names are matched by this regular expression:\n//\n//\tFind(All)?(String)?(Submatch)?(Index)?\n//\n// If 'All' is present, the routine matches successive non-overlapping\n// matches of the entire expression.  Empty matches abutting a preceding\n// match are ignored.  The return value is a slice containing the successive\n// return values of the corresponding non-'All' routine.  These routines take\n// an extra integer argument, n; if n >= 0, the function returns at most n\n// matches/submatches.\n//\n// If 'String' is present, the argument is a string; otherwise it is a slice\n// of bytes; return values are adjusted as appropriate.\n//\n// If 'Submatch' is present, the return value is a slice identifying the\n// successive submatches of the expression. Submatches are matches of\n// parenthesized subexpressions (also known as capturing groups) within the\n// regular expression, numbered from left to right in order of opening\n// parenthesis. Submatch 0 is the match of the entire expression, submatch 1\n// the match of the first parenthesized subexpression, and so on.\n//\n// If 'Index' is present, matches and submatches are identified by byte index\n// pairs within the input string: result[2*n:2*n+1] identifies the indexes of\n// the nth submatch.  The pair for n==0 identifies the match of the entire\n// expression.  If 'Index' is not present, the match is identified by the\n// text of the match/submatch.  If an index is negative, it means that\n// subexpression did not match any string in the input.\n//\n// There is also a subset of the methods that can be applied to text read\n// from a RuneReader:\n//\n//\tMatchReader, FindReaderIndex, FindReaderSubmatchIndex\n//\n// This set may grow.  Note that regular expression matches may need to\n// examine text beyond the text returned by a match, so the methods that\n// match text from a RuneReader may read arbitrarily far into the input\n// before returning.\n//\n// (There are a few other methods that do not match this pattern.)\n//\npackage regexp\n\nimport (\n\t\"bytes\"\n\t\"io\"\n\t\"regexp/syntax\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync\"\n\t\"unicode\"\n\t\"unicode/utf8\"\n)\n\nvar debug = false\n\n// Regexp is the representation of a compiled regular expression.\n// A Regexp is safe for concurrent use by multiple goroutines.\ntype Regexp struct {\n\t// read-only after Compile\n\texpr           string         // as passed to Compile\n\tprog           *syntax.Prog   // compiled program\n\tonepass        *onePassProg   // onepass program or nil\n\tprefix         string         // required prefix in unanchored matches\n\tprefixBytes    []byte         // prefix, as a []byte\n\tprefixComplete bool           // prefix is the entire regexp\n\tprefixRune     rune           // first rune in prefix\n\tprefixEnd      uint32         // pc for last rune in prefix\n\tcond           syntax.EmptyOp // empty-width conditions required at start of match\n\tnumSubexp      int\n\tsubexpNames    []string\n\tlongest        bool\n\n\t// cache of machines for running regexp\n\tmu      sync.Mutex\n\tmachine []*machine\n}\n\n// String returns the source text used to compile the regular expression.\nfunc (re *Regexp) String() string {\n\treturn re.expr\n}\n\n// Copy returns a new Regexp object copied from re.\n//\n// When using a Regexp in multiple goroutines, giving each goroutine\n// its own copy helps to avoid lock contention.\nfunc (re *Regexp) Copy() *Regexp {\n\tr := *re\n\tr.mu = sync.Mutex{}\n\tr.machine = nil\n\treturn &r\n}\n\n// Compile parses a regular expression and returns, if successful,\n// a Regexp object that can be used to match against text.\n//\n// When matching against text, the regexp returns a match that\n// begins as early as possible in the input (leftmost), and among those\n// it chooses the one that a backtracking search would have found first.\n// This so-called leftmost-first matching is the same semantics\n// that Perl, Python, and other implementations use, although this\n// package implements it without the expense of backtracking.\n// For POSIX leftmost-longest matching, see CompilePOSIX.\nfunc Compile(expr string) (*Regexp, error) {\n\treturn compile(expr, syntax.Perl, false)\n}\n\n// CompilePOSIX is like Compile but restricts the regular expression\n// to POSIX ERE (egrep) syntax and changes the match semantics to\n// leftmost-longest.\n//\n// That is, when matching against text, the regexp returns a match that\n// begins as early as possible in the input (leftmost), and among those\n// it chooses a match that is as long as possible.\n// This so-called leftmost-longest matching is the same semantics\n// that early regular expression implementations used and that POSIX\n// specifies.\n//\n// However, there can be multiple leftmost-longest matches, with different\n// submatch choices, and here this package diverges from POSIX.\n// Among the possible leftmost-longest matches, this package chooses\n// the one that a backtracking search would have found first, while POSIX\n// specifies that the match be chosen to maximize the length of the first\n// subexpression, then the second, and so on from left to right.\n// The POSIX rule is computationally prohibitive and not even well-defined.\n// See http://swtch.com/~rsc/regexp/regexp2.html#posix for details.\nfunc CompilePOSIX(expr string) (*Regexp, error) {\n\treturn compile(expr, syntax.POSIX, true)\n}\n\n// Longest makes future searches prefer the leftmost-longest match.\n// That is, when matching against text, the regexp returns a match that\n// begins as early as possible in the input (leftmost), and among those\n// it chooses a match that is as long as possible.\nfunc (re *Regexp) Longest() {\n\tre.longest = true\n}\n\nfunc compile(expr string, mode syntax.Flags, longest bool) (*Regexp, error) {\n\tre, err := syntax.Parse(expr, mode)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tmaxCap := re.MaxCap()\n\tcapNames := re.CapNames()\n\n\tre = re.Simplify()\n\tprog, err := syntax.Compile(re)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tregexp := &Regexp{\n\t\texpr:        expr,\n\t\tprog:        prog,\n\t\tonepass:     compileOnePass(prog),\n\t\tnumSubexp:   maxCap,\n\t\tsubexpNames: capNames,\n\t\tcond:        prog.StartCond(),\n\t\tlongest:     longest,\n\t}\n\tif regexp.onepass == notOnePass {\n\t\tregexp.prefix, regexp.prefixComplete = prog.Prefix()\n\t} else {\n\t\tregexp.prefix, regexp.prefixComplete, regexp.prefixEnd = onePassPrefix(prog)\n\t}\n\tif regexp.prefix != \"\" {\n\t\t// TODO(rsc): Remove this allocation by adding\n\t\t// IndexString to package bytes.\n\t\tregexp.prefixBytes = []byte(regexp.prefix)\n\t\tregexp.prefixRune, _ = utf8.DecodeRuneInString(regexp.prefix)\n\t}\n\treturn regexp, nil\n}\n\n// get returns a machine to use for matching re.\n// It uses the re's machine cache if possible, to avoid\n// unnecessary allocation.\nfunc (re *Regexp) get() *machine {\n\tre.mu.Lock()\n\tif n := len(re.machine); n > 0 {\n\t\tz := re.machine[n-1]\n\t\tre.machine = re.machine[:n-1]\n\t\tre.mu.Unlock()\n\t\treturn z\n\t}\n\tre.mu.Unlock()\n\tz := progMachine(re.prog, re.onepass)\n\tz.re = re\n\treturn z\n}\n\n// put returns a machine to the re's machine cache.\n// There is no attempt to limit the size of the cache, so it will\n// grow to the maximum number of simultaneous matches\n// run using re.  (The cache empties when re gets garbage collected.)\nfunc (re *Regexp) put(z *machine) {\n\tre.mu.Lock()\n\tre.machine = append(re.machine, z)\n\tre.mu.Unlock()\n}\n\n// MustCompile is like Compile but panics if the expression cannot be parsed.\n// It simplifies safe initialization of global variables holding compiled regular\n// expressions.\nfunc MustCompile(str string) *Regexp {\n\tregexp, error := Compile(str)\n\tif error != nil {\n\t\tpanic(`regexp: Compile(` + quote(str) + `): ` + error.Error())\n\t}\n\treturn regexp\n}\n\n// MustCompilePOSIX is like CompilePOSIX but panics if the expression cannot be parsed.\n// It simplifies safe initialization of global variables holding compiled regular\n// expressions.\nfunc MustCompilePOSIX(str string) *Regexp {\n\tregexp, error := CompilePOSIX(str)\n\tif error != nil {\n\t\tpanic(`regexp: CompilePOSIX(` + quote(str) + `): ` + error.Error())\n\t}\n\treturn regexp\n}\n\nfunc quote(s string) string {\n\tif strconv.CanBackquote(s) {\n\t\treturn \"`\" + s + \"`\"\n\t}\n\treturn strconv.Quote(s)\n}\n\n// NumSubexp returns the number of parenthesized subexpressions in this Regexp.\nfunc (re *Regexp) NumSubexp() int {\n\treturn re.numSubexp\n}\n\n// SubexpNames returns the names of the parenthesized subexpressions\n// in this Regexp.  The name for the first sub-expression is names[1],\n// so that if m is a match slice, the name for m[i] is SubexpNames()[i].\n// Since the Regexp as a whole cannot be named, names[0] is always\n// the empty string.  The slice should not be modified.\nfunc (re *Regexp) SubexpNames() []string {\n\treturn re.subexpNames\n}\n\nconst endOfText rune = -1\n\n// input abstracts different representations of the input text. It provides\n// one-character lookahead.\ntype input interface {\n\tstep(pos int) (r rune, width int) // advance one rune\n\tcanCheckPrefix() bool             // can we look ahead without losing info?\n\thasPrefix(re *Regexp) bool\n\tindex(re *Regexp, pos int) int\n\tcontext(pos int) syntax.EmptyOp\n}\n\n// inputString scans a string.\ntype inputString struct {\n\tstr string\n}\n\nfunc (i *inputString) step(pos int) (rune, int) {\n\tif pos < len(i.str) {\n\t\tc := i.str[pos]\n\t\tif c < utf8.RuneSelf {\n\t\t\treturn rune(c), 1\n\t\t}\n\t\treturn utf8.DecodeRuneInString(i.str[pos:])\n\t}\n\treturn endOfText, 0\n}\n\nfunc (i *inputString) canCheckPrefix() bool {\n\treturn true\n}\n\nfunc (i *inputString) hasPrefix(re *Regexp) bool {\n\treturn strings.HasPrefix(i.str, re.prefix)\n}\n\nfunc (i *inputString) index(re *Regexp, pos int) int {\n\treturn strings.Index(i.str[pos:], re.prefix)\n}\n\nfunc (i *inputString) context(pos int) syntax.EmptyOp {\n\tr1, r2 := endOfText, endOfText\n\tif pos > 0 && pos <= len(i.str) {\n\t\tr1, _ = utf8.DecodeLastRuneInString(i.str[:pos])\n\t}\n\tif pos < len(i.str) {\n\t\tr2, _ = utf8.DecodeRuneInString(i.str[pos:])\n\t}\n\treturn syntax.EmptyOpContext(r1, r2)\n}\n\n// inputBytes scans a byte slice.\ntype inputBytes struct {\n\tstr []byte\n}\n\nfunc (i *inputBytes) step(pos int) (rune, int) {\n\tif pos < len(i.str) {\n\t\tc := i.str[pos]\n\t\tif c < utf8.RuneSelf {\n\t\t\treturn rune(c), 1\n\t\t}\n\t\treturn utf8.DecodeRune(i.str[pos:])\n\t}\n\treturn endOfText, 0\n}\n\nfunc (i *inputBytes) canCheckPrefix() bool {\n\treturn true\n}\n\nfunc (i *inputBytes) hasPrefix(re *Regexp) bool {\n\treturn bytes.HasPrefix(i.str, re.prefixBytes)\n}\n\nfunc (i *inputBytes) index(re *Regexp, pos int) int {\n\treturn bytes.Index(i.str[pos:], re.prefixBytes)\n}\n\nfunc (i *inputBytes) context(pos int) syntax.EmptyOp {\n\tr1, r2 := endOfText, endOfText\n\tif pos > 0 && pos <= len(i.str) {\n\t\tr1, _ = utf8.DecodeLastRune(i.str[:pos])\n\t}\n\tif pos < len(i.str) {\n\t\tr2, _ = utf8.DecodeRune(i.str[pos:])\n\t}\n\treturn syntax.EmptyOpContext(r1, r2)\n}\n\n// inputReader scans a RuneReader.\ntype inputReader struct {\n\tr     io.RuneReader\n\tatEOT bool\n\tpos   int\n}\n\nfunc (i *inputReader) step(pos int) (rune, int) {\n\tif !i.atEOT && pos != i.pos {\n\t\treturn endOfText, 0\n\n\t}\n\tr, w, err := i.r.ReadRune()\n\tif err != nil {\n\t\ti.atEOT = true\n\t\treturn endOfText, 0\n\t}\n\ti.pos += w\n\treturn r, w\n}\n\nfunc (i *inputReader) canCheckPrefix() bool {\n\treturn false\n}\n\nfunc (i *inputReader) hasPrefix(re *Regexp) bool {\n\treturn false\n}\n\nfunc (i *inputReader) index(re *Regexp, pos int) int {\n\treturn -1\n}\n\nfunc (i *inputReader) context(pos int) syntax.EmptyOp {\n\treturn 0\n}\n\n// LiteralPrefix returns a literal string that must begin any match\n// of the regular expression re.  It returns the boolean true if the\n// literal string comprises the entire regular expression.\nfunc (re *Regexp) LiteralPrefix() (prefix string, complete bool) {\n\treturn re.prefix, re.prefixComplete\n}\n\n// MatchReader reports whether the Regexp matches the text read by the\n// RuneReader.\nfunc (re *Regexp) MatchReader(r io.RuneReader) bool {\n\treturn re.doExecute(r, nil, \"\", 0, 0) != nil\n}\n\n// MatchString reports whether the Regexp matches the string s.\nfunc (re *Regexp) MatchString(s string) bool {\n\treturn re.doExecute(nil, nil, s, 0, 0) != nil\n}\n\n// Match reports whether the Regexp matches the byte slice b.\nfunc (re *Regexp) Match(b []byte) bool {\n\treturn re.doExecute(nil, b, \"\", 0, 0) != nil\n}\n\n// MatchReader checks whether a textual regular expression matches the text\n// read by the RuneReader.  More complicated queries need to use Compile and\n// the full Regexp interface.\nfunc MatchReader(pattern string, r io.RuneReader) (matched bool, err error) {\n\tre, err := Compile(pattern)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\treturn re.MatchReader(r), nil\n}\n\n// MatchString checks whether a textual regular expression\n// matches a string.  More complicated queries need\n// to use Compile and the full Regexp interface.\nfunc MatchString(pattern string, s string) (matched bool, err error) {\n\tre, err := Compile(pattern)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\treturn re.MatchString(s), nil\n}\n\n// Match checks whether a textual regular expression\n// matches a byte slice.  More complicated queries need\n// to use Compile and the full Regexp interface.\nfunc Match(pattern string, b []byte) (matched bool, err error) {\n\tre, err := Compile(pattern)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\treturn re.Match(b), nil\n}\n\n// ReplaceAllString returns a copy of src, replacing matches of the Regexp\n// with the replacement string repl.  Inside repl, $ signs are interpreted as\n// in Expand, so for instance $1 represents the text of the first submatch.\nfunc (re *Regexp) ReplaceAllString(src, repl string) string {\n\tn := 2\n\tif strings.Index(repl, \"$\") >= 0 {\n\t\tn = 2 * (re.numSubexp + 1)\n\t}\n\tb := re.replaceAll(nil, src, n, func(dst []byte, match []int) []byte {\n\t\treturn re.expand(dst, repl, nil, src, match)\n\t})\n\treturn string(b)\n}\n\n// ReplaceAllLiteralString returns a copy of src, replacing matches of the Regexp\n// with the replacement string repl.  The replacement repl is substituted directly,\n// without using Expand.\nfunc (re *Regexp) ReplaceAllLiteralString(src, repl string) string {\n\treturn string(re.replaceAll(nil, src, 2, func(dst []byte, match []int) []byte {\n\t\treturn append(dst, repl...)\n\t}))\n}\n\n// ReplaceAllStringFunc returns a copy of src in which all matches of the\n// Regexp have been replaced by the return value of function repl applied\n// to the matched substring.  The replacement returned by repl is substituted\n// directly, without using Expand.\nfunc (re *Regexp) ReplaceAllStringFunc(src string, repl func(string) string) string {\n\tb := re.replaceAll(nil, src, 2, func(dst []byte, match []int) []byte {\n\t\treturn append(dst, repl(src[match[0]:match[1]])...)\n\t})\n\treturn string(b)\n}\n\nfunc (re *Regexp) replaceAll(bsrc []byte, src string, nmatch int, repl func(dst []byte, m []int) []byte) []byte {\n\tlastMatchEnd := 0 // end position of the most recent match\n\tsearchPos := 0    // position where we next look for a match\n\tvar buf []byte\n\tvar endPos int\n\tif bsrc != nil {\n\t\tendPos = len(bsrc)\n\t} else {\n\t\tendPos = len(src)\n\t}\n\tif nmatch > re.prog.NumCap {\n\t\tnmatch = re.prog.NumCap\n\t}\n\n\tfor searchPos <= endPos {\n\t\ta := re.doExecute(nil, bsrc, src, searchPos, nmatch)\n\t\tif len(a) == 0 {\n\t\t\tbreak // no more matches\n\t\t}\n\n\t\t// Copy the unmatched characters before this match.\n\t\tif bsrc != nil {\n\t\t\tbuf = append(buf, bsrc[lastMatchEnd:a[0]]...)\n\t\t} else {\n\t\t\tbuf = append(buf, src[lastMatchEnd:a[0]]...)\n\t\t}\n\n\t\t// Now insert a copy of the replacement string, but not for a\n\t\t// match of the empty string immediately after another match.\n\t\t// (Otherwise, we get double replacement for patterns that\n\t\t// match both empty and nonempty strings.)\n\t\tif a[1] > lastMatchEnd || a[0] == 0 {\n\t\t\tbuf = repl(buf, a)\n\t\t}\n\t\tlastMatchEnd = a[1]\n\n\t\t// Advance past this match; always advance at least one character.\n\t\tvar width int\n\t\tif bsrc != nil {\n\t\t\t_, width = utf8.DecodeRune(bsrc[searchPos:])\n\t\t} else {\n\t\t\t_, width = utf8.DecodeRuneInString(src[searchPos:])\n\t\t}\n\t\tif searchPos+width > a[1] {\n\t\t\tsearchPos += width\n\t\t} else if searchPos+1 > a[1] {\n\t\t\t// This clause is only needed at the end of the input\n\t\t\t// string.  In that case, DecodeRuneInString returns width=0.\n\t\t\tsearchPos++\n\t\t} else {\n\t\t\tsearchPos = a[1]\n\t\t}\n\t}\n\n\t// Copy the unmatched characters after the last match.\n\tif bsrc != nil {\n\t\tbuf = append(buf, bsrc[lastMatchEnd:]...)\n\t} else {\n\t\tbuf = append(buf, src[lastMatchEnd:]...)\n\t}\n\n\treturn buf\n}\n\n// ReplaceAll returns a copy of src, replacing matches of the Regexp\n// with the replacement text repl.  Inside repl, $ signs are interpreted as\n// in Expand, so for instance $1 represents the text of the first submatch.\nfunc (re *Regexp) ReplaceAll(src, repl []byte) []byte {\n\tn := 2\n\tif bytes.IndexByte(repl, '$') >= 0 {\n\t\tn = 2 * (re.numSubexp + 1)\n\t}\n\tsrepl := \"\"\n\tb := re.replaceAll(src, \"\", n, func(dst []byte, match []int) []byte {\n\t\tif len(srepl) != len(repl) {\n\t\t\tsrepl = string(repl)\n\t\t}\n\t\treturn re.expand(dst, srepl, src, \"\", match)\n\t})\n\treturn b\n}\n\n// ReplaceAllLiteral returns a copy of src, replacing matches of the Regexp\n// with the replacement bytes repl.  The replacement repl is substituted directly,\n// without using Expand.\nfunc (re *Regexp) ReplaceAllLiteral(src, repl []byte) []byte {\n\treturn re.replaceAll(src, \"\", 2, func(dst []byte, match []int) []byte {\n\t\treturn append(dst, repl...)\n\t})\n}\n\n// ReplaceAllFunc returns a copy of src in which all matches of the\n// Regexp have been replaced by the return value of function repl applied\n// to the matched byte slice.  The replacement returned by repl is substituted\n// directly, without using Expand.\nfunc (re *Regexp) ReplaceAllFunc(src []byte, repl func([]byte) []byte) []byte {\n\treturn re.replaceAll(src, \"\", 2, func(dst []byte, match []int) []byte {\n\t\treturn append(dst, repl(src[match[0]:match[1]])...)\n\t})\n}\n\nvar specialBytes = []byte(`\\.+*?()|[]{}^$`)\n\nfunc special(b byte) bool {\n\treturn bytes.IndexByte(specialBytes, b) >= 0\n}\n\n// QuoteMeta returns a string that quotes all regular expression metacharacters\n// inside the argument text; the returned string is a regular expression matching\n// the literal text.  For example, QuoteMeta(`[foo]`) returns `\\[foo\\]`.\nfunc QuoteMeta(s string) string {\n\tb := make([]byte, 2*len(s))\n\n\t// A byte loop is correct because all metacharacters are ASCII.\n\tj := 0\n\tfor i := 0; i < len(s); i++ {\n\t\tif special(s[i]) {\n\t\t\tb[j] = '\\\\'\n\t\t\tj++\n\t\t}\n\t\tb[j] = s[i]\n\t\tj++\n\t}\n\treturn string(b[0:j])\n}\n\n// The number of capture values in the program may correspond\n// to fewer capturing expressions than are in the regexp.\n// For example, \"(a){0}\" turns into an empty program, so the\n// maximum capture in the program is 0 but we need to return\n// an expression for \\1.  Pad appends -1s to the slice a as needed.\nfunc (re *Regexp) pad(a []int) []int {\n\tif a == nil {\n\t\t// No match.\n\t\treturn nil\n\t}\n\tn := (1 + re.numSubexp) * 2\n\tfor len(a) < n {\n\t\ta = append(a, -1)\n\t}\n\treturn a\n}\n\n// Find matches in slice b if b is non-nil, otherwise find matches in string s.\nfunc (re *Regexp) allMatches(s string, b []byte, n int, deliver func([]int)) {\n\tvar end int\n\tif b == nil {\n\t\tend = len(s)\n\t} else {\n\t\tend = len(b)\n\t}\n\n\tfor pos, i, prevMatchEnd := 0, 0, -1; i < n && pos <= end; {\n\t\tmatches := re.doExecute(nil, b, s, pos, re.prog.NumCap)\n\t\tif len(matches) == 0 {\n\t\t\tbreak\n\t\t}\n\n\t\taccept := true\n\t\tif matches[1] == pos {\n\t\t\t// We've found an empty match.\n\t\t\tif matches[0] == prevMatchEnd {\n\t\t\t\t// We don't allow an empty match right\n\t\t\t\t// after a previous match, so ignore it.\n\t\t\t\taccept = false\n\t\t\t}\n\t\t\tvar width int\n\t\t\t// TODO: use step()\n\t\t\tif b == nil {\n\t\t\t\t_, width = utf8.DecodeRuneInString(s[pos:end])\n\t\t\t} else {\n\t\t\t\t_, width = utf8.DecodeRune(b[pos:end])\n\t\t\t}\n\t\t\tif width > 0 {\n\t\t\t\tpos += width\n\t\t\t} else {\n\t\t\t\tpos = end + 1\n\t\t\t}\n\t\t} else {\n\t\t\tpos = matches[1]\n\t\t}\n\t\tprevMatchEnd = matches[1]\n\n\t\tif accept {\n\t\t\tdeliver(re.pad(matches))\n\t\t\ti++\n\t\t}\n\t}\n}\n\n// Find returns a slice holding the text of the leftmost match in b of the regular expression.\n// A return value of nil indicates no match.\nfunc (re *Regexp) Find(b []byte) []byte {\n\ta := re.doExecute(nil, b, \"\", 0, 2)\n\tif a == nil {\n\t\treturn nil\n\t}\n\treturn b[a[0]:a[1]]\n}\n\n// FindIndex returns a two-element slice of integers defining the location of\n// the leftmost match in b of the regular expression.  The match itself is at\n// b[loc[0]:loc[1]].\n// A return value of nil indicates no match.\nfunc (re *Regexp) FindIndex(b []byte) (loc []int) {\n\ta := re.doExecute(nil, b, \"\", 0, 2)\n\tif a == nil {\n\t\treturn nil\n\t}\n\treturn a[0:2]\n}\n\n// FindString returns a string holding the text of the leftmost match in s of the regular\n// expression.  If there is no match, the return value is an empty string,\n// but it will also be empty if the regular expression successfully matches\n// an empty string.  Use FindStringIndex or FindStringSubmatch if it is\n// necessary to distinguish these cases.\nfunc (re *Regexp) FindString(s string) string {\n\ta := re.doExecute(nil, nil, s, 0, 2)\n\tif a == nil {\n\t\treturn \"\"\n\t}\n\treturn s[a[0]:a[1]]\n}\n\n// FindStringIndex returns a two-element slice of integers defining the\n// location of the leftmost match in s of the regular expression.  The match\n// itself is at s[loc[0]:loc[1]].\n// A return value of nil indicates no match.\nfunc (re *Regexp) FindStringIndex(s string) (loc []int) {\n\ta := re.doExecute(nil, nil, s, 0, 2)\n\tif a == nil {\n\t\treturn nil\n\t}\n\treturn a[0:2]\n}\n\n// FindReaderIndex returns a two-element slice of integers defining the\n// location of the leftmost match of the regular expression in text read from\n// the RuneReader.  The match text was found in the input stream at\n// byte offset loc[0] through loc[1]-1.\n// A return value of nil indicates no match.\nfunc (re *Regexp) FindReaderIndex(r io.RuneReader) (loc []int) {\n\ta := re.doExecute(r, nil, \"\", 0, 2)\n\tif a == nil {\n\t\treturn nil\n\t}\n\treturn a[0:2]\n}\n\n// FindSubmatch returns a slice of slices holding the text of the leftmost\n// match of the regular expression in b and the matches, if any, of its\n// subexpressions, as defined by the 'Submatch' descriptions in the package\n// comment.\n// A return value of nil indicates no match.\nfunc (re *Regexp) FindSubmatch(b []byte) [][]byte {\n\ta := re.doExecute(nil, b, \"\", 0, re.prog.NumCap)\n\tif a == nil {\n\t\treturn nil\n\t}\n\tret := make([][]byte, 1+re.numSubexp)\n\tfor i := range ret {\n\t\tif 2*i < len(a) && a[2*i] >= 0 {\n\t\t\tret[i] = b[a[2*i]:a[2*i+1]]\n\t\t}\n\t}\n\treturn ret\n}\n\n// Expand appends template to dst and returns the result; during the\n// append, Expand replaces variables in the template with corresponding\n// matches drawn from src.  The match slice should have been returned by\n// FindSubmatchIndex.\n//\n// In the template, a variable is denoted by a substring of the form\n// $name or ${name}, where name is a non-empty sequence of letters,\n// digits, and underscores.  A purely numeric name like $1 refers to\n// the submatch with the corresponding index; other names refer to\n// capturing parentheses named with the (?P<name>...) syntax.  A\n// reference to an out of range or unmatched index or a name that is not\n// present in the regular expression is replaced with an empty slice.\n//\n// In the $name form, name is taken to be as long as possible: $1x is\n// equivalent to ${1x}, not ${1}x, and, $10 is equivalent to ${10}, not ${1}0.\n//\n// To insert a literal $ in the output, use $$ in the template.\nfunc (re *Regexp) Expand(dst []byte, template []byte, src []byte, match []int) []byte {\n\treturn re.expand(dst, string(template), src, \"\", match)\n}\n\n// ExpandString is like Expand but the template and source are strings.\n// It appends to and returns a byte slice in order to give the calling\n// code control over allocation.\nfunc (re *Regexp) ExpandString(dst []byte, template string, src string, match []int) []byte {\n\treturn re.expand(dst, template, nil, src, match)\n}\n\nfunc (re *Regexp) expand(dst []byte, template string, bsrc []byte, src string, match []int) []byte {\n\tfor len(template) > 0 {\n\t\ti := strings.Index(template, \"$\")\n\t\tif i < 0 {\n\t\t\tbreak\n\t\t}\n\t\tdst = append(dst, template[:i]...)\n\t\ttemplate = template[i:]\n\t\tif len(template) > 1 && template[1] == '$' {\n\t\t\t// Treat $$ as $.\n\t\t\tdst = append(dst, '$')\n\t\t\ttemplate = template[2:]\n\t\t\tcontinue\n\t\t}\n\t\tname, num, rest, ok := extract(template)\n\t\tif !ok {\n\t\t\t// Malformed; treat $ as raw text.\n\t\t\tdst = append(dst, '$')\n\t\t\ttemplate = template[1:]\n\t\t\tcontinue\n\t\t}\n\t\ttemplate = rest\n\t\tif num >= 0 {\n\t\t\tif 2*num+1 < len(match) && match[2*num] >= 0 {\n\t\t\t\tif bsrc != nil {\n\t\t\t\t\tdst = append(dst, bsrc[match[2*num]:match[2*num+1]]...)\n\t\t\t\t} else {\n\t\t\t\t\tdst = append(dst, src[match[2*num]:match[2*num+1]]...)\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor i, namei := range re.subexpNames {\n\t\t\t\tif name == namei && 2*i+1 < len(match) && match[2*i] >= 0 {\n\t\t\t\t\tif bsrc != nil {\n\t\t\t\t\t\tdst = append(dst, bsrc[match[2*i]:match[2*i+1]]...)\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdst = append(dst, src[match[2*i]:match[2*i+1]]...)\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tdst = append(dst, template...)\n\treturn dst\n}\n\n// extract returns the name from a leading \"$name\" or \"${name}\" in str.\n// If it is a number, extract returns num set to that number; otherwise num = -1.\nfunc extract(str string) (name string, num int, rest string, ok bool) {\n\tif len(str) < 2 || str[0] != '$' {\n\t\treturn\n\t}\n\tbrace := false\n\tif str[1] == '{' {\n\t\tbrace = true\n\t\tstr = str[2:]\n\t} else {\n\t\tstr = str[1:]\n\t}\n\ti := 0\n\tfor i < len(str) {\n\t\trune, size := utf8.DecodeRuneInString(str[i:])\n\t\tif !unicode.IsLetter(rune) && !unicode.IsDigit(rune) && rune != '_' {\n\t\t\tbreak\n\t\t}\n\t\ti += size\n\t}\n\tif i == 0 {\n\t\t// empty name is not okay\n\t\treturn\n\t}\n\tname = str[:i]\n\tif brace {\n\t\tif i >= len(str) || str[i] != '}' {\n\t\t\t// missing closing brace\n\t\t\treturn\n\t\t}\n\t\ti++\n\t}\n\n\t// Parse number.\n\tnum = 0\n\tfor i := 0; i < len(name); i++ {\n\t\tif name[i] < '0' || '9' < name[i] || num >= 1e8 {\n\t\t\tnum = -1\n\t\t\tbreak\n\t\t}\n\t\tnum = num*10 + int(name[i]) - '0'\n\t}\n\t// Disallow leading zeros.\n\tif name[0] == '0' && len(name) > 1 {\n\t\tnum = -1\n\t}\n\n\trest = str[i:]\n\tok = true\n\treturn\n}\n\n// FindSubmatchIndex returns a slice holding the index pairs identifying the\n// leftmost match of the regular expression in b and the matches, if any, of\n// its subexpressions, as defined by the 'Submatch' and 'Index' descriptions\n// in the package comment.\n// A return value of nil indicates no match.\nfunc (re *Regexp) FindSubmatchIndex(b []byte) []int {\n\treturn re.pad(re.doExecute(nil, b, \"\", 0, re.prog.NumCap))\n}\n\n// FindStringSubmatch returns a slice of strings holding the text of the\n// leftmost match of the regular expression in s and the matches, if any, of\n// its subexpressions, as defined by the 'Submatch' description in the\n// package comment.\n// A return value of nil indicates no match.\nfunc (re *Regexp) FindStringSubmatch(s string) []string {\n\ta := re.doExecute(nil, nil, s, 0, re.prog.NumCap)\n\tif a == nil {\n\t\treturn nil\n\t}\n\tret := make([]string, 1+re.numSubexp)\n\tfor i := range ret {\n\t\tif 2*i < len(a) && a[2*i] >= 0 {\n\t\t\tret[i] = s[a[2*i]:a[2*i+1]]\n\t\t}\n\t}\n\treturn ret\n}\n\n// FindStringSubmatchIndex returns a slice holding the index pairs\n// identifying the leftmost match of the regular expression in s and the\n// matches, if any, of its subexpressions, as defined by the 'Submatch' and\n// 'Index' descriptions in the package comment.\n// A return value of nil indicates no match.\nfunc (re *Regexp) FindStringSubmatchIndex(s string) []int {\n\treturn re.pad(re.doExecute(nil, nil, s, 0, re.prog.NumCap))\n}\n\n// FindReaderSubmatchIndex returns a slice holding the index pairs\n// identifying the leftmost match of the regular expression of text read by\n// the RuneReader, and the matches, if any, of its subexpressions, as defined\n// by the 'Submatch' and 'Index' descriptions in the package comment.  A\n// return value of nil indicates no match.\nfunc (re *Regexp) FindReaderSubmatchIndex(r io.RuneReader) []int {\n\treturn re.pad(re.doExecute(r, nil, \"\", 0, re.prog.NumCap))\n}\n\nconst startSize = 10 // The size at which to start a slice in the 'All' routines.\n\n// FindAll is the 'All' version of Find; it returns a slice of all successive\n// matches of the expression, as defined by the 'All' description in the\n// package comment.\n// A return value of nil indicates no match.\nfunc (re *Regexp) FindAll(b []byte, n int) [][]byte {\n\tif n < 0 {\n\t\tn = len(b) + 1\n\t}\n\tresult := make([][]byte, 0, startSize)\n\tre.allMatches(\"\", b, n, func(match []int) {\n\t\tresult = append(result, b[match[0]:match[1]])\n\t})\n\tif len(result) == 0 {\n\t\treturn nil\n\t}\n\treturn result\n}\n\n// FindAllIndex is the 'All' version of FindIndex; it returns a slice of all\n// successive matches of the expression, as defined by the 'All' description\n// in the package comment.\n// A return value of nil indicates no match.\nfunc (re *Regexp) FindAllIndex(b []byte, n int) [][]int {\n\tif n < 0 {\n\t\tn = len(b) + 1\n\t}\n\tresult := make([][]int, 0, startSize)\n\tre.allMatches(\"\", b, n, func(match []int) {\n\t\tresult = append(result, match[0:2])\n\t})\n\tif len(result) == 0 {\n\t\treturn nil\n\t}\n\treturn result\n}\n\n// FindAllString is the 'All' version of FindString; it returns a slice of all\n// successive matches of the expression, as defined by the 'All' description\n// in the package comment.\n// A return value of nil indicates no match.\nfunc (re *Regexp) FindAllString(s string, n int) []string {\n\tif n < 0 {\n\t\tn = len(s) + 1\n\t}\n\tresult := make([]string, 0, startSize)\n\tre.allMatches(s, nil, n, func(match []int) {\n\t\tresult = append(result, s[match[0]:match[1]])\n\t})\n\tif len(result) == 0 {\n\t\treturn nil\n\t}\n\treturn result\n}\n\n// FindAllStringIndex is the 'All' version of FindStringIndex; it returns a\n// slice of all successive matches of the expression, as defined by the 'All'\n// description in the package comment.\n// A return value of nil indicates no match.\nfunc (re *Regexp) FindAllStringIndex(s string, n int) [][]int {\n\tif n < 0 {\n\t\tn = len(s) + 1\n\t}\n\tresult := make([][]int, 0, startSize)\n\tre.allMatches(s, nil, n, func(match []int) {\n\t\tresult = append(result, match[0:2])\n\t})\n\tif len(result) == 0 {\n\t\treturn nil\n\t}\n\treturn result\n}\n\n// FindAllSubmatch is the 'All' version of FindSubmatch; it returns a slice\n// of all successive matches of the expression, as defined by the 'All'\n// description in the package comment.\n// A return value of nil indicates no match.\nfunc (re *Regexp) FindAllSubmatch(b []byte, n int) [][][]byte {\n\tif n < 0 {\n\t\tn = len(b) + 1\n\t}\n\tresult := make([][][]byte, 0, startSize)\n\tre.allMatches(\"\", b, n, func(match []int) {\n\t\tslice := make([][]byte, len(match)/2)\n\t\tfor j := range slice {\n\t\t\tif match[2*j] >= 0 {\n\t\t\t\tslice[j] = b[match[2*j]:match[2*j+1]]\n\t\t\t}\n\t\t}\n\t\tresult = append(result, slice)\n\t})\n\tif len(result) == 0 {\n\t\treturn nil\n\t}\n\treturn result\n}\n\n// FindAllSubmatchIndex is the 'All' version of FindSubmatchIndex; it returns\n// a slice of all successive matches of the expression, as defined by the\n// 'All' description in the package comment.\n// A return value of nil indicates no match.\nfunc (re *Regexp) FindAllSubmatchIndex(b []byte, n int) [][]int {\n\tif n < 0 {\n\t\tn = len(b) + 1\n\t}\n\tresult := make([][]int, 0, startSize)\n\tre.allMatches(\"\", b, n, func(match []int) {\n\t\tresult = append(result, match)\n\t})\n\tif len(result) == 0 {\n\t\treturn nil\n\t}\n\treturn result\n}\n\n// FindAllStringSubmatch is the 'All' version of FindStringSubmatch; it\n// returns a slice of all successive matches of the expression, as defined by\n// the 'All' description in the package comment.\n// A return value of nil indicates no match.\nfunc (re *Regexp) FindAllStringSubmatch(s string, n int) [][]string {\n\tif n < 0 {\n\t\tn = len(s) + 1\n\t}\n\tresult := make([][]string, 0, startSize)\n\tre.allMatches(s, nil, n, func(match []int) {\n\t\tslice := make([]string, len(match)/2)\n\t\tfor j := range slice {\n\t\t\tif match[2*j] >= 0 {\n\t\t\t\tslice[j] = s[match[2*j]:match[2*j+1]]\n\t\t\t}\n\t\t}\n\t\tresult = append(result, slice)\n\t})\n\tif len(result) == 0 {\n\t\treturn nil\n\t}\n\treturn result\n}\n\n// FindAllStringSubmatchIndex is the 'All' version of\n// FindStringSubmatchIndex; it returns a slice of all successive matches of\n// the expression, as defined by the 'All' description in the package\n// comment.\n// A return value of nil indicates no match.\nfunc (re *Regexp) FindAllStringSubmatchIndex(s string, n int) [][]int {\n\tif n < 0 {\n\t\tn = len(s) + 1\n\t}\n\tresult := make([][]int, 0, startSize)\n\tre.allMatches(s, nil, n, func(match []int) {\n\t\tresult = append(result, match)\n\t})\n\tif len(result) == 0 {\n\t\treturn nil\n\t}\n\treturn result\n}\n\n// Split slices s into substrings separated by the expression and returns a slice of\n// the substrings between those expression matches.\n//\n// The slice returned by this method consists of all the substrings of s\n// not contained in the slice returned by FindAllString. When called on an expression\n// that contains no metacharacters, it is equivalent to strings.SplitN.\n//\n// Example:\n//   s := regexp.MustCompile(\"a*\").Split(\"abaabaccadaaae\", 5)\n//   // s: [\"\", \"b\", \"b\", \"c\", \"cadaaae\"]\n//\n// The count determines the number of substrings to return:\n//   n > 0: at most n substrings; the last substring will be the unsplit remainder.\n//   n == 0: the result is nil (zero substrings)\n//   n < 0: all substrings\nfunc (re *Regexp) Split(s string, n int) []string {\n\n\tif n == 0 {\n\t\treturn nil\n\t}\n\n\tif len(re.expr) > 0 && len(s) == 0 {\n\t\treturn []string{\"\"}\n\t}\n\n\tmatches := re.FindAllStringIndex(s, n)\n\tstrings := make([]string, 0, len(matches))\n\n\tbeg := 0\n\tend := 0\n\tfor _, match := range matches {\n\t\tif n > 0 && len(strings) >= n-1 {\n\t\t\tbreak\n\t\t}\n\n\t\tend = match[0]\n\t\tif match[1] != 0 {\n\t\t\tstrings = append(strings, s[beg:end])\n\t\t}\n\t\tbeg = match[1]\n\t}\n\n\tif end != len(s) {\n\t\tstrings = append(strings, s[beg:])\n\t}\n\n\treturn strings\n}"
  },
  {
    "path": "testData/mockSdk-1.1.2/src/pkg/sync/mutex.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package sync provides basic synchronization primitives such as mutual\n// exclusion locks. Other than the Once and WaitGroup types, most are intended\n// for use by low-level library routines. Higher-level synchronization is\n// better done via channels and communication.\n//\n// Values containing the types defined in this package should not be copied.\npackage sync\n\n// A Mutex is a mutual exclusion lock.\n// Mutexes can be created as part of other structures;\n// the zero value for a Mutex is an unlocked mutex.\n//\n// A Mutex must not be copied after first use.\ntype Mutex struct {\n\tstate int32\n\tsema  uint32\n}\n\n// A Locker represents an object that can be locked and unlocked.\ntype Locker interface {\n\tLock()\n\tUnlock()\n}\n\nfunc (m *Mutex) Lock() {}\nfunc (m *Mutex) Unlock() {}\n"
  },
  {
    "path": "testData/mockSdk-1.1.2/src/pkg/sync/rwmutex.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage sync\n\n// An RWMutex is a reader/writer mutual exclusion lock.\n// The lock can be held by an arbitrary number of readers or a single writer.\n// RWMutexes can be created as part of other structures;\n// the zero value for a RWMutex is an unlocked mutex.\n//\n// An RWMutex must not be copied after first use.\n//\n// If a goroutine holds a RWMutex for reading, it must not expect this or any\n// other goroutine to be able to also take the read lock until the first read\n// lock is released. In particular, this prohibits recursive read locking.\n// This is to ensure that the lock eventually becomes available;\n// a blocked Lock call excludes new readers from acquiring the lock.\ntype RWMutex struct {\n\tw           Mutex  // held if there are pending writers\n\twriterSem   uint32 // semaphore for writers to wait for completing readers\n\treaderSem   uint32 // semaphore for readers to wait for completing writers\n\treaderCount int32  // number of pending readers\n\treaderWait  int32  // number of departing readers\n}\n\n// RLock locks rw for reading.\nfunc (rw *RWMutex) RLock() {}\n\n// RUnlock undoes a single RLock call;\n// it does not affect other simultaneous readers.\n// It is a run-time error if rw is not locked for reading\n// on entry to RUnlock.\nfunc (rw *RWMutex) RUnlock() {}\n\n// Lock locks rw for writing.\n// If the lock is already locked for reading or writing,\n// Lock blocks until the lock is available.\nfunc (rw *RWMutex) Lock() {}\n\n// Unlock unlocks rw for writing. It is a run-time error if rw is\n// not locked for writing on entry to Unlock.\n//\n// As with Mutexes, a locked RWMutex is not associated with a particular\n// goroutine. One goroutine may RLock (Lock) an RWMutex and then\n// arrange for another goroutine to RUnlock (Unlock) it.\nfunc (rw *RWMutex) Unlock() {}\n\n// RLocker returns a Locker interface that implements\n// the Lock and Unlock methods by calling rw.RLock and rw.RUnlock.\nfunc (rw *RWMutex) RLocker() Locker {\n\treturn (*rlocker)(rw)\n}\n\ntype rlocker RWMutex\n\nfunc (r *rlocker) Lock()   { (*RWMutex)(r).RLock() }\nfunc (r *rlocker) Unlock() { (*RWMutex)(r).RUnlock() }\n"
  },
  {
    "path": "testData/mockSdk-1.1.2/src/pkg/testing/testing.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package testing provides support for automated testing of Go packages.\n// It is intended to be used in concert with the ``go test'' command, which automates\n// execution of any function of the form\n//     func TestXxx(*testing.T)\n// where Xxx can be any alphanumeric string (but the first letter must not be in\n// [a-z]) and serves to identify the test routine.\n//\n// Within these functions, use the Error, Fail or related methods to signal failure.\n//\n// To write a new test suite, create a file whose name ends _test.go that\n// contains the TestXxx functions as described here. Put the file in the same\n// package as the one being tested. The file will be excluded from regular\n// package builds but will be included when the ``go test'' command is run.\n// For more detail, run ``go help test'' and ``go help testflag''.\n//\n// Tests and benchmarks may be skipped if not applicable with a call to\n// the Skip method of *T and *B:\n//     func TestTimeConsuming(t *testing.T) {\n//         if testing.Short() {\n//             t.Skip(\"skipping test in short mode.\")\n//         }\n//         ...\n//     }\n//\n// Benchmarks\n//\n// Functions of the form\n//     func BenchmarkXxx(*testing.B)\n// are considered benchmarks, and are executed by the \"go test\" command when\n// its -bench flag is provided. Benchmarks are run sequentially.\n//\n// For a description of the testing flags, see\n// http://golang.org/cmd/go/#hdr-Description_of_testing_flags.\n//\n// A sample benchmark function looks like this:\n//     func BenchmarkHello(b *testing.B) {\n//         for i := 0; i < b.N; i++ {\n//             fmt.Sprintf(\"hello\")\n//         }\n//     }\n//\n// The benchmark function must run the target code b.N times.\n// During benchark execution, b.N is adjusted until the benchmark function lasts\n// long enough to be timed reliably.  The output\n//     BenchmarkHello    10000000    282 ns/op\n// means that the loop ran 10000000 times at a speed of 282 ns per loop.\n//\n// If a benchmark needs some expensive setup before running, the timer\n// may be reset:\n//\n//     func BenchmarkBigLen(b *testing.B) {\n//         big := NewBig()\n//         b.ResetTimer()\n//         for i := 0; i < b.N; i++ {\n//             big.Len()\n//         }\n//     }\n//\n// If a benchmark needs to test performance in a parallel setting, it may use\n// the RunParallel helper function; such benchmarks are intended to be used with\n// the go test -cpu flag:\n//\n//     func BenchmarkTemplateParallel(b *testing.B) {\n//         templ := template.Must(template.New(\"test\").Parse(\"Hello, {{.}}!\"))\n//         b.RunParallel(func(pb *testing.PB) {\n//             var buf bytes.Buffer\n//             for pb.Next() {\n//                 buf.Reset()\n//                 templ.Execute(&buf, \"World\")\n//             }\n//         })\n//     }\n//\n// Examples\n//\n// The package also runs and verifies example code. Example functions may\n// include a concluding line comment that begins with \"Output:\" and is compared with\n// the standard output of the function when the tests are run. (The comparison\n// ignores leading and trailing space.) These are examples of an example:\n//\n//     func ExampleHello() {\n//             fmt.Println(\"hello\")\n//             // Output: hello\n//     }\n//\n//     func ExampleSalutations() {\n//             fmt.Println(\"hello, and\")\n//             fmt.Println(\"goodbye\")\n//             // Output:\n//             // hello, and\n//             // goodbye\n//     }\n//\n// Example functions without output comments are compiled but not executed.\n//\n// The naming convention to declare examples for the package, a function F, a type T and\n// method M on type T are:\n//\n//     func Example() { ... }\n//     func ExampleF() { ... }\n//     func ExampleT() { ... }\n//     func ExampleT_M() { ... }\n//\n// Multiple example functions for a package/type/function/method may be provided by\n// appending a distinct suffix to the name. The suffix must start with a\n// lower-case letter.\n//\n//     func Example_suffix() { ... }\n//     func ExampleF_suffix() { ... }\n//     func ExampleT_suffix() { ... }\n//     func ExampleT_M_suffix() { ... }\n//\n// The entire test file is presented as the example when it contains a single\n// example function, at least one other function, type, variable, or constant\n// declaration, and no test or benchmark functions.\n//\n// Main\n//\n// It is sometimes necessary for a test program to do extra setup or teardown\n// before or after testing. It is also sometimes necessary for a test to control\n// which code runs on the main thread. To support these and other cases,\n// if a test file contains a function:\n//\n//\tfunc TestMain(m *testing.M)\n//\n// then the generated test will call TestMain(m) instead of running the tests\n// directly. TestMain runs in the main goroutine and can do whatever setup\n// and teardown is necessary around a call to m.Run. It should then call\n// os.Exit with the result of m.Run.\n//\n// The minimal implementation of TestMain is:\n//\n//\tfunc TestMain(m *testing.M) { os.Exit(m.Run()) }\n//\n// In effect, that is the implementation used when no TestMain is explicitly defined.\npackage testing\n\nimport (\n\t\"bytes\"\n\t\"flag\"\n\t\"fmt\"\n\t\"os\"\n\t\"runtime\"\n\t\"runtime/pprof\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync\"\n\t\"time\"\n)\n\nvar (\n\t// The short flag requests that tests run more quickly, but its functionality\n\t// is provided by test writers themselves.  The testing package is just its\n\t// home.  The all.bash installation script sets it to make installation more\n\t// efficient, but by default the flag is off so a plain \"go test\" will do a\n\t// full test of the package.\n\tshort = flag.Bool(\"test.short\", false, \"run smaller test suite to save time\")\n\n\t// The directory in which to create profile files and the like. When run from\n\t// \"go test\", the binary always runs in the source directory for the package;\n\t// this flag lets \"go test\" tell the binary to write the files in the directory where\n\t// the \"go test\" command is run.\n\toutputDir = flag.String(\"test.outputdir\", \"\", \"directory in which to write profiles\")\n\n\t// Report as tests are run; default is silent for success.\n\tchatty           = flag.Bool(\"test.v\", false, \"verbose: print additional output\")\n\tcoverProfile     = flag.String(\"test.coverprofile\", \"\", \"write a coverage profile to the named file after execution\")\n\tmatch            = flag.String(\"test.run\", \"\", \"regular expression to select tests and examples to run\")\n\tmemProfile       = flag.String(\"test.memprofile\", \"\", \"write a memory profile to the named file after execution\")\n\tmemProfileRate   = flag.Int(\"test.memprofilerate\", 0, \"if >=0, sets runtime.MemProfileRate\")\n\tcpuProfile       = flag.String(\"test.cpuprofile\", \"\", \"write a cpu profile to the named file during execution\")\n\tblockProfile     = flag.String(\"test.blockprofile\", \"\", \"write a goroutine blocking profile to the named file after execution\")\n\tblockProfileRate = flag.Int(\"test.blockprofilerate\", 1, \"if >= 0, calls runtime.SetBlockProfileRate()\")\n\ttimeout          = flag.Duration(\"test.timeout\", 0, \"if positive, sets an aggregate time limit for all tests\")\n\tcpuListStr       = flag.String(\"test.cpu\", \"\", \"comma-separated list of number of CPUs to use for each test\")\n\tparallel         = flag.Int(\"test.parallel\", runtime.GOMAXPROCS(0), \"maximum test parallelism\")\n\n\thaveExamples bool // are there examples?\n\n\tcpuList []int\n)\n\n// common holds the elements common between T and B and\n// captures common methods such as Errorf.\ntype common struct {\n\tmu       sync.RWMutex // guards output and failed\n\toutput   []byte       // Output generated by test or benchmark.\n\tfailed   bool         // Test or benchmark has failed.\n\tskipped  bool         // Test of benchmark has been skipped.\n\tfinished bool\n\n\tstart    time.Time // Time test or benchmark started\n\tduration time.Duration\n\tself     interface{}      // To be sent on signal channel when done.\n\tsignal   chan interface{} // Output for serial tests.\n}\n\n// Short reports whether the -test.short flag is set.\nfunc Short() bool {\n\treturn *short\n}\n\n// Verbose reports whether the -test.v flag is set.\nfunc Verbose() bool {\n\treturn *chatty\n}\n\n// decorate prefixes the string with the file and line of the call site\n// and inserts the final newline if needed and indentation tabs for formatting.\nfunc decorate(s string) string {\n\t_, file, line, ok := runtime.Caller(3) // decorate + log + public function.\n\tif ok {\n\t\t// Truncate file name at last file name separator.\n\t\tif index := strings.LastIndex(file, \"/\"); index >= 0 {\n\t\t\tfile = file[index+1:]\n\t\t} else if index = strings.LastIndex(file, \"\\\\\"); index >= 0 {\n\t\t\tfile = file[index+1:]\n\t\t}\n\t} else {\n\t\tfile = \"???\"\n\t\tline = 1\n\t}\n\tbuf := new(bytes.Buffer)\n\t// Every line is indented at least one tab.\n\tbuf.WriteByte('\\t')\n\tfmt.Fprintf(buf, \"%s:%d: \", file, line)\n\tlines := strings.Split(s, \"\\n\")\n\tif l := len(lines); l > 1 && lines[l-1] == \"\" {\n\t\tlines = lines[:l-1]\n\t}\n\tfor i, line := range lines {\n\t\tif i > 0 {\n\t\t\t// Second and subsequent lines are indented an extra tab.\n\t\t\tbuf.WriteString(\"\\n\\t\\t\")\n\t\t}\n\t\tbuf.WriteString(line)\n\t}\n\tbuf.WriteByte('\\n')\n\treturn buf.String()\n}\n\n// fmtDuration returns a string representing d in the form \"87.00s\".\nfunc fmtDuration(d time.Duration) string {\n\treturn fmt.Sprintf(\"%.2fs\", d.Seconds())\n}\n\n// TB is the interface common to T and B.\ntype TB interface {\n\tError(args ...interface{})\n\tErrorf(format string, args ...interface{})\n\tFail()\n\tFailNow()\n\tFailed() bool\n\tFatal(args ...interface{})\n\tFatalf(format string, args ...interface{})\n\tLog(args ...interface{})\n\tLogf(format string, args ...interface{})\n\tSkip(args ...interface{})\n\tSkipNow()\n\tSkipf(format string, args ...interface{})\n\tSkipped() bool\n\n\t// A private method to prevent users implementing the\n\t// interface and so future additions to it will not\n\t// violate Go 1 compatibility.\n\tprivate()\n}\n\nvar _ TB = (*T)(nil)\nvar _ TB = (*B)(nil)\n\n// T is a type passed to Test functions to manage test state and support formatted test logs.\n// Logs are accumulated during execution and dumped to standard error when done.\ntype T struct {\n\tcommon\n\tname          string    // Name of test.\n\tstartParallel chan bool // Parallel tests will wait on this.\n}\n\nfunc (c *common) private() {}\n\n// Fail marks the function as having failed but continues execution.\nfunc (c *common) Fail() {\n\tc.mu.Lock()\n\tdefer c.mu.Unlock()\n\tc.failed = true\n}\n\n// Failed reports whether the function has failed.\nfunc (c *common) Failed() bool {\n\tc.mu.RLock()\n\tdefer c.mu.RUnlock()\n\treturn c.failed\n}\n\n// FailNow marks the function as having failed and stops its execution.\n// Execution will continue at the next test or benchmark.\n// FailNow must be called from the goroutine running the\n// test or benchmark function, not from other goroutines\n// created during the test. Calling FailNow does not stop\n// those other goroutines.\nfunc (c *common) FailNow() {\n\tc.Fail()\n\n\t// Calling runtime.Goexit will exit the goroutine, which\n\t// will run the deferred functions in this goroutine,\n\t// which will eventually run the deferred lines in tRunner,\n\t// which will signal to the test loop that this test is done.\n\t//\n\t// A previous version of this code said:\n\t//\n\t//\tc.duration = ...\n\t//\tc.signal <- c.self\n\t//\truntime.Goexit()\n\t//\n\t// This previous version duplicated code (those lines are in\n\t// tRunner no matter what), but worse the goroutine teardown\n\t// implicit in runtime.Goexit was not guaranteed to complete\n\t// before the test exited.  If a test deferred an important cleanup\n\t// function (like removing temporary files), there was no guarantee\n\t// it would run on a test failure.  Because we send on c.signal during\n\t// a top-of-stack deferred function now, we know that the send\n\t// only happens after any other stacked defers have completed.\n\tc.finished = true\n\truntime.Goexit()\n}\n\n// log generates the output. It's always at the same stack depth.\nfunc (c *common) log(s string) {\n\tc.mu.Lock()\n\tdefer c.mu.Unlock()\n\tc.output = append(c.output, decorate(s)...)\n}\n\n// Log formats its arguments using default formatting, analogous to Println,\n// and records the text in the error log. The text will be printed only if\n// the test fails or the -test.v flag is set.\nfunc (c *common) Log(args ...interface{}) { c.log(fmt.Sprintln(args...)) }\n\n// Logf formats its arguments according to the format, analogous to Printf,\n// and records the text in the error log. The text will be printed only if\n// the test fails or the -test.v flag is set.\nfunc (c *common) Logf(format string, args ...interface{}) { c.log(fmt.Sprintf(format, args...)) }\n\n// Error is equivalent to Log followed by Fail.\nfunc (c *common) Error(args ...interface{}) {\n\tc.log(fmt.Sprintln(args...))\n\tc.Fail()\n}\n\n// Errorf is equivalent to Logf followed by Fail.\nfunc (c *common) Errorf(format string, args ...interface{}) {\n\tc.log(fmt.Sprintf(format, args...))\n\tc.Fail()\n}\n\n// Fatal is equivalent to Log followed by FailNow.\nfunc (c *common) Fatal(args ...interface{}) {\n\tc.log(fmt.Sprintln(args...))\n\tc.FailNow()\n}\n\n// Fatalf is equivalent to Logf followed by FailNow.\nfunc (c *common) Fatalf(format string, args ...interface{}) {\n\tc.log(fmt.Sprintf(format, args...))\n\tc.FailNow()\n}\n\n// Skip is equivalent to Log followed by SkipNow.\nfunc (c *common) Skip(args ...interface{}) {\n\tc.log(fmt.Sprintln(args...))\n\tc.SkipNow()\n}\n\n// Skipf is equivalent to Logf followed by SkipNow.\nfunc (c *common) Skipf(format string, args ...interface{}) {\n\tc.log(fmt.Sprintf(format, args...))\n\tc.SkipNow()\n}\n\n// SkipNow marks the test as having been skipped and stops its execution.\n// Execution will continue at the next test or benchmark. See also FailNow.\n// SkipNow must be called from the goroutine running the test, not from\n// other goroutines created during the test. Calling SkipNow does not stop\n// those other goroutines.\nfunc (c *common) SkipNow() {\n\tc.skip()\n\tc.finished = true\n\truntime.Goexit()\n}\n\nfunc (c *common) skip() {\n\tc.mu.Lock()\n\tdefer c.mu.Unlock()\n\tc.skipped = true\n}\n\n// Skipped reports whether the test was skipped.\nfunc (c *common) Skipped() bool {\n\tc.mu.RLock()\n\tdefer c.mu.RUnlock()\n\treturn c.skipped\n}\n\n// Parallel signals that this test is to be run in parallel with (and only with)\n// other parallel tests.\nfunc (t *T) Parallel() {\n\tt.signal <- (*T)(nil) // Release main testing loop\n\t<-t.startParallel     // Wait for serial tests to finish\n\t// Assuming Parallel is the first thing a test does, which is reasonable,\n\t// reinitialize the test's start time because it's actually starting now.\n\tt.start = time.Now()\n}\n\n// An internal type but exported because it is cross-package; part of the implementation\n// of the \"go test\" command.\ntype InternalTest struct {\n\tName string\n\tF    func(*T)\n}\n\nfunc tRunner(t *T, test *InternalTest) {\n\t// When this goroutine is done, either because test.F(t)\n\t// returned normally or because a test failure triggered\n\t// a call to runtime.Goexit, record the duration and send\n\t// a signal saying that the test is done.\n\tdefer func() {\n\t\tt.duration = time.Now().Sub(t.start)\n\t\t// If the test panicked, print any test output before dying.\n\t\terr := recover()\n\t\tif !t.finished && err == nil {\n\t\t\terr = fmt.Errorf(\"test executed panic(nil) or runtime.Goexit\")\n\t\t}\n\t\tif err != nil {\n\t\t\tt.Fail()\n\t\t\tt.report()\n\t\t\tpanic(err)\n\t\t}\n\t\tt.signal <- t\n\t}()\n\n\tt.start = time.Now()\n\ttest.F(t)\n\tt.finished = true\n}\n\n// An internal function but exported because it is cross-package; part of the implementation\n// of the \"go test\" command.\nfunc Main(matchString func(pat, str string) (bool, error), tests []InternalTest, benchmarks []InternalBenchmark, examples []InternalExample) {\n\tos.Exit(MainStart(matchString, tests, benchmarks, examples).Run())\n}\n\n// M is a type passed to a TestMain function to run the actual tests.\ntype M struct {\n\tmatchString func(pat, str string) (bool, error)\n\ttests       []InternalTest\n\tbenchmarks  []InternalBenchmark\n\texamples    []InternalExample\n}\n\n// MainStart is meant for use by tests generated by 'go test'.\n// It is not meant to be called directly and is not subject to the Go 1 compatibility document.\n// It may change signature from release to release.\nfunc MainStart(matchString func(pat, str string) (bool, error), tests []InternalTest, benchmarks []InternalBenchmark, examples []InternalExample) *M {\n\treturn &M{\n\t\tmatchString: matchString,\n\t\ttests:       tests,\n\t\tbenchmarks:  benchmarks,\n\t\texamples:    examples,\n\t}\n}\n\n// Run runs the tests. It returns an exit code to pass to os.Exit.\nfunc (m *M) Run() int {\n\tflag.Parse()\n\tparseCpuList()\n\n\tbefore()\n\tstartAlarm()\n\thaveExamples = len(m.examples) > 0\n\ttestOk := RunTests(m.matchString, m.tests)\n\texampleOk := RunExamples(m.matchString, m.examples)\n\tstopAlarm()\n\tif !testOk || !exampleOk {\n\t\tfmt.Println(\"FAIL\")\n\t\tafter()\n\t\treturn 1\n\t}\n\tfmt.Println(\"PASS\")\n\tRunBenchmarks(m.matchString, m.benchmarks)\n\tafter()\n\treturn 0\n}\n\nfunc (t *T) report() {\n\tdstr := fmtDuration(t.duration)\n\tformat := \"--- %s: %s (%s)\\n%s\"\n\tif t.Failed() {\n\t\tfmt.Printf(format, \"FAIL\", t.name, dstr, t.output)\n\t} else if *chatty {\n\t\tif t.Skipped() {\n\t\t\tfmt.Printf(format, \"SKIP\", t.name, dstr, t.output)\n\t\t} else {\n\t\t\tfmt.Printf(format, \"PASS\", t.name, dstr, t.output)\n\t\t}\n\t}\n}\n\nfunc RunTests(matchString func(pat, str string) (bool, error), tests []InternalTest) (ok bool) {\n\tok = true\n\tif len(tests) == 0 && !haveExamples {\n\t\tfmt.Fprintln(os.Stderr, \"testing: warning: no tests to run\")\n\t\treturn\n\t}\n\tfor _, procs := range cpuList {\n\t\truntime.GOMAXPROCS(procs)\n\t\t// We build a new channel tree for each run of the loop.\n\t\t// collector merges in one channel all the upstream signals from parallel tests.\n\t\t// If all tests pump to the same channel, a bug can occur where a test\n\t\t// kicks off a goroutine that Fails, yet the test still delivers a completion signal,\n\t\t// which skews the counting.\n\t\tvar collector = make(chan interface{})\n\n\t\tnumParallel := 0\n\t\tstartParallel := make(chan bool)\n\n\t\tfor i := 0; i < len(tests); i++ {\n\t\t\tmatched, err := matchString(*match, tests[i].Name)\n\t\t\tif err != nil {\n\t\t\t\tfmt.Fprintf(os.Stderr, \"testing: invalid regexp for -test.run: %s\\n\", err)\n\t\t\t\tos.Exit(1)\n\t\t\t}\n\t\t\tif !matched {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\ttestName := tests[i].Name\n\t\t\tif procs != 1 {\n\t\t\t\ttestName = fmt.Sprintf(\"%s-%d\", tests[i].Name, procs)\n\t\t\t}\n\t\t\tt := &T{\n\t\t\t\tcommon: common{\n\t\t\t\t\tsignal: make(chan interface{}),\n\t\t\t\t},\n\t\t\t\tname:          testName,\n\t\t\t\tstartParallel: startParallel,\n\t\t\t}\n\t\t\tt.self = t\n\t\t\tif *chatty {\n\t\t\t\tfmt.Printf(\"=== RUN %s\\n\", t.name)\n\t\t\t}\n\t\t\tgo tRunner(t, &tests[i])\n\t\t\tout := (<-t.signal).(*T)\n\t\t\tif out == nil { // Parallel run.\n\t\t\t\tgo func() {\n\t\t\t\t\tcollector <- <-t.signal\n\t\t\t\t}()\n\t\t\t\tnumParallel++\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tt.report()\n\t\t\tok = ok && !out.Failed()\n\t\t}\n\n\t\trunning := 0\n\t\tfor numParallel+running > 0 {\n\t\t\tif running < *parallel && numParallel > 0 {\n\t\t\t\tstartParallel <- true\n\t\t\t\trunning++\n\t\t\t\tnumParallel--\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tt := (<-collector).(*T)\n\t\t\tt.report()\n\t\t\tok = ok && !t.Failed()\n\t\t\trunning--\n\t\t}\n\t}\n\treturn\n}\n\n// before runs before all testing.\nfunc before() {\n\tif *memProfileRate > 0 {\n\t\truntime.MemProfileRate = *memProfileRate\n\t}\n\tif *cpuProfile != \"\" {\n\t\tf, err := os.Create(toOutputDir(*cpuProfile))\n\t\tif err != nil {\n\t\t\tfmt.Fprintf(os.Stderr, \"testing: %s\", err)\n\t\t\treturn\n\t\t}\n\t\tif err := pprof.StartCPUProfile(f); err != nil {\n\t\t\tfmt.Fprintf(os.Stderr, \"testing: can't start cpu profile: %s\", err)\n\t\t\tf.Close()\n\t\t\treturn\n\t\t}\n\t\t// Could save f so after can call f.Close; not worth the effort.\n\t}\n\tif *blockProfile != \"\" && *blockProfileRate >= 0 {\n\t\truntime.SetBlockProfileRate(*blockProfileRate)\n\t}\n\tif *coverProfile != \"\" && cover.Mode == \"\" {\n\t\tfmt.Fprintf(os.Stderr, \"testing: cannot use -test.coverprofile because test binary was not built with coverage enabled\\n\")\n\t\tos.Exit(2)\n\t}\n}\n\n// after runs after all testing.\nfunc after() {\n\tif *cpuProfile != \"\" {\n\t\tpprof.StopCPUProfile() // flushes profile to disk\n\t}\n\tif *memProfile != \"\" {\n\t\tf, err := os.Create(toOutputDir(*memProfile))\n\t\tif err != nil {\n\t\t\tfmt.Fprintf(os.Stderr, \"testing: %s\\n\", err)\n\t\t\tos.Exit(2)\n\t\t}\n\t\truntime.GC() // materialize all statistics\n\t\tif err = pprof.WriteHeapProfile(f); err != nil {\n\t\t\tfmt.Fprintf(os.Stderr, \"testing: can't write %s: %s\\n\", *memProfile, err)\n\t\t\tos.Exit(2)\n\t\t}\n\t\tf.Close()\n\t}\n\tif *blockProfile != \"\" && *blockProfileRate >= 0 {\n\t\tf, err := os.Create(toOutputDir(*blockProfile))\n\t\tif err != nil {\n\t\t\tfmt.Fprintf(os.Stderr, \"testing: %s\\n\", err)\n\t\t\tos.Exit(2)\n\t\t}\n\t\tif err = pprof.Lookup(\"block\").WriteTo(f, 0); err != nil {\n\t\t\tfmt.Fprintf(os.Stderr, \"testing: can't write %s: %s\\n\", *blockProfile, err)\n\t\t\tos.Exit(2)\n\t\t}\n\t\tf.Close()\n\t}\n\tif cover.Mode != \"\" {\n\t\tcoverReport()\n\t}\n}\n\n// toOutputDir returns the file name relocated, if required, to outputDir.\n// Simple implementation to avoid pulling in path/filepath.\nfunc toOutputDir(path string) string {\n\tif *outputDir == \"\" || path == \"\" {\n\t\treturn path\n\t}\n\tif runtime.GOOS == \"windows\" {\n\t\t// On Windows, it's clumsy, but we can be almost always correct\n\t\t// by just looking for a drive letter and a colon.\n\t\t// Absolute paths always have a drive letter (ignoring UNC).\n\t\t// Problem: if path == \"C:A\" and outputdir == \"C:\\Go\" it's unclear\n\t\t// what to do, but even then path/filepath doesn't help.\n\t\t// TODO: Worth doing better? Probably not, because we're here only\n\t\t// under the management of go test.\n\t\tif len(path) >= 2 {\n\t\t\tletter, colon := path[0], path[1]\n\t\t\tif ('a' <= letter && letter <= 'z' || 'A' <= letter && letter <= 'Z') && colon == ':' {\n\t\t\t\t// If path starts with a drive letter we're stuck with it regardless.\n\t\t\t\treturn path\n\t\t\t}\n\t\t}\n\t}\n\tif os.IsPathSeparator(path[0]) {\n\t\treturn path\n\t}\n\treturn fmt.Sprintf(\"%s%c%s\", *outputDir, os.PathSeparator, path)\n}\n\nvar timer *time.Timer\n\n// startAlarm starts an alarm if requested.\nfunc startAlarm() {\n\tif *timeout > 0 {\n\t\ttimer = time.AfterFunc(*timeout, func() {\n\t\t\tpanic(fmt.Sprintf(\"test timed out after %v\", *timeout))\n\t\t})\n\t}\n}\n\n// stopAlarm turns off the alarm.\nfunc stopAlarm() {\n\tif *timeout > 0 {\n\t\ttimer.Stop()\n\t}\n}\n\nfunc parseCpuList() {\n\tfor _, val := range strings.Split(*cpuListStr, \",\") {\n\t\tval = strings.TrimSpace(val)\n\t\tif val == \"\" {\n\t\t\tcontinue\n\t\t}\n\t\tcpu, err := strconv.Atoi(val)\n\t\tif err != nil || cpu <= 0 {\n\t\t\tfmt.Fprintf(os.Stderr, \"testing: invalid value %q for -test.cpu\\n\", val)\n\t\t\tos.Exit(1)\n\t\t}\n\t\tcpuList = append(cpuList, cpu)\n\t}\n\tif cpuList == nil {\n\t\tcpuList = append(cpuList, runtime.GOMAXPROCS(-1))\n\t}\n}\n"
  },
  {
    "path": "testData/mockSdk-1.1.2/src/pkg/text/template/helper.go",
    "content": "// Copyright 2011 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Helper functions to make constructing templates easier.\n\npackage template\n\nimport (\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"path/filepath\"\n)\n\n// Functions and methods to parse templates.\n\n// Must is a helper that wraps a call to a function returning (*Template, error)\n// and panics if the error is non-nil. It is intended for use in variable\n// initializations such as\n//\tvar t = template.Must(template.New(\"name\").Parse(\"text\"))\nfunc Must(t *Template, err error) *Template {\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn t\n}\n\n// ParseFiles creates a new Template and parses the template definitions from\n// the named files. The returned template's name will have the (base) name and\n// (parsed) contents of the first file. There must be at least one file.\n// If an error occurs, parsing stops and the returned *Template is nil.\nfunc ParseFiles(filenames ...string) (*Template, error) {\n\treturn parseFiles(nil, filenames...)\n}\n\n// ParseFiles parses the named files and associates the resulting templates with\n// t. If an error occurs, parsing stops and the returned template is nil;\n// otherwise it is t. There must be at least one file.\nfunc (t *Template) ParseFiles(filenames ...string) (*Template, error) {\n\treturn parseFiles(t, filenames...)\n}\n\n// parseFiles is the helper for the method and function. If the argument\n// template is nil, it is created from the first file.\nfunc parseFiles(t *Template, filenames ...string) (*Template, error) {\n\tif len(filenames) == 0 {\n\t\t// Not really a problem, but be consistent.\n\t\treturn nil, fmt.Errorf(\"template: no files named in call to ParseFiles\")\n\t}\n\tfor _, filename := range filenames {\n\t\tb, err := ioutil.ReadFile(filename)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\ts := string(b)\n\t\tname := filepath.Base(filename)\n\t\t// First template becomes return value if not already defined,\n\t\t// and we use that one for subsequent New calls to associate\n\t\t// all the templates together. Also, if this file has the same name\n\t\t// as t, this file becomes the contents of t, so\n\t\t//  t, err := New(name).Funcs(xxx).ParseFiles(name)\n\t\t// works. Otherwise we create a new template associated with t.\n\t\tvar tmpl *Template\n\t\tif t == nil {\n\t\t\tt = New(name)\n\t\t}\n\t\tif name == t.Name() {\n\t\t\ttmpl = t\n\t\t} else {\n\t\t\ttmpl = t.New(name)\n\t\t}\n\t\t_, err = tmpl.Parse(s)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn t, nil\n}\n\n// ParseGlob creates a new Template and parses the template definitions from the\n// files identified by the pattern, which must match at least one file. The\n// returned template will have the (base) name and (parsed) contents of the\n// first file matched by the pattern. ParseGlob is equivalent to calling\n// ParseFiles with the list of files matched by the pattern.\nfunc ParseGlob(pattern string) (*Template, error) {\n\treturn parseGlob(nil, pattern)\n}\n\n// ParseGlob parses the template definitions in the files identified by the\n// pattern and associates the resulting templates with t. The pattern is\n// processed by filepath.Glob and must match at least one file. ParseGlob is\n// equivalent to calling t.ParseFiles with the list of files matched by the\n// pattern.\nfunc (t *Template) ParseGlob(pattern string) (*Template, error) {\n\treturn parseGlob(t, pattern)\n}\n\n// parseGlob is the implementation of the function and method ParseGlob.\nfunc parseGlob(t *Template, pattern string) (*Template, error) {\n\tfilenames, err := filepath.Glob(pattern)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif len(filenames) == 0 {\n\t\treturn nil, fmt.Errorf(\"template: pattern matches no files: %#q\", pattern)\n\t}\n\treturn parseFiles(t, filenames...)\n}\n"
  },
  {
    "path": "testData/mockSdk-1.1.2/src/pkg/text/template/template.go",
    "content": "// Copyright 2011 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage template\n\nimport (\n\t\"fmt\"\n\t\"reflect\"\n\t\"text/template/parse\"\n)\n\n// common holds the information shared by related templates.\ntype common struct {\n\ttmpl map[string]*Template\n\t// We use two maps, one for parsing and one for execution.\n\t// This separation makes the API cleaner since it doesn't\n\t// expose reflection to the client.\n\tparseFuncs FuncMap\n\texecFuncs  map[string]reflect.Value\n}\n\n// Template is the representation of a parsed template. The *parse.Tree\n// field is exported only for use by html/template and should be treated\n// as unexported by all other clients.\ntype Template struct {\n\tname string\n\t*parse.Tree\n\t*common\n\tleftDelim  string\n\trightDelim string\n}\n\n// New allocates a new template with the given name.\nfunc New(name string) *Template {\n\treturn &Template{\n\t\tname: name,\n\t}\n}\n\n// Name returns the name of the template.\nfunc (t *Template) Name() string {\n\treturn t.name\n}\n\n// New allocates a new template associated with the given one and with the same\n// delimiters. The association, which is transitive, allows one template to\n// invoke another with a {{template}} action.\nfunc (t *Template) New(name string) *Template {\n\tt.init()\n\treturn &Template{\n\t\tname:       name,\n\t\tcommon:     t.common,\n\t\tleftDelim:  t.leftDelim,\n\t\trightDelim: t.rightDelim,\n\t}\n}\n\nfunc (t *Template) init() {\n\tif t.common == nil {\n\t\tt.common = new(common)\n\t\tt.tmpl = make(map[string]*Template)\n\t\tt.parseFuncs = make(FuncMap)\n\t\tt.execFuncs = make(map[string]reflect.Value)\n\t}\n}\n\n// Clone returns a duplicate of the template, including all associated\n// templates. The actual representation is not copied, but the name space of\n// associated templates is, so further calls to Parse in the copy will add\n// templates to the copy but not to the original. Clone can be used to prepare\n// common templates and use them with variant definitions for other templates\n// by adding the variants after the clone is made.\nfunc (t *Template) Clone() (*Template, error) {\n\tnt := t.copy(nil)\n\tnt.init()\n\tnt.tmpl[t.name] = nt\n\tfor k, v := range t.tmpl {\n\t\tif k == t.name { // Already installed.\n\t\t\tcontinue\n\t\t}\n\t\t// The associated templates share nt's common structure.\n\t\ttmpl := v.copy(nt.common)\n\t\tnt.tmpl[k] = tmpl\n\t}\n\tfor k, v := range t.parseFuncs {\n\t\tnt.parseFuncs[k] = v\n\t}\n\tfor k, v := range t.execFuncs {\n\t\tnt.execFuncs[k] = v\n\t}\n\treturn nt, nil\n}\n\n// copy returns a shallow copy of t, with common set to the argument.\nfunc (t *Template) copy(c *common) *Template {\n\tnt := New(t.name)\n\tnt.Tree = t.Tree\n\tnt.common = c\n\tnt.leftDelim = t.leftDelim\n\tnt.rightDelim = t.rightDelim\n\treturn nt\n}\n\n// AddParseTree creates a new template with the name and parse tree\n// and associates it with t.\nfunc (t *Template) AddParseTree(name string, tree *parse.Tree) (*Template, error) {\n\tif t.common != nil && t.tmpl[name] != nil {\n\t\treturn nil, fmt.Errorf(\"template: redefinition of template %q\", name)\n\t}\n\tnt := t.New(name)\n\tnt.Tree = tree\n\tt.tmpl[name] = nt\n\treturn nt, nil\n}\n\n// Templates returns a slice of the templates associated with t, including t\n// itself.\nfunc (t *Template) Templates() []*Template {\n\tif t.common == nil {\n\t\treturn nil\n\t}\n\t// Return a slice so we don't expose the map.\n\tm := make([]*Template, 0, len(t.tmpl))\n\tfor _, v := range t.tmpl {\n\t\tm = append(m, v)\n\t}\n\treturn m\n}\n\n// Delims sets the action delimiters to the specified strings, to be used in\n// subsequent calls to Parse, ParseFiles, or ParseGlob. Nested template\n// definitions will inherit the settings. An empty delimiter stands for the\n// corresponding default: {{ or }}.\n// The return value is the template, so calls can be chained.\nfunc (t *Template) Delims(left, right string) *Template {\n\tt.leftDelim = left\n\tt.rightDelim = right\n\treturn t\n}\n\n// Funcs adds the elements of the argument map to the template's function map.\n// It panics if a value in the map is not a function with appropriate return\n// type. However, it is legal to overwrite elements of the map. The return\n// value is the template, so calls can be chained.\nfunc (t *Template) Funcs(funcMap FuncMap) *Template {\n\tt.init()\n\taddValueFuncs(t.execFuncs, funcMap)\n\taddFuncs(t.parseFuncs, funcMap)\n\treturn t\n}\n\n// Lookup returns the template with the given name that is associated with t,\n// or nil if there is no such template.\nfunc (t *Template) Lookup(name string) *Template {\n\tif t.common == nil {\n\t\treturn nil\n\t}\n\treturn t.tmpl[name]\n}\n\n// Parse parses a string into a template. Nested template definitions will be\n// associated with the top-level template t. Parse may be called multiple times\n// to parse definitions of templates to associate with t. It is an error if a\n// resulting template is non-empty (contains content other than template\n// definitions) and would replace a non-empty template with the same name.\n// (In multiple calls to Parse with the same receiver template, only one call\n// can contain text other than space, comments, and template definitions.)\nfunc (t *Template) Parse(text string) (*Template, error) {\n\tt.init()\n\ttrees, err := parse.Parse(t.name, text, t.leftDelim, t.rightDelim, t.parseFuncs, builtins)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\t// Add the newly parsed trees, including the one for t, into our common structure.\n\tfor name, tree := range trees {\n\t\t// If the name we parsed is the name of this template, overwrite this template.\n\t\t// The associate method checks it's not a redefinition.\n\t\ttmpl := t\n\t\tif name != t.name {\n\t\t\ttmpl = t.New(name)\n\t\t}\n\t\t// Even if t == tmpl, we need to install it in the common.tmpl map.\n\t\tif replace, err := t.associate(tmpl, tree); err != nil {\n\t\t\treturn nil, err\n\t\t} else if replace {\n\t\t\ttmpl.Tree = tree\n\t\t}\n\t\ttmpl.leftDelim = t.leftDelim\n\t\ttmpl.rightDelim = t.rightDelim\n\t}\n\treturn t, nil\n}\n\n// associate installs the new template into the group of templates associated\n// with t. It is an error to reuse a name except to overwrite an empty\n// template. The two are already known to share the common structure.\n// The boolean return value reports wither to store this tree as t.Tree.\nfunc (t *Template) associate(new *Template, tree *parse.Tree) (bool, error) {\n\tif new.common != t.common {\n\t\tpanic(\"internal error: associate not common\")\n\t}\n\tname := new.name\n\tif old := t.tmpl[name]; old != nil {\n\t\toldIsEmpty := parse.IsEmptyTree(old.Root)\n\t\tnewIsEmpty := parse.IsEmptyTree(tree.Root)\n\t\tif newIsEmpty {\n\t\t\t// Whether old is empty or not, new is empty; no reason to replace old.\n\t\t\treturn false, nil\n\t\t}\n\t\tif !oldIsEmpty {\n\t\t\treturn false, fmt.Errorf(\"template: redefinition of template %q\", name)\n\t\t}\n\t}\n\tt.tmpl[name] = new\n\treturn true, nil\n}\n"
  },
  {
    "path": "testData/mockSdk-1.1.2/src/pkg/time/tick.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage time\n\nimport \"errors\"\n\n// A Ticker holds a channel that delivers `ticks' of a clock\n// at intervals.\ntype Ticker struct {\n\tC <-chan Time // The channel on which the ticks are delivered.\n\tr runtimeTimer\n}\n\n// NewTicker returns a new Ticker containing a channel that will send the\n// time with a period specified by the duration argument.\n// It adjusts the intervals or drops ticks to make up for slow receivers.\n// The duration d must be greater than zero; if not, NewTicker will panic.\n// Stop the ticker to release associated resources.\nfunc NewTicker(d Duration) *Ticker {\n\tif d <= 0 {\n\t\tpanic(errors.New(\"non-positive interval for NewTicker\"))\n\t}\n\t// Give the channel a 1-element time buffer.\n\t// If the client falls behind while reading, we drop ticks\n\t// on the floor until the client catches up.\n\tc := make(chan Time, 1)\n\tt := &Ticker{\n\t\tC: c,\n\t\tr: runtimeTimer{\n\t\t\twhen:   when(d),\n\t\t\tperiod: int64(d),\n\t\t\tf:      sendTime,\n\t\t\targ:    c,\n\t\t},\n\t}\n\tstartTimer(&t.r)\n\treturn t\n}\n\n// Stop turns off a ticker.  After Stop, no more ticks will be sent.\n// Stop does not close the channel, to prevent a read from the channel succeeding\n// incorrectly.\nfunc (t *Ticker) Stop() {\n\tstopTimer(&t.r)\n}\n\n// Tick is a convenience wrapper for NewTicker providing access to the ticking\n// channel only.  Useful for clients that have no need to shut down the ticker.\nfunc Tick(d Duration) <-chan Time {\n\tif d <= 0 {\n\t\treturn nil\n\t}\n\treturn NewTicker(d).C\n}\n"
  },
  {
    "path": "testData/mockSdk-1.1.2/src/pkg/time/time.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package time provides functionality for measuring and displaying time.\n//\n// The calendrical calculations always assume a Gregorian calendar.\npackage time\n\nimport \"errors\"\n\n// A Time represents an instant in time with nanosecond precision.\n//\n// Programs using times should typically store and pass them as values,\n// not pointers.  That is, time variables and struct fields should be of\n// type time.Time, not *time.Time.  A Time value can be used by\n// multiple goroutines simultaneously.\n//\n// Time instants can be compared using the Before, After, and Equal methods.\n// The Sub method subtracts two instants, producing a Duration.\n// The Add method adds a Time and a Duration, producing a Time.\n//\n// The zero value of type Time is January 1, year 1, 00:00:00.000000000 UTC.\n// As this time is unlikely to come up in practice, the IsZero method gives\n// a simple way of detecting a time that has not been initialized explicitly.\n//\n// Each Time has associated with it a Location, consulted when computing the\n// presentation form of the time, such as in the Format, Hour, and Year methods.\n// The methods Local, UTC, and In return a Time with a specific location.\n// Changing the location in this way changes only the presentation; it does not\n// change the instant in time being denoted and therefore does not affect the\n// computations described in earlier paragraphs.\n//\n// Note that the Go == operator compares not just the time instant but also the\n// Location. Therefore, Time values should not be used as map or database keys\n// without first guaranteeing that the identical Location has been set for all\n// values, which can be achieved through use of the UTC or Local method.\n//\ntype Time struct {\n\t// sec gives the number of seconds elapsed since\n\t// January 1, year 1 00:00:00 UTC.\n\tsec int64\n\n\t// nsec specifies a non-negative nanosecond\n\t// offset within the second named by Seconds.\n\t// It must be in the range [0, 999999999].\n\tnsec int32\n\n\t// loc specifies the Location that should be used to\n\t// determine the minute, hour, month, day, and year\n\t// that correspond to this Time.\n\t// Only the zero Time has a nil Location.\n\t// In that case it is interpreted to mean UTC.\n\tloc *Location\n}\n\n// After reports whether the time instant t is after u.\nfunc (t Time) After(u Time) bool {\n\treturn t.sec > u.sec || t.sec == u.sec && t.nsec > u.nsec\n}\n\n// Before reports whether the time instant t is before u.\nfunc (t Time) Before(u Time) bool {\n\treturn t.sec < u.sec || t.sec == u.sec && t.nsec < u.nsec\n}\n\n// Equal reports whether t and u represent the same time instant.\n// Two times can be equal even if they are in different locations.\n// For example, 6:00 +0200 CEST and 4:00 UTC are Equal.\n// This comparison is different from using t == u, which also compares\n// the locations.\nfunc (t Time) Equal(u Time) bool {\n\treturn t.sec == u.sec && t.nsec == u.nsec\n}\n\n// A Month specifies a month of the year (January = 1, ...).\ntype Month int\n\nconst (\n\tJanuary Month = 1 + iota\n\tFebruary\n\tMarch\n\tApril\n\tMay\n\tJune\n\tJuly\n\tAugust\n\tSeptember\n\tOctober\n\tNovember\n\tDecember\n)\n\nvar months = [...]string{\n\t\"January\",\n\t\"February\",\n\t\"March\",\n\t\"April\",\n\t\"May\",\n\t\"June\",\n\t\"July\",\n\t\"August\",\n\t\"September\",\n\t\"October\",\n\t\"November\",\n\t\"December\",\n}\n\n// String returns the English name of the month (\"January\", \"February\", ...).\nfunc (m Month) String() string { return months[m-1] }\n\n// A Weekday specifies a day of the week (Sunday = 0, ...).\ntype Weekday int\n\nconst (\n\tSunday Weekday = iota\n\tMonday\n\tTuesday\n\tWednesday\n\tThursday\n\tFriday\n\tSaturday\n)\n\nvar days = [...]string{\n\t\"Sunday\",\n\t\"Monday\",\n\t\"Tuesday\",\n\t\"Wednesday\",\n\t\"Thursday\",\n\t\"Friday\",\n\t\"Saturday\",\n}\n\n// String returns the English name of the day (\"Sunday\", \"Monday\", ...).\nfunc (d Weekday) String() string { return days[d] }\n\n// Computations on time.\n//\n// The zero value for a Time is defined to be\n//\tJanuary 1, year 1, 00:00:00.000000000 UTC\n// which (1) looks like a zero, or as close as you can get in a date\n// (1-1-1 00:00:00 UTC), (2) is unlikely enough to arise in practice to\n// be a suitable \"not set\" sentinel, unlike Jan 1 1970, and (3) has a\n// non-negative year even in time zones west of UTC, unlike 1-1-0\n// 00:00:00 UTC, which would be 12-31-(-1) 19:00:00 in New York.\n//\n// The zero Time value does not force a specific epoch for the time\n// representation.  For example, to use the Unix epoch internally, we\n// could define that to distinguish a zero value from Jan 1 1970, that\n// time would be represented by sec=-1, nsec=1e9.  However, it does\n// suggest a representation, namely using 1-1-1 00:00:00 UTC as the\n// epoch, and that's what we do.\n//\n// The Add and Sub computations are oblivious to the choice of epoch.\n//\n// The presentation computations - year, month, minute, and so on - all\n// rely heavily on division and modulus by positive constants.  For\n// calendrical calculations we want these divisions to round down, even\n// for negative values, so that the remainder is always positive, but\n// Go's division (like most hardware division instructions) rounds to\n// zero.  We can still do those computations and then adjust the result\n// for a negative numerator, but it's annoying to write the adjustment\n// over and over.  Instead, we can change to a different epoch so long\n// ago that all the times we care about will be positive, and then round\n// to zero and round down coincide.  These presentation routines already\n// have to add the zone offset, so adding the translation to the\n// alternate epoch is cheap.  For example, having a non-negative time t\n// means that we can write\n//\n//\tsec = t % 60\n//\n// instead of\n//\n//\tsec = t % 60\n//\tif sec < 0 {\n//\t\tsec += 60\n//\t}\n//\n// everywhere.\n//\n// The calendar runs on an exact 400 year cycle: a 400-year calendar\n// printed for 1970-2469 will apply as well to 2470-2869.  Even the days\n// of the week match up.  It simplifies the computations to choose the\n// cycle boundaries so that the exceptional years are always delayed as\n// long as possible.  That means choosing a year equal to 1 mod 400, so\n// that the first leap year is the 4th year, the first missed leap year\n// is the 100th year, and the missed missed leap year is the 400th year.\n// So we'd prefer instead to print a calendar for 2001-2400 and reuse it\n// for 2401-2800.\n//\n// Finally, it's convenient if the delta between the Unix epoch and\n// long-ago epoch is representable by an int64 constant.\n//\n// These three considerations—choose an epoch as early as possible, that\n// uses a year equal to 1 mod 400, and that is no more than 2⁶³ seconds\n// earlier than 1970—bring us to the year -292277022399.  We refer to\n// this year as the absolute zero year, and to times measured as a uint64\n// seconds since this year as absolute times.\n//\n// Times measured as an int64 seconds since the year 1—the representation\n// used for Time's sec field—are called internal times.\n//\n// Times measured as an int64 seconds since the year 1970 are called Unix\n// times.\n//\n// It is tempting to just use the year 1 as the absolute epoch, defining\n// that the routines are only valid for years >= 1.  However, the\n// routines would then be invalid when displaying the epoch in time zones\n// west of UTC, since it is year 0.  It doesn't seem tenable to say that\n// printing the zero time correctly isn't supported in half the time\n// zones.  By comparison, it's reasonable to mishandle some times in\n// the year -292277022399.\n//\n// All this is opaque to clients of the API and can be changed if a\n// better implementation presents itself.\n\nconst (\n\t// The unsigned zero year for internal calculations.\n\t// Must be 1 mod 400, and times before it will not compute correctly,\n\t// but otherwise can be changed at will.\n\tabsoluteZeroYear = -292277022399\n\n\t// The year of the zero Time.\n\t// Assumed by the unixToInternal computation below.\n\tinternalYear = 1\n\n\t// The year of the zero Unix time.\n\tunixYear = 1970\n\n\t// Offsets to convert between internal and absolute or Unix times.\n\tabsoluteToInternal int64 = (absoluteZeroYear - internalYear) * 365.2425 * secondsPerDay\n\tinternalToAbsolute       = -absoluteToInternal\n\n\tunixToInternal int64 = (1969*365 + 1969/4 - 1969/100 + 1969/400) * secondsPerDay\n\tinternalToUnix int64 = -unixToInternal\n)\n\n// IsZero reports whether t represents the zero time instant,\n// January 1, year 1, 00:00:00 UTC.\nfunc (t Time) IsZero() bool {\n\treturn t.sec == 0 && t.nsec == 0\n}\n\n// abs returns the time t as an absolute time, adjusted by the zone offset.\n// It is called when computing a presentation property like Month or Hour.\nfunc (t Time) abs() uint64 {\n\tl := t.loc\n\t// Avoid function calls when possible.\n\tif l == nil || l == &localLoc {\n\t\tl = l.get()\n\t}\n\tsec := t.sec + internalToUnix\n\tif l != &utcLoc {\n\t\tif l.cacheZone != nil && l.cacheStart <= sec && sec < l.cacheEnd {\n\t\t\tsec += int64(l.cacheZone.offset)\n\t\t} else {\n\t\t\t_, offset, _, _, _ := l.lookup(sec)\n\t\t\tsec += int64(offset)\n\t\t}\n\t}\n\treturn uint64(sec + (unixToInternal + internalToAbsolute))\n}\n\n// locabs is a combination of the Zone and abs methods,\n// extracting both return values from a single zone lookup.\nfunc (t Time) locabs() (name string, offset int, abs uint64) {\n\tl := t.loc\n\tif l == nil || l == &localLoc {\n\t\tl = l.get()\n\t}\n\t// Avoid function call if we hit the local time cache.\n\tsec := t.sec + internalToUnix\n\tif l != &utcLoc {\n\t\tif l.cacheZone != nil && l.cacheStart <= sec && sec < l.cacheEnd {\n\t\t\tname = l.cacheZone.name\n\t\t\toffset = l.cacheZone.offset\n\t\t} else {\n\t\t\tname, offset, _, _, _ = l.lookup(sec)\n\t\t}\n\t\tsec += int64(offset)\n\t} else {\n\t\tname = \"UTC\"\n\t}\n\tabs = uint64(sec + (unixToInternal + internalToAbsolute))\n\treturn\n}\n\n// Date returns the year, month, and day in which t occurs.\nfunc (t Time) Date() (year int, month Month, day int) {\n\tyear, month, day, _ = t.date(true)\n\treturn\n}\n\n// Year returns the year in which t occurs.\nfunc (t Time) Year() int {\n\tyear, _, _, _ := t.date(false)\n\treturn year\n}\n\n// Month returns the month of the year specified by t.\nfunc (t Time) Month() Month {\n\t_, month, _, _ := t.date(true)\n\treturn month\n}\n\n// Day returns the day of the month specified by t.\nfunc (t Time) Day() int {\n\t_, _, day, _ := t.date(true)\n\treturn day\n}\n\n// Weekday returns the day of the week specified by t.\nfunc (t Time) Weekday() Weekday {\n\treturn absWeekday(t.abs())\n}\n\n// absWeekday is like Weekday but operates on an absolute time.\nfunc absWeekday(abs uint64) Weekday {\n\t// January 1 of the absolute year, like January 1 of 2001, was a Monday.\n\tsec := (abs + uint64(Monday)*secondsPerDay) % secondsPerWeek\n\treturn Weekday(int(sec) / secondsPerDay)\n}\n\n// ISOWeek returns the ISO 8601 year and week number in which t occurs.\n// Week ranges from 1 to 53. Jan 01 to Jan 03 of year n might belong to\n// week 52 or 53 of year n-1, and Dec 29 to Dec 31 might belong to week 1\n// of year n+1.\nfunc (t Time) ISOWeek() (year, week int) {\n\tyear, month, day, yday := t.date(true)\n\twday := int(t.Weekday()+6) % 7 // weekday but Monday = 0.\n\tconst (\n\t\tMon int = iota\n\t\tTue\n\t\tWed\n\t\tThu\n\t\tFri\n\t\tSat\n\t\tSun\n\t)\n\n\t// Calculate week as number of Mondays in year up to\n\t// and including today, plus 1 because the first week is week 0.\n\t// Putting the + 1 inside the numerator as a + 7 keeps the\n\t// numerator from being negative, which would cause it to\n\t// round incorrectly.\n\tweek = (yday - wday + 7) / 7\n\n\t// The week number is now correct under the assumption\n\t// that the first Monday of the year is in week 1.\n\t// If Jan 1 is a Tuesday, Wednesday, or Thursday, the first Monday\n\t// is actually in week 2.\n\tjan1wday := (wday - yday + 7*53) % 7\n\tif Tue <= jan1wday && jan1wday <= Thu {\n\t\tweek++\n\t}\n\n\t// If the week number is still 0, we're in early January but in\n\t// the last week of last year.\n\tif week == 0 {\n\t\tyear--\n\t\tweek = 52\n\t\t// A year has 53 weeks when Jan 1 or Dec 31 is a Thursday,\n\t\t// meaning Jan 1 of the next year is a Friday\n\t\t// or it was a leap year and Jan 1 of the next year is a Saturday.\n\t\tif jan1wday == Fri || (jan1wday == Sat && isLeap(year)) {\n\t\t\tweek++\n\t\t}\n\t}\n\n\t// December 29 to 31 are in week 1 of next year if\n\t// they are after the last Thursday of the year and\n\t// December 31 is a Monday, Tuesday, or Wednesday.\n\tif month == December && day >= 29 && wday < Thu {\n\t\tif dec31wday := (wday + 31 - day) % 7; Mon <= dec31wday && dec31wday <= Wed {\n\t\t\tyear++\n\t\t\tweek = 1\n\t\t}\n\t}\n\n\treturn\n}\n\n// Clock returns the hour, minute, and second within the day specified by t.\nfunc (t Time) Clock() (hour, min, sec int) {\n\treturn absClock(t.abs())\n}\n\n// absClock is like clock but operates on an absolute time.\nfunc absClock(abs uint64) (hour, min, sec int) {\n\tsec = int(abs % secondsPerDay)\n\thour = sec / secondsPerHour\n\tsec -= hour * secondsPerHour\n\tmin = sec / secondsPerMinute\n\tsec -= min * secondsPerMinute\n\treturn\n}\n\n// Hour returns the hour within the day specified by t, in the range [0, 23].\nfunc (t Time) Hour() int {\n\treturn int(t.abs()%secondsPerDay) / secondsPerHour\n}\n\n// Minute returns the minute offset within the hour specified by t, in the range [0, 59].\nfunc (t Time) Minute() int {\n\treturn int(t.abs()%secondsPerHour) / secondsPerMinute\n}\n\n// Second returns the second offset within the minute specified by t, in the range [0, 59].\nfunc (t Time) Second() int {\n\treturn int(t.abs() % secondsPerMinute)\n}\n\n// Nanosecond returns the nanosecond offset within the second specified by t,\n// in the range [0, 999999999].\nfunc (t Time) Nanosecond() int {\n\treturn int(t.nsec)\n}\n\n// YearDay returns the day of the year specified by t, in the range [1,365] for non-leap years,\n// and [1,366] in leap years.\nfunc (t Time) YearDay() int {\n\t_, _, _, yday := t.date(false)\n\treturn yday + 1\n}\n\n// A Duration represents the elapsed time between two instants\n// as an int64 nanosecond count.  The representation limits the\n// largest representable duration to approximately 290 years.\ntype Duration int64\n\nconst (\n\tminDuration Duration = -1 << 63\n\tmaxDuration Duration = 1<<63 - 1\n)\n\n// Common durations.  There is no definition for units of Day or larger\n// to avoid confusion across daylight savings time zone transitions.\n//\n// To count the number of units in a Duration, divide:\n//\tsecond := time.Second\n//\tfmt.Print(int64(second/time.Millisecond)) // prints 1000\n//\n// To convert an integer number of units to a Duration, multiply:\n//\tseconds := 10\n//\tfmt.Print(time.Duration(seconds)*time.Second) // prints 10s\n//\nconst (\n\tNanosecond  Duration = 1\n\tMicrosecond          = 1000 * Nanosecond\n\tMillisecond          = 1000 * Microsecond\n\tSecond               = 1000 * Millisecond\n\tMinute               = 60 * Second\n\tHour                 = 60 * Minute\n)\n\n// String returns a string representing the duration in the form \"72h3m0.5s\".\n// Leading zero units are omitted.  As a special case, durations less than one\n// second format use a smaller unit (milli-, micro-, or nanoseconds) to ensure\n// that the leading digit is non-zero.  The zero duration formats as 0,\n// with no unit.\nfunc (d Duration) String() string {\n\t// Largest time is 2540400h10m10.000000000s\n\tvar buf [32]byte\n\tw := len(buf)\n\n\tu := uint64(d)\n\tneg := d < 0\n\tif neg {\n\t\tu = -u\n\t}\n\n\tif u < uint64(Second) {\n\t\t// Special case: if duration is smaller than a second,\n\t\t// use smaller units, like 1.2ms\n\t\tvar prec int\n\t\tw--\n\t\tbuf[w] = 's'\n\t\tw--\n\t\tswitch {\n\t\tcase u == 0:\n\t\t\treturn \"0\"\n\t\tcase u < uint64(Microsecond):\n\t\t\t// print nanoseconds\n\t\t\tprec = 0\n\t\t\tbuf[w] = 'n'\n\t\tcase u < uint64(Millisecond):\n\t\t\t// print microseconds\n\t\t\tprec = 3\n\t\t\t// U+00B5 'µ' micro sign == 0xC2 0xB5\n\t\t\tw-- // Need room for two bytes.\n\t\t\tcopy(buf[w:], \"µ\")\n\t\tdefault:\n\t\t\t// print milliseconds\n\t\t\tprec = 6\n\t\t\tbuf[w] = 'm'\n\t\t}\n\t\tw, u = fmtFrac(buf[:w], u, prec)\n\t\tw = fmtInt(buf[:w], u)\n\t} else {\n\t\tw--\n\t\tbuf[w] = 's'\n\n\t\tw, u = fmtFrac(buf[:w], u, 9)\n\n\t\t// u is now integer seconds\n\t\tw = fmtInt(buf[:w], u%60)\n\t\tu /= 60\n\n\t\t// u is now integer minutes\n\t\tif u > 0 {\n\t\t\tw--\n\t\t\tbuf[w] = 'm'\n\t\t\tw = fmtInt(buf[:w], u%60)\n\t\t\tu /= 60\n\n\t\t\t// u is now integer hours\n\t\t\t// Stop at hours because days can be different lengths.\n\t\t\tif u > 0 {\n\t\t\t\tw--\n\t\t\t\tbuf[w] = 'h'\n\t\t\t\tw = fmtInt(buf[:w], u)\n\t\t\t}\n\t\t}\n\t}\n\n\tif neg {\n\t\tw--\n\t\tbuf[w] = '-'\n\t}\n\n\treturn string(buf[w:])\n}\n\n// fmtFrac formats the fraction of v/10**prec (e.g., \".12345\") into the\n// tail of buf, omitting trailing zeros.  it omits the decimal\n// point too when the fraction is 0.  It returns the index where the\n// output bytes begin and the value v/10**prec.\nfunc fmtFrac(buf []byte, v uint64, prec int) (nw int, nv uint64) {\n\t// Omit trailing zeros up to and including decimal point.\n\tw := len(buf)\n\tprint := false\n\tfor i := 0; i < prec; i++ {\n\t\tdigit := v % 10\n\t\tprint = print || digit != 0\n\t\tif print {\n\t\t\tw--\n\t\t\tbuf[w] = byte(digit) + '0'\n\t\t}\n\t\tv /= 10\n\t}\n\tif print {\n\t\tw--\n\t\tbuf[w] = '.'\n\t}\n\treturn w, v\n}\n\n// fmtInt formats v into the tail of buf.\n// It returns the index where the output begins.\nfunc fmtInt(buf []byte, v uint64) int {\n\tw := len(buf)\n\tif v == 0 {\n\t\tw--\n\t\tbuf[w] = '0'\n\t} else {\n\t\tfor v > 0 {\n\t\t\tw--\n\t\t\tbuf[w] = byte(v%10) + '0'\n\t\t\tv /= 10\n\t\t}\n\t}\n\treturn w\n}\n\n// Nanoseconds returns the duration as an integer nanosecond count.\nfunc (d Duration) Nanoseconds() int64 { return int64(d) }\n\n// These methods return float64 because the dominant\n// use case is for printing a floating point number like 1.5s, and\n// a truncation to integer would make them not useful in those cases.\n// Splitting the integer and fraction ourselves guarantees that\n// converting the returned float64 to an integer rounds the same\n// way that a pure integer conversion would have, even in cases\n// where, say, float64(d.Nanoseconds())/1e9 would have rounded\n// differently.\n\n// Seconds returns the duration as a floating point number of seconds.\nfunc (d Duration) Seconds() float64 {\n\tsec := d / Second\n\tnsec := d % Second\n\treturn float64(sec) + float64(nsec)*1e-9\n}\n\n// Minutes returns the duration as a floating point number of minutes.\nfunc (d Duration) Minutes() float64 {\n\tmin := d / Minute\n\tnsec := d % Minute\n\treturn float64(min) + float64(nsec)*(1e-9/60)\n}\n\n// Hours returns the duration as a floating point number of hours.\nfunc (d Duration) Hours() float64 {\n\thour := d / Hour\n\tnsec := d % Hour\n\treturn float64(hour) + float64(nsec)*(1e-9/60/60)\n}\n\n// Add returns the time t+d.\nfunc (t Time) Add(d Duration) Time {\n\tt.sec += int64(d / 1e9)\n\tnsec := int32(t.nsec) + int32(d%1e9)\n\tif nsec >= 1e9 {\n\t\tt.sec++\n\t\tnsec -= 1e9\n\t} else if nsec < 0 {\n\t\tt.sec--\n\t\tnsec += 1e9\n\t}\n\tt.nsec = nsec\n\treturn t\n}\n\n// Sub returns the duration t-u. If the result exceeds the maximum (or minimum)\n// value that can be stored in a Duration, the maximum (or minimum) duration\n// will be returned.\n// To compute t-d for a duration d, use t.Add(-d).\nfunc (t Time) Sub(u Time) Duration {\n\td := Duration(t.sec-u.sec)*Second + Duration(int32(t.nsec)-int32(u.nsec))\n\t// Check for overflow or underflow.\n\tswitch {\n\tcase u.Add(d).Equal(t):\n\t\treturn d // d is correct\n\tcase t.Before(u):\n\t\treturn minDuration // t - u is negative out of range\n\tdefault:\n\t\treturn maxDuration // t - u is positive out of range\n\t}\n}\n\n// Since returns the time elapsed since t.\n// It is shorthand for time.Now().Sub(t).\nfunc Since(t Time) Duration {\n\treturn Now().Sub(t)\n}\n\n// AddDate returns the time corresponding to adding the\n// given number of years, months, and days to t.\n// For example, AddDate(-1, 2, 3) applied to January 1, 2011\n// returns March 4, 2010.\n//\n// AddDate normalizes its result in the same way that Date does,\n// so, for example, adding one month to October 31 yields\n// December 1, the normalized form for November 31.\nfunc (t Time) AddDate(years int, months int, days int) Time {\n\tyear, month, day := t.Date()\n\thour, min, sec := t.Clock()\n\treturn Date(year+years, month+Month(months), day+days, hour, min, sec, int(t.nsec), t.loc)\n}\n\nconst (\n\tsecondsPerMinute = 60\n\tsecondsPerHour   = 60 * 60\n\tsecondsPerDay    = 24 * secondsPerHour\n\tsecondsPerWeek   = 7 * secondsPerDay\n\tdaysPer400Years  = 365*400 + 97\n\tdaysPer100Years  = 365*100 + 24\n\tdaysPer4Years    = 365*4 + 1\n)\n\n// date computes the year, day of year, and when full=true,\n// the month and day in which t occurs.\nfunc (t Time) date(full bool) (year int, month Month, day int, yday int) {\n\treturn absDate(t.abs(), full)\n}\n\n// absDate is like date but operates on an absolute time.\nfunc absDate(abs uint64, full bool) (year int, month Month, day int, yday int) {\n\t// Split into time and day.\n\td := abs / secondsPerDay\n\n\t// Account for 400 year cycles.\n\tn := d / daysPer400Years\n\ty := 400 * n\n\td -= daysPer400Years * n\n\n\t// Cut off 100-year cycles.\n\t// The last cycle has one extra leap year, so on the last day\n\t// of that year, day / daysPer100Years will be 4 instead of 3.\n\t// Cut it back down to 3 by subtracting n>>2.\n\tn = d / daysPer100Years\n\tn -= n >> 2\n\ty += 100 * n\n\td -= daysPer100Years * n\n\n\t// Cut off 4-year cycles.\n\t// The last cycle has a missing leap year, which does not\n\t// affect the computation.\n\tn = d / daysPer4Years\n\ty += 4 * n\n\td -= daysPer4Years * n\n\n\t// Cut off years within a 4-year cycle.\n\t// The last year is a leap year, so on the last day of that year,\n\t// day / 365 will be 4 instead of 3.  Cut it back down to 3\n\t// by subtracting n>>2.\n\tn = d / 365\n\tn -= n >> 2\n\ty += n\n\td -= 365 * n\n\n\tyear = int(int64(y) + absoluteZeroYear)\n\tyday = int(d)\n\n\tif !full {\n\t\treturn\n\t}\n\n\tday = yday\n\tif isLeap(year) {\n\t\t// Leap year\n\t\tswitch {\n\t\tcase day > 31+29-1:\n\t\t\t// After leap day; pretend it wasn't there.\n\t\t\tday--\n\t\tcase day == 31+29-1:\n\t\t\t// Leap day.\n\t\t\tmonth = February\n\t\t\tday = 29\n\t\t\treturn\n\t\t}\n\t}\n\n\t// Estimate month on assumption that every month has 31 days.\n\t// The estimate may be too low by at most one month, so adjust.\n\tmonth = Month(day / 31)\n\tend := int(daysBefore[month+1])\n\tvar begin int\n\tif day >= end {\n\t\tmonth++\n\t\tbegin = end\n\t} else {\n\t\tbegin = int(daysBefore[month])\n\t}\n\n\tmonth++ // because January is 1\n\tday = day - begin + 1\n\treturn\n}\n\n// daysBefore[m] counts the number of days in a non-leap year\n// before month m begins.  There is an entry for m=12, counting\n// the number of days before January of next year (365).\nvar daysBefore = [...]int32{\n\t0,\n\t31,\n\t31 + 28,\n\t31 + 28 + 31,\n\t31 + 28 + 31 + 30,\n\t31 + 28 + 31 + 30 + 31,\n\t31 + 28 + 31 + 30 + 31 + 30,\n\t31 + 28 + 31 + 30 + 31 + 30 + 31,\n\t31 + 28 + 31 + 30 + 31 + 30 + 31 + 31,\n\t31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30,\n\t31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31,\n\t31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30,\n\t31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30 + 31,\n}\n\nfunc daysIn(m Month, year int) int {\n\tif m == February && isLeap(year) {\n\t\treturn 29\n\t}\n\treturn int(daysBefore[m] - daysBefore[m-1])\n}\n\n// Provided by package runtime.\nfunc now() (sec int64, nsec int32)\n\n// Now returns the current local time.\nfunc Now() Time {\n\tsec, nsec := now()\n\treturn Time{sec + unixToInternal, nsec, Local}\n}\n\n// UTC returns t with the location set to UTC.\nfunc (t Time) UTC() Time {\n\tt.loc = UTC\n\treturn t\n}\n\n// Local returns t with the location set to local time.\nfunc (t Time) Local() Time {\n\tt.loc = Local\n\treturn t\n}\n\n// In returns t with the location information set to loc.\n//\n// In panics if loc is nil.\nfunc (t Time) In(loc *Location) Time {\n\tif loc == nil {\n\t\tpanic(\"time: missing Location in call to Time.In\")\n\t}\n\tt.loc = loc\n\treturn t\n}\n\n// Location returns the time zone information associated with t.\nfunc (t Time) Location() *Location {\n\tl := t.loc\n\tif l == nil {\n\t\tl = UTC\n\t}\n\treturn l\n}\n\n// Zone computes the time zone in effect at time t, returning the abbreviated\n// name of the zone (such as \"CET\") and its offset in seconds east of UTC.\nfunc (t Time) Zone() (name string, offset int) {\n\tname, offset, _, _, _ = t.loc.lookup(t.sec + internalToUnix)\n\treturn\n}\n\n// Unix returns t as a Unix time, the number of seconds elapsed\n// since January 1, 1970 UTC.\nfunc (t Time) Unix() int64 {\n\treturn t.sec + internalToUnix\n}\n\n// UnixNano returns t as a Unix time, the number of nanoseconds elapsed\n// since January 1, 1970 UTC. The result is undefined if the Unix time\n// in nanoseconds cannot be represented by an int64. Note that this\n// means the result of calling UnixNano on the zero Time is undefined.\nfunc (t Time) UnixNano() int64 {\n\treturn (t.sec+internalToUnix)*1e9 + int64(t.nsec)\n}\n\nconst timeBinaryVersion byte = 1\n\n// MarshalBinary implements the encoding.BinaryMarshaler interface.\nfunc (t Time) MarshalBinary() ([]byte, error) {\n\tvar offsetMin int16 // minutes east of UTC. -1 is UTC.\n\n\tif t.Location() == &utcLoc {\n\t\toffsetMin = -1\n\t} else {\n\t\t_, offset := t.Zone()\n\t\tif offset%60 != 0 {\n\t\t\treturn nil, errors.New(\"Time.MarshalBinary: zone offset has fractional minute\")\n\t\t}\n\t\toffset /= 60\n\t\tif offset < -32768 || offset == -1 || offset > 32767 {\n\t\t\treturn nil, errors.New(\"Time.MarshalBinary: unexpected zone offset\")\n\t\t}\n\t\toffsetMin = int16(offset)\n\t}\n\n\tenc := []byte{\n\t\ttimeBinaryVersion, // byte 0 : version\n\t\tbyte(t.sec >> 56), // bytes 1-8: seconds\n\t\tbyte(t.sec >> 48),\n\t\tbyte(t.sec >> 40),\n\t\tbyte(t.sec >> 32),\n\t\tbyte(t.sec >> 24),\n\t\tbyte(t.sec >> 16),\n\t\tbyte(t.sec >> 8),\n\t\tbyte(t.sec),\n\t\tbyte(t.nsec >> 24), // bytes 9-12: nanoseconds\n\t\tbyte(t.nsec >> 16),\n\t\tbyte(t.nsec >> 8),\n\t\tbyte(t.nsec),\n\t\tbyte(offsetMin >> 8), // bytes 13-14: zone offset in minutes\n\t\tbyte(offsetMin),\n\t}\n\n\treturn enc, nil\n}\n\n// UnmarshalBinary implements the encoding.BinaryUnmarshaler interface.\nfunc (t *Time) UnmarshalBinary(data []byte) error {\n\tbuf := data\n\tif len(buf) == 0 {\n\t\treturn errors.New(\"Time.UnmarshalBinary: no data\")\n\t}\n\n\tif buf[0] != timeBinaryVersion {\n\t\treturn errors.New(\"Time.UnmarshalBinary: unsupported version\")\n\t}\n\n\tif len(buf) != /*version*/ 1+ /*sec*/ 8+ /*nsec*/ 4+ /*zone offset*/ 2 {\n\t\treturn errors.New(\"Time.UnmarshalBinary: invalid length\")\n\t}\n\n\tbuf = buf[1:]\n\tt.sec = int64(buf[7]) | int64(buf[6])<<8 | int64(buf[5])<<16 | int64(buf[4])<<24 |\n\t\tint64(buf[3])<<32 | int64(buf[2])<<40 | int64(buf[1])<<48 | int64(buf[0])<<56\n\n\tbuf = buf[8:]\n\tt.nsec = int32(buf[3]) | int32(buf[2])<<8 | int32(buf[1])<<16 | int32(buf[0])<<24\n\n\tbuf = buf[4:]\n\toffset := int(int16(buf[1])|int16(buf[0])<<8) * 60\n\n\tif offset == -1*60 {\n\t\tt.loc = &utcLoc\n\t} else if _, localoff, _, _, _ := Local.lookup(t.sec + internalToUnix); offset == localoff {\n\t\tt.loc = Local\n\t} else {\n\t\tt.loc = FixedZone(\"\", offset)\n\t}\n\n\treturn nil\n}\n\n// TODO(rsc): Remove GobEncoder, GobDecoder, MarshalJSON, UnmarshalJSON in Go 2.\n// The same semantics will be provided by the generic MarshalBinary, MarshalText,\n// UnmarshalBinary, UnmarshalText.\n\n// GobEncode implements the gob.GobEncoder interface.\nfunc (t Time) GobEncode() ([]byte, error) {\n\treturn t.MarshalBinary()\n}\n\n// GobDecode implements the gob.GobDecoder interface.\nfunc (t *Time) GobDecode(data []byte) error {\n\treturn t.UnmarshalBinary(data)\n}\n\n// MarshalJSON implements the json.Marshaler interface.\n// The time is a quoted string in RFC 3339 format, with sub-second precision added if present.\nfunc (t Time) MarshalJSON() ([]byte, error) {\n\tif y := t.Year(); y < 0 || y >= 10000 {\n\t\t// RFC 3339 is clear that years are 4 digits exactly.\n\t\t// See golang.org/issue/4556#c15 for more discussion.\n\t\treturn nil, errors.New(\"Time.MarshalJSON: year outside of range [0,9999]\")\n\t}\n\treturn []byte(t.Format(`\"` + RFC3339Nano + `\"`)), nil\n}\n\n// UnmarshalJSON implements the json.Unmarshaler interface.\n// The time is expected to be a quoted string in RFC 3339 format.\nfunc (t *Time) UnmarshalJSON(data []byte) (err error) {\n\t// Fractional seconds are handled implicitly by Parse.\n\t*t, err = Parse(`\"`+RFC3339+`\"`, string(data))\n\treturn\n}\n\n// MarshalText implements the encoding.TextMarshaler interface.\n// The time is formatted in RFC 3339 format, with sub-second precision added if present.\nfunc (t Time) MarshalText() ([]byte, error) {\n\tif y := t.Year(); y < 0 || y >= 10000 {\n\t\treturn nil, errors.New(\"Time.MarshalText: year outside of range [0,9999]\")\n\t}\n\treturn []byte(t.Format(RFC3339Nano)), nil\n}\n\n// UnmarshalText implements the encoding.TextUnmarshaler interface.\n// The time is expected to be in RFC 3339 format.\nfunc (t *Time) UnmarshalText(data []byte) (err error) {\n\t// Fractional seconds are handled implicitly by Parse.\n\t*t, err = Parse(RFC3339, string(data))\n\treturn\n}\n\n// Unix returns the local Time corresponding to the given Unix time,\n// sec seconds and nsec nanoseconds since January 1, 1970 UTC.\n// It is valid to pass nsec outside the range [0, 999999999].\nfunc Unix(sec int64, nsec int64) Time {\n\tif nsec < 0 || nsec >= 1e9 {\n\t\tn := nsec / 1e9\n\t\tsec += n\n\t\tnsec -= n * 1e9\n\t\tif nsec < 0 {\n\t\t\tnsec += 1e9\n\t\t\tsec--\n\t\t}\n\t}\n\treturn Time{sec + unixToInternal, int32(nsec), Local}\n}\n\nfunc isLeap(year int) bool {\n\treturn year%4 == 0 && (year%100 != 0 || year%400 == 0)\n}\n\n// norm returns nhi, nlo such that\n//\thi * base + lo == nhi * base + nlo\n//\t0 <= nlo < base\nfunc norm(hi, lo, base int) (nhi, nlo int) {\n\tif lo < 0 {\n\t\tn := (-lo-1)/base + 1\n\t\thi -= n\n\t\tlo += n * base\n\t}\n\tif lo >= base {\n\t\tn := lo / base\n\t\thi += n\n\t\tlo -= n * base\n\t}\n\treturn hi, lo\n}\n\n// Date returns the Time corresponding to\n//\tyyyy-mm-dd hh:mm:ss + nsec nanoseconds\n// in the appropriate zone for that time in the given location.\n//\n// The month, day, hour, min, sec, and nsec values may be outside\n// their usual ranges and will be normalized during the conversion.\n// For example, October 32 converts to November 1.\n//\n// A daylight savings time transition skips or repeats times.\n// For example, in the United States, March 13, 2011 2:15am never occurred,\n// while November 6, 2011 1:15am occurred twice.  In such cases, the\n// choice of time zone, and therefore the time, is not well-defined.\n// Date returns a time that is correct in one of the two zones involved\n// in the transition, but it does not guarantee which.\n//\n// Date panics if loc is nil.\nfunc Date(year int, month Month, day, hour, min, sec, nsec int, loc *Location) Time {\n\tif loc == nil {\n\t\tpanic(\"time: missing Location in call to Date\")\n\t}\n\n\t// Normalize month, overflowing into year.\n\tm := int(month) - 1\n\tyear, m = norm(year, m, 12)\n\tmonth = Month(m) + 1\n\n\t// Normalize nsec, sec, min, hour, overflowing into day.\n\tsec, nsec = norm(sec, nsec, 1e9)\n\tmin, sec = norm(min, sec, 60)\n\thour, min = norm(hour, min, 60)\n\tday, hour = norm(day, hour, 24)\n\n\ty := uint64(int64(year) - absoluteZeroYear)\n\n\t// Compute days since the absolute epoch.\n\n\t// Add in days from 400-year cycles.\n\tn := y / 400\n\ty -= 400 * n\n\td := daysPer400Years * n\n\n\t// Add in 100-year cycles.\n\tn = y / 100\n\ty -= 100 * n\n\td += daysPer100Years * n\n\n\t// Add in 4-year cycles.\n\tn = y / 4\n\ty -= 4 * n\n\td += daysPer4Years * n\n\n\t// Add in non-leap years.\n\tn = y\n\td += 365 * n\n\n\t// Add in days before this month.\n\td += uint64(daysBefore[month-1])\n\tif isLeap(year) && month >= March {\n\t\td++ // February 29\n\t}\n\n\t// Add in days before today.\n\td += uint64(day - 1)\n\n\t// Add in time elapsed today.\n\tabs := d * secondsPerDay\n\tabs += uint64(hour*secondsPerHour + min*secondsPerMinute + sec)\n\n\tunix := int64(abs) + (absoluteToInternal + internalToUnix)\n\n\t// Look for zone offset for t, so we can adjust to UTC.\n\t// The lookup function expects UTC, so we pass t in the\n\t// hope that it will not be too close to a zone transition,\n\t// and then adjust if it is.\n\t_, offset, _, start, end := loc.lookup(unix)\n\tif offset != 0 {\n\t\tswitch utc := unix - int64(offset); {\n\t\tcase utc < start:\n\t\t\t_, offset, _, _, _ = loc.lookup(start - 1)\n\t\tcase utc >= end:\n\t\t\t_, offset, _, _, _ = loc.lookup(end)\n\t\t}\n\t\tunix -= int64(offset)\n\t}\n\n\treturn Time{unix + unixToInternal, int32(nsec), loc}\n}\n\n// Truncate returns the result of rounding t down to a multiple of d (since the zero time).\n// If d <= 0, Truncate returns t unchanged.\nfunc (t Time) Truncate(d Duration) Time {\n\tif d <= 0 {\n\t\treturn t\n\t}\n\t_, r := div(t, d)\n\treturn t.Add(-r)\n}\n\n// Round returns the result of rounding t to the nearest multiple of d (since the zero time).\n// The rounding behavior for halfway values is to round up.\n// If d <= 0, Round returns t unchanged.\nfunc (t Time) Round(d Duration) Time {\n\tif d <= 0 {\n\t\treturn t\n\t}\n\t_, r := div(t, d)\n\tif r+r < d {\n\t\treturn t.Add(-r)\n\t}\n\treturn t.Add(d - r)\n}\n\n// div divides t by d and returns the quotient parity and remainder.\n// We don't use the quotient parity anymore (round half up instead of round to even)\n// but it's still here in case we change our minds.\nfunc div(t Time, d Duration) (qmod2 int, r Duration) {\n\tneg := false\n\tnsec := int32(t.nsec)\n\tif t.sec < 0 {\n\t\t// Operate on absolute value.\n\t\tneg = true\n\t\tt.sec = -t.sec\n\t\tnsec = -nsec\n\t\tif nsec < 0 {\n\t\t\tnsec += 1e9\n\t\t\tt.sec-- // t.sec >= 1 before the -- so safe\n\t\t}\n\t}\n\n\tswitch {\n\t// Special case: 2d divides 1 second.\n\tcase d < Second && Second%(d+d) == 0:\n\t\tqmod2 = int(nsec/int32(d)) & 1\n\t\tr = Duration(nsec % int32(d))\n\n\t// Special case: d is a multiple of 1 second.\n\tcase d%Second == 0:\n\t\td1 := int64(d / Second)\n\t\tqmod2 = int(t.sec/d1) & 1\n\t\tr = Duration(t.sec%d1)*Second + Duration(nsec)\n\n\t// General case.\n\t// This could be faster if more cleverness were applied,\n\t// but it's really only here to avoid special case restrictions in the API.\n\t// No one will care about these cases.\n\tdefault:\n\t\t// Compute nanoseconds as 128-bit number.\n\t\tsec := uint64(t.sec)\n\t\ttmp := (sec >> 32) * 1e9\n\t\tu1 := tmp >> 32\n\t\tu0 := tmp << 32\n\t\ttmp = uint64(sec&0xFFFFFFFF) * 1e9\n\t\tu0x, u0 := u0, u0+tmp\n\t\tif u0 < u0x {\n\t\t\tu1++\n\t\t}\n\t\tu0x, u0 = u0, u0+uint64(nsec)\n\t\tif u0 < u0x {\n\t\t\tu1++\n\t\t}\n\n\t\t// Compute remainder by subtracting r<<k for decreasing k.\n\t\t// Quotient parity is whether we subtract on last round.\n\t\td1 := uint64(d)\n\t\tfor d1>>63 != 1 {\n\t\t\td1 <<= 1\n\t\t}\n\t\td0 := uint64(0)\n\t\tfor {\n\t\t\tqmod2 = 0\n\t\t\tif u1 > d1 || u1 == d1 && u0 >= d0 {\n\t\t\t\t// subtract\n\t\t\t\tqmod2 = 1\n\t\t\t\tu0x, u0 = u0, u0-d0\n\t\t\t\tif u0 > u0x {\n\t\t\t\t\tu1--\n\t\t\t\t}\n\t\t\t\tu1 -= d1\n\t\t\t}\n\t\t\tif d1 == 0 && d0 == uint64(d) {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\td0 >>= 1\n\t\t\td0 |= (d1 & 1) << 63\n\t\t\td1 >>= 1\n\t\t}\n\t\tr = Duration(u0)\n\t}\n\n\tif neg && r != 0 {\n\t\t// If input was negative and not an exact multiple of d, we computed q, r such that\n\t\t//\tq*d + r = -t\n\t\t// But the right answers are given by -(q-1), d-r:\n\t\t//\tq*d + r = -t\n\t\t//\t-q*d - r = t\n\t\t//\t-(q-1)*d + (d - r) = t\n\t\tqmod2 ^= 1\n\t\tr = d - r\n\t}\n\treturn\n}\n"
  },
  {
    "path": "testData/mockSdk-1.1.2/src/pkg/unsafe/unsafe.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n/*\n\tPackage unsafe contains operations that step around the type safety of Go programs.\n\n\tPackages that import unsafe may be non-portable and are not protected by the\n\tGo 1 compatibility guidelines.\n*/\npackage unsafe\n\n// ArbitraryType is here for the purposes of documentation only and is not actually\n// part of the unsafe package.  It represents the type of an arbitrary Go expression.\ntype ArbitraryType int\n\n// Pointer represents a pointer to an arbitrary type.  There are four special operations\n// available for type Pointer that are not available for other types.\n//\t1) A pointer value of any type can be converted to a Pointer.\n//\t2) A Pointer can be converted to a pointer value of any type.\n//\t3) A uintptr can be converted to a Pointer.\n//\t4) A Pointer can be converted to a uintptr.\n// Pointer therefore allows a program to defeat the type system and read and write\n// arbitrary memory. It should be used with extreme care.\ntype Pointer *ArbitraryType\n\n// Sizeof returns the size in bytes occupied by the value v.  The size is that of the\n// \"top level\" of the value only.  For instance, if v is a slice, it returns the size of\n// the slice descriptor, not the size of the memory referenced by the slice.\nfunc Sizeof(v ArbitraryType) uintptr\n\n// Offsetof returns the offset within the struct of the field represented by v,\n// which must be of the form structValue.field.  In other words, it returns the\n// number of bytes between the start of the struct and the start of the field.\nfunc Offsetof(v ArbitraryType) uintptr\n\n// Alignof returns the alignment of the value v.  It is the maximum value m such\n// that the address of a variable with the type of v will always be zero mod m.\n// If v is of the form structValue.field, it returns the alignment of field f within struct object obj.\nfunc Alignof(v ArbitraryType) uintptr\n"
  },
  {
    "path": "testData/mockSdk-1.1.2/src/pkg/withmain/main_package.go",
    "content": "package main"
  },
  {
    "path": "testData/mockSdk-1.1.2/src/pkg/withmain/not_main_package.go",
    "content": "package withmain\n\ntype SomeType struct {\n}"
  },
  {
    "path": "testData/parameterInfo/chainedCall.go",
    "content": "package main\n\ntype (\nds1 struct {\n}\n\nds2 struct {\n\n}\n)\n\nfunc (d ds1) d1(param1 string, param2 int) ds2 {\n    return ds2{}\n}\n\nfunc (d ds2) d2(param1 string, param2 int) int {\n    return 1\n}\n\nfunc main() {\n    d := ds1{}\n    d.d1(\"1\", 2).d2(<caret>)\n}"
  },
  {
    "path": "testData/parameterInfo/closure.go",
    "content": "package main\n\nfunc main() {\n\tgo func(param1, param2 string) (return1, return2 string) {\n\t\treturn param1, param2\n\t}(\"1\", <caret>)\n}\n"
  },
  {
    "path": "testData/parameterInfo/fieldMethCall.go",
    "content": "package main\n\ntype Outer struct {\n    inner Inner\n}\n\ntype Inner struct {}\n\nfunc (i* Inner) f(a, b int) {}\n\nfunc (o* Outer) Test() {\n    o.inner.f(<caret>)\n}\n"
  },
  {
    "path": "testData/parameterInfo/funcEmbedInner.go",
    "content": "package foo\n\nfunc bar(num int, text string) {\n}\n\nfunc blah(a, b, c, d int) int {\n\treturn a + b\n}\n\nfunc test() {\n\tblah(1, 2, bar(3, <caret>), 4)\n}\n\n"
  },
  {
    "path": "testData/parameterInfo/funcEmbedOuter.go",
    "content": "package foo\n\nfunc bar(num int, text string) {\n}\n\nfunc blah(a, b, c, d int) int {\n\treturn a + b\n}\n\nfunc test() {\n\tblah(1, 2, ba<caret>r(3, ), 4)\n}\n\n"
  },
  {
    "path": "testData/parameterInfo/funcParam.go",
    "content": "package foo\n\nfunc bar(num int, text string) {\n}\n\nfunc test() {\n\tbar(1, <caret>)\n}\n\n"
  },
  {
    "path": "testData/parameterInfo/funcParamEllipsis.go",
    "content": "package foo\n\nfunc bar(num int, text string, more ...int) {\n}\n\nfunc test() {\n\tbar(1, \"text\", 2, 3, 4, <caret>)\n}\n\n"
  },
  {
    "path": "testData/parameterInfo/funcParamMulti.go",
    "content": "package foo\n\nfunc bar(a, b, c int, d, e, f string) {\n}\n\nfunc test() {\n\tbar(1, 2, 3, \"4\", <caret>)\n}\n\n"
  },
  {
    "path": "testData/parameterInfo/funcParamNone.go",
    "content": "package foo\n\nfunc bar() {\n}\n\nfunc test() {\n\tbar(<caret>)\n}\n\n"
  },
  {
    "path": "testData/parameterInfo/funcTypes.go",
    "content": "package main\n\nfunc main() {\n\tv := ReturnsFunc(\"1\")(10)(\"<caret>\")\n}\n\nfunc ReturnsFunc(s string) func (int) func(string) string {\n\treturn func (i int) func(string) string {\n\t\treturn func (foo string) string {\n\t\t\treturn \"ola\"\n\t\t}\n\t}\n}"
  },
  {
    "path": "testData/parameterInfo/functionTypeByRef.go",
    "content": "package main\n\nimport (\n\t\"fmt\"\n\t\"reflect\"\n)\n\ntype b func(intParam int)\ntype a b\n\nfunc c() {\n\taFunc := generateFunc()\n\tif f, ok := aFunc.(a); ok {\n\t\tfmt.Println(reflect.TypeOf(f))\n\t\tf(<caret>)\n\t}\n}\n\nfunc generateFunc() interface{} {\n\treturn a(func (intParam int) { })\n}\n\nfunc main() {\n\tc()\n}\n"
  },
  {
    "path": "testData/parameterInfo/methParam.go",
    "content": "package foo\n\ntype Dummy struct {\n\ta int\n}\n\nfunc (d* Dummy) bar(num int, text string) {\n}\n\nfunc test() {\n\td := new(Dummy)\n\td.bar(1, <caret>)\n}\n\n"
  },
  {
    "path": "testData/parameterInfo/methParamEllipsis.go",
    "content": "package foo\n\ntype Dummy int\n\nfunc (d *Dummy) bar(num int, text string, more ...int) {\n}\n\nfunc test() {\n\td := new(Dummy)\n\td.bar(1, \"text\", 2, 3, 4, <caret>)\n}\n\n"
  },
  {
    "path": "testData/parameterInfo/methParamNone.go",
    "content": "package foo\n\ntype Dummy int\n\nfunc (d *Dummy) bar() {\n}\n\nfunc test() {\n\td := new(Dummy)\n\td.bar(<caret>)\n}\n\n"
  },
  {
    "path": "testData/parameterInfo/unnamedAndNamedParameters.go",
    "content": "package foo\n\ntype Registry interface {\n  Register(a string, interface{})\n}\n\nfunc (r Registry) bar() {\n  r.Register(<caret>)\n}"
  },
  {
    "path": "testData/parameterInfo/unnamedParameters.go",
    "content": "package foo\n\ntype Registry interface {\n  Register(string, interface{})\n}\n\nfunc (r Registry) bar() {\n  r.Register(<caret>)\n}"
  },
  {
    "path": "testData/parser/ArrayTypes.go",
    "content": "package pem\n\n\nfunc Encode() error {\n\tif err := Write([]byte(1)); err != nil {\n\t}\n\t\t\n\tif len > 0 { \n\t}\n}"
  },
  {
    "path": "testData/parser/ArrayTypes.txt",
    "content": "GO_FILE\n  PACKAGE_CLAUSE\n    PsiElement(package)('package')\n    PsiElement(identifier)('pem')\n  IMPORT_LIST\n    <empty list>\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('Encode')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n      RESULT\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('error')\n    BLOCK\n      PsiElement({)('{')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          SHORT_VAR_DECLARATION\n            VAR_DEFINITION\n              PsiElement(identifier)('err')\n            PsiElement(:=)(':=')\n            CALL_EXPR\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('Write')\n              ARGUMENT_LIST\n                PsiElement(()('(')\n                CONVERSION_EXPR\n                  ARRAY_OR_SLICE_TYPE\n                    PsiElement([)('[')\n                    PsiElement(])(']')\n                    TYPE\n                      TYPE_REFERENCE_EXPRESSION\n                        PsiElement(identifier)('byte')\n                  PsiElement(()('(')\n                  LITERAL\n                    PsiElement(int)('1')\n                  PsiElement())(')')\n                PsiElement())(')')\n        PsiElement(;)(';')\n        CONDITIONAL_EXPR\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('err')\n          PsiElement(!=)('!=')\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('nil')\n        BLOCK\n          PsiElement({)('{')\n          PsiElement(})('}')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            CONDITIONAL_EXPR\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('len')\n              PsiElement(>)('>')\n              LITERAL\n                PsiElement(int)('0')\n        BLOCK\n          PsiElement({)('{')\n          PsiElement(})('}')\n      PsiElement(})('}')"
  },
  {
    "path": "testData/parser/ArrayTypesInRanges.go",
    "content": "package main\n\ntype File struct {\n}\n\nfunc main() {\n    for _ = range []File{} {\n    }\n}"
  },
  {
    "path": "testData/parser/ArrayTypesInRanges.txt",
    "content": "GO_FILE\n  PACKAGE_CLAUSE\n    PsiElement(package)('package')\n    PsiElement(identifier)('main')\n  IMPORT_LIST\n    <empty list>\n  TYPE_DECLARATION\n    PsiElement(type)('type')\n    TYPE_SPEC\n      SPEC_TYPE\n        PsiElement(identifier)('File')\n        STRUCT_TYPE\n          PsiElement(struct)('struct')\n          PsiElement({)('{')\n          PsiElement(})('}')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('main')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      FOR_STATEMENT\n        PsiElement(for)('for')\n        RANGE_CLAUSE\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('_')\n          PsiElement(=)('=')\n          PsiElement(range)('range')\n          COMPOSITE_LIT\n            ARRAY_OR_SLICE_TYPE\n              PsiElement([)('[')\n              PsiElement(])(']')\n              TYPE\n                TYPE_REFERENCE_EXPRESSION\n                  PsiElement(identifier)('File')\n            LITERAL_VALUE\n              PsiElement({)('{')\n              PsiElement(})('}')\n        BLOCK\n          PsiElement({)('{')\n          PsiElement(})('}')\n      PsiElement(})('}')"
  },
  {
    "path": "testData/parser/BlockRecover.go",
    "content": "package main\n\nfunc main() {\n  test( asd  asd)\n  test()\n  asd)\n  test()\n}\n\nfunc test() {\n}"
  },
  {
    "path": "testData/parser/BlockRecover.txt",
    "content": "GO_FILE\n  PACKAGE_CLAUSE\n    PsiElement(package)('package')\n    PsiElement(identifier)('main')\n  IMPORT_LIST\n    <empty list>\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('main')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('test')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('asd')\n              PsiErrorElement:')', ',' or '...' expected, got 'asd'\n                <empty list>\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('asd')\n      PsiErrorElement:',', ';', <-, <NL>, <assign op> or '}' expected, got ')'\n        PsiElement())(')')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('test')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              PsiElement())(')')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('asd')\n      PsiErrorElement:',', ';', <-, <NL>, <assign op> or '}' expected, got ')'\n        PsiElement())(')')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('test')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              PsiElement())(')')\n      PsiElement(})('}')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('test')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      PsiElement(})('}')"
  },
  {
    "path": "testData/parser/Cars.go",
    "content": "package main\n\nimport \"fmt\"\n\ntype Car struct { wheelCount int }\nfunc (car Car) numberOfWheels() int { return car.wheelCount }\n\ntype Ferrari struct { Car }\n\nfunc (f Ferrari) sayHiToSchumacher() { fmt.Println(\"Hi Schumacher!\") }\n\ntype AstonMartin struct { Car }\n\nfunc (a AstonMartin) sayHiToBond() { fmt.Println(\"Hi Bond, James Bond!\") }\n\nfunc main() {\n    f := Ferrari{Car{4}}\n    fmt.Println(\"A Ferrari has this many wheels: \", f.numberOfWheels()) //has car behavior\n    f.sayHiToSchumacher() //has Ferrari behavior\n\n    a := AstonMartin{Car{4}}\n    fmt.Println(\"An Aston Martin has this many wheels: \", a.numberOfWheels()) //has car behavior\n    a.sayHiToBond() //has AstonMartin behavior\n}"
  },
  {
    "path": "testData/parser/Cars.txt",
    "content": "GO_FILE\n  PACKAGE_CLAUSE\n    PsiElement(package)('package')\n    PsiElement(identifier)('main')\n  IMPORT_LIST\n    IMPORT_DECLARATION\n      PsiElement(import)('import')\n      IMPORT_SPEC\n        IMPORT_STRING\n          STRING_LITERAL\n            PsiElement(string)('\"fmt\"')\n  TYPE_DECLARATION\n    PsiElement(type)('type')\n    TYPE_SPEC\n      SPEC_TYPE\n        PsiElement(identifier)('Car')\n        STRUCT_TYPE\n          PsiElement(struct)('struct')\n          PsiElement({)('{')\n          FIELD_DECLARATION\n            FIELD_DEFINITION\n              PsiElement(identifier)('wheelCount')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('int')\n          PsiElement(})('}')\n  METHOD_DECLARATION\n    PsiElement(func)('func')\n    RECEIVER\n      PsiElement(()('(')\n      PsiElement(identifier)('car')\n      TYPE\n        TYPE_REFERENCE_EXPRESSION\n          PsiElement(identifier)('Car')\n      PsiElement())(')')\n    PsiElement(identifier)('numberOfWheels')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n      RESULT\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('int')\n    BLOCK\n      PsiElement({)('{')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n        REFERENCE_EXPRESSION\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('car')\n          PsiElement(.)('.')\n          PsiElement(identifier)('wheelCount')\n      PsiElement(})('}')\n  TYPE_DECLARATION\n    PsiElement(type)('type')\n    TYPE_SPEC\n      SPEC_TYPE\n        PsiElement(identifier)('Ferrari')\n        STRUCT_TYPE\n          PsiElement(struct)('struct')\n          PsiElement({)('{')\n          FIELD_DECLARATION\n            ANONYMOUS_FIELD_DEFINITION\n              TYPE\n                TYPE_REFERENCE_EXPRESSION\n                  PsiElement(identifier)('Car')\n          PsiElement(})('}')\n  METHOD_DECLARATION\n    PsiElement(func)('func')\n    RECEIVER\n      PsiElement(()('(')\n      PsiElement(identifier)('f')\n      TYPE\n        TYPE_REFERENCE_EXPRESSION\n          PsiElement(identifier)('Ferrari')\n      PsiElement())(')')\n    PsiElement(identifier)('sayHiToSchumacher')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('fmt')\n              PsiElement(.)('.')\n              PsiElement(identifier)('Println')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              STRING_LITERAL\n                PsiElement(string)('\"Hi Schumacher!\"')\n              PsiElement())(')')\n      PsiElement(})('}')\n  TYPE_DECLARATION\n    PsiElement(type)('type')\n    TYPE_SPEC\n      SPEC_TYPE\n        PsiElement(identifier)('AstonMartin')\n        STRUCT_TYPE\n          PsiElement(struct)('struct')\n          PsiElement({)('{')\n          FIELD_DECLARATION\n            ANONYMOUS_FIELD_DEFINITION\n              TYPE\n                TYPE_REFERENCE_EXPRESSION\n                  PsiElement(identifier)('Car')\n          PsiElement(})('}')\n  METHOD_DECLARATION\n    PsiElement(func)('func')\n    RECEIVER\n      PsiElement(()('(')\n      PsiElement(identifier)('a')\n      TYPE\n        TYPE_REFERENCE_EXPRESSION\n          PsiElement(identifier)('AstonMartin')\n      PsiElement())(')')\n    PsiElement(identifier)('sayHiToBond')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('fmt')\n              PsiElement(.)('.')\n              PsiElement(identifier)('Println')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              STRING_LITERAL\n                PsiElement(string)('\"Hi Bond, James Bond!\"')\n              PsiElement())(')')\n      PsiElement(})('}')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('main')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('f')\n          PsiElement(:=)(':=')\n          COMPOSITE_LIT\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('Ferrari')\n            LITERAL_VALUE\n              PsiElement({)('{')\n              ELEMENT\n                VALUE\n                  COMPOSITE_LIT\n                    TYPE_REFERENCE_EXPRESSION\n                      PsiElement(identifier)('Car')\n                    LITERAL_VALUE\n                      PsiElement({)('{')\n                      ELEMENT\n                        VALUE\n                          LITERAL\n                            PsiElement(int)('4')\n                      PsiElement(})('}')\n              PsiElement(})('}')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('fmt')\n              PsiElement(.)('.')\n              PsiElement(identifier)('Println')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              STRING_LITERAL\n                PsiElement(string)('\"A Ferrari has this many wheels: \"')\n              PsiElement(,)(',')\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('f')\n                  PsiElement(.)('.')\n                  PsiElement(identifier)('numberOfWheels')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  PsiElement())(')')\n              PsiElement())(')')\n      PsiComment(GO_LINE_COMMENT)('//has car behavior')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('f')\n              PsiElement(.)('.')\n              PsiElement(identifier)('sayHiToSchumacher')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              PsiElement())(')')\n      PsiComment(GO_LINE_COMMENT)('//has Ferrari behavior')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('a')\n          PsiElement(:=)(':=')\n          COMPOSITE_LIT\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('AstonMartin')\n            LITERAL_VALUE\n              PsiElement({)('{')\n              ELEMENT\n                VALUE\n                  COMPOSITE_LIT\n                    TYPE_REFERENCE_EXPRESSION\n                      PsiElement(identifier)('Car')\n                    LITERAL_VALUE\n                      PsiElement({)('{')\n                      ELEMENT\n                        VALUE\n                          LITERAL\n                            PsiElement(int)('4')\n                      PsiElement(})('}')\n              PsiElement(})('}')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('fmt')\n              PsiElement(.)('.')\n              PsiElement(identifier)('Println')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              STRING_LITERAL\n                PsiElement(string)('\"An Aston Martin has this many wheels: \"')\n              PsiElement(,)(',')\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('a')\n                  PsiElement(.)('.')\n                  PsiElement(identifier)('numberOfWheels')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  PsiElement())(')')\n              PsiElement())(')')\n      PsiComment(GO_LINE_COMMENT)('//has car behavior')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('a')\n              PsiElement(.)('.')\n              PsiElement(identifier)('sayHiToBond')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              PsiElement())(')')\n      PsiComment(GO_LINE_COMMENT)('//has AstonMartin behavior')\n      PsiElement(})('}')"
  },
  {
    "path": "testData/parser/ChanRecover.go",
    "content": "package n\n\nfunc f() {\n\t// test case from issue 13273\n\t<-chan int((chan int)(nil))\n\n\t<-chan int(nil)\n\t<-chan chan int(nil)\n\t<-chan chan chan int(nil)\n\t<-chan chan chan chan int(nil)\n\t<-chan chan chan chan chan int(nil)\n\n\t<-chan <-chan int(nil)\n\t<-chan <-chan <-chan int(nil)\n\t<-chan <-chan <-chan <-chan int(nil)\n\t<-chan <-chan <-chan <-chan <-chan int(nil)\n\n\t<-chan (<-chan int)(nil)\n\t<-chan (<-chan (<-chan int))(nil)\n\t<-chan (<-chan (<-chan (<-chan int)))(nil)\n\t<-chan (<-chan (<-chan (<-chan (<-chan int))))(nil)\n\n\t<-(<-chan int)(nil)\n\t<-(<-chan chan int)(nil)\n\t<-(<-chan chan chan int)(nil)\n\t<-(<-chan chan chan chan int)(nil)\n\t<-(<-chan chan chan chan chan int)(nil)\n\n\t<-(<-chan <-chan int)(nil)\n\t<-(<-chan <-chan <-chan int)(nil)\n\t<-(<-chan <-chan <-chan <-chan int)(nil)\n\t<-(<-chan <-chan <-chan <-chan <-chan int)(nil)\n\n\t<-(<-chan (<-chan int))(nil)\n\t<-(<-chan (<-chan (<-chan int)))(nil)\n\t<-(<-chan (<-chan (<-chan (<-chan int))))(nil)\n\t<-(<-chan (<-chan (<-chan (<-chan (<-chan int)))))(nil)\n\n\ttype _ <-<-chan int // ERROR \"unexpected <-, expecting chan\"\n\t<-chan int // ERROR \"unexpected <-, expecting chan|expecting {\" (new parser: same error as for type decl)\n\t<-<-chan int // ERROR \"unexpected <-, expecting chan|expecting {\" (new parser: same error as for type decl)\n\n\ttype _ <-chan <-int // ERROR \"unexpected int, expecting chan|expecting chan\"\n\t<-chan<-int // ERROR \"unexpected int, expecting chan|expecting {\" (new parser: same error as for type decl)\n}"
  },
  {
    "path": "testData/parser/ChanRecover.txt",
    "content": "GO_FILE\n  PACKAGE_CLAUSE\n    PsiElement(package)('package')\n    PsiElement(identifier)('n')\n  IMPORT_LIST\n    <empty list>\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('f')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      PsiComment(GO_LINE_COMMENT)('// test case from issue 13273')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          UNARY_EXPR\n            PsiElement(<-)('<-')\n            CONVERSION_EXPR\n              CHANNEL_TYPE\n                PsiElement(chan)('chan')\n                TYPE\n                  TYPE_REFERENCE_EXPRESSION\n                    PsiElement(identifier)('int')\n              PsiElement(()('(')\n              CONVERSION_EXPR\n                PAR_TYPE\n                  PsiElement(()('(')\n                  CHANNEL_TYPE\n                    PsiElement(chan)('chan')\n                    TYPE\n                      TYPE_REFERENCE_EXPRESSION\n                        PsiElement(identifier)('int')\n                  PsiElement())(')')\n                PsiElement(()('(')\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('nil')\n                PsiElement())(')')\n              PsiElement())(')')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          UNARY_EXPR\n            PsiElement(<-)('<-')\n            CONVERSION_EXPR\n              CHANNEL_TYPE\n                PsiElement(chan)('chan')\n                TYPE\n                  TYPE_REFERENCE_EXPRESSION\n                    PsiElement(identifier)('int')\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('nil')\n              PsiElement())(')')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          UNARY_EXPR\n            PsiElement(<-)('<-')\n            CONVERSION_EXPR\n              CHANNEL_TYPE\n                PsiElement(chan)('chan')\n                CHANNEL_TYPE\n                  PsiElement(chan)('chan')\n                  TYPE\n                    TYPE_REFERENCE_EXPRESSION\n                      PsiElement(identifier)('int')\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('nil')\n              PsiElement())(')')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          UNARY_EXPR\n            PsiElement(<-)('<-')\n            CONVERSION_EXPR\n              CHANNEL_TYPE\n                PsiElement(chan)('chan')\n                CHANNEL_TYPE\n                  PsiElement(chan)('chan')\n                  CHANNEL_TYPE\n                    PsiElement(chan)('chan')\n                    TYPE\n                      TYPE_REFERENCE_EXPRESSION\n                        PsiElement(identifier)('int')\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('nil')\n              PsiElement())(')')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          UNARY_EXPR\n            PsiElement(<-)('<-')\n            CONVERSION_EXPR\n              CHANNEL_TYPE\n                PsiElement(chan)('chan')\n                CHANNEL_TYPE\n                  PsiElement(chan)('chan')\n                  CHANNEL_TYPE\n                    PsiElement(chan)('chan')\n                    CHANNEL_TYPE\n                      PsiElement(chan)('chan')\n                      TYPE\n                        TYPE_REFERENCE_EXPRESSION\n                          PsiElement(identifier)('int')\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('nil')\n              PsiElement())(')')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          UNARY_EXPR\n            PsiElement(<-)('<-')\n            CONVERSION_EXPR\n              CHANNEL_TYPE\n                PsiElement(chan)('chan')\n                CHANNEL_TYPE\n                  PsiElement(chan)('chan')\n                  CHANNEL_TYPE\n                    PsiElement(chan)('chan')\n                    CHANNEL_TYPE\n                      PsiElement(chan)('chan')\n                      CHANNEL_TYPE\n                        PsiElement(chan)('chan')\n                        TYPE\n                          TYPE_REFERENCE_EXPRESSION\n                            PsiElement(identifier)('int')\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('nil')\n              PsiElement())(')')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          UNARY_EXPR\n            PsiElement(<-)('<-')\n            CONVERSION_EXPR\n              CHANNEL_TYPE\n                PsiElement(chan)('chan')\n                PsiElement(<-)('<-')\n                CHANNEL_TYPE\n                  PsiElement(chan)('chan')\n                  TYPE\n                    TYPE_REFERENCE_EXPRESSION\n                      PsiElement(identifier)('int')\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('nil')\n              PsiElement())(')')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          UNARY_EXPR\n            PsiElement(<-)('<-')\n            CONVERSION_EXPR\n              CHANNEL_TYPE\n                PsiElement(chan)('chan')\n                PsiElement(<-)('<-')\n                CHANNEL_TYPE\n                  PsiElement(chan)('chan')\n                  PsiElement(<-)('<-')\n                  CHANNEL_TYPE\n                    PsiElement(chan)('chan')\n                    TYPE\n                      TYPE_REFERENCE_EXPRESSION\n                        PsiElement(identifier)('int')\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('nil')\n              PsiElement())(')')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          UNARY_EXPR\n            PsiElement(<-)('<-')\n            CONVERSION_EXPR\n              CHANNEL_TYPE\n                PsiElement(chan)('chan')\n                PsiElement(<-)('<-')\n                CHANNEL_TYPE\n                  PsiElement(chan)('chan')\n                  PsiElement(<-)('<-')\n                  CHANNEL_TYPE\n                    PsiElement(chan)('chan')\n                    PsiElement(<-)('<-')\n                    CHANNEL_TYPE\n                      PsiElement(chan)('chan')\n                      TYPE\n                        TYPE_REFERENCE_EXPRESSION\n                          PsiElement(identifier)('int')\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('nil')\n              PsiElement())(')')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          UNARY_EXPR\n            PsiElement(<-)('<-')\n            CONVERSION_EXPR\n              CHANNEL_TYPE\n                PsiElement(chan)('chan')\n                PsiElement(<-)('<-')\n                CHANNEL_TYPE\n                  PsiElement(chan)('chan')\n                  PsiElement(<-)('<-')\n                  CHANNEL_TYPE\n                    PsiElement(chan)('chan')\n                    PsiElement(<-)('<-')\n                    CHANNEL_TYPE\n                      PsiElement(chan)('chan')\n                      PsiElement(<-)('<-')\n                      CHANNEL_TYPE\n                        PsiElement(chan)('chan')\n                        TYPE\n                          TYPE_REFERENCE_EXPRESSION\n                            PsiElement(identifier)('int')\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('nil')\n              PsiElement())(')')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          UNARY_EXPR\n            PsiElement(<-)('<-')\n            CONVERSION_EXPR\n              CHANNEL_TYPE\n                PsiElement(chan)('chan')\n                PAR_TYPE\n                  PsiElement(()('(')\n                  CHANNEL_TYPE\n                    PsiElement(<-)('<-')\n                    PsiElement(chan)('chan')\n                    TYPE\n                      TYPE_REFERENCE_EXPRESSION\n                        PsiElement(identifier)('int')\n                  PsiElement())(')')\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('nil')\n              PsiElement())(')')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          UNARY_EXPR\n            PsiElement(<-)('<-')\n            CONVERSION_EXPR\n              CHANNEL_TYPE\n                PsiElement(chan)('chan')\n                PAR_TYPE\n                  PsiElement(()('(')\n                  CHANNEL_TYPE\n                    PsiElement(<-)('<-')\n                    PsiElement(chan)('chan')\n                    PAR_TYPE\n                      PsiElement(()('(')\n                      CHANNEL_TYPE\n                        PsiElement(<-)('<-')\n                        PsiElement(chan)('chan')\n                        TYPE\n                          TYPE_REFERENCE_EXPRESSION\n                            PsiElement(identifier)('int')\n                      PsiElement())(')')\n                  PsiElement())(')')\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('nil')\n              PsiElement())(')')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          UNARY_EXPR\n            PsiElement(<-)('<-')\n            CONVERSION_EXPR\n              CHANNEL_TYPE\n                PsiElement(chan)('chan')\n                PAR_TYPE\n                  PsiElement(()('(')\n                  CHANNEL_TYPE\n                    PsiElement(<-)('<-')\n                    PsiElement(chan)('chan')\n                    PAR_TYPE\n                      PsiElement(()('(')\n                      CHANNEL_TYPE\n                        PsiElement(<-)('<-')\n                        PsiElement(chan)('chan')\n                        PAR_TYPE\n                          PsiElement(()('(')\n                          CHANNEL_TYPE\n                            PsiElement(<-)('<-')\n                            PsiElement(chan)('chan')\n                            TYPE\n                              TYPE_REFERENCE_EXPRESSION\n                                PsiElement(identifier)('int')\n                          PsiElement())(')')\n                      PsiElement())(')')\n                  PsiElement())(')')\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('nil')\n              PsiElement())(')')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          UNARY_EXPR\n            PsiElement(<-)('<-')\n            CONVERSION_EXPR\n              CHANNEL_TYPE\n                PsiElement(chan)('chan')\n                PAR_TYPE\n                  PsiElement(()('(')\n                  CHANNEL_TYPE\n                    PsiElement(<-)('<-')\n                    PsiElement(chan)('chan')\n                    PAR_TYPE\n                      PsiElement(()('(')\n                      CHANNEL_TYPE\n                        PsiElement(<-)('<-')\n                        PsiElement(chan)('chan')\n                        PAR_TYPE\n                          PsiElement(()('(')\n                          CHANNEL_TYPE\n                            PsiElement(<-)('<-')\n                            PsiElement(chan)('chan')\n                            PAR_TYPE\n                              PsiElement(()('(')\n                              CHANNEL_TYPE\n                                PsiElement(<-)('<-')\n                                PsiElement(chan)('chan')\n                                TYPE\n                                  TYPE_REFERENCE_EXPRESSION\n                                    PsiElement(identifier)('int')\n                              PsiElement())(')')\n                          PsiElement())(')')\n                      PsiElement())(')')\n                  PsiElement())(')')\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('nil')\n              PsiElement())(')')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          UNARY_EXPR\n            PsiElement(<-)('<-')\n            CONVERSION_EXPR\n              PAR_TYPE\n                PsiElement(()('(')\n                CHANNEL_TYPE\n                  PsiElement(<-)('<-')\n                  PsiElement(chan)('chan')\n                  TYPE\n                    TYPE_REFERENCE_EXPRESSION\n                      PsiElement(identifier)('int')\n                PsiElement())(')')\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('nil')\n              PsiElement())(')')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          UNARY_EXPR\n            PsiElement(<-)('<-')\n            CONVERSION_EXPR\n              PAR_TYPE\n                PsiElement(()('(')\n                CHANNEL_TYPE\n                  PsiElement(<-)('<-')\n                  PsiElement(chan)('chan')\n                  CHANNEL_TYPE\n                    PsiElement(chan)('chan')\n                    TYPE\n                      TYPE_REFERENCE_EXPRESSION\n                        PsiElement(identifier)('int')\n                PsiElement())(')')\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('nil')\n              PsiElement())(')')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          UNARY_EXPR\n            PsiElement(<-)('<-')\n            CONVERSION_EXPR\n              PAR_TYPE\n                PsiElement(()('(')\n                CHANNEL_TYPE\n                  PsiElement(<-)('<-')\n                  PsiElement(chan)('chan')\n                  CHANNEL_TYPE\n                    PsiElement(chan)('chan')\n                    CHANNEL_TYPE\n                      PsiElement(chan)('chan')\n                      TYPE\n                        TYPE_REFERENCE_EXPRESSION\n                          PsiElement(identifier)('int')\n                PsiElement())(')')\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('nil')\n              PsiElement())(')')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          UNARY_EXPR\n            PsiElement(<-)('<-')\n            CONVERSION_EXPR\n              PAR_TYPE\n                PsiElement(()('(')\n                CHANNEL_TYPE\n                  PsiElement(<-)('<-')\n                  PsiElement(chan)('chan')\n                  CHANNEL_TYPE\n                    PsiElement(chan)('chan')\n                    CHANNEL_TYPE\n                      PsiElement(chan)('chan')\n                      CHANNEL_TYPE\n                        PsiElement(chan)('chan')\n                        TYPE\n                          TYPE_REFERENCE_EXPRESSION\n                            PsiElement(identifier)('int')\n                PsiElement())(')')\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('nil')\n              PsiElement())(')')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          UNARY_EXPR\n            PsiElement(<-)('<-')\n            CONVERSION_EXPR\n              PAR_TYPE\n                PsiElement(()('(')\n                CHANNEL_TYPE\n                  PsiElement(<-)('<-')\n                  PsiElement(chan)('chan')\n                  CHANNEL_TYPE\n                    PsiElement(chan)('chan')\n                    CHANNEL_TYPE\n                      PsiElement(chan)('chan')\n                      CHANNEL_TYPE\n                        PsiElement(chan)('chan')\n                        CHANNEL_TYPE\n                          PsiElement(chan)('chan')\n                          TYPE\n                            TYPE_REFERENCE_EXPRESSION\n                              PsiElement(identifier)('int')\n                PsiElement())(')')\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('nil')\n              PsiElement())(')')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          UNARY_EXPR\n            PsiElement(<-)('<-')\n            CONVERSION_EXPR\n              PAR_TYPE\n                PsiElement(()('(')\n                CHANNEL_TYPE\n                  PsiElement(<-)('<-')\n                  PsiElement(chan)('chan')\n                  CHANNEL_TYPE\n                    PsiElement(<-)('<-')\n                    PsiElement(chan)('chan')\n                    TYPE\n                      TYPE_REFERENCE_EXPRESSION\n                        PsiElement(identifier)('int')\n                PsiElement())(')')\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('nil')\n              PsiElement())(')')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          UNARY_EXPR\n            PsiElement(<-)('<-')\n            CONVERSION_EXPR\n              PAR_TYPE\n                PsiElement(()('(')\n                CHANNEL_TYPE\n                  PsiElement(<-)('<-')\n                  PsiElement(chan)('chan')\n                  CHANNEL_TYPE\n                    PsiElement(<-)('<-')\n                    PsiElement(chan)('chan')\n                    CHANNEL_TYPE\n                      PsiElement(<-)('<-')\n                      PsiElement(chan)('chan')\n                      TYPE\n                        TYPE_REFERENCE_EXPRESSION\n                          PsiElement(identifier)('int')\n                PsiElement())(')')\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('nil')\n              PsiElement())(')')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          UNARY_EXPR\n            PsiElement(<-)('<-')\n            CONVERSION_EXPR\n              PAR_TYPE\n                PsiElement(()('(')\n                CHANNEL_TYPE\n                  PsiElement(<-)('<-')\n                  PsiElement(chan)('chan')\n                  CHANNEL_TYPE\n                    PsiElement(<-)('<-')\n                    PsiElement(chan)('chan')\n                    CHANNEL_TYPE\n                      PsiElement(<-)('<-')\n                      PsiElement(chan)('chan')\n                      CHANNEL_TYPE\n                        PsiElement(<-)('<-')\n                        PsiElement(chan)('chan')\n                        TYPE\n                          TYPE_REFERENCE_EXPRESSION\n                            PsiElement(identifier)('int')\n                PsiElement())(')')\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('nil')\n              PsiElement())(')')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          UNARY_EXPR\n            PsiElement(<-)('<-')\n            CONVERSION_EXPR\n              PAR_TYPE\n                PsiElement(()('(')\n                CHANNEL_TYPE\n                  PsiElement(<-)('<-')\n                  PsiElement(chan)('chan')\n                  CHANNEL_TYPE\n                    PsiElement(<-)('<-')\n                    PsiElement(chan)('chan')\n                    CHANNEL_TYPE\n                      PsiElement(<-)('<-')\n                      PsiElement(chan)('chan')\n                      CHANNEL_TYPE\n                        PsiElement(<-)('<-')\n                        PsiElement(chan)('chan')\n                        CHANNEL_TYPE\n                          PsiElement(<-)('<-')\n                          PsiElement(chan)('chan')\n                          TYPE\n                            TYPE_REFERENCE_EXPRESSION\n                              PsiElement(identifier)('int')\n                PsiElement())(')')\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('nil')\n              PsiElement())(')')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          UNARY_EXPR\n            PsiElement(<-)('<-')\n            CONVERSION_EXPR\n              PAR_TYPE\n                PsiElement(()('(')\n                CHANNEL_TYPE\n                  PsiElement(<-)('<-')\n                  PsiElement(chan)('chan')\n                  PAR_TYPE\n                    PsiElement(()('(')\n                    CHANNEL_TYPE\n                      PsiElement(<-)('<-')\n                      PsiElement(chan)('chan')\n                      TYPE\n                        TYPE_REFERENCE_EXPRESSION\n                          PsiElement(identifier)('int')\n                    PsiElement())(')')\n                PsiElement())(')')\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('nil')\n              PsiElement())(')')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          UNARY_EXPR\n            PsiElement(<-)('<-')\n            CONVERSION_EXPR\n              PAR_TYPE\n                PsiElement(()('(')\n                CHANNEL_TYPE\n                  PsiElement(<-)('<-')\n                  PsiElement(chan)('chan')\n                  PAR_TYPE\n                    PsiElement(()('(')\n                    CHANNEL_TYPE\n                      PsiElement(<-)('<-')\n                      PsiElement(chan)('chan')\n                      PAR_TYPE\n                        PsiElement(()('(')\n                        CHANNEL_TYPE\n                          PsiElement(<-)('<-')\n                          PsiElement(chan)('chan')\n                          TYPE\n                            TYPE_REFERENCE_EXPRESSION\n                              PsiElement(identifier)('int')\n                        PsiElement())(')')\n                    PsiElement())(')')\n                PsiElement())(')')\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('nil')\n              PsiElement())(')')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          UNARY_EXPR\n            PsiElement(<-)('<-')\n            CONVERSION_EXPR\n              PAR_TYPE\n                PsiElement(()('(')\n                CHANNEL_TYPE\n                  PsiElement(<-)('<-')\n                  PsiElement(chan)('chan')\n                  PAR_TYPE\n                    PsiElement(()('(')\n                    CHANNEL_TYPE\n                      PsiElement(<-)('<-')\n                      PsiElement(chan)('chan')\n                      PAR_TYPE\n                        PsiElement(()('(')\n                        CHANNEL_TYPE\n                          PsiElement(<-)('<-')\n                          PsiElement(chan)('chan')\n                          PAR_TYPE\n                            PsiElement(()('(')\n                            CHANNEL_TYPE\n                              PsiElement(<-)('<-')\n                              PsiElement(chan)('chan')\n                              TYPE\n                                TYPE_REFERENCE_EXPRESSION\n                                  PsiElement(identifier)('int')\n                            PsiElement())(')')\n                        PsiElement())(')')\n                    PsiElement())(')')\n                PsiElement())(')')\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('nil')\n              PsiElement())(')')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          UNARY_EXPR\n            PsiElement(<-)('<-')\n            CONVERSION_EXPR\n              PAR_TYPE\n                PsiElement(()('(')\n                CHANNEL_TYPE\n                  PsiElement(<-)('<-')\n                  PsiElement(chan)('chan')\n                  PAR_TYPE\n                    PsiElement(()('(')\n                    CHANNEL_TYPE\n                      PsiElement(<-)('<-')\n                      PsiElement(chan)('chan')\n                      PAR_TYPE\n                        PsiElement(()('(')\n                        CHANNEL_TYPE\n                          PsiElement(<-)('<-')\n                          PsiElement(chan)('chan')\n                          PAR_TYPE\n                            PsiElement(()('(')\n                            CHANNEL_TYPE\n                              PsiElement(<-)('<-')\n                              PsiElement(chan)('chan')\n                              PAR_TYPE\n                                PsiElement(()('(')\n                                CHANNEL_TYPE\n                                  PsiElement(<-)('<-')\n                                  PsiElement(chan)('chan')\n                                  TYPE\n                                    TYPE_REFERENCE_EXPRESSION\n                                      PsiElement(identifier)('int')\n                                PsiElement())(')')\n                            PsiElement())(')')\n                        PsiElement())(')')\n                    PsiElement())(')')\n                PsiElement())(')')\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('nil')\n              PsiElement())(')')\n      STATEMENT\n        TYPE_DECLARATION\n          PsiElement(type)('type')\n          TYPE_SPEC\n            SPEC_TYPE\n              PsiElement(identifier)('_')\n              CHANNEL_TYPE\n                PsiElement(<-)('<-')\n                PsiErrorElement:chan expected, got '<-'\n                  <empty list>\n                CHANNEL_TYPE\n                  PsiElement(<-)('<-')\n                  PsiElement(chan)('chan')\n                  TYPE\n                    TYPE_REFERENCE_EXPRESSION\n                      PsiElement(identifier)('int')\n      PsiComment(GO_LINE_COMMENT)('// ERROR \"unexpected <-, expecting chan\"')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          UNARY_EXPR\n            PsiElement(<-)('<-')\n          PsiErrorElement:'!', '!=', '%', '&', '&^', '(', '*', '+', '++', '-', '--', '/', <, <-, <<, <=, <channel type>, <expression>, <string literal>, '==', '>', '>=', '>>', '[', '^', chan, func, identifier, interface, map, struct or '|' expected, got 'chan'\n            <empty list>\n      PsiElement(chan)('chan')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('int')\n      PsiComment(GO_LINE_COMMENT)('// ERROR \"unexpected <-, expecting chan|expecting {\" (new parser: same error as for type decl)')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          UNARY_EXPR\n            PsiElement(<-)('<-')\n            UNARY_EXPR\n              PsiElement(<-)('<-')\n          PsiErrorElement:'!', '!=', '%', '&', '&^', '(', '*', '+', '++', '-', '--', '/', <, <-, <<, <=, <channel type>, <expression>, <string literal>, '==', '>', '>=', '>>', '[', '^', chan, func, identifier, interface, map, struct or '|' expected, got 'chan'\n            <empty list>\n      PsiElement(chan)('chan')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('int')\n      PsiComment(GO_LINE_COMMENT)('// ERROR \"unexpected <-, expecting chan|expecting {\" (new parser: same error as for type decl)')\n      STATEMENT\n        TYPE_DECLARATION\n          PsiElement(type)('type')\n          TYPE_SPEC\n            SPEC_TYPE\n              PsiElement(identifier)('_')\n              CHANNEL_TYPE\n                PsiElement(<-)('<-')\n                PsiElement(chan)('chan')\n                CHANNEL_TYPE\n                  PsiElement(<-)('<-')\n                  PsiErrorElement:chan expected, got 'int'\n                    <empty list>\n                  TYPE\n                    TYPE_REFERENCE_EXPRESSION\n                      PsiElement(identifier)('int')\n      PsiComment(GO_LINE_COMMENT)('// ERROR \"unexpected int, expecting chan|expecting chan\"')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          UNARY_EXPR\n            PsiElement(<-)('<-')\n          PsiErrorElement:'!', '!=', '%', '&', '&^', '(', '*', '+', '++', '-', '--', '/', <, <-, <<, <=, <channel type>, <expression>, <string literal>, '==', '>', '>=', '>>', '[', '^', chan, func, identifier, interface, map, struct or '|' expected, got 'chan'\n            <empty list>\n      PsiElement(chan)('chan')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          UNARY_EXPR\n            PsiElement(<-)('<-')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('int')\n      PsiComment(GO_LINE_COMMENT)('// ERROR \"unexpected int, expecting chan|expecting {\" (new parser: same error as for type decl)')\n      PsiElement(})('}')"
  },
  {
    "path": "testData/parser/ElementRecover.go",
    "content": "package foo\n\ntype connection interface{}\n\nfunc (conn *connection) Delete(ctx *context.Context) (err errors.Error) {\n\tconnection := &entity.Connection{\n\t\tconnection.AccountID = ctx.Bag[\"accountID\"].(int64),\n\t\tconnection.AccountID = ctx.Bag[\"accountID\"].(int64)\n\t}\n\n\tif err = conn.storage.Delete(connection); err != nil {\n\t\treturn\n\t}\n\n\tserver.WriteResponse(ctx, \"\", http.StatusNoContent, 10)\n\treturn\n}\n\nfunc (conn *connection) Create(ctx *context.Context) (err errors.Error) {\n\n}"
  },
  {
    "path": "testData/parser/ElementRecover.txt",
    "content": "GO_FILE\n  PACKAGE_CLAUSE\n    PsiElement(package)('package')\n    PsiElement(identifier)('foo')\n  IMPORT_LIST\n    <empty list>\n  TYPE_DECLARATION\n    PsiElement(type)('type')\n    TYPE_SPEC\n      SPEC_TYPE\n        PsiElement(identifier)('connection')\n        INTERFACE_TYPE\n          PsiElement(interface)('interface')\n          PsiElement({)('{')\n          PsiElement(})('}')\n  METHOD_DECLARATION\n    PsiElement(func)('func')\n    RECEIVER\n      PsiElement(()('(')\n      PsiElement(identifier)('conn')\n      POINTER_TYPE\n        PsiElement(*)('*')\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('connection')\n      PsiElement())(')')\n    PsiElement(identifier)('Delete')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('ctx')\n          POINTER_TYPE\n            PsiElement(*)('*')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                TYPE_REFERENCE_EXPRESSION\n                  PsiElement(identifier)('context')\n                PsiElement(.)('.')\n                PsiElement(identifier)('Context')\n        PsiElement())(')')\n      RESULT\n        PARAMETERS\n          PsiElement(()('(')\n          PARAMETER_DECLARATION\n            PARAM_DEFINITION\n              PsiElement(identifier)('err')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                TYPE_REFERENCE_EXPRESSION\n                  PsiElement(identifier)('errors')\n                PsiElement(.)('.')\n                PsiElement(identifier)('Error')\n          PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('connection')\n          PsiElement(:=)(':=')\n          UNARY_EXPR\n            PsiElement(&)('&')\n            COMPOSITE_LIT\n              TYPE_REFERENCE_EXPRESSION\n                TYPE_REFERENCE_EXPRESSION\n                  PsiElement(identifier)('entity')\n                PsiElement(.)('.')\n                PsiElement(identifier)('Connection')\n              LITERAL_VALUE\n                PsiElement({)('{')\n                ELEMENT\n                  VALUE\n                    REFERENCE_EXPRESSION\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('connection')\n                      PsiElement(.)('.')\n                      PsiElement(identifier)('AccountID')\n                PsiErrorElement:'!=', '%', '&', '&^', '(', '*', '+', '-', '/', ':', <, <<, <=, '==', '>', '>=', '>>', '^', '{' or '|' expected, got '='\n                  PsiElement(=)('=')\n                PsiElement(DUMMY_BLOCK)\n                  PsiElement(identifier)('ctx')\n                  PsiElement(.)('.')\n                  PsiElement(identifier)('Bag')\n                  PsiElement([)('[')\n                  PsiElement(string)('\"accountID\"')\n                  PsiElement(])(']')\n                  PsiElement(.)('.')\n                  PsiElement(()('(')\n                  PsiElement(identifier)('int64')\n                  PsiElement())(')')\n                PsiElement(,)(',')\n                ELEMENT\n                  VALUE\n                    REFERENCE_EXPRESSION\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('connection')\n                      PsiElement(.)('.')\n                      PsiElement(identifier)('AccountID')\n                PsiErrorElement:'!=', '%', '&', '&^', '(', '*', '+', '-', '/', ':', <, <<, <=, '==', '>', '>=', '>>', '^', '{' or '|' expected, got '='\n                  PsiElement(=)('=')\n                PsiElement(DUMMY_BLOCK)\n                  PsiElement(identifier)('ctx')\n                  PsiElement(.)('.')\n                  PsiElement(identifier)('Bag')\n                  PsiElement([)('[')\n                  PsiElement(string)('\"accountID\"')\n                  PsiElement(])(']')\n                  PsiElement(.)('.')\n                  PsiElement(()('(')\n                  PsiElement(identifier)('int64')\n                  PsiElement())(')')\n                PsiElement(})('}')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        ASSIGNMENT_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('err')\n          ASSIGN_OP\n            PsiElement(=)('=')\n          CALL_EXPR\n            SELECTOR_EXPR\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('conn')\n                PsiElement(.)('.')\n                PsiElement(identifier)('storage')\n              PsiElement(.)('.')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('Delete')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('connection')\n              PsiElement())(')')\n        PsiElement(;)(';')\n        CONDITIONAL_EXPR\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('err')\n          PsiElement(!=)('!=')\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('nil')\n        BLOCK\n          PsiElement({)('{')\n          RETURN_STATEMENT\n            PsiElement(return)('return')\n          PsiElement(})('}')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('server')\n              PsiElement(.)('.')\n              PsiElement(identifier)('WriteResponse')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('ctx')\n              PsiElement(,)(',')\n              STRING_LITERAL\n                PsiElement(string)('\"\"')\n              PsiElement(,)(',')\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('http')\n                PsiElement(.)('.')\n                PsiElement(identifier)('StatusNoContent')\n              PsiElement(,)(',')\n              LITERAL\n                PsiElement(int)('10')\n              PsiElement())(')')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n      PsiElement(})('}')\n  METHOD_DECLARATION\n    PsiElement(func)('func')\n    RECEIVER\n      PsiElement(()('(')\n      PsiElement(identifier)('conn')\n      POINTER_TYPE\n        PsiElement(*)('*')\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('connection')\n      PsiElement())(')')\n    PsiElement(identifier)('Create')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('ctx')\n          POINTER_TYPE\n            PsiElement(*)('*')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                TYPE_REFERENCE_EXPRESSION\n                  PsiElement(identifier)('context')\n                PsiElement(.)('.')\n                PsiElement(identifier)('Context')\n        PsiElement())(')')\n      RESULT\n        PARAMETERS\n          PsiElement(()('(')\n          PARAMETER_DECLARATION\n            PARAM_DEFINITION\n              PsiElement(identifier)('err')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                TYPE_REFERENCE_EXPRESSION\n                  PsiElement(identifier)('errors')\n                PsiElement(.)('.')\n                PsiElement(identifier)('Error')\n          PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      PsiElement(})('}')"
  },
  {
    "path": "testData/parser/Error.go",
    "content": "// Copyright 2010 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage runtime\n\n// The Error interface identifies a run time error.\ntype Error interface {\n\terror\n\n\t// RuntimeError is a no-op function but\n\t// serves to distinguish types that are runtime\n\t// errors from ordinary errors: a type is a\n\t// runtime error if it has a RuntimeError method.\n\tRuntimeError()\n}\n\n// A TypeAssertionError explains a failed type assertion.\ntype TypeAssertionError struct {\n\tinterfaceString string\n\tconcreteString  string\n\tassertedString  string\n\tmissingMethod   string // one method needed by Interface, missing from Concrete\n}\n\nfunc (*TypeAssertionError) RuntimeError() {}\n\nfunc (e *TypeAssertionError) Error() string {\n\tinter := e.interfaceString\n\tif inter == \"\" {\n\t\tinter = \"interface\"\n\t}\n\tif e.concreteString == \"\" {\n\t\treturn \"interface conversion: \" + inter + \" is nil, not \" + e.assertedString\n\t}\n\tif e.missingMethod == \"\" {\n\t\treturn \"interface conversion: \" + inter + \" is \" + e.concreteString +\n\t\t\t\", not \" + e.assertedString\n\t}\n\treturn \"interface conversion: \" + e.concreteString + \" is not \" + e.assertedString +\n\t\t\": missing method \" + e.missingMethod\n}\n\n// For calling from C.\nfunc newTypeAssertionError(ps1, ps2, ps3 *string, pmeth *string, ret *interface{}) {\n\tvar s1, s2, s3, meth string\n\n\tif ps1 != nil {\n\t\ts1 = *ps1\n\t}\n\tif ps2 != nil {\n\t\ts2 = *ps2\n\t}\n\tif ps3 != nil {\n\t\ts3 = *ps3\n\t}\n\tif pmeth != nil {\n\t\tmeth = *pmeth\n\t}\n\t*ret = &TypeAssertionError{s1, s2, s3, meth}\n}\n\n// An errorString represents a runtime error described by a single string.\ntype errorString string\n\nfunc (e errorString) RuntimeError() {}\n\nfunc (e errorString) Error() string {\n        aaa\n\treturn \"runtime error: \" + string(e)\n}\n\n// For calling from C.\nfunc newErrorString(s string, ret *interface{}) {\n\t*ret = errorString(s)\n}\n\ntype stringer interface {\n\tString() string\n}\n\nfunc typestring(interface{}) string\n\n// For calling from C.\n// Prints an argument passed to panic.\n// There's room for arbitrary complexity here, but we keep it\n// simple and handle just a few important cases: int, string, and Stringer.\nfunc printany(i interface{}) {\n\tswitch v := i.(type) {\n\tcase nil:\n\t\tprint(\"nil\")\n\tcase stringer:\n\t\tprint(v.String())\n\tcase error:\n\t\tprint(v.Error())\n\tcase int:\n\t\tprint(v)\n\tcase string:\n\t\tprint(v)\n\tdefault:\n\t\tprint(\"(\", typestring(i), \") \", i)\n\t}\n}\n\n// called from generated code\nfunc panicwrap(pkg, typ, meth string) {\n\tpanic(\"value method \" + pkg + \".\" + typ + \".\" + meth + \" called using nil *\" + typ + \" pointer\")\n}\n\n// New returns an initialized Fetcher.\nfunc New(h Handler) *Fetcher {\n\treturn &Fetcher{\n\t\tHandler:       h,\n\t\tCrawlDelay:    DefaultCrawlDelay,\n\t\tHttpClient:    http.DefaultClient,\n\t\tUserAgent:     DefaultUserAgent,\n\t\tWorkerIdleTTL: DefaultWorkerIdleTTL,\n\t\tdbg:           make(chan *DebugInfo, 1),\n\t}\n}\n"
  },
  {
    "path": "testData/parser/Error.txt",
    "content": "GO_FILE\n  PsiComment(GO_LINE_COMMENT)('// Copyright 2010 The Go Authors. All rights reserved.')\n  PsiComment(GO_LINE_COMMENT)('// Use of this source code is governed by a BSD-style')\n  PsiComment(GO_LINE_COMMENT)('// license that can be found in the LICENSE file.')\n  PACKAGE_CLAUSE\n    PsiElement(package)('package')\n    PsiElement(identifier)('runtime')\n  IMPORT_LIST\n    <empty list>\n  PsiComment(GO_LINE_COMMENT)('// The Error interface identifies a run time error.')\n  TYPE_DECLARATION\n    PsiElement(type)('type')\n    TYPE_SPEC\n      SPEC_TYPE\n        PsiElement(identifier)('Error')\n        INTERFACE_TYPE\n          PsiElement(interface)('interface')\n          PsiElement({)('{')\n          METHOD_SPEC\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('error')\n          PsiComment(GO_LINE_COMMENT)('// RuntimeError is a no-op function but')\n          PsiComment(GO_LINE_COMMENT)('// serves to distinguish types that are runtime')\n          PsiComment(GO_LINE_COMMENT)('// errors from ordinary errors: a type is a')\n          PsiComment(GO_LINE_COMMENT)('// runtime error if it has a RuntimeError method.')\n          METHOD_SPEC\n            PsiElement(identifier)('RuntimeError')\n            SIGNATURE\n              PARAMETERS\n                PsiElement(()('(')\n                PsiElement())(')')\n          PsiElement(})('}')\n  PsiComment(GO_LINE_COMMENT)('// A TypeAssertionError explains a failed type assertion.')\n  TYPE_DECLARATION\n    PsiElement(type)('type')\n    TYPE_SPEC\n      SPEC_TYPE\n        PsiElement(identifier)('TypeAssertionError')\n        STRUCT_TYPE\n          PsiElement(struct)('struct')\n          PsiElement({)('{')\n          FIELD_DECLARATION\n            FIELD_DEFINITION\n              PsiElement(identifier)('interfaceString')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('string')\n          FIELD_DECLARATION\n            FIELD_DEFINITION\n              PsiElement(identifier)('concreteString')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('string')\n          FIELD_DECLARATION\n            FIELD_DEFINITION\n              PsiElement(identifier)('assertedString')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('string')\n          FIELD_DECLARATION\n            FIELD_DEFINITION\n              PsiElement(identifier)('missingMethod')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('string')\n          PsiComment(GO_LINE_COMMENT)('// one method needed by Interface, missing from Concrete')\n          PsiElement(})('}')\n  METHOD_DECLARATION\n    PsiElement(func)('func')\n    RECEIVER\n      PsiElement(()('(')\n      POINTER_TYPE\n        PsiElement(*)('*')\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('TypeAssertionError')\n      PsiElement())(')')\n    PsiElement(identifier)('RuntimeError')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      PsiElement(})('}')\n  METHOD_DECLARATION\n    PsiElement(func)('func')\n    RECEIVER\n      PsiElement(()('(')\n      PsiElement(identifier)('e')\n      POINTER_TYPE\n        PsiElement(*)('*')\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('TypeAssertionError')\n      PsiElement())(')')\n    PsiElement(identifier)('Error')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n      RESULT\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('string')\n    BLOCK\n      PsiElement({)('{')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('inter')\n          PsiElement(:=)(':=')\n          REFERENCE_EXPRESSION\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('e')\n            PsiElement(.)('.')\n            PsiElement(identifier)('interfaceString')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            CONDITIONAL_EXPR\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('inter')\n              PsiElement(==)('==')\n              STRING_LITERAL\n                PsiElement(string)('\"\"')\n        BLOCK\n          PsiElement({)('{')\n          ASSIGNMENT_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('inter')\n            ASSIGN_OP\n              PsiElement(=)('=')\n            STRING_LITERAL\n              PsiElement(string)('\"interface\"')\n          PsiElement(})('}')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            CONDITIONAL_EXPR\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('e')\n                PsiElement(.)('.')\n                PsiElement(identifier)('concreteString')\n              PsiElement(==)('==')\n              STRING_LITERAL\n                PsiElement(string)('\"\"')\n        BLOCK\n          PsiElement({)('{')\n          RETURN_STATEMENT\n            PsiElement(return)('return')\n            ADD_EXPR\n              ADD_EXPR\n                ADD_EXPR\n                  STRING_LITERAL\n                    PsiElement(string)('\"interface conversion: \"')\n                  PsiElement(+)('+')\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('inter')\n                PsiElement(+)('+')\n                STRING_LITERAL\n                  PsiElement(string)('\" is nil, not \"')\n              PsiElement(+)('+')\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('e')\n                PsiElement(.)('.')\n                PsiElement(identifier)('assertedString')\n          PsiElement(})('}')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            CONDITIONAL_EXPR\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('e')\n                PsiElement(.)('.')\n                PsiElement(identifier)('missingMethod')\n              PsiElement(==)('==')\n              STRING_LITERAL\n                PsiElement(string)('\"\"')\n        BLOCK\n          PsiElement({)('{')\n          RETURN_STATEMENT\n            PsiElement(return)('return')\n            ADD_EXPR\n              ADD_EXPR\n                ADD_EXPR\n                  ADD_EXPR\n                    ADD_EXPR\n                      STRING_LITERAL\n                        PsiElement(string)('\"interface conversion: \"')\n                      PsiElement(+)('+')\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('inter')\n                    PsiElement(+)('+')\n                    STRING_LITERAL\n                      PsiElement(string)('\" is \"')\n                  PsiElement(+)('+')\n                  REFERENCE_EXPRESSION\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('e')\n                    PsiElement(.)('.')\n                    PsiElement(identifier)('concreteString')\n                PsiElement(+)('+')\n                STRING_LITERAL\n                  PsiElement(string)('\", not \"')\n              PsiElement(+)('+')\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('e')\n                PsiElement(.)('.')\n                PsiElement(identifier)('assertedString')\n          PsiElement(})('}')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n        ADD_EXPR\n          ADD_EXPR\n            ADD_EXPR\n              ADD_EXPR\n                ADD_EXPR\n                  STRING_LITERAL\n                    PsiElement(string)('\"interface conversion: \"')\n                  PsiElement(+)('+')\n                  REFERENCE_EXPRESSION\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('e')\n                    PsiElement(.)('.')\n                    PsiElement(identifier)('concreteString')\n                PsiElement(+)('+')\n                STRING_LITERAL\n                  PsiElement(string)('\" is not \"')\n              PsiElement(+)('+')\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('e')\n                PsiElement(.)('.')\n                PsiElement(identifier)('assertedString')\n            PsiElement(+)('+')\n            STRING_LITERAL\n              PsiElement(string)('\": missing method \"')\n          PsiElement(+)('+')\n          REFERENCE_EXPRESSION\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('e')\n            PsiElement(.)('.')\n            PsiElement(identifier)('missingMethod')\n      PsiElement(})('}')\n  PsiComment(GO_LINE_COMMENT)('// For calling from C.')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('newTypeAssertionError')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('ps1')\n          PsiElement(,)(',')\n          PARAM_DEFINITION\n            PsiElement(identifier)('ps2')\n          PsiElement(,)(',')\n          PARAM_DEFINITION\n            PsiElement(identifier)('ps3')\n          POINTER_TYPE\n            PsiElement(*)('*')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('string')\n        PsiElement(,)(',')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('pmeth')\n          POINTER_TYPE\n            PsiElement(*)('*')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('string')\n        PsiElement(,)(',')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('ret')\n          POINTER_TYPE\n            PsiElement(*)('*')\n            INTERFACE_TYPE\n              PsiElement(interface)('interface')\n              PsiElement({)('{')\n              PsiElement(})('}')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      STATEMENT\n        VAR_DECLARATION\n          PsiElement(var)('var')\n          VAR_SPEC\n            VAR_DEFINITION\n              PsiElement(identifier)('s1')\n            PsiElement(,)(',')\n            VAR_DEFINITION\n              PsiElement(identifier)('s2')\n            PsiElement(,)(',')\n            VAR_DEFINITION\n              PsiElement(identifier)('s3')\n            PsiElement(,)(',')\n            VAR_DEFINITION\n              PsiElement(identifier)('meth')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('string')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            CONDITIONAL_EXPR\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('ps1')\n              PsiElement(!=)('!=')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('nil')\n        BLOCK\n          PsiElement({)('{')\n          ASSIGNMENT_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('s1')\n            ASSIGN_OP\n              PsiElement(=)('=')\n            UNARY_EXPR\n              PsiElement(*)('*')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('ps1')\n          PsiElement(})('}')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            CONDITIONAL_EXPR\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('ps2')\n              PsiElement(!=)('!=')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('nil')\n        BLOCK\n          PsiElement({)('{')\n          ASSIGNMENT_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('s2')\n            ASSIGN_OP\n              PsiElement(=)('=')\n            UNARY_EXPR\n              PsiElement(*)('*')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('ps2')\n          PsiElement(})('}')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            CONDITIONAL_EXPR\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('ps3')\n              PsiElement(!=)('!=')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('nil')\n        BLOCK\n          PsiElement({)('{')\n          ASSIGNMENT_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('s3')\n            ASSIGN_OP\n              PsiElement(=)('=')\n            UNARY_EXPR\n              PsiElement(*)('*')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('ps3')\n          PsiElement(})('}')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            CONDITIONAL_EXPR\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('pmeth')\n              PsiElement(!=)('!=')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('nil')\n        BLOCK\n          PsiElement({)('{')\n          ASSIGNMENT_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('meth')\n            ASSIGN_OP\n              PsiElement(=)('=')\n            UNARY_EXPR\n              PsiElement(*)('*')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('pmeth')\n          PsiElement(})('}')\n      ASSIGNMENT_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          UNARY_EXPR\n            PsiElement(*)('*')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('ret')\n        ASSIGN_OP\n          PsiElement(=)('=')\n        UNARY_EXPR\n          PsiElement(&)('&')\n          COMPOSITE_LIT\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('TypeAssertionError')\n            LITERAL_VALUE\n              PsiElement({)('{')\n              ELEMENT\n                VALUE\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('s1')\n              PsiElement(,)(',')\n              ELEMENT\n                VALUE\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('s2')\n              PsiElement(,)(',')\n              ELEMENT\n                VALUE\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('s3')\n              PsiElement(,)(',')\n              ELEMENT\n                VALUE\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('meth')\n              PsiElement(})('}')\n      PsiElement(})('}')\n  PsiComment(GO_LINE_COMMENT)('// An errorString represents a runtime error described by a single string.')\n  TYPE_DECLARATION\n    PsiElement(type)('type')\n    TYPE_SPEC\n      SPEC_TYPE\n        PsiElement(identifier)('errorString')\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('string')\n  METHOD_DECLARATION\n    PsiElement(func)('func')\n    RECEIVER\n      PsiElement(()('(')\n      PsiElement(identifier)('e')\n      TYPE\n        TYPE_REFERENCE_EXPRESSION\n          PsiElement(identifier)('errorString')\n      PsiElement())(')')\n    PsiElement(identifier)('RuntimeError')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      PsiElement(})('}')\n  METHOD_DECLARATION\n    PsiElement(func)('func')\n    RECEIVER\n      PsiElement(()('(')\n      PsiElement(identifier)('e')\n      TYPE\n        TYPE_REFERENCE_EXPRESSION\n          PsiElement(identifier)('errorString')\n      PsiElement())(')')\n    PsiElement(identifier)('Error')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n      RESULT\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('string')\n    BLOCK\n      PsiElement({)('{')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('aaa')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n        ADD_EXPR\n          STRING_LITERAL\n            PsiElement(string)('\"runtime error: \"')\n          PsiElement(+)('+')\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('string')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('e')\n              PsiElement())(')')\n      PsiElement(})('}')\n  PsiComment(GO_LINE_COMMENT)('// For calling from C.')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('newErrorString')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('s')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('string')\n        PsiElement(,)(',')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('ret')\n          POINTER_TYPE\n            PsiElement(*)('*')\n            INTERFACE_TYPE\n              PsiElement(interface)('interface')\n              PsiElement({)('{')\n              PsiElement(})('}')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      ASSIGNMENT_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          UNARY_EXPR\n            PsiElement(*)('*')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('ret')\n        ASSIGN_OP\n          PsiElement(=)('=')\n        CALL_EXPR\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('errorString')\n          ARGUMENT_LIST\n            PsiElement(()('(')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('s')\n            PsiElement())(')')\n      PsiElement(})('}')\n  TYPE_DECLARATION\n    PsiElement(type)('type')\n    TYPE_SPEC\n      SPEC_TYPE\n        PsiElement(identifier)('stringer')\n        INTERFACE_TYPE\n          PsiElement(interface)('interface')\n          PsiElement({)('{')\n          METHOD_SPEC\n            PsiElement(identifier)('String')\n            SIGNATURE\n              PARAMETERS\n                PsiElement(()('(')\n                PsiElement())(')')\n              RESULT\n                TYPE\n                  TYPE_REFERENCE_EXPRESSION\n                    PsiElement(identifier)('string')\n          PsiElement(})('}')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('typestring')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          INTERFACE_TYPE\n            PsiElement(interface)('interface')\n            PsiElement({)('{')\n            PsiElement(})('}')\n        PsiElement())(')')\n      RESULT\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('string')\n  PsiComment(GO_LINE_COMMENT)('// For calling from C.')\n  PsiComment(GO_LINE_COMMENT)('// Prints an argument passed to panic.')\n  PsiComment(GO_LINE_COMMENT)('// There's room for arbitrary complexity here, but we keep it')\n  PsiComment(GO_LINE_COMMENT)('// simple and handle just a few important cases: int, string, and Stringer.')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('printany')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('i')\n          INTERFACE_TYPE\n            PsiElement(interface)('interface')\n            PsiElement({)('{')\n            PsiElement(})('}')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      TYPE_SWITCH_STATEMENT\n        SWITCH_START\n          PsiElement(switch)('switch')\n        TYPE_SWITCH_GUARD\n          VAR_DEFINITION\n            PsiElement(identifier)('v')\n          PsiElement(:=)(':=')\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('i')\n          PsiElement(.)('.')\n          TYPE_GUARD\n            PsiElement(()('(')\n            PsiElement(type)('type')\n            PsiElement())(')')\n        PsiElement({)('{')\n        TYPE_CASE_CLAUSE\n          PsiElement(case)('case')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('nil')\n          PsiElement(:)(':')\n          SIMPLE_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('print')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  STRING_LITERAL\n                    PsiElement(string)('\"nil\"')\n                  PsiElement())(')')\n        TYPE_CASE_CLAUSE\n          PsiElement(case)('case')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('stringer')\n          PsiElement(:)(':')\n          SIMPLE_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('print')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  CALL_EXPR\n                    REFERENCE_EXPRESSION\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('v')\n                      PsiElement(.)('.')\n                      PsiElement(identifier)('String')\n                    ARGUMENT_LIST\n                      PsiElement(()('(')\n                      PsiElement())(')')\n                  PsiElement())(')')\n        TYPE_CASE_CLAUSE\n          PsiElement(case)('case')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('error')\n          PsiElement(:)(':')\n          SIMPLE_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('print')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  CALL_EXPR\n                    REFERENCE_EXPRESSION\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('v')\n                      PsiElement(.)('.')\n                      PsiElement(identifier)('Error')\n                    ARGUMENT_LIST\n                      PsiElement(()('(')\n                      PsiElement())(')')\n                  PsiElement())(')')\n        TYPE_CASE_CLAUSE\n          PsiElement(case)('case')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('int')\n          PsiElement(:)(':')\n          SIMPLE_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('print')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('v')\n                  PsiElement())(')')\n        TYPE_CASE_CLAUSE\n          PsiElement(case)('case')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('string')\n          PsiElement(:)(':')\n          SIMPLE_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('print')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('v')\n                  PsiElement())(')')\n        TYPE_CASE_CLAUSE\n          PsiElement(default)('default')\n          PsiElement(:)(':')\n          SIMPLE_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('print')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  STRING_LITERAL\n                    PsiElement(string)('\"(\"')\n                  PsiElement(,)(',')\n                  CALL_EXPR\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('typestring')\n                    ARGUMENT_LIST\n                      PsiElement(()('(')\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('i')\n                      PsiElement())(')')\n                  PsiElement(,)(',')\n                  STRING_LITERAL\n                    PsiElement(string)('\") \"')\n                  PsiElement(,)(',')\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('i')\n                  PsiElement())(')')\n        PsiElement(})('}')\n      PsiElement(})('}')\n  PsiComment(GO_LINE_COMMENT)('// called from generated code')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('panicwrap')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('pkg')\n          PsiElement(,)(',')\n          PARAM_DEFINITION\n            PsiElement(identifier)('typ')\n          PsiElement(,)(',')\n          PARAM_DEFINITION\n            PsiElement(identifier)('meth')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('string')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('panic')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              ADD_EXPR\n                ADD_EXPR\n                  ADD_EXPR\n                    ADD_EXPR\n                      ADD_EXPR\n                        ADD_EXPR\n                          ADD_EXPR\n                            ADD_EXPR\n                              STRING_LITERAL\n                                PsiElement(string)('\"value method \"')\n                              PsiElement(+)('+')\n                              REFERENCE_EXPRESSION\n                                PsiElement(identifier)('pkg')\n                            PsiElement(+)('+')\n                            STRING_LITERAL\n                              PsiElement(string)('\".\"')\n                          PsiElement(+)('+')\n                          REFERENCE_EXPRESSION\n                            PsiElement(identifier)('typ')\n                        PsiElement(+)('+')\n                        STRING_LITERAL\n                          PsiElement(string)('\".\"')\n                      PsiElement(+)('+')\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('meth')\n                    PsiElement(+)('+')\n                    STRING_LITERAL\n                      PsiElement(string)('\" called using nil *\"')\n                  PsiElement(+)('+')\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('typ')\n                PsiElement(+)('+')\n                STRING_LITERAL\n                  PsiElement(string)('\" pointer\"')\n              PsiElement())(')')\n      PsiElement(})('}')\n  PsiComment(GO_LINE_COMMENT)('// New returns an initialized Fetcher.')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('New')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('h')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('Handler')\n        PsiElement())(')')\n      RESULT\n        POINTER_TYPE\n          PsiElement(*)('*')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('Fetcher')\n    BLOCK\n      PsiElement({)('{')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n        UNARY_EXPR\n          PsiElement(&)('&')\n          COMPOSITE_LIT\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('Fetcher')\n            LITERAL_VALUE\n              PsiElement({)('{')\n              ELEMENT\n                KEY\n                  FIELD_NAME\n                    PsiElement(identifier)('Handler')\n                PsiElement(:)(':')\n                VALUE\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('h')\n              PsiElement(,)(',')\n              ELEMENT\n                KEY\n                  FIELD_NAME\n                    PsiElement(identifier)('CrawlDelay')\n                PsiElement(:)(':')\n                VALUE\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('DefaultCrawlDelay')\n              PsiElement(,)(',')\n              ELEMENT\n                KEY\n                  FIELD_NAME\n                    PsiElement(identifier)('HttpClient')\n                PsiElement(:)(':')\n                VALUE\n                  REFERENCE_EXPRESSION\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('http')\n                    PsiElement(.)('.')\n                    PsiElement(identifier)('DefaultClient')\n              PsiElement(,)(',')\n              ELEMENT\n                KEY\n                  FIELD_NAME\n                    PsiElement(identifier)('UserAgent')\n                PsiElement(:)(':')\n                VALUE\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('DefaultUserAgent')\n              PsiElement(,)(',')\n              ELEMENT\n                KEY\n                  FIELD_NAME\n                    PsiElement(identifier)('WorkerIdleTTL')\n                PsiElement(:)(':')\n                VALUE\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('DefaultWorkerIdleTTL')\n              PsiElement(,)(',')\n              ELEMENT\n                KEY\n                  FIELD_NAME\n                    PsiElement(identifier)('dbg')\n                PsiElement(:)(':')\n                VALUE\n                  BUILTIN_CALL_EXPR\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('make')\n                    BUILTIN_ARGUMENT_LIST\n                      PsiElement(()('(')\n                      CHANNEL_TYPE\n                        PsiElement(chan)('chan')\n                        POINTER_TYPE\n                          PsiElement(*)('*')\n                          TYPE\n                            TYPE_REFERENCE_EXPRESSION\n                              PsiElement(identifier)('DebugInfo')\n                      PsiElement(,)(',')\n                      LITERAL\n                        PsiElement(int)('1')\n                      PsiElement())(')')\n              PsiElement(,)(',')\n              PsiElement(})('}')\n      PsiElement(})('}')"
  },
  {
    "path": "testData/parser/ExpressionPerformance.go",
    "content": "package performance\nimport (\n\t\"testing\"\n\t. \"github.com/smartystreets/goconvey/convey\"\n)\n\nfunc TestFoo(t *testing.T) {\n\tConvey(\"All starts with 1\", t, func() {\n\t\tSo(Foo(), ShouldEqual, 1)\n\t\tConvey(\"Then it increases\", func() {\n\t\t\tSo(Foo(), ShouldEqual, 2)\n\t\t\tConvey(\"Then it increases\", func() {\n\t\t\t\tSo(Foo(), ShouldEqual, 3)\n\t\t\t\tConvey(\"Then it increases\", func() {\n\t\t\t\t\tSo(Foo(), ShouldEqual, 4)\n\t\t\t\t\tConvey(\"Then it increases\", func() {\n\t\t\t\t\t\tSo(Foo(), ShouldEqual, 5)\n\t\t\t\t\t\tConvey(\"Then it increases\", func() {\n\t\t\t\t\t\t\tSo(Foo(), ShouldEqual, 6)\n\t\t\t\t\t\t\tConvey(\"Then it increases\", func() {\n\t\t\t\t\t\t\t\tSo(Foo(), ShouldEqual, 7)\n\t\t\t\t\t\t\t\tConvey(\"Then it increases\", func() {\n\t\t\t\t\t\t\t\t\tSo(Foo(), ShouldEqual, 8)\n\t\t\t\t\t\t\t\t\tConvey(\"Then it stops\", func() {\n\t\t\t\t\t\t\t\t\t\tSo(Foo(), ShouldEqual, func() {\n\n\n\n\t\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t})\n\t\t\t\t\t})\n\t\t\t\t})\n\t\t\t})\n\t\t})\n\n\t})\n}"
  },
  {
    "path": "testData/parser/ExpressionPerformance.txt",
    "content": "GO_FILE\n  PACKAGE_CLAUSE\n    PsiElement(package)('package')\n    PsiElement(identifier)('performance')\n  IMPORT_LIST\n    IMPORT_DECLARATION\n      PsiElement(import)('import')\n      PsiElement(()('(')\n      IMPORT_SPEC\n        IMPORT_STRING\n          STRING_LITERAL\n            PsiElement(string)('\"testing\"')\n      IMPORT_SPEC\n        PsiElement(.)('.')\n        IMPORT_STRING\n          STRING_LITERAL\n            PsiElement(string)('\"github.com/smartystreets/goconvey/convey\"')\n      PsiElement())(')')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('TestFoo')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('t')\n          POINTER_TYPE\n            PsiElement(*)('*')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                TYPE_REFERENCE_EXPRESSION\n                  PsiElement(identifier)('testing')\n                PsiElement(.)('.')\n                PsiElement(identifier)('T')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('Convey')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              STRING_LITERAL\n                PsiElement(string)('\"All starts with 1\"')\n              PsiElement(,)(',')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('t')\n              PsiElement(,)(',')\n              FUNCTION_LIT\n                PsiElement(func)('func')\n                SIGNATURE\n                  PARAMETERS\n                    PsiElement(()('(')\n                    PsiElement())(')')\n                BLOCK\n                  PsiElement({)('{')\n                  SIMPLE_STATEMENT\n                    LEFT_HAND_EXPR_LIST\n                      CALL_EXPR\n                        REFERENCE_EXPRESSION\n                          PsiElement(identifier)('So')\n                        ARGUMENT_LIST\n                          PsiElement(()('(')\n                          CALL_EXPR\n                            REFERENCE_EXPRESSION\n                              PsiElement(identifier)('Foo')\n                            ARGUMENT_LIST\n                              PsiElement(()('(')\n                              PsiElement())(')')\n                          PsiElement(,)(',')\n                          REFERENCE_EXPRESSION\n                            PsiElement(identifier)('ShouldEqual')\n                          PsiElement(,)(',')\n                          LITERAL\n                            PsiElement(int)('1')\n                          PsiElement())(')')\n                  SIMPLE_STATEMENT\n                    LEFT_HAND_EXPR_LIST\n                      CALL_EXPR\n                        REFERENCE_EXPRESSION\n                          PsiElement(identifier)('Convey')\n                        ARGUMENT_LIST\n                          PsiElement(()('(')\n                          STRING_LITERAL\n                            PsiElement(string)('\"Then it increases\"')\n                          PsiElement(,)(',')\n                          FUNCTION_LIT\n                            PsiElement(func)('func')\n                            SIGNATURE\n                              PARAMETERS\n                                PsiElement(()('(')\n                                PsiElement())(')')\n                            BLOCK\n                              PsiElement({)('{')\n                              SIMPLE_STATEMENT\n                                LEFT_HAND_EXPR_LIST\n                                  CALL_EXPR\n                                    REFERENCE_EXPRESSION\n                                      PsiElement(identifier)('So')\n                                    ARGUMENT_LIST\n                                      PsiElement(()('(')\n                                      CALL_EXPR\n                                        REFERENCE_EXPRESSION\n                                          PsiElement(identifier)('Foo')\n                                        ARGUMENT_LIST\n                                          PsiElement(()('(')\n                                          PsiElement())(')')\n                                      PsiElement(,)(',')\n                                      REFERENCE_EXPRESSION\n                                        PsiElement(identifier)('ShouldEqual')\n                                      PsiElement(,)(',')\n                                      LITERAL\n                                        PsiElement(int)('2')\n                                      PsiElement())(')')\n                              SIMPLE_STATEMENT\n                                LEFT_HAND_EXPR_LIST\n                                  CALL_EXPR\n                                    REFERENCE_EXPRESSION\n                                      PsiElement(identifier)('Convey')\n                                    ARGUMENT_LIST\n                                      PsiElement(()('(')\n                                      STRING_LITERAL\n                                        PsiElement(string)('\"Then it increases\"')\n                                      PsiElement(,)(',')\n                                      FUNCTION_LIT\n                                        PsiElement(func)('func')\n                                        SIGNATURE\n                                          PARAMETERS\n                                            PsiElement(()('(')\n                                            PsiElement())(')')\n                                        BLOCK\n                                          PsiElement({)('{')\n                                          SIMPLE_STATEMENT\n                                            LEFT_HAND_EXPR_LIST\n                                              CALL_EXPR\n                                                REFERENCE_EXPRESSION\n                                                  PsiElement(identifier)('So')\n                                                ARGUMENT_LIST\n                                                  PsiElement(()('(')\n                                                  CALL_EXPR\n                                                    REFERENCE_EXPRESSION\n                                                      PsiElement(identifier)('Foo')\n                                                    ARGUMENT_LIST\n                                                      PsiElement(()('(')\n                                                      PsiElement())(')')\n                                                  PsiElement(,)(',')\n                                                  REFERENCE_EXPRESSION\n                                                    PsiElement(identifier)('ShouldEqual')\n                                                  PsiElement(,)(',')\n                                                  LITERAL\n                                                    PsiElement(int)('3')\n                                                  PsiElement())(')')\n                                          SIMPLE_STATEMENT\n                                            LEFT_HAND_EXPR_LIST\n                                              CALL_EXPR\n                                                REFERENCE_EXPRESSION\n                                                  PsiElement(identifier)('Convey')\n                                                ARGUMENT_LIST\n                                                  PsiElement(()('(')\n                                                  STRING_LITERAL\n                                                    PsiElement(string)('\"Then it increases\"')\n                                                  PsiElement(,)(',')\n                                                  FUNCTION_LIT\n                                                    PsiElement(func)('func')\n                                                    SIGNATURE\n                                                      PARAMETERS\n                                                        PsiElement(()('(')\n                                                        PsiElement())(')')\n                                                    BLOCK\n                                                      PsiElement({)('{')\n                                                      SIMPLE_STATEMENT\n                                                        LEFT_HAND_EXPR_LIST\n                                                          CALL_EXPR\n                                                            REFERENCE_EXPRESSION\n                                                              PsiElement(identifier)('So')\n                                                            ARGUMENT_LIST\n                                                              PsiElement(()('(')\n                                                              CALL_EXPR\n                                                                REFERENCE_EXPRESSION\n                                                                  PsiElement(identifier)('Foo')\n                                                                ARGUMENT_LIST\n                                                                  PsiElement(()('(')\n                                                                  PsiElement())(')')\n                                                              PsiElement(,)(',')\n                                                              REFERENCE_EXPRESSION\n                                                                PsiElement(identifier)('ShouldEqual')\n                                                              PsiElement(,)(',')\n                                                              LITERAL\n                                                                PsiElement(int)('4')\n                                                              PsiElement())(')')\n                                                      SIMPLE_STATEMENT\n                                                        LEFT_HAND_EXPR_LIST\n                                                          CALL_EXPR\n                                                            REFERENCE_EXPRESSION\n                                                              PsiElement(identifier)('Convey')\n                                                            ARGUMENT_LIST\n                                                              PsiElement(()('(')\n                                                              STRING_LITERAL\n                                                                PsiElement(string)('\"Then it increases\"')\n                                                              PsiElement(,)(',')\n                                                              FUNCTION_LIT\n                                                                PsiElement(func)('func')\n                                                                SIGNATURE\n                                                                  PARAMETERS\n                                                                    PsiElement(()('(')\n                                                                    PsiElement())(')')\n                                                                BLOCK\n                                                                  PsiElement({)('{')\n                                                                  SIMPLE_STATEMENT\n                                                                    LEFT_HAND_EXPR_LIST\n                                                                      CALL_EXPR\n                                                                        REFERENCE_EXPRESSION\n                                                                          PsiElement(identifier)('So')\n                                                                        ARGUMENT_LIST\n                                                                          PsiElement(()('(')\n                                                                          CALL_EXPR\n                                                                            REFERENCE_EXPRESSION\n                                                                              PsiElement(identifier)('Foo')\n                                                                            ARGUMENT_LIST\n                                                                              PsiElement(()('(')\n                                                                              PsiElement())(')')\n                                                                          PsiElement(,)(',')\n                                                                          REFERENCE_EXPRESSION\n                                                                            PsiElement(identifier)('ShouldEqual')\n                                                                          PsiElement(,)(',')\n                                                                          LITERAL\n                                                                            PsiElement(int)('5')\n                                                                          PsiElement())(')')\n                                                                  SIMPLE_STATEMENT\n                                                                    LEFT_HAND_EXPR_LIST\n                                                                      CALL_EXPR\n                                                                        REFERENCE_EXPRESSION\n                                                                          PsiElement(identifier)('Convey')\n                                                                        ARGUMENT_LIST\n                                                                          PsiElement(()('(')\n                                                                          STRING_LITERAL\n                                                                            PsiElement(string)('\"Then it increases\"')\n                                                                          PsiElement(,)(',')\n                                                                          FUNCTION_LIT\n                                                                            PsiElement(func)('func')\n                                                                            SIGNATURE\n                                                                              PARAMETERS\n                                                                                PsiElement(()('(')\n                                                                                PsiElement())(')')\n                                                                            BLOCK\n                                                                              PsiElement({)('{')\n                                                                              SIMPLE_STATEMENT\n                                                                                LEFT_HAND_EXPR_LIST\n                                                                                  CALL_EXPR\n                                                                                    REFERENCE_EXPRESSION\n                                                                                      PsiElement(identifier)('So')\n                                                                                    ARGUMENT_LIST\n                                                                                      PsiElement(()('(')\n                                                                                      CALL_EXPR\n                                                                                        REFERENCE_EXPRESSION\n                                                                                          PsiElement(identifier)('Foo')\n                                                                                        ARGUMENT_LIST\n                                                                                          PsiElement(()('(')\n                                                                                          PsiElement())(')')\n                                                                                      PsiElement(,)(',')\n                                                                                      REFERENCE_EXPRESSION\n                                                                                        PsiElement(identifier)('ShouldEqual')\n                                                                                      PsiElement(,)(',')\n                                                                                      LITERAL\n                                                                                        PsiElement(int)('6')\n                                                                                      PsiElement())(')')\n                                                                              SIMPLE_STATEMENT\n                                                                                LEFT_HAND_EXPR_LIST\n                                                                                  CALL_EXPR\n                                                                                    REFERENCE_EXPRESSION\n                                                                                      PsiElement(identifier)('Convey')\n                                                                                    ARGUMENT_LIST\n                                                                                      PsiElement(()('(')\n                                                                                      STRING_LITERAL\n                                                                                        PsiElement(string)('\"Then it increases\"')\n                                                                                      PsiElement(,)(',')\n                                                                                      FUNCTION_LIT\n                                                                                        PsiElement(func)('func')\n                                                                                        SIGNATURE\n                                                                                          PARAMETERS\n                                                                                            PsiElement(()('(')\n                                                                                            PsiElement())(')')\n                                                                                        BLOCK\n                                                                                          PsiElement({)('{')\n                                                                                          SIMPLE_STATEMENT\n                                                                                            LEFT_HAND_EXPR_LIST\n                                                                                              CALL_EXPR\n                                                                                                REFERENCE_EXPRESSION\n                                                                                                  PsiElement(identifier)('So')\n                                                                                                ARGUMENT_LIST\n                                                                                                  PsiElement(()('(')\n                                                                                                  CALL_EXPR\n                                                                                                    REFERENCE_EXPRESSION\n                                                                                                      PsiElement(identifier)('Foo')\n                                                                                                    ARGUMENT_LIST\n                                                                                                      PsiElement(()('(')\n                                                                                                      PsiElement())(')')\n                                                                                                  PsiElement(,)(',')\n                                                                                                  REFERENCE_EXPRESSION\n                                                                                                    PsiElement(identifier)('ShouldEqual')\n                                                                                                  PsiElement(,)(',')\n                                                                                                  LITERAL\n                                                                                                    PsiElement(int)('7')\n                                                                                                  PsiElement())(')')\n                                                                                          SIMPLE_STATEMENT\n                                                                                            LEFT_HAND_EXPR_LIST\n                                                                                              CALL_EXPR\n                                                                                                REFERENCE_EXPRESSION\n                                                                                                  PsiElement(identifier)('Convey')\n                                                                                                ARGUMENT_LIST\n                                                                                                  PsiElement(()('(')\n                                                                                                  STRING_LITERAL\n                                                                                                    PsiElement(string)('\"Then it increases\"')\n                                                                                                  PsiElement(,)(',')\n                                                                                                  FUNCTION_LIT\n                                                                                                    PsiElement(func)('func')\n                                                                                                    SIGNATURE\n                                                                                                      PARAMETERS\n                                                                                                        PsiElement(()('(')\n                                                                                                        PsiElement())(')')\n                                                                                                    BLOCK\n                                                                                                      PsiElement({)('{')\n                                                                                                      SIMPLE_STATEMENT\n                                                                                                        LEFT_HAND_EXPR_LIST\n                                                                                                          CALL_EXPR\n                                                                                                            REFERENCE_EXPRESSION\n                                                                                                              PsiElement(identifier)('So')\n                                                                                                            ARGUMENT_LIST\n                                                                                                              PsiElement(()('(')\n                                                                                                              CALL_EXPR\n                                                                                                                REFERENCE_EXPRESSION\n                                                                                                                  PsiElement(identifier)('Foo')\n                                                                                                                ARGUMENT_LIST\n                                                                                                                  PsiElement(()('(')\n                                                                                                                  PsiElement())(')')\n                                                                                                              PsiElement(,)(',')\n                                                                                                              REFERENCE_EXPRESSION\n                                                                                                                PsiElement(identifier)('ShouldEqual')\n                                                                                                              PsiElement(,)(',')\n                                                                                                              LITERAL\n                                                                                                                PsiElement(int)('8')\n                                                                                                              PsiElement())(')')\n                                                                                                      SIMPLE_STATEMENT\n                                                                                                        LEFT_HAND_EXPR_LIST\n                                                                                                          CALL_EXPR\n                                                                                                            REFERENCE_EXPRESSION\n                                                                                                              PsiElement(identifier)('Convey')\n                                                                                                            ARGUMENT_LIST\n                                                                                                              PsiElement(()('(')\n                                                                                                              STRING_LITERAL\n                                                                                                                PsiElement(string)('\"Then it stops\"')\n                                                                                                              PsiElement(,)(',')\n                                                                                                              FUNCTION_LIT\n                                                                                                                PsiElement(func)('func')\n                                                                                                                SIGNATURE\n                                                                                                                  PARAMETERS\n                                                                                                                    PsiElement(()('(')\n                                                                                                                    PsiElement())(')')\n                                                                                                                BLOCK\n                                                                                                                  PsiElement({)('{')\n                                                                                                                  SIMPLE_STATEMENT\n                                                                                                                    LEFT_HAND_EXPR_LIST\n                                                                                                                      CALL_EXPR\n                                                                                                                        REFERENCE_EXPRESSION\n                                                                                                                          PsiElement(identifier)('So')\n                                                                                                                        ARGUMENT_LIST\n                                                                                                                          PsiElement(()('(')\n                                                                                                                          CALL_EXPR\n                                                                                                                            REFERENCE_EXPRESSION\n                                                                                                                              PsiElement(identifier)('Foo')\n                                                                                                                            ARGUMENT_LIST\n                                                                                                                              PsiElement(()('(')\n                                                                                                                              PsiElement())(')')\n                                                                                                                          PsiElement(,)(',')\n                                                                                                                          REFERENCE_EXPRESSION\n                                                                                                                            PsiElement(identifier)('ShouldEqual')\n                                                                                                                          PsiElement(,)(',')\n                                                                                                                          FUNCTION_LIT\n                                                                                                                            PsiElement(func)('func')\n                                                                                                                            SIGNATURE\n                                                                                                                              PARAMETERS\n                                                                                                                                PsiElement(()('(')\n                                                                                                                                PsiElement())(')')\n                                                                                                                            BLOCK\n                                                                                                                              PsiElement({)('{')\n                                                                                                                              PsiElement(})('}')\n                                                                                                                          PsiElement())(')')\n                                                                                                                  PsiElement(})('}')\n                                                                                                              PsiElement())(')')\n                                                                                                      PsiElement(})('}')\n                                                                                                  PsiElement())(')')\n                                                                                          PsiElement(})('}')\n                                                                                      PsiElement())(')')\n                                                                              PsiElement(})('}')\n                                                                          PsiElement())(')')\n                                                                  PsiElement(})('}')\n                                                              PsiElement())(')')\n                                                      PsiElement(})('}')\n                                                  PsiElement())(')')\n                                          PsiElement(})('}')\n                                      PsiElement())(')')\n                              PsiElement(})('}')\n                          PsiElement())(')')\n                  PsiElement(})('}')\n              PsiElement())(')')\n      PsiElement(})('}')"
  },
  {
    "path": "testData/parser/If.go",
    "content": "package main\n\nimport \"fmt\"\n\ntype A struct {\n\n}\n\nfunc main() {\n    var err error\n    if false { panic(err) }\n    if err !=nil {panic(err)}\n    fmt.Println(\"Hello, playground\")\n    \n    x := make(map[string]int)\n    x[\"foo\"] = 1\n    \n    if _, ok := x[\"foo\"]; !ok {fmt.Println(\"Missing key 'foo'\")}\n    \n    type A struct {}\n    if &A{} {panic(\"foo\")} // error, it's ok\n}\n"
  },
  {
    "path": "testData/parser/If.txt",
    "content": "GO_FILE\n  PACKAGE_CLAUSE\n    PsiElement(package)('package')\n    PsiElement(identifier)('main')\n  IMPORT_LIST\n    IMPORT_DECLARATION\n      PsiElement(import)('import')\n      IMPORT_SPEC\n        IMPORT_STRING\n          STRING_LITERAL\n            PsiElement(string)('\"fmt\"')\n  TYPE_DECLARATION\n    PsiElement(type)('type')\n    TYPE_SPEC\n      SPEC_TYPE\n        PsiElement(identifier)('A')\n        STRUCT_TYPE\n          PsiElement(struct)('struct')\n          PsiElement({)('{')\n          PsiElement(})('}')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('main')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      STATEMENT\n        VAR_DECLARATION\n          PsiElement(var)('var')\n          VAR_SPEC\n            VAR_DEFINITION\n              PsiElement(identifier)('err')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('error')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('false')\n        BLOCK\n          PsiElement({)('{')\n          SIMPLE_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('panic')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('err')\n                  PsiElement())(')')\n          PsiElement(})('}')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            CONDITIONAL_EXPR\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('err')\n              PsiElement(!=)('!=')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('nil')\n        BLOCK\n          PsiElement({)('{')\n          SIMPLE_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('panic')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('err')\n                  PsiElement())(')')\n          PsiElement(})('}')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('fmt')\n              PsiElement(.)('.')\n              PsiElement(identifier)('Println')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              STRING_LITERAL\n                PsiElement(string)('\"Hello, playground\"')\n              PsiElement())(')')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('x')\n          PsiElement(:=)(':=')\n          BUILTIN_CALL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('make')\n            BUILTIN_ARGUMENT_LIST\n              PsiElement(()('(')\n              MAP_TYPE\n                PsiElement(map)('map')\n                PsiElement([)('[')\n                TYPE\n                  TYPE_REFERENCE_EXPRESSION\n                    PsiElement(identifier)('string')\n                PsiElement(])(']')\n                TYPE\n                  TYPE_REFERENCE_EXPRESSION\n                    PsiElement(identifier)('int')\n              PsiElement())(')')\n      ASSIGNMENT_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          INDEX_OR_SLICE_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('x')\n            PsiElement([)('[')\n            STRING_LITERAL\n              PsiElement(string)('\"foo\"')\n            PsiElement(])(']')\n        ASSIGN_OP\n          PsiElement(=)('=')\n        LITERAL\n          PsiElement(int)('1')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          SHORT_VAR_DECLARATION\n            VAR_DEFINITION\n              PsiElement(identifier)('_')\n            PsiElement(,)(',')\n            VAR_DEFINITION\n              PsiElement(identifier)('ok')\n            PsiElement(:=)(':=')\n            INDEX_OR_SLICE_EXPR\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('x')\n              PsiElement([)('[')\n              STRING_LITERAL\n                PsiElement(string)('\"foo\"')\n              PsiElement(])(']')\n        PsiElement(;)(';')\n        UNARY_EXPR\n          PsiElement(!)('!')\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('ok')\n        BLOCK\n          PsiElement({)('{')\n          SIMPLE_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('fmt')\n                  PsiElement(.)('.')\n                  PsiElement(identifier)('Println')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  STRING_LITERAL\n                    PsiElement(string)('\"Missing key 'foo'\"')\n                  PsiElement())(')')\n          PsiElement(})('}')\n      STATEMENT\n        TYPE_DECLARATION\n          PsiElement(type)('type')\n          TYPE_SPEC\n            SPEC_TYPE\n              PsiElement(identifier)('A')\n              STRUCT_TYPE\n                PsiElement(struct)('struct')\n                PsiElement({)('{')\n                PsiElement(})('}')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            UNARY_EXPR\n              PsiElement(&)('&')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('A')\n        BLOCK\n          PsiElement({)('{')\n          PsiElement(})('}')\n      PsiErrorElement:';', <NL>, else or '}' expected, got '{'\n        <empty list>\n      STATEMENT\n        BLOCK\n          PsiElement({)('{')\n          SIMPLE_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('panic')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  STRING_LITERAL\n                    PsiElement(string)('\"foo\"')\n                  PsiElement())(')')\n          PsiElement(})('}')\n      PsiComment(GO_LINE_COMMENT)('// error, it's ok')\n      PsiElement(})('}')"
  },
  {
    "path": "testData/parser/IfComposite.go",
    "content": "package main\n\nfunc main() {\n    if allowedErrors[osPkg{\"\", \"\"}] {\n     \n    }\n}\n\ntype osPkg struct {\n    goos, pkg string\n}\n\n\nvar allowedErrors = map[osPkg]bool{\n    osPkg{\"windows\", \"log/syslog\"}: true,\n    osPkg{\"plan9\", \"log/syslog\"}:   true,\n}\n"
  },
  {
    "path": "testData/parser/IfComposite.txt",
    "content": "GO_FILE\n  PACKAGE_CLAUSE\n    PsiElement(package)('package')\n    PsiElement(identifier)('main')\n  IMPORT_LIST\n    <empty list>\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('main')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            INDEX_OR_SLICE_EXPR\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('allowedErrors')\n              PsiElement([)('[')\n              COMPOSITE_LIT\n                TYPE_REFERENCE_EXPRESSION\n                  PsiElement(identifier)('osPkg')\n                LITERAL_VALUE\n                  PsiElement({)('{')\n                  ELEMENT\n                    VALUE\n                      STRING_LITERAL\n                        PsiElement(string)('\"\"')\n                  PsiElement(,)(',')\n                  ELEMENT\n                    VALUE\n                      STRING_LITERAL\n                        PsiElement(string)('\"\"')\n                  PsiElement(})('}')\n              PsiElement(])(']')\n        BLOCK\n          PsiElement({)('{')\n          PsiElement(})('}')\n      PsiElement(})('}')\n  TYPE_DECLARATION\n    PsiElement(type)('type')\n    TYPE_SPEC\n      SPEC_TYPE\n        PsiElement(identifier)('osPkg')\n        STRUCT_TYPE\n          PsiElement(struct)('struct')\n          PsiElement({)('{')\n          FIELD_DECLARATION\n            FIELD_DEFINITION\n              PsiElement(identifier)('goos')\n            PsiElement(,)(',')\n            FIELD_DEFINITION\n              PsiElement(identifier)('pkg')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('string')\n          PsiElement(})('}')\n  VAR_DECLARATION\n    PsiElement(var)('var')\n    VAR_SPEC\n      VAR_DEFINITION\n        PsiElement(identifier)('allowedErrors')\n      PsiElement(=)('=')\n      COMPOSITE_LIT\n        MAP_TYPE\n          PsiElement(map)('map')\n          PsiElement([)('[')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('osPkg')\n          PsiElement(])(']')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('bool')\n        LITERAL_VALUE\n          PsiElement({)('{')\n          ELEMENT\n            KEY\n              COMPOSITE_LIT\n                TYPE_REFERENCE_EXPRESSION\n                  PsiElement(identifier)('osPkg')\n                LITERAL_VALUE\n                  PsiElement({)('{')\n                  ELEMENT\n                    VALUE\n                      STRING_LITERAL\n                        PsiElement(string)('\"windows\"')\n                  PsiElement(,)(',')\n                  ELEMENT\n                    VALUE\n                      STRING_LITERAL\n                        PsiElement(string)('\"log/syslog\"')\n                  PsiElement(})('}')\n            PsiElement(:)(':')\n            VALUE\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('true')\n          PsiElement(,)(',')\n          ELEMENT\n            KEY\n              COMPOSITE_LIT\n                TYPE_REFERENCE_EXPRESSION\n                  PsiElement(identifier)('osPkg')\n                LITERAL_VALUE\n                  PsiElement({)('{')\n                  ELEMENT\n                    VALUE\n                      STRING_LITERAL\n                        PsiElement(string)('\"plan9\"')\n                  PsiElement(,)(',')\n                  ELEMENT\n                    VALUE\n                      STRING_LITERAL\n                        PsiElement(string)('\"log/syslog\"')\n                  PsiElement(})('}')\n            PsiElement(:)(':')\n            VALUE\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('true')\n          PsiElement(,)(',')\n          PsiElement(})('}')"
  },
  {
    "path": "testData/parser/IfWithNew.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// HTTP server.  See RFC 2616.\n\npackage http\n\n\nfunc (sh serverHandler) ServeHTTP(rw ResponseWriter, req *Request) {\n  for {\n        w, err := c.readRequest()\n  }\n  \n  for atomic.LoadUint32(&x) != expected {\n  \n  }\n  \n  for ; ; c <- *a[S{}.i] {\n          if t != nil {\n                  break\n          }\n  }\n  \n  if req.RequestURI == \"*\" && req.Method == \"OPTIONS\" {\n        handler = globalOptionsHandler{}\n  }\n  \n  for {\n          handler = globalOptionsHandler{}\n  }\n  \n  if err := bar(func() int {return 42}); err != nil {\n        panic(err)\n  }\n  \n  type M2 struct { name string; want int }\n\n  for n, tt := range []M2{\n      {\"Alice\", 1}, \n      {\"Bob\", 2},\n      {\"Chris\", 3},\n  } {\n      fmt.Print(n, tt)\n  }\n}\n\nfunc ValidName(name string) (string, error) {\n    if kind, ok := map[string]string{\n        \"basic\":  \"Basic\",\n        \"active\": \"Active\",\n    }[strings.ToLower(name)]; ok {\n        return kind, nil\n    } else {\n        return \"\", fmt.Errorf(\"Invalid name: %s\", name)\n    }\n}"
  },
  {
    "path": "testData/parser/IfWithNew.txt",
    "content": "GO_FILE\n  PsiComment(GO_LINE_COMMENT)('// Copyright 2009 The Go Authors. All rights reserved.')\n  PsiComment(GO_LINE_COMMENT)('// Use of this source code is governed by a BSD-style')\n  PsiComment(GO_LINE_COMMENT)('// license that can be found in the LICENSE file.')\n  PsiComment(GO_LINE_COMMENT)('// HTTP server.  See RFC 2616.')\n  PACKAGE_CLAUSE\n    PsiElement(package)('package')\n    PsiElement(identifier)('http')\n  IMPORT_LIST\n    <empty list>\n  METHOD_DECLARATION\n    PsiElement(func)('func')\n    RECEIVER\n      PsiElement(()('(')\n      PsiElement(identifier)('sh')\n      TYPE\n        TYPE_REFERENCE_EXPRESSION\n          PsiElement(identifier)('serverHandler')\n      PsiElement())(')')\n    PsiElement(identifier)('ServeHTTP')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('rw')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('ResponseWriter')\n        PsiElement(,)(',')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('req')\n          POINTER_TYPE\n            PsiElement(*)('*')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('Request')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      FOR_STATEMENT\n        PsiElement(for)('for')\n        BLOCK\n          PsiElement({)('{')\n          SIMPLE_STATEMENT\n            SHORT_VAR_DECLARATION\n              VAR_DEFINITION\n                PsiElement(identifier)('w')\n              PsiElement(,)(',')\n              VAR_DEFINITION\n                PsiElement(identifier)('err')\n              PsiElement(:=)(':=')\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('c')\n                  PsiElement(.)('.')\n                  PsiElement(identifier)('readRequest')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  PsiElement())(')')\n          PsiElement(})('}')\n      FOR_STATEMENT\n        PsiElement(for)('for')\n        CONDITIONAL_EXPR\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('atomic')\n              PsiElement(.)('.')\n              PsiElement(identifier)('LoadUint32')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              UNARY_EXPR\n                PsiElement(&)('&')\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('x')\n              PsiElement())(')')\n          PsiElement(!=)('!=')\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('expected')\n        BLOCK\n          PsiElement({)('{')\n          PsiElement(})('}')\n      FOR_STATEMENT\n        PsiElement(for)('for')\n        FOR_CLAUSE\n          PsiElement(;)(';')\n          PsiElement(;)(';')\n          SEND_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('c')\n            PsiElement(<-)('<-')\n            UNARY_EXPR\n              PsiElement(*)('*')\n              INDEX_OR_SLICE_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('a')\n                PsiElement([)('[')\n                SELECTOR_EXPR\n                  COMPOSITE_LIT\n                    TYPE_REFERENCE_EXPRESSION\n                      PsiElement(identifier)('S')\n                    LITERAL_VALUE\n                      PsiElement({)('{')\n                      PsiElement(})('}')\n                  PsiElement(.)('.')\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('i')\n                PsiElement(])(']')\n        BLOCK\n          PsiElement({)('{')\n          IF_STATEMENT\n            PsiElement(if)('if')\n            SIMPLE_STATEMENT\n              LEFT_HAND_EXPR_LIST\n                CONDITIONAL_EXPR\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('t')\n                  PsiElement(!=)('!=')\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('nil')\n            BLOCK\n              PsiElement({)('{')\n              BREAK_STATEMENT\n                PsiElement(break)('break')\n              PsiElement(})('}')\n          PsiElement(})('}')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            AND_EXPR\n              CONDITIONAL_EXPR\n                REFERENCE_EXPRESSION\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('req')\n                  PsiElement(.)('.')\n                  PsiElement(identifier)('RequestURI')\n                PsiElement(==)('==')\n                STRING_LITERAL\n                  PsiElement(string)('\"*\"')\n              PsiElement(&&)('&&')\n              CONDITIONAL_EXPR\n                REFERENCE_EXPRESSION\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('req')\n                  PsiElement(.)('.')\n                  PsiElement(identifier)('Method')\n                PsiElement(==)('==')\n                STRING_LITERAL\n                  PsiElement(string)('\"OPTIONS\"')\n        BLOCK\n          PsiElement({)('{')\n          ASSIGNMENT_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('handler')\n            ASSIGN_OP\n              PsiElement(=)('=')\n            COMPOSITE_LIT\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('globalOptionsHandler')\n              LITERAL_VALUE\n                PsiElement({)('{')\n                PsiElement(})('}')\n          PsiElement(})('}')\n      FOR_STATEMENT\n        PsiElement(for)('for')\n        BLOCK\n          PsiElement({)('{')\n          ASSIGNMENT_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('handler')\n            ASSIGN_OP\n              PsiElement(=)('=')\n            COMPOSITE_LIT\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('globalOptionsHandler')\n              LITERAL_VALUE\n                PsiElement({)('{')\n                PsiElement(})('}')\n          PsiElement(})('}')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          SHORT_VAR_DECLARATION\n            VAR_DEFINITION\n              PsiElement(identifier)('err')\n            PsiElement(:=)(':=')\n            CALL_EXPR\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('bar')\n              ARGUMENT_LIST\n                PsiElement(()('(')\n                FUNCTION_LIT\n                  PsiElement(func)('func')\n                  SIGNATURE\n                    PARAMETERS\n                      PsiElement(()('(')\n                      PsiElement())(')')\n                    RESULT\n                      TYPE\n                        TYPE_REFERENCE_EXPRESSION\n                          PsiElement(identifier)('int')\n                  BLOCK\n                    PsiElement({)('{')\n                    RETURN_STATEMENT\n                      PsiElement(return)('return')\n                      LITERAL\n                        PsiElement(int)('42')\n                    PsiElement(})('}')\n                PsiElement())(')')\n        PsiElement(;)(';')\n        CONDITIONAL_EXPR\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('err')\n          PsiElement(!=)('!=')\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('nil')\n        BLOCK\n          PsiElement({)('{')\n          SIMPLE_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('panic')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('err')\n                  PsiElement())(')')\n          PsiElement(})('}')\n      STATEMENT\n        TYPE_DECLARATION\n          PsiElement(type)('type')\n          TYPE_SPEC\n            SPEC_TYPE\n              PsiElement(identifier)('M2')\n              STRUCT_TYPE\n                PsiElement(struct)('struct')\n                PsiElement({)('{')\n                FIELD_DECLARATION\n                  FIELD_DEFINITION\n                    PsiElement(identifier)('name')\n                  TYPE\n                    TYPE_REFERENCE_EXPRESSION\n                      PsiElement(identifier)('string')\n                PsiElement(;)(';')\n                FIELD_DECLARATION\n                  FIELD_DEFINITION\n                    PsiElement(identifier)('want')\n                  TYPE\n                    TYPE_REFERENCE_EXPRESSION\n                      PsiElement(identifier)('int')\n                PsiElement(})('}')\n      FOR_STATEMENT\n        PsiElement(for)('for')\n        RANGE_CLAUSE\n          VAR_DEFINITION\n            PsiElement(identifier)('n')\n          PsiElement(,)(',')\n          VAR_DEFINITION\n            PsiElement(identifier)('tt')\n          PsiElement(:=)(':=')\n          PsiElement(range)('range')\n          COMPOSITE_LIT\n            ARRAY_OR_SLICE_TYPE\n              PsiElement([)('[')\n              PsiElement(])(']')\n              TYPE\n                TYPE_REFERENCE_EXPRESSION\n                  PsiElement(identifier)('M2')\n            LITERAL_VALUE\n              PsiElement({)('{')\n              ELEMENT\n                VALUE\n                  LITERAL_VALUE\n                    PsiElement({)('{')\n                    ELEMENT\n                      VALUE\n                        STRING_LITERAL\n                          PsiElement(string)('\"Alice\"')\n                    PsiElement(,)(',')\n                    ELEMENT\n                      VALUE\n                        LITERAL\n                          PsiElement(int)('1')\n                    PsiElement(})('}')\n              PsiElement(,)(',')\n              ELEMENT\n                VALUE\n                  LITERAL_VALUE\n                    PsiElement({)('{')\n                    ELEMENT\n                      VALUE\n                        STRING_LITERAL\n                          PsiElement(string)('\"Bob\"')\n                    PsiElement(,)(',')\n                    ELEMENT\n                      VALUE\n                        LITERAL\n                          PsiElement(int)('2')\n                    PsiElement(})('}')\n              PsiElement(,)(',')\n              ELEMENT\n                VALUE\n                  LITERAL_VALUE\n                    PsiElement({)('{')\n                    ELEMENT\n                      VALUE\n                        STRING_LITERAL\n                          PsiElement(string)('\"Chris\"')\n                    PsiElement(,)(',')\n                    ELEMENT\n                      VALUE\n                        LITERAL\n                          PsiElement(int)('3')\n                    PsiElement(})('}')\n              PsiElement(,)(',')\n              PsiElement(})('}')\n        BLOCK\n          PsiElement({)('{')\n          SIMPLE_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('fmt')\n                  PsiElement(.)('.')\n                  PsiElement(identifier)('Print')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('n')\n                  PsiElement(,)(',')\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('tt')\n                  PsiElement())(')')\n          PsiElement(})('}')\n      PsiElement(})('}')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('ValidName')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('name')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('string')\n        PsiElement())(')')\n      RESULT\n        PsiElement(()('(')\n        TYPE_LIST\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('string')\n          PsiElement(,)(',')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('error')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          SHORT_VAR_DECLARATION\n            VAR_DEFINITION\n              PsiElement(identifier)('kind')\n            PsiElement(,)(',')\n            VAR_DEFINITION\n              PsiElement(identifier)('ok')\n            PsiElement(:=)(':=')\n            INDEX_OR_SLICE_EXPR\n              COMPOSITE_LIT\n                MAP_TYPE\n                  PsiElement(map)('map')\n                  PsiElement([)('[')\n                  TYPE\n                    TYPE_REFERENCE_EXPRESSION\n                      PsiElement(identifier)('string')\n                  PsiElement(])(']')\n                  TYPE\n                    TYPE_REFERENCE_EXPRESSION\n                      PsiElement(identifier)('string')\n                LITERAL_VALUE\n                  PsiElement({)('{')\n                  ELEMENT\n                    KEY\n                      STRING_LITERAL\n                        PsiElement(string)('\"basic\"')\n                    PsiElement(:)(':')\n                    VALUE\n                      STRING_LITERAL\n                        PsiElement(string)('\"Basic\"')\n                  PsiElement(,)(',')\n                  ELEMENT\n                    KEY\n                      STRING_LITERAL\n                        PsiElement(string)('\"active\"')\n                    PsiElement(:)(':')\n                    VALUE\n                      STRING_LITERAL\n                        PsiElement(string)('\"Active\"')\n                  PsiElement(,)(',')\n                  PsiElement(})('}')\n              PsiElement([)('[')\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('strings')\n                  PsiElement(.)('.')\n                  PsiElement(identifier)('ToLower')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('name')\n                  PsiElement())(')')\n              PsiElement(])(']')\n        PsiElement(;)(';')\n        REFERENCE_EXPRESSION\n          PsiElement(identifier)('ok')\n        BLOCK\n          PsiElement({)('{')\n          RETURN_STATEMENT\n            PsiElement(return)('return')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('kind')\n            PsiElement(,)(',')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('nil')\n          PsiElement(})('}')\n        ELSE_STATEMENT\n          PsiElement(else)('else')\n          BLOCK\n            PsiElement({)('{')\n            RETURN_STATEMENT\n              PsiElement(return)('return')\n              STRING_LITERAL\n                PsiElement(string)('\"\"')\n              PsiElement(,)(',')\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('fmt')\n                  PsiElement(.)('.')\n                  PsiElement(identifier)('Errorf')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  STRING_LITERAL\n                    PsiElement(string)('\"Invalid name: %s\"')\n                  PsiElement(,)(',')\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('name')\n                  PsiElement())(')')\n            PsiElement(})('}')\n      PsiElement(})('}')"
  },
  {
    "path": "testData/parser/IncDec.go",
    "content": "package main\n\nfunc main() {\n\tvar a = 1\n\tvar b = 1\n\ta, b++\n\ta, b--\n\t\n\ta++\n\tb++\n}"
  },
  {
    "path": "testData/parser/IncDec.txt",
    "content": "GO_FILE\n  PACKAGE_CLAUSE\n    PsiElement(package)('package')\n    PsiElement(identifier)('main')\n  IMPORT_LIST\n    <empty list>\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('main')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      STATEMENT\n        VAR_DECLARATION\n          PsiElement(var)('var')\n          VAR_SPEC\n            VAR_DEFINITION\n              PsiElement(identifier)('a')\n            PsiElement(=)('=')\n            LITERAL\n              PsiElement(int)('1')\n      STATEMENT\n        VAR_DECLARATION\n          PsiElement(var)('var')\n          VAR_SPEC\n            VAR_DEFINITION\n              PsiElement(identifier)('b')\n            PsiElement(=)('=')\n            LITERAL\n              PsiElement(int)('1')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('a')\n          PsiElement(,)(',')\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('b')\n      PsiErrorElement:',', ';', <-, <NL>, <assign op> or '}' expected, got '++'\n        PsiElement(++)('++')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('a')\n          PsiElement(,)(',')\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('b')\n      PsiErrorElement:',', ';', <-, <NL>, <assign op> or '}' expected, got '--'\n        PsiElement(--)('--')\n      INC_DEC_STATEMENT\n        REFERENCE_EXPRESSION\n          PsiElement(identifier)('a')\n        PsiElement(++)('++')\n      INC_DEC_STATEMENT\n        REFERENCE_EXPRESSION\n          PsiElement(identifier)('b')\n        PsiElement(++)('++')\n      PsiElement(})('}')"
  },
  {
    "path": "testData/parser/IncompleteRanges.go",
    "content": "package ff\n\nfunc main() {\n\tfor a = ran\n\tfor b := ran\n\tfor ran  \n\tfor i := 1;;\n}"
  },
  {
    "path": "testData/parser/IncompleteRanges.txt",
    "content": "GO_FILE\n  PACKAGE_CLAUSE\n    PsiElement(package)('package')\n    PsiElement(identifier)('ff')\n  IMPORT_LIST\n    <empty list>\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('main')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      FOR_STATEMENT\n        PsiElement(for)('for')\n        RANGE_CLAUSE\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('a')\n          PsiElement(=)('=')\n          PsiErrorElement:range expected, got 'ran'\n            <empty list>\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('ran')\n      FOR_STATEMENT\n        PsiElement(for)('for')\n        RANGE_CLAUSE\n          VAR_DEFINITION\n            PsiElement(identifier)('b')\n          PsiElement(:=)(':=')\n          PsiErrorElement:',', '=' or range expected, got 'ran'\n            <empty list>\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('ran')\n      FOR_STATEMENT\n        PsiElement(for)('for')\n      PsiErrorElement:'!', '&', '(', '*', '+', '-', ';', <-, <NL>, <expression>, '[', '^', chan, func, identifier, interface, map, struct, '{' or '}' expected, got 'ran'\n        <empty list>\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('ran')\n      FOR_STATEMENT\n        PsiElement(for)('for')\n        FOR_CLAUSE\n          SIMPLE_STATEMENT\n            SHORT_VAR_DECLARATION\n              VAR_DEFINITION\n                PsiElement(identifier)('i')\n              PsiElement(:=)(':=')\n              LITERAL\n                PsiElement(int)('1')\n          PsiElement(;)(';')\n          PsiElement(;)(';')\n        PsiErrorElement:<simple statement> or '{' expected, got '}'\n          <empty list>\n      PsiElement(})('}')"
  },
  {
    "path": "testData/parser/IncompleteTypeDeclaration.go",
    "content": "package ff\n\ntype (\n  a\n  b\n  c\n)\n\nfunc main() {}\n\n"
  },
  {
    "path": "testData/parser/IncompleteTypeDeclaration.txt",
    "content": "GO_FILE\n  PACKAGE_CLAUSE\n    PsiElement(package)('package')\n    PsiElement(identifier)('ff')\n  IMPORT_LIST\n    <empty list>\n  TYPE_DECLARATION\n    PsiElement(type)('type')\n    PsiElement(()('(')\n    TYPE_SPEC\n      SPEC_TYPE\n        PsiElement(identifier)('a')\n        PsiErrorElement:<type> expected, got ''\n          <empty list>\n    TYPE_SPEC\n      SPEC_TYPE\n        PsiElement(identifier)('b')\n        PsiErrorElement:<type> expected, got ''\n          <empty list>\n    TYPE_SPEC\n      SPEC_TYPE\n        PsiElement(identifier)('c')\n        PsiErrorElement:<type> expected, got ''\n          <empty list>\n    PsiElement())(')')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('main')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      PsiElement(})('}')"
  },
  {
    "path": "testData/parser/IncompleteVarDeclaration.go",
    "content": "package ff\n\nvar (\n  a\n  b\n  c = \n)\n\nfunc main() {}\n\ntype foo struct {\n\tbar string\n}\n\nvar (\n\tbaz = []*foo{\n\t\t{\n\n\t\t},\n\t}\n\nfunc foo1() {\n\t\n}"
  },
  {
    "path": "testData/parser/IncompleteVarDeclaration.txt",
    "content": "GO_FILE\n  PACKAGE_CLAUSE\n    PsiElement(package)('package')\n    PsiElement(identifier)('ff')\n  IMPORT_LIST\n    <empty list>\n  VAR_DECLARATION\n    PsiElement(var)('var')\n    PsiElement(()('(')\n    VAR_SPEC\n      VAR_DEFINITION\n        PsiElement(identifier)('a')\n      PsiErrorElement:',', <type> or '=' expected, got ''\n        <empty list>\n    VAR_SPEC\n      VAR_DEFINITION\n        PsiElement(identifier)('b')\n      PsiErrorElement:',', <type> or '=' expected, got ''\n        <empty list>\n    VAR_SPEC\n      VAR_DEFINITION\n        PsiElement(identifier)('c')\n      PsiElement(=)('=')\n      PsiErrorElement:<expression> expected, got ')'\n        <empty list>\n    PsiElement())(')')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('main')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      PsiElement(})('}')\n  TYPE_DECLARATION\n    PsiElement(type)('type')\n    TYPE_SPEC\n      SPEC_TYPE\n        PsiElement(identifier)('foo')\n        STRUCT_TYPE\n          PsiElement(struct)('struct')\n          PsiElement({)('{')\n          FIELD_DECLARATION\n            FIELD_DEFINITION\n              PsiElement(identifier)('bar')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('string')\n          PsiElement(})('}')\n  VAR_DECLARATION\n    PsiElement(var)('var')\n    PsiElement(()('(')\n    VAR_SPEC\n      VAR_DEFINITION\n        PsiElement(identifier)('baz')\n      PsiElement(=)('=')\n      COMPOSITE_LIT\n        ARRAY_OR_SLICE_TYPE\n          PsiElement([)('[')\n          PsiElement(])(']')\n          POINTER_TYPE\n            PsiElement(*)('*')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('foo')\n        LITERAL_VALUE\n          PsiElement({)('{')\n          ELEMENT\n            VALUE\n              LITERAL_VALUE\n                PsiElement({)('{')\n                PsiElement(})('}')\n          PsiElement(,)(',')\n          PsiElement(})('}')\n    PsiErrorElement:')' or identifier expected, got 'func'\n      <empty list>\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('foo1')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      PsiElement(})('}')"
  },
  {
    "path": "testData/parser/Labels.go",
    "content": "// errorcheck\n\n// Copyright 2011 The Go Authors.  All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n\n// Verify that erroneous labels are caught by the compiler.\n// This set is caught by pass 2. That's why this file is label1.go.\n// Does not compile.\n\npackage main\n\nvar x int\n\nfunc f() {\nL1:\n\tfor {\n\t\tif x == 0 {\n\t\t\tbreak L1\n\t\t}\n\t\tif x == 1 {\n\t\t\tcontinue L1\n\t\t}\n\t\tgoto L1\n\t}\n\nL2:\n\tselect {\n\tdefault:\n\t\tif x == 0 {\n\t\t\tbreak L2\n\t\t}\n\t\tif x == 1 {\n\t\t\tcontinue L2 // ERROR \"invalid continue label .*L2\"\n\t\t}\n\t\tgoto L2\n\t}\n\nL3:\n\tswitch {\n\tcase x > 10:\n\t\tif x == 11 {\n\t\t\tbreak L3\n\t\t}\n\t\tif x == 12 {\n\t\t\tcontinue L3 // ERROR \"invalid continue label .*L3\"\n\t\t}\n\t\tgoto L3\n\t}\n\nL4:\n\tif true {\n\t\tif x == 13 {\n\t\t\tbreak L4 // ERROR \"invalid break label .*L4\"\n\t\t}\n\t\tif x == 14 {\n\t\t\tcontinue L4 // ERROR \"invalid continue label .*L4\"\n\t\t}\n\t\tif x == 15 {\n\t\t\tgoto L4\n\t\t}\n\t}\n\nL5:\n\tf()\n\tif x == 16 {\n\t\tbreak L5 // ERROR \"invalid break label .*L5\"\n\t}\n\tif x == 17 {\n\t\tcontinue L5 // ERROR \"invalid continue label .*L5\"\n\t}\n\tif x == 18 {\n\t\tgoto L5\n\t}\n\n\tfor {\n\t\tif x == 19 {\n\t\t\tbreak L1 // ERROR \"invalid break label .*L1\"\n\t\t}\n\t\tif x == 20 {\n\t\t\tcontinue L1 // ERROR \"invalid continue label .*L1\"\n\t\t}\n\t\tif x == 21 {\n\t\t\tgoto L1\n\t\t}\n\t}\n}"
  },
  {
    "path": "testData/parser/Labels.txt",
    "content": "GO_FILE\n  PsiComment(GO_LINE_COMMENT)('// errorcheck')\n  PsiComment(GO_LINE_COMMENT)('// Copyright 2011 The Go Authors.  All rights reserved.')\n  PsiComment(GO_LINE_COMMENT)('// Use of this source code is governed by a BSD-style')\n  PsiComment(GO_LINE_COMMENT)('// license that can be found in the LICENSE file.')\n  PsiComment(GO_LINE_COMMENT)('// Verify that erroneous labels are caught by the compiler.')\n  PsiComment(GO_LINE_COMMENT)('// This set is caught by pass 2. That's why this file is label1.go.')\n  PsiComment(GO_LINE_COMMENT)('// Does not compile.')\n  PACKAGE_CLAUSE\n    PsiElement(package)('package')\n    PsiElement(identifier)('main')\n  IMPORT_LIST\n    <empty list>\n  VAR_DECLARATION\n    PsiElement(var)('var')\n    VAR_SPEC\n      VAR_DEFINITION\n        PsiElement(identifier)('x')\n      TYPE\n        TYPE_REFERENCE_EXPRESSION\n          PsiElement(identifier)('int')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('f')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      LABELED_STATEMENT\n        LABEL_DEFINITION\n          PsiElement(identifier)('L1')\n        PsiElement(:)(':')\n        FOR_STATEMENT\n          PsiElement(for)('for')\n          BLOCK\n            PsiElement({)('{')\n            IF_STATEMENT\n              PsiElement(if)('if')\n              SIMPLE_STATEMENT\n                LEFT_HAND_EXPR_LIST\n                  CONDITIONAL_EXPR\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('x')\n                    PsiElement(==)('==')\n                    LITERAL\n                      PsiElement(int)('0')\n              BLOCK\n                PsiElement({)('{')\n                BREAK_STATEMENT\n                  PsiElement(break)('break')\n                  LABEL_REF\n                    PsiElement(identifier)('L1')\n                PsiElement(})('}')\n            IF_STATEMENT\n              PsiElement(if)('if')\n              SIMPLE_STATEMENT\n                LEFT_HAND_EXPR_LIST\n                  CONDITIONAL_EXPR\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('x')\n                    PsiElement(==)('==')\n                    LITERAL\n                      PsiElement(int)('1')\n              BLOCK\n                PsiElement({)('{')\n                CONTINUE_STATEMENT\n                  PsiElement(continue)('continue')\n                  LABEL_REF\n                    PsiElement(identifier)('L1')\n                PsiElement(})('}')\n            GOTO_STATEMENT\n              PsiElement(goto)('goto')\n              LABEL_REF\n                PsiElement(identifier)('L1')\n            PsiElement(})('}')\n      LABELED_STATEMENT\n        LABEL_DEFINITION\n          PsiElement(identifier)('L2')\n        PsiElement(:)(':')\n        SELECT_STATEMENT\n          PsiElement(select)('select')\n          PsiElement({)('{')\n          COMM_CLAUSE\n            COMM_CASE\n              PsiElement(default)('default')\n            PsiElement(:)(':')\n            IF_STATEMENT\n              PsiElement(if)('if')\n              SIMPLE_STATEMENT\n                LEFT_HAND_EXPR_LIST\n                  CONDITIONAL_EXPR\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('x')\n                    PsiElement(==)('==')\n                    LITERAL\n                      PsiElement(int)('0')\n              BLOCK\n                PsiElement({)('{')\n                BREAK_STATEMENT\n                  PsiElement(break)('break')\n                  LABEL_REF\n                    PsiElement(identifier)('L2')\n                PsiElement(})('}')\n            IF_STATEMENT\n              PsiElement(if)('if')\n              SIMPLE_STATEMENT\n                LEFT_HAND_EXPR_LIST\n                  CONDITIONAL_EXPR\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('x')\n                    PsiElement(==)('==')\n                    LITERAL\n                      PsiElement(int)('1')\n              BLOCK\n                PsiElement({)('{')\n                CONTINUE_STATEMENT\n                  PsiElement(continue)('continue')\n                  LABEL_REF\n                    PsiElement(identifier)('L2')\n                PsiComment(GO_LINE_COMMENT)('// ERROR \"invalid continue label .*L2\"')\n                PsiElement(})('}')\n            GOTO_STATEMENT\n              PsiElement(goto)('goto')\n              LABEL_REF\n                PsiElement(identifier)('L2')\n          PsiElement(})('}')\n      LABELED_STATEMENT\n        LABEL_DEFINITION\n          PsiElement(identifier)('L3')\n        PsiElement(:)(':')\n        EXPR_SWITCH_STATEMENT\n          SWITCH_START\n            PsiElement(switch)('switch')\n          PsiElement({)('{')\n          EXPR_CASE_CLAUSE\n            PsiElement(case)('case')\n            CONDITIONAL_EXPR\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('x')\n              PsiElement(>)('>')\n              LITERAL\n                PsiElement(int)('10')\n            PsiElement(:)(':')\n            IF_STATEMENT\n              PsiElement(if)('if')\n              SIMPLE_STATEMENT\n                LEFT_HAND_EXPR_LIST\n                  CONDITIONAL_EXPR\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('x')\n                    PsiElement(==)('==')\n                    LITERAL\n                      PsiElement(int)('11')\n              BLOCK\n                PsiElement({)('{')\n                BREAK_STATEMENT\n                  PsiElement(break)('break')\n                  LABEL_REF\n                    PsiElement(identifier)('L3')\n                PsiElement(})('}')\n            IF_STATEMENT\n              PsiElement(if)('if')\n              SIMPLE_STATEMENT\n                LEFT_HAND_EXPR_LIST\n                  CONDITIONAL_EXPR\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('x')\n                    PsiElement(==)('==')\n                    LITERAL\n                      PsiElement(int)('12')\n              BLOCK\n                PsiElement({)('{')\n                CONTINUE_STATEMENT\n                  PsiElement(continue)('continue')\n                  LABEL_REF\n                    PsiElement(identifier)('L3')\n                PsiComment(GO_LINE_COMMENT)('// ERROR \"invalid continue label .*L3\"')\n                PsiElement(})('}')\n            GOTO_STATEMENT\n              PsiElement(goto)('goto')\n              LABEL_REF\n                PsiElement(identifier)('L3')\n          PsiElement(})('}')\n      LABELED_STATEMENT\n        LABEL_DEFINITION\n          PsiElement(identifier)('L4')\n        PsiElement(:)(':')\n        IF_STATEMENT\n          PsiElement(if)('if')\n          SIMPLE_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('true')\n          BLOCK\n            PsiElement({)('{')\n            IF_STATEMENT\n              PsiElement(if)('if')\n              SIMPLE_STATEMENT\n                LEFT_HAND_EXPR_LIST\n                  CONDITIONAL_EXPR\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('x')\n                    PsiElement(==)('==')\n                    LITERAL\n                      PsiElement(int)('13')\n              BLOCK\n                PsiElement({)('{')\n                BREAK_STATEMENT\n                  PsiElement(break)('break')\n                  LABEL_REF\n                    PsiElement(identifier)('L4')\n                PsiComment(GO_LINE_COMMENT)('// ERROR \"invalid break label .*L4\"')\n                PsiElement(})('}')\n            IF_STATEMENT\n              PsiElement(if)('if')\n              SIMPLE_STATEMENT\n                LEFT_HAND_EXPR_LIST\n                  CONDITIONAL_EXPR\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('x')\n                    PsiElement(==)('==')\n                    LITERAL\n                      PsiElement(int)('14')\n              BLOCK\n                PsiElement({)('{')\n                CONTINUE_STATEMENT\n                  PsiElement(continue)('continue')\n                  LABEL_REF\n                    PsiElement(identifier)('L4')\n                PsiComment(GO_LINE_COMMENT)('// ERROR \"invalid continue label .*L4\"')\n                PsiElement(})('}')\n            IF_STATEMENT\n              PsiElement(if)('if')\n              SIMPLE_STATEMENT\n                LEFT_HAND_EXPR_LIST\n                  CONDITIONAL_EXPR\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('x')\n                    PsiElement(==)('==')\n                    LITERAL\n                      PsiElement(int)('15')\n              BLOCK\n                PsiElement({)('{')\n                GOTO_STATEMENT\n                  PsiElement(goto)('goto')\n                  LABEL_REF\n                    PsiElement(identifier)('L4')\n                PsiElement(})('}')\n            PsiElement(})('}')\n      LABELED_STATEMENT\n        LABEL_DEFINITION\n          PsiElement(identifier)('L5')\n        PsiElement(:)(':')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            CALL_EXPR\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('f')\n              ARGUMENT_LIST\n                PsiElement(()('(')\n                PsiElement())(')')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            CONDITIONAL_EXPR\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('x')\n              PsiElement(==)('==')\n              LITERAL\n                PsiElement(int)('16')\n        BLOCK\n          PsiElement({)('{')\n          BREAK_STATEMENT\n            PsiElement(break)('break')\n            LABEL_REF\n              PsiElement(identifier)('L5')\n          PsiComment(GO_LINE_COMMENT)('// ERROR \"invalid break label .*L5\"')\n          PsiElement(})('}')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            CONDITIONAL_EXPR\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('x')\n              PsiElement(==)('==')\n              LITERAL\n                PsiElement(int)('17')\n        BLOCK\n          PsiElement({)('{')\n          CONTINUE_STATEMENT\n            PsiElement(continue)('continue')\n            LABEL_REF\n              PsiElement(identifier)('L5')\n          PsiComment(GO_LINE_COMMENT)('// ERROR \"invalid continue label .*L5\"')\n          PsiElement(})('}')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            CONDITIONAL_EXPR\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('x')\n              PsiElement(==)('==')\n              LITERAL\n                PsiElement(int)('18')\n        BLOCK\n          PsiElement({)('{')\n          GOTO_STATEMENT\n            PsiElement(goto)('goto')\n            LABEL_REF\n              PsiElement(identifier)('L5')\n          PsiElement(})('}')\n      FOR_STATEMENT\n        PsiElement(for)('for')\n        BLOCK\n          PsiElement({)('{')\n          IF_STATEMENT\n            PsiElement(if)('if')\n            SIMPLE_STATEMENT\n              LEFT_HAND_EXPR_LIST\n                CONDITIONAL_EXPR\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('x')\n                  PsiElement(==)('==')\n                  LITERAL\n                    PsiElement(int)('19')\n            BLOCK\n              PsiElement({)('{')\n              BREAK_STATEMENT\n                PsiElement(break)('break')\n                LABEL_REF\n                  PsiElement(identifier)('L1')\n              PsiComment(GO_LINE_COMMENT)('// ERROR \"invalid break label .*L1\"')\n              PsiElement(})('}')\n          IF_STATEMENT\n            PsiElement(if)('if')\n            SIMPLE_STATEMENT\n              LEFT_HAND_EXPR_LIST\n                CONDITIONAL_EXPR\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('x')\n                  PsiElement(==)('==')\n                  LITERAL\n                    PsiElement(int)('20')\n            BLOCK\n              PsiElement({)('{')\n              CONTINUE_STATEMENT\n                PsiElement(continue)('continue')\n                LABEL_REF\n                  PsiElement(identifier)('L1')\n              PsiComment(GO_LINE_COMMENT)('// ERROR \"invalid continue label .*L1\"')\n              PsiElement(})('}')\n          IF_STATEMENT\n            PsiElement(if)('if')\n            SIMPLE_STATEMENT\n              LEFT_HAND_EXPR_LIST\n                CONDITIONAL_EXPR\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('x')\n                  PsiElement(==)('==')\n                  LITERAL\n                    PsiElement(int)('21')\n            BLOCK\n              PsiElement({)('{')\n              GOTO_STATEMENT\n                PsiElement(goto)('goto')\n                LABEL_REF\n                  PsiElement(identifier)('L1')\n              PsiElement(})('}')\n          PsiElement(})('}')\n      PsiElement(})('}')"
  },
  {
    "path": "testData/parser/LiteralValues.go",
    "content": "// DO NOT EDIT. THIS IS FILE IS GENERATED AUTOMAGICALLY. ANY CHANGE WILL BE LOST.\n\npackage cli\n\nimport (\n        \"bytes\"\n        \"encoding/json\"\n        \"errors\"\n        \"fmt\"\n        \"io\"\n        \"net\"\n        \"net/textproto\"\n        \"strings\"\n        \"sync/atomic\"\n        \"text/template\"\n)\n\ntype session struct {\n        *textproto.Conn\n        netConn    net.Conn\n        lineBuffer bytes.Buffer\n        requestId  uint32\n        sessionId  uint32\n        outType    int\n        closed     bool\n}\n\ntype θ_parse_node struct {\n        name     string\n        ident    bool\n        bindings []int\n        action   func(*session, []string) error\n        doc      string\n        next     []θ_parse_node\n}\n\n\nfunc (s *session) θ_echo(p []string) (err error) {\n        ret := echo(p[0])\n        err = s.θ_writeResponse(ret, nil)\n        if err != nil {\n                return err\n        } else {\n                return s.θ_writeOk()\n        }\n}\nfunc (s *session) θ_get_server_time(p []string) (err error) {\n        ret := get_server_time()\n        err = s.θ_writeResponse(ret, nil)\n        if err != nil {\n                return err\n        } else {\n                return s.θ_writeOk()\n        }\n}\nfunc (s *session) θ_get_server_time(p []string) (err error) {\n        ret := get_server_time()\n        err = s.θ_writeResponse(ret, nil)\n        if err != nil {\n                return err\n        } else {\n                return s.θ_writeOk()\n        }\n}\nfunc (s *session) θ_debug_ide(p []string) (err error) {\n        p0, err := s.parse_number(p[0])\n        if err != nil {\n                return s.θ_writeError(err)\n        }\n        ret := debug_ide(p0)\n        err = s.θ_writeResponse(ret, nil)\n        if err != nil {\n                return err\n        } else {\n                return s.θ_writeOk()\n        }\n}\n\nvar θ_parse_tree = θ_parse_node{\"\", true, []int{}, nil, \"\", []θ_parse_node{θ_parse_node{\"debug\", true, []int{}, nil, \"\", []θ_parse_node{θ_parse_node{\"idea\", true, []int{}, nil, \"\", []θ_parse_node{θ_parse_node{\"patience\", true, []int{}, nil, \"\", []θ_parse_node{θ_parse_node{\"for\", true, []int{}, nil, \"\", []θ_parse_node{θ_parse_node{\"tree\", true, []int{}, nil, \"\", []θ_parse_node{θ_parse_node{\"with\", true, []int{}, nil, \"\", []θ_parse_node{θ_parse_node{\"nested\", true, []int{}, nil, \"\", []θ_parse_node{θ_parse_node{\"level\", true, []int{}, nil, \"\", []θ_parse_node{θ_parse_node{\"more\", true, []int{}, nil, \"\", []θ_parse_node{θ_parse_node{\"than\", true, []int{}, nil, \"\", []θ_parse_node{θ_parse_node{\"<number>\", false, []int{0}, (*session).θ_debug_ide, \"here goes an unnecessary long command\", []θ_parse_node{}}}}}}}}}}}}}}}}}}}}}}, θ_parse_node{\"echo\", true, []int{}, nil, \"\", []θ_parse_node{θ_parse_node{\"<string>\", false, []int{0}, (*session).θ_echo, \"Returns its parameter\", []θ_parse_node{}}}}, θ_parse_node{\"get\", true, []int{}, nil, \"\", []θ_parse_node{θ_parse_node{\"output\", true, []int{}, nil, \"\", []θ_parse_node{θ_parse_node{\"type\", true, []int{}, (*session).θ_get_output_type, \"returns current output type\", []θ_parse_node{}}}}, θ_parse_node{\"server\", true, []int{}, nil, \"\", []θ_parse_node{θ_parse_node{\"time\", true, []int{}, (*session).θ_get_server_time, \"Returns server time\", []θ_parse_node{}}}}}}, θ_parse_node{\"quit\", true, []int{}, (*session).θ_quit, \"closes CLI connection\", []θ_parse_node{}}, θ_parse_node{\"set\", true, []int{}, nil, \"\", []θ_parse_node{θ_parse_node{\"output\", true, []int{}, nil, \"\", []θ_parse_node{θ_parse_node{\"type\", true, []int{}, nil, \"\", []θ_parse_node{θ_parse_node{\"to\", true, []int{}, nil, \"\", []θ_parse_node{θ_parse_node{\"<string>\", false, []int{0}, (*session).θ_set_output_type, \"sets current output type (either json or text)\", []θ_parse_node{}}}}}}}}}}, θ_parse_node{\"show\", true, []int{}, nil, \"\", []θ_parse_node{θ_parse_node{\"server\", true, []int{}, nil, \"\", []θ_parse_node{θ_parse_node{\"time\", true, []int{}, (*session).θ_get_server_time, \"Returns server time\", []θ_parse_node{}}}}}}}}\n\n\ntype stru struct {\n    Field string\n    Field1 map[string]string\n}\n\ntype str struct {\n    Fiel *stru\n}\n\nfunc de() *stru {\n    a := &stru{\n        Field: \"demo\",\n        Field1: map[string]string{\"f1\": \"val\"},\n    }\n\n    a.Field = \"dem\"\n    a.Field1 = map[string]string{\"f2\": \"val\"}\n\n    return a\n}\n\nfunc dem() {\n    b := de()\n    b.Field = \"de\"\n    b.Field1 = map[string]string{\"f3\": \"fal\"}\n\n    a := *str{\n        Fiel: &stru{\n            Field: fmt.Sprint(\"demo%d\", 1),\n            Field1: map[string]string{\"a\", \"n\"},\n        },\n    }\n\n    for i := 0; i<4; i++ {\n        a.Fiel = &stru{\n            Field: fmt.Sprintf(\"demo %d\", i), // parser fails here\n            Field1: map[string]string{\n                \"a\",\n                \"n\",\n            },\n        }\n    }\n\n    _ = b\n    _ = a\n}"
  },
  {
    "path": "testData/parser/LiteralValues.txt",
    "content": "GO_FILE\n  PsiComment(GO_LINE_COMMENT)('// DO NOT EDIT. THIS IS FILE IS GENERATED AUTOMAGICALLY. ANY CHANGE WILL BE LOST.')\n  PACKAGE_CLAUSE\n    PsiElement(package)('package')\n    PsiElement(identifier)('cli')\n  IMPORT_LIST\n    IMPORT_DECLARATION\n      PsiElement(import)('import')\n      PsiElement(()('(')\n      IMPORT_SPEC\n        IMPORT_STRING\n          STRING_LITERAL\n            PsiElement(string)('\"bytes\"')\n      IMPORT_SPEC\n        IMPORT_STRING\n          STRING_LITERAL\n            PsiElement(string)('\"encoding/json\"')\n      IMPORT_SPEC\n        IMPORT_STRING\n          STRING_LITERAL\n            PsiElement(string)('\"errors\"')\n      IMPORT_SPEC\n        IMPORT_STRING\n          STRING_LITERAL\n            PsiElement(string)('\"fmt\"')\n      IMPORT_SPEC\n        IMPORT_STRING\n          STRING_LITERAL\n            PsiElement(string)('\"io\"')\n      IMPORT_SPEC\n        IMPORT_STRING\n          STRING_LITERAL\n            PsiElement(string)('\"net\"')\n      IMPORT_SPEC\n        IMPORT_STRING\n          STRING_LITERAL\n            PsiElement(string)('\"net/textproto\"')\n      IMPORT_SPEC\n        IMPORT_STRING\n          STRING_LITERAL\n            PsiElement(string)('\"strings\"')\n      IMPORT_SPEC\n        IMPORT_STRING\n          STRING_LITERAL\n            PsiElement(string)('\"sync/atomic\"')\n      IMPORT_SPEC\n        IMPORT_STRING\n          STRING_LITERAL\n            PsiElement(string)('\"text/template\"')\n      PsiElement())(')')\n  TYPE_DECLARATION\n    PsiElement(type)('type')\n    TYPE_SPEC\n      SPEC_TYPE\n        PsiElement(identifier)('session')\n        STRUCT_TYPE\n          PsiElement(struct)('struct')\n          PsiElement({)('{')\n          FIELD_DECLARATION\n            ANONYMOUS_FIELD_DEFINITION\n              POINTER_TYPE\n                PsiElement(*)('*')\n                TYPE\n                  TYPE_REFERENCE_EXPRESSION\n                    TYPE_REFERENCE_EXPRESSION\n                      PsiElement(identifier)('textproto')\n                    PsiElement(.)('.')\n                    PsiElement(identifier)('Conn')\n          FIELD_DECLARATION\n            FIELD_DEFINITION\n              PsiElement(identifier)('netConn')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                TYPE_REFERENCE_EXPRESSION\n                  PsiElement(identifier)('net')\n                PsiElement(.)('.')\n                PsiElement(identifier)('Conn')\n          FIELD_DECLARATION\n            FIELD_DEFINITION\n              PsiElement(identifier)('lineBuffer')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                TYPE_REFERENCE_EXPRESSION\n                  PsiElement(identifier)('bytes')\n                PsiElement(.)('.')\n                PsiElement(identifier)('Buffer')\n          FIELD_DECLARATION\n            FIELD_DEFINITION\n              PsiElement(identifier)('requestId')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('uint32')\n          FIELD_DECLARATION\n            FIELD_DEFINITION\n              PsiElement(identifier)('sessionId')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('uint32')\n          FIELD_DECLARATION\n            FIELD_DEFINITION\n              PsiElement(identifier)('outType')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('int')\n          FIELD_DECLARATION\n            FIELD_DEFINITION\n              PsiElement(identifier)('closed')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('bool')\n          PsiElement(})('}')\n  TYPE_DECLARATION\n    PsiElement(type)('type')\n    TYPE_SPEC\n      SPEC_TYPE\n        PsiElement(identifier)('θ_parse_node')\n        STRUCT_TYPE\n          PsiElement(struct)('struct')\n          PsiElement({)('{')\n          FIELD_DECLARATION\n            FIELD_DEFINITION\n              PsiElement(identifier)('name')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('string')\n          FIELD_DECLARATION\n            FIELD_DEFINITION\n              PsiElement(identifier)('ident')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('bool')\n          FIELD_DECLARATION\n            FIELD_DEFINITION\n              PsiElement(identifier)('bindings')\n            ARRAY_OR_SLICE_TYPE\n              PsiElement([)('[')\n              PsiElement(])(']')\n              TYPE\n                TYPE_REFERENCE_EXPRESSION\n                  PsiElement(identifier)('int')\n          FIELD_DECLARATION\n            FIELD_DEFINITION\n              PsiElement(identifier)('action')\n            FUNCTION_TYPE\n              PsiElement(func)('func')\n              SIGNATURE\n                PARAMETERS\n                  PsiElement(()('(')\n                  PARAMETER_DECLARATION\n                    POINTER_TYPE\n                      PsiElement(*)('*')\n                      TYPE\n                        TYPE_REFERENCE_EXPRESSION\n                          PsiElement(identifier)('session')\n                  PsiElement(,)(',')\n                  PARAMETER_DECLARATION\n                    ARRAY_OR_SLICE_TYPE\n                      PsiElement([)('[')\n                      PsiElement(])(']')\n                      TYPE\n                        TYPE_REFERENCE_EXPRESSION\n                          PsiElement(identifier)('string')\n                  PsiElement())(')')\n                RESULT\n                  TYPE\n                    TYPE_REFERENCE_EXPRESSION\n                      PsiElement(identifier)('error')\n          FIELD_DECLARATION\n            FIELD_DEFINITION\n              PsiElement(identifier)('doc')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('string')\n          FIELD_DECLARATION\n            FIELD_DEFINITION\n              PsiElement(identifier)('next')\n            ARRAY_OR_SLICE_TYPE\n              PsiElement([)('[')\n              PsiElement(])(']')\n              TYPE\n                TYPE_REFERENCE_EXPRESSION\n                  PsiElement(identifier)('θ_parse_node')\n          PsiElement(})('}')\n  METHOD_DECLARATION\n    PsiElement(func)('func')\n    RECEIVER\n      PsiElement(()('(')\n      PsiElement(identifier)('s')\n      POINTER_TYPE\n        PsiElement(*)('*')\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('session')\n      PsiElement())(')')\n    PsiElement(identifier)('θ_echo')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('p')\n          ARRAY_OR_SLICE_TYPE\n            PsiElement([)('[')\n            PsiElement(])(']')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('string')\n        PsiElement())(')')\n      RESULT\n        PARAMETERS\n          PsiElement(()('(')\n          PARAMETER_DECLARATION\n            PARAM_DEFINITION\n              PsiElement(identifier)('err')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('error')\n          PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('ret')\n          PsiElement(:=)(':=')\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('echo')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              INDEX_OR_SLICE_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('p')\n                PsiElement([)('[')\n                LITERAL\n                  PsiElement(int)('0')\n                PsiElement(])(']')\n              PsiElement())(')')\n      ASSIGNMENT_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('err')\n        ASSIGN_OP\n          PsiElement(=)('=')\n        CALL_EXPR\n          REFERENCE_EXPRESSION\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('s')\n            PsiElement(.)('.')\n            PsiElement(identifier)('θ_writeResponse')\n          ARGUMENT_LIST\n            PsiElement(()('(')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('ret')\n            PsiElement(,)(',')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('nil')\n            PsiElement())(')')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            CONDITIONAL_EXPR\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('err')\n              PsiElement(!=)('!=')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('nil')\n        BLOCK\n          PsiElement({)('{')\n          RETURN_STATEMENT\n            PsiElement(return)('return')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('err')\n          PsiElement(})('}')\n        ELSE_STATEMENT\n          PsiElement(else)('else')\n          BLOCK\n            PsiElement({)('{')\n            RETURN_STATEMENT\n              PsiElement(return)('return')\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('s')\n                  PsiElement(.)('.')\n                  PsiElement(identifier)('θ_writeOk')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  PsiElement())(')')\n            PsiElement(})('}')\n      PsiElement(})('}')\n  METHOD_DECLARATION\n    PsiElement(func)('func')\n    RECEIVER\n      PsiElement(()('(')\n      PsiElement(identifier)('s')\n      POINTER_TYPE\n        PsiElement(*)('*')\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('session')\n      PsiElement())(')')\n    PsiElement(identifier)('θ_get_server_time')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('p')\n          ARRAY_OR_SLICE_TYPE\n            PsiElement([)('[')\n            PsiElement(])(']')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('string')\n        PsiElement())(')')\n      RESULT\n        PARAMETERS\n          PsiElement(()('(')\n          PARAMETER_DECLARATION\n            PARAM_DEFINITION\n              PsiElement(identifier)('err')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('error')\n          PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('ret')\n          PsiElement(:=)(':=')\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('get_server_time')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              PsiElement())(')')\n      ASSIGNMENT_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('err')\n        ASSIGN_OP\n          PsiElement(=)('=')\n        CALL_EXPR\n          REFERENCE_EXPRESSION\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('s')\n            PsiElement(.)('.')\n            PsiElement(identifier)('θ_writeResponse')\n          ARGUMENT_LIST\n            PsiElement(()('(')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('ret')\n            PsiElement(,)(',')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('nil')\n            PsiElement())(')')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            CONDITIONAL_EXPR\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('err')\n              PsiElement(!=)('!=')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('nil')\n        BLOCK\n          PsiElement({)('{')\n          RETURN_STATEMENT\n            PsiElement(return)('return')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('err')\n          PsiElement(})('}')\n        ELSE_STATEMENT\n          PsiElement(else)('else')\n          BLOCK\n            PsiElement({)('{')\n            RETURN_STATEMENT\n              PsiElement(return)('return')\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('s')\n                  PsiElement(.)('.')\n                  PsiElement(identifier)('θ_writeOk')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  PsiElement())(')')\n            PsiElement(})('}')\n      PsiElement(})('}')\n  METHOD_DECLARATION\n    PsiElement(func)('func')\n    RECEIVER\n      PsiElement(()('(')\n      PsiElement(identifier)('s')\n      POINTER_TYPE\n        PsiElement(*)('*')\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('session')\n      PsiElement())(')')\n    PsiElement(identifier)('θ_get_server_time')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('p')\n          ARRAY_OR_SLICE_TYPE\n            PsiElement([)('[')\n            PsiElement(])(']')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('string')\n        PsiElement())(')')\n      RESULT\n        PARAMETERS\n          PsiElement(()('(')\n          PARAMETER_DECLARATION\n            PARAM_DEFINITION\n              PsiElement(identifier)('err')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('error')\n          PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('ret')\n          PsiElement(:=)(':=')\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('get_server_time')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              PsiElement())(')')\n      ASSIGNMENT_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('err')\n        ASSIGN_OP\n          PsiElement(=)('=')\n        CALL_EXPR\n          REFERENCE_EXPRESSION\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('s')\n            PsiElement(.)('.')\n            PsiElement(identifier)('θ_writeResponse')\n          ARGUMENT_LIST\n            PsiElement(()('(')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('ret')\n            PsiElement(,)(',')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('nil')\n            PsiElement())(')')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            CONDITIONAL_EXPR\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('err')\n              PsiElement(!=)('!=')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('nil')\n        BLOCK\n          PsiElement({)('{')\n          RETURN_STATEMENT\n            PsiElement(return)('return')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('err')\n          PsiElement(})('}')\n        ELSE_STATEMENT\n          PsiElement(else)('else')\n          BLOCK\n            PsiElement({)('{')\n            RETURN_STATEMENT\n              PsiElement(return)('return')\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('s')\n                  PsiElement(.)('.')\n                  PsiElement(identifier)('θ_writeOk')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  PsiElement())(')')\n            PsiElement(})('}')\n      PsiElement(})('}')\n  METHOD_DECLARATION\n    PsiElement(func)('func')\n    RECEIVER\n      PsiElement(()('(')\n      PsiElement(identifier)('s')\n      POINTER_TYPE\n        PsiElement(*)('*')\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('session')\n      PsiElement())(')')\n    PsiElement(identifier)('θ_debug_ide')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('p')\n          ARRAY_OR_SLICE_TYPE\n            PsiElement([)('[')\n            PsiElement(])(']')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('string')\n        PsiElement())(')')\n      RESULT\n        PARAMETERS\n          PsiElement(()('(')\n          PARAMETER_DECLARATION\n            PARAM_DEFINITION\n              PsiElement(identifier)('err')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('error')\n          PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('p0')\n          PsiElement(,)(',')\n          VAR_DEFINITION\n            PsiElement(identifier)('err')\n          PsiElement(:=)(':=')\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('s')\n              PsiElement(.)('.')\n              PsiElement(identifier)('parse_number')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              INDEX_OR_SLICE_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('p')\n                PsiElement([)('[')\n                LITERAL\n                  PsiElement(int)('0')\n                PsiElement(])(']')\n              PsiElement())(')')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            CONDITIONAL_EXPR\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('err')\n              PsiElement(!=)('!=')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('nil')\n        BLOCK\n          PsiElement({)('{')\n          RETURN_STATEMENT\n            PsiElement(return)('return')\n            CALL_EXPR\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('s')\n                PsiElement(.)('.')\n                PsiElement(identifier)('θ_writeError')\n              ARGUMENT_LIST\n                PsiElement(()('(')\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('err')\n                PsiElement())(')')\n          PsiElement(})('}')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('ret')\n          PsiElement(:=)(':=')\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('debug_ide')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('p0')\n              PsiElement())(')')\n      ASSIGNMENT_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('err')\n        ASSIGN_OP\n          PsiElement(=)('=')\n        CALL_EXPR\n          REFERENCE_EXPRESSION\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('s')\n            PsiElement(.)('.')\n            PsiElement(identifier)('θ_writeResponse')\n          ARGUMENT_LIST\n            PsiElement(()('(')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('ret')\n            PsiElement(,)(',')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('nil')\n            PsiElement())(')')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            CONDITIONAL_EXPR\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('err')\n              PsiElement(!=)('!=')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('nil')\n        BLOCK\n          PsiElement({)('{')\n          RETURN_STATEMENT\n            PsiElement(return)('return')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('err')\n          PsiElement(})('}')\n        ELSE_STATEMENT\n          PsiElement(else)('else')\n          BLOCK\n            PsiElement({)('{')\n            RETURN_STATEMENT\n              PsiElement(return)('return')\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('s')\n                  PsiElement(.)('.')\n                  PsiElement(identifier)('θ_writeOk')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  PsiElement())(')')\n            PsiElement(})('}')\n      PsiElement(})('}')\n  VAR_DECLARATION\n    PsiElement(var)('var')\n    VAR_SPEC\n      VAR_DEFINITION\n        PsiElement(identifier)('θ_parse_tree')\n      PsiElement(=)('=')\n      COMPOSITE_LIT\n        TYPE_REFERENCE_EXPRESSION\n          PsiElement(identifier)('θ_parse_node')\n        LITERAL_VALUE\n          PsiElement({)('{')\n          ELEMENT\n            VALUE\n              STRING_LITERAL\n                PsiElement(string)('\"\"')\n          PsiElement(,)(',')\n          ELEMENT\n            VALUE\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('true')\n          PsiElement(,)(',')\n          ELEMENT\n            VALUE\n              COMPOSITE_LIT\n                ARRAY_OR_SLICE_TYPE\n                  PsiElement([)('[')\n                  PsiElement(])(']')\n                  TYPE\n                    TYPE_REFERENCE_EXPRESSION\n                      PsiElement(identifier)('int')\n                LITERAL_VALUE\n                  PsiElement({)('{')\n                  PsiElement(})('}')\n          PsiElement(,)(',')\n          ELEMENT\n            VALUE\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('nil')\n          PsiElement(,)(',')\n          ELEMENT\n            VALUE\n              STRING_LITERAL\n                PsiElement(string)('\"\"')\n          PsiElement(,)(',')\n          ELEMENT\n            VALUE\n              COMPOSITE_LIT\n                ARRAY_OR_SLICE_TYPE\n                  PsiElement([)('[')\n                  PsiElement(])(']')\n                  TYPE\n                    TYPE_REFERENCE_EXPRESSION\n                      PsiElement(identifier)('θ_parse_node')\n                LITERAL_VALUE\n                  PsiElement({)('{')\n                  ELEMENT\n                    VALUE\n                      COMPOSITE_LIT\n                        TYPE_REFERENCE_EXPRESSION\n                          PsiElement(identifier)('θ_parse_node')\n                        LITERAL_VALUE\n                          PsiElement({)('{')\n                          ELEMENT\n                            VALUE\n                              STRING_LITERAL\n                                PsiElement(string)('\"debug\"')\n                          PsiElement(,)(',')\n                          ELEMENT\n                            VALUE\n                              REFERENCE_EXPRESSION\n                                PsiElement(identifier)('true')\n                          PsiElement(,)(',')\n                          ELEMENT\n                            VALUE\n                              COMPOSITE_LIT\n                                ARRAY_OR_SLICE_TYPE\n                                  PsiElement([)('[')\n                                  PsiElement(])(']')\n                                  TYPE\n                                    TYPE_REFERENCE_EXPRESSION\n                                      PsiElement(identifier)('int')\n                                LITERAL_VALUE\n                                  PsiElement({)('{')\n                                  PsiElement(})('}')\n                          PsiElement(,)(',')\n                          ELEMENT\n                            VALUE\n                              REFERENCE_EXPRESSION\n                                PsiElement(identifier)('nil')\n                          PsiElement(,)(',')\n                          ELEMENT\n                            VALUE\n                              STRING_LITERAL\n                                PsiElement(string)('\"\"')\n                          PsiElement(,)(',')\n                          ELEMENT\n                            VALUE\n                              COMPOSITE_LIT\n                                ARRAY_OR_SLICE_TYPE\n                                  PsiElement([)('[')\n                                  PsiElement(])(']')\n                                  TYPE\n                                    TYPE_REFERENCE_EXPRESSION\n                                      PsiElement(identifier)('θ_parse_node')\n                                LITERAL_VALUE\n                                  PsiElement({)('{')\n                                  ELEMENT\n                                    VALUE\n                                      COMPOSITE_LIT\n                                        TYPE_REFERENCE_EXPRESSION\n                                          PsiElement(identifier)('θ_parse_node')\n                                        LITERAL_VALUE\n                                          PsiElement({)('{')\n                                          ELEMENT\n                                            VALUE\n                                              STRING_LITERAL\n                                                PsiElement(string)('\"idea\"')\n                                          PsiElement(,)(',')\n                                          ELEMENT\n                                            VALUE\n                                              REFERENCE_EXPRESSION\n                                                PsiElement(identifier)('true')\n                                          PsiElement(,)(',')\n                                          ELEMENT\n                                            VALUE\n                                              COMPOSITE_LIT\n                                                ARRAY_OR_SLICE_TYPE\n                                                  PsiElement([)('[')\n                                                  PsiElement(])(']')\n                                                  TYPE\n                                                    TYPE_REFERENCE_EXPRESSION\n                                                      PsiElement(identifier)('int')\n                                                LITERAL_VALUE\n                                                  PsiElement({)('{')\n                                                  PsiElement(})('}')\n                                          PsiElement(,)(',')\n                                          ELEMENT\n                                            VALUE\n                                              REFERENCE_EXPRESSION\n                                                PsiElement(identifier)('nil')\n                                          PsiElement(,)(',')\n                                          ELEMENT\n                                            VALUE\n                                              STRING_LITERAL\n                                                PsiElement(string)('\"\"')\n                                          PsiElement(,)(',')\n                                          ELEMENT\n                                            VALUE\n                                              COMPOSITE_LIT\n                                                ARRAY_OR_SLICE_TYPE\n                                                  PsiElement([)('[')\n                                                  PsiElement(])(']')\n                                                  TYPE\n                                                    TYPE_REFERENCE_EXPRESSION\n                                                      PsiElement(identifier)('θ_parse_node')\n                                                LITERAL_VALUE\n                                                  PsiElement({)('{')\n                                                  ELEMENT\n                                                    VALUE\n                                                      COMPOSITE_LIT\n                                                        TYPE_REFERENCE_EXPRESSION\n                                                          PsiElement(identifier)('θ_parse_node')\n                                                        LITERAL_VALUE\n                                                          PsiElement({)('{')\n                                                          ELEMENT\n                                                            VALUE\n                                                              STRING_LITERAL\n                                                                PsiElement(string)('\"patience\"')\n                                                          PsiElement(,)(',')\n                                                          ELEMENT\n                                                            VALUE\n                                                              REFERENCE_EXPRESSION\n                                                                PsiElement(identifier)('true')\n                                                          PsiElement(,)(',')\n                                                          ELEMENT\n                                                            VALUE\n                                                              COMPOSITE_LIT\n                                                                ARRAY_OR_SLICE_TYPE\n                                                                  PsiElement([)('[')\n                                                                  PsiElement(])(']')\n                                                                  TYPE\n                                                                    TYPE_REFERENCE_EXPRESSION\n                                                                      PsiElement(identifier)('int')\n                                                                LITERAL_VALUE\n                                                                  PsiElement({)('{')\n                                                                  PsiElement(})('}')\n                                                          PsiElement(,)(',')\n                                                          ELEMENT\n                                                            VALUE\n                                                              REFERENCE_EXPRESSION\n                                                                PsiElement(identifier)('nil')\n                                                          PsiElement(,)(',')\n                                                          ELEMENT\n                                                            VALUE\n                                                              STRING_LITERAL\n                                                                PsiElement(string)('\"\"')\n                                                          PsiElement(,)(',')\n                                                          ELEMENT\n                                                            VALUE\n                                                              COMPOSITE_LIT\n                                                                ARRAY_OR_SLICE_TYPE\n                                                                  PsiElement([)('[')\n                                                                  PsiElement(])(']')\n                                                                  TYPE\n                                                                    TYPE_REFERENCE_EXPRESSION\n                                                                      PsiElement(identifier)('θ_parse_node')\n                                                                LITERAL_VALUE\n                                                                  PsiElement({)('{')\n                                                                  ELEMENT\n                                                                    VALUE\n                                                                      COMPOSITE_LIT\n                                                                        TYPE_REFERENCE_EXPRESSION\n                                                                          PsiElement(identifier)('θ_parse_node')\n                                                                        LITERAL_VALUE\n                                                                          PsiElement({)('{')\n                                                                          ELEMENT\n                                                                            VALUE\n                                                                              STRING_LITERAL\n                                                                                PsiElement(string)('\"for\"')\n                                                                          PsiElement(,)(',')\n                                                                          ELEMENT\n                                                                            VALUE\n                                                                              REFERENCE_EXPRESSION\n                                                                                PsiElement(identifier)('true')\n                                                                          PsiElement(,)(',')\n                                                                          ELEMENT\n                                                                            VALUE\n                                                                              COMPOSITE_LIT\n                                                                                ARRAY_OR_SLICE_TYPE\n                                                                                  PsiElement([)('[')\n                                                                                  PsiElement(])(']')\n                                                                                  TYPE\n                                                                                    TYPE_REFERENCE_EXPRESSION\n                                                                                      PsiElement(identifier)('int')\n                                                                                LITERAL_VALUE\n                                                                                  PsiElement({)('{')\n                                                                                  PsiElement(})('}')\n                                                                          PsiElement(,)(',')\n                                                                          ELEMENT\n                                                                            VALUE\n                                                                              REFERENCE_EXPRESSION\n                                                                                PsiElement(identifier)('nil')\n                                                                          PsiElement(,)(',')\n                                                                          ELEMENT\n                                                                            VALUE\n                                                                              STRING_LITERAL\n                                                                                PsiElement(string)('\"\"')\n                                                                          PsiElement(,)(',')\n                                                                          ELEMENT\n                                                                            VALUE\n                                                                              COMPOSITE_LIT\n                                                                                ARRAY_OR_SLICE_TYPE\n                                                                                  PsiElement([)('[')\n                                                                                  PsiElement(])(']')\n                                                                                  TYPE\n                                                                                    TYPE_REFERENCE_EXPRESSION\n                                                                                      PsiElement(identifier)('θ_parse_node')\n                                                                                LITERAL_VALUE\n                                                                                  PsiElement({)('{')\n                                                                                  ELEMENT\n                                                                                    VALUE\n                                                                                      COMPOSITE_LIT\n                                                                                        TYPE_REFERENCE_EXPRESSION\n                                                                                          PsiElement(identifier)('θ_parse_node')\n                                                                                        LITERAL_VALUE\n                                                                                          PsiElement({)('{')\n                                                                                          ELEMENT\n                                                                                            VALUE\n                                                                                              STRING_LITERAL\n                                                                                                PsiElement(string)('\"tree\"')\n                                                                                          PsiElement(,)(',')\n                                                                                          ELEMENT\n                                                                                            VALUE\n                                                                                              REFERENCE_EXPRESSION\n                                                                                                PsiElement(identifier)('true')\n                                                                                          PsiElement(,)(',')\n                                                                                          ELEMENT\n                                                                                            VALUE\n                                                                                              COMPOSITE_LIT\n                                                                                                ARRAY_OR_SLICE_TYPE\n                                                                                                  PsiElement([)('[')\n                                                                                                  PsiElement(])(']')\n                                                                                                  TYPE\n                                                                                                    TYPE_REFERENCE_EXPRESSION\n                                                                                                      PsiElement(identifier)('int')\n                                                                                                LITERAL_VALUE\n                                                                                                  PsiElement({)('{')\n                                                                                                  PsiElement(})('}')\n                                                                                          PsiElement(,)(',')\n                                                                                          ELEMENT\n                                                                                            VALUE\n                                                                                              REFERENCE_EXPRESSION\n                                                                                                PsiElement(identifier)('nil')\n                                                                                          PsiElement(,)(',')\n                                                                                          ELEMENT\n                                                                                            VALUE\n                                                                                              STRING_LITERAL\n                                                                                                PsiElement(string)('\"\"')\n                                                                                          PsiElement(,)(',')\n                                                                                          ELEMENT\n                                                                                            VALUE\n                                                                                              COMPOSITE_LIT\n                                                                                                ARRAY_OR_SLICE_TYPE\n                                                                                                  PsiElement([)('[')\n                                                                                                  PsiElement(])(']')\n                                                                                                  TYPE\n                                                                                                    TYPE_REFERENCE_EXPRESSION\n                                                                                                      PsiElement(identifier)('θ_parse_node')\n                                                                                                LITERAL_VALUE\n                                                                                                  PsiElement({)('{')\n                                                                                                  ELEMENT\n                                                                                                    VALUE\n                                                                                                      COMPOSITE_LIT\n                                                                                                        TYPE_REFERENCE_EXPRESSION\n                                                                                                          PsiElement(identifier)('θ_parse_node')\n                                                                                                        LITERAL_VALUE\n                                                                                                          PsiElement({)('{')\n                                                                                                          ELEMENT\n                                                                                                            VALUE\n                                                                                                              STRING_LITERAL\n                                                                                                                PsiElement(string)('\"with\"')\n                                                                                                          PsiElement(,)(',')\n                                                                                                          ELEMENT\n                                                                                                            VALUE\n                                                                                                              REFERENCE_EXPRESSION\n                                                                                                                PsiElement(identifier)('true')\n                                                                                                          PsiElement(,)(',')\n                                                                                                          ELEMENT\n                                                                                                            VALUE\n                                                                                                              COMPOSITE_LIT\n                                                                                                                ARRAY_OR_SLICE_TYPE\n                                                                                                                  PsiElement([)('[')\n                                                                                                                  PsiElement(])(']')\n                                                                                                                  TYPE\n                                                                                                                    TYPE_REFERENCE_EXPRESSION\n                                                                                                                      PsiElement(identifier)('int')\n                                                                                                                LITERAL_VALUE\n                                                                                                                  PsiElement({)('{')\n                                                                                                                  PsiElement(})('}')\n                                                                                                          PsiElement(,)(',')\n                                                                                                          ELEMENT\n                                                                                                            VALUE\n                                                                                                              REFERENCE_EXPRESSION\n                                                                                                                PsiElement(identifier)('nil')\n                                                                                                          PsiElement(,)(',')\n                                                                                                          ELEMENT\n                                                                                                            VALUE\n                                                                                                              STRING_LITERAL\n                                                                                                                PsiElement(string)('\"\"')\n                                                                                                          PsiElement(,)(',')\n                                                                                                          ELEMENT\n                                                                                                            VALUE\n                                                                                                              COMPOSITE_LIT\n                                                                                                                ARRAY_OR_SLICE_TYPE\n                                                                                                                  PsiElement([)('[')\n                                                                                                                  PsiElement(])(']')\n                                                                                                                  TYPE\n                                                                                                                    TYPE_REFERENCE_EXPRESSION\n                                                                                                                      PsiElement(identifier)('θ_parse_node')\n                                                                                                                LITERAL_VALUE\n                                                                                                                  PsiElement({)('{')\n                                                                                                                  ELEMENT\n                                                                                                                    VALUE\n                                                                                                                      COMPOSITE_LIT\n                                                                                                                        TYPE_REFERENCE_EXPRESSION\n                                                                                                                          PsiElement(identifier)('θ_parse_node')\n                                                                                                                        LITERAL_VALUE\n                                                                                                                          PsiElement({)('{')\n                                                                                                                          ELEMENT\n                                                                                                                            VALUE\n                                                                                                                              STRING_LITERAL\n                                                                                                                                PsiElement(string)('\"nested\"')\n                                                                                                                          PsiElement(,)(',')\n                                                                                                                          ELEMENT\n                                                                                                                            VALUE\n                                                                                                                              REFERENCE_EXPRESSION\n                                                                                                                                PsiElement(identifier)('true')\n                                                                                                                          PsiElement(,)(',')\n                                                                                                                          ELEMENT\n                                                                                                                            VALUE\n                                                                                                                              COMPOSITE_LIT\n                                                                                                                                ARRAY_OR_SLICE_TYPE\n                                                                                                                                  PsiElement([)('[')\n                                                                                                                                  PsiElement(])(']')\n                                                                                                                                  TYPE\n                                                                                                                                    TYPE_REFERENCE_EXPRESSION\n                                                                                                                                      PsiElement(identifier)('int')\n                                                                                                                                LITERAL_VALUE\n                                                                                                                                  PsiElement({)('{')\n                                                                                                                                  PsiElement(})('}')\n                                                                                                                          PsiElement(,)(',')\n                                                                                                                          ELEMENT\n                                                                                                                            VALUE\n                                                                                                                              REFERENCE_EXPRESSION\n                                                                                                                                PsiElement(identifier)('nil')\n                                                                                                                          PsiElement(,)(',')\n                                                                                                                          ELEMENT\n                                                                                                                            VALUE\n                                                                                                                              STRING_LITERAL\n                                                                                                                                PsiElement(string)('\"\"')\n                                                                                                                          PsiElement(,)(',')\n                                                                                                                          ELEMENT\n                                                                                                                            VALUE\n                                                                                                                              COMPOSITE_LIT\n                                                                                                                                ARRAY_OR_SLICE_TYPE\n                                                                                                                                  PsiElement([)('[')\n                                                                                                                                  PsiElement(])(']')\n                                                                                                                                  TYPE\n                                                                                                                                    TYPE_REFERENCE_EXPRESSION\n                                                                                                                                      PsiElement(identifier)('θ_parse_node')\n                                                                                                                                LITERAL_VALUE\n                                                                                                                                  PsiElement({)('{')\n                                                                                                                                  ELEMENT\n                                                                                                                                    VALUE\n                                                                                                                                      COMPOSITE_LIT\n                                                                                                                                        TYPE_REFERENCE_EXPRESSION\n                                                                                                                                          PsiElement(identifier)('θ_parse_node')\n                                                                                                                                        LITERAL_VALUE\n                                                                                                                                          PsiElement({)('{')\n                                                                                                                                          ELEMENT\n                                                                                                                                            VALUE\n                                                                                                                                              STRING_LITERAL\n                                                                                                                                                PsiElement(string)('\"level\"')\n                                                                                                                                          PsiElement(,)(',')\n                                                                                                                                          ELEMENT\n                                                                                                                                            VALUE\n                                                                                                                                              REFERENCE_EXPRESSION\n                                                                                                                                                PsiElement(identifier)('true')\n                                                                                                                                          PsiElement(,)(',')\n                                                                                                                                          ELEMENT\n                                                                                                                                            VALUE\n                                                                                                                                              COMPOSITE_LIT\n                                                                                                                                                ARRAY_OR_SLICE_TYPE\n                                                                                                                                                  PsiElement([)('[')\n                                                                                                                                                  PsiElement(])(']')\n                                                                                                                                                  TYPE\n                                                                                                                                                    TYPE_REFERENCE_EXPRESSION\n                                                                                                                                                      PsiElement(identifier)('int')\n                                                                                                                                                LITERAL_VALUE\n                                                                                                                                                  PsiElement({)('{')\n                                                                                                                                                  PsiElement(})('}')\n                                                                                                                                          PsiElement(,)(',')\n                                                                                                                                          ELEMENT\n                                                                                                                                            VALUE\n                                                                                                                                              REFERENCE_EXPRESSION\n                                                                                                                                                PsiElement(identifier)('nil')\n                                                                                                                                          PsiElement(,)(',')\n                                                                                                                                          ELEMENT\n                                                                                                                                            VALUE\n                                                                                                                                              STRING_LITERAL\n                                                                                                                                                PsiElement(string)('\"\"')\n                                                                                                                                          PsiElement(,)(',')\n                                                                                                                                          ELEMENT\n                                                                                                                                            VALUE\n                                                                                                                                              COMPOSITE_LIT\n                                                                                                                                                ARRAY_OR_SLICE_TYPE\n                                                                                                                                                  PsiElement([)('[')\n                                                                                                                                                  PsiElement(])(']')\n                                                                                                                                                  TYPE\n                                                                                                                                                    TYPE_REFERENCE_EXPRESSION\n                                                                                                                                                      PsiElement(identifier)('θ_parse_node')\n                                                                                                                                                LITERAL_VALUE\n                                                                                                                                                  PsiElement({)('{')\n                                                                                                                                                  ELEMENT\n                                                                                                                                                    VALUE\n                                                                                                                                                      COMPOSITE_LIT\n                                                                                                                                                        TYPE_REFERENCE_EXPRESSION\n                                                                                                                                                          PsiElement(identifier)('θ_parse_node')\n                                                                                                                                                        LITERAL_VALUE\n                                                                                                                                                          PsiElement({)('{')\n                                                                                                                                                          ELEMENT\n                                                                                                                                                            VALUE\n                                                                                                                                                              STRING_LITERAL\n                                                                                                                                                                PsiElement(string)('\"more\"')\n                                                                                                                                                          PsiElement(,)(',')\n                                                                                                                                                          ELEMENT\n                                                                                                                                                            VALUE\n                                                                                                                                                              REFERENCE_EXPRESSION\n                                                                                                                                                                PsiElement(identifier)('true')\n                                                                                                                                                          PsiElement(,)(',')\n                                                                                                                                                          ELEMENT\n                                                                                                                                                            VALUE\n                                                                                                                                                              COMPOSITE_LIT\n                                                                                                                                                                ARRAY_OR_SLICE_TYPE\n                                                                                                                                                                  PsiElement([)('[')\n                                                                                                                                                                  PsiElement(])(']')\n                                                                                                                                                                  TYPE\n                                                                                                                                                                    TYPE_REFERENCE_EXPRESSION\n                                                                                                                                                                      PsiElement(identifier)('int')\n                                                                                                                                                                LITERAL_VALUE\n                                                                                                                                                                  PsiElement({)('{')\n                                                                                                                                                                  PsiElement(})('}')\n                                                                                                                                                          PsiElement(,)(',')\n                                                                                                                                                          ELEMENT\n                                                                                                                                                            VALUE\n                                                                                                                                                              REFERENCE_EXPRESSION\n                                                                                                                                                                PsiElement(identifier)('nil')\n                                                                                                                                                          PsiElement(,)(',')\n                                                                                                                                                          ELEMENT\n                                                                                                                                                            VALUE\n                                                                                                                                                              STRING_LITERAL\n                                                                                                                                                                PsiElement(string)('\"\"')\n                                                                                                                                                          PsiElement(,)(',')\n                                                                                                                                                          ELEMENT\n                                                                                                                                                            VALUE\n                                                                                                                                                              COMPOSITE_LIT\n                                                                                                                                                                ARRAY_OR_SLICE_TYPE\n                                                                                                                                                                  PsiElement([)('[')\n                                                                                                                                                                  PsiElement(])(']')\n                                                                                                                                                                  TYPE\n                                                                                                                                                                    TYPE_REFERENCE_EXPRESSION\n                                                                                                                                                                      PsiElement(identifier)('θ_parse_node')\n                                                                                                                                                                LITERAL_VALUE\n                                                                                                                                                                  PsiElement({)('{')\n                                                                                                                                                                  ELEMENT\n                                                                                                                                                                    VALUE\n                                                                                                                                                                      COMPOSITE_LIT\n                                                                                                                                                                        TYPE_REFERENCE_EXPRESSION\n                                                                                                                                                                          PsiElement(identifier)('θ_parse_node')\n                                                                                                                                                                        LITERAL_VALUE\n                                                                                                                                                                          PsiElement({)('{')\n                                                                                                                                                                          ELEMENT\n                                                                                                                                                                            VALUE\n                                                                                                                                                                              STRING_LITERAL\n                                                                                                                                                                                PsiElement(string)('\"than\"')\n                                                                                                                                                                          PsiElement(,)(',')\n                                                                                                                                                                          ELEMENT\n                                                                                                                                                                            VALUE\n                                                                                                                                                                              REFERENCE_EXPRESSION\n                                                                                                                                                                                PsiElement(identifier)('true')\n                                                                                                                                                                          PsiElement(,)(',')\n                                                                                                                                                                          ELEMENT\n                                                                                                                                                                            VALUE\n                                                                                                                                                                              COMPOSITE_LIT\n                                                                                                                                                                                ARRAY_OR_SLICE_TYPE\n                                                                                                                                                                                  PsiElement([)('[')\n                                                                                                                                                                                  PsiElement(])(']')\n                                                                                                                                                                                  TYPE\n                                                                                                                                                                                    TYPE_REFERENCE_EXPRESSION\n                                                                                                                                                                                      PsiElement(identifier)('int')\n                                                                                                                                                                                LITERAL_VALUE\n                                                                                                                                                                                  PsiElement({)('{')\n                                                                                                                                                                                  PsiElement(})('}')\n                                                                                                                                                                          PsiElement(,)(',')\n                                                                                                                                                                          ELEMENT\n                                                                                                                                                                            VALUE\n                                                                                                                                                                              REFERENCE_EXPRESSION\n                                                                                                                                                                                PsiElement(identifier)('nil')\n                                                                                                                                                                          PsiElement(,)(',')\n                                                                                                                                                                          ELEMENT\n                                                                                                                                                                            VALUE\n                                                                                                                                                                              STRING_LITERAL\n                                                                                                                                                                                PsiElement(string)('\"\"')\n                                                                                                                                                                          PsiElement(,)(',')\n                                                                                                                                                                          ELEMENT\n                                                                                                                                                                            VALUE\n                                                                                                                                                                              COMPOSITE_LIT\n                                                                                                                                                                                ARRAY_OR_SLICE_TYPE\n                                                                                                                                                                                  PsiElement([)('[')\n                                                                                                                                                                                  PsiElement(])(']')\n                                                                                                                                                                                  TYPE\n                                                                                                                                                                                    TYPE_REFERENCE_EXPRESSION\n                                                                                                                                                                                      PsiElement(identifier)('θ_parse_node')\n                                                                                                                                                                                LITERAL_VALUE\n                                                                                                                                                                                  PsiElement({)('{')\n                                                                                                                                                                                  ELEMENT\n                                                                                                                                                                                    VALUE\n                                                                                                                                                                                      COMPOSITE_LIT\n                                                                                                                                                                                        TYPE_REFERENCE_EXPRESSION\n                                                                                                                                                                                          PsiElement(identifier)('θ_parse_node')\n                                                                                                                                                                                        LITERAL_VALUE\n                                                                                                                                                                                          PsiElement({)('{')\n                                                                                                                                                                                          ELEMENT\n                                                                                                                                                                                            VALUE\n                                                                                                                                                                                              STRING_LITERAL\n                                                                                                                                                                                                PsiElement(string)('\"<number>\"')\n                                                                                                                                                                                          PsiElement(,)(',')\n                                                                                                                                                                                          ELEMENT\n                                                                                                                                                                                            VALUE\n                                                                                                                                                                                              REFERENCE_EXPRESSION\n                                                                                                                                                                                                PsiElement(identifier)('false')\n                                                                                                                                                                                          PsiElement(,)(',')\n                                                                                                                                                                                          ELEMENT\n                                                                                                                                                                                            VALUE\n                                                                                                                                                                                              COMPOSITE_LIT\n                                                                                                                                                                                                ARRAY_OR_SLICE_TYPE\n                                                                                                                                                                                                  PsiElement([)('[')\n                                                                                                                                                                                                  PsiElement(])(']')\n                                                                                                                                                                                                  TYPE\n                                                                                                                                                                                                    TYPE_REFERENCE_EXPRESSION\n                                                                                                                                                                                                      PsiElement(identifier)('int')\n                                                                                                                                                                                                LITERAL_VALUE\n                                                                                                                                                                                                  PsiElement({)('{')\n                                                                                                                                                                                                  ELEMENT\n                                                                                                                                                                                                    VALUE\n                                                                                                                                                                                                      LITERAL\n                                                                                                                                                                                                        PsiElement(int)('0')\n                                                                                                                                                                                                  PsiElement(})('}')\n                                                                                                                                                                                          PsiElement(,)(',')\n                                                                                                                                                                                          ELEMENT\n                                                                                                                                                                                            VALUE\n                                                                                                                                                                                              SELECTOR_EXPR\n                                                                                                                                                                                                PARENTHESES_EXPR\n                                                                                                                                                                                                  PsiElement(()('(')\n                                                                                                                                                                                                  UNARY_EXPR\n                                                                                                                                                                                                    PsiElement(*)('*')\n                                                                                                                                                                                                    REFERENCE_EXPRESSION\n                                                                                                                                                                                                      PsiElement(identifier)('session')\n                                                                                                                                                                                                  PsiElement())(')')\n                                                                                                                                                                                                PsiElement(.)('.')\n                                                                                                                                                                                                REFERENCE_EXPRESSION\n                                                                                                                                                                                                  PsiElement(identifier)('θ_debug_ide')\n                                                                                                                                                                                          PsiElement(,)(',')\n                                                                                                                                                                                          ELEMENT\n                                                                                                                                                                                            VALUE\n                                                                                                                                                                                              STRING_LITERAL\n                                                                                                                                                                                                PsiElement(string)('\"here goes an unnecessary long command\"')\n                                                                                                                                                                                          PsiElement(,)(',')\n                                                                                                                                                                                          ELEMENT\n                                                                                                                                                                                            VALUE\n                                                                                                                                                                                              COMPOSITE_LIT\n                                                                                                                                                                                                ARRAY_OR_SLICE_TYPE\n                                                                                                                                                                                                  PsiElement([)('[')\n                                                                                                                                                                                                  PsiElement(])(']')\n                                                                                                                                                                                                  TYPE\n                                                                                                                                                                                                    TYPE_REFERENCE_EXPRESSION\n                                                                                                                                                                                                      PsiElement(identifier)('θ_parse_node')\n                                                                                                                                                                                                LITERAL_VALUE\n                                                                                                                                                                                                  PsiElement({)('{')\n                                                                                                                                                                                                  PsiElement(})('}')\n                                                                                                                                                                                          PsiElement(})('}')\n                                                                                                                                                                                  PsiElement(})('}')\n                                                                                                                                                                          PsiElement(})('}')\n                                                                                                                                                                  PsiElement(})('}')\n                                                                                                                                                          PsiElement(})('}')\n                                                                                                                                                  PsiElement(})('}')\n                                                                                                                                          PsiElement(})('}')\n                                                                                                                                  PsiElement(})('}')\n                                                                                                                          PsiElement(})('}')\n                                                                                                                  PsiElement(})('}')\n                                                                                                          PsiElement(})('}')\n                                                                                                  PsiElement(})('}')\n                                                                                          PsiElement(})('}')\n                                                                                  PsiElement(})('}')\n                                                                          PsiElement(})('}')\n                                                                  PsiElement(})('}')\n                                                          PsiElement(})('}')\n                                                  PsiElement(})('}')\n                                          PsiElement(})('}')\n                                  PsiElement(})('}')\n                          PsiElement(})('}')\n                  PsiElement(,)(',')\n                  ELEMENT\n                    VALUE\n                      COMPOSITE_LIT\n                        TYPE_REFERENCE_EXPRESSION\n                          PsiElement(identifier)('θ_parse_node')\n                        LITERAL_VALUE\n                          PsiElement({)('{')\n                          ELEMENT\n                            VALUE\n                              STRING_LITERAL\n                                PsiElement(string)('\"echo\"')\n                          PsiElement(,)(',')\n                          ELEMENT\n                            VALUE\n                              REFERENCE_EXPRESSION\n                                PsiElement(identifier)('true')\n                          PsiElement(,)(',')\n                          ELEMENT\n                            VALUE\n                              COMPOSITE_LIT\n                                ARRAY_OR_SLICE_TYPE\n                                  PsiElement([)('[')\n                                  PsiElement(])(']')\n                                  TYPE\n                                    TYPE_REFERENCE_EXPRESSION\n                                      PsiElement(identifier)('int')\n                                LITERAL_VALUE\n                                  PsiElement({)('{')\n                                  PsiElement(})('}')\n                          PsiElement(,)(',')\n                          ELEMENT\n                            VALUE\n                              REFERENCE_EXPRESSION\n                                PsiElement(identifier)('nil')\n                          PsiElement(,)(',')\n                          ELEMENT\n                            VALUE\n                              STRING_LITERAL\n                                PsiElement(string)('\"\"')\n                          PsiElement(,)(',')\n                          ELEMENT\n                            VALUE\n                              COMPOSITE_LIT\n                                ARRAY_OR_SLICE_TYPE\n                                  PsiElement([)('[')\n                                  PsiElement(])(']')\n                                  TYPE\n                                    TYPE_REFERENCE_EXPRESSION\n                                      PsiElement(identifier)('θ_parse_node')\n                                LITERAL_VALUE\n                                  PsiElement({)('{')\n                                  ELEMENT\n                                    VALUE\n                                      COMPOSITE_LIT\n                                        TYPE_REFERENCE_EXPRESSION\n                                          PsiElement(identifier)('θ_parse_node')\n                                        LITERAL_VALUE\n                                          PsiElement({)('{')\n                                          ELEMENT\n                                            VALUE\n                                              STRING_LITERAL\n                                                PsiElement(string)('\"<string>\"')\n                                          PsiElement(,)(',')\n                                          ELEMENT\n                                            VALUE\n                                              REFERENCE_EXPRESSION\n                                                PsiElement(identifier)('false')\n                                          PsiElement(,)(',')\n                                          ELEMENT\n                                            VALUE\n                                              COMPOSITE_LIT\n                                                ARRAY_OR_SLICE_TYPE\n                                                  PsiElement([)('[')\n                                                  PsiElement(])(']')\n                                                  TYPE\n                                                    TYPE_REFERENCE_EXPRESSION\n                                                      PsiElement(identifier)('int')\n                                                LITERAL_VALUE\n                                                  PsiElement({)('{')\n                                                  ELEMENT\n                                                    VALUE\n                                                      LITERAL\n                                                        PsiElement(int)('0')\n                                                  PsiElement(})('}')\n                                          PsiElement(,)(',')\n                                          ELEMENT\n                                            VALUE\n                                              SELECTOR_EXPR\n                                                PARENTHESES_EXPR\n                                                  PsiElement(()('(')\n                                                  UNARY_EXPR\n                                                    PsiElement(*)('*')\n                                                    REFERENCE_EXPRESSION\n                                                      PsiElement(identifier)('session')\n                                                  PsiElement())(')')\n                                                PsiElement(.)('.')\n                                                REFERENCE_EXPRESSION\n                                                  PsiElement(identifier)('θ_echo')\n                                          PsiElement(,)(',')\n                                          ELEMENT\n                                            VALUE\n                                              STRING_LITERAL\n                                                PsiElement(string)('\"Returns its parameter\"')\n                                          PsiElement(,)(',')\n                                          ELEMENT\n                                            VALUE\n                                              COMPOSITE_LIT\n                                                ARRAY_OR_SLICE_TYPE\n                                                  PsiElement([)('[')\n                                                  PsiElement(])(']')\n                                                  TYPE\n                                                    TYPE_REFERENCE_EXPRESSION\n                                                      PsiElement(identifier)('θ_parse_node')\n                                                LITERAL_VALUE\n                                                  PsiElement({)('{')\n                                                  PsiElement(})('}')\n                                          PsiElement(})('}')\n                                  PsiElement(})('}')\n                          PsiElement(})('}')\n                  PsiElement(,)(',')\n                  ELEMENT\n                    VALUE\n                      COMPOSITE_LIT\n                        TYPE_REFERENCE_EXPRESSION\n                          PsiElement(identifier)('θ_parse_node')\n                        LITERAL_VALUE\n                          PsiElement({)('{')\n                          ELEMENT\n                            VALUE\n                              STRING_LITERAL\n                                PsiElement(string)('\"get\"')\n                          PsiElement(,)(',')\n                          ELEMENT\n                            VALUE\n                              REFERENCE_EXPRESSION\n                                PsiElement(identifier)('true')\n                          PsiElement(,)(',')\n                          ELEMENT\n                            VALUE\n                              COMPOSITE_LIT\n                                ARRAY_OR_SLICE_TYPE\n                                  PsiElement([)('[')\n                                  PsiElement(])(']')\n                                  TYPE\n                                    TYPE_REFERENCE_EXPRESSION\n                                      PsiElement(identifier)('int')\n                                LITERAL_VALUE\n                                  PsiElement({)('{')\n                                  PsiElement(})('}')\n                          PsiElement(,)(',')\n                          ELEMENT\n                            VALUE\n                              REFERENCE_EXPRESSION\n                                PsiElement(identifier)('nil')\n                          PsiElement(,)(',')\n                          ELEMENT\n                            VALUE\n                              STRING_LITERAL\n                                PsiElement(string)('\"\"')\n                          PsiElement(,)(',')\n                          ELEMENT\n                            VALUE\n                              COMPOSITE_LIT\n                                ARRAY_OR_SLICE_TYPE\n                                  PsiElement([)('[')\n                                  PsiElement(])(']')\n                                  TYPE\n                                    TYPE_REFERENCE_EXPRESSION\n                                      PsiElement(identifier)('θ_parse_node')\n                                LITERAL_VALUE\n                                  PsiElement({)('{')\n                                  ELEMENT\n                                    VALUE\n                                      COMPOSITE_LIT\n                                        TYPE_REFERENCE_EXPRESSION\n                                          PsiElement(identifier)('θ_parse_node')\n                                        LITERAL_VALUE\n                                          PsiElement({)('{')\n                                          ELEMENT\n                                            VALUE\n                                              STRING_LITERAL\n                                                PsiElement(string)('\"output\"')\n                                          PsiElement(,)(',')\n                                          ELEMENT\n                                            VALUE\n                                              REFERENCE_EXPRESSION\n                                                PsiElement(identifier)('true')\n                                          PsiElement(,)(',')\n                                          ELEMENT\n                                            VALUE\n                                              COMPOSITE_LIT\n                                                ARRAY_OR_SLICE_TYPE\n                                                  PsiElement([)('[')\n                                                  PsiElement(])(']')\n                                                  TYPE\n                                                    TYPE_REFERENCE_EXPRESSION\n                                                      PsiElement(identifier)('int')\n                                                LITERAL_VALUE\n                                                  PsiElement({)('{')\n                                                  PsiElement(})('}')\n                                          PsiElement(,)(',')\n                                          ELEMENT\n                                            VALUE\n                                              REFERENCE_EXPRESSION\n                                                PsiElement(identifier)('nil')\n                                          PsiElement(,)(',')\n                                          ELEMENT\n                                            VALUE\n                                              STRING_LITERAL\n                                                PsiElement(string)('\"\"')\n                                          PsiElement(,)(',')\n                                          ELEMENT\n                                            VALUE\n                                              COMPOSITE_LIT\n                                                ARRAY_OR_SLICE_TYPE\n                                                  PsiElement([)('[')\n                                                  PsiElement(])(']')\n                                                  TYPE\n                                                    TYPE_REFERENCE_EXPRESSION\n                                                      PsiElement(identifier)('θ_parse_node')\n                                                LITERAL_VALUE\n                                                  PsiElement({)('{')\n                                                  ELEMENT\n                                                    VALUE\n                                                      COMPOSITE_LIT\n                                                        TYPE_REFERENCE_EXPRESSION\n                                                          PsiElement(identifier)('θ_parse_node')\n                                                        LITERAL_VALUE\n                                                          PsiElement({)('{')\n                                                          ELEMENT\n                                                            VALUE\n                                                              STRING_LITERAL\n                                                                PsiElement(string)('\"type\"')\n                                                          PsiElement(,)(',')\n                                                          ELEMENT\n                                                            VALUE\n                                                              REFERENCE_EXPRESSION\n                                                                PsiElement(identifier)('true')\n                                                          PsiElement(,)(',')\n                                                          ELEMENT\n                                                            VALUE\n                                                              COMPOSITE_LIT\n                                                                ARRAY_OR_SLICE_TYPE\n                                                                  PsiElement([)('[')\n                                                                  PsiElement(])(']')\n                                                                  TYPE\n                                                                    TYPE_REFERENCE_EXPRESSION\n                                                                      PsiElement(identifier)('int')\n                                                                LITERAL_VALUE\n                                                                  PsiElement({)('{')\n                                                                  PsiElement(})('}')\n                                                          PsiElement(,)(',')\n                                                          ELEMENT\n                                                            VALUE\n                                                              SELECTOR_EXPR\n                                                                PARENTHESES_EXPR\n                                                                  PsiElement(()('(')\n                                                                  UNARY_EXPR\n                                                                    PsiElement(*)('*')\n                                                                    REFERENCE_EXPRESSION\n                                                                      PsiElement(identifier)('session')\n                                                                  PsiElement())(')')\n                                                                PsiElement(.)('.')\n                                                                REFERENCE_EXPRESSION\n                                                                  PsiElement(identifier)('θ_get_output_type')\n                                                          PsiElement(,)(',')\n                                                          ELEMENT\n                                                            VALUE\n                                                              STRING_LITERAL\n                                                                PsiElement(string)('\"returns current output type\"')\n                                                          PsiElement(,)(',')\n                                                          ELEMENT\n                                                            VALUE\n                                                              COMPOSITE_LIT\n                                                                ARRAY_OR_SLICE_TYPE\n                                                                  PsiElement([)('[')\n                                                                  PsiElement(])(']')\n                                                                  TYPE\n                                                                    TYPE_REFERENCE_EXPRESSION\n                                                                      PsiElement(identifier)('θ_parse_node')\n                                                                LITERAL_VALUE\n                                                                  PsiElement({)('{')\n                                                                  PsiElement(})('}')\n                                                          PsiElement(})('}')\n                                                  PsiElement(})('}')\n                                          PsiElement(})('}')\n                                  PsiElement(,)(',')\n                                  ELEMENT\n                                    VALUE\n                                      COMPOSITE_LIT\n                                        TYPE_REFERENCE_EXPRESSION\n                                          PsiElement(identifier)('θ_parse_node')\n                                        LITERAL_VALUE\n                                          PsiElement({)('{')\n                                          ELEMENT\n                                            VALUE\n                                              STRING_LITERAL\n                                                PsiElement(string)('\"server\"')\n                                          PsiElement(,)(',')\n                                          ELEMENT\n                                            VALUE\n                                              REFERENCE_EXPRESSION\n                                                PsiElement(identifier)('true')\n                                          PsiElement(,)(',')\n                                          ELEMENT\n                                            VALUE\n                                              COMPOSITE_LIT\n                                                ARRAY_OR_SLICE_TYPE\n                                                  PsiElement([)('[')\n                                                  PsiElement(])(']')\n                                                  TYPE\n                                                    TYPE_REFERENCE_EXPRESSION\n                                                      PsiElement(identifier)('int')\n                                                LITERAL_VALUE\n                                                  PsiElement({)('{')\n                                                  PsiElement(})('}')\n                                          PsiElement(,)(',')\n                                          ELEMENT\n                                            VALUE\n                                              REFERENCE_EXPRESSION\n                                                PsiElement(identifier)('nil')\n                                          PsiElement(,)(',')\n                                          ELEMENT\n                                            VALUE\n                                              STRING_LITERAL\n                                                PsiElement(string)('\"\"')\n                                          PsiElement(,)(',')\n                                          ELEMENT\n                                            VALUE\n                                              COMPOSITE_LIT\n                                                ARRAY_OR_SLICE_TYPE\n                                                  PsiElement([)('[')\n                                                  PsiElement(])(']')\n                                                  TYPE\n                                                    TYPE_REFERENCE_EXPRESSION\n                                                      PsiElement(identifier)('θ_parse_node')\n                                                LITERAL_VALUE\n                                                  PsiElement({)('{')\n                                                  ELEMENT\n                                                    VALUE\n                                                      COMPOSITE_LIT\n                                                        TYPE_REFERENCE_EXPRESSION\n                                                          PsiElement(identifier)('θ_parse_node')\n                                                        LITERAL_VALUE\n                                                          PsiElement({)('{')\n                                                          ELEMENT\n                                                            VALUE\n                                                              STRING_LITERAL\n                                                                PsiElement(string)('\"time\"')\n                                                          PsiElement(,)(',')\n                                                          ELEMENT\n                                                            VALUE\n                                                              REFERENCE_EXPRESSION\n                                                                PsiElement(identifier)('true')\n                                                          PsiElement(,)(',')\n                                                          ELEMENT\n                                                            VALUE\n                                                              COMPOSITE_LIT\n                                                                ARRAY_OR_SLICE_TYPE\n                                                                  PsiElement([)('[')\n                                                                  PsiElement(])(']')\n                                                                  TYPE\n                                                                    TYPE_REFERENCE_EXPRESSION\n                                                                      PsiElement(identifier)('int')\n                                                                LITERAL_VALUE\n                                                                  PsiElement({)('{')\n                                                                  PsiElement(})('}')\n                                                          PsiElement(,)(',')\n                                                          ELEMENT\n                                                            VALUE\n                                                              SELECTOR_EXPR\n                                                                PARENTHESES_EXPR\n                                                                  PsiElement(()('(')\n                                                                  UNARY_EXPR\n                                                                    PsiElement(*)('*')\n                                                                    REFERENCE_EXPRESSION\n                                                                      PsiElement(identifier)('session')\n                                                                  PsiElement())(')')\n                                                                PsiElement(.)('.')\n                                                                REFERENCE_EXPRESSION\n                                                                  PsiElement(identifier)('θ_get_server_time')\n                                                          PsiElement(,)(',')\n                                                          ELEMENT\n                                                            VALUE\n                                                              STRING_LITERAL\n                                                                PsiElement(string)('\"Returns server time\"')\n                                                          PsiElement(,)(',')\n                                                          ELEMENT\n                                                            VALUE\n                                                              COMPOSITE_LIT\n                                                                ARRAY_OR_SLICE_TYPE\n                                                                  PsiElement([)('[')\n                                                                  PsiElement(])(']')\n                                                                  TYPE\n                                                                    TYPE_REFERENCE_EXPRESSION\n                                                                      PsiElement(identifier)('θ_parse_node')\n                                                                LITERAL_VALUE\n                                                                  PsiElement({)('{')\n                                                                  PsiElement(})('}')\n                                                          PsiElement(})('}')\n                                                  PsiElement(})('}')\n                                          PsiElement(})('}')\n                                  PsiElement(})('}')\n                          PsiElement(})('}')\n                  PsiElement(,)(',')\n                  ELEMENT\n                    VALUE\n                      COMPOSITE_LIT\n                        TYPE_REFERENCE_EXPRESSION\n                          PsiElement(identifier)('θ_parse_node')\n                        LITERAL_VALUE\n                          PsiElement({)('{')\n                          ELEMENT\n                            VALUE\n                              STRING_LITERAL\n                                PsiElement(string)('\"quit\"')\n                          PsiElement(,)(',')\n                          ELEMENT\n                            VALUE\n                              REFERENCE_EXPRESSION\n                                PsiElement(identifier)('true')\n                          PsiElement(,)(',')\n                          ELEMENT\n                            VALUE\n                              COMPOSITE_LIT\n                                ARRAY_OR_SLICE_TYPE\n                                  PsiElement([)('[')\n                                  PsiElement(])(']')\n                                  TYPE\n                                    TYPE_REFERENCE_EXPRESSION\n                                      PsiElement(identifier)('int')\n                                LITERAL_VALUE\n                                  PsiElement({)('{')\n                                  PsiElement(})('}')\n                          PsiElement(,)(',')\n                          ELEMENT\n                            VALUE\n                              SELECTOR_EXPR\n                                PARENTHESES_EXPR\n                                  PsiElement(()('(')\n                                  UNARY_EXPR\n                                    PsiElement(*)('*')\n                                    REFERENCE_EXPRESSION\n                                      PsiElement(identifier)('session')\n                                  PsiElement())(')')\n                                PsiElement(.)('.')\n                                REFERENCE_EXPRESSION\n                                  PsiElement(identifier)('θ_quit')\n                          PsiElement(,)(',')\n                          ELEMENT\n                            VALUE\n                              STRING_LITERAL\n                                PsiElement(string)('\"closes CLI connection\"')\n                          PsiElement(,)(',')\n                          ELEMENT\n                            VALUE\n                              COMPOSITE_LIT\n                                ARRAY_OR_SLICE_TYPE\n                                  PsiElement([)('[')\n                                  PsiElement(])(']')\n                                  TYPE\n                                    TYPE_REFERENCE_EXPRESSION\n                                      PsiElement(identifier)('θ_parse_node')\n                                LITERAL_VALUE\n                                  PsiElement({)('{')\n                                  PsiElement(})('}')\n                          PsiElement(})('}')\n                  PsiElement(,)(',')\n                  ELEMENT\n                    VALUE\n                      COMPOSITE_LIT\n                        TYPE_REFERENCE_EXPRESSION\n                          PsiElement(identifier)('θ_parse_node')\n                        LITERAL_VALUE\n                          PsiElement({)('{')\n                          ELEMENT\n                            VALUE\n                              STRING_LITERAL\n                                PsiElement(string)('\"set\"')\n                          PsiElement(,)(',')\n                          ELEMENT\n                            VALUE\n                              REFERENCE_EXPRESSION\n                                PsiElement(identifier)('true')\n                          PsiElement(,)(',')\n                          ELEMENT\n                            VALUE\n                              COMPOSITE_LIT\n                                ARRAY_OR_SLICE_TYPE\n                                  PsiElement([)('[')\n                                  PsiElement(])(']')\n                                  TYPE\n                                    TYPE_REFERENCE_EXPRESSION\n                                      PsiElement(identifier)('int')\n                                LITERAL_VALUE\n                                  PsiElement({)('{')\n                                  PsiElement(})('}')\n                          PsiElement(,)(',')\n                          ELEMENT\n                            VALUE\n                              REFERENCE_EXPRESSION\n                                PsiElement(identifier)('nil')\n                          PsiElement(,)(',')\n                          ELEMENT\n                            VALUE\n                              STRING_LITERAL\n                                PsiElement(string)('\"\"')\n                          PsiElement(,)(',')\n                          ELEMENT\n                            VALUE\n                              COMPOSITE_LIT\n                                ARRAY_OR_SLICE_TYPE\n                                  PsiElement([)('[')\n                                  PsiElement(])(']')\n                                  TYPE\n                                    TYPE_REFERENCE_EXPRESSION\n                                      PsiElement(identifier)('θ_parse_node')\n                                LITERAL_VALUE\n                                  PsiElement({)('{')\n                                  ELEMENT\n                                    VALUE\n                                      COMPOSITE_LIT\n                                        TYPE_REFERENCE_EXPRESSION\n                                          PsiElement(identifier)('θ_parse_node')\n                                        LITERAL_VALUE\n                                          PsiElement({)('{')\n                                          ELEMENT\n                                            VALUE\n                                              STRING_LITERAL\n                                                PsiElement(string)('\"output\"')\n                                          PsiElement(,)(',')\n                                          ELEMENT\n                                            VALUE\n                                              REFERENCE_EXPRESSION\n                                                PsiElement(identifier)('true')\n                                          PsiElement(,)(',')\n                                          ELEMENT\n                                            VALUE\n                                              COMPOSITE_LIT\n                                                ARRAY_OR_SLICE_TYPE\n                                                  PsiElement([)('[')\n                                                  PsiElement(])(']')\n                                                  TYPE\n                                                    TYPE_REFERENCE_EXPRESSION\n                                                      PsiElement(identifier)('int')\n                                                LITERAL_VALUE\n                                                  PsiElement({)('{')\n                                                  PsiElement(})('}')\n                                          PsiElement(,)(',')\n                                          ELEMENT\n                                            VALUE\n                                              REFERENCE_EXPRESSION\n                                                PsiElement(identifier)('nil')\n                                          PsiElement(,)(',')\n                                          ELEMENT\n                                            VALUE\n                                              STRING_LITERAL\n                                                PsiElement(string)('\"\"')\n                                          PsiElement(,)(',')\n                                          ELEMENT\n                                            VALUE\n                                              COMPOSITE_LIT\n                                                ARRAY_OR_SLICE_TYPE\n                                                  PsiElement([)('[')\n                                                  PsiElement(])(']')\n                                                  TYPE\n                                                    TYPE_REFERENCE_EXPRESSION\n                                                      PsiElement(identifier)('θ_parse_node')\n                                                LITERAL_VALUE\n                                                  PsiElement({)('{')\n                                                  ELEMENT\n                                                    VALUE\n                                                      COMPOSITE_LIT\n                                                        TYPE_REFERENCE_EXPRESSION\n                                                          PsiElement(identifier)('θ_parse_node')\n                                                        LITERAL_VALUE\n                                                          PsiElement({)('{')\n                                                          ELEMENT\n                                                            VALUE\n                                                              STRING_LITERAL\n                                                                PsiElement(string)('\"type\"')\n                                                          PsiElement(,)(',')\n                                                          ELEMENT\n                                                            VALUE\n                                                              REFERENCE_EXPRESSION\n                                                                PsiElement(identifier)('true')\n                                                          PsiElement(,)(',')\n                                                          ELEMENT\n                                                            VALUE\n                                                              COMPOSITE_LIT\n                                                                ARRAY_OR_SLICE_TYPE\n                                                                  PsiElement([)('[')\n                                                                  PsiElement(])(']')\n                                                                  TYPE\n                                                                    TYPE_REFERENCE_EXPRESSION\n                                                                      PsiElement(identifier)('int')\n                                                                LITERAL_VALUE\n                                                                  PsiElement({)('{')\n                                                                  PsiElement(})('}')\n                                                          PsiElement(,)(',')\n                                                          ELEMENT\n                                                            VALUE\n                                                              REFERENCE_EXPRESSION\n                                                                PsiElement(identifier)('nil')\n                                                          PsiElement(,)(',')\n                                                          ELEMENT\n                                                            VALUE\n                                                              STRING_LITERAL\n                                                                PsiElement(string)('\"\"')\n                                                          PsiElement(,)(',')\n                                                          ELEMENT\n                                                            VALUE\n                                                              COMPOSITE_LIT\n                                                                ARRAY_OR_SLICE_TYPE\n                                                                  PsiElement([)('[')\n                                                                  PsiElement(])(']')\n                                                                  TYPE\n                                                                    TYPE_REFERENCE_EXPRESSION\n                                                                      PsiElement(identifier)('θ_parse_node')\n                                                                LITERAL_VALUE\n                                                                  PsiElement({)('{')\n                                                                  ELEMENT\n                                                                    VALUE\n                                                                      COMPOSITE_LIT\n                                                                        TYPE_REFERENCE_EXPRESSION\n                                                                          PsiElement(identifier)('θ_parse_node')\n                                                                        LITERAL_VALUE\n                                                                          PsiElement({)('{')\n                                                                          ELEMENT\n                                                                            VALUE\n                                                                              STRING_LITERAL\n                                                                                PsiElement(string)('\"to\"')\n                                                                          PsiElement(,)(',')\n                                                                          ELEMENT\n                                                                            VALUE\n                                                                              REFERENCE_EXPRESSION\n                                                                                PsiElement(identifier)('true')\n                                                                          PsiElement(,)(',')\n                                                                          ELEMENT\n                                                                            VALUE\n                                                                              COMPOSITE_LIT\n                                                                                ARRAY_OR_SLICE_TYPE\n                                                                                  PsiElement([)('[')\n                                                                                  PsiElement(])(']')\n                                                                                  TYPE\n                                                                                    TYPE_REFERENCE_EXPRESSION\n                                                                                      PsiElement(identifier)('int')\n                                                                                LITERAL_VALUE\n                                                                                  PsiElement({)('{')\n                                                                                  PsiElement(})('}')\n                                                                          PsiElement(,)(',')\n                                                                          ELEMENT\n                                                                            VALUE\n                                                                              REFERENCE_EXPRESSION\n                                                                                PsiElement(identifier)('nil')\n                                                                          PsiElement(,)(',')\n                                                                          ELEMENT\n                                                                            VALUE\n                                                                              STRING_LITERAL\n                                                                                PsiElement(string)('\"\"')\n                                                                          PsiElement(,)(',')\n                                                                          ELEMENT\n                                                                            VALUE\n                                                                              COMPOSITE_LIT\n                                                                                ARRAY_OR_SLICE_TYPE\n                                                                                  PsiElement([)('[')\n                                                                                  PsiElement(])(']')\n                                                                                  TYPE\n                                                                                    TYPE_REFERENCE_EXPRESSION\n                                                                                      PsiElement(identifier)('θ_parse_node')\n                                                                                LITERAL_VALUE\n                                                                                  PsiElement({)('{')\n                                                                                  ELEMENT\n                                                                                    VALUE\n                                                                                      COMPOSITE_LIT\n                                                                                        TYPE_REFERENCE_EXPRESSION\n                                                                                          PsiElement(identifier)('θ_parse_node')\n                                                                                        LITERAL_VALUE\n                                                                                          PsiElement({)('{')\n                                                                                          ELEMENT\n                                                                                            VALUE\n                                                                                              STRING_LITERAL\n                                                                                                PsiElement(string)('\"<string>\"')\n                                                                                          PsiElement(,)(',')\n                                                                                          ELEMENT\n                                                                                            VALUE\n                                                                                              REFERENCE_EXPRESSION\n                                                                                                PsiElement(identifier)('false')\n                                                                                          PsiElement(,)(',')\n                                                                                          ELEMENT\n                                                                                            VALUE\n                                                                                              COMPOSITE_LIT\n                                                                                                ARRAY_OR_SLICE_TYPE\n                                                                                                  PsiElement([)('[')\n                                                                                                  PsiElement(])(']')\n                                                                                                  TYPE\n                                                                                                    TYPE_REFERENCE_EXPRESSION\n                                                                                                      PsiElement(identifier)('int')\n                                                                                                LITERAL_VALUE\n                                                                                                  PsiElement({)('{')\n                                                                                                  ELEMENT\n                                                                                                    VALUE\n                                                                                                      LITERAL\n                                                                                                        PsiElement(int)('0')\n                                                                                                  PsiElement(})('}')\n                                                                                          PsiElement(,)(',')\n                                                                                          ELEMENT\n                                                                                            VALUE\n                                                                                              SELECTOR_EXPR\n                                                                                                PARENTHESES_EXPR\n                                                                                                  PsiElement(()('(')\n                                                                                                  UNARY_EXPR\n                                                                                                    PsiElement(*)('*')\n                                                                                                    REFERENCE_EXPRESSION\n                                                                                                      PsiElement(identifier)('session')\n                                                                                                  PsiElement())(')')\n                                                                                                PsiElement(.)('.')\n                                                                                                REFERENCE_EXPRESSION\n                                                                                                  PsiElement(identifier)('θ_set_output_type')\n                                                                                          PsiElement(,)(',')\n                                                                                          ELEMENT\n                                                                                            VALUE\n                                                                                              STRING_LITERAL\n                                                                                                PsiElement(string)('\"sets current output type (either json or text)\"')\n                                                                                          PsiElement(,)(',')\n                                                                                          ELEMENT\n                                                                                            VALUE\n                                                                                              COMPOSITE_LIT\n                                                                                                ARRAY_OR_SLICE_TYPE\n                                                                                                  PsiElement([)('[')\n                                                                                                  PsiElement(])(']')\n                                                                                                  TYPE\n                                                                                                    TYPE_REFERENCE_EXPRESSION\n                                                                                                      PsiElement(identifier)('θ_parse_node')\n                                                                                                LITERAL_VALUE\n                                                                                                  PsiElement({)('{')\n                                                                                                  PsiElement(})('}')\n                                                                                          PsiElement(})('}')\n                                                                                  PsiElement(})('}')\n                                                                          PsiElement(})('}')\n                                                                  PsiElement(})('}')\n                                                          PsiElement(})('}')\n                                                  PsiElement(})('}')\n                                          PsiElement(})('}')\n                                  PsiElement(})('}')\n                          PsiElement(})('}')\n                  PsiElement(,)(',')\n                  ELEMENT\n                    VALUE\n                      COMPOSITE_LIT\n                        TYPE_REFERENCE_EXPRESSION\n                          PsiElement(identifier)('θ_parse_node')\n                        LITERAL_VALUE\n                          PsiElement({)('{')\n                          ELEMENT\n                            VALUE\n                              STRING_LITERAL\n                                PsiElement(string)('\"show\"')\n                          PsiElement(,)(',')\n                          ELEMENT\n                            VALUE\n                              REFERENCE_EXPRESSION\n                                PsiElement(identifier)('true')\n                          PsiElement(,)(',')\n                          ELEMENT\n                            VALUE\n                              COMPOSITE_LIT\n                                ARRAY_OR_SLICE_TYPE\n                                  PsiElement([)('[')\n                                  PsiElement(])(']')\n                                  TYPE\n                                    TYPE_REFERENCE_EXPRESSION\n                                      PsiElement(identifier)('int')\n                                LITERAL_VALUE\n                                  PsiElement({)('{')\n                                  PsiElement(})('}')\n                          PsiElement(,)(',')\n                          ELEMENT\n                            VALUE\n                              REFERENCE_EXPRESSION\n                                PsiElement(identifier)('nil')\n                          PsiElement(,)(',')\n                          ELEMENT\n                            VALUE\n                              STRING_LITERAL\n                                PsiElement(string)('\"\"')\n                          PsiElement(,)(',')\n                          ELEMENT\n                            VALUE\n                              COMPOSITE_LIT\n                                ARRAY_OR_SLICE_TYPE\n                                  PsiElement([)('[')\n                                  PsiElement(])(']')\n                                  TYPE\n                                    TYPE_REFERENCE_EXPRESSION\n                                      PsiElement(identifier)('θ_parse_node')\n                                LITERAL_VALUE\n                                  PsiElement({)('{')\n                                  ELEMENT\n                                    VALUE\n                                      COMPOSITE_LIT\n                                        TYPE_REFERENCE_EXPRESSION\n                                          PsiElement(identifier)('θ_parse_node')\n                                        LITERAL_VALUE\n                                          PsiElement({)('{')\n                                          ELEMENT\n                                            VALUE\n                                              STRING_LITERAL\n                                                PsiElement(string)('\"server\"')\n                                          PsiElement(,)(',')\n                                          ELEMENT\n                                            VALUE\n                                              REFERENCE_EXPRESSION\n                                                PsiElement(identifier)('true')\n                                          PsiElement(,)(',')\n                                          ELEMENT\n                                            VALUE\n                                              COMPOSITE_LIT\n                                                ARRAY_OR_SLICE_TYPE\n                                                  PsiElement([)('[')\n                                                  PsiElement(])(']')\n                                                  TYPE\n                                                    TYPE_REFERENCE_EXPRESSION\n                                                      PsiElement(identifier)('int')\n                                                LITERAL_VALUE\n                                                  PsiElement({)('{')\n                                                  PsiElement(})('}')\n                                          PsiElement(,)(',')\n                                          ELEMENT\n                                            VALUE\n                                              REFERENCE_EXPRESSION\n                                                PsiElement(identifier)('nil')\n                                          PsiElement(,)(',')\n                                          ELEMENT\n                                            VALUE\n                                              STRING_LITERAL\n                                                PsiElement(string)('\"\"')\n                                          PsiElement(,)(',')\n                                          ELEMENT\n                                            VALUE\n                                              COMPOSITE_LIT\n                                                ARRAY_OR_SLICE_TYPE\n                                                  PsiElement([)('[')\n                                                  PsiElement(])(']')\n                                                  TYPE\n                                                    TYPE_REFERENCE_EXPRESSION\n                                                      PsiElement(identifier)('θ_parse_node')\n                                                LITERAL_VALUE\n                                                  PsiElement({)('{')\n                                                  ELEMENT\n                                                    VALUE\n                                                      COMPOSITE_LIT\n                                                        TYPE_REFERENCE_EXPRESSION\n                                                          PsiElement(identifier)('θ_parse_node')\n                                                        LITERAL_VALUE\n                                                          PsiElement({)('{')\n                                                          ELEMENT\n                                                            VALUE\n                                                              STRING_LITERAL\n                                                                PsiElement(string)('\"time\"')\n                                                          PsiElement(,)(',')\n                                                          ELEMENT\n                                                            VALUE\n                                                              REFERENCE_EXPRESSION\n                                                                PsiElement(identifier)('true')\n                                                          PsiElement(,)(',')\n                                                          ELEMENT\n                                                            VALUE\n                                                              COMPOSITE_LIT\n                                                                ARRAY_OR_SLICE_TYPE\n                                                                  PsiElement([)('[')\n                                                                  PsiElement(])(']')\n                                                                  TYPE\n                                                                    TYPE_REFERENCE_EXPRESSION\n                                                                      PsiElement(identifier)('int')\n                                                                LITERAL_VALUE\n                                                                  PsiElement({)('{')\n                                                                  PsiElement(})('}')\n                                                          PsiElement(,)(',')\n                                                          ELEMENT\n                                                            VALUE\n                                                              SELECTOR_EXPR\n                                                                PARENTHESES_EXPR\n                                                                  PsiElement(()('(')\n                                                                  UNARY_EXPR\n                                                                    PsiElement(*)('*')\n                                                                    REFERENCE_EXPRESSION\n                                                                      PsiElement(identifier)('session')\n                                                                  PsiElement())(')')\n                                                                PsiElement(.)('.')\n                                                                REFERENCE_EXPRESSION\n                                                                  PsiElement(identifier)('θ_get_server_time')\n                                                          PsiElement(,)(',')\n                                                          ELEMENT\n                                                            VALUE\n                                                              STRING_LITERAL\n                                                                PsiElement(string)('\"Returns server time\"')\n                                                          PsiElement(,)(',')\n                                                          ELEMENT\n                                                            VALUE\n                                                              COMPOSITE_LIT\n                                                                ARRAY_OR_SLICE_TYPE\n                                                                  PsiElement([)('[')\n                                                                  PsiElement(])(']')\n                                                                  TYPE\n                                                                    TYPE_REFERENCE_EXPRESSION\n                                                                      PsiElement(identifier)('θ_parse_node')\n                                                                LITERAL_VALUE\n                                                                  PsiElement({)('{')\n                                                                  PsiElement(})('}')\n                                                          PsiElement(})('}')\n                                                  PsiElement(})('}')\n                                          PsiElement(})('}')\n                                  PsiElement(})('}')\n                          PsiElement(})('}')\n                  PsiElement(})('}')\n          PsiElement(})('}')\n  TYPE_DECLARATION\n    PsiElement(type)('type')\n    TYPE_SPEC\n      SPEC_TYPE\n        PsiElement(identifier)('stru')\n        STRUCT_TYPE\n          PsiElement(struct)('struct')\n          PsiElement({)('{')\n          FIELD_DECLARATION\n            FIELD_DEFINITION\n              PsiElement(identifier)('Field')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('string')\n          FIELD_DECLARATION\n            FIELD_DEFINITION\n              PsiElement(identifier)('Field1')\n            MAP_TYPE\n              PsiElement(map)('map')\n              PsiElement([)('[')\n              TYPE\n                TYPE_REFERENCE_EXPRESSION\n                  PsiElement(identifier)('string')\n              PsiElement(])(']')\n              TYPE\n                TYPE_REFERENCE_EXPRESSION\n                  PsiElement(identifier)('string')\n          PsiElement(})('}')\n  TYPE_DECLARATION\n    PsiElement(type)('type')\n    TYPE_SPEC\n      SPEC_TYPE\n        PsiElement(identifier)('str')\n        STRUCT_TYPE\n          PsiElement(struct)('struct')\n          PsiElement({)('{')\n          FIELD_DECLARATION\n            FIELD_DEFINITION\n              PsiElement(identifier)('Fiel')\n            POINTER_TYPE\n              PsiElement(*)('*')\n              TYPE\n                TYPE_REFERENCE_EXPRESSION\n                  PsiElement(identifier)('stru')\n          PsiElement(})('}')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('de')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n      RESULT\n        POINTER_TYPE\n          PsiElement(*)('*')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('stru')\n    BLOCK\n      PsiElement({)('{')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('a')\n          PsiElement(:=)(':=')\n          UNARY_EXPR\n            PsiElement(&)('&')\n            COMPOSITE_LIT\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('stru')\n              LITERAL_VALUE\n                PsiElement({)('{')\n                ELEMENT\n                  KEY\n                    FIELD_NAME\n                      PsiElement(identifier)('Field')\n                  PsiElement(:)(':')\n                  VALUE\n                    STRING_LITERAL\n                      PsiElement(string)('\"demo\"')\n                PsiElement(,)(',')\n                ELEMENT\n                  KEY\n                    FIELD_NAME\n                      PsiElement(identifier)('Field1')\n                  PsiElement(:)(':')\n                  VALUE\n                    COMPOSITE_LIT\n                      MAP_TYPE\n                        PsiElement(map)('map')\n                        PsiElement([)('[')\n                        TYPE\n                          TYPE_REFERENCE_EXPRESSION\n                            PsiElement(identifier)('string')\n                        PsiElement(])(']')\n                        TYPE\n                          TYPE_REFERENCE_EXPRESSION\n                            PsiElement(identifier)('string')\n                      LITERAL_VALUE\n                        PsiElement({)('{')\n                        ELEMENT\n                          KEY\n                            STRING_LITERAL\n                              PsiElement(string)('\"f1\"')\n                          PsiElement(:)(':')\n                          VALUE\n                            STRING_LITERAL\n                              PsiElement(string)('\"val\"')\n                        PsiElement(})('}')\n                PsiElement(,)(',')\n                PsiElement(})('}')\n      ASSIGNMENT_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('a')\n            PsiElement(.)('.')\n            PsiElement(identifier)('Field')\n        ASSIGN_OP\n          PsiElement(=)('=')\n        STRING_LITERAL\n          PsiElement(string)('\"dem\"')\n      ASSIGNMENT_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('a')\n            PsiElement(.)('.')\n            PsiElement(identifier)('Field1')\n        ASSIGN_OP\n          PsiElement(=)('=')\n        COMPOSITE_LIT\n          MAP_TYPE\n            PsiElement(map)('map')\n            PsiElement([)('[')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('string')\n            PsiElement(])(']')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('string')\n          LITERAL_VALUE\n            PsiElement({)('{')\n            ELEMENT\n              KEY\n                STRING_LITERAL\n                  PsiElement(string)('\"f2\"')\n              PsiElement(:)(':')\n              VALUE\n                STRING_LITERAL\n                  PsiElement(string)('\"val\"')\n            PsiElement(})('}')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n        REFERENCE_EXPRESSION\n          PsiElement(identifier)('a')\n      PsiElement(})('}')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('dem')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('b')\n          PsiElement(:=)(':=')\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('de')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              PsiElement())(')')\n      ASSIGNMENT_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('b')\n            PsiElement(.)('.')\n            PsiElement(identifier)('Field')\n        ASSIGN_OP\n          PsiElement(=)('=')\n        STRING_LITERAL\n          PsiElement(string)('\"de\"')\n      ASSIGNMENT_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('b')\n            PsiElement(.)('.')\n            PsiElement(identifier)('Field1')\n        ASSIGN_OP\n          PsiElement(=)('=')\n        COMPOSITE_LIT\n          MAP_TYPE\n            PsiElement(map)('map')\n            PsiElement([)('[')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('string')\n            PsiElement(])(']')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('string')\n          LITERAL_VALUE\n            PsiElement({)('{')\n            ELEMENT\n              KEY\n                STRING_LITERAL\n                  PsiElement(string)('\"f3\"')\n              PsiElement(:)(':')\n              VALUE\n                STRING_LITERAL\n                  PsiElement(string)('\"fal\"')\n            PsiElement(})('}')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('a')\n          PsiElement(:=)(':=')\n          UNARY_EXPR\n            PsiElement(*)('*')\n            COMPOSITE_LIT\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('str')\n              LITERAL_VALUE\n                PsiElement({)('{')\n                ELEMENT\n                  KEY\n                    FIELD_NAME\n                      PsiElement(identifier)('Fiel')\n                  PsiElement(:)(':')\n                  VALUE\n                    UNARY_EXPR\n                      PsiElement(&)('&')\n                      COMPOSITE_LIT\n                        TYPE_REFERENCE_EXPRESSION\n                          PsiElement(identifier)('stru')\n                        LITERAL_VALUE\n                          PsiElement({)('{')\n                          ELEMENT\n                            KEY\n                              FIELD_NAME\n                                PsiElement(identifier)('Field')\n                            PsiElement(:)(':')\n                            VALUE\n                              CALL_EXPR\n                                REFERENCE_EXPRESSION\n                                  REFERENCE_EXPRESSION\n                                    PsiElement(identifier)('fmt')\n                                  PsiElement(.)('.')\n                                  PsiElement(identifier)('Sprint')\n                                ARGUMENT_LIST\n                                  PsiElement(()('(')\n                                  STRING_LITERAL\n                                    PsiElement(string)('\"demo%d\"')\n                                  PsiElement(,)(',')\n                                  LITERAL\n                                    PsiElement(int)('1')\n                                  PsiElement())(')')\n                          PsiElement(,)(',')\n                          ELEMENT\n                            KEY\n                              FIELD_NAME\n                                PsiElement(identifier)('Field1')\n                            PsiElement(:)(':')\n                            VALUE\n                              COMPOSITE_LIT\n                                MAP_TYPE\n                                  PsiElement(map)('map')\n                                  PsiElement([)('[')\n                                  TYPE\n                                    TYPE_REFERENCE_EXPRESSION\n                                      PsiElement(identifier)('string')\n                                  PsiElement(])(']')\n                                  TYPE\n                                    TYPE_REFERENCE_EXPRESSION\n                                      PsiElement(identifier)('string')\n                                LITERAL_VALUE\n                                  PsiElement({)('{')\n                                  ELEMENT\n                                    VALUE\n                                      STRING_LITERAL\n                                        PsiElement(string)('\"a\"')\n                                  PsiElement(,)(',')\n                                  ELEMENT\n                                    VALUE\n                                      STRING_LITERAL\n                                        PsiElement(string)('\"n\"')\n                                  PsiElement(})('}')\n                          PsiElement(,)(',')\n                          PsiElement(})('}')\n                PsiElement(,)(',')\n                PsiElement(})('}')\n      FOR_STATEMENT\n        PsiElement(for)('for')\n        FOR_CLAUSE\n          SIMPLE_STATEMENT\n            SHORT_VAR_DECLARATION\n              VAR_DEFINITION\n                PsiElement(identifier)('i')\n              PsiElement(:=)(':=')\n              LITERAL\n                PsiElement(int)('0')\n          PsiElement(;)(';')\n          CONDITIONAL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('i')\n            PsiElement(<)('<')\n            LITERAL\n              PsiElement(int)('4')\n          PsiElement(;)(';')\n          INC_DEC_STATEMENT\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('i')\n            PsiElement(++)('++')\n        BLOCK\n          PsiElement({)('{')\n          ASSIGNMENT_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('a')\n                PsiElement(.)('.')\n                PsiElement(identifier)('Fiel')\n            ASSIGN_OP\n              PsiElement(=)('=')\n            UNARY_EXPR\n              PsiElement(&)('&')\n              COMPOSITE_LIT\n                TYPE_REFERENCE_EXPRESSION\n                  PsiElement(identifier)('stru')\n                LITERAL_VALUE\n                  PsiElement({)('{')\n                  ELEMENT\n                    KEY\n                      FIELD_NAME\n                        PsiElement(identifier)('Field')\n                    PsiElement(:)(':')\n                    VALUE\n                      CALL_EXPR\n                        REFERENCE_EXPRESSION\n                          REFERENCE_EXPRESSION\n                            PsiElement(identifier)('fmt')\n                          PsiElement(.)('.')\n                          PsiElement(identifier)('Sprintf')\n                        ARGUMENT_LIST\n                          PsiElement(()('(')\n                          STRING_LITERAL\n                            PsiElement(string)('\"demo %d\"')\n                          PsiElement(,)(',')\n                          REFERENCE_EXPRESSION\n                            PsiElement(identifier)('i')\n                          PsiElement())(')')\n                  PsiElement(,)(',')\n                  PsiComment(GO_LINE_COMMENT)('// parser fails here')\n                  ELEMENT\n                    KEY\n                      FIELD_NAME\n                        PsiElement(identifier)('Field1')\n                    PsiElement(:)(':')\n                    VALUE\n                      COMPOSITE_LIT\n                        MAP_TYPE\n                          PsiElement(map)('map')\n                          PsiElement([)('[')\n                          TYPE\n                            TYPE_REFERENCE_EXPRESSION\n                              PsiElement(identifier)('string')\n                          PsiElement(])(']')\n                          TYPE\n                            TYPE_REFERENCE_EXPRESSION\n                              PsiElement(identifier)('string')\n                        LITERAL_VALUE\n                          PsiElement({)('{')\n                          ELEMENT\n                            VALUE\n                              STRING_LITERAL\n                                PsiElement(string)('\"a\"')\n                          PsiElement(,)(',')\n                          ELEMENT\n                            VALUE\n                              STRING_LITERAL\n                                PsiElement(string)('\"n\"')\n                          PsiElement(,)(',')\n                          PsiElement(})('}')\n                  PsiElement(,)(',')\n                  PsiElement(})('}')\n          PsiElement(})('}')\n      ASSIGNMENT_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('_')\n        ASSIGN_OP\n          PsiElement(=)('=')\n        REFERENCE_EXPRESSION\n          PsiElement(identifier)('b')\n      ASSIGNMENT_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('_')\n        ASSIGN_OP\n          PsiElement(=)('=')\n        REFERENCE_EXPRESSION\n          PsiElement(identifier)('a')\n      PsiElement(})('}')"
  },
  {
    "path": "testData/parser/LiteralValuesElse.go",
    "content": "package main\n\nimport (\n    \"fmt\"\n)\n\nfunc main() {\n    s := struct{ Username, Password string }{\n        \"User\",\n        \"Password\",\n    }\n\n    if s != struct{ Username, Password string }{} {\n        fmt.Println(\"yes\")\n    } else {\n        fmt.Println(\"yes\")\n    }\n}"
  },
  {
    "path": "testData/parser/LiteralValuesElse.txt",
    "content": "GO_FILE\n  PACKAGE_CLAUSE\n    PsiElement(package)('package')\n    PsiElement(identifier)('main')\n  IMPORT_LIST\n    IMPORT_DECLARATION\n      PsiElement(import)('import')\n      PsiElement(()('(')\n      IMPORT_SPEC\n        IMPORT_STRING\n          STRING_LITERAL\n            PsiElement(string)('\"fmt\"')\n      PsiElement())(')')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('main')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('s')\n          PsiElement(:=)(':=')\n          COMPOSITE_LIT\n            STRUCT_TYPE\n              PsiElement(struct)('struct')\n              PsiElement({)('{')\n              FIELD_DECLARATION\n                FIELD_DEFINITION\n                  PsiElement(identifier)('Username')\n                PsiElement(,)(',')\n                FIELD_DEFINITION\n                  PsiElement(identifier)('Password')\n                TYPE\n                  TYPE_REFERENCE_EXPRESSION\n                    PsiElement(identifier)('string')\n              PsiElement(})('}')\n            LITERAL_VALUE\n              PsiElement({)('{')\n              ELEMENT\n                VALUE\n                  STRING_LITERAL\n                    PsiElement(string)('\"User\"')\n              PsiElement(,)(',')\n              ELEMENT\n                VALUE\n                  STRING_LITERAL\n                    PsiElement(string)('\"Password\"')\n              PsiElement(,)(',')\n              PsiElement(})('}')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            CONDITIONAL_EXPR\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('s')\n              PsiElement(!=)('!=')\n              COMPOSITE_LIT\n                STRUCT_TYPE\n                  PsiElement(struct)('struct')\n                  PsiElement({)('{')\n                  FIELD_DECLARATION\n                    FIELD_DEFINITION\n                      PsiElement(identifier)('Username')\n                    PsiElement(,)(',')\n                    FIELD_DEFINITION\n                      PsiElement(identifier)('Password')\n                    TYPE\n                      TYPE_REFERENCE_EXPRESSION\n                        PsiElement(identifier)('string')\n                  PsiElement(})('}')\n                LITERAL_VALUE\n                  PsiElement({)('{')\n                  PsiElement(})('}')\n        BLOCK\n          PsiElement({)('{')\n          SIMPLE_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('fmt')\n                  PsiElement(.)('.')\n                  PsiElement(identifier)('Println')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  STRING_LITERAL\n                    PsiElement(string)('\"yes\"')\n                  PsiElement())(')')\n          PsiElement(})('}')\n        ELSE_STATEMENT\n          PsiElement(else)('else')\n          BLOCK\n            PsiElement({)('{')\n            SIMPLE_STATEMENT\n              LEFT_HAND_EXPR_LIST\n                CALL_EXPR\n                  REFERENCE_EXPRESSION\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('fmt')\n                    PsiElement(.)('.')\n                    PsiElement(identifier)('Println')\n                  ARGUMENT_LIST\n                    PsiElement(()('(')\n                    STRING_LITERAL\n                      PsiElement(string)('\"yes\"')\n                    PsiElement())(')')\n            PsiElement(})('}')\n      PsiElement(})('}')"
  },
  {
    "path": "testData/parser/MapLiteralRecover.go",
    "content": "package main\n\nfunc main() {\n    _ := []string\n    a := []string{}\n    println(a)\n}"
  },
  {
    "path": "testData/parser/MapLiteralRecover.txt",
    "content": "GO_FILE\n  PACKAGE_CLAUSE\n    PsiElement(package)('package')\n    PsiElement(identifier)('main')\n  IMPORT_LIST\n    <empty list>\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('main')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('_')\n          PsiElement(:=)(':=')\n          COMPOSITE_LIT\n            ARRAY_OR_SLICE_TYPE\n              PsiElement([)('[')\n              PsiElement(])(']')\n              TYPE\n                TYPE_REFERENCE_EXPRESSION\n                  PsiElement(identifier)('string')\n            PsiErrorElement:'(', '.' or '{' expected, got ''\n              <empty list>\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('a')\n          PsiElement(:=)(':=')\n          COMPOSITE_LIT\n            ARRAY_OR_SLICE_TYPE\n              PsiElement([)('[')\n              PsiElement(])(']')\n              TYPE\n                TYPE_REFERENCE_EXPRESSION\n                  PsiElement(identifier)('string')\n            LITERAL_VALUE\n              PsiElement({)('{')\n              PsiElement(})('}')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('println')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('a')\n              PsiElement())(')')\n      PsiElement(})('}')"
  },
  {
    "path": "testData/parser/MethodExpr.go",
    "content": "package test\n\ntype T struct {\n\ta int\n}\nfunc (tv  T) Mv(a int) int         { return 0 }  // value receiver\nfunc (tp *T) Mp(f float32) float32 { return 1 }  // pointer receiver\n\nvar t T\n\nfunc bar() {\n    t.Mv(7)\n    T.Mv(t, 7)\n    (T).Mv(t, 7)\n    f1 := T.Mv; f1(t, 7)\n    f2 := (T).Mv; f2(t, 7)\n}"
  },
  {
    "path": "testData/parser/MethodExpr.txt",
    "content": "GO_FILE\n  PACKAGE_CLAUSE\n    PsiElement(package)('package')\n    PsiElement(identifier)('test')\n  IMPORT_LIST\n    <empty list>\n  TYPE_DECLARATION\n    PsiElement(type)('type')\n    TYPE_SPEC\n      SPEC_TYPE\n        PsiElement(identifier)('T')\n        STRUCT_TYPE\n          PsiElement(struct)('struct')\n          PsiElement({)('{')\n          FIELD_DECLARATION\n            FIELD_DEFINITION\n              PsiElement(identifier)('a')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('int')\n          PsiElement(})('}')\n  METHOD_DECLARATION\n    PsiElement(func)('func')\n    RECEIVER\n      PsiElement(()('(')\n      PsiElement(identifier)('tv')\n      TYPE\n        TYPE_REFERENCE_EXPRESSION\n          PsiElement(identifier)('T')\n      PsiElement())(')')\n    PsiElement(identifier)('Mv')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('a')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('int')\n        PsiElement())(')')\n      RESULT\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('int')\n    BLOCK\n      PsiElement({)('{')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n        LITERAL\n          PsiElement(int)('0')\n      PsiElement(})('}')\n  PsiComment(GO_LINE_COMMENT)('// value receiver')\n  METHOD_DECLARATION\n    PsiElement(func)('func')\n    RECEIVER\n      PsiElement(()('(')\n      PsiElement(identifier)('tp')\n      POINTER_TYPE\n        PsiElement(*)('*')\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('T')\n      PsiElement())(')')\n    PsiElement(identifier)('Mp')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('f')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('float32')\n        PsiElement())(')')\n      RESULT\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('float32')\n    BLOCK\n      PsiElement({)('{')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n        LITERAL\n          PsiElement(int)('1')\n      PsiElement(})('}')\n  PsiComment(GO_LINE_COMMENT)('// pointer receiver')\n  VAR_DECLARATION\n    PsiElement(var)('var')\n    VAR_SPEC\n      VAR_DEFINITION\n        PsiElement(identifier)('t')\n      TYPE\n        TYPE_REFERENCE_EXPRESSION\n          PsiElement(identifier)('T')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('bar')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('t')\n              PsiElement(.)('.')\n              PsiElement(identifier)('Mv')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              LITERAL\n                PsiElement(int)('7')\n              PsiElement())(')')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('T')\n              PsiElement(.)('.')\n              PsiElement(identifier)('Mv')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('t')\n              PsiElement(,)(',')\n              LITERAL\n                PsiElement(int)('7')\n              PsiElement())(')')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            SELECTOR_EXPR\n              PARENTHESES_EXPR\n                PsiElement(()('(')\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('T')\n                PsiElement())(')')\n              PsiElement(.)('.')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('Mv')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('t')\n              PsiElement(,)(',')\n              LITERAL\n                PsiElement(int)('7')\n              PsiElement())(')')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('f1')\n          PsiElement(:=)(':=')\n          REFERENCE_EXPRESSION\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('T')\n            PsiElement(.)('.')\n            PsiElement(identifier)('Mv')\n      PsiElement(;)(';')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('f1')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('t')\n              PsiElement(,)(',')\n              LITERAL\n                PsiElement(int)('7')\n              PsiElement())(')')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('f2')\n          PsiElement(:=)(':=')\n          SELECTOR_EXPR\n            PARENTHESES_EXPR\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('T')\n              PsiElement())(')')\n            PsiElement(.)('.')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('Mv')\n      PsiElement(;)(';')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('f2')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('t')\n              PsiElement(,)(',')\n              LITERAL\n                PsiElement(int)('7')\n              PsiElement())(')')\n      PsiElement(})('}')"
  },
  {
    "path": "testData/parser/MethodWithoutReceiverIdentifier.go",
    "content": "package main \n\nfunc (ConstraintViolationError) Error() string {\n\treturn \"x509: invalid signature: parent certificate cannot sign this kind of certificate\"\n}\n\nfunc (ds *dasa,) yooolo(dsa dasa) {\n    *ds = dsa\n}"
  },
  {
    "path": "testData/parser/MethodWithoutReceiverIdentifier.txt",
    "content": "GO_FILE\n  PACKAGE_CLAUSE\n    PsiElement(package)('package')\n    PsiElement(identifier)('main')\n  IMPORT_LIST\n    <empty list>\n  METHOD_DECLARATION\n    PsiElement(func)('func')\n    RECEIVER\n      PsiElement(()('(')\n      TYPE\n        TYPE_REFERENCE_EXPRESSION\n          PsiElement(identifier)('ConstraintViolationError')\n      PsiElement())(')')\n    PsiElement(identifier)('Error')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n      RESULT\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('string')\n    BLOCK\n      PsiElement({)('{')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n        STRING_LITERAL\n          PsiElement(string)('\"x509: invalid signature: parent certificate cannot sign this kind of certificate\"')\n      PsiElement(})('}')\n  METHOD_DECLARATION\n    PsiElement(func)('func')\n    RECEIVER\n      PsiElement(()('(')\n      PsiElement(identifier)('ds')\n      POINTER_TYPE\n        PsiElement(*)('*')\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('dasa')\n      PsiElement(,)(',')\n      PsiElement())(')')\n    PsiElement(identifier)('yooolo')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('dsa')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('dasa')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      ASSIGNMENT_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          UNARY_EXPR\n            PsiElement(*)('*')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('ds')\n        ASSIGN_OP\n          PsiElement(=)('=')\n        REFERENCE_EXPRESSION\n          PsiElement(identifier)('dsa')\n      PsiElement(})('}')"
  },
  {
    "path": "testData/parser/PlusPlusRecover.go",
    "content": "package main\n\nfunc main() {\n\ti := 0\n\ti //error\n\t&i //error\n\t/i //error\n\t/=i //error\n\t^i //error\n\t<i //error\n\t<<i //error\n\t=i //error\n\t==i //error\n\t>i //error\n\t>>i //error\n\t...i //error\n\t!i //error\n\t!=i //error\n\t%i //error\n\t&&i //error\n\t&=i //error\n\t&^i //error\n\t&^=i //error\n\t+=i //error\n\t--i //error\n\t++i //error\n\tPrintln()\n}"
  },
  {
    "path": "testData/parser/PlusPlusRecover.txt",
    "content": "GO_FILE\n  PACKAGE_CLAUSE\n    PsiElement(package)('package')\n    PsiElement(identifier)('main')\n  IMPORT_LIST\n    <empty list>\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('main')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('i')\n          PsiElement(:=)(':=')\n          LITERAL\n            PsiElement(int)('0')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('i')\n      PsiComment(GO_LINE_COMMENT)('//error')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          UNARY_EXPR\n            PsiElement(&)('&')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('i')\n      PsiComment(GO_LINE_COMMENT)('//error')\n      PsiErrorElement:'/' unexpected\n        PsiElement(/)('/')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('i')\n      PsiComment(GO_LINE_COMMENT)('//error')\n      PsiErrorElement:'/=' unexpected\n        PsiElement(/=)('/=')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('i')\n      PsiComment(GO_LINE_COMMENT)('//error')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          UNARY_EXPR\n            PsiElement(^)('^')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('i')\n      PsiComment(GO_LINE_COMMENT)('//error')\n      PsiErrorElement:'<' unexpected\n        PsiElement(<)('<')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('i')\n      PsiComment(GO_LINE_COMMENT)('//error')\n      PsiErrorElement:'<<' unexpected\n        PsiElement(<<)('<<')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('i')\n      PsiComment(GO_LINE_COMMENT)('//error')\n      PsiErrorElement:'=' unexpected\n        PsiElement(=)('=')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('i')\n      PsiComment(GO_LINE_COMMENT)('//error')\n      PsiErrorElement:'==' unexpected\n        PsiElement(==)('==')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('i')\n      PsiComment(GO_LINE_COMMENT)('//error')\n      PsiErrorElement:'>' unexpected\n        PsiElement(>)('>')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('i')\n      PsiComment(GO_LINE_COMMENT)('//error')\n      PsiErrorElement:'>>' unexpected\n        PsiElement(>>)('>>')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('i')\n      PsiComment(GO_LINE_COMMENT)('//error')\n      PsiErrorElement:'...' unexpected\n        PsiElement(...)('...')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('i')\n      PsiComment(GO_LINE_COMMENT)('//error')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          UNARY_EXPR\n            PsiElement(!)('!')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('i')\n      PsiComment(GO_LINE_COMMENT)('//error')\n      PsiErrorElement:'!=' unexpected\n        PsiElement(!=)('!=')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('i')\n      PsiComment(GO_LINE_COMMENT)('//error')\n      PsiErrorElement:'%' unexpected\n        PsiElement(%)('%')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('i')\n      PsiComment(GO_LINE_COMMENT)('//error')\n      PsiErrorElement:'&&' unexpected\n        PsiElement(&&)('&&')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('i')\n      PsiComment(GO_LINE_COMMENT)('//error')\n      PsiErrorElement:'&=' unexpected\n        PsiElement(&=)('&=')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('i')\n      PsiComment(GO_LINE_COMMENT)('//error')\n      PsiErrorElement:'&^' unexpected\n        PsiElement(&^)('&^')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('i')\n      PsiComment(GO_LINE_COMMENT)('//error')\n      PsiErrorElement:'&^=' unexpected\n        PsiElement(&^=)('&^=')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('i')\n      PsiComment(GO_LINE_COMMENT)('//error')\n      PsiErrorElement:'+=' unexpected\n        PsiElement(+=)('+=')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('i')\n      PsiComment(GO_LINE_COMMENT)('//error')\n      PsiErrorElement:'--' unexpected\n        PsiElement(--)('--')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('i')\n      PsiComment(GO_LINE_COMMENT)('//error')\n      PsiErrorElement:'++' unexpected\n        PsiElement(++)('++')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('i')\n      PsiComment(GO_LINE_COMMENT)('//error')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('Println')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              PsiElement())(')')\n      PsiElement(})('}')"
  },
  {
    "path": "testData/parser/Primer.go",
    "content": "package main\n\nimport \"fmt\"\n\nfunc printf(str string, args ...interface{}) (int, error) {\n    _, err := fmt.Printf(str, args...)\n    return len(args), err\n}\n\nfunc main() {\n    count := 1\n    closure := func(msg string) {\n        printf(\"%d %s\\n\", count, msg)\n        count++\n    }\n    closure(\"A Message\")\n    closure(\"Another Message\")\n}\n\nfunc main2() {\n    loops := 1\n    // while loop:\n    for loops > 0 {\n        fmt.Printf(\"\\nNumber of loops?\\n\")\n        fmt.Scanf(\"%d\", &loops)\n        // for loop\n        for i := 0 ; i < loops ; i++ {\n            fmt.Printf(\"%d \", i)\n        }\n    }\n    // Infinite loop\n    for {\n        // Explicitly terminated\n        break\n    }\n}\n\nconst (\n    Red              = (1<<iota)\n    Green            = (1<<iota)\n    Blue, ColorMask  = (1<<iota), (1<<(iota+1))-1\n)\n\ntype Example struct {\n    Val string\n    count int\n}\n\ntype integer int\nfunc (i integer) log() {\n    fmt.Printf(\"%d\\n\", i);\n}\n\nfunc (e *Example) Log() {\n    e.count++\n    fmt.Printf(\"%d %s\\n\", e.count, e.Val)\n}\n\ntype cartesianPoint struct {\n    x, y float64\n}\ntype polarPoint struct {\n    r, θ float64\n}\n\nfunc (p cartesianPoint) X() float64 {return p.x }\nfunc (p cartesianPoint) Y() float64 {return p.y }\nfunc (p polarPoint) X() float64 {\n    return p.r*math.Cos(p. θ )\n}\nfunc (p polarPoint) Y() float64 {\n    return p.r*math.Sin(p. θ )\n}\nfunc (self cartesianPoint) Print() {\n    fmt.Printf(\"(%f, %f)\\n\", self.x, self.y)\n}\nfunc (self polarPoint) Print() {\n    fmt.Printf(\"(%f, %f ◦ )\\n\", self.r, self. θ )\n}\ntype Point interface {\n    Printer\n    X() float64\n    Y() float64\n}\ntype Printer interface {\n    Print()\n}"
  },
  {
    "path": "testData/parser/Primer.txt",
    "content": "GO_FILE\n  PACKAGE_CLAUSE\n    PsiElement(package)('package')\n    PsiElement(identifier)('main')\n  IMPORT_LIST\n    IMPORT_DECLARATION\n      PsiElement(import)('import')\n      IMPORT_SPEC\n        IMPORT_STRING\n          STRING_LITERAL\n            PsiElement(string)('\"fmt\"')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('printf')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('str')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('string')\n        PsiElement(,)(',')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('args')\n          PsiElement(...)('...')\n          INTERFACE_TYPE\n            PsiElement(interface)('interface')\n            PsiElement({)('{')\n            PsiElement(})('}')\n        PsiElement())(')')\n      RESULT\n        PsiElement(()('(')\n        TYPE_LIST\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('int')\n          PsiElement(,)(',')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('error')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('_')\n          PsiElement(,)(',')\n          VAR_DEFINITION\n            PsiElement(identifier)('err')\n          PsiElement(:=)(':=')\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('fmt')\n              PsiElement(.)('.')\n              PsiElement(identifier)('Printf')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('str')\n              PsiElement(,)(',')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('args')\n              PsiElement(...)('...')\n              PsiElement())(')')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n        CALL_EXPR\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('len')\n          ARGUMENT_LIST\n            PsiElement(()('(')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('args')\n            PsiElement())(')')\n        PsiElement(,)(',')\n        REFERENCE_EXPRESSION\n          PsiElement(identifier)('err')\n      PsiElement(})('}')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('main')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('count')\n          PsiElement(:=)(':=')\n          LITERAL\n            PsiElement(int)('1')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('closure')\n          PsiElement(:=)(':=')\n          FUNCTION_LIT\n            PsiElement(func)('func')\n            SIGNATURE\n              PARAMETERS\n                PsiElement(()('(')\n                PARAMETER_DECLARATION\n                  PARAM_DEFINITION\n                    PsiElement(identifier)('msg')\n                  TYPE\n                    TYPE_REFERENCE_EXPRESSION\n                      PsiElement(identifier)('string')\n                PsiElement())(')')\n            BLOCK\n              PsiElement({)('{')\n              SIMPLE_STATEMENT\n                LEFT_HAND_EXPR_LIST\n                  CALL_EXPR\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('printf')\n                    ARGUMENT_LIST\n                      PsiElement(()('(')\n                      STRING_LITERAL\n                        PsiElement(string)('\"%d %s\\n\"')\n                      PsiElement(,)(',')\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('count')\n                      PsiElement(,)(',')\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('msg')\n                      PsiElement())(')')\n              INC_DEC_STATEMENT\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('count')\n                PsiElement(++)('++')\n              PsiElement(})('}')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('closure')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              STRING_LITERAL\n                PsiElement(string)('\"A Message\"')\n              PsiElement())(')')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('closure')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              STRING_LITERAL\n                PsiElement(string)('\"Another Message\"')\n              PsiElement())(')')\n      PsiElement(})('}')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('main2')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('loops')\n          PsiElement(:=)(':=')\n          LITERAL\n            PsiElement(int)('1')\n      PsiComment(GO_LINE_COMMENT)('// while loop:')\n      FOR_STATEMENT\n        PsiElement(for)('for')\n        CONDITIONAL_EXPR\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('loops')\n          PsiElement(>)('>')\n          LITERAL\n            PsiElement(int)('0')\n        BLOCK\n          PsiElement({)('{')\n          SIMPLE_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('fmt')\n                  PsiElement(.)('.')\n                  PsiElement(identifier)('Printf')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  STRING_LITERAL\n                    PsiElement(string)('\"\\nNumber of loops?\\n\"')\n                  PsiElement())(')')\n          SIMPLE_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('fmt')\n                  PsiElement(.)('.')\n                  PsiElement(identifier)('Scanf')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  STRING_LITERAL\n                    PsiElement(string)('\"%d\"')\n                  PsiElement(,)(',')\n                  UNARY_EXPR\n                    PsiElement(&)('&')\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('loops')\n                  PsiElement())(')')\n          PsiComment(GO_LINE_COMMENT)('// for loop')\n          FOR_STATEMENT\n            PsiElement(for)('for')\n            FOR_CLAUSE\n              SIMPLE_STATEMENT\n                SHORT_VAR_DECLARATION\n                  VAR_DEFINITION\n                    PsiElement(identifier)('i')\n                  PsiElement(:=)(':=')\n                  LITERAL\n                    PsiElement(int)('0')\n              PsiElement(;)(';')\n              CONDITIONAL_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('i')\n                PsiElement(<)('<')\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('loops')\n              PsiElement(;)(';')\n              INC_DEC_STATEMENT\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('i')\n                PsiElement(++)('++')\n            BLOCK\n              PsiElement({)('{')\n              SIMPLE_STATEMENT\n                LEFT_HAND_EXPR_LIST\n                  CALL_EXPR\n                    REFERENCE_EXPRESSION\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('fmt')\n                      PsiElement(.)('.')\n                      PsiElement(identifier)('Printf')\n                    ARGUMENT_LIST\n                      PsiElement(()('(')\n                      STRING_LITERAL\n                        PsiElement(string)('\"%d \"')\n                      PsiElement(,)(',')\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('i')\n                      PsiElement())(')')\n              PsiElement(})('}')\n          PsiElement(})('}')\n      PsiComment(GO_LINE_COMMENT)('// Infinite loop')\n      FOR_STATEMENT\n        PsiElement(for)('for')\n        BLOCK\n          PsiElement({)('{')\n          PsiComment(GO_LINE_COMMENT)('// Explicitly terminated')\n          BREAK_STATEMENT\n            PsiElement(break)('break')\n          PsiElement(})('}')\n      PsiElement(})('}')\n  CONST_DECLARATION\n    PsiElement(const)('const')\n    PsiElement(()('(')\n    CONST_SPEC\n      CONST_DEFINITION\n        PsiElement(identifier)('Red')\n      PsiElement(=)('=')\n      PARENTHESES_EXPR\n        PsiElement(()('(')\n        MUL_EXPR\n          LITERAL\n            PsiElement(int)('1')\n          PsiElement(<<)('<<')\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('iota')\n        PsiElement())(')')\n    CONST_SPEC\n      CONST_DEFINITION\n        PsiElement(identifier)('Green')\n      PsiElement(=)('=')\n      PARENTHESES_EXPR\n        PsiElement(()('(')\n        MUL_EXPR\n          LITERAL\n            PsiElement(int)('1')\n          PsiElement(<<)('<<')\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('iota')\n        PsiElement())(')')\n    CONST_SPEC\n      CONST_DEFINITION\n        PsiElement(identifier)('Blue')\n      PsiElement(,)(',')\n      CONST_DEFINITION\n        PsiElement(identifier)('ColorMask')\n      PsiElement(=)('=')\n      PARENTHESES_EXPR\n        PsiElement(()('(')\n        MUL_EXPR\n          LITERAL\n            PsiElement(int)('1')\n          PsiElement(<<)('<<')\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('iota')\n        PsiElement())(')')\n      PsiElement(,)(',')\n      ADD_EXPR\n        PARENTHESES_EXPR\n          PsiElement(()('(')\n          MUL_EXPR\n            LITERAL\n              PsiElement(int)('1')\n            PsiElement(<<)('<<')\n            PARENTHESES_EXPR\n              PsiElement(()('(')\n              ADD_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('iota')\n                PsiElement(+)('+')\n                LITERAL\n                  PsiElement(int)('1')\n              PsiElement())(')')\n          PsiElement())(')')\n        PsiElement(-)('-')\n        LITERAL\n          PsiElement(int)('1')\n    PsiElement())(')')\n  TYPE_DECLARATION\n    PsiElement(type)('type')\n    TYPE_SPEC\n      SPEC_TYPE\n        PsiElement(identifier)('Example')\n        STRUCT_TYPE\n          PsiElement(struct)('struct')\n          PsiElement({)('{')\n          FIELD_DECLARATION\n            FIELD_DEFINITION\n              PsiElement(identifier)('Val')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('string')\n          FIELD_DECLARATION\n            FIELD_DEFINITION\n              PsiElement(identifier)('count')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('int')\n          PsiElement(})('}')\n  TYPE_DECLARATION\n    PsiElement(type)('type')\n    TYPE_SPEC\n      SPEC_TYPE\n        PsiElement(identifier)('integer')\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('int')\n  METHOD_DECLARATION\n    PsiElement(func)('func')\n    RECEIVER\n      PsiElement(()('(')\n      PsiElement(identifier)('i')\n      TYPE\n        TYPE_REFERENCE_EXPRESSION\n          PsiElement(identifier)('integer')\n      PsiElement())(')')\n    PsiElement(identifier)('log')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('fmt')\n              PsiElement(.)('.')\n              PsiElement(identifier)('Printf')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              STRING_LITERAL\n                PsiElement(string)('\"%d\\n\"')\n              PsiElement(,)(',')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('i')\n              PsiElement())(')')\n      PsiElement(;)(';')\n      PsiElement(})('}')\n  METHOD_DECLARATION\n    PsiElement(func)('func')\n    RECEIVER\n      PsiElement(()('(')\n      PsiElement(identifier)('e')\n      POINTER_TYPE\n        PsiElement(*)('*')\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('Example')\n      PsiElement())(')')\n    PsiElement(identifier)('Log')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      INC_DEC_STATEMENT\n        REFERENCE_EXPRESSION\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('e')\n          PsiElement(.)('.')\n          PsiElement(identifier)('count')\n        PsiElement(++)('++')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('fmt')\n              PsiElement(.)('.')\n              PsiElement(identifier)('Printf')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              STRING_LITERAL\n                PsiElement(string)('\"%d %s\\n\"')\n              PsiElement(,)(',')\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('e')\n                PsiElement(.)('.')\n                PsiElement(identifier)('count')\n              PsiElement(,)(',')\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('e')\n                PsiElement(.)('.')\n                PsiElement(identifier)('Val')\n              PsiElement())(')')\n      PsiElement(})('}')\n  TYPE_DECLARATION\n    PsiElement(type)('type')\n    TYPE_SPEC\n      SPEC_TYPE\n        PsiElement(identifier)('cartesianPoint')\n        STRUCT_TYPE\n          PsiElement(struct)('struct')\n          PsiElement({)('{')\n          FIELD_DECLARATION\n            FIELD_DEFINITION\n              PsiElement(identifier)('x')\n            PsiElement(,)(',')\n            FIELD_DEFINITION\n              PsiElement(identifier)('y')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('float64')\n          PsiElement(})('}')\n  TYPE_DECLARATION\n    PsiElement(type)('type')\n    TYPE_SPEC\n      SPEC_TYPE\n        PsiElement(identifier)('polarPoint')\n        STRUCT_TYPE\n          PsiElement(struct)('struct')\n          PsiElement({)('{')\n          FIELD_DECLARATION\n            FIELD_DEFINITION\n              PsiElement(identifier)('r')\n            PsiElement(,)(',')\n            FIELD_DEFINITION\n              PsiElement(identifier)('θ')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('float64')\n          PsiElement(})('}')\n  METHOD_DECLARATION\n    PsiElement(func)('func')\n    RECEIVER\n      PsiElement(()('(')\n      PsiElement(identifier)('p')\n      TYPE\n        TYPE_REFERENCE_EXPRESSION\n          PsiElement(identifier)('cartesianPoint')\n      PsiElement())(')')\n    PsiElement(identifier)('X')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n      RESULT\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('float64')\n    BLOCK\n      PsiElement({)('{')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n        REFERENCE_EXPRESSION\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('p')\n          PsiElement(.)('.')\n          PsiElement(identifier)('x')\n      PsiElement(})('}')\n  METHOD_DECLARATION\n    PsiElement(func)('func')\n    RECEIVER\n      PsiElement(()('(')\n      PsiElement(identifier)('p')\n      TYPE\n        TYPE_REFERENCE_EXPRESSION\n          PsiElement(identifier)('cartesianPoint')\n      PsiElement())(')')\n    PsiElement(identifier)('Y')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n      RESULT\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('float64')\n    BLOCK\n      PsiElement({)('{')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n        REFERENCE_EXPRESSION\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('p')\n          PsiElement(.)('.')\n          PsiElement(identifier)('y')\n      PsiElement(})('}')\n  METHOD_DECLARATION\n    PsiElement(func)('func')\n    RECEIVER\n      PsiElement(()('(')\n      PsiElement(identifier)('p')\n      TYPE\n        TYPE_REFERENCE_EXPRESSION\n          PsiElement(identifier)('polarPoint')\n      PsiElement())(')')\n    PsiElement(identifier)('X')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n      RESULT\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('float64')\n    BLOCK\n      PsiElement({)('{')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n        MUL_EXPR\n          REFERENCE_EXPRESSION\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('p')\n            PsiElement(.)('.')\n            PsiElement(identifier)('r')\n          PsiElement(*)('*')\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('math')\n              PsiElement(.)('.')\n              PsiElement(identifier)('Cos')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('p')\n                PsiElement(.)('.')\n                PsiElement(identifier)('θ')\n              PsiElement())(')')\n      PsiElement(})('}')\n  METHOD_DECLARATION\n    PsiElement(func)('func')\n    RECEIVER\n      PsiElement(()('(')\n      PsiElement(identifier)('p')\n      TYPE\n        TYPE_REFERENCE_EXPRESSION\n          PsiElement(identifier)('polarPoint')\n      PsiElement())(')')\n    PsiElement(identifier)('Y')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n      RESULT\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('float64')\n    BLOCK\n      PsiElement({)('{')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n        MUL_EXPR\n          REFERENCE_EXPRESSION\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('p')\n            PsiElement(.)('.')\n            PsiElement(identifier)('r')\n          PsiElement(*)('*')\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('math')\n              PsiElement(.)('.')\n              PsiElement(identifier)('Sin')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('p')\n                PsiElement(.)('.')\n                PsiElement(identifier)('θ')\n              PsiElement())(')')\n      PsiElement(})('}')\n  METHOD_DECLARATION\n    PsiElement(func)('func')\n    RECEIVER\n      PsiElement(()('(')\n      PsiElement(identifier)('self')\n      TYPE\n        TYPE_REFERENCE_EXPRESSION\n          PsiElement(identifier)('cartesianPoint')\n      PsiElement())(')')\n    PsiElement(identifier)('Print')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('fmt')\n              PsiElement(.)('.')\n              PsiElement(identifier)('Printf')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              STRING_LITERAL\n                PsiElement(string)('\"(%f, %f)\\n\"')\n              PsiElement(,)(',')\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('self')\n                PsiElement(.)('.')\n                PsiElement(identifier)('x')\n              PsiElement(,)(',')\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('self')\n                PsiElement(.)('.')\n                PsiElement(identifier)('y')\n              PsiElement())(')')\n      PsiElement(})('}')\n  METHOD_DECLARATION\n    PsiElement(func)('func')\n    RECEIVER\n      PsiElement(()('(')\n      PsiElement(identifier)('self')\n      TYPE\n        TYPE_REFERENCE_EXPRESSION\n          PsiElement(identifier)('polarPoint')\n      PsiElement())(')')\n    PsiElement(identifier)('Print')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('fmt')\n              PsiElement(.)('.')\n              PsiElement(identifier)('Printf')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              STRING_LITERAL\n                PsiElement(string)('\"(%f, %f ◦ )\\n\"')\n              PsiElement(,)(',')\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('self')\n                PsiElement(.)('.')\n                PsiElement(identifier)('r')\n              PsiElement(,)(',')\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('self')\n                PsiElement(.)('.')\n                PsiElement(identifier)('θ')\n              PsiElement())(')')\n      PsiElement(})('}')\n  TYPE_DECLARATION\n    PsiElement(type)('type')\n    TYPE_SPEC\n      SPEC_TYPE\n        PsiElement(identifier)('Point')\n        INTERFACE_TYPE\n          PsiElement(interface)('interface')\n          PsiElement({)('{')\n          METHOD_SPEC\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('Printer')\n          METHOD_SPEC\n            PsiElement(identifier)('X')\n            SIGNATURE\n              PARAMETERS\n                PsiElement(()('(')\n                PsiElement())(')')\n              RESULT\n                TYPE\n                  TYPE_REFERENCE_EXPRESSION\n                    PsiElement(identifier)('float64')\n          METHOD_SPEC\n            PsiElement(identifier)('Y')\n            SIGNATURE\n              PARAMETERS\n                PsiElement(()('(')\n                PsiElement())(')')\n              RESULT\n                TYPE\n                  TYPE_REFERENCE_EXPRESSION\n                    PsiElement(identifier)('float64')\n          PsiElement(})('}')\n  TYPE_DECLARATION\n    PsiElement(type)('type')\n    TYPE_SPEC\n      SPEC_TYPE\n        PsiElement(identifier)('Printer')\n        INTERFACE_TYPE\n          PsiElement(interface)('interface')\n          PsiElement({)('{')\n          METHOD_SPEC\n            PsiElement(identifier)('Print')\n            SIGNATURE\n              PARAMETERS\n                PsiElement(()('(')\n                PsiElement())(')')\n          PsiElement(})('}')"
  },
  {
    "path": "testData/parser/Ranges.go",
    "content": "package ff\n\nfunc main() {\n    for range x {\n    }\n\n    for _ := range x {\n    }\n\n    for k, v := range x {\n    }\n}"
  },
  {
    "path": "testData/parser/Ranges.txt",
    "content": "GO_FILE\n  PACKAGE_CLAUSE\n    PsiElement(package)('package')\n    PsiElement(identifier)('ff')\n  IMPORT_LIST\n    <empty list>\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('main')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      FOR_STATEMENT\n        PsiElement(for)('for')\n        RANGE_CLAUSE\n          PsiElement(range)('range')\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('x')\n        BLOCK\n          PsiElement({)('{')\n          PsiElement(})('}')\n      FOR_STATEMENT\n        PsiElement(for)('for')\n        RANGE_CLAUSE\n          VAR_DEFINITION\n            PsiElement(identifier)('_')\n          PsiElement(:=)(':=')\n          PsiElement(range)('range')\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('x')\n        BLOCK\n          PsiElement({)('{')\n          PsiElement(})('}')\n      FOR_STATEMENT\n        PsiElement(for)('for')\n        RANGE_CLAUSE\n          VAR_DEFINITION\n            PsiElement(identifier)('k')\n          PsiElement(,)(',')\n          VAR_DEFINITION\n            PsiElement(identifier)('v')\n          PsiElement(:=)(':=')\n          PsiElement(range)('range')\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('x')\n        BLOCK\n          PsiElement({)('{')\n          PsiElement(})('}')\n      PsiElement(})('}')"
  },
  {
    "path": "testData/parser/Recover.go",
    "content": "package main\n\nfunc main() { }\naa\ntype T struct {}\nbb\nvar cc interface{}\nccc\nconst aa int=1\n\nfunc main() {\n\n\ttype aa interface {\n\n\t}\n\n\tb := 0\n\n\tvar a = b.(type)\n\t_ = a\n\tfmt.Println(b)\n}\n"
  },
  {
    "path": "testData/parser/Recover.txt",
    "content": "GO_FILE\n  PACKAGE_CLAUSE\n    PsiElement(package)('package')\n    PsiElement(identifier)('main')\n  IMPORT_LIST\n    <empty list>\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('main')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      PsiElement(})('}')\n  PsiErrorElement:'aa' unexpected\n    PsiElement(identifier)('aa')\n  TYPE_DECLARATION\n    PsiElement(type)('type')\n    TYPE_SPEC\n      SPEC_TYPE\n        PsiElement(identifier)('T')\n        STRUCT_TYPE\n          PsiElement(struct)('struct')\n          PsiElement({)('{')\n          PsiElement(})('}')\n  PsiErrorElement:'bb' unexpected\n    PsiElement(identifier)('bb')\n  VAR_DECLARATION\n    PsiElement(var)('var')\n    VAR_SPEC\n      VAR_DEFINITION\n        PsiElement(identifier)('cc')\n      INTERFACE_TYPE\n        PsiElement(interface)('interface')\n        PsiElement({)('{')\n        PsiElement(})('}')\n  PsiErrorElement:'ccc' unexpected\n    PsiElement(identifier)('ccc')\n  CONST_DECLARATION\n    PsiElement(const)('const')\n    CONST_SPEC\n      CONST_DEFINITION\n        PsiElement(identifier)('aa')\n      TYPE\n        TYPE_REFERENCE_EXPRESSION\n          PsiElement(identifier)('int')\n      PsiElement(=)('=')\n      LITERAL\n        PsiElement(int)('1')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('main')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      STATEMENT\n        TYPE_DECLARATION\n          PsiElement(type)('type')\n          TYPE_SPEC\n            SPEC_TYPE\n              PsiElement(identifier)('aa')\n              INTERFACE_TYPE\n                PsiElement(interface)('interface')\n                PsiElement({)('{')\n                PsiElement(})('}')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('b')\n          PsiElement(:=)(':=')\n          LITERAL\n            PsiElement(int)('0')\n      STATEMENT\n        VAR_DECLARATION\n          PsiElement(var)('var')\n          VAR_SPEC\n            VAR_DEFINITION\n              PsiElement(identifier)('a')\n            PsiElement(=)('=')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('b')\n            PsiElement(.)('.')\n            PsiErrorElement:'(' or identifier expected, got '('\n              <empty list>\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          PARENTHESES_EXPR\n            PsiElement(()('(')\n            PsiErrorElement:'!=', '%', '&', '&^', '(', ')', '*', '+', '++', '-', '--', '/', <, <-, <<, <=, <expression>, '==', '>', '>=', '>>', '[', '^', chan, func, interface, map, struct or '|' expected, got 'type'\n              <empty list>\n      STATEMENT\n        TYPE_DECLARATION\n          PsiElement(type)('type')\n          PsiErrorElement:'(' or identifier expected, got ')'\n            <empty list>\n      PsiElement())(')')\n      ASSIGNMENT_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('_')\n        ASSIGN_OP\n          PsiElement(=)('=')\n        REFERENCE_EXPRESSION\n          PsiElement(identifier)('a')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('fmt')\n              PsiElement(.)('.')\n              PsiElement(identifier)('Println')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('b')\n              PsiElement())(')')\n      PsiElement(})('}')"
  },
  {
    "path": "testData/parser/Recover2.go",
    "content": "package http\n\nfunc labelsCheck() { goto Label1; Label1: 1; goto Label2}\n\nfunc serve() {\n    foo(\n    if 1 {}\n}\n\nfunc foo() {\n    bar(,)\n    doo()\n}\n\nfunc main() {\n    switch expr {\n        case\n    }\n}\n\nfunc _() {\n    []string\n}\n\nfunc User(createBase base.AuthFunc) base.Ajaxer {\n\n\tlog.Println(\"Restful user request.\")\n\tauthCtrl := createBase(\"controller/account/user\")\n\n\tswitch authCtrl.Req.Method {\n\tcase \"PUT\":\n\t\treturn &edit{AuthCtrl: authCtrl}\n\t\t\"DELETE\":\n\t\treturn &delete{AuthCtrl: authCtrl}\n\tdefault:\n\t\treturn &read{AuthCtrl: authCtrl}\n\t}\n}\n\nfunc User(createBase base.AuthFunc) base.Ajaxer {\n\n\tlog.Println(\"Restful user request.\")\n\tauthCtrl := createBase(\"controller/account/user\")\n\n\tswitch authCtrl.Req.Method {\n\t\"PUT\":\n\t\treturn &edit{AuthCtrl: authCtrl}\n\t\t\"DELETE\":\n\t\treturn &delete{AuthCtrl: authCtrl}\n\tdefault:\n\t\treturn &read{AuthCtrl: authCtrl}\n\t}\n}"
  },
  {
    "path": "testData/parser/Recover2.txt",
    "content": "GO_FILE\n  PACKAGE_CLAUSE\n    PsiElement(package)('package')\n    PsiElement(identifier)('http')\n  IMPORT_LIST\n    <empty list>\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('labelsCheck')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      GOTO_STATEMENT\n        PsiElement(goto)('goto')\n        LABEL_REF\n          PsiElement(identifier)('Label1')\n      PsiElement(;)(';')\n      LABELED_STATEMENT\n        LABEL_DEFINITION\n          PsiElement(identifier)('Label1')\n        PsiElement(:)(':')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            LITERAL\n              PsiElement(int)('1')\n      PsiElement(;)(';')\n      GOTO_STATEMENT\n        PsiElement(goto)('goto')\n        LABEL_REF\n          PsiElement(identifier)('Label2')\n      PsiElement(})('}')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('serve')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('foo')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              PsiErrorElement:'!=', '%', '&', '&^', '(', ')', '*', '+', '++', '-', '--', '/', <, <<, <=, <expression>, <literal type expr>, '==', '>', '>=', '>>', '^' or '|' expected, got 'if'\n                <empty list>\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            LITERAL\n              PsiElement(int)('1')\n        BLOCK\n          PsiElement({)('{')\n          PsiElement(})('}')\n      PsiElement(})('}')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('foo')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('bar')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              PsiErrorElement:'!=', '%', '&', '&^', '(', ')', '*', '+', '++', '-', '--', '/', <, <<, <=, <expression>, <literal type expr>, '==', '>', '>=', '>>', '^' or '|' expected, got ','\n                <empty list>\n          PsiElement(,)(',')\n      PsiElement())(')')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('doo')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              PsiElement())(')')\n      PsiElement(})('}')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('main')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      EXPR_SWITCH_STATEMENT\n        SWITCH_START\n          PsiElement(switch)('switch')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('expr')\n        PsiElement({)('{')\n        EXPR_CASE_CLAUSE\n          PsiElement(case)('case')\n          PsiErrorElement:<expression> expected, got '}'\n            <empty list>\n        PsiElement(})('}')\n      PsiElement(})('}')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('_')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          COMPOSITE_LIT\n            ARRAY_OR_SLICE_TYPE\n              PsiElement([)('[')\n              PsiElement(])(']')\n              TYPE\n                TYPE_REFERENCE_EXPRESSION\n                  PsiElement(identifier)('string')\n            PsiErrorElement:'!=', '%', '&', '&^', '(', '*', '+', '++', '-', '--', '.', '/', <, <<, <=, '==', '>', '>=', '>>', '^', '{' or '|' expected, got ''\n              <empty list>\n      PsiElement(})('}')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('User')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('createBase')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('base')\n              PsiElement(.)('.')\n              PsiElement(identifier)('AuthFunc')\n        PsiElement())(')')\n      RESULT\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('base')\n            PsiElement(.)('.')\n            PsiElement(identifier)('Ajaxer')\n    BLOCK\n      PsiElement({)('{')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('log')\n              PsiElement(.)('.')\n              PsiElement(identifier)('Println')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              STRING_LITERAL\n                PsiElement(string)('\"Restful user request.\"')\n              PsiElement())(')')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('authCtrl')\n          PsiElement(:=)(':=')\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('createBase')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              STRING_LITERAL\n                PsiElement(string)('\"controller/account/user\"')\n              PsiElement())(')')\n      EXPR_SWITCH_STATEMENT\n        SWITCH_START\n          PsiElement(switch)('switch')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            SELECTOR_EXPR\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('authCtrl')\n                PsiElement(.)('.')\n                PsiElement(identifier)('Req')\n              PsiElement(.)('.')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('Method')\n        PsiElement({)('{')\n        EXPR_CASE_CLAUSE\n          PsiElement(case)('case')\n          STRING_LITERAL\n            PsiElement(string)('\"PUT\"')\n          PsiElement(:)(':')\n          RETURN_STATEMENT\n            PsiElement(return)('return')\n            UNARY_EXPR\n              PsiElement(&)('&')\n              COMPOSITE_LIT\n                TYPE_REFERENCE_EXPRESSION\n                  PsiElement(identifier)('edit')\n                LITERAL_VALUE\n                  PsiElement({)('{')\n                  ELEMENT\n                    KEY\n                      FIELD_NAME\n                        PsiElement(identifier)('AuthCtrl')\n                    PsiElement(:)(':')\n                    VALUE\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('authCtrl')\n                  PsiElement(})('}')\n          SIMPLE_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              STRING_LITERAL\n                PsiElement(string)('\"DELETE\"')\n          PsiErrorElement:',', ';', <-, <NL>, <assign op> or '}' expected, got ':'\n            PsiElement(:)(':')\n          RETURN_STATEMENT\n            PsiElement(return)('return')\n            UNARY_EXPR\n              PsiElement(&)('&')\n              COMPOSITE_LIT\n                TYPE_REFERENCE_EXPRESSION\n                  PsiElement(identifier)('delete')\n                LITERAL_VALUE\n                  PsiElement({)('{')\n                  ELEMENT\n                    KEY\n                      FIELD_NAME\n                        PsiElement(identifier)('AuthCtrl')\n                    PsiElement(:)(':')\n                    VALUE\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('authCtrl')\n                  PsiElement(})('}')\n        EXPR_CASE_CLAUSE\n          PsiElement(default)('default')\n          PsiElement(:)(':')\n          RETURN_STATEMENT\n            PsiElement(return)('return')\n            UNARY_EXPR\n              PsiElement(&)('&')\n              COMPOSITE_LIT\n                TYPE_REFERENCE_EXPRESSION\n                  PsiElement(identifier)('read')\n                LITERAL_VALUE\n                  PsiElement({)('{')\n                  ELEMENT\n                    KEY\n                      FIELD_NAME\n                        PsiElement(identifier)('AuthCtrl')\n                    PsiElement(:)(':')\n                    VALUE\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('authCtrl')\n                  PsiElement(})('}')\n        PsiElement(})('}')\n      PsiElement(})('}')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('User')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('createBase')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('base')\n              PsiElement(.)('.')\n              PsiElement(identifier)('AuthFunc')\n        PsiElement())(')')\n      RESULT\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('base')\n            PsiElement(.)('.')\n            PsiElement(identifier)('Ajaxer')\n    BLOCK\n      PsiElement({)('{')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('log')\n              PsiElement(.)('.')\n              PsiElement(identifier)('Println')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              STRING_LITERAL\n                PsiElement(string)('\"Restful user request.\"')\n              PsiElement())(')')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('authCtrl')\n          PsiElement(:=)(':=')\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('createBase')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              STRING_LITERAL\n                PsiElement(string)('\"controller/account/user\"')\n              PsiElement())(')')\n      EXPR_SWITCH_STATEMENT\n        SWITCH_START\n          PsiElement(switch)('switch')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            SELECTOR_EXPR\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('authCtrl')\n                PsiElement(.)('.')\n                PsiElement(identifier)('Req')\n              PsiElement(.)('.')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('Method')\n        PsiElement({)('{')\n        EXPR_CASE_CLAUSE\n          PsiErrorElement:case or default expected, got '\"PUT\"'\n            <empty list>\n          SIMPLE_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              STRING_LITERAL\n                PsiElement(string)('\"PUT\"')\n          PsiErrorElement:',', ';', <-, <NL>, <assign op> or '}' expected, got ':'\n            PsiElement(:)(':')\n          RETURN_STATEMENT\n            PsiElement(return)('return')\n            UNARY_EXPR\n              PsiElement(&)('&')\n              COMPOSITE_LIT\n                TYPE_REFERENCE_EXPRESSION\n                  PsiElement(identifier)('edit')\n                LITERAL_VALUE\n                  PsiElement({)('{')\n                  ELEMENT\n                    KEY\n                      FIELD_NAME\n                        PsiElement(identifier)('AuthCtrl')\n                    PsiElement(:)(':')\n                    VALUE\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('authCtrl')\n                  PsiElement(})('}')\n          SIMPLE_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              STRING_LITERAL\n                PsiElement(string)('\"DELETE\"')\n          PsiErrorElement:',', ';', <-, <NL>, <assign op> or '}' expected, got ':'\n            PsiElement(:)(':')\n          RETURN_STATEMENT\n            PsiElement(return)('return')\n            UNARY_EXPR\n              PsiElement(&)('&')\n              COMPOSITE_LIT\n                TYPE_REFERENCE_EXPRESSION\n                  PsiElement(identifier)('delete')\n                LITERAL_VALUE\n                  PsiElement({)('{')\n                  ELEMENT\n                    KEY\n                      FIELD_NAME\n                        PsiElement(identifier)('AuthCtrl')\n                    PsiElement(:)(':')\n                    VALUE\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('authCtrl')\n                  PsiElement(})('}')\n        EXPR_CASE_CLAUSE\n          PsiElement(default)('default')\n          PsiElement(:)(':')\n          RETURN_STATEMENT\n            PsiElement(return)('return')\n            UNARY_EXPR\n              PsiElement(&)('&')\n              COMPOSITE_LIT\n                TYPE_REFERENCE_EXPRESSION\n                  PsiElement(identifier)('read')\n                LITERAL_VALUE\n                  PsiElement({)('{')\n                  ELEMENT\n                    KEY\n                      FIELD_NAME\n                        PsiElement(identifier)('AuthCtrl')\n                    PsiElement(:)(':')\n                    VALUE\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('authCtrl')\n                  PsiElement(})('}')\n        PsiElement(})('}')\n      PsiElement(})('}')"
  },
  {
    "path": "testData/parser/Recover3.go",
    "content": "package main\n\nfooo\n\nfunc\n\nfunc example() {\n}\n\nfoo\n\nfunc ex"
  },
  {
    "path": "testData/parser/Recover3.txt",
    "content": "GO_FILE\n  PACKAGE_CLAUSE\n    PsiElement(package)('package')\n    PsiElement(identifier)('main')\n  IMPORT_LIST\n    <empty list>\n  PsiErrorElement:const, func, import, type or var expected, got 'fooo'\n    <empty list>\n  PsiElement(identifier)('fooo')\n  METHOD_DECLARATION\n    PsiElement(func)('func')\n    PsiErrorElement:'(' or identifier expected, got 'func'\n      <empty list>\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('example')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      PsiElement(})('}')\n  PsiErrorElement:'foo' unexpected\n    PsiElement(identifier)('foo')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('ex')\n    PsiErrorElement:'(' expected, unexpected end of file\n      <empty list>"
  },
  {
    "path": "testData/parser/Simple.go",
    "content": "package foo\n\nfunc NewCipher(key []byte) (cipher.Block , error) {\n\treturn c, nil\n}\n\nfunc simpleF() int {\n    return 2\n}\n\nfunc complexF1() (re float64, im float64) {\n    return -7.0, -4.0\n}\n\nfunc test() {\n    switch tag {\n        default: s3()\n        case 0, 1, 2, 3: s1()\n        case 4, 5, 6, 7: s2()\n    }\n\n    switch x := f(); {  // missing switch expression means \"true\"\n        case x < 0: return -x\n        default: return x\n    }\n    switch x := f(); 1==1 {  // missing switch expression means \"true\"\n        case x < 0: return -x\n        default: return x\n    }\n\n    switch {\n        case x < y: f1()\n        case x < z: f2()\n        case x == 4: f3()\n    }\n}\n\nfunc emptyFor() {\n    for s.accept(decimalDigits) {\n\n    }\n}\n\nfunc emptyIf() {\n  if err := q.Send(&Cmd{U: parsed, M: method}); err != nil {\n  }\n}\n\nfunc emptyForRange() {\n      for key, value := range collection {\n\n      }\n\n}\n\nfunc emptyClauses() {\n    verb := \"1\"[0]\n    switch verb {\n        case 'p':\n        default:\n    }\n}\n\nfunc (h extraHeader) Write(w io.Writer) {\n\tfor i, v := range []string{h.contentType, h.contentLength, h.connection, h.date, h.transferEncoding} {\n\t\tif v != \"\" {\n\t\t\tw.Write(extraHeaderKeys[i])\n\t\t\tw.Write(colonSpace)\n\t\t\tio.WriteString(w, v)\n\t\t\tw.Write(crlf)\n\t\t}\n\t}\n}\n\nfunc main() {\n    if 1 != 1 {\n    }\n\n\tselect {\n\tcase ce := <-ch:\n\t\treturn ce.cn, ce.err\n\tcase <-time.After(c.netTimeout()):\n\t\t// Too slow. Fall through.\n\t}\n}\n\n\nvar days = [...]string{\n\t\"Sunday\",\n\t\"Monday\",\n\t\"Tuesday\",\n\t\"Wednesday\",\n\t\"Thursday\",\n\t\"Friday\",\n\t\"Saturday\",\n}\n\nvar htmlReplacer = strings.NewReplacer(\n\"&\", \"&amp;\",\n\"<\", \"&lt;\",\n\">\", \"&gt;\",\n// \"&#34;\" is shorter than \"&quot;\".\n`\"`, \"&#34;\",\n// \"&#39;\" is shorter than \"&apos;\" and apos was not in HTML until HTML5.\n\"'\", \"&#39;\",\n)\n\nfunc tets() {\n  v = v.assignTo(\"reflect.Value.Call\", targ, (*interface{})(addr))\n  type test interface {}\n  t := new(test)\n  v := (interface{})(t)\n}\n\nfunc (*ctx) Errorf(string, ...interface{}) {}\n\nvar alreadyAddedErrors = map[pb.TaskQueueServiceError_ErrorCode]bool{\n  pb.TaskQueueServiceError_TASK_ALREADY_EXISTS: true,\n}\n\nvar alreadyAddedErrors2 = map[pb.TaskQueueServiceError_ErrorCode]bool{\n  pb.TaskQueueServiceError_TASK_ALREADY_EXISTS: true,\n  pb.TaskQueueServiceError_TOMBSTONED_TASK:     true,\n}\n\nvar a =    []byte(b.Type + \"-----\\n\")\n\nvar b = map[string]int{\n    \"\",\n}\n\nfunc foo() {\n    func () {\n    }()\n}\n\nfunc hello( id string,\n) error {\n    return nil\n}\n\nfunc hello( id string, ) error {\n    return nil\n}\n\nfunc sourceReader(files <-chan *File) {\n    for _, page := range []*File{} {\n        if page.Contents == \"\" {\n            break\n        }\n    }\n\n}\n\nfunc sourceReader1() {\n    for _, page := range []*File{} {\n    }\n}\n\nfunc sourceReader1() {\n    for _, page := range *File{} { // error as expected\n    }\n}\n\nfunc main() {\n    a := []byte{}\n    b := append(\n    []byte(\"demo\"),\n    a..., // example fails here\n)\n    _ = b\n}\n\nfunc main() {\n    for a:= 1; a<10; a++ {\n        goto err\n    }\n    err:\n}\n\nfunc main() {\n    if err := foo(demo{}); err!= nil {\n        panic(err)\n    }\n\n    if err := (demo{}); err!= nil {\n        panic(err)\n    }\n    for b, i := M{}, 10; i < 10; i++ { // error\n        fmt.Println(v)\n    }\n    for b, i := (M{}), 10; i < 10; i++ {\n        fmt.Println(v)\n    }\n}\n\ntype name struct {\n    foo string `xml:\"\"`\n}\n\nfunc TestFor() {\n    type name1234 interface {\n\n    }\n    var v []int\n    call(func() {\n        for range v { // v is not resolved here\n        }\n    })\n}\n\nfunc TestIf() {\n    var v string\n    call(func() {\n        if v == \"\" {\n        }\n        if \"\" == v {  // v is not resolved here\n        }\n    })\n}\n\nfunc call(f func()) {\n    f()\n}\n\ntype SensorFactory struct {\n\tSensors map[string]string\n}\n\nfunc InitSensorFactory() *SensorFactory {\n\tfactory := new (SensorFactory)\n\tfactory.Sensors = make(map[string]string)\n\treturn factory\n}\n"
  },
  {
    "path": "testData/parser/Simple.txt",
    "content": "GO_FILE\n  PACKAGE_CLAUSE\n    PsiElement(package)('package')\n    PsiElement(identifier)('foo')\n  IMPORT_LIST\n    <empty list>\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('NewCipher')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('key')\n          ARRAY_OR_SLICE_TYPE\n            PsiElement([)('[')\n            PsiElement(])(']')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('byte')\n        PsiElement())(')')\n      RESULT\n        PsiElement(()('(')\n        TYPE_LIST\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('cipher')\n              PsiElement(.)('.')\n              PsiElement(identifier)('Block')\n          PsiElement(,)(',')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('error')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n        REFERENCE_EXPRESSION\n          PsiElement(identifier)('c')\n        PsiElement(,)(',')\n        REFERENCE_EXPRESSION\n          PsiElement(identifier)('nil')\n      PsiElement(})('}')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('simpleF')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n      RESULT\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('int')\n    BLOCK\n      PsiElement({)('{')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n        LITERAL\n          PsiElement(int)('2')\n      PsiElement(})('}')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('complexF1')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n      RESULT\n        PARAMETERS\n          PsiElement(()('(')\n          PARAMETER_DECLARATION\n            PARAM_DEFINITION\n              PsiElement(identifier)('re')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('float64')\n          PsiElement(,)(',')\n          PARAMETER_DECLARATION\n            PARAM_DEFINITION\n              PsiElement(identifier)('im')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('float64')\n          PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n        UNARY_EXPR\n          PsiElement(-)('-')\n          LITERAL\n            PsiElement(float)('7.0')\n        PsiElement(,)(',')\n        UNARY_EXPR\n          PsiElement(-)('-')\n          LITERAL\n            PsiElement(float)('4.0')\n      PsiElement(})('}')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('test')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      EXPR_SWITCH_STATEMENT\n        SWITCH_START\n          PsiElement(switch)('switch')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('tag')\n        PsiElement({)('{')\n        EXPR_CASE_CLAUSE\n          PsiElement(default)('default')\n          PsiElement(:)(':')\n          SIMPLE_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('s3')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  PsiElement())(')')\n        EXPR_CASE_CLAUSE\n          PsiElement(case)('case')\n          LITERAL\n            PsiElement(int)('0')\n          PsiElement(,)(',')\n          LITERAL\n            PsiElement(int)('1')\n          PsiElement(,)(',')\n          LITERAL\n            PsiElement(int)('2')\n          PsiElement(,)(',')\n          LITERAL\n            PsiElement(int)('3')\n          PsiElement(:)(':')\n          SIMPLE_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('s1')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  PsiElement())(')')\n        EXPR_CASE_CLAUSE\n          PsiElement(case)('case')\n          LITERAL\n            PsiElement(int)('4')\n          PsiElement(,)(',')\n          LITERAL\n            PsiElement(int)('5')\n          PsiElement(,)(',')\n          LITERAL\n            PsiElement(int)('6')\n          PsiElement(,)(',')\n          LITERAL\n            PsiElement(int)('7')\n          PsiElement(:)(':')\n          SIMPLE_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('s2')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  PsiElement())(')')\n        PsiElement(})('}')\n      EXPR_SWITCH_STATEMENT\n        SWITCH_START\n          PsiElement(switch)('switch')\n        SIMPLE_STATEMENT\n          SHORT_VAR_DECLARATION\n            VAR_DEFINITION\n              PsiElement(identifier)('x')\n            PsiElement(:=)(':=')\n            CALL_EXPR\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('f')\n              ARGUMENT_LIST\n                PsiElement(()('(')\n                PsiElement())(')')\n        PsiElement(;)(';')\n        PsiElement({)('{')\n        PsiComment(GO_LINE_COMMENT)('// missing switch expression means \"true\"')\n        EXPR_CASE_CLAUSE\n          PsiElement(case)('case')\n          CONDITIONAL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('x')\n            PsiElement(<)('<')\n            LITERAL\n              PsiElement(int)('0')\n          PsiElement(:)(':')\n          RETURN_STATEMENT\n            PsiElement(return)('return')\n            UNARY_EXPR\n              PsiElement(-)('-')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('x')\n        EXPR_CASE_CLAUSE\n          PsiElement(default)('default')\n          PsiElement(:)(':')\n          RETURN_STATEMENT\n            PsiElement(return)('return')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('x')\n        PsiElement(})('}')\n      EXPR_SWITCH_STATEMENT\n        SWITCH_START\n          PsiElement(switch)('switch')\n        SIMPLE_STATEMENT\n          SHORT_VAR_DECLARATION\n            VAR_DEFINITION\n              PsiElement(identifier)('x')\n            PsiElement(:=)(':=')\n            CALL_EXPR\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('f')\n              ARGUMENT_LIST\n                PsiElement(()('(')\n                PsiElement())(')')\n        PsiElement(;)(';')\n        CONDITIONAL_EXPR\n          LITERAL\n            PsiElement(int)('1')\n          PsiElement(==)('==')\n          LITERAL\n            PsiElement(int)('1')\n        PsiElement({)('{')\n        PsiComment(GO_LINE_COMMENT)('// missing switch expression means \"true\"')\n        EXPR_CASE_CLAUSE\n          PsiElement(case)('case')\n          CONDITIONAL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('x')\n            PsiElement(<)('<')\n            LITERAL\n              PsiElement(int)('0')\n          PsiElement(:)(':')\n          RETURN_STATEMENT\n            PsiElement(return)('return')\n            UNARY_EXPR\n              PsiElement(-)('-')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('x')\n        EXPR_CASE_CLAUSE\n          PsiElement(default)('default')\n          PsiElement(:)(':')\n          RETURN_STATEMENT\n            PsiElement(return)('return')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('x')\n        PsiElement(})('}')\n      EXPR_SWITCH_STATEMENT\n        SWITCH_START\n          PsiElement(switch)('switch')\n        PsiElement({)('{')\n        EXPR_CASE_CLAUSE\n          PsiElement(case)('case')\n          CONDITIONAL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('x')\n            PsiElement(<)('<')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('y')\n          PsiElement(:)(':')\n          SIMPLE_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('f1')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  PsiElement())(')')\n        EXPR_CASE_CLAUSE\n          PsiElement(case)('case')\n          CONDITIONAL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('x')\n            PsiElement(<)('<')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('z')\n          PsiElement(:)(':')\n          SIMPLE_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('f2')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  PsiElement())(')')\n        EXPR_CASE_CLAUSE\n          PsiElement(case)('case')\n          CONDITIONAL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('x')\n            PsiElement(==)('==')\n            LITERAL\n              PsiElement(int)('4')\n          PsiElement(:)(':')\n          SIMPLE_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('f3')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  PsiElement())(')')\n        PsiElement(})('}')\n      PsiElement(})('}')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('emptyFor')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      FOR_STATEMENT\n        PsiElement(for)('for')\n        CALL_EXPR\n          REFERENCE_EXPRESSION\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('s')\n            PsiElement(.)('.')\n            PsiElement(identifier)('accept')\n          ARGUMENT_LIST\n            PsiElement(()('(')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('decimalDigits')\n            PsiElement())(')')\n        BLOCK\n          PsiElement({)('{')\n          PsiElement(})('}')\n      PsiElement(})('}')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('emptyIf')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          SHORT_VAR_DECLARATION\n            VAR_DEFINITION\n              PsiElement(identifier)('err')\n            PsiElement(:=)(':=')\n            CALL_EXPR\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('q')\n                PsiElement(.)('.')\n                PsiElement(identifier)('Send')\n              ARGUMENT_LIST\n                PsiElement(()('(')\n                UNARY_EXPR\n                  PsiElement(&)('&')\n                  COMPOSITE_LIT\n                    TYPE_REFERENCE_EXPRESSION\n                      PsiElement(identifier)('Cmd')\n                    LITERAL_VALUE\n                      PsiElement({)('{')\n                      ELEMENT\n                        KEY\n                          FIELD_NAME\n                            PsiElement(identifier)('U')\n                        PsiElement(:)(':')\n                        VALUE\n                          REFERENCE_EXPRESSION\n                            PsiElement(identifier)('parsed')\n                      PsiElement(,)(',')\n                      ELEMENT\n                        KEY\n                          FIELD_NAME\n                            PsiElement(identifier)('M')\n                        PsiElement(:)(':')\n                        VALUE\n                          REFERENCE_EXPRESSION\n                            PsiElement(identifier)('method')\n                      PsiElement(})('}')\n                PsiElement())(')')\n        PsiElement(;)(';')\n        CONDITIONAL_EXPR\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('err')\n          PsiElement(!=)('!=')\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('nil')\n        BLOCK\n          PsiElement({)('{')\n          PsiElement(})('}')\n      PsiElement(})('}')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('emptyForRange')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      FOR_STATEMENT\n        PsiElement(for)('for')\n        RANGE_CLAUSE\n          VAR_DEFINITION\n            PsiElement(identifier)('key')\n          PsiElement(,)(',')\n          VAR_DEFINITION\n            PsiElement(identifier)('value')\n          PsiElement(:=)(':=')\n          PsiElement(range)('range')\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('collection')\n        BLOCK\n          PsiElement({)('{')\n          PsiElement(})('}')\n      PsiElement(})('}')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('emptyClauses')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('verb')\n          PsiElement(:=)(':=')\n          INDEX_OR_SLICE_EXPR\n            STRING_LITERAL\n              PsiElement(string)('\"1\"')\n            PsiElement([)('[')\n            LITERAL\n              PsiElement(int)('0')\n            PsiElement(])(']')\n      EXPR_SWITCH_STATEMENT\n        SWITCH_START\n          PsiElement(switch)('switch')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('verb')\n        PsiElement({)('{')\n        EXPR_CASE_CLAUSE\n          PsiElement(case)('case')\n          LITERAL\n            PsiElement(char)(''p'')\n          PsiElement(:)(':')\n        EXPR_CASE_CLAUSE\n          PsiElement(default)('default')\n          PsiElement(:)(':')\n        PsiElement(})('}')\n      PsiElement(})('}')\n  METHOD_DECLARATION\n    PsiElement(func)('func')\n    RECEIVER\n      PsiElement(()('(')\n      PsiElement(identifier)('h')\n      TYPE\n        TYPE_REFERENCE_EXPRESSION\n          PsiElement(identifier)('extraHeader')\n      PsiElement())(')')\n    PsiElement(identifier)('Write')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('w')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('io')\n              PsiElement(.)('.')\n              PsiElement(identifier)('Writer')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      FOR_STATEMENT\n        PsiElement(for)('for')\n        RANGE_CLAUSE\n          VAR_DEFINITION\n            PsiElement(identifier)('i')\n          PsiElement(,)(',')\n          VAR_DEFINITION\n            PsiElement(identifier)('v')\n          PsiElement(:=)(':=')\n          PsiElement(range)('range')\n          COMPOSITE_LIT\n            ARRAY_OR_SLICE_TYPE\n              PsiElement([)('[')\n              PsiElement(])(']')\n              TYPE\n                TYPE_REFERENCE_EXPRESSION\n                  PsiElement(identifier)('string')\n            LITERAL_VALUE\n              PsiElement({)('{')\n              ELEMENT\n                VALUE\n                  REFERENCE_EXPRESSION\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('h')\n                    PsiElement(.)('.')\n                    PsiElement(identifier)('contentType')\n              PsiElement(,)(',')\n              ELEMENT\n                VALUE\n                  REFERENCE_EXPRESSION\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('h')\n                    PsiElement(.)('.')\n                    PsiElement(identifier)('contentLength')\n              PsiElement(,)(',')\n              ELEMENT\n                VALUE\n                  REFERENCE_EXPRESSION\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('h')\n                    PsiElement(.)('.')\n                    PsiElement(identifier)('connection')\n              PsiElement(,)(',')\n              ELEMENT\n                VALUE\n                  REFERENCE_EXPRESSION\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('h')\n                    PsiElement(.)('.')\n                    PsiElement(identifier)('date')\n              PsiElement(,)(',')\n              ELEMENT\n                VALUE\n                  REFERENCE_EXPRESSION\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('h')\n                    PsiElement(.)('.')\n                    PsiElement(identifier)('transferEncoding')\n              PsiElement(})('}')\n        BLOCK\n          PsiElement({)('{')\n          IF_STATEMENT\n            PsiElement(if)('if')\n            SIMPLE_STATEMENT\n              LEFT_HAND_EXPR_LIST\n                CONDITIONAL_EXPR\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('v')\n                  PsiElement(!=)('!=')\n                  STRING_LITERAL\n                    PsiElement(string)('\"\"')\n            BLOCK\n              PsiElement({)('{')\n              SIMPLE_STATEMENT\n                LEFT_HAND_EXPR_LIST\n                  CALL_EXPR\n                    REFERENCE_EXPRESSION\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('w')\n                      PsiElement(.)('.')\n                      PsiElement(identifier)('Write')\n                    ARGUMENT_LIST\n                      PsiElement(()('(')\n                      INDEX_OR_SLICE_EXPR\n                        REFERENCE_EXPRESSION\n                          PsiElement(identifier)('extraHeaderKeys')\n                        PsiElement([)('[')\n                        REFERENCE_EXPRESSION\n                          PsiElement(identifier)('i')\n                        PsiElement(])(']')\n                      PsiElement())(')')\n              SIMPLE_STATEMENT\n                LEFT_HAND_EXPR_LIST\n                  CALL_EXPR\n                    REFERENCE_EXPRESSION\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('w')\n                      PsiElement(.)('.')\n                      PsiElement(identifier)('Write')\n                    ARGUMENT_LIST\n                      PsiElement(()('(')\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('colonSpace')\n                      PsiElement())(')')\n              SIMPLE_STATEMENT\n                LEFT_HAND_EXPR_LIST\n                  CALL_EXPR\n                    REFERENCE_EXPRESSION\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('io')\n                      PsiElement(.)('.')\n                      PsiElement(identifier)('WriteString')\n                    ARGUMENT_LIST\n                      PsiElement(()('(')\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('w')\n                      PsiElement(,)(',')\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('v')\n                      PsiElement())(')')\n              SIMPLE_STATEMENT\n                LEFT_HAND_EXPR_LIST\n                  CALL_EXPR\n                    REFERENCE_EXPRESSION\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('w')\n                      PsiElement(.)('.')\n                      PsiElement(identifier)('Write')\n                    ARGUMENT_LIST\n                      PsiElement(()('(')\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('crlf')\n                      PsiElement())(')')\n              PsiElement(})('}')\n          PsiElement(})('}')\n      PsiElement(})('}')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('main')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            CONDITIONAL_EXPR\n              LITERAL\n                PsiElement(int)('1')\n              PsiElement(!=)('!=')\n              LITERAL\n                PsiElement(int)('1')\n        BLOCK\n          PsiElement({)('{')\n          PsiElement(})('}')\n      SELECT_STATEMENT\n        PsiElement(select)('select')\n        PsiElement({)('{')\n        COMM_CLAUSE\n          COMM_CASE\n            PsiElement(case)('case')\n            RECV_STATEMENT\n              VAR_DEFINITION\n                PsiElement(identifier)('ce')\n              PsiElement(:=)(':=')\n              UNARY_EXPR\n                PsiElement(<-)('<-')\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('ch')\n          PsiElement(:)(':')\n          RETURN_STATEMENT\n            PsiElement(return)('return')\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('ce')\n              PsiElement(.)('.')\n              PsiElement(identifier)('cn')\n            PsiElement(,)(',')\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('ce')\n              PsiElement(.)('.')\n              PsiElement(identifier)('err')\n        COMM_CLAUSE\n          COMM_CASE\n            PsiElement(case)('case')\n            RECV_STATEMENT\n              UNARY_EXPR\n                PsiElement(<-)('<-')\n                CALL_EXPR\n                  REFERENCE_EXPRESSION\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('time')\n                    PsiElement(.)('.')\n                    PsiElement(identifier)('After')\n                  ARGUMENT_LIST\n                    PsiElement(()('(')\n                    CALL_EXPR\n                      REFERENCE_EXPRESSION\n                        REFERENCE_EXPRESSION\n                          PsiElement(identifier)('c')\n                        PsiElement(.)('.')\n                        PsiElement(identifier)('netTimeout')\n                      ARGUMENT_LIST\n                        PsiElement(()('(')\n                        PsiElement())(')')\n                    PsiElement())(')')\n          PsiElement(:)(':')\n        PsiComment(GO_LINE_COMMENT)('// Too slow. Fall through.')\n        PsiElement(})('}')\n      PsiElement(})('}')\n  VAR_DECLARATION\n    PsiElement(var)('var')\n    VAR_SPEC\n      VAR_DEFINITION\n        PsiElement(identifier)('days')\n      PsiElement(=)('=')\n      COMPOSITE_LIT\n        ARRAY_OR_SLICE_TYPE\n          PsiElement([)('[')\n          PsiElement(...)('...')\n          PsiElement(])(']')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('string')\n        LITERAL_VALUE\n          PsiElement({)('{')\n          ELEMENT\n            VALUE\n              STRING_LITERAL\n                PsiElement(string)('\"Sunday\"')\n          PsiElement(,)(',')\n          ELEMENT\n            VALUE\n              STRING_LITERAL\n                PsiElement(string)('\"Monday\"')\n          PsiElement(,)(',')\n          ELEMENT\n            VALUE\n              STRING_LITERAL\n                PsiElement(string)('\"Tuesday\"')\n          PsiElement(,)(',')\n          ELEMENT\n            VALUE\n              STRING_LITERAL\n                PsiElement(string)('\"Wednesday\"')\n          PsiElement(,)(',')\n          ELEMENT\n            VALUE\n              STRING_LITERAL\n                PsiElement(string)('\"Thursday\"')\n          PsiElement(,)(',')\n          ELEMENT\n            VALUE\n              STRING_LITERAL\n                PsiElement(string)('\"Friday\"')\n          PsiElement(,)(',')\n          ELEMENT\n            VALUE\n              STRING_LITERAL\n                PsiElement(string)('\"Saturday\"')\n          PsiElement(,)(',')\n          PsiElement(})('}')\n  VAR_DECLARATION\n    PsiElement(var)('var')\n    VAR_SPEC\n      VAR_DEFINITION\n        PsiElement(identifier)('htmlReplacer')\n      PsiElement(=)('=')\n      CALL_EXPR\n        REFERENCE_EXPRESSION\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('strings')\n          PsiElement(.)('.')\n          PsiElement(identifier)('NewReplacer')\n        ARGUMENT_LIST\n          PsiElement(()('(')\n          STRING_LITERAL\n            PsiElement(string)('\"&\"')\n          PsiElement(,)(',')\n          STRING_LITERAL\n            PsiElement(string)('\"&amp;\"')\n          PsiElement(,)(',')\n          STRING_LITERAL\n            PsiElement(string)('\"<\"')\n          PsiElement(,)(',')\n          STRING_LITERAL\n            PsiElement(string)('\"&lt;\"')\n          PsiElement(,)(',')\n          STRING_LITERAL\n            PsiElement(string)('\">\"')\n          PsiElement(,)(',')\n          STRING_LITERAL\n            PsiElement(string)('\"&gt;\"')\n          PsiElement(,)(',')\n          PsiComment(GO_LINE_COMMENT)('// \"&#34;\" is shorter than \"&quot;\".')\n          STRING_LITERAL\n            PsiElement(raw_string)('`\"`')\n          PsiElement(,)(',')\n          STRING_LITERAL\n            PsiElement(string)('\"&#34;\"')\n          PsiElement(,)(',')\n          PsiComment(GO_LINE_COMMENT)('// \"&#39;\" is shorter than \"&apos;\" and apos was not in HTML until HTML5.')\n          STRING_LITERAL\n            PsiElement(string)('\"'\"')\n          PsiElement(,)(',')\n          STRING_LITERAL\n            PsiElement(string)('\"&#39;\"')\n          PsiElement(,)(',')\n          PsiElement())(')')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('tets')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      ASSIGNMENT_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('v')\n        ASSIGN_OP\n          PsiElement(=)('=')\n        CALL_EXPR\n          REFERENCE_EXPRESSION\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('v')\n            PsiElement(.)('.')\n            PsiElement(identifier)('assignTo')\n          ARGUMENT_LIST\n            PsiElement(()('(')\n            STRING_LITERAL\n              PsiElement(string)('\"reflect.Value.Call\"')\n            PsiElement(,)(',')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('targ')\n            PsiElement(,)(',')\n            CONVERSION_EXPR\n              PAR_TYPE\n                PsiElement(()('(')\n                POINTER_TYPE\n                  PsiElement(*)('*')\n                  INTERFACE_TYPE\n                    PsiElement(interface)('interface')\n                    PsiElement({)('{')\n                    PsiElement(})('}')\n                PsiElement())(')')\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('addr')\n              PsiElement())(')')\n            PsiElement())(')')\n      STATEMENT\n        TYPE_DECLARATION\n          PsiElement(type)('type')\n          TYPE_SPEC\n            SPEC_TYPE\n              PsiElement(identifier)('test')\n              INTERFACE_TYPE\n                PsiElement(interface)('interface')\n                PsiElement({)('{')\n                PsiElement(})('}')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('t')\n          PsiElement(:=)(':=')\n          BUILTIN_CALL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('new')\n            BUILTIN_ARGUMENT_LIST\n              PsiElement(()('(')\n              TYPE\n                TYPE_REFERENCE_EXPRESSION\n                  PsiElement(identifier)('test')\n              PsiElement())(')')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('v')\n          PsiElement(:=)(':=')\n          CONVERSION_EXPR\n            PAR_TYPE\n              PsiElement(()('(')\n              INTERFACE_TYPE\n                PsiElement(interface)('interface')\n                PsiElement({)('{')\n                PsiElement(})('}')\n              PsiElement())(')')\n            PsiElement(()('(')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('t')\n            PsiElement())(')')\n      PsiElement(})('}')\n  METHOD_DECLARATION\n    PsiElement(func)('func')\n    RECEIVER\n      PsiElement(()('(')\n      POINTER_TYPE\n        PsiElement(*)('*')\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('ctx')\n      PsiElement())(')')\n    PsiElement(identifier)('Errorf')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('string')\n        PsiElement(,)(',')\n        PARAMETER_DECLARATION\n          PsiElement(...)('...')\n          INTERFACE_TYPE\n            PsiElement(interface)('interface')\n            PsiElement({)('{')\n            PsiElement(})('}')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      PsiElement(})('}')\n  VAR_DECLARATION\n    PsiElement(var)('var')\n    VAR_SPEC\n      VAR_DEFINITION\n        PsiElement(identifier)('alreadyAddedErrors')\n      PsiElement(=)('=')\n      COMPOSITE_LIT\n        MAP_TYPE\n          PsiElement(map)('map')\n          PsiElement([)('[')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('pb')\n              PsiElement(.)('.')\n              PsiElement(identifier)('TaskQueueServiceError_ErrorCode')\n          PsiElement(])(']')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('bool')\n        LITERAL_VALUE\n          PsiElement({)('{')\n          ELEMENT\n            KEY\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('pb')\n                PsiElement(.)('.')\n                PsiElement(identifier)('TaskQueueServiceError_TASK_ALREADY_EXISTS')\n            PsiElement(:)(':')\n            VALUE\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('true')\n          PsiElement(,)(',')\n          PsiElement(})('}')\n  VAR_DECLARATION\n    PsiElement(var)('var')\n    VAR_SPEC\n      VAR_DEFINITION\n        PsiElement(identifier)('alreadyAddedErrors2')\n      PsiElement(=)('=')\n      COMPOSITE_LIT\n        MAP_TYPE\n          PsiElement(map)('map')\n          PsiElement([)('[')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('pb')\n              PsiElement(.)('.')\n              PsiElement(identifier)('TaskQueueServiceError_ErrorCode')\n          PsiElement(])(']')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('bool')\n        LITERAL_VALUE\n          PsiElement({)('{')\n          ELEMENT\n            KEY\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('pb')\n                PsiElement(.)('.')\n                PsiElement(identifier)('TaskQueueServiceError_TASK_ALREADY_EXISTS')\n            PsiElement(:)(':')\n            VALUE\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('true')\n          PsiElement(,)(',')\n          ELEMENT\n            KEY\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('pb')\n                PsiElement(.)('.')\n                PsiElement(identifier)('TaskQueueServiceError_TOMBSTONED_TASK')\n            PsiElement(:)(':')\n            VALUE\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('true')\n          PsiElement(,)(',')\n          PsiElement(})('}')\n  VAR_DECLARATION\n    PsiElement(var)('var')\n    VAR_SPEC\n      VAR_DEFINITION\n        PsiElement(identifier)('a')\n      PsiElement(=)('=')\n      CONVERSION_EXPR\n        ARRAY_OR_SLICE_TYPE\n          PsiElement([)('[')\n          PsiElement(])(']')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('byte')\n        PsiElement(()('(')\n        ADD_EXPR\n          REFERENCE_EXPRESSION\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('b')\n            PsiElement(.)('.')\n            PsiElement(identifier)('Type')\n          PsiElement(+)('+')\n          STRING_LITERAL\n            PsiElement(string)('\"-----\\n\"')\n        PsiElement())(')')\n  VAR_DECLARATION\n    PsiElement(var)('var')\n    VAR_SPEC\n      VAR_DEFINITION\n        PsiElement(identifier)('b')\n      PsiElement(=)('=')\n      COMPOSITE_LIT\n        MAP_TYPE\n          PsiElement(map)('map')\n          PsiElement([)('[')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('string')\n          PsiElement(])(']')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('int')\n        LITERAL_VALUE\n          PsiElement({)('{')\n          ELEMENT\n            VALUE\n              STRING_LITERAL\n                PsiElement(string)('\"\"')\n          PsiElement(,)(',')\n          PsiElement(})('}')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('foo')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            FUNCTION_LIT\n              PsiElement(func)('func')\n              SIGNATURE\n                PARAMETERS\n                  PsiElement(()('(')\n                  PsiElement())(')')\n              BLOCK\n                PsiElement({)('{')\n                PsiElement(})('}')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              PsiElement())(')')\n      PsiElement(})('}')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('hello')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('id')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('string')\n        PsiElement(,)(',')\n        PsiElement())(')')\n      RESULT\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('error')\n    BLOCK\n      PsiElement({)('{')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n        REFERENCE_EXPRESSION\n          PsiElement(identifier)('nil')\n      PsiElement(})('}')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('hello')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('id')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('string')\n        PsiElement(,)(',')\n        PsiElement())(')')\n      RESULT\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('error')\n    BLOCK\n      PsiElement({)('{')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n        REFERENCE_EXPRESSION\n          PsiElement(identifier)('nil')\n      PsiElement(})('}')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('sourceReader')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('files')\n          CHANNEL_TYPE\n            PsiElement(<-)('<-')\n            PsiElement(chan)('chan')\n            POINTER_TYPE\n              PsiElement(*)('*')\n              TYPE\n                TYPE_REFERENCE_EXPRESSION\n                  PsiElement(identifier)('File')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      FOR_STATEMENT\n        PsiElement(for)('for')\n        RANGE_CLAUSE\n          VAR_DEFINITION\n            PsiElement(identifier)('_')\n          PsiElement(,)(',')\n          VAR_DEFINITION\n            PsiElement(identifier)('page')\n          PsiElement(:=)(':=')\n          PsiElement(range)('range')\n          COMPOSITE_LIT\n            ARRAY_OR_SLICE_TYPE\n              PsiElement([)('[')\n              PsiElement(])(']')\n              POINTER_TYPE\n                PsiElement(*)('*')\n                TYPE\n                  TYPE_REFERENCE_EXPRESSION\n                    PsiElement(identifier)('File')\n            LITERAL_VALUE\n              PsiElement({)('{')\n              PsiElement(})('}')\n        BLOCK\n          PsiElement({)('{')\n          IF_STATEMENT\n            PsiElement(if)('if')\n            SIMPLE_STATEMENT\n              LEFT_HAND_EXPR_LIST\n                CONDITIONAL_EXPR\n                  REFERENCE_EXPRESSION\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('page')\n                    PsiElement(.)('.')\n                    PsiElement(identifier)('Contents')\n                  PsiElement(==)('==')\n                  STRING_LITERAL\n                    PsiElement(string)('\"\"')\n            BLOCK\n              PsiElement({)('{')\n              BREAK_STATEMENT\n                PsiElement(break)('break')\n              PsiElement(})('}')\n          PsiElement(})('}')\n      PsiElement(})('}')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('sourceReader1')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      FOR_STATEMENT\n        PsiElement(for)('for')\n        RANGE_CLAUSE\n          VAR_DEFINITION\n            PsiElement(identifier)('_')\n          PsiElement(,)(',')\n          VAR_DEFINITION\n            PsiElement(identifier)('page')\n          PsiElement(:=)(':=')\n          PsiElement(range)('range')\n          COMPOSITE_LIT\n            ARRAY_OR_SLICE_TYPE\n              PsiElement([)('[')\n              PsiElement(])(']')\n              POINTER_TYPE\n                PsiElement(*)('*')\n                TYPE\n                  TYPE_REFERENCE_EXPRESSION\n                    PsiElement(identifier)('File')\n            LITERAL_VALUE\n              PsiElement({)('{')\n              PsiElement(})('}')\n        BLOCK\n          PsiElement({)('{')\n          PsiElement(})('}')\n      PsiElement(})('}')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('sourceReader1')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      FOR_STATEMENT\n        PsiElement(for)('for')\n        RANGE_CLAUSE\n          VAR_DEFINITION\n            PsiElement(identifier)('_')\n          PsiElement(,)(',')\n          VAR_DEFINITION\n            PsiElement(identifier)('page')\n          PsiElement(:=)(':=')\n          PsiElement(range)('range')\n          UNARY_EXPR\n            PsiElement(*)('*')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('File')\n        BLOCK\n          PsiElement({)('{')\n          PsiElement(})('}')\n      PsiErrorElement:';', <NL> or '}' expected, got '{'\n        <empty list>\n      STATEMENT\n        BLOCK\n          PsiElement({)('{')\n          PsiComment(GO_LINE_COMMENT)('// error as expected')\n          PsiElement(})('}')\n      PsiElement(})('}')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('main')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('a')\n          PsiElement(:=)(':=')\n          COMPOSITE_LIT\n            ARRAY_OR_SLICE_TYPE\n              PsiElement([)('[')\n              PsiElement(])(']')\n              TYPE\n                TYPE_REFERENCE_EXPRESSION\n                  PsiElement(identifier)('byte')\n            LITERAL_VALUE\n              PsiElement({)('{')\n              PsiElement(})('}')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('b')\n          PsiElement(:=)(':=')\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('append')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              CONVERSION_EXPR\n                ARRAY_OR_SLICE_TYPE\n                  PsiElement([)('[')\n                  PsiElement(])(']')\n                  TYPE\n                    TYPE_REFERENCE_EXPRESSION\n                      PsiElement(identifier)('byte')\n                PsiElement(()('(')\n                STRING_LITERAL\n                  PsiElement(string)('\"demo\"')\n                PsiElement())(')')\n              PsiElement(,)(',')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('a')\n              PsiElement(...)('...')\n              PsiElement(,)(',')\n              PsiComment(GO_LINE_COMMENT)('// example fails here')\n              PsiElement())(')')\n      ASSIGNMENT_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('_')\n        ASSIGN_OP\n          PsiElement(=)('=')\n        REFERENCE_EXPRESSION\n          PsiElement(identifier)('b')\n      PsiElement(})('}')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('main')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      FOR_STATEMENT\n        PsiElement(for)('for')\n        FOR_CLAUSE\n          SIMPLE_STATEMENT\n            SHORT_VAR_DECLARATION\n              VAR_DEFINITION\n                PsiElement(identifier)('a')\n              PsiElement(:=)(':=')\n              LITERAL\n                PsiElement(int)('1')\n          PsiElement(;)(';')\n          CONDITIONAL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('a')\n            PsiElement(<)('<')\n            LITERAL\n              PsiElement(int)('10')\n          PsiElement(;)(';')\n          INC_DEC_STATEMENT\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('a')\n            PsiElement(++)('++')\n        BLOCK\n          PsiElement({)('{')\n          GOTO_STATEMENT\n            PsiElement(goto)('goto')\n            LABEL_REF\n              PsiElement(identifier)('err')\n          PsiElement(})('}')\n      LABELED_STATEMENT\n        LABEL_DEFINITION\n          PsiElement(identifier)('err')\n        PsiElement(:)(':')\n      PsiElement(})('}')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('main')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          SHORT_VAR_DECLARATION\n            VAR_DEFINITION\n              PsiElement(identifier)('err')\n            PsiElement(:=)(':=')\n            CALL_EXPR\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('foo')\n              ARGUMENT_LIST\n                PsiElement(()('(')\n                COMPOSITE_LIT\n                  TYPE_REFERENCE_EXPRESSION\n                    PsiElement(identifier)('demo')\n                  LITERAL_VALUE\n                    PsiElement({)('{')\n                    PsiElement(})('}')\n                PsiElement())(')')\n        PsiElement(;)(';')\n        CONDITIONAL_EXPR\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('err')\n          PsiElement(!=)('!=')\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('nil')\n        BLOCK\n          PsiElement({)('{')\n          SIMPLE_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('panic')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('err')\n                  PsiElement())(')')\n          PsiElement(})('}')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          SHORT_VAR_DECLARATION\n            VAR_DEFINITION\n              PsiElement(identifier)('err')\n            PsiElement(:=)(':=')\n            PARENTHESES_EXPR\n              PsiElement(()('(')\n              COMPOSITE_LIT\n                TYPE_REFERENCE_EXPRESSION\n                  PsiElement(identifier)('demo')\n                LITERAL_VALUE\n                  PsiElement({)('{')\n                  PsiElement(})('}')\n              PsiElement())(')')\n        PsiElement(;)(';')\n        CONDITIONAL_EXPR\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('err')\n          PsiElement(!=)('!=')\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('nil')\n        BLOCK\n          PsiElement({)('{')\n          SIMPLE_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('panic')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('err')\n                  PsiElement())(')')\n          PsiElement(})('}')\n      FOR_STATEMENT\n        PsiElement(for)('for')\n        RANGE_CLAUSE\n          VAR_DEFINITION\n            PsiElement(identifier)('b')\n          PsiElement(,)(',')\n          VAR_DEFINITION\n            PsiElement(identifier)('i')\n          PsiElement(:=)(':=')\n          PsiErrorElement:',', '=' or range expected, got 'M'\n            <empty list>\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('M')\n        BLOCK\n          PsiElement({)('{')\n          PsiElement(})('}')\n      PsiElement(,)(',')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          LITERAL\n            PsiElement(int)('10')\n      PsiElement(;)(';')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CONDITIONAL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('i')\n            PsiElement(<)('<')\n            LITERAL\n              PsiElement(int)('10')\n      PsiElement(;)(';')\n      INC_DEC_STATEMENT\n        REFERENCE_EXPRESSION\n          PsiElement(identifier)('i')\n        PsiElement(++)('++')\n      PsiErrorElement:';', <NL> or '}' expected, got '{'\n        <empty list>\n      STATEMENT\n        BLOCK\n          PsiElement({)('{')\n          PsiComment(GO_LINE_COMMENT)('// error')\n          SIMPLE_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('fmt')\n                  PsiElement(.)('.')\n                  PsiElement(identifier)('Println')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('v')\n                  PsiElement())(')')\n          PsiElement(})('}')\n      FOR_STATEMENT\n        PsiElement(for)('for')\n        FOR_CLAUSE\n          SIMPLE_STATEMENT\n            SHORT_VAR_DECLARATION\n              VAR_DEFINITION\n                PsiElement(identifier)('b')\n              PsiElement(,)(',')\n              VAR_DEFINITION\n                PsiElement(identifier)('i')\n              PsiElement(:=)(':=')\n              PARENTHESES_EXPR\n                PsiElement(()('(')\n                COMPOSITE_LIT\n                  TYPE_REFERENCE_EXPRESSION\n                    PsiElement(identifier)('M')\n                  LITERAL_VALUE\n                    PsiElement({)('{')\n                    PsiElement(})('}')\n                PsiElement())(')')\n              PsiElement(,)(',')\n              LITERAL\n                PsiElement(int)('10')\n          PsiElement(;)(';')\n          CONDITIONAL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('i')\n            PsiElement(<)('<')\n            LITERAL\n              PsiElement(int)('10')\n          PsiElement(;)(';')\n          INC_DEC_STATEMENT\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('i')\n            PsiElement(++)('++')\n        BLOCK\n          PsiElement({)('{')\n          SIMPLE_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('fmt')\n                  PsiElement(.)('.')\n                  PsiElement(identifier)('Println')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('v')\n                  PsiElement())(')')\n          PsiElement(})('}')\n      PsiElement(})('}')\n  TYPE_DECLARATION\n    PsiElement(type)('type')\n    TYPE_SPEC\n      SPEC_TYPE\n        PsiElement(identifier)('name')\n        STRUCT_TYPE\n          PsiElement(struct)('struct')\n          PsiElement({)('{')\n          FIELD_DECLARATION\n            FIELD_DEFINITION\n              PsiElement(identifier)('foo')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('string')\n            TAG\n              STRING_LITERAL\n                PsiElement(raw_string)('`xml:\"\"`')\n          PsiElement(})('}')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('TestFor')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      STATEMENT\n        TYPE_DECLARATION\n          PsiElement(type)('type')\n          TYPE_SPEC\n            SPEC_TYPE\n              PsiElement(identifier)('name1234')\n              INTERFACE_TYPE\n                PsiElement(interface)('interface')\n                PsiElement({)('{')\n                PsiElement(})('}')\n      STATEMENT\n        VAR_DECLARATION\n          PsiElement(var)('var')\n          VAR_SPEC\n            VAR_DEFINITION\n              PsiElement(identifier)('v')\n            ARRAY_OR_SLICE_TYPE\n              PsiElement([)('[')\n              PsiElement(])(']')\n              TYPE\n                TYPE_REFERENCE_EXPRESSION\n                  PsiElement(identifier)('int')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('call')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              FUNCTION_LIT\n                PsiElement(func)('func')\n                SIGNATURE\n                  PARAMETERS\n                    PsiElement(()('(')\n                    PsiElement())(')')\n                BLOCK\n                  PsiElement({)('{')\n                  FOR_STATEMENT\n                    PsiElement(for)('for')\n                    RANGE_CLAUSE\n                      PsiElement(range)('range')\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('v')\n                    BLOCK\n                      PsiElement({)('{')\n                      PsiComment(GO_LINE_COMMENT)('// v is not resolved here')\n                      PsiElement(})('}')\n                  PsiElement(})('}')\n              PsiElement())(')')\n      PsiElement(})('}')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('TestIf')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      STATEMENT\n        VAR_DECLARATION\n          PsiElement(var)('var')\n          VAR_SPEC\n            VAR_DEFINITION\n              PsiElement(identifier)('v')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('string')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('call')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              FUNCTION_LIT\n                PsiElement(func)('func')\n                SIGNATURE\n                  PARAMETERS\n                    PsiElement(()('(')\n                    PsiElement())(')')\n                BLOCK\n                  PsiElement({)('{')\n                  IF_STATEMENT\n                    PsiElement(if)('if')\n                    SIMPLE_STATEMENT\n                      LEFT_HAND_EXPR_LIST\n                        CONDITIONAL_EXPR\n                          REFERENCE_EXPRESSION\n                            PsiElement(identifier)('v')\n                          PsiElement(==)('==')\n                          STRING_LITERAL\n                            PsiElement(string)('\"\"')\n                    BLOCK\n                      PsiElement({)('{')\n                      PsiElement(})('}')\n                  IF_STATEMENT\n                    PsiElement(if)('if')\n                    SIMPLE_STATEMENT\n                      LEFT_HAND_EXPR_LIST\n                        CONDITIONAL_EXPR\n                          STRING_LITERAL\n                            PsiElement(string)('\"\"')\n                          PsiElement(==)('==')\n                          REFERENCE_EXPRESSION\n                            PsiElement(identifier)('v')\n                    BLOCK\n                      PsiElement({)('{')\n                      PsiComment(GO_LINE_COMMENT)('// v is not resolved here')\n                      PsiElement(})('}')\n                  PsiElement(})('}')\n              PsiElement())(')')\n      PsiElement(})('}')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('call')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('f')\n          FUNCTION_TYPE\n            PsiElement(func)('func')\n            SIGNATURE\n              PARAMETERS\n                PsiElement(()('(')\n                PsiElement())(')')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('f')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              PsiElement())(')')\n      PsiElement(})('}')\n  TYPE_DECLARATION\n    PsiElement(type)('type')\n    TYPE_SPEC\n      SPEC_TYPE\n        PsiElement(identifier)('SensorFactory')\n        STRUCT_TYPE\n          PsiElement(struct)('struct')\n          PsiElement({)('{')\n          FIELD_DECLARATION\n            FIELD_DEFINITION\n              PsiElement(identifier)('Sensors')\n            MAP_TYPE\n              PsiElement(map)('map')\n              PsiElement([)('[')\n              TYPE\n                TYPE_REFERENCE_EXPRESSION\n                  PsiElement(identifier)('string')\n              PsiElement(])(']')\n              TYPE\n                TYPE_REFERENCE_EXPRESSION\n                  PsiElement(identifier)('string')\n          PsiElement(})('}')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('InitSensorFactory')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n      RESULT\n        POINTER_TYPE\n          PsiElement(*)('*')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('SensorFactory')\n    BLOCK\n      PsiElement({)('{')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('factory')\n          PsiElement(:=)(':=')\n          BUILTIN_CALL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('new')\n            BUILTIN_ARGUMENT_LIST\n              PsiElement(()('(')\n              TYPE\n                TYPE_REFERENCE_EXPRESSION\n                  PsiElement(identifier)('SensorFactory')\n              PsiElement())(')')\n      ASSIGNMENT_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('factory')\n            PsiElement(.)('.')\n            PsiElement(identifier)('Sensors')\n        ASSIGN_OP\n          PsiElement(=)('=')\n        BUILTIN_CALL_EXPR\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('make')\n          BUILTIN_ARGUMENT_LIST\n            PsiElement(()('(')\n            MAP_TYPE\n              PsiElement(map)('map')\n              PsiElement([)('[')\n              TYPE\n                TYPE_REFERENCE_EXPRESSION\n                  PsiElement(identifier)('string')\n              PsiElement(])(']')\n              TYPE\n                TYPE_REFERENCE_EXPRESSION\n                  PsiElement(identifier)('string')\n            PsiElement())(')')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n        REFERENCE_EXPRESSION\n          PsiElement(identifier)('factory')\n      PsiElement(})('}')"
  },
  {
    "path": "testData/parser/Str2Num.go",
    "content": "package main\nimport \"fmt\"\nimport \"strconv\"\n\nfunc main() {\n    p := fmt.Printf\n    ((fmt.Printf))(\"Hello\\n\", 1)\n    (fmt.Printf)(\"Hello\\n\", 1)\n    p(\"Hello\\n\", 1)\n\n    j := interface{}(1)\n    if (false) {p(\"\", j); return }\n\n    var i int\n    f := ((fmt.Scanf))\n    f(\"%d\", &i)\n    str := strconv.FormatInt(int64(i), 10)\n    hex, _ := strconv.ParseInt(str, 16, 64)\n    fmt.Printf(\"%d\\n\", hex)\n}"
  },
  {
    "path": "testData/parser/Str2Num.txt",
    "content": "GO_FILE\n  PACKAGE_CLAUSE\n    PsiElement(package)('package')\n    PsiElement(identifier)('main')\n  IMPORT_LIST\n    IMPORT_DECLARATION\n      PsiElement(import)('import')\n      IMPORT_SPEC\n        IMPORT_STRING\n          STRING_LITERAL\n            PsiElement(string)('\"fmt\"')\n    IMPORT_DECLARATION\n      PsiElement(import)('import')\n      IMPORT_SPEC\n        IMPORT_STRING\n          STRING_LITERAL\n            PsiElement(string)('\"strconv\"')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('main')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('p')\n          PsiElement(:=)(':=')\n          REFERENCE_EXPRESSION\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('fmt')\n            PsiElement(.)('.')\n            PsiElement(identifier)('Printf')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            PARENTHESES_EXPR\n              PsiElement(()('(')\n              PARENTHESES_EXPR\n                PsiElement(()('(')\n                REFERENCE_EXPRESSION\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('fmt')\n                  PsiElement(.)('.')\n                  PsiElement(identifier)('Printf')\n                PsiElement())(')')\n              PsiElement())(')')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              STRING_LITERAL\n                PsiElement(string)('\"Hello\\n\"')\n              PsiElement(,)(',')\n              LITERAL\n                PsiElement(int)('1')\n              PsiElement())(')')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            PARENTHESES_EXPR\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('fmt')\n                PsiElement(.)('.')\n                PsiElement(identifier)('Printf')\n              PsiElement())(')')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              STRING_LITERAL\n                PsiElement(string)('\"Hello\\n\"')\n              PsiElement(,)(',')\n              LITERAL\n                PsiElement(int)('1')\n              PsiElement())(')')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('p')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              STRING_LITERAL\n                PsiElement(string)('\"Hello\\n\"')\n              PsiElement(,)(',')\n              LITERAL\n                PsiElement(int)('1')\n              PsiElement())(')')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('j')\n          PsiElement(:=)(':=')\n          CONVERSION_EXPR\n            INTERFACE_TYPE\n              PsiElement(interface)('interface')\n              PsiElement({)('{')\n              PsiElement(})('}')\n            PsiElement(()('(')\n            LITERAL\n              PsiElement(int)('1')\n            PsiElement())(')')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            PARENTHESES_EXPR\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('false')\n              PsiElement())(')')\n        BLOCK\n          PsiElement({)('{')\n          SIMPLE_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('p')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  STRING_LITERAL\n                    PsiElement(string)('\"\"')\n                  PsiElement(,)(',')\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('j')\n                  PsiElement())(')')\n          PsiElement(;)(';')\n          RETURN_STATEMENT\n            PsiElement(return)('return')\n          PsiElement(})('}')\n      STATEMENT\n        VAR_DECLARATION\n          PsiElement(var)('var')\n          VAR_SPEC\n            VAR_DEFINITION\n              PsiElement(identifier)('i')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('int')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('f')\n          PsiElement(:=)(':=')\n          PARENTHESES_EXPR\n            PsiElement(()('(')\n            PARENTHESES_EXPR\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('fmt')\n                PsiElement(.)('.')\n                PsiElement(identifier)('Scanf')\n              PsiElement())(')')\n            PsiElement())(')')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('f')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              STRING_LITERAL\n                PsiElement(string)('\"%d\"')\n              PsiElement(,)(',')\n              UNARY_EXPR\n                PsiElement(&)('&')\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('i')\n              PsiElement())(')')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('str')\n          PsiElement(:=)(':=')\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('strconv')\n              PsiElement(.)('.')\n              PsiElement(identifier)('FormatInt')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('int64')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('i')\n                  PsiElement())(')')\n              PsiElement(,)(',')\n              LITERAL\n                PsiElement(int)('10')\n              PsiElement())(')')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('hex')\n          PsiElement(,)(',')\n          VAR_DEFINITION\n            PsiElement(identifier)('_')\n          PsiElement(:=)(':=')\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('strconv')\n              PsiElement(.)('.')\n              PsiElement(identifier)('ParseInt')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('str')\n              PsiElement(,)(',')\n              LITERAL\n                PsiElement(int)('16')\n              PsiElement(,)(',')\n              LITERAL\n                PsiElement(int)('64')\n              PsiElement())(')')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('fmt')\n              PsiElement(.)('.')\n              PsiElement(identifier)('Printf')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              STRING_LITERAL\n                PsiElement(string)('\"%d\\n\"')\n              PsiElement(,)(',')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('hex')\n              PsiElement())(')')\n      PsiElement(})('}')"
  },
  {
    "path": "testData/parser/Torture.go",
    "content": "// compile\n\n// Copyright 2012 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Various tests for expressions with high complexity.\n\npackage main\n\n// Concatenate 16 4-bit integers into a 64-bit number.\nfunc concat(s *[16]byte) uint64 {\n\tr := (((((((((((((((uint64(s[0])<<4|\n\t\tuint64(s[1]))<<4|\n\t\tuint64(s[2]))<<4|\n\t\tuint64(s[3]))<<4|\n\t\tuint64(s[4]))<<4|\n\t\tuint64(s[5]))<<4|\n\t\tuint64(s[6]))<<4|\n\t\tuint64(s[7]))<<4|\n\t\tuint64(s[8]))<<4|\n\t\tuint64(s[9]))<<4|\n\t\tuint64(s[10]))<<4|\n\t\tuint64(s[11]))<<4|\n\t\tuint64(s[12]))<<4|\n\t\tuint64(s[13]))<<4|\n\t\tuint64(s[14]))<<4 |\n\t\tuint64(s[15]))\n\treturn r\n}\n\n// Compute the determinant of a 4x4-matrix by the sum\n// over all index permutations.\nfunc determinant(m [4][4]float64) float64 {\n\treturn m[0][0]*m[1][1]*m[2][2]*m[3][3] -\n\t\tm[0][0]*m[1][1]*m[2][3]*m[3][2] -\n\t\tm[0][0]*m[1][2]*m[2][1]*m[3][3] +\n\t\tm[0][0]*m[1][2]*m[2][3]*m[3][1] +\n\t\tm[0][0]*m[1][3]*m[2][1]*m[3][2] -\n\t\tm[0][0]*m[1][3]*m[2][2]*m[3][1] -\n\t\tm[0][1]*m[1][0]*m[2][2]*m[3][3] +\n\t\tm[0][1]*m[1][0]*m[2][3]*m[3][2] +\n\t\tm[0][1]*m[1][2]*m[2][0]*m[3][3] -\n\t\tm[0][1]*m[1][2]*m[2][3]*m[3][0] -\n\t\tm[0][1]*m[1][3]*m[2][0]*m[3][2] +\n\t\tm[0][1]*m[1][3]*m[2][2]*m[3][0] +\n\t\tm[0][2]*m[1][0]*m[2][1]*m[3][3] -\n\t\tm[0][2]*m[1][0]*m[2][3]*m[3][1] -\n\t\tm[0][2]*m[1][1]*m[2][0]*m[3][3] +\n\t\tm[0][2]*m[1][1]*m[2][3]*m[3][0] +\n\t\tm[0][2]*m[1][3]*m[2][0]*m[3][1] -\n\t\tm[0][2]*m[1][3]*m[2][1]*m[3][0] -\n\t\tm[0][3]*m[1][0]*m[2][1]*m[3][2] +\n\t\tm[0][3]*m[1][0]*m[2][2]*m[3][1] +\n\t\tm[0][3]*m[1][1]*m[2][0]*m[3][2] -\n\t\tm[0][3]*m[1][1]*m[2][2]*m[3][0] -\n\t\tm[0][3]*m[1][2]*m[2][0]*m[3][1] +\n\t\tm[0][3]*m[1][2]*m[2][1]*m[3][0]\n}\n\n// Compute the determinant of a 4x4-matrix by the sum\n// over all index permutations.\nfunc determinantInt(m [4][4]int) int {\n\treturn m[0][0]*m[1][1]*m[2][2]*m[3][3] -\n\t\tm[0][0]*m[1][1]*m[2][3]*m[3][2] -\n\t\tm[0][0]*m[1][2]*m[2][1]*m[3][3] +\n\t\tm[0][0]*m[1][2]*m[2][3]*m[3][1] +\n\t\tm[0][0]*m[1][3]*m[2][1]*m[3][2] -\n\t\tm[0][0]*m[1][3]*m[2][2]*m[3][1] -\n\t\tm[0][1]*m[1][0]*m[2][2]*m[3][3] +\n\t\tm[0][1]*m[1][0]*m[2][3]*m[3][2] +\n\t\tm[0][1]*m[1][2]*m[2][0]*m[3][3] -\n\t\tm[0][1]*m[1][2]*m[2][3]*m[3][0] -\n\t\tm[0][1]*m[1][3]*m[2][0]*m[3][2] +\n\t\tm[0][1]*m[1][3]*m[2][2]*m[3][0] +\n\t\tm[0][2]*m[1][0]*m[2][1]*m[3][3] -\n\t\tm[0][2]*m[1][0]*m[2][3]*m[3][1] -\n\t\tm[0][2]*m[1][1]*m[2][0]*m[3][3] +\n\t\tm[0][2]*m[1][1]*m[2][3]*m[3][0] +\n\t\tm[0][2]*m[1][3]*m[2][0]*m[3][1] -\n\t\tm[0][2]*m[1][3]*m[2][1]*m[3][0] -\n\t\tm[0][3]*m[1][0]*m[2][1]*m[3][2] +\n\t\tm[0][3]*m[1][0]*m[2][2]*m[3][1] +\n\t\tm[0][3]*m[1][1]*m[2][0]*m[3][2] -\n\t\tm[0][3]*m[1][1]*m[2][2]*m[3][0] -\n\t\tm[0][3]*m[1][2]*m[2][0]*m[3][1] +\n\t\tm[0][3]*m[1][2]*m[2][1]*m[3][0]\n}\n\n// Compute the determinant of a 4x4-matrix by the sum\n// over all index permutations.\nfunc determinantByte(m [4][4]byte) byte {\n\treturn m[0][0]*m[1][1]*m[2][2]*m[3][3] -\n\t\tm[0][0]*m[1][1]*m[2][3]*m[3][2] -\n\t\tm[0][0]*m[1][2]*m[2][1]*m[3][3] +\n\t\tm[0][0]*m[1][2]*m[2][3]*m[3][1] +\n\t\tm[0][0]*m[1][3]*m[2][1]*m[3][2] -\n\t\tm[0][0]*m[1][3]*m[2][2]*m[3][1] -\n\t\tm[0][1]*m[1][0]*m[2][2]*m[3][3] +\n\t\tm[0][1]*m[1][0]*m[2][3]*m[3][2] +\n\t\tm[0][1]*m[1][2]*m[2][0]*m[3][3] -\n\t\tm[0][1]*m[1][2]*m[2][3]*m[3][0] -\n\t\tm[0][1]*m[1][3]*m[2][0]*m[3][2] +\n\t\tm[0][1]*m[1][3]*m[2][2]*m[3][0] +\n\t\tm[0][2]*m[1][0]*m[2][1]*m[3][3] -\n\t\tm[0][2]*m[1][0]*m[2][3]*m[3][1] -\n\t\tm[0][2]*m[1][1]*m[2][0]*m[3][3] +\n\t\tm[0][2]*m[1][1]*m[2][3]*m[3][0] +\n\t\tm[0][2]*m[1][3]*m[2][0]*m[3][1] -\n\t\tm[0][2]*m[1][3]*m[2][1]*m[3][0] -\n\t\tm[0][3]*m[1][0]*m[2][1]*m[3][2] +\n\t\tm[0][3]*m[1][0]*m[2][2]*m[3][1] +\n\t\tm[0][3]*m[1][1]*m[2][0]*m[3][2] -\n\t\tm[0][3]*m[1][1]*m[2][2]*m[3][0] -\n\t\tm[0][3]*m[1][2]*m[2][0]*m[3][1] +\n\t\tm[0][3]*m[1][2]*m[2][1]*m[3][0]\n}\n\ntype A []A\n\n// A sequence of constant indexings.\nfunc IndexChain1(s A) A {\n\treturn s[0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0]\n}\n\n// A sequence of non-constant indexings.\nfunc IndexChain2(s A, i int) A {\n\treturn s[i][i][i][i][i][i][i][i][i][i][i][i][i][i][i][i]\n}\n\n// Another sequence of indexings.\nfunc IndexChain3(s []int) int {\n\treturn s[s[s[s[s[s[s[s[s[s[s[s[s[s[s[s[s[s[s[s[s[0]]]]]]]]]]]]]]]]]]]]]\n}\n\n// A right-leaning tree of byte multiplications.\nfunc righttree(a, b, c, d uint8) uint8 {\n\treturn a * (b * (c * (d *\n\t\t(a * (b * (c * (d *\n\t\t\t(a * (b * (c * (d *\n\t\t\t\t(a * (b * (c * (d *\n\t\t\t\t\t(a * (b * (c * (d *\n\t\t\t\t\t\ta * (b * (c * d)))))))))))))))))))))\n\n}\n\n// A left-leaning tree of byte multiplications.\nfunc lefttree(a, b, c, d uint8) uint8 {\n\treturn ((((((((((((((((((a * b) * c) * d *\n\t\ta) * b) * c) * d *\n\t\ta) * b) * c) * d *\n\t\ta) * b) * c) * d *\n\t\ta) * b) * c) * d *\n\t\ta) * b) * c) * d)\n}\n\ntype T struct {\n\tNext I\n}\n\ntype I interface{}\n\n// A chains of type assertions.\nfunc ChainT(t *T) *T {\n\treturn t.\n\t\tNext.(*T).\n\t\tNext.(*T).\n\t\tNext.(*T).\n\t\tNext.(*T).\n\t\tNext.(*T).\n\t\tNext.(*T).\n\t\tNext.(*T).\n\t\tNext.(*T).\n\t\tNext.(*T).\n\t\tNext.(*T).\n\t\tNext.(*T).\n\t\tNext.(*T).\n\t\tNext.(*T).\n\t\tNext.(*T).\n\t\tNext.(*T).\n\t\tNext.(*T).\n\t\tNext.(*T).\n\t\tNext.(*T).\n\t\tNext.(*T).\n\t\tNext.(*T)\n}\n\ntype U struct {\n\tChildren []J\n}\n\nfunc (u *U) Child(n int) J { return u.Children[n] }\n\ntype J interface {\n\tChild(n int) J\n}\n\nfunc ChainUAssert(u *U) *U {\n\treturn u.Child(0).(*U).\n\t\tChild(0).(*U).\n\t\tChild(0).(*U).\n\t\tChild(0).(*U).\n\t\tChild(0).(*U).\n\t\tChild(0).(*U).\n\t\tChild(0).(*U).\n\t\tChild(0).(*U).\n\t\tChild(0).(*U).\n\t\tChild(0).(*U).\n\t\tChild(0).(*U).\n\t\tChild(0).(*U).\n\t\tChild(0).(*U).\n\t\tChild(0).(*U).\n\t\tChild(0).(*U).\n\t\tChild(0).(*U).\n\t\tChild(0).(*U).\n\t\tChild(0).(*U).\n\t\tChild(0).(*U).\n\t\tChild(0).(*U).\n\t\tChild(0).(*U).\n\t\tChild(0).(*U)\n}\n\nfunc ChainUNoAssert(u *U) *U {\n\treturn u.Child(0).\n\t\tChild(0).\n\t\tChild(0).\n\t\tChild(0).\n\t\tChild(0).\n\t\tChild(0).\n\t\tChild(0).\n\t\tChild(0).\n\t\tChild(0).\n\t\tChild(0).\n\t\tChild(0).\n\t\tChild(0).\n\t\tChild(0).\n\t\tChild(0).\n\t\tChild(0).\n\t\tChild(0).\n\t\tChild(0).\n\t\tChild(0).\n\t\tChild(0).\n\t\tChild(0).\n\t\tChild(0).\n\t\tChild(0).(*U)\n}\n\n// Type assertions and slice indexing. See issue 4207.\nfunc ChainAssertIndex(u *U) J {\n\treturn u.\n\t\tChildren[0].(*U).\n\t\tChildren[0].(*U).\n\t\tChildren[0].(*U).\n\t\tChildren[0].(*U).\n\t\tChildren[0].(*U).\n\t\tChildren[0].(*U).\n\t\tChildren[0].(*U).\n\t\tChildren[0].(*U).\n\t\tChildren[0].(*U).\n\t\tChildren[0].(*U).\n\t\tChildren[0].(*U).\n\t\tChildren[0].(*U).\n\t\tChildren[0].(*U).\n\t\tChildren[0]\n}\n\ntype UArr struct {\n\tChildren [2]J\n}\n\nfunc (u *UArr) Child(n int) J { return u.Children[n] }\n\nfunc ChainAssertArrayIndex(u *UArr) J {\n\treturn u.\n\t\tChildren[0].(*UArr).\n\t\tChildren[0].(*UArr).\n\t\tChildren[0].(*UArr).\n\t\tChildren[0].(*UArr).\n\t\tChildren[0].(*UArr).\n\t\tChildren[0].(*UArr).\n\t\tChildren[0].(*UArr).\n\t\tChildren[0].(*UArr).\n\t\tChildren[0].(*UArr).\n\t\tChildren[0].(*UArr).\n\t\tChildren[0].(*UArr).\n\t\tChildren[0].(*UArr).\n\t\tChildren[0].(*UArr).\n\t\tChildren[0]\n}\n\ntype UArrPtr struct {\n\tChildren *[2]J\n}\n\nfunc (u *UArrPtr) Child(n int) J { return u.Children[n] }\n\nfunc ChainAssertArrayptrIndex(u *UArrPtr) J {\n\treturn u.\n\t\tChildren[0].(*UArrPtr).\n\t\tChildren[0].(*UArrPtr).\n\t\tChildren[0].(*UArrPtr).\n\t\tChildren[0].(*UArrPtr).\n\t\tChildren[0].(*UArrPtr).\n\t\tChildren[0].(*UArrPtr).\n\t\tChildren[0].(*UArrPtr).\n\t\tChildren[0].(*UArrPtr).\n\t\tChildren[0].(*UArrPtr).\n\t\tChildren[0].(*UArrPtr).\n\t\tChildren[0].(*UArrPtr).\n\t\tChildren[0].(*UArrPtr).\n\t\tChildren[0].(*UArrPtr).\n\t\tChildren[0]\n}\n\n// Chains of divisions. See issue 4201.\n\nfunc ChainDiv(a, b int) int {\n\treturn a / b / a / b / a / b / a / b /\n\t\ta / b / a / b / a / b / a / b /\n\t\ta / b / a / b / a / b / a / b\n}\n\nfunc ChainDivRight(a, b int) int {\n\treturn a / (b / (a / (b /\n\t\t(a / (b / (a / (b /\n\t\t\t(a / (b / (a / (b /\n\t\t\t\t(a / (b / (a / (b /\n\t\t\t\t\t(a / (b / (a / b))))))))))))))))))\n}\n\nfunc ChainDivConst(a int) int {\n\treturn a / 17 / 17 / 17 /\n\t\t17 / 17 / 17 / 17 /\n\t\t17 / 17 / 17 / 17\n}\n\nfunc ChainMulBytes(a, b, c byte) byte {\n\treturn a*(a*(a*(a*(a*(a*(a*(a*(a*b+c)+c)+c)+c)+c)+c)+c)+c) + c\n}\n\nfunc ChainCap() {\n\tselect {\n\tcase <-make(chan int, cap(make(chan int, cap(make(chan int, cap(make(chan int, cap(make(chan int))))))))):\n\tdefault:\n\t}\n}"
  },
  {
    "path": "testData/parser/Torture.txt",
    "content": "GO_FILE\n  PsiComment(GO_LINE_COMMENT)('// compile')\n  PsiComment(GO_LINE_COMMENT)('// Copyright 2012 The Go Authors. All rights reserved.')\n  PsiComment(GO_LINE_COMMENT)('// Use of this source code is governed by a BSD-style')\n  PsiComment(GO_LINE_COMMENT)('// license that can be found in the LICENSE file.')\n  PsiComment(GO_LINE_COMMENT)('// Various tests for expressions with high complexity.')\n  PACKAGE_CLAUSE\n    PsiElement(package)('package')\n    PsiElement(identifier)('main')\n  IMPORT_LIST\n    <empty list>\n  PsiComment(GO_LINE_COMMENT)('// Concatenate 16 4-bit integers into a 64-bit number.')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('concat')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('s')\n          POINTER_TYPE\n            PsiElement(*)('*')\n            ARRAY_OR_SLICE_TYPE\n              PsiElement([)('[')\n              LITERAL\n                PsiElement(int)('16')\n              PsiElement(])(']')\n              TYPE\n                TYPE_REFERENCE_EXPRESSION\n                  PsiElement(identifier)('byte')\n        PsiElement())(')')\n      RESULT\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('uint64')\n    BLOCK\n      PsiElement({)('{')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('r')\n          PsiElement(:=)(':=')\n          PARENTHESES_EXPR\n            PsiElement(()('(')\n            ADD_EXPR\n              MUL_EXPR\n                PARENTHESES_EXPR\n                  PsiElement(()('(')\n                  ADD_EXPR\n                    MUL_EXPR\n                      PARENTHESES_EXPR\n                        PsiElement(()('(')\n                        ADD_EXPR\n                          MUL_EXPR\n                            PARENTHESES_EXPR\n                              PsiElement(()('(')\n                              ADD_EXPR\n                                MUL_EXPR\n                                  PARENTHESES_EXPR\n                                    PsiElement(()('(')\n                                    ADD_EXPR\n                                      MUL_EXPR\n                                        PARENTHESES_EXPR\n                                          PsiElement(()('(')\n                                          ADD_EXPR\n                                            MUL_EXPR\n                                              PARENTHESES_EXPR\n                                                PsiElement(()('(')\n                                                ADD_EXPR\n                                                  MUL_EXPR\n                                                    PARENTHESES_EXPR\n                                                      PsiElement(()('(')\n                                                      ADD_EXPR\n                                                        MUL_EXPR\n                                                          PARENTHESES_EXPR\n                                                            PsiElement(()('(')\n                                                            ADD_EXPR\n                                                              MUL_EXPR\n                                                                PARENTHESES_EXPR\n                                                                  PsiElement(()('(')\n                                                                  ADD_EXPR\n                                                                    MUL_EXPR\n                                                                      PARENTHESES_EXPR\n                                                                        PsiElement(()('(')\n                                                                        ADD_EXPR\n                                                                          MUL_EXPR\n                                                                            PARENTHESES_EXPR\n                                                                              PsiElement(()('(')\n                                                                              ADD_EXPR\n                                                                                MUL_EXPR\n                                                                                  PARENTHESES_EXPR\n                                                                                    PsiElement(()('(')\n                                                                                    ADD_EXPR\n                                                                                      MUL_EXPR\n                                                                                        PARENTHESES_EXPR\n                                                                                          PsiElement(()('(')\n                                                                                          ADD_EXPR\n                                                                                            MUL_EXPR\n                                                                                              PARENTHESES_EXPR\n                                                                                                PsiElement(()('(')\n                                                                                                ADD_EXPR\n                                                                                                  MUL_EXPR\n                                                                                                    CALL_EXPR\n                                                                                                      REFERENCE_EXPRESSION\n                                                                                                        PsiElement(identifier)('uint64')\n                                                                                                      ARGUMENT_LIST\n                                                                                                        PsiElement(()('(')\n                                                                                                        INDEX_OR_SLICE_EXPR\n                                                                                                          REFERENCE_EXPRESSION\n                                                                                                            PsiElement(identifier)('s')\n                                                                                                          PsiElement([)('[')\n                                                                                                          LITERAL\n                                                                                                            PsiElement(int)('0')\n                                                                                                          PsiElement(])(']')\n                                                                                                        PsiElement())(')')\n                                                                                                    PsiElement(<<)('<<')\n                                                                                                    LITERAL\n                                                                                                      PsiElement(int)('4')\n                                                                                                  PsiElement(|)('|')\n                                                                                                  CALL_EXPR\n                                                                                                    REFERENCE_EXPRESSION\n                                                                                                      PsiElement(identifier)('uint64')\n                                                                                                    ARGUMENT_LIST\n                                                                                                      PsiElement(()('(')\n                                                                                                      INDEX_OR_SLICE_EXPR\n                                                                                                        REFERENCE_EXPRESSION\n                                                                                                          PsiElement(identifier)('s')\n                                                                                                        PsiElement([)('[')\n                                                                                                        LITERAL\n                                                                                                          PsiElement(int)('1')\n                                                                                                        PsiElement(])(']')\n                                                                                                      PsiElement())(')')\n                                                                                                PsiElement())(')')\n                                                                                              PsiElement(<<)('<<')\n                                                                                              LITERAL\n                                                                                                PsiElement(int)('4')\n                                                                                            PsiElement(|)('|')\n                                                                                            CALL_EXPR\n                                                                                              REFERENCE_EXPRESSION\n                                                                                                PsiElement(identifier)('uint64')\n                                                                                              ARGUMENT_LIST\n                                                                                                PsiElement(()('(')\n                                                                                                INDEX_OR_SLICE_EXPR\n                                                                                                  REFERENCE_EXPRESSION\n                                                                                                    PsiElement(identifier)('s')\n                                                                                                  PsiElement([)('[')\n                                                                                                  LITERAL\n                                                                                                    PsiElement(int)('2')\n                                                                                                  PsiElement(])(']')\n                                                                                                PsiElement())(')')\n                                                                                          PsiElement())(')')\n                                                                                        PsiElement(<<)('<<')\n                                                                                        LITERAL\n                                                                                          PsiElement(int)('4')\n                                                                                      PsiElement(|)('|')\n                                                                                      CALL_EXPR\n                                                                                        REFERENCE_EXPRESSION\n                                                                                          PsiElement(identifier)('uint64')\n                                                                                        ARGUMENT_LIST\n                                                                                          PsiElement(()('(')\n                                                                                          INDEX_OR_SLICE_EXPR\n                                                                                            REFERENCE_EXPRESSION\n                                                                                              PsiElement(identifier)('s')\n                                                                                            PsiElement([)('[')\n                                                                                            LITERAL\n                                                                                              PsiElement(int)('3')\n                                                                                            PsiElement(])(']')\n                                                                                          PsiElement())(')')\n                                                                                    PsiElement())(')')\n                                                                                  PsiElement(<<)('<<')\n                                                                                  LITERAL\n                                                                                    PsiElement(int)('4')\n                                                                                PsiElement(|)('|')\n                                                                                CALL_EXPR\n                                                                                  REFERENCE_EXPRESSION\n                                                                                    PsiElement(identifier)('uint64')\n                                                                                  ARGUMENT_LIST\n                                                                                    PsiElement(()('(')\n                                                                                    INDEX_OR_SLICE_EXPR\n                                                                                      REFERENCE_EXPRESSION\n                                                                                        PsiElement(identifier)('s')\n                                                                                      PsiElement([)('[')\n                                                                                      LITERAL\n                                                                                        PsiElement(int)('4')\n                                                                                      PsiElement(])(']')\n                                                                                    PsiElement())(')')\n                                                                              PsiElement())(')')\n                                                                            PsiElement(<<)('<<')\n                                                                            LITERAL\n                                                                              PsiElement(int)('4')\n                                                                          PsiElement(|)('|')\n                                                                          CALL_EXPR\n                                                                            REFERENCE_EXPRESSION\n                                                                              PsiElement(identifier)('uint64')\n                                                                            ARGUMENT_LIST\n                                                                              PsiElement(()('(')\n                                                                              INDEX_OR_SLICE_EXPR\n                                                                                REFERENCE_EXPRESSION\n                                                                                  PsiElement(identifier)('s')\n                                                                                PsiElement([)('[')\n                                                                                LITERAL\n                                                                                  PsiElement(int)('5')\n                                                                                PsiElement(])(']')\n                                                                              PsiElement())(')')\n                                                                        PsiElement())(')')\n                                                                      PsiElement(<<)('<<')\n                                                                      LITERAL\n                                                                        PsiElement(int)('4')\n                                                                    PsiElement(|)('|')\n                                                                    CALL_EXPR\n                                                                      REFERENCE_EXPRESSION\n                                                                        PsiElement(identifier)('uint64')\n                                                                      ARGUMENT_LIST\n                                                                        PsiElement(()('(')\n                                                                        INDEX_OR_SLICE_EXPR\n                                                                          REFERENCE_EXPRESSION\n                                                                            PsiElement(identifier)('s')\n                                                                          PsiElement([)('[')\n                                                                          LITERAL\n                                                                            PsiElement(int)('6')\n                                                                          PsiElement(])(']')\n                                                                        PsiElement())(')')\n                                                                  PsiElement())(')')\n                                                                PsiElement(<<)('<<')\n                                                                LITERAL\n                                                                  PsiElement(int)('4')\n                                                              PsiElement(|)('|')\n                                                              CALL_EXPR\n                                                                REFERENCE_EXPRESSION\n                                                                  PsiElement(identifier)('uint64')\n                                                                ARGUMENT_LIST\n                                                                  PsiElement(()('(')\n                                                                  INDEX_OR_SLICE_EXPR\n                                                                    REFERENCE_EXPRESSION\n                                                                      PsiElement(identifier)('s')\n                                                                    PsiElement([)('[')\n                                                                    LITERAL\n                                                                      PsiElement(int)('7')\n                                                                    PsiElement(])(']')\n                                                                  PsiElement())(')')\n                                                            PsiElement())(')')\n                                                          PsiElement(<<)('<<')\n                                                          LITERAL\n                                                            PsiElement(int)('4')\n                                                        PsiElement(|)('|')\n                                                        CALL_EXPR\n                                                          REFERENCE_EXPRESSION\n                                                            PsiElement(identifier)('uint64')\n                                                          ARGUMENT_LIST\n                                                            PsiElement(()('(')\n                                                            INDEX_OR_SLICE_EXPR\n                                                              REFERENCE_EXPRESSION\n                                                                PsiElement(identifier)('s')\n                                                              PsiElement([)('[')\n                                                              LITERAL\n                                                                PsiElement(int)('8')\n                                                              PsiElement(])(']')\n                                                            PsiElement())(')')\n                                                      PsiElement())(')')\n                                                    PsiElement(<<)('<<')\n                                                    LITERAL\n                                                      PsiElement(int)('4')\n                                                  PsiElement(|)('|')\n                                                  CALL_EXPR\n                                                    REFERENCE_EXPRESSION\n                                                      PsiElement(identifier)('uint64')\n                                                    ARGUMENT_LIST\n                                                      PsiElement(()('(')\n                                                      INDEX_OR_SLICE_EXPR\n                                                        REFERENCE_EXPRESSION\n                                                          PsiElement(identifier)('s')\n                                                        PsiElement([)('[')\n                                                        LITERAL\n                                                          PsiElement(int)('9')\n                                                        PsiElement(])(']')\n                                                      PsiElement())(')')\n                                                PsiElement())(')')\n                                              PsiElement(<<)('<<')\n                                              LITERAL\n                                                PsiElement(int)('4')\n                                            PsiElement(|)('|')\n                                            CALL_EXPR\n                                              REFERENCE_EXPRESSION\n                                                PsiElement(identifier)('uint64')\n                                              ARGUMENT_LIST\n                                                PsiElement(()('(')\n                                                INDEX_OR_SLICE_EXPR\n                                                  REFERENCE_EXPRESSION\n                                                    PsiElement(identifier)('s')\n                                                  PsiElement([)('[')\n                                                  LITERAL\n                                                    PsiElement(int)('10')\n                                                  PsiElement(])(']')\n                                                PsiElement())(')')\n                                          PsiElement())(')')\n                                        PsiElement(<<)('<<')\n                                        LITERAL\n                                          PsiElement(int)('4')\n                                      PsiElement(|)('|')\n                                      CALL_EXPR\n                                        REFERENCE_EXPRESSION\n                                          PsiElement(identifier)('uint64')\n                                        ARGUMENT_LIST\n                                          PsiElement(()('(')\n                                          INDEX_OR_SLICE_EXPR\n                                            REFERENCE_EXPRESSION\n                                              PsiElement(identifier)('s')\n                                            PsiElement([)('[')\n                                            LITERAL\n                                              PsiElement(int)('11')\n                                            PsiElement(])(']')\n                                          PsiElement())(')')\n                                    PsiElement())(')')\n                                  PsiElement(<<)('<<')\n                                  LITERAL\n                                    PsiElement(int)('4')\n                                PsiElement(|)('|')\n                                CALL_EXPR\n                                  REFERENCE_EXPRESSION\n                                    PsiElement(identifier)('uint64')\n                                  ARGUMENT_LIST\n                                    PsiElement(()('(')\n                                    INDEX_OR_SLICE_EXPR\n                                      REFERENCE_EXPRESSION\n                                        PsiElement(identifier)('s')\n                                      PsiElement([)('[')\n                                      LITERAL\n                                        PsiElement(int)('12')\n                                      PsiElement(])(']')\n                                    PsiElement())(')')\n                              PsiElement())(')')\n                            PsiElement(<<)('<<')\n                            LITERAL\n                              PsiElement(int)('4')\n                          PsiElement(|)('|')\n                          CALL_EXPR\n                            REFERENCE_EXPRESSION\n                              PsiElement(identifier)('uint64')\n                            ARGUMENT_LIST\n                              PsiElement(()('(')\n                              INDEX_OR_SLICE_EXPR\n                                REFERENCE_EXPRESSION\n                                  PsiElement(identifier)('s')\n                                PsiElement([)('[')\n                                LITERAL\n                                  PsiElement(int)('13')\n                                PsiElement(])(']')\n                              PsiElement())(')')\n                        PsiElement())(')')\n                      PsiElement(<<)('<<')\n                      LITERAL\n                        PsiElement(int)('4')\n                    PsiElement(|)('|')\n                    CALL_EXPR\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('uint64')\n                      ARGUMENT_LIST\n                        PsiElement(()('(')\n                        INDEX_OR_SLICE_EXPR\n                          REFERENCE_EXPRESSION\n                            PsiElement(identifier)('s')\n                          PsiElement([)('[')\n                          LITERAL\n                            PsiElement(int)('14')\n                          PsiElement(])(']')\n                        PsiElement())(')')\n                  PsiElement())(')')\n                PsiElement(<<)('<<')\n                LITERAL\n                  PsiElement(int)('4')\n              PsiElement(|)('|')\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('uint64')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  INDEX_OR_SLICE_EXPR\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('s')\n                    PsiElement([)('[')\n                    LITERAL\n                      PsiElement(int)('15')\n                    PsiElement(])(']')\n                  PsiElement())(')')\n            PsiElement())(')')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n        REFERENCE_EXPRESSION\n          PsiElement(identifier)('r')\n      PsiElement(})('}')\n  PsiComment(GO_LINE_COMMENT)('// Compute the determinant of a 4x4-matrix by the sum')\n  PsiComment(GO_LINE_COMMENT)('// over all index permutations.')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('determinant')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('m')\n          ARRAY_OR_SLICE_TYPE\n            PsiElement([)('[')\n            LITERAL\n              PsiElement(int)('4')\n            PsiElement(])(']')\n            ARRAY_OR_SLICE_TYPE\n              PsiElement([)('[')\n              LITERAL\n                PsiElement(int)('4')\n              PsiElement(])(']')\n              TYPE\n                TYPE_REFERENCE_EXPRESSION\n                  PsiElement(identifier)('float64')\n        PsiElement())(')')\n      RESULT\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('float64')\n    BLOCK\n      PsiElement({)('{')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n        ADD_EXPR\n          ADD_EXPR\n            ADD_EXPR\n              ADD_EXPR\n                ADD_EXPR\n                  ADD_EXPR\n                    ADD_EXPR\n                      ADD_EXPR\n                        ADD_EXPR\n                          ADD_EXPR\n                            ADD_EXPR\n                              ADD_EXPR\n                                ADD_EXPR\n                                  ADD_EXPR\n                                    ADD_EXPR\n                                      ADD_EXPR\n                                        ADD_EXPR\n                                          ADD_EXPR\n                                            ADD_EXPR\n                                              ADD_EXPR\n                                                ADD_EXPR\n                                                  ADD_EXPR\n                                                    ADD_EXPR\n                                                      MUL_EXPR\n                                                        MUL_EXPR\n                                                          MUL_EXPR\n                                                            INDEX_OR_SLICE_EXPR\n                                                              INDEX_OR_SLICE_EXPR\n                                                                REFERENCE_EXPRESSION\n                                                                  PsiElement(identifier)('m')\n                                                                PsiElement([)('[')\n                                                                LITERAL\n                                                                  PsiElement(int)('0')\n                                                                PsiElement(])(']')\n                                                              PsiElement([)('[')\n                                                              LITERAL\n                                                                PsiElement(int)('0')\n                                                              PsiElement(])(']')\n                                                            PsiElement(*)('*')\n                                                            INDEX_OR_SLICE_EXPR\n                                                              INDEX_OR_SLICE_EXPR\n                                                                REFERENCE_EXPRESSION\n                                                                  PsiElement(identifier)('m')\n                                                                PsiElement([)('[')\n                                                                LITERAL\n                                                                  PsiElement(int)('1')\n                                                                PsiElement(])(']')\n                                                              PsiElement([)('[')\n                                                              LITERAL\n                                                                PsiElement(int)('1')\n                                                              PsiElement(])(']')\n                                                          PsiElement(*)('*')\n                                                          INDEX_OR_SLICE_EXPR\n                                                            INDEX_OR_SLICE_EXPR\n                                                              REFERENCE_EXPRESSION\n                                                                PsiElement(identifier)('m')\n                                                              PsiElement([)('[')\n                                                              LITERAL\n                                                                PsiElement(int)('2')\n                                                              PsiElement(])(']')\n                                                            PsiElement([)('[')\n                                                            LITERAL\n                                                              PsiElement(int)('2')\n                                                            PsiElement(])(']')\n                                                        PsiElement(*)('*')\n                                                        INDEX_OR_SLICE_EXPR\n                                                          INDEX_OR_SLICE_EXPR\n                                                            REFERENCE_EXPRESSION\n                                                              PsiElement(identifier)('m')\n                                                            PsiElement([)('[')\n                                                            LITERAL\n                                                              PsiElement(int)('3')\n                                                            PsiElement(])(']')\n                                                          PsiElement([)('[')\n                                                          LITERAL\n                                                            PsiElement(int)('3')\n                                                          PsiElement(])(']')\n                                                      PsiElement(-)('-')\n                                                      MUL_EXPR\n                                                        MUL_EXPR\n                                                          MUL_EXPR\n                                                            INDEX_OR_SLICE_EXPR\n                                                              INDEX_OR_SLICE_EXPR\n                                                                REFERENCE_EXPRESSION\n                                                                  PsiElement(identifier)('m')\n                                                                PsiElement([)('[')\n                                                                LITERAL\n                                                                  PsiElement(int)('0')\n                                                                PsiElement(])(']')\n                                                              PsiElement([)('[')\n                                                              LITERAL\n                                                                PsiElement(int)('0')\n                                                              PsiElement(])(']')\n                                                            PsiElement(*)('*')\n                                                            INDEX_OR_SLICE_EXPR\n                                                              INDEX_OR_SLICE_EXPR\n                                                                REFERENCE_EXPRESSION\n                                                                  PsiElement(identifier)('m')\n                                                                PsiElement([)('[')\n                                                                LITERAL\n                                                                  PsiElement(int)('1')\n                                                                PsiElement(])(']')\n                                                              PsiElement([)('[')\n                                                              LITERAL\n                                                                PsiElement(int)('1')\n                                                              PsiElement(])(']')\n                                                          PsiElement(*)('*')\n                                                          INDEX_OR_SLICE_EXPR\n                                                            INDEX_OR_SLICE_EXPR\n                                                              REFERENCE_EXPRESSION\n                                                                PsiElement(identifier)('m')\n                                                              PsiElement([)('[')\n                                                              LITERAL\n                                                                PsiElement(int)('2')\n                                                              PsiElement(])(']')\n                                                            PsiElement([)('[')\n                                                            LITERAL\n                                                              PsiElement(int)('3')\n                                                            PsiElement(])(']')\n                                                        PsiElement(*)('*')\n                                                        INDEX_OR_SLICE_EXPR\n                                                          INDEX_OR_SLICE_EXPR\n                                                            REFERENCE_EXPRESSION\n                                                              PsiElement(identifier)('m')\n                                                            PsiElement([)('[')\n                                                            LITERAL\n                                                              PsiElement(int)('3')\n                                                            PsiElement(])(']')\n                                                          PsiElement([)('[')\n                                                          LITERAL\n                                                            PsiElement(int)('2')\n                                                          PsiElement(])(']')\n                                                    PsiElement(-)('-')\n                                                    MUL_EXPR\n                                                      MUL_EXPR\n                                                        MUL_EXPR\n                                                          INDEX_OR_SLICE_EXPR\n                                                            INDEX_OR_SLICE_EXPR\n                                                              REFERENCE_EXPRESSION\n                                                                PsiElement(identifier)('m')\n                                                              PsiElement([)('[')\n                                                              LITERAL\n                                                                PsiElement(int)('0')\n                                                              PsiElement(])(']')\n                                                            PsiElement([)('[')\n                                                            LITERAL\n                                                              PsiElement(int)('0')\n                                                            PsiElement(])(']')\n                                                          PsiElement(*)('*')\n                                                          INDEX_OR_SLICE_EXPR\n                                                            INDEX_OR_SLICE_EXPR\n                                                              REFERENCE_EXPRESSION\n                                                                PsiElement(identifier)('m')\n                                                              PsiElement([)('[')\n                                                              LITERAL\n                                                                PsiElement(int)('1')\n                                                              PsiElement(])(']')\n                                                            PsiElement([)('[')\n                                                            LITERAL\n                                                              PsiElement(int)('2')\n                                                            PsiElement(])(']')\n                                                        PsiElement(*)('*')\n                                                        INDEX_OR_SLICE_EXPR\n                                                          INDEX_OR_SLICE_EXPR\n                                                            REFERENCE_EXPRESSION\n                                                              PsiElement(identifier)('m')\n                                                            PsiElement([)('[')\n                                                            LITERAL\n                                                              PsiElement(int)('2')\n                                                            PsiElement(])(']')\n                                                          PsiElement([)('[')\n                                                          LITERAL\n                                                            PsiElement(int)('1')\n                                                          PsiElement(])(']')\n                                                      PsiElement(*)('*')\n                                                      INDEX_OR_SLICE_EXPR\n                                                        INDEX_OR_SLICE_EXPR\n                                                          REFERENCE_EXPRESSION\n                                                            PsiElement(identifier)('m')\n                                                          PsiElement([)('[')\n                                                          LITERAL\n                                                            PsiElement(int)('3')\n                                                          PsiElement(])(']')\n                                                        PsiElement([)('[')\n                                                        LITERAL\n                                                          PsiElement(int)('3')\n                                                        PsiElement(])(']')\n                                                  PsiElement(+)('+')\n                                                  MUL_EXPR\n                                                    MUL_EXPR\n                                                      MUL_EXPR\n                                                        INDEX_OR_SLICE_EXPR\n                                                          INDEX_OR_SLICE_EXPR\n                                                            REFERENCE_EXPRESSION\n                                                              PsiElement(identifier)('m')\n                                                            PsiElement([)('[')\n                                                            LITERAL\n                                                              PsiElement(int)('0')\n                                                            PsiElement(])(']')\n                                                          PsiElement([)('[')\n                                                          LITERAL\n                                                            PsiElement(int)('0')\n                                                          PsiElement(])(']')\n                                                        PsiElement(*)('*')\n                                                        INDEX_OR_SLICE_EXPR\n                                                          INDEX_OR_SLICE_EXPR\n                                                            REFERENCE_EXPRESSION\n                                                              PsiElement(identifier)('m')\n                                                            PsiElement([)('[')\n                                                            LITERAL\n                                                              PsiElement(int)('1')\n                                                            PsiElement(])(']')\n                                                          PsiElement([)('[')\n                                                          LITERAL\n                                                            PsiElement(int)('2')\n                                                          PsiElement(])(']')\n                                                      PsiElement(*)('*')\n                                                      INDEX_OR_SLICE_EXPR\n                                                        INDEX_OR_SLICE_EXPR\n                                                          REFERENCE_EXPRESSION\n                                                            PsiElement(identifier)('m')\n                                                          PsiElement([)('[')\n                                                          LITERAL\n                                                            PsiElement(int)('2')\n                                                          PsiElement(])(']')\n                                                        PsiElement([)('[')\n                                                        LITERAL\n                                                          PsiElement(int)('3')\n                                                        PsiElement(])(']')\n                                                    PsiElement(*)('*')\n                                                    INDEX_OR_SLICE_EXPR\n                                                      INDEX_OR_SLICE_EXPR\n                                                        REFERENCE_EXPRESSION\n                                                          PsiElement(identifier)('m')\n                                                        PsiElement([)('[')\n                                                        LITERAL\n                                                          PsiElement(int)('3')\n                                                        PsiElement(])(']')\n                                                      PsiElement([)('[')\n                                                      LITERAL\n                                                        PsiElement(int)('1')\n                                                      PsiElement(])(']')\n                                                PsiElement(+)('+')\n                                                MUL_EXPR\n                                                  MUL_EXPR\n                                                    MUL_EXPR\n                                                      INDEX_OR_SLICE_EXPR\n                                                        INDEX_OR_SLICE_EXPR\n                                                          REFERENCE_EXPRESSION\n                                                            PsiElement(identifier)('m')\n                                                          PsiElement([)('[')\n                                                          LITERAL\n                                                            PsiElement(int)('0')\n                                                          PsiElement(])(']')\n                                                        PsiElement([)('[')\n                                                        LITERAL\n                                                          PsiElement(int)('0')\n                                                        PsiElement(])(']')\n                                                      PsiElement(*)('*')\n                                                      INDEX_OR_SLICE_EXPR\n                                                        INDEX_OR_SLICE_EXPR\n                                                          REFERENCE_EXPRESSION\n                                                            PsiElement(identifier)('m')\n                                                          PsiElement([)('[')\n                                                          LITERAL\n                                                            PsiElement(int)('1')\n                                                          PsiElement(])(']')\n                                                        PsiElement([)('[')\n                                                        LITERAL\n                                                          PsiElement(int)('3')\n                                                        PsiElement(])(']')\n                                                    PsiElement(*)('*')\n                                                    INDEX_OR_SLICE_EXPR\n                                                      INDEX_OR_SLICE_EXPR\n                                                        REFERENCE_EXPRESSION\n                                                          PsiElement(identifier)('m')\n                                                        PsiElement([)('[')\n                                                        LITERAL\n                                                          PsiElement(int)('2')\n                                                        PsiElement(])(']')\n                                                      PsiElement([)('[')\n                                                      LITERAL\n                                                        PsiElement(int)('1')\n                                                      PsiElement(])(']')\n                                                  PsiElement(*)('*')\n                                                  INDEX_OR_SLICE_EXPR\n                                                    INDEX_OR_SLICE_EXPR\n                                                      REFERENCE_EXPRESSION\n                                                        PsiElement(identifier)('m')\n                                                      PsiElement([)('[')\n                                                      LITERAL\n                                                        PsiElement(int)('3')\n                                                      PsiElement(])(']')\n                                                    PsiElement([)('[')\n                                                    LITERAL\n                                                      PsiElement(int)('2')\n                                                    PsiElement(])(']')\n                                              PsiElement(-)('-')\n                                              MUL_EXPR\n                                                MUL_EXPR\n                                                  MUL_EXPR\n                                                    INDEX_OR_SLICE_EXPR\n                                                      INDEX_OR_SLICE_EXPR\n                                                        REFERENCE_EXPRESSION\n                                                          PsiElement(identifier)('m')\n                                                        PsiElement([)('[')\n                                                        LITERAL\n                                                          PsiElement(int)('0')\n                                                        PsiElement(])(']')\n                                                      PsiElement([)('[')\n                                                      LITERAL\n                                                        PsiElement(int)('0')\n                                                      PsiElement(])(']')\n                                                    PsiElement(*)('*')\n                                                    INDEX_OR_SLICE_EXPR\n                                                      INDEX_OR_SLICE_EXPR\n                                                        REFERENCE_EXPRESSION\n                                                          PsiElement(identifier)('m')\n                                                        PsiElement([)('[')\n                                                        LITERAL\n                                                          PsiElement(int)('1')\n                                                        PsiElement(])(']')\n                                                      PsiElement([)('[')\n                                                      LITERAL\n                                                        PsiElement(int)('3')\n                                                      PsiElement(])(']')\n                                                  PsiElement(*)('*')\n                                                  INDEX_OR_SLICE_EXPR\n                                                    INDEX_OR_SLICE_EXPR\n                                                      REFERENCE_EXPRESSION\n                                                        PsiElement(identifier)('m')\n                                                      PsiElement([)('[')\n                                                      LITERAL\n                                                        PsiElement(int)('2')\n                                                      PsiElement(])(']')\n                                                    PsiElement([)('[')\n                                                    LITERAL\n                                                      PsiElement(int)('2')\n                                                    PsiElement(])(']')\n                                                PsiElement(*)('*')\n                                                INDEX_OR_SLICE_EXPR\n                                                  INDEX_OR_SLICE_EXPR\n                                                    REFERENCE_EXPRESSION\n                                                      PsiElement(identifier)('m')\n                                                    PsiElement([)('[')\n                                                    LITERAL\n                                                      PsiElement(int)('3')\n                                                    PsiElement(])(']')\n                                                  PsiElement([)('[')\n                                                  LITERAL\n                                                    PsiElement(int)('1')\n                                                  PsiElement(])(']')\n                                            PsiElement(-)('-')\n                                            MUL_EXPR\n                                              MUL_EXPR\n                                                MUL_EXPR\n                                                  INDEX_OR_SLICE_EXPR\n                                                    INDEX_OR_SLICE_EXPR\n                                                      REFERENCE_EXPRESSION\n                                                        PsiElement(identifier)('m')\n                                                      PsiElement([)('[')\n                                                      LITERAL\n                                                        PsiElement(int)('0')\n                                                      PsiElement(])(']')\n                                                    PsiElement([)('[')\n                                                    LITERAL\n                                                      PsiElement(int)('1')\n                                                    PsiElement(])(']')\n                                                  PsiElement(*)('*')\n                                                  INDEX_OR_SLICE_EXPR\n                                                    INDEX_OR_SLICE_EXPR\n                                                      REFERENCE_EXPRESSION\n                                                        PsiElement(identifier)('m')\n                                                      PsiElement([)('[')\n                                                      LITERAL\n                                                        PsiElement(int)('1')\n                                                      PsiElement(])(']')\n                                                    PsiElement([)('[')\n                                                    LITERAL\n                                                      PsiElement(int)('0')\n                                                    PsiElement(])(']')\n                                                PsiElement(*)('*')\n                                                INDEX_OR_SLICE_EXPR\n                                                  INDEX_OR_SLICE_EXPR\n                                                    REFERENCE_EXPRESSION\n                                                      PsiElement(identifier)('m')\n                                                    PsiElement([)('[')\n                                                    LITERAL\n                                                      PsiElement(int)('2')\n                                                    PsiElement(])(']')\n                                                  PsiElement([)('[')\n                                                  LITERAL\n                                                    PsiElement(int)('2')\n                                                  PsiElement(])(']')\n                                              PsiElement(*)('*')\n                                              INDEX_OR_SLICE_EXPR\n                                                INDEX_OR_SLICE_EXPR\n                                                  REFERENCE_EXPRESSION\n                                                    PsiElement(identifier)('m')\n                                                  PsiElement([)('[')\n                                                  LITERAL\n                                                    PsiElement(int)('3')\n                                                  PsiElement(])(']')\n                                                PsiElement([)('[')\n                                                LITERAL\n                                                  PsiElement(int)('3')\n                                                PsiElement(])(']')\n                                          PsiElement(+)('+')\n                                          MUL_EXPR\n                                            MUL_EXPR\n                                              MUL_EXPR\n                                                INDEX_OR_SLICE_EXPR\n                                                  INDEX_OR_SLICE_EXPR\n                                                    REFERENCE_EXPRESSION\n                                                      PsiElement(identifier)('m')\n                                                    PsiElement([)('[')\n                                                    LITERAL\n                                                      PsiElement(int)('0')\n                                                    PsiElement(])(']')\n                                                  PsiElement([)('[')\n                                                  LITERAL\n                                                    PsiElement(int)('1')\n                                                  PsiElement(])(']')\n                                                PsiElement(*)('*')\n                                                INDEX_OR_SLICE_EXPR\n                                                  INDEX_OR_SLICE_EXPR\n                                                    REFERENCE_EXPRESSION\n                                                      PsiElement(identifier)('m')\n                                                    PsiElement([)('[')\n                                                    LITERAL\n                                                      PsiElement(int)('1')\n                                                    PsiElement(])(']')\n                                                  PsiElement([)('[')\n                                                  LITERAL\n                                                    PsiElement(int)('0')\n                                                  PsiElement(])(']')\n                                              PsiElement(*)('*')\n                                              INDEX_OR_SLICE_EXPR\n                                                INDEX_OR_SLICE_EXPR\n                                                  REFERENCE_EXPRESSION\n                                                    PsiElement(identifier)('m')\n                                                  PsiElement([)('[')\n                                                  LITERAL\n                                                    PsiElement(int)('2')\n                                                  PsiElement(])(']')\n                                                PsiElement([)('[')\n                                                LITERAL\n                                                  PsiElement(int)('3')\n                                                PsiElement(])(']')\n                                            PsiElement(*)('*')\n                                            INDEX_OR_SLICE_EXPR\n                                              INDEX_OR_SLICE_EXPR\n                                                REFERENCE_EXPRESSION\n                                                  PsiElement(identifier)('m')\n                                                PsiElement([)('[')\n                                                LITERAL\n                                                  PsiElement(int)('3')\n                                                PsiElement(])(']')\n                                              PsiElement([)('[')\n                                              LITERAL\n                                                PsiElement(int)('2')\n                                              PsiElement(])(']')\n                                        PsiElement(+)('+')\n                                        MUL_EXPR\n                                          MUL_EXPR\n                                            MUL_EXPR\n                                              INDEX_OR_SLICE_EXPR\n                                                INDEX_OR_SLICE_EXPR\n                                                  REFERENCE_EXPRESSION\n                                                    PsiElement(identifier)('m')\n                                                  PsiElement([)('[')\n                                                  LITERAL\n                                                    PsiElement(int)('0')\n                                                  PsiElement(])(']')\n                                                PsiElement([)('[')\n                                                LITERAL\n                                                  PsiElement(int)('1')\n                                                PsiElement(])(']')\n                                              PsiElement(*)('*')\n                                              INDEX_OR_SLICE_EXPR\n                                                INDEX_OR_SLICE_EXPR\n                                                  REFERENCE_EXPRESSION\n                                                    PsiElement(identifier)('m')\n                                                  PsiElement([)('[')\n                                                  LITERAL\n                                                    PsiElement(int)('1')\n                                                  PsiElement(])(']')\n                                                PsiElement([)('[')\n                                                LITERAL\n                                                  PsiElement(int)('2')\n                                                PsiElement(])(']')\n                                            PsiElement(*)('*')\n                                            INDEX_OR_SLICE_EXPR\n                                              INDEX_OR_SLICE_EXPR\n                                                REFERENCE_EXPRESSION\n                                                  PsiElement(identifier)('m')\n                                                PsiElement([)('[')\n                                                LITERAL\n                                                  PsiElement(int)('2')\n                                                PsiElement(])(']')\n                                              PsiElement([)('[')\n                                              LITERAL\n                                                PsiElement(int)('0')\n                                              PsiElement(])(']')\n                                          PsiElement(*)('*')\n                                          INDEX_OR_SLICE_EXPR\n                                            INDEX_OR_SLICE_EXPR\n                                              REFERENCE_EXPRESSION\n                                                PsiElement(identifier)('m')\n                                              PsiElement([)('[')\n                                              LITERAL\n                                                PsiElement(int)('3')\n                                              PsiElement(])(']')\n                                            PsiElement([)('[')\n                                            LITERAL\n                                              PsiElement(int)('3')\n                                            PsiElement(])(']')\n                                      PsiElement(-)('-')\n                                      MUL_EXPR\n                                        MUL_EXPR\n                                          MUL_EXPR\n                                            INDEX_OR_SLICE_EXPR\n                                              INDEX_OR_SLICE_EXPR\n                                                REFERENCE_EXPRESSION\n                                                  PsiElement(identifier)('m')\n                                                PsiElement([)('[')\n                                                LITERAL\n                                                  PsiElement(int)('0')\n                                                PsiElement(])(']')\n                                              PsiElement([)('[')\n                                              LITERAL\n                                                PsiElement(int)('1')\n                                              PsiElement(])(']')\n                                            PsiElement(*)('*')\n                                            INDEX_OR_SLICE_EXPR\n                                              INDEX_OR_SLICE_EXPR\n                                                REFERENCE_EXPRESSION\n                                                  PsiElement(identifier)('m')\n                                                PsiElement([)('[')\n                                                LITERAL\n                                                  PsiElement(int)('1')\n                                                PsiElement(])(']')\n                                              PsiElement([)('[')\n                                              LITERAL\n                                                PsiElement(int)('2')\n                                              PsiElement(])(']')\n                                          PsiElement(*)('*')\n                                          INDEX_OR_SLICE_EXPR\n                                            INDEX_OR_SLICE_EXPR\n                                              REFERENCE_EXPRESSION\n                                                PsiElement(identifier)('m')\n                                              PsiElement([)('[')\n                                              LITERAL\n                                                PsiElement(int)('2')\n                                              PsiElement(])(']')\n                                            PsiElement([)('[')\n                                            LITERAL\n                                              PsiElement(int)('3')\n                                            PsiElement(])(']')\n                                        PsiElement(*)('*')\n                                        INDEX_OR_SLICE_EXPR\n                                          INDEX_OR_SLICE_EXPR\n                                            REFERENCE_EXPRESSION\n                                              PsiElement(identifier)('m')\n                                            PsiElement([)('[')\n                                            LITERAL\n                                              PsiElement(int)('3')\n                                            PsiElement(])(']')\n                                          PsiElement([)('[')\n                                          LITERAL\n                                            PsiElement(int)('0')\n                                          PsiElement(])(']')\n                                    PsiElement(-)('-')\n                                    MUL_EXPR\n                                      MUL_EXPR\n                                        MUL_EXPR\n                                          INDEX_OR_SLICE_EXPR\n                                            INDEX_OR_SLICE_EXPR\n                                              REFERENCE_EXPRESSION\n                                                PsiElement(identifier)('m')\n                                              PsiElement([)('[')\n                                              LITERAL\n                                                PsiElement(int)('0')\n                                              PsiElement(])(']')\n                                            PsiElement([)('[')\n                                            LITERAL\n                                              PsiElement(int)('1')\n                                            PsiElement(])(']')\n                                          PsiElement(*)('*')\n                                          INDEX_OR_SLICE_EXPR\n                                            INDEX_OR_SLICE_EXPR\n                                              REFERENCE_EXPRESSION\n                                                PsiElement(identifier)('m')\n                                              PsiElement([)('[')\n                                              LITERAL\n                                                PsiElement(int)('1')\n                                              PsiElement(])(']')\n                                            PsiElement([)('[')\n                                            LITERAL\n                                              PsiElement(int)('3')\n                                            PsiElement(])(']')\n                                        PsiElement(*)('*')\n                                        INDEX_OR_SLICE_EXPR\n                                          INDEX_OR_SLICE_EXPR\n                                            REFERENCE_EXPRESSION\n                                              PsiElement(identifier)('m')\n                                            PsiElement([)('[')\n                                            LITERAL\n                                              PsiElement(int)('2')\n                                            PsiElement(])(']')\n                                          PsiElement([)('[')\n                                          LITERAL\n                                            PsiElement(int)('0')\n                                          PsiElement(])(']')\n                                      PsiElement(*)('*')\n                                      INDEX_OR_SLICE_EXPR\n                                        INDEX_OR_SLICE_EXPR\n                                          REFERENCE_EXPRESSION\n                                            PsiElement(identifier)('m')\n                                          PsiElement([)('[')\n                                          LITERAL\n                                            PsiElement(int)('3')\n                                          PsiElement(])(']')\n                                        PsiElement([)('[')\n                                        LITERAL\n                                          PsiElement(int)('2')\n                                        PsiElement(])(']')\n                                  PsiElement(+)('+')\n                                  MUL_EXPR\n                                    MUL_EXPR\n                                      MUL_EXPR\n                                        INDEX_OR_SLICE_EXPR\n                                          INDEX_OR_SLICE_EXPR\n                                            REFERENCE_EXPRESSION\n                                              PsiElement(identifier)('m')\n                                            PsiElement([)('[')\n                                            LITERAL\n                                              PsiElement(int)('0')\n                                            PsiElement(])(']')\n                                          PsiElement([)('[')\n                                          LITERAL\n                                            PsiElement(int)('1')\n                                          PsiElement(])(']')\n                                        PsiElement(*)('*')\n                                        INDEX_OR_SLICE_EXPR\n                                          INDEX_OR_SLICE_EXPR\n                                            REFERENCE_EXPRESSION\n                                              PsiElement(identifier)('m')\n                                            PsiElement([)('[')\n                                            LITERAL\n                                              PsiElement(int)('1')\n                                            PsiElement(])(']')\n                                          PsiElement([)('[')\n                                          LITERAL\n                                            PsiElement(int)('3')\n                                          PsiElement(])(']')\n                                      PsiElement(*)('*')\n                                      INDEX_OR_SLICE_EXPR\n                                        INDEX_OR_SLICE_EXPR\n                                          REFERENCE_EXPRESSION\n                                            PsiElement(identifier)('m')\n                                          PsiElement([)('[')\n                                          LITERAL\n                                            PsiElement(int)('2')\n                                          PsiElement(])(']')\n                                        PsiElement([)('[')\n                                        LITERAL\n                                          PsiElement(int)('2')\n                                        PsiElement(])(']')\n                                    PsiElement(*)('*')\n                                    INDEX_OR_SLICE_EXPR\n                                      INDEX_OR_SLICE_EXPR\n                                        REFERENCE_EXPRESSION\n                                          PsiElement(identifier)('m')\n                                        PsiElement([)('[')\n                                        LITERAL\n                                          PsiElement(int)('3')\n                                        PsiElement(])(']')\n                                      PsiElement([)('[')\n                                      LITERAL\n                                        PsiElement(int)('0')\n                                      PsiElement(])(']')\n                                PsiElement(+)('+')\n                                MUL_EXPR\n                                  MUL_EXPR\n                                    MUL_EXPR\n                                      INDEX_OR_SLICE_EXPR\n                                        INDEX_OR_SLICE_EXPR\n                                          REFERENCE_EXPRESSION\n                                            PsiElement(identifier)('m')\n                                          PsiElement([)('[')\n                                          LITERAL\n                                            PsiElement(int)('0')\n                                          PsiElement(])(']')\n                                        PsiElement([)('[')\n                                        LITERAL\n                                          PsiElement(int)('2')\n                                        PsiElement(])(']')\n                                      PsiElement(*)('*')\n                                      INDEX_OR_SLICE_EXPR\n                                        INDEX_OR_SLICE_EXPR\n                                          REFERENCE_EXPRESSION\n                                            PsiElement(identifier)('m')\n                                          PsiElement([)('[')\n                                          LITERAL\n                                            PsiElement(int)('1')\n                                          PsiElement(])(']')\n                                        PsiElement([)('[')\n                                        LITERAL\n                                          PsiElement(int)('0')\n                                        PsiElement(])(']')\n                                    PsiElement(*)('*')\n                                    INDEX_OR_SLICE_EXPR\n                                      INDEX_OR_SLICE_EXPR\n                                        REFERENCE_EXPRESSION\n                                          PsiElement(identifier)('m')\n                                        PsiElement([)('[')\n                                        LITERAL\n                                          PsiElement(int)('2')\n                                        PsiElement(])(']')\n                                      PsiElement([)('[')\n                                      LITERAL\n                                        PsiElement(int)('1')\n                                      PsiElement(])(']')\n                                  PsiElement(*)('*')\n                                  INDEX_OR_SLICE_EXPR\n                                    INDEX_OR_SLICE_EXPR\n                                      REFERENCE_EXPRESSION\n                                        PsiElement(identifier)('m')\n                                      PsiElement([)('[')\n                                      LITERAL\n                                        PsiElement(int)('3')\n                                      PsiElement(])(']')\n                                    PsiElement([)('[')\n                                    LITERAL\n                                      PsiElement(int)('3')\n                                    PsiElement(])(']')\n                              PsiElement(-)('-')\n                              MUL_EXPR\n                                MUL_EXPR\n                                  MUL_EXPR\n                                    INDEX_OR_SLICE_EXPR\n                                      INDEX_OR_SLICE_EXPR\n                                        REFERENCE_EXPRESSION\n                                          PsiElement(identifier)('m')\n                                        PsiElement([)('[')\n                                        LITERAL\n                                          PsiElement(int)('0')\n                                        PsiElement(])(']')\n                                      PsiElement([)('[')\n                                      LITERAL\n                                        PsiElement(int)('2')\n                                      PsiElement(])(']')\n                                    PsiElement(*)('*')\n                                    INDEX_OR_SLICE_EXPR\n                                      INDEX_OR_SLICE_EXPR\n                                        REFERENCE_EXPRESSION\n                                          PsiElement(identifier)('m')\n                                        PsiElement([)('[')\n                                        LITERAL\n                                          PsiElement(int)('1')\n                                        PsiElement(])(']')\n                                      PsiElement([)('[')\n                                      LITERAL\n                                        PsiElement(int)('0')\n                                      PsiElement(])(']')\n                                  PsiElement(*)('*')\n                                  INDEX_OR_SLICE_EXPR\n                                    INDEX_OR_SLICE_EXPR\n                                      REFERENCE_EXPRESSION\n                                        PsiElement(identifier)('m')\n                                      PsiElement([)('[')\n                                      LITERAL\n                                        PsiElement(int)('2')\n                                      PsiElement(])(']')\n                                    PsiElement([)('[')\n                                    LITERAL\n                                      PsiElement(int)('3')\n                                    PsiElement(])(']')\n                                PsiElement(*)('*')\n                                INDEX_OR_SLICE_EXPR\n                                  INDEX_OR_SLICE_EXPR\n                                    REFERENCE_EXPRESSION\n                                      PsiElement(identifier)('m')\n                                    PsiElement([)('[')\n                                    LITERAL\n                                      PsiElement(int)('3')\n                                    PsiElement(])(']')\n                                  PsiElement([)('[')\n                                  LITERAL\n                                    PsiElement(int)('1')\n                                  PsiElement(])(']')\n                            PsiElement(-)('-')\n                            MUL_EXPR\n                              MUL_EXPR\n                                MUL_EXPR\n                                  INDEX_OR_SLICE_EXPR\n                                    INDEX_OR_SLICE_EXPR\n                                      REFERENCE_EXPRESSION\n                                        PsiElement(identifier)('m')\n                                      PsiElement([)('[')\n                                      LITERAL\n                                        PsiElement(int)('0')\n                                      PsiElement(])(']')\n                                    PsiElement([)('[')\n                                    LITERAL\n                                      PsiElement(int)('2')\n                                    PsiElement(])(']')\n                                  PsiElement(*)('*')\n                                  INDEX_OR_SLICE_EXPR\n                                    INDEX_OR_SLICE_EXPR\n                                      REFERENCE_EXPRESSION\n                                        PsiElement(identifier)('m')\n                                      PsiElement([)('[')\n                                      LITERAL\n                                        PsiElement(int)('1')\n                                      PsiElement(])(']')\n                                    PsiElement([)('[')\n                                    LITERAL\n                                      PsiElement(int)('1')\n                                    PsiElement(])(']')\n                                PsiElement(*)('*')\n                                INDEX_OR_SLICE_EXPR\n                                  INDEX_OR_SLICE_EXPR\n                                    REFERENCE_EXPRESSION\n                                      PsiElement(identifier)('m')\n                                    PsiElement([)('[')\n                                    LITERAL\n                                      PsiElement(int)('2')\n                                    PsiElement(])(']')\n                                  PsiElement([)('[')\n                                  LITERAL\n                                    PsiElement(int)('0')\n                                  PsiElement(])(']')\n                              PsiElement(*)('*')\n                              INDEX_OR_SLICE_EXPR\n                                INDEX_OR_SLICE_EXPR\n                                  REFERENCE_EXPRESSION\n                                    PsiElement(identifier)('m')\n                                  PsiElement([)('[')\n                                  LITERAL\n                                    PsiElement(int)('3')\n                                  PsiElement(])(']')\n                                PsiElement([)('[')\n                                LITERAL\n                                  PsiElement(int)('3')\n                                PsiElement(])(']')\n                          PsiElement(+)('+')\n                          MUL_EXPR\n                            MUL_EXPR\n                              MUL_EXPR\n                                INDEX_OR_SLICE_EXPR\n                                  INDEX_OR_SLICE_EXPR\n                                    REFERENCE_EXPRESSION\n                                      PsiElement(identifier)('m')\n                                    PsiElement([)('[')\n                                    LITERAL\n                                      PsiElement(int)('0')\n                                    PsiElement(])(']')\n                                  PsiElement([)('[')\n                                  LITERAL\n                                    PsiElement(int)('2')\n                                  PsiElement(])(']')\n                                PsiElement(*)('*')\n                                INDEX_OR_SLICE_EXPR\n                                  INDEX_OR_SLICE_EXPR\n                                    REFERENCE_EXPRESSION\n                                      PsiElement(identifier)('m')\n                                    PsiElement([)('[')\n                                    LITERAL\n                                      PsiElement(int)('1')\n                                    PsiElement(])(']')\n                                  PsiElement([)('[')\n                                  LITERAL\n                                    PsiElement(int)('1')\n                                  PsiElement(])(']')\n                              PsiElement(*)('*')\n                              INDEX_OR_SLICE_EXPR\n                                INDEX_OR_SLICE_EXPR\n                                  REFERENCE_EXPRESSION\n                                    PsiElement(identifier)('m')\n                                  PsiElement([)('[')\n                                  LITERAL\n                                    PsiElement(int)('2')\n                                  PsiElement(])(']')\n                                PsiElement([)('[')\n                                LITERAL\n                                  PsiElement(int)('3')\n                                PsiElement(])(']')\n                            PsiElement(*)('*')\n                            INDEX_OR_SLICE_EXPR\n                              INDEX_OR_SLICE_EXPR\n                                REFERENCE_EXPRESSION\n                                  PsiElement(identifier)('m')\n                                PsiElement([)('[')\n                                LITERAL\n                                  PsiElement(int)('3')\n                                PsiElement(])(']')\n                              PsiElement([)('[')\n                              LITERAL\n                                PsiElement(int)('0')\n                              PsiElement(])(']')\n                        PsiElement(+)('+')\n                        MUL_EXPR\n                          MUL_EXPR\n                            MUL_EXPR\n                              INDEX_OR_SLICE_EXPR\n                                INDEX_OR_SLICE_EXPR\n                                  REFERENCE_EXPRESSION\n                                    PsiElement(identifier)('m')\n                                  PsiElement([)('[')\n                                  LITERAL\n                                    PsiElement(int)('0')\n                                  PsiElement(])(']')\n                                PsiElement([)('[')\n                                LITERAL\n                                  PsiElement(int)('2')\n                                PsiElement(])(']')\n                              PsiElement(*)('*')\n                              INDEX_OR_SLICE_EXPR\n                                INDEX_OR_SLICE_EXPR\n                                  REFERENCE_EXPRESSION\n                                    PsiElement(identifier)('m')\n                                  PsiElement([)('[')\n                                  LITERAL\n                                    PsiElement(int)('1')\n                                  PsiElement(])(']')\n                                PsiElement([)('[')\n                                LITERAL\n                                  PsiElement(int)('3')\n                                PsiElement(])(']')\n                            PsiElement(*)('*')\n                            INDEX_OR_SLICE_EXPR\n                              INDEX_OR_SLICE_EXPR\n                                REFERENCE_EXPRESSION\n                                  PsiElement(identifier)('m')\n                                PsiElement([)('[')\n                                LITERAL\n                                  PsiElement(int)('2')\n                                PsiElement(])(']')\n                              PsiElement([)('[')\n                              LITERAL\n                                PsiElement(int)('0')\n                              PsiElement(])(']')\n                          PsiElement(*)('*')\n                          INDEX_OR_SLICE_EXPR\n                            INDEX_OR_SLICE_EXPR\n                              REFERENCE_EXPRESSION\n                                PsiElement(identifier)('m')\n                              PsiElement([)('[')\n                              LITERAL\n                                PsiElement(int)('3')\n                              PsiElement(])(']')\n                            PsiElement([)('[')\n                            LITERAL\n                              PsiElement(int)('1')\n                            PsiElement(])(']')\n                      PsiElement(-)('-')\n                      MUL_EXPR\n                        MUL_EXPR\n                          MUL_EXPR\n                            INDEX_OR_SLICE_EXPR\n                              INDEX_OR_SLICE_EXPR\n                                REFERENCE_EXPRESSION\n                                  PsiElement(identifier)('m')\n                                PsiElement([)('[')\n                                LITERAL\n                                  PsiElement(int)('0')\n                                PsiElement(])(']')\n                              PsiElement([)('[')\n                              LITERAL\n                                PsiElement(int)('2')\n                              PsiElement(])(']')\n                            PsiElement(*)('*')\n                            INDEX_OR_SLICE_EXPR\n                              INDEX_OR_SLICE_EXPR\n                                REFERENCE_EXPRESSION\n                                  PsiElement(identifier)('m')\n                                PsiElement([)('[')\n                                LITERAL\n                                  PsiElement(int)('1')\n                                PsiElement(])(']')\n                              PsiElement([)('[')\n                              LITERAL\n                                PsiElement(int)('3')\n                              PsiElement(])(']')\n                          PsiElement(*)('*')\n                          INDEX_OR_SLICE_EXPR\n                            INDEX_OR_SLICE_EXPR\n                              REFERENCE_EXPRESSION\n                                PsiElement(identifier)('m')\n                              PsiElement([)('[')\n                              LITERAL\n                                PsiElement(int)('2')\n                              PsiElement(])(']')\n                            PsiElement([)('[')\n                            LITERAL\n                              PsiElement(int)('1')\n                            PsiElement(])(']')\n                        PsiElement(*)('*')\n                        INDEX_OR_SLICE_EXPR\n                          INDEX_OR_SLICE_EXPR\n                            REFERENCE_EXPRESSION\n                              PsiElement(identifier)('m')\n                            PsiElement([)('[')\n                            LITERAL\n                              PsiElement(int)('3')\n                            PsiElement(])(']')\n                          PsiElement([)('[')\n                          LITERAL\n                            PsiElement(int)('0')\n                          PsiElement(])(']')\n                    PsiElement(-)('-')\n                    MUL_EXPR\n                      MUL_EXPR\n                        MUL_EXPR\n                          INDEX_OR_SLICE_EXPR\n                            INDEX_OR_SLICE_EXPR\n                              REFERENCE_EXPRESSION\n                                PsiElement(identifier)('m')\n                              PsiElement([)('[')\n                              LITERAL\n                                PsiElement(int)('0')\n                              PsiElement(])(']')\n                            PsiElement([)('[')\n                            LITERAL\n                              PsiElement(int)('3')\n                            PsiElement(])(']')\n                          PsiElement(*)('*')\n                          INDEX_OR_SLICE_EXPR\n                            INDEX_OR_SLICE_EXPR\n                              REFERENCE_EXPRESSION\n                                PsiElement(identifier)('m')\n                              PsiElement([)('[')\n                              LITERAL\n                                PsiElement(int)('1')\n                              PsiElement(])(']')\n                            PsiElement([)('[')\n                            LITERAL\n                              PsiElement(int)('0')\n                            PsiElement(])(']')\n                        PsiElement(*)('*')\n                        INDEX_OR_SLICE_EXPR\n                          INDEX_OR_SLICE_EXPR\n                            REFERENCE_EXPRESSION\n                              PsiElement(identifier)('m')\n                            PsiElement([)('[')\n                            LITERAL\n                              PsiElement(int)('2')\n                            PsiElement(])(']')\n                          PsiElement([)('[')\n                          LITERAL\n                            PsiElement(int)('1')\n                          PsiElement(])(']')\n                      PsiElement(*)('*')\n                      INDEX_OR_SLICE_EXPR\n                        INDEX_OR_SLICE_EXPR\n                          REFERENCE_EXPRESSION\n                            PsiElement(identifier)('m')\n                          PsiElement([)('[')\n                          LITERAL\n                            PsiElement(int)('3')\n                          PsiElement(])(']')\n                        PsiElement([)('[')\n                        LITERAL\n                          PsiElement(int)('2')\n                        PsiElement(])(']')\n                  PsiElement(+)('+')\n                  MUL_EXPR\n                    MUL_EXPR\n                      MUL_EXPR\n                        INDEX_OR_SLICE_EXPR\n                          INDEX_OR_SLICE_EXPR\n                            REFERENCE_EXPRESSION\n                              PsiElement(identifier)('m')\n                            PsiElement([)('[')\n                            LITERAL\n                              PsiElement(int)('0')\n                            PsiElement(])(']')\n                          PsiElement([)('[')\n                          LITERAL\n                            PsiElement(int)('3')\n                          PsiElement(])(']')\n                        PsiElement(*)('*')\n                        INDEX_OR_SLICE_EXPR\n                          INDEX_OR_SLICE_EXPR\n                            REFERENCE_EXPRESSION\n                              PsiElement(identifier)('m')\n                            PsiElement([)('[')\n                            LITERAL\n                              PsiElement(int)('1')\n                            PsiElement(])(']')\n                          PsiElement([)('[')\n                          LITERAL\n                            PsiElement(int)('0')\n                          PsiElement(])(']')\n                      PsiElement(*)('*')\n                      INDEX_OR_SLICE_EXPR\n                        INDEX_OR_SLICE_EXPR\n                          REFERENCE_EXPRESSION\n                            PsiElement(identifier)('m')\n                          PsiElement([)('[')\n                          LITERAL\n                            PsiElement(int)('2')\n                          PsiElement(])(']')\n                        PsiElement([)('[')\n                        LITERAL\n                          PsiElement(int)('2')\n                        PsiElement(])(']')\n                    PsiElement(*)('*')\n                    INDEX_OR_SLICE_EXPR\n                      INDEX_OR_SLICE_EXPR\n                        REFERENCE_EXPRESSION\n                          PsiElement(identifier)('m')\n                        PsiElement([)('[')\n                        LITERAL\n                          PsiElement(int)('3')\n                        PsiElement(])(']')\n                      PsiElement([)('[')\n                      LITERAL\n                        PsiElement(int)('1')\n                      PsiElement(])(']')\n                PsiElement(+)('+')\n                MUL_EXPR\n                  MUL_EXPR\n                    MUL_EXPR\n                      INDEX_OR_SLICE_EXPR\n                        INDEX_OR_SLICE_EXPR\n                          REFERENCE_EXPRESSION\n                            PsiElement(identifier)('m')\n                          PsiElement([)('[')\n                          LITERAL\n                            PsiElement(int)('0')\n                          PsiElement(])(']')\n                        PsiElement([)('[')\n                        LITERAL\n                          PsiElement(int)('3')\n                        PsiElement(])(']')\n                      PsiElement(*)('*')\n                      INDEX_OR_SLICE_EXPR\n                        INDEX_OR_SLICE_EXPR\n                          REFERENCE_EXPRESSION\n                            PsiElement(identifier)('m')\n                          PsiElement([)('[')\n                          LITERAL\n                            PsiElement(int)('1')\n                          PsiElement(])(']')\n                        PsiElement([)('[')\n                        LITERAL\n                          PsiElement(int)('1')\n                        PsiElement(])(']')\n                    PsiElement(*)('*')\n                    INDEX_OR_SLICE_EXPR\n                      INDEX_OR_SLICE_EXPR\n                        REFERENCE_EXPRESSION\n                          PsiElement(identifier)('m')\n                        PsiElement([)('[')\n                        LITERAL\n                          PsiElement(int)('2')\n                        PsiElement(])(']')\n                      PsiElement([)('[')\n                      LITERAL\n                        PsiElement(int)('0')\n                      PsiElement(])(']')\n                  PsiElement(*)('*')\n                  INDEX_OR_SLICE_EXPR\n                    INDEX_OR_SLICE_EXPR\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('m')\n                      PsiElement([)('[')\n                      LITERAL\n                        PsiElement(int)('3')\n                      PsiElement(])(']')\n                    PsiElement([)('[')\n                    LITERAL\n                      PsiElement(int)('2')\n                    PsiElement(])(']')\n              PsiElement(-)('-')\n              MUL_EXPR\n                MUL_EXPR\n                  MUL_EXPR\n                    INDEX_OR_SLICE_EXPR\n                      INDEX_OR_SLICE_EXPR\n                        REFERENCE_EXPRESSION\n                          PsiElement(identifier)('m')\n                        PsiElement([)('[')\n                        LITERAL\n                          PsiElement(int)('0')\n                        PsiElement(])(']')\n                      PsiElement([)('[')\n                      LITERAL\n                        PsiElement(int)('3')\n                      PsiElement(])(']')\n                    PsiElement(*)('*')\n                    INDEX_OR_SLICE_EXPR\n                      INDEX_OR_SLICE_EXPR\n                        REFERENCE_EXPRESSION\n                          PsiElement(identifier)('m')\n                        PsiElement([)('[')\n                        LITERAL\n                          PsiElement(int)('1')\n                        PsiElement(])(']')\n                      PsiElement([)('[')\n                      LITERAL\n                        PsiElement(int)('1')\n                      PsiElement(])(']')\n                  PsiElement(*)('*')\n                  INDEX_OR_SLICE_EXPR\n                    INDEX_OR_SLICE_EXPR\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('m')\n                      PsiElement([)('[')\n                      LITERAL\n                        PsiElement(int)('2')\n                      PsiElement(])(']')\n                    PsiElement([)('[')\n                    LITERAL\n                      PsiElement(int)('2')\n                    PsiElement(])(']')\n                PsiElement(*)('*')\n                INDEX_OR_SLICE_EXPR\n                  INDEX_OR_SLICE_EXPR\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('m')\n                    PsiElement([)('[')\n                    LITERAL\n                      PsiElement(int)('3')\n                    PsiElement(])(']')\n                  PsiElement([)('[')\n                  LITERAL\n                    PsiElement(int)('0')\n                  PsiElement(])(']')\n            PsiElement(-)('-')\n            MUL_EXPR\n              MUL_EXPR\n                MUL_EXPR\n                  INDEX_OR_SLICE_EXPR\n                    INDEX_OR_SLICE_EXPR\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('m')\n                      PsiElement([)('[')\n                      LITERAL\n                        PsiElement(int)('0')\n                      PsiElement(])(']')\n                    PsiElement([)('[')\n                    LITERAL\n                      PsiElement(int)('3')\n                    PsiElement(])(']')\n                  PsiElement(*)('*')\n                  INDEX_OR_SLICE_EXPR\n                    INDEX_OR_SLICE_EXPR\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('m')\n                      PsiElement([)('[')\n                      LITERAL\n                        PsiElement(int)('1')\n                      PsiElement(])(']')\n                    PsiElement([)('[')\n                    LITERAL\n                      PsiElement(int)('2')\n                    PsiElement(])(']')\n                PsiElement(*)('*')\n                INDEX_OR_SLICE_EXPR\n                  INDEX_OR_SLICE_EXPR\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('m')\n                    PsiElement([)('[')\n                    LITERAL\n                      PsiElement(int)('2')\n                    PsiElement(])(']')\n                  PsiElement([)('[')\n                  LITERAL\n                    PsiElement(int)('0')\n                  PsiElement(])(']')\n              PsiElement(*)('*')\n              INDEX_OR_SLICE_EXPR\n                INDEX_OR_SLICE_EXPR\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('m')\n                  PsiElement([)('[')\n                  LITERAL\n                    PsiElement(int)('3')\n                  PsiElement(])(']')\n                PsiElement([)('[')\n                LITERAL\n                  PsiElement(int)('1')\n                PsiElement(])(']')\n          PsiElement(+)('+')\n          MUL_EXPR\n            MUL_EXPR\n              MUL_EXPR\n                INDEX_OR_SLICE_EXPR\n                  INDEX_OR_SLICE_EXPR\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('m')\n                    PsiElement([)('[')\n                    LITERAL\n                      PsiElement(int)('0')\n                    PsiElement(])(']')\n                  PsiElement([)('[')\n                  LITERAL\n                    PsiElement(int)('3')\n                  PsiElement(])(']')\n                PsiElement(*)('*')\n                INDEX_OR_SLICE_EXPR\n                  INDEX_OR_SLICE_EXPR\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('m')\n                    PsiElement([)('[')\n                    LITERAL\n                      PsiElement(int)('1')\n                    PsiElement(])(']')\n                  PsiElement([)('[')\n                  LITERAL\n                    PsiElement(int)('2')\n                  PsiElement(])(']')\n              PsiElement(*)('*')\n              INDEX_OR_SLICE_EXPR\n                INDEX_OR_SLICE_EXPR\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('m')\n                  PsiElement([)('[')\n                  LITERAL\n                    PsiElement(int)('2')\n                  PsiElement(])(']')\n                PsiElement([)('[')\n                LITERAL\n                  PsiElement(int)('1')\n                PsiElement(])(']')\n            PsiElement(*)('*')\n            INDEX_OR_SLICE_EXPR\n              INDEX_OR_SLICE_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('m')\n                PsiElement([)('[')\n                LITERAL\n                  PsiElement(int)('3')\n                PsiElement(])(']')\n              PsiElement([)('[')\n              LITERAL\n                PsiElement(int)('0')\n              PsiElement(])(']')\n      PsiElement(})('}')\n  PsiComment(GO_LINE_COMMENT)('// Compute the determinant of a 4x4-matrix by the sum')\n  PsiComment(GO_LINE_COMMENT)('// over all index permutations.')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('determinantInt')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('m')\n          ARRAY_OR_SLICE_TYPE\n            PsiElement([)('[')\n            LITERAL\n              PsiElement(int)('4')\n            PsiElement(])(']')\n            ARRAY_OR_SLICE_TYPE\n              PsiElement([)('[')\n              LITERAL\n                PsiElement(int)('4')\n              PsiElement(])(']')\n              TYPE\n                TYPE_REFERENCE_EXPRESSION\n                  PsiElement(identifier)('int')\n        PsiElement())(')')\n      RESULT\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('int')\n    BLOCK\n      PsiElement({)('{')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n        ADD_EXPR\n          ADD_EXPR\n            ADD_EXPR\n              ADD_EXPR\n                ADD_EXPR\n                  ADD_EXPR\n                    ADD_EXPR\n                      ADD_EXPR\n                        ADD_EXPR\n                          ADD_EXPR\n                            ADD_EXPR\n                              ADD_EXPR\n                                ADD_EXPR\n                                  ADD_EXPR\n                                    ADD_EXPR\n                                      ADD_EXPR\n                                        ADD_EXPR\n                                          ADD_EXPR\n                                            ADD_EXPR\n                                              ADD_EXPR\n                                                ADD_EXPR\n                                                  ADD_EXPR\n                                                    ADD_EXPR\n                                                      MUL_EXPR\n                                                        MUL_EXPR\n                                                          MUL_EXPR\n                                                            INDEX_OR_SLICE_EXPR\n                                                              INDEX_OR_SLICE_EXPR\n                                                                REFERENCE_EXPRESSION\n                                                                  PsiElement(identifier)('m')\n                                                                PsiElement([)('[')\n                                                                LITERAL\n                                                                  PsiElement(int)('0')\n                                                                PsiElement(])(']')\n                                                              PsiElement([)('[')\n                                                              LITERAL\n                                                                PsiElement(int)('0')\n                                                              PsiElement(])(']')\n                                                            PsiElement(*)('*')\n                                                            INDEX_OR_SLICE_EXPR\n                                                              INDEX_OR_SLICE_EXPR\n                                                                REFERENCE_EXPRESSION\n                                                                  PsiElement(identifier)('m')\n                                                                PsiElement([)('[')\n                                                                LITERAL\n                                                                  PsiElement(int)('1')\n                                                                PsiElement(])(']')\n                                                              PsiElement([)('[')\n                                                              LITERAL\n                                                                PsiElement(int)('1')\n                                                              PsiElement(])(']')\n                                                          PsiElement(*)('*')\n                                                          INDEX_OR_SLICE_EXPR\n                                                            INDEX_OR_SLICE_EXPR\n                                                              REFERENCE_EXPRESSION\n                                                                PsiElement(identifier)('m')\n                                                              PsiElement([)('[')\n                                                              LITERAL\n                                                                PsiElement(int)('2')\n                                                              PsiElement(])(']')\n                                                            PsiElement([)('[')\n                                                            LITERAL\n                                                              PsiElement(int)('2')\n                                                            PsiElement(])(']')\n                                                        PsiElement(*)('*')\n                                                        INDEX_OR_SLICE_EXPR\n                                                          INDEX_OR_SLICE_EXPR\n                                                            REFERENCE_EXPRESSION\n                                                              PsiElement(identifier)('m')\n                                                            PsiElement([)('[')\n                                                            LITERAL\n                                                              PsiElement(int)('3')\n                                                            PsiElement(])(']')\n                                                          PsiElement([)('[')\n                                                          LITERAL\n                                                            PsiElement(int)('3')\n                                                          PsiElement(])(']')\n                                                      PsiElement(-)('-')\n                                                      MUL_EXPR\n                                                        MUL_EXPR\n                                                          MUL_EXPR\n                                                            INDEX_OR_SLICE_EXPR\n                                                              INDEX_OR_SLICE_EXPR\n                                                                REFERENCE_EXPRESSION\n                                                                  PsiElement(identifier)('m')\n                                                                PsiElement([)('[')\n                                                                LITERAL\n                                                                  PsiElement(int)('0')\n                                                                PsiElement(])(']')\n                                                              PsiElement([)('[')\n                                                              LITERAL\n                                                                PsiElement(int)('0')\n                                                              PsiElement(])(']')\n                                                            PsiElement(*)('*')\n                                                            INDEX_OR_SLICE_EXPR\n                                                              INDEX_OR_SLICE_EXPR\n                                                                REFERENCE_EXPRESSION\n                                                                  PsiElement(identifier)('m')\n                                                                PsiElement([)('[')\n                                                                LITERAL\n                                                                  PsiElement(int)('1')\n                                                                PsiElement(])(']')\n                                                              PsiElement([)('[')\n                                                              LITERAL\n                                                                PsiElement(int)('1')\n                                                              PsiElement(])(']')\n                                                          PsiElement(*)('*')\n                                                          INDEX_OR_SLICE_EXPR\n                                                            INDEX_OR_SLICE_EXPR\n                                                              REFERENCE_EXPRESSION\n                                                                PsiElement(identifier)('m')\n                                                              PsiElement([)('[')\n                                                              LITERAL\n                                                                PsiElement(int)('2')\n                                                              PsiElement(])(']')\n                                                            PsiElement([)('[')\n                                                            LITERAL\n                                                              PsiElement(int)('3')\n                                                            PsiElement(])(']')\n                                                        PsiElement(*)('*')\n                                                        INDEX_OR_SLICE_EXPR\n                                                          INDEX_OR_SLICE_EXPR\n                                                            REFERENCE_EXPRESSION\n                                                              PsiElement(identifier)('m')\n                                                            PsiElement([)('[')\n                                                            LITERAL\n                                                              PsiElement(int)('3')\n                                                            PsiElement(])(']')\n                                                          PsiElement([)('[')\n                                                          LITERAL\n                                                            PsiElement(int)('2')\n                                                          PsiElement(])(']')\n                                                    PsiElement(-)('-')\n                                                    MUL_EXPR\n                                                      MUL_EXPR\n                                                        MUL_EXPR\n                                                          INDEX_OR_SLICE_EXPR\n                                                            INDEX_OR_SLICE_EXPR\n                                                              REFERENCE_EXPRESSION\n                                                                PsiElement(identifier)('m')\n                                                              PsiElement([)('[')\n                                                              LITERAL\n                                                                PsiElement(int)('0')\n                                                              PsiElement(])(']')\n                                                            PsiElement([)('[')\n                                                            LITERAL\n                                                              PsiElement(int)('0')\n                                                            PsiElement(])(']')\n                                                          PsiElement(*)('*')\n                                                          INDEX_OR_SLICE_EXPR\n                                                            INDEX_OR_SLICE_EXPR\n                                                              REFERENCE_EXPRESSION\n                                                                PsiElement(identifier)('m')\n                                                              PsiElement([)('[')\n                                                              LITERAL\n                                                                PsiElement(int)('1')\n                                                              PsiElement(])(']')\n                                                            PsiElement([)('[')\n                                                            LITERAL\n                                                              PsiElement(int)('2')\n                                                            PsiElement(])(']')\n                                                        PsiElement(*)('*')\n                                                        INDEX_OR_SLICE_EXPR\n                                                          INDEX_OR_SLICE_EXPR\n                                                            REFERENCE_EXPRESSION\n                                                              PsiElement(identifier)('m')\n                                                            PsiElement([)('[')\n                                                            LITERAL\n                                                              PsiElement(int)('2')\n                                                            PsiElement(])(']')\n                                                          PsiElement([)('[')\n                                                          LITERAL\n                                                            PsiElement(int)('1')\n                                                          PsiElement(])(']')\n                                                      PsiElement(*)('*')\n                                                      INDEX_OR_SLICE_EXPR\n                                                        INDEX_OR_SLICE_EXPR\n                                                          REFERENCE_EXPRESSION\n                                                            PsiElement(identifier)('m')\n                                                          PsiElement([)('[')\n                                                          LITERAL\n                                                            PsiElement(int)('3')\n                                                          PsiElement(])(']')\n                                                        PsiElement([)('[')\n                                                        LITERAL\n                                                          PsiElement(int)('3')\n                                                        PsiElement(])(']')\n                                                  PsiElement(+)('+')\n                                                  MUL_EXPR\n                                                    MUL_EXPR\n                                                      MUL_EXPR\n                                                        INDEX_OR_SLICE_EXPR\n                                                          INDEX_OR_SLICE_EXPR\n                                                            REFERENCE_EXPRESSION\n                                                              PsiElement(identifier)('m')\n                                                            PsiElement([)('[')\n                                                            LITERAL\n                                                              PsiElement(int)('0')\n                                                            PsiElement(])(']')\n                                                          PsiElement([)('[')\n                                                          LITERAL\n                                                            PsiElement(int)('0')\n                                                          PsiElement(])(']')\n                                                        PsiElement(*)('*')\n                                                        INDEX_OR_SLICE_EXPR\n                                                          INDEX_OR_SLICE_EXPR\n                                                            REFERENCE_EXPRESSION\n                                                              PsiElement(identifier)('m')\n                                                            PsiElement([)('[')\n                                                            LITERAL\n                                                              PsiElement(int)('1')\n                                                            PsiElement(])(']')\n                                                          PsiElement([)('[')\n                                                          LITERAL\n                                                            PsiElement(int)('2')\n                                                          PsiElement(])(']')\n                                                      PsiElement(*)('*')\n                                                      INDEX_OR_SLICE_EXPR\n                                                        INDEX_OR_SLICE_EXPR\n                                                          REFERENCE_EXPRESSION\n                                                            PsiElement(identifier)('m')\n                                                          PsiElement([)('[')\n                                                          LITERAL\n                                                            PsiElement(int)('2')\n                                                          PsiElement(])(']')\n                                                        PsiElement([)('[')\n                                                        LITERAL\n                                                          PsiElement(int)('3')\n                                                        PsiElement(])(']')\n                                                    PsiElement(*)('*')\n                                                    INDEX_OR_SLICE_EXPR\n                                                      INDEX_OR_SLICE_EXPR\n                                                        REFERENCE_EXPRESSION\n                                                          PsiElement(identifier)('m')\n                                                        PsiElement([)('[')\n                                                        LITERAL\n                                                          PsiElement(int)('3')\n                                                        PsiElement(])(']')\n                                                      PsiElement([)('[')\n                                                      LITERAL\n                                                        PsiElement(int)('1')\n                                                      PsiElement(])(']')\n                                                PsiElement(+)('+')\n                                                MUL_EXPR\n                                                  MUL_EXPR\n                                                    MUL_EXPR\n                                                      INDEX_OR_SLICE_EXPR\n                                                        INDEX_OR_SLICE_EXPR\n                                                          REFERENCE_EXPRESSION\n                                                            PsiElement(identifier)('m')\n                                                          PsiElement([)('[')\n                                                          LITERAL\n                                                            PsiElement(int)('0')\n                                                          PsiElement(])(']')\n                                                        PsiElement([)('[')\n                                                        LITERAL\n                                                          PsiElement(int)('0')\n                                                        PsiElement(])(']')\n                                                      PsiElement(*)('*')\n                                                      INDEX_OR_SLICE_EXPR\n                                                        INDEX_OR_SLICE_EXPR\n                                                          REFERENCE_EXPRESSION\n                                                            PsiElement(identifier)('m')\n                                                          PsiElement([)('[')\n                                                          LITERAL\n                                                            PsiElement(int)('1')\n                                                          PsiElement(])(']')\n                                                        PsiElement([)('[')\n                                                        LITERAL\n                                                          PsiElement(int)('3')\n                                                        PsiElement(])(']')\n                                                    PsiElement(*)('*')\n                                                    INDEX_OR_SLICE_EXPR\n                                                      INDEX_OR_SLICE_EXPR\n                                                        REFERENCE_EXPRESSION\n                                                          PsiElement(identifier)('m')\n                                                        PsiElement([)('[')\n                                                        LITERAL\n                                                          PsiElement(int)('2')\n                                                        PsiElement(])(']')\n                                                      PsiElement([)('[')\n                                                      LITERAL\n                                                        PsiElement(int)('1')\n                                                      PsiElement(])(']')\n                                                  PsiElement(*)('*')\n                                                  INDEX_OR_SLICE_EXPR\n                                                    INDEX_OR_SLICE_EXPR\n                                                      REFERENCE_EXPRESSION\n                                                        PsiElement(identifier)('m')\n                                                      PsiElement([)('[')\n                                                      LITERAL\n                                                        PsiElement(int)('3')\n                                                      PsiElement(])(']')\n                                                    PsiElement([)('[')\n                                                    LITERAL\n                                                      PsiElement(int)('2')\n                                                    PsiElement(])(']')\n                                              PsiElement(-)('-')\n                                              MUL_EXPR\n                                                MUL_EXPR\n                                                  MUL_EXPR\n                                                    INDEX_OR_SLICE_EXPR\n                                                      INDEX_OR_SLICE_EXPR\n                                                        REFERENCE_EXPRESSION\n                                                          PsiElement(identifier)('m')\n                                                        PsiElement([)('[')\n                                                        LITERAL\n                                                          PsiElement(int)('0')\n                                                        PsiElement(])(']')\n                                                      PsiElement([)('[')\n                                                      LITERAL\n                                                        PsiElement(int)('0')\n                                                      PsiElement(])(']')\n                                                    PsiElement(*)('*')\n                                                    INDEX_OR_SLICE_EXPR\n                                                      INDEX_OR_SLICE_EXPR\n                                                        REFERENCE_EXPRESSION\n                                                          PsiElement(identifier)('m')\n                                                        PsiElement([)('[')\n                                                        LITERAL\n                                                          PsiElement(int)('1')\n                                                        PsiElement(])(']')\n                                                      PsiElement([)('[')\n                                                      LITERAL\n                                                        PsiElement(int)('3')\n                                                      PsiElement(])(']')\n                                                  PsiElement(*)('*')\n                                                  INDEX_OR_SLICE_EXPR\n                                                    INDEX_OR_SLICE_EXPR\n                                                      REFERENCE_EXPRESSION\n                                                        PsiElement(identifier)('m')\n                                                      PsiElement([)('[')\n                                                      LITERAL\n                                                        PsiElement(int)('2')\n                                                      PsiElement(])(']')\n                                                    PsiElement([)('[')\n                                                    LITERAL\n                                                      PsiElement(int)('2')\n                                                    PsiElement(])(']')\n                                                PsiElement(*)('*')\n                                                INDEX_OR_SLICE_EXPR\n                                                  INDEX_OR_SLICE_EXPR\n                                                    REFERENCE_EXPRESSION\n                                                      PsiElement(identifier)('m')\n                                                    PsiElement([)('[')\n                                                    LITERAL\n                                                      PsiElement(int)('3')\n                                                    PsiElement(])(']')\n                                                  PsiElement([)('[')\n                                                  LITERAL\n                                                    PsiElement(int)('1')\n                                                  PsiElement(])(']')\n                                            PsiElement(-)('-')\n                                            MUL_EXPR\n                                              MUL_EXPR\n                                                MUL_EXPR\n                                                  INDEX_OR_SLICE_EXPR\n                                                    INDEX_OR_SLICE_EXPR\n                                                      REFERENCE_EXPRESSION\n                                                        PsiElement(identifier)('m')\n                                                      PsiElement([)('[')\n                                                      LITERAL\n                                                        PsiElement(int)('0')\n                                                      PsiElement(])(']')\n                                                    PsiElement([)('[')\n                                                    LITERAL\n                                                      PsiElement(int)('1')\n                                                    PsiElement(])(']')\n                                                  PsiElement(*)('*')\n                                                  INDEX_OR_SLICE_EXPR\n                                                    INDEX_OR_SLICE_EXPR\n                                                      REFERENCE_EXPRESSION\n                                                        PsiElement(identifier)('m')\n                                                      PsiElement([)('[')\n                                                      LITERAL\n                                                        PsiElement(int)('1')\n                                                      PsiElement(])(']')\n                                                    PsiElement([)('[')\n                                                    LITERAL\n                                                      PsiElement(int)('0')\n                                                    PsiElement(])(']')\n                                                PsiElement(*)('*')\n                                                INDEX_OR_SLICE_EXPR\n                                                  INDEX_OR_SLICE_EXPR\n                                                    REFERENCE_EXPRESSION\n                                                      PsiElement(identifier)('m')\n                                                    PsiElement([)('[')\n                                                    LITERAL\n                                                      PsiElement(int)('2')\n                                                    PsiElement(])(']')\n                                                  PsiElement([)('[')\n                                                  LITERAL\n                                                    PsiElement(int)('2')\n                                                  PsiElement(])(']')\n                                              PsiElement(*)('*')\n                                              INDEX_OR_SLICE_EXPR\n                                                INDEX_OR_SLICE_EXPR\n                                                  REFERENCE_EXPRESSION\n                                                    PsiElement(identifier)('m')\n                                                  PsiElement([)('[')\n                                                  LITERAL\n                                                    PsiElement(int)('3')\n                                                  PsiElement(])(']')\n                                                PsiElement([)('[')\n                                                LITERAL\n                                                  PsiElement(int)('3')\n                                                PsiElement(])(']')\n                                          PsiElement(+)('+')\n                                          MUL_EXPR\n                                            MUL_EXPR\n                                              MUL_EXPR\n                                                INDEX_OR_SLICE_EXPR\n                                                  INDEX_OR_SLICE_EXPR\n                                                    REFERENCE_EXPRESSION\n                                                      PsiElement(identifier)('m')\n                                                    PsiElement([)('[')\n                                                    LITERAL\n                                                      PsiElement(int)('0')\n                                                    PsiElement(])(']')\n                                                  PsiElement([)('[')\n                                                  LITERAL\n                                                    PsiElement(int)('1')\n                                                  PsiElement(])(']')\n                                                PsiElement(*)('*')\n                                                INDEX_OR_SLICE_EXPR\n                                                  INDEX_OR_SLICE_EXPR\n                                                    REFERENCE_EXPRESSION\n                                                      PsiElement(identifier)('m')\n                                                    PsiElement([)('[')\n                                                    LITERAL\n                                                      PsiElement(int)('1')\n                                                    PsiElement(])(']')\n                                                  PsiElement([)('[')\n                                                  LITERAL\n                                                    PsiElement(int)('0')\n                                                  PsiElement(])(']')\n                                              PsiElement(*)('*')\n                                              INDEX_OR_SLICE_EXPR\n                                                INDEX_OR_SLICE_EXPR\n                                                  REFERENCE_EXPRESSION\n                                                    PsiElement(identifier)('m')\n                                                  PsiElement([)('[')\n                                                  LITERAL\n                                                    PsiElement(int)('2')\n                                                  PsiElement(])(']')\n                                                PsiElement([)('[')\n                                                LITERAL\n                                                  PsiElement(int)('3')\n                                                PsiElement(])(']')\n                                            PsiElement(*)('*')\n                                            INDEX_OR_SLICE_EXPR\n                                              INDEX_OR_SLICE_EXPR\n                                                REFERENCE_EXPRESSION\n                                                  PsiElement(identifier)('m')\n                                                PsiElement([)('[')\n                                                LITERAL\n                                                  PsiElement(int)('3')\n                                                PsiElement(])(']')\n                                              PsiElement([)('[')\n                                              LITERAL\n                                                PsiElement(int)('2')\n                                              PsiElement(])(']')\n                                        PsiElement(+)('+')\n                                        MUL_EXPR\n                                          MUL_EXPR\n                                            MUL_EXPR\n                                              INDEX_OR_SLICE_EXPR\n                                                INDEX_OR_SLICE_EXPR\n                                                  REFERENCE_EXPRESSION\n                                                    PsiElement(identifier)('m')\n                                                  PsiElement([)('[')\n                                                  LITERAL\n                                                    PsiElement(int)('0')\n                                                  PsiElement(])(']')\n                                                PsiElement([)('[')\n                                                LITERAL\n                                                  PsiElement(int)('1')\n                                                PsiElement(])(']')\n                                              PsiElement(*)('*')\n                                              INDEX_OR_SLICE_EXPR\n                                                INDEX_OR_SLICE_EXPR\n                                                  REFERENCE_EXPRESSION\n                                                    PsiElement(identifier)('m')\n                                                  PsiElement([)('[')\n                                                  LITERAL\n                                                    PsiElement(int)('1')\n                                                  PsiElement(])(']')\n                                                PsiElement([)('[')\n                                                LITERAL\n                                                  PsiElement(int)('2')\n                                                PsiElement(])(']')\n                                            PsiElement(*)('*')\n                                            INDEX_OR_SLICE_EXPR\n                                              INDEX_OR_SLICE_EXPR\n                                                REFERENCE_EXPRESSION\n                                                  PsiElement(identifier)('m')\n                                                PsiElement([)('[')\n                                                LITERAL\n                                                  PsiElement(int)('2')\n                                                PsiElement(])(']')\n                                              PsiElement([)('[')\n                                              LITERAL\n                                                PsiElement(int)('0')\n                                              PsiElement(])(']')\n                                          PsiElement(*)('*')\n                                          INDEX_OR_SLICE_EXPR\n                                            INDEX_OR_SLICE_EXPR\n                                              REFERENCE_EXPRESSION\n                                                PsiElement(identifier)('m')\n                                              PsiElement([)('[')\n                                              LITERAL\n                                                PsiElement(int)('3')\n                                              PsiElement(])(']')\n                                            PsiElement([)('[')\n                                            LITERAL\n                                              PsiElement(int)('3')\n                                            PsiElement(])(']')\n                                      PsiElement(-)('-')\n                                      MUL_EXPR\n                                        MUL_EXPR\n                                          MUL_EXPR\n                                            INDEX_OR_SLICE_EXPR\n                                              INDEX_OR_SLICE_EXPR\n                                                REFERENCE_EXPRESSION\n                                                  PsiElement(identifier)('m')\n                                                PsiElement([)('[')\n                                                LITERAL\n                                                  PsiElement(int)('0')\n                                                PsiElement(])(']')\n                                              PsiElement([)('[')\n                                              LITERAL\n                                                PsiElement(int)('1')\n                                              PsiElement(])(']')\n                                            PsiElement(*)('*')\n                                            INDEX_OR_SLICE_EXPR\n                                              INDEX_OR_SLICE_EXPR\n                                                REFERENCE_EXPRESSION\n                                                  PsiElement(identifier)('m')\n                                                PsiElement([)('[')\n                                                LITERAL\n                                                  PsiElement(int)('1')\n                                                PsiElement(])(']')\n                                              PsiElement([)('[')\n                                              LITERAL\n                                                PsiElement(int)('2')\n                                              PsiElement(])(']')\n                                          PsiElement(*)('*')\n                                          INDEX_OR_SLICE_EXPR\n                                            INDEX_OR_SLICE_EXPR\n                                              REFERENCE_EXPRESSION\n                                                PsiElement(identifier)('m')\n                                              PsiElement([)('[')\n                                              LITERAL\n                                                PsiElement(int)('2')\n                                              PsiElement(])(']')\n                                            PsiElement([)('[')\n                                            LITERAL\n                                              PsiElement(int)('3')\n                                            PsiElement(])(']')\n                                        PsiElement(*)('*')\n                                        INDEX_OR_SLICE_EXPR\n                                          INDEX_OR_SLICE_EXPR\n                                            REFERENCE_EXPRESSION\n                                              PsiElement(identifier)('m')\n                                            PsiElement([)('[')\n                                            LITERAL\n                                              PsiElement(int)('3')\n                                            PsiElement(])(']')\n                                          PsiElement([)('[')\n                                          LITERAL\n                                            PsiElement(int)('0')\n                                          PsiElement(])(']')\n                                    PsiElement(-)('-')\n                                    MUL_EXPR\n                                      MUL_EXPR\n                                        MUL_EXPR\n                                          INDEX_OR_SLICE_EXPR\n                                            INDEX_OR_SLICE_EXPR\n                                              REFERENCE_EXPRESSION\n                                                PsiElement(identifier)('m')\n                                              PsiElement([)('[')\n                                              LITERAL\n                                                PsiElement(int)('0')\n                                              PsiElement(])(']')\n                                            PsiElement([)('[')\n                                            LITERAL\n                                              PsiElement(int)('1')\n                                            PsiElement(])(']')\n                                          PsiElement(*)('*')\n                                          INDEX_OR_SLICE_EXPR\n                                            INDEX_OR_SLICE_EXPR\n                                              REFERENCE_EXPRESSION\n                                                PsiElement(identifier)('m')\n                                              PsiElement([)('[')\n                                              LITERAL\n                                                PsiElement(int)('1')\n                                              PsiElement(])(']')\n                                            PsiElement([)('[')\n                                            LITERAL\n                                              PsiElement(int)('3')\n                                            PsiElement(])(']')\n                                        PsiElement(*)('*')\n                                        INDEX_OR_SLICE_EXPR\n                                          INDEX_OR_SLICE_EXPR\n                                            REFERENCE_EXPRESSION\n                                              PsiElement(identifier)('m')\n                                            PsiElement([)('[')\n                                            LITERAL\n                                              PsiElement(int)('2')\n                                            PsiElement(])(']')\n                                          PsiElement([)('[')\n                                          LITERAL\n                                            PsiElement(int)('0')\n                                          PsiElement(])(']')\n                                      PsiElement(*)('*')\n                                      INDEX_OR_SLICE_EXPR\n                                        INDEX_OR_SLICE_EXPR\n                                          REFERENCE_EXPRESSION\n                                            PsiElement(identifier)('m')\n                                          PsiElement([)('[')\n                                          LITERAL\n                                            PsiElement(int)('3')\n                                          PsiElement(])(']')\n                                        PsiElement([)('[')\n                                        LITERAL\n                                          PsiElement(int)('2')\n                                        PsiElement(])(']')\n                                  PsiElement(+)('+')\n                                  MUL_EXPR\n                                    MUL_EXPR\n                                      MUL_EXPR\n                                        INDEX_OR_SLICE_EXPR\n                                          INDEX_OR_SLICE_EXPR\n                                            REFERENCE_EXPRESSION\n                                              PsiElement(identifier)('m')\n                                            PsiElement([)('[')\n                                            LITERAL\n                                              PsiElement(int)('0')\n                                            PsiElement(])(']')\n                                          PsiElement([)('[')\n                                          LITERAL\n                                            PsiElement(int)('1')\n                                          PsiElement(])(']')\n                                        PsiElement(*)('*')\n                                        INDEX_OR_SLICE_EXPR\n                                          INDEX_OR_SLICE_EXPR\n                                            REFERENCE_EXPRESSION\n                                              PsiElement(identifier)('m')\n                                            PsiElement([)('[')\n                                            LITERAL\n                                              PsiElement(int)('1')\n                                            PsiElement(])(']')\n                                          PsiElement([)('[')\n                                          LITERAL\n                                            PsiElement(int)('3')\n                                          PsiElement(])(']')\n                                      PsiElement(*)('*')\n                                      INDEX_OR_SLICE_EXPR\n                                        INDEX_OR_SLICE_EXPR\n                                          REFERENCE_EXPRESSION\n                                            PsiElement(identifier)('m')\n                                          PsiElement([)('[')\n                                          LITERAL\n                                            PsiElement(int)('2')\n                                          PsiElement(])(']')\n                                        PsiElement([)('[')\n                                        LITERAL\n                                          PsiElement(int)('2')\n                                        PsiElement(])(']')\n                                    PsiElement(*)('*')\n                                    INDEX_OR_SLICE_EXPR\n                                      INDEX_OR_SLICE_EXPR\n                                        REFERENCE_EXPRESSION\n                                          PsiElement(identifier)('m')\n                                        PsiElement([)('[')\n                                        LITERAL\n                                          PsiElement(int)('3')\n                                        PsiElement(])(']')\n                                      PsiElement([)('[')\n                                      LITERAL\n                                        PsiElement(int)('0')\n                                      PsiElement(])(']')\n                                PsiElement(+)('+')\n                                MUL_EXPR\n                                  MUL_EXPR\n                                    MUL_EXPR\n                                      INDEX_OR_SLICE_EXPR\n                                        INDEX_OR_SLICE_EXPR\n                                          REFERENCE_EXPRESSION\n                                            PsiElement(identifier)('m')\n                                          PsiElement([)('[')\n                                          LITERAL\n                                            PsiElement(int)('0')\n                                          PsiElement(])(']')\n                                        PsiElement([)('[')\n                                        LITERAL\n                                          PsiElement(int)('2')\n                                        PsiElement(])(']')\n                                      PsiElement(*)('*')\n                                      INDEX_OR_SLICE_EXPR\n                                        INDEX_OR_SLICE_EXPR\n                                          REFERENCE_EXPRESSION\n                                            PsiElement(identifier)('m')\n                                          PsiElement([)('[')\n                                          LITERAL\n                                            PsiElement(int)('1')\n                                          PsiElement(])(']')\n                                        PsiElement([)('[')\n                                        LITERAL\n                                          PsiElement(int)('0')\n                                        PsiElement(])(']')\n                                    PsiElement(*)('*')\n                                    INDEX_OR_SLICE_EXPR\n                                      INDEX_OR_SLICE_EXPR\n                                        REFERENCE_EXPRESSION\n                                          PsiElement(identifier)('m')\n                                        PsiElement([)('[')\n                                        LITERAL\n                                          PsiElement(int)('2')\n                                        PsiElement(])(']')\n                                      PsiElement([)('[')\n                                      LITERAL\n                                        PsiElement(int)('1')\n                                      PsiElement(])(']')\n                                  PsiElement(*)('*')\n                                  INDEX_OR_SLICE_EXPR\n                                    INDEX_OR_SLICE_EXPR\n                                      REFERENCE_EXPRESSION\n                                        PsiElement(identifier)('m')\n                                      PsiElement([)('[')\n                                      LITERAL\n                                        PsiElement(int)('3')\n                                      PsiElement(])(']')\n                                    PsiElement([)('[')\n                                    LITERAL\n                                      PsiElement(int)('3')\n                                    PsiElement(])(']')\n                              PsiElement(-)('-')\n                              MUL_EXPR\n                                MUL_EXPR\n                                  MUL_EXPR\n                                    INDEX_OR_SLICE_EXPR\n                                      INDEX_OR_SLICE_EXPR\n                                        REFERENCE_EXPRESSION\n                                          PsiElement(identifier)('m')\n                                        PsiElement([)('[')\n                                        LITERAL\n                                          PsiElement(int)('0')\n                                        PsiElement(])(']')\n                                      PsiElement([)('[')\n                                      LITERAL\n                                        PsiElement(int)('2')\n                                      PsiElement(])(']')\n                                    PsiElement(*)('*')\n                                    INDEX_OR_SLICE_EXPR\n                                      INDEX_OR_SLICE_EXPR\n                                        REFERENCE_EXPRESSION\n                                          PsiElement(identifier)('m')\n                                        PsiElement([)('[')\n                                        LITERAL\n                                          PsiElement(int)('1')\n                                        PsiElement(])(']')\n                                      PsiElement([)('[')\n                                      LITERAL\n                                        PsiElement(int)('0')\n                                      PsiElement(])(']')\n                                  PsiElement(*)('*')\n                                  INDEX_OR_SLICE_EXPR\n                                    INDEX_OR_SLICE_EXPR\n                                      REFERENCE_EXPRESSION\n                                        PsiElement(identifier)('m')\n                                      PsiElement([)('[')\n                                      LITERAL\n                                        PsiElement(int)('2')\n                                      PsiElement(])(']')\n                                    PsiElement([)('[')\n                                    LITERAL\n                                      PsiElement(int)('3')\n                                    PsiElement(])(']')\n                                PsiElement(*)('*')\n                                INDEX_OR_SLICE_EXPR\n                                  INDEX_OR_SLICE_EXPR\n                                    REFERENCE_EXPRESSION\n                                      PsiElement(identifier)('m')\n                                    PsiElement([)('[')\n                                    LITERAL\n                                      PsiElement(int)('3')\n                                    PsiElement(])(']')\n                                  PsiElement([)('[')\n                                  LITERAL\n                                    PsiElement(int)('1')\n                                  PsiElement(])(']')\n                            PsiElement(-)('-')\n                            MUL_EXPR\n                              MUL_EXPR\n                                MUL_EXPR\n                                  INDEX_OR_SLICE_EXPR\n                                    INDEX_OR_SLICE_EXPR\n                                      REFERENCE_EXPRESSION\n                                        PsiElement(identifier)('m')\n                                      PsiElement([)('[')\n                                      LITERAL\n                                        PsiElement(int)('0')\n                                      PsiElement(])(']')\n                                    PsiElement([)('[')\n                                    LITERAL\n                                      PsiElement(int)('2')\n                                    PsiElement(])(']')\n                                  PsiElement(*)('*')\n                                  INDEX_OR_SLICE_EXPR\n                                    INDEX_OR_SLICE_EXPR\n                                      REFERENCE_EXPRESSION\n                                        PsiElement(identifier)('m')\n                                      PsiElement([)('[')\n                                      LITERAL\n                                        PsiElement(int)('1')\n                                      PsiElement(])(']')\n                                    PsiElement([)('[')\n                                    LITERAL\n                                      PsiElement(int)('1')\n                                    PsiElement(])(']')\n                                PsiElement(*)('*')\n                                INDEX_OR_SLICE_EXPR\n                                  INDEX_OR_SLICE_EXPR\n                                    REFERENCE_EXPRESSION\n                                      PsiElement(identifier)('m')\n                                    PsiElement([)('[')\n                                    LITERAL\n                                      PsiElement(int)('2')\n                                    PsiElement(])(']')\n                                  PsiElement([)('[')\n                                  LITERAL\n                                    PsiElement(int)('0')\n                                  PsiElement(])(']')\n                              PsiElement(*)('*')\n                              INDEX_OR_SLICE_EXPR\n                                INDEX_OR_SLICE_EXPR\n                                  REFERENCE_EXPRESSION\n                                    PsiElement(identifier)('m')\n                                  PsiElement([)('[')\n                                  LITERAL\n                                    PsiElement(int)('3')\n                                  PsiElement(])(']')\n                                PsiElement([)('[')\n                                LITERAL\n                                  PsiElement(int)('3')\n                                PsiElement(])(']')\n                          PsiElement(+)('+')\n                          MUL_EXPR\n                            MUL_EXPR\n                              MUL_EXPR\n                                INDEX_OR_SLICE_EXPR\n                                  INDEX_OR_SLICE_EXPR\n                                    REFERENCE_EXPRESSION\n                                      PsiElement(identifier)('m')\n                                    PsiElement([)('[')\n                                    LITERAL\n                                      PsiElement(int)('0')\n                                    PsiElement(])(']')\n                                  PsiElement([)('[')\n                                  LITERAL\n                                    PsiElement(int)('2')\n                                  PsiElement(])(']')\n                                PsiElement(*)('*')\n                                INDEX_OR_SLICE_EXPR\n                                  INDEX_OR_SLICE_EXPR\n                                    REFERENCE_EXPRESSION\n                                      PsiElement(identifier)('m')\n                                    PsiElement([)('[')\n                                    LITERAL\n                                      PsiElement(int)('1')\n                                    PsiElement(])(']')\n                                  PsiElement([)('[')\n                                  LITERAL\n                                    PsiElement(int)('1')\n                                  PsiElement(])(']')\n                              PsiElement(*)('*')\n                              INDEX_OR_SLICE_EXPR\n                                INDEX_OR_SLICE_EXPR\n                                  REFERENCE_EXPRESSION\n                                    PsiElement(identifier)('m')\n                                  PsiElement([)('[')\n                                  LITERAL\n                                    PsiElement(int)('2')\n                                  PsiElement(])(']')\n                                PsiElement([)('[')\n                                LITERAL\n                                  PsiElement(int)('3')\n                                PsiElement(])(']')\n                            PsiElement(*)('*')\n                            INDEX_OR_SLICE_EXPR\n                              INDEX_OR_SLICE_EXPR\n                                REFERENCE_EXPRESSION\n                                  PsiElement(identifier)('m')\n                                PsiElement([)('[')\n                                LITERAL\n                                  PsiElement(int)('3')\n                                PsiElement(])(']')\n                              PsiElement([)('[')\n                              LITERAL\n                                PsiElement(int)('0')\n                              PsiElement(])(']')\n                        PsiElement(+)('+')\n                        MUL_EXPR\n                          MUL_EXPR\n                            MUL_EXPR\n                              INDEX_OR_SLICE_EXPR\n                                INDEX_OR_SLICE_EXPR\n                                  REFERENCE_EXPRESSION\n                                    PsiElement(identifier)('m')\n                                  PsiElement([)('[')\n                                  LITERAL\n                                    PsiElement(int)('0')\n                                  PsiElement(])(']')\n                                PsiElement([)('[')\n                                LITERAL\n                                  PsiElement(int)('2')\n                                PsiElement(])(']')\n                              PsiElement(*)('*')\n                              INDEX_OR_SLICE_EXPR\n                                INDEX_OR_SLICE_EXPR\n                                  REFERENCE_EXPRESSION\n                                    PsiElement(identifier)('m')\n                                  PsiElement([)('[')\n                                  LITERAL\n                                    PsiElement(int)('1')\n                                  PsiElement(])(']')\n                                PsiElement([)('[')\n                                LITERAL\n                                  PsiElement(int)('3')\n                                PsiElement(])(']')\n                            PsiElement(*)('*')\n                            INDEX_OR_SLICE_EXPR\n                              INDEX_OR_SLICE_EXPR\n                                REFERENCE_EXPRESSION\n                                  PsiElement(identifier)('m')\n                                PsiElement([)('[')\n                                LITERAL\n                                  PsiElement(int)('2')\n                                PsiElement(])(']')\n                              PsiElement([)('[')\n                              LITERAL\n                                PsiElement(int)('0')\n                              PsiElement(])(']')\n                          PsiElement(*)('*')\n                          INDEX_OR_SLICE_EXPR\n                            INDEX_OR_SLICE_EXPR\n                              REFERENCE_EXPRESSION\n                                PsiElement(identifier)('m')\n                              PsiElement([)('[')\n                              LITERAL\n                                PsiElement(int)('3')\n                              PsiElement(])(']')\n                            PsiElement([)('[')\n                            LITERAL\n                              PsiElement(int)('1')\n                            PsiElement(])(']')\n                      PsiElement(-)('-')\n                      MUL_EXPR\n                        MUL_EXPR\n                          MUL_EXPR\n                            INDEX_OR_SLICE_EXPR\n                              INDEX_OR_SLICE_EXPR\n                                REFERENCE_EXPRESSION\n                                  PsiElement(identifier)('m')\n                                PsiElement([)('[')\n                                LITERAL\n                                  PsiElement(int)('0')\n                                PsiElement(])(']')\n                              PsiElement([)('[')\n                              LITERAL\n                                PsiElement(int)('2')\n                              PsiElement(])(']')\n                            PsiElement(*)('*')\n                            INDEX_OR_SLICE_EXPR\n                              INDEX_OR_SLICE_EXPR\n                                REFERENCE_EXPRESSION\n                                  PsiElement(identifier)('m')\n                                PsiElement([)('[')\n                                LITERAL\n                                  PsiElement(int)('1')\n                                PsiElement(])(']')\n                              PsiElement([)('[')\n                              LITERAL\n                                PsiElement(int)('3')\n                              PsiElement(])(']')\n                          PsiElement(*)('*')\n                          INDEX_OR_SLICE_EXPR\n                            INDEX_OR_SLICE_EXPR\n                              REFERENCE_EXPRESSION\n                                PsiElement(identifier)('m')\n                              PsiElement([)('[')\n                              LITERAL\n                                PsiElement(int)('2')\n                              PsiElement(])(']')\n                            PsiElement([)('[')\n                            LITERAL\n                              PsiElement(int)('1')\n                            PsiElement(])(']')\n                        PsiElement(*)('*')\n                        INDEX_OR_SLICE_EXPR\n                          INDEX_OR_SLICE_EXPR\n                            REFERENCE_EXPRESSION\n                              PsiElement(identifier)('m')\n                            PsiElement([)('[')\n                            LITERAL\n                              PsiElement(int)('3')\n                            PsiElement(])(']')\n                          PsiElement([)('[')\n                          LITERAL\n                            PsiElement(int)('0')\n                          PsiElement(])(']')\n                    PsiElement(-)('-')\n                    MUL_EXPR\n                      MUL_EXPR\n                        MUL_EXPR\n                          INDEX_OR_SLICE_EXPR\n                            INDEX_OR_SLICE_EXPR\n                              REFERENCE_EXPRESSION\n                                PsiElement(identifier)('m')\n                              PsiElement([)('[')\n                              LITERAL\n                                PsiElement(int)('0')\n                              PsiElement(])(']')\n                            PsiElement([)('[')\n                            LITERAL\n                              PsiElement(int)('3')\n                            PsiElement(])(']')\n                          PsiElement(*)('*')\n                          INDEX_OR_SLICE_EXPR\n                            INDEX_OR_SLICE_EXPR\n                              REFERENCE_EXPRESSION\n                                PsiElement(identifier)('m')\n                              PsiElement([)('[')\n                              LITERAL\n                                PsiElement(int)('1')\n                              PsiElement(])(']')\n                            PsiElement([)('[')\n                            LITERAL\n                              PsiElement(int)('0')\n                            PsiElement(])(']')\n                        PsiElement(*)('*')\n                        INDEX_OR_SLICE_EXPR\n                          INDEX_OR_SLICE_EXPR\n                            REFERENCE_EXPRESSION\n                              PsiElement(identifier)('m')\n                            PsiElement([)('[')\n                            LITERAL\n                              PsiElement(int)('2')\n                            PsiElement(])(']')\n                          PsiElement([)('[')\n                          LITERAL\n                            PsiElement(int)('1')\n                          PsiElement(])(']')\n                      PsiElement(*)('*')\n                      INDEX_OR_SLICE_EXPR\n                        INDEX_OR_SLICE_EXPR\n                          REFERENCE_EXPRESSION\n                            PsiElement(identifier)('m')\n                          PsiElement([)('[')\n                          LITERAL\n                            PsiElement(int)('3')\n                          PsiElement(])(']')\n                        PsiElement([)('[')\n                        LITERAL\n                          PsiElement(int)('2')\n                        PsiElement(])(']')\n                  PsiElement(+)('+')\n                  MUL_EXPR\n                    MUL_EXPR\n                      MUL_EXPR\n                        INDEX_OR_SLICE_EXPR\n                          INDEX_OR_SLICE_EXPR\n                            REFERENCE_EXPRESSION\n                              PsiElement(identifier)('m')\n                            PsiElement([)('[')\n                            LITERAL\n                              PsiElement(int)('0')\n                            PsiElement(])(']')\n                          PsiElement([)('[')\n                          LITERAL\n                            PsiElement(int)('3')\n                          PsiElement(])(']')\n                        PsiElement(*)('*')\n                        INDEX_OR_SLICE_EXPR\n                          INDEX_OR_SLICE_EXPR\n                            REFERENCE_EXPRESSION\n                              PsiElement(identifier)('m')\n                            PsiElement([)('[')\n                            LITERAL\n                              PsiElement(int)('1')\n                            PsiElement(])(']')\n                          PsiElement([)('[')\n                          LITERAL\n                            PsiElement(int)('0')\n                          PsiElement(])(']')\n                      PsiElement(*)('*')\n                      INDEX_OR_SLICE_EXPR\n                        INDEX_OR_SLICE_EXPR\n                          REFERENCE_EXPRESSION\n                            PsiElement(identifier)('m')\n                          PsiElement([)('[')\n                          LITERAL\n                            PsiElement(int)('2')\n                          PsiElement(])(']')\n                        PsiElement([)('[')\n                        LITERAL\n                          PsiElement(int)('2')\n                        PsiElement(])(']')\n                    PsiElement(*)('*')\n                    INDEX_OR_SLICE_EXPR\n                      INDEX_OR_SLICE_EXPR\n                        REFERENCE_EXPRESSION\n                          PsiElement(identifier)('m')\n                        PsiElement([)('[')\n                        LITERAL\n                          PsiElement(int)('3')\n                        PsiElement(])(']')\n                      PsiElement([)('[')\n                      LITERAL\n                        PsiElement(int)('1')\n                      PsiElement(])(']')\n                PsiElement(+)('+')\n                MUL_EXPR\n                  MUL_EXPR\n                    MUL_EXPR\n                      INDEX_OR_SLICE_EXPR\n                        INDEX_OR_SLICE_EXPR\n                          REFERENCE_EXPRESSION\n                            PsiElement(identifier)('m')\n                          PsiElement([)('[')\n                          LITERAL\n                            PsiElement(int)('0')\n                          PsiElement(])(']')\n                        PsiElement([)('[')\n                        LITERAL\n                          PsiElement(int)('3')\n                        PsiElement(])(']')\n                      PsiElement(*)('*')\n                      INDEX_OR_SLICE_EXPR\n                        INDEX_OR_SLICE_EXPR\n                          REFERENCE_EXPRESSION\n                            PsiElement(identifier)('m')\n                          PsiElement([)('[')\n                          LITERAL\n                            PsiElement(int)('1')\n                          PsiElement(])(']')\n                        PsiElement([)('[')\n                        LITERAL\n                          PsiElement(int)('1')\n                        PsiElement(])(']')\n                    PsiElement(*)('*')\n                    INDEX_OR_SLICE_EXPR\n                      INDEX_OR_SLICE_EXPR\n                        REFERENCE_EXPRESSION\n                          PsiElement(identifier)('m')\n                        PsiElement([)('[')\n                        LITERAL\n                          PsiElement(int)('2')\n                        PsiElement(])(']')\n                      PsiElement([)('[')\n                      LITERAL\n                        PsiElement(int)('0')\n                      PsiElement(])(']')\n                  PsiElement(*)('*')\n                  INDEX_OR_SLICE_EXPR\n                    INDEX_OR_SLICE_EXPR\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('m')\n                      PsiElement([)('[')\n                      LITERAL\n                        PsiElement(int)('3')\n                      PsiElement(])(']')\n                    PsiElement([)('[')\n                    LITERAL\n                      PsiElement(int)('2')\n                    PsiElement(])(']')\n              PsiElement(-)('-')\n              MUL_EXPR\n                MUL_EXPR\n                  MUL_EXPR\n                    INDEX_OR_SLICE_EXPR\n                      INDEX_OR_SLICE_EXPR\n                        REFERENCE_EXPRESSION\n                          PsiElement(identifier)('m')\n                        PsiElement([)('[')\n                        LITERAL\n                          PsiElement(int)('0')\n                        PsiElement(])(']')\n                      PsiElement([)('[')\n                      LITERAL\n                        PsiElement(int)('3')\n                      PsiElement(])(']')\n                    PsiElement(*)('*')\n                    INDEX_OR_SLICE_EXPR\n                      INDEX_OR_SLICE_EXPR\n                        REFERENCE_EXPRESSION\n                          PsiElement(identifier)('m')\n                        PsiElement([)('[')\n                        LITERAL\n                          PsiElement(int)('1')\n                        PsiElement(])(']')\n                      PsiElement([)('[')\n                      LITERAL\n                        PsiElement(int)('1')\n                      PsiElement(])(']')\n                  PsiElement(*)('*')\n                  INDEX_OR_SLICE_EXPR\n                    INDEX_OR_SLICE_EXPR\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('m')\n                      PsiElement([)('[')\n                      LITERAL\n                        PsiElement(int)('2')\n                      PsiElement(])(']')\n                    PsiElement([)('[')\n                    LITERAL\n                      PsiElement(int)('2')\n                    PsiElement(])(']')\n                PsiElement(*)('*')\n                INDEX_OR_SLICE_EXPR\n                  INDEX_OR_SLICE_EXPR\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('m')\n                    PsiElement([)('[')\n                    LITERAL\n                      PsiElement(int)('3')\n                    PsiElement(])(']')\n                  PsiElement([)('[')\n                  LITERAL\n                    PsiElement(int)('0')\n                  PsiElement(])(']')\n            PsiElement(-)('-')\n            MUL_EXPR\n              MUL_EXPR\n                MUL_EXPR\n                  INDEX_OR_SLICE_EXPR\n                    INDEX_OR_SLICE_EXPR\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('m')\n                      PsiElement([)('[')\n                      LITERAL\n                        PsiElement(int)('0')\n                      PsiElement(])(']')\n                    PsiElement([)('[')\n                    LITERAL\n                      PsiElement(int)('3')\n                    PsiElement(])(']')\n                  PsiElement(*)('*')\n                  INDEX_OR_SLICE_EXPR\n                    INDEX_OR_SLICE_EXPR\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('m')\n                      PsiElement([)('[')\n                      LITERAL\n                        PsiElement(int)('1')\n                      PsiElement(])(']')\n                    PsiElement([)('[')\n                    LITERAL\n                      PsiElement(int)('2')\n                    PsiElement(])(']')\n                PsiElement(*)('*')\n                INDEX_OR_SLICE_EXPR\n                  INDEX_OR_SLICE_EXPR\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('m')\n                    PsiElement([)('[')\n                    LITERAL\n                      PsiElement(int)('2')\n                    PsiElement(])(']')\n                  PsiElement([)('[')\n                  LITERAL\n                    PsiElement(int)('0')\n                  PsiElement(])(']')\n              PsiElement(*)('*')\n              INDEX_OR_SLICE_EXPR\n                INDEX_OR_SLICE_EXPR\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('m')\n                  PsiElement([)('[')\n                  LITERAL\n                    PsiElement(int)('3')\n                  PsiElement(])(']')\n                PsiElement([)('[')\n                LITERAL\n                  PsiElement(int)('1')\n                PsiElement(])(']')\n          PsiElement(+)('+')\n          MUL_EXPR\n            MUL_EXPR\n              MUL_EXPR\n                INDEX_OR_SLICE_EXPR\n                  INDEX_OR_SLICE_EXPR\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('m')\n                    PsiElement([)('[')\n                    LITERAL\n                      PsiElement(int)('0')\n                    PsiElement(])(']')\n                  PsiElement([)('[')\n                  LITERAL\n                    PsiElement(int)('3')\n                  PsiElement(])(']')\n                PsiElement(*)('*')\n                INDEX_OR_SLICE_EXPR\n                  INDEX_OR_SLICE_EXPR\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('m')\n                    PsiElement([)('[')\n                    LITERAL\n                      PsiElement(int)('1')\n                    PsiElement(])(']')\n                  PsiElement([)('[')\n                  LITERAL\n                    PsiElement(int)('2')\n                  PsiElement(])(']')\n              PsiElement(*)('*')\n              INDEX_OR_SLICE_EXPR\n                INDEX_OR_SLICE_EXPR\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('m')\n                  PsiElement([)('[')\n                  LITERAL\n                    PsiElement(int)('2')\n                  PsiElement(])(']')\n                PsiElement([)('[')\n                LITERAL\n                  PsiElement(int)('1')\n                PsiElement(])(']')\n            PsiElement(*)('*')\n            INDEX_OR_SLICE_EXPR\n              INDEX_OR_SLICE_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('m')\n                PsiElement([)('[')\n                LITERAL\n                  PsiElement(int)('3')\n                PsiElement(])(']')\n              PsiElement([)('[')\n              LITERAL\n                PsiElement(int)('0')\n              PsiElement(])(']')\n      PsiElement(})('}')\n  PsiComment(GO_LINE_COMMENT)('// Compute the determinant of a 4x4-matrix by the sum')\n  PsiComment(GO_LINE_COMMENT)('// over all index permutations.')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('determinantByte')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('m')\n          ARRAY_OR_SLICE_TYPE\n            PsiElement([)('[')\n            LITERAL\n              PsiElement(int)('4')\n            PsiElement(])(']')\n            ARRAY_OR_SLICE_TYPE\n              PsiElement([)('[')\n              LITERAL\n                PsiElement(int)('4')\n              PsiElement(])(']')\n              TYPE\n                TYPE_REFERENCE_EXPRESSION\n                  PsiElement(identifier)('byte')\n        PsiElement())(')')\n      RESULT\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('byte')\n    BLOCK\n      PsiElement({)('{')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n        ADD_EXPR\n          ADD_EXPR\n            ADD_EXPR\n              ADD_EXPR\n                ADD_EXPR\n                  ADD_EXPR\n                    ADD_EXPR\n                      ADD_EXPR\n                        ADD_EXPR\n                          ADD_EXPR\n                            ADD_EXPR\n                              ADD_EXPR\n                                ADD_EXPR\n                                  ADD_EXPR\n                                    ADD_EXPR\n                                      ADD_EXPR\n                                        ADD_EXPR\n                                          ADD_EXPR\n                                            ADD_EXPR\n                                              ADD_EXPR\n                                                ADD_EXPR\n                                                  ADD_EXPR\n                                                    ADD_EXPR\n                                                      MUL_EXPR\n                                                        MUL_EXPR\n                                                          MUL_EXPR\n                                                            INDEX_OR_SLICE_EXPR\n                                                              INDEX_OR_SLICE_EXPR\n                                                                REFERENCE_EXPRESSION\n                                                                  PsiElement(identifier)('m')\n                                                                PsiElement([)('[')\n                                                                LITERAL\n                                                                  PsiElement(int)('0')\n                                                                PsiElement(])(']')\n                                                              PsiElement([)('[')\n                                                              LITERAL\n                                                                PsiElement(int)('0')\n                                                              PsiElement(])(']')\n                                                            PsiElement(*)('*')\n                                                            INDEX_OR_SLICE_EXPR\n                                                              INDEX_OR_SLICE_EXPR\n                                                                REFERENCE_EXPRESSION\n                                                                  PsiElement(identifier)('m')\n                                                                PsiElement([)('[')\n                                                                LITERAL\n                                                                  PsiElement(int)('1')\n                                                                PsiElement(])(']')\n                                                              PsiElement([)('[')\n                                                              LITERAL\n                                                                PsiElement(int)('1')\n                                                              PsiElement(])(']')\n                                                          PsiElement(*)('*')\n                                                          INDEX_OR_SLICE_EXPR\n                                                            INDEX_OR_SLICE_EXPR\n                                                              REFERENCE_EXPRESSION\n                                                                PsiElement(identifier)('m')\n                                                              PsiElement([)('[')\n                                                              LITERAL\n                                                                PsiElement(int)('2')\n                                                              PsiElement(])(']')\n                                                            PsiElement([)('[')\n                                                            LITERAL\n                                                              PsiElement(int)('2')\n                                                            PsiElement(])(']')\n                                                        PsiElement(*)('*')\n                                                        INDEX_OR_SLICE_EXPR\n                                                          INDEX_OR_SLICE_EXPR\n                                                            REFERENCE_EXPRESSION\n                                                              PsiElement(identifier)('m')\n                                                            PsiElement([)('[')\n                                                            LITERAL\n                                                              PsiElement(int)('3')\n                                                            PsiElement(])(']')\n                                                          PsiElement([)('[')\n                                                          LITERAL\n                                                            PsiElement(int)('3')\n                                                          PsiElement(])(']')\n                                                      PsiElement(-)('-')\n                                                      MUL_EXPR\n                                                        MUL_EXPR\n                                                          MUL_EXPR\n                                                            INDEX_OR_SLICE_EXPR\n                                                              INDEX_OR_SLICE_EXPR\n                                                                REFERENCE_EXPRESSION\n                                                                  PsiElement(identifier)('m')\n                                                                PsiElement([)('[')\n                                                                LITERAL\n                                                                  PsiElement(int)('0')\n                                                                PsiElement(])(']')\n                                                              PsiElement([)('[')\n                                                              LITERAL\n                                                                PsiElement(int)('0')\n                                                              PsiElement(])(']')\n                                                            PsiElement(*)('*')\n                                                            INDEX_OR_SLICE_EXPR\n                                                              INDEX_OR_SLICE_EXPR\n                                                                REFERENCE_EXPRESSION\n                                                                  PsiElement(identifier)('m')\n                                                                PsiElement([)('[')\n                                                                LITERAL\n                                                                  PsiElement(int)('1')\n                                                                PsiElement(])(']')\n                                                              PsiElement([)('[')\n                                                              LITERAL\n                                                                PsiElement(int)('1')\n                                                              PsiElement(])(']')\n                                                          PsiElement(*)('*')\n                                                          INDEX_OR_SLICE_EXPR\n                                                            INDEX_OR_SLICE_EXPR\n                                                              REFERENCE_EXPRESSION\n                                                                PsiElement(identifier)('m')\n                                                              PsiElement([)('[')\n                                                              LITERAL\n                                                                PsiElement(int)('2')\n                                                              PsiElement(])(']')\n                                                            PsiElement([)('[')\n                                                            LITERAL\n                                                              PsiElement(int)('3')\n                                                            PsiElement(])(']')\n                                                        PsiElement(*)('*')\n                                                        INDEX_OR_SLICE_EXPR\n                                                          INDEX_OR_SLICE_EXPR\n                                                            REFERENCE_EXPRESSION\n                                                              PsiElement(identifier)('m')\n                                                            PsiElement([)('[')\n                                                            LITERAL\n                                                              PsiElement(int)('3')\n                                                            PsiElement(])(']')\n                                                          PsiElement([)('[')\n                                                          LITERAL\n                                                            PsiElement(int)('2')\n                                                          PsiElement(])(']')\n                                                    PsiElement(-)('-')\n                                                    MUL_EXPR\n                                                      MUL_EXPR\n                                                        MUL_EXPR\n                                                          INDEX_OR_SLICE_EXPR\n                                                            INDEX_OR_SLICE_EXPR\n                                                              REFERENCE_EXPRESSION\n                                                                PsiElement(identifier)('m')\n                                                              PsiElement([)('[')\n                                                              LITERAL\n                                                                PsiElement(int)('0')\n                                                              PsiElement(])(']')\n                                                            PsiElement([)('[')\n                                                            LITERAL\n                                                              PsiElement(int)('0')\n                                                            PsiElement(])(']')\n                                                          PsiElement(*)('*')\n                                                          INDEX_OR_SLICE_EXPR\n                                                            INDEX_OR_SLICE_EXPR\n                                                              REFERENCE_EXPRESSION\n                                                                PsiElement(identifier)('m')\n                                                              PsiElement([)('[')\n                                                              LITERAL\n                                                                PsiElement(int)('1')\n                                                              PsiElement(])(']')\n                                                            PsiElement([)('[')\n                                                            LITERAL\n                                                              PsiElement(int)('2')\n                                                            PsiElement(])(']')\n                                                        PsiElement(*)('*')\n                                                        INDEX_OR_SLICE_EXPR\n                                                          INDEX_OR_SLICE_EXPR\n                                                            REFERENCE_EXPRESSION\n                                                              PsiElement(identifier)('m')\n                                                            PsiElement([)('[')\n                                                            LITERAL\n                                                              PsiElement(int)('2')\n                                                            PsiElement(])(']')\n                                                          PsiElement([)('[')\n                                                          LITERAL\n                                                            PsiElement(int)('1')\n                                                          PsiElement(])(']')\n                                                      PsiElement(*)('*')\n                                                      INDEX_OR_SLICE_EXPR\n                                                        INDEX_OR_SLICE_EXPR\n                                                          REFERENCE_EXPRESSION\n                                                            PsiElement(identifier)('m')\n                                                          PsiElement([)('[')\n                                                          LITERAL\n                                                            PsiElement(int)('3')\n                                                          PsiElement(])(']')\n                                                        PsiElement([)('[')\n                                                        LITERAL\n                                                          PsiElement(int)('3')\n                                                        PsiElement(])(']')\n                                                  PsiElement(+)('+')\n                                                  MUL_EXPR\n                                                    MUL_EXPR\n                                                      MUL_EXPR\n                                                        INDEX_OR_SLICE_EXPR\n                                                          INDEX_OR_SLICE_EXPR\n                                                            REFERENCE_EXPRESSION\n                                                              PsiElement(identifier)('m')\n                                                            PsiElement([)('[')\n                                                            LITERAL\n                                                              PsiElement(int)('0')\n                                                            PsiElement(])(']')\n                                                          PsiElement([)('[')\n                                                          LITERAL\n                                                            PsiElement(int)('0')\n                                                          PsiElement(])(']')\n                                                        PsiElement(*)('*')\n                                                        INDEX_OR_SLICE_EXPR\n                                                          INDEX_OR_SLICE_EXPR\n                                                            REFERENCE_EXPRESSION\n                                                              PsiElement(identifier)('m')\n                                                            PsiElement([)('[')\n                                                            LITERAL\n                                                              PsiElement(int)('1')\n                                                            PsiElement(])(']')\n                                                          PsiElement([)('[')\n                                                          LITERAL\n                                                            PsiElement(int)('2')\n                                                          PsiElement(])(']')\n                                                      PsiElement(*)('*')\n                                                      INDEX_OR_SLICE_EXPR\n                                                        INDEX_OR_SLICE_EXPR\n                                                          REFERENCE_EXPRESSION\n                                                            PsiElement(identifier)('m')\n                                                          PsiElement([)('[')\n                                                          LITERAL\n                                                            PsiElement(int)('2')\n                                                          PsiElement(])(']')\n                                                        PsiElement([)('[')\n                                                        LITERAL\n                                                          PsiElement(int)('3')\n                                                        PsiElement(])(']')\n                                                    PsiElement(*)('*')\n                                                    INDEX_OR_SLICE_EXPR\n                                                      INDEX_OR_SLICE_EXPR\n                                                        REFERENCE_EXPRESSION\n                                                          PsiElement(identifier)('m')\n                                                        PsiElement([)('[')\n                                                        LITERAL\n                                                          PsiElement(int)('3')\n                                                        PsiElement(])(']')\n                                                      PsiElement([)('[')\n                                                      LITERAL\n                                                        PsiElement(int)('1')\n                                                      PsiElement(])(']')\n                                                PsiElement(+)('+')\n                                                MUL_EXPR\n                                                  MUL_EXPR\n                                                    MUL_EXPR\n                                                      INDEX_OR_SLICE_EXPR\n                                                        INDEX_OR_SLICE_EXPR\n                                                          REFERENCE_EXPRESSION\n                                                            PsiElement(identifier)('m')\n                                                          PsiElement([)('[')\n                                                          LITERAL\n                                                            PsiElement(int)('0')\n                                                          PsiElement(])(']')\n                                                        PsiElement([)('[')\n                                                        LITERAL\n                                                          PsiElement(int)('0')\n                                                        PsiElement(])(']')\n                                                      PsiElement(*)('*')\n                                                      INDEX_OR_SLICE_EXPR\n                                                        INDEX_OR_SLICE_EXPR\n                                                          REFERENCE_EXPRESSION\n                                                            PsiElement(identifier)('m')\n                                                          PsiElement([)('[')\n                                                          LITERAL\n                                                            PsiElement(int)('1')\n                                                          PsiElement(])(']')\n                                                        PsiElement([)('[')\n                                                        LITERAL\n                                                          PsiElement(int)('3')\n                                                        PsiElement(])(']')\n                                                    PsiElement(*)('*')\n                                                    INDEX_OR_SLICE_EXPR\n                                                      INDEX_OR_SLICE_EXPR\n                                                        REFERENCE_EXPRESSION\n                                                          PsiElement(identifier)('m')\n                                                        PsiElement([)('[')\n                                                        LITERAL\n                                                          PsiElement(int)('2')\n                                                        PsiElement(])(']')\n                                                      PsiElement([)('[')\n                                                      LITERAL\n                                                        PsiElement(int)('1')\n                                                      PsiElement(])(']')\n                                                  PsiElement(*)('*')\n                                                  INDEX_OR_SLICE_EXPR\n                                                    INDEX_OR_SLICE_EXPR\n                                                      REFERENCE_EXPRESSION\n                                                        PsiElement(identifier)('m')\n                                                      PsiElement([)('[')\n                                                      LITERAL\n                                                        PsiElement(int)('3')\n                                                      PsiElement(])(']')\n                                                    PsiElement([)('[')\n                                                    LITERAL\n                                                      PsiElement(int)('2')\n                                                    PsiElement(])(']')\n                                              PsiElement(-)('-')\n                                              MUL_EXPR\n                                                MUL_EXPR\n                                                  MUL_EXPR\n                                                    INDEX_OR_SLICE_EXPR\n                                                      INDEX_OR_SLICE_EXPR\n                                                        REFERENCE_EXPRESSION\n                                                          PsiElement(identifier)('m')\n                                                        PsiElement([)('[')\n                                                        LITERAL\n                                                          PsiElement(int)('0')\n                                                        PsiElement(])(']')\n                                                      PsiElement([)('[')\n                                                      LITERAL\n                                                        PsiElement(int)('0')\n                                                      PsiElement(])(']')\n                                                    PsiElement(*)('*')\n                                                    INDEX_OR_SLICE_EXPR\n                                                      INDEX_OR_SLICE_EXPR\n                                                        REFERENCE_EXPRESSION\n                                                          PsiElement(identifier)('m')\n                                                        PsiElement([)('[')\n                                                        LITERAL\n                                                          PsiElement(int)('1')\n                                                        PsiElement(])(']')\n                                                      PsiElement([)('[')\n                                                      LITERAL\n                                                        PsiElement(int)('3')\n                                                      PsiElement(])(']')\n                                                  PsiElement(*)('*')\n                                                  INDEX_OR_SLICE_EXPR\n                                                    INDEX_OR_SLICE_EXPR\n                                                      REFERENCE_EXPRESSION\n                                                        PsiElement(identifier)('m')\n                                                      PsiElement([)('[')\n                                                      LITERAL\n                                                        PsiElement(int)('2')\n                                                      PsiElement(])(']')\n                                                    PsiElement([)('[')\n                                                    LITERAL\n                                                      PsiElement(int)('2')\n                                                    PsiElement(])(']')\n                                                PsiElement(*)('*')\n                                                INDEX_OR_SLICE_EXPR\n                                                  INDEX_OR_SLICE_EXPR\n                                                    REFERENCE_EXPRESSION\n                                                      PsiElement(identifier)('m')\n                                                    PsiElement([)('[')\n                                                    LITERAL\n                                                      PsiElement(int)('3')\n                                                    PsiElement(])(']')\n                                                  PsiElement([)('[')\n                                                  LITERAL\n                                                    PsiElement(int)('1')\n                                                  PsiElement(])(']')\n                                            PsiElement(-)('-')\n                                            MUL_EXPR\n                                              MUL_EXPR\n                                                MUL_EXPR\n                                                  INDEX_OR_SLICE_EXPR\n                                                    INDEX_OR_SLICE_EXPR\n                                                      REFERENCE_EXPRESSION\n                                                        PsiElement(identifier)('m')\n                                                      PsiElement([)('[')\n                                                      LITERAL\n                                                        PsiElement(int)('0')\n                                                      PsiElement(])(']')\n                                                    PsiElement([)('[')\n                                                    LITERAL\n                                                      PsiElement(int)('1')\n                                                    PsiElement(])(']')\n                                                  PsiElement(*)('*')\n                                                  INDEX_OR_SLICE_EXPR\n                                                    INDEX_OR_SLICE_EXPR\n                                                      REFERENCE_EXPRESSION\n                                                        PsiElement(identifier)('m')\n                                                      PsiElement([)('[')\n                                                      LITERAL\n                                                        PsiElement(int)('1')\n                                                      PsiElement(])(']')\n                                                    PsiElement([)('[')\n                                                    LITERAL\n                                                      PsiElement(int)('0')\n                                                    PsiElement(])(']')\n                                                PsiElement(*)('*')\n                                                INDEX_OR_SLICE_EXPR\n                                                  INDEX_OR_SLICE_EXPR\n                                                    REFERENCE_EXPRESSION\n                                                      PsiElement(identifier)('m')\n                                                    PsiElement([)('[')\n                                                    LITERAL\n                                                      PsiElement(int)('2')\n                                                    PsiElement(])(']')\n                                                  PsiElement([)('[')\n                                                  LITERAL\n                                                    PsiElement(int)('2')\n                                                  PsiElement(])(']')\n                                              PsiElement(*)('*')\n                                              INDEX_OR_SLICE_EXPR\n                                                INDEX_OR_SLICE_EXPR\n                                                  REFERENCE_EXPRESSION\n                                                    PsiElement(identifier)('m')\n                                                  PsiElement([)('[')\n                                                  LITERAL\n                                                    PsiElement(int)('3')\n                                                  PsiElement(])(']')\n                                                PsiElement([)('[')\n                                                LITERAL\n                                                  PsiElement(int)('3')\n                                                PsiElement(])(']')\n                                          PsiElement(+)('+')\n                                          MUL_EXPR\n                                            MUL_EXPR\n                                              MUL_EXPR\n                                                INDEX_OR_SLICE_EXPR\n                                                  INDEX_OR_SLICE_EXPR\n                                                    REFERENCE_EXPRESSION\n                                                      PsiElement(identifier)('m')\n                                                    PsiElement([)('[')\n                                                    LITERAL\n                                                      PsiElement(int)('0')\n                                                    PsiElement(])(']')\n                                                  PsiElement([)('[')\n                                                  LITERAL\n                                                    PsiElement(int)('1')\n                                                  PsiElement(])(']')\n                                                PsiElement(*)('*')\n                                                INDEX_OR_SLICE_EXPR\n                                                  INDEX_OR_SLICE_EXPR\n                                                    REFERENCE_EXPRESSION\n                                                      PsiElement(identifier)('m')\n                                                    PsiElement([)('[')\n                                                    LITERAL\n                                                      PsiElement(int)('1')\n                                                    PsiElement(])(']')\n                                                  PsiElement([)('[')\n                                                  LITERAL\n                                                    PsiElement(int)('0')\n                                                  PsiElement(])(']')\n                                              PsiElement(*)('*')\n                                              INDEX_OR_SLICE_EXPR\n                                                INDEX_OR_SLICE_EXPR\n                                                  REFERENCE_EXPRESSION\n                                                    PsiElement(identifier)('m')\n                                                  PsiElement([)('[')\n                                                  LITERAL\n                                                    PsiElement(int)('2')\n                                                  PsiElement(])(']')\n                                                PsiElement([)('[')\n                                                LITERAL\n                                                  PsiElement(int)('3')\n                                                PsiElement(])(']')\n                                            PsiElement(*)('*')\n                                            INDEX_OR_SLICE_EXPR\n                                              INDEX_OR_SLICE_EXPR\n                                                REFERENCE_EXPRESSION\n                                                  PsiElement(identifier)('m')\n                                                PsiElement([)('[')\n                                                LITERAL\n                                                  PsiElement(int)('3')\n                                                PsiElement(])(']')\n                                              PsiElement([)('[')\n                                              LITERAL\n                                                PsiElement(int)('2')\n                                              PsiElement(])(']')\n                                        PsiElement(+)('+')\n                                        MUL_EXPR\n                                          MUL_EXPR\n                                            MUL_EXPR\n                                              INDEX_OR_SLICE_EXPR\n                                                INDEX_OR_SLICE_EXPR\n                                                  REFERENCE_EXPRESSION\n                                                    PsiElement(identifier)('m')\n                                                  PsiElement([)('[')\n                                                  LITERAL\n                                                    PsiElement(int)('0')\n                                                  PsiElement(])(']')\n                                                PsiElement([)('[')\n                                                LITERAL\n                                                  PsiElement(int)('1')\n                                                PsiElement(])(']')\n                                              PsiElement(*)('*')\n                                              INDEX_OR_SLICE_EXPR\n                                                INDEX_OR_SLICE_EXPR\n                                                  REFERENCE_EXPRESSION\n                                                    PsiElement(identifier)('m')\n                                                  PsiElement([)('[')\n                                                  LITERAL\n                                                    PsiElement(int)('1')\n                                                  PsiElement(])(']')\n                                                PsiElement([)('[')\n                                                LITERAL\n                                                  PsiElement(int)('2')\n                                                PsiElement(])(']')\n                                            PsiElement(*)('*')\n                                            INDEX_OR_SLICE_EXPR\n                                              INDEX_OR_SLICE_EXPR\n                                                REFERENCE_EXPRESSION\n                                                  PsiElement(identifier)('m')\n                                                PsiElement([)('[')\n                                                LITERAL\n                                                  PsiElement(int)('2')\n                                                PsiElement(])(']')\n                                              PsiElement([)('[')\n                                              LITERAL\n                                                PsiElement(int)('0')\n                                              PsiElement(])(']')\n                                          PsiElement(*)('*')\n                                          INDEX_OR_SLICE_EXPR\n                                            INDEX_OR_SLICE_EXPR\n                                              REFERENCE_EXPRESSION\n                                                PsiElement(identifier)('m')\n                                              PsiElement([)('[')\n                                              LITERAL\n                                                PsiElement(int)('3')\n                                              PsiElement(])(']')\n                                            PsiElement([)('[')\n                                            LITERAL\n                                              PsiElement(int)('3')\n                                            PsiElement(])(']')\n                                      PsiElement(-)('-')\n                                      MUL_EXPR\n                                        MUL_EXPR\n                                          MUL_EXPR\n                                            INDEX_OR_SLICE_EXPR\n                                              INDEX_OR_SLICE_EXPR\n                                                REFERENCE_EXPRESSION\n                                                  PsiElement(identifier)('m')\n                                                PsiElement([)('[')\n                                                LITERAL\n                                                  PsiElement(int)('0')\n                                                PsiElement(])(']')\n                                              PsiElement([)('[')\n                                              LITERAL\n                                                PsiElement(int)('1')\n                                              PsiElement(])(']')\n                                            PsiElement(*)('*')\n                                            INDEX_OR_SLICE_EXPR\n                                              INDEX_OR_SLICE_EXPR\n                                                REFERENCE_EXPRESSION\n                                                  PsiElement(identifier)('m')\n                                                PsiElement([)('[')\n                                                LITERAL\n                                                  PsiElement(int)('1')\n                                                PsiElement(])(']')\n                                              PsiElement([)('[')\n                                              LITERAL\n                                                PsiElement(int)('2')\n                                              PsiElement(])(']')\n                                          PsiElement(*)('*')\n                                          INDEX_OR_SLICE_EXPR\n                                            INDEX_OR_SLICE_EXPR\n                                              REFERENCE_EXPRESSION\n                                                PsiElement(identifier)('m')\n                                              PsiElement([)('[')\n                                              LITERAL\n                                                PsiElement(int)('2')\n                                              PsiElement(])(']')\n                                            PsiElement([)('[')\n                                            LITERAL\n                                              PsiElement(int)('3')\n                                            PsiElement(])(']')\n                                        PsiElement(*)('*')\n                                        INDEX_OR_SLICE_EXPR\n                                          INDEX_OR_SLICE_EXPR\n                                            REFERENCE_EXPRESSION\n                                              PsiElement(identifier)('m')\n                                            PsiElement([)('[')\n                                            LITERAL\n                                              PsiElement(int)('3')\n                                            PsiElement(])(']')\n                                          PsiElement([)('[')\n                                          LITERAL\n                                            PsiElement(int)('0')\n                                          PsiElement(])(']')\n                                    PsiElement(-)('-')\n                                    MUL_EXPR\n                                      MUL_EXPR\n                                        MUL_EXPR\n                                          INDEX_OR_SLICE_EXPR\n                                            INDEX_OR_SLICE_EXPR\n                                              REFERENCE_EXPRESSION\n                                                PsiElement(identifier)('m')\n                                              PsiElement([)('[')\n                                              LITERAL\n                                                PsiElement(int)('0')\n                                              PsiElement(])(']')\n                                            PsiElement([)('[')\n                                            LITERAL\n                                              PsiElement(int)('1')\n                                            PsiElement(])(']')\n                                          PsiElement(*)('*')\n                                          INDEX_OR_SLICE_EXPR\n                                            INDEX_OR_SLICE_EXPR\n                                              REFERENCE_EXPRESSION\n                                                PsiElement(identifier)('m')\n                                              PsiElement([)('[')\n                                              LITERAL\n                                                PsiElement(int)('1')\n                                              PsiElement(])(']')\n                                            PsiElement([)('[')\n                                            LITERAL\n                                              PsiElement(int)('3')\n                                            PsiElement(])(']')\n                                        PsiElement(*)('*')\n                                        INDEX_OR_SLICE_EXPR\n                                          INDEX_OR_SLICE_EXPR\n                                            REFERENCE_EXPRESSION\n                                              PsiElement(identifier)('m')\n                                            PsiElement([)('[')\n                                            LITERAL\n                                              PsiElement(int)('2')\n                                            PsiElement(])(']')\n                                          PsiElement([)('[')\n                                          LITERAL\n                                            PsiElement(int)('0')\n                                          PsiElement(])(']')\n                                      PsiElement(*)('*')\n                                      INDEX_OR_SLICE_EXPR\n                                        INDEX_OR_SLICE_EXPR\n                                          REFERENCE_EXPRESSION\n                                            PsiElement(identifier)('m')\n                                          PsiElement([)('[')\n                                          LITERAL\n                                            PsiElement(int)('3')\n                                          PsiElement(])(']')\n                                        PsiElement([)('[')\n                                        LITERAL\n                                          PsiElement(int)('2')\n                                        PsiElement(])(']')\n                                  PsiElement(+)('+')\n                                  MUL_EXPR\n                                    MUL_EXPR\n                                      MUL_EXPR\n                                        INDEX_OR_SLICE_EXPR\n                                          INDEX_OR_SLICE_EXPR\n                                            REFERENCE_EXPRESSION\n                                              PsiElement(identifier)('m')\n                                            PsiElement([)('[')\n                                            LITERAL\n                                              PsiElement(int)('0')\n                                            PsiElement(])(']')\n                                          PsiElement([)('[')\n                                          LITERAL\n                                            PsiElement(int)('1')\n                                          PsiElement(])(']')\n                                        PsiElement(*)('*')\n                                        INDEX_OR_SLICE_EXPR\n                                          INDEX_OR_SLICE_EXPR\n                                            REFERENCE_EXPRESSION\n                                              PsiElement(identifier)('m')\n                                            PsiElement([)('[')\n                                            LITERAL\n                                              PsiElement(int)('1')\n                                            PsiElement(])(']')\n                                          PsiElement([)('[')\n                                          LITERAL\n                                            PsiElement(int)('3')\n                                          PsiElement(])(']')\n                                      PsiElement(*)('*')\n                                      INDEX_OR_SLICE_EXPR\n                                        INDEX_OR_SLICE_EXPR\n                                          REFERENCE_EXPRESSION\n                                            PsiElement(identifier)('m')\n                                          PsiElement([)('[')\n                                          LITERAL\n                                            PsiElement(int)('2')\n                                          PsiElement(])(']')\n                                        PsiElement([)('[')\n                                        LITERAL\n                                          PsiElement(int)('2')\n                                        PsiElement(])(']')\n                                    PsiElement(*)('*')\n                                    INDEX_OR_SLICE_EXPR\n                                      INDEX_OR_SLICE_EXPR\n                                        REFERENCE_EXPRESSION\n                                          PsiElement(identifier)('m')\n                                        PsiElement([)('[')\n                                        LITERAL\n                                          PsiElement(int)('3')\n                                        PsiElement(])(']')\n                                      PsiElement([)('[')\n                                      LITERAL\n                                        PsiElement(int)('0')\n                                      PsiElement(])(']')\n                                PsiElement(+)('+')\n                                MUL_EXPR\n                                  MUL_EXPR\n                                    MUL_EXPR\n                                      INDEX_OR_SLICE_EXPR\n                                        INDEX_OR_SLICE_EXPR\n                                          REFERENCE_EXPRESSION\n                                            PsiElement(identifier)('m')\n                                          PsiElement([)('[')\n                                          LITERAL\n                                            PsiElement(int)('0')\n                                          PsiElement(])(']')\n                                        PsiElement([)('[')\n                                        LITERAL\n                                          PsiElement(int)('2')\n                                        PsiElement(])(']')\n                                      PsiElement(*)('*')\n                                      INDEX_OR_SLICE_EXPR\n                                        INDEX_OR_SLICE_EXPR\n                                          REFERENCE_EXPRESSION\n                                            PsiElement(identifier)('m')\n                                          PsiElement([)('[')\n                                          LITERAL\n                                            PsiElement(int)('1')\n                                          PsiElement(])(']')\n                                        PsiElement([)('[')\n                                        LITERAL\n                                          PsiElement(int)('0')\n                                        PsiElement(])(']')\n                                    PsiElement(*)('*')\n                                    INDEX_OR_SLICE_EXPR\n                                      INDEX_OR_SLICE_EXPR\n                                        REFERENCE_EXPRESSION\n                                          PsiElement(identifier)('m')\n                                        PsiElement([)('[')\n                                        LITERAL\n                                          PsiElement(int)('2')\n                                        PsiElement(])(']')\n                                      PsiElement([)('[')\n                                      LITERAL\n                                        PsiElement(int)('1')\n                                      PsiElement(])(']')\n                                  PsiElement(*)('*')\n                                  INDEX_OR_SLICE_EXPR\n                                    INDEX_OR_SLICE_EXPR\n                                      REFERENCE_EXPRESSION\n                                        PsiElement(identifier)('m')\n                                      PsiElement([)('[')\n                                      LITERAL\n                                        PsiElement(int)('3')\n                                      PsiElement(])(']')\n                                    PsiElement([)('[')\n                                    LITERAL\n                                      PsiElement(int)('3')\n                                    PsiElement(])(']')\n                              PsiElement(-)('-')\n                              MUL_EXPR\n                                MUL_EXPR\n                                  MUL_EXPR\n                                    INDEX_OR_SLICE_EXPR\n                                      INDEX_OR_SLICE_EXPR\n                                        REFERENCE_EXPRESSION\n                                          PsiElement(identifier)('m')\n                                        PsiElement([)('[')\n                                        LITERAL\n                                          PsiElement(int)('0')\n                                        PsiElement(])(']')\n                                      PsiElement([)('[')\n                                      LITERAL\n                                        PsiElement(int)('2')\n                                      PsiElement(])(']')\n                                    PsiElement(*)('*')\n                                    INDEX_OR_SLICE_EXPR\n                                      INDEX_OR_SLICE_EXPR\n                                        REFERENCE_EXPRESSION\n                                          PsiElement(identifier)('m')\n                                        PsiElement([)('[')\n                                        LITERAL\n                                          PsiElement(int)('1')\n                                        PsiElement(])(']')\n                                      PsiElement([)('[')\n                                      LITERAL\n                                        PsiElement(int)('0')\n                                      PsiElement(])(']')\n                                  PsiElement(*)('*')\n                                  INDEX_OR_SLICE_EXPR\n                                    INDEX_OR_SLICE_EXPR\n                                      REFERENCE_EXPRESSION\n                                        PsiElement(identifier)('m')\n                                      PsiElement([)('[')\n                                      LITERAL\n                                        PsiElement(int)('2')\n                                      PsiElement(])(']')\n                                    PsiElement([)('[')\n                                    LITERAL\n                                      PsiElement(int)('3')\n                                    PsiElement(])(']')\n                                PsiElement(*)('*')\n                                INDEX_OR_SLICE_EXPR\n                                  INDEX_OR_SLICE_EXPR\n                                    REFERENCE_EXPRESSION\n                                      PsiElement(identifier)('m')\n                                    PsiElement([)('[')\n                                    LITERAL\n                                      PsiElement(int)('3')\n                                    PsiElement(])(']')\n                                  PsiElement([)('[')\n                                  LITERAL\n                                    PsiElement(int)('1')\n                                  PsiElement(])(']')\n                            PsiElement(-)('-')\n                            MUL_EXPR\n                              MUL_EXPR\n                                MUL_EXPR\n                                  INDEX_OR_SLICE_EXPR\n                                    INDEX_OR_SLICE_EXPR\n                                      REFERENCE_EXPRESSION\n                                        PsiElement(identifier)('m')\n                                      PsiElement([)('[')\n                                      LITERAL\n                                        PsiElement(int)('0')\n                                      PsiElement(])(']')\n                                    PsiElement([)('[')\n                                    LITERAL\n                                      PsiElement(int)('2')\n                                    PsiElement(])(']')\n                                  PsiElement(*)('*')\n                                  INDEX_OR_SLICE_EXPR\n                                    INDEX_OR_SLICE_EXPR\n                                      REFERENCE_EXPRESSION\n                                        PsiElement(identifier)('m')\n                                      PsiElement([)('[')\n                                      LITERAL\n                                        PsiElement(int)('1')\n                                      PsiElement(])(']')\n                                    PsiElement([)('[')\n                                    LITERAL\n                                      PsiElement(int)('1')\n                                    PsiElement(])(']')\n                                PsiElement(*)('*')\n                                INDEX_OR_SLICE_EXPR\n                                  INDEX_OR_SLICE_EXPR\n                                    REFERENCE_EXPRESSION\n                                      PsiElement(identifier)('m')\n                                    PsiElement([)('[')\n                                    LITERAL\n                                      PsiElement(int)('2')\n                                    PsiElement(])(']')\n                                  PsiElement([)('[')\n                                  LITERAL\n                                    PsiElement(int)('0')\n                                  PsiElement(])(']')\n                              PsiElement(*)('*')\n                              INDEX_OR_SLICE_EXPR\n                                INDEX_OR_SLICE_EXPR\n                                  REFERENCE_EXPRESSION\n                                    PsiElement(identifier)('m')\n                                  PsiElement([)('[')\n                                  LITERAL\n                                    PsiElement(int)('3')\n                                  PsiElement(])(']')\n                                PsiElement([)('[')\n                                LITERAL\n                                  PsiElement(int)('3')\n                                PsiElement(])(']')\n                          PsiElement(+)('+')\n                          MUL_EXPR\n                            MUL_EXPR\n                              MUL_EXPR\n                                INDEX_OR_SLICE_EXPR\n                                  INDEX_OR_SLICE_EXPR\n                                    REFERENCE_EXPRESSION\n                                      PsiElement(identifier)('m')\n                                    PsiElement([)('[')\n                                    LITERAL\n                                      PsiElement(int)('0')\n                                    PsiElement(])(']')\n                                  PsiElement([)('[')\n                                  LITERAL\n                                    PsiElement(int)('2')\n                                  PsiElement(])(']')\n                                PsiElement(*)('*')\n                                INDEX_OR_SLICE_EXPR\n                                  INDEX_OR_SLICE_EXPR\n                                    REFERENCE_EXPRESSION\n                                      PsiElement(identifier)('m')\n                                    PsiElement([)('[')\n                                    LITERAL\n                                      PsiElement(int)('1')\n                                    PsiElement(])(']')\n                                  PsiElement([)('[')\n                                  LITERAL\n                                    PsiElement(int)('1')\n                                  PsiElement(])(']')\n                              PsiElement(*)('*')\n                              INDEX_OR_SLICE_EXPR\n                                INDEX_OR_SLICE_EXPR\n                                  REFERENCE_EXPRESSION\n                                    PsiElement(identifier)('m')\n                                  PsiElement([)('[')\n                                  LITERAL\n                                    PsiElement(int)('2')\n                                  PsiElement(])(']')\n                                PsiElement([)('[')\n                                LITERAL\n                                  PsiElement(int)('3')\n                                PsiElement(])(']')\n                            PsiElement(*)('*')\n                            INDEX_OR_SLICE_EXPR\n                              INDEX_OR_SLICE_EXPR\n                                REFERENCE_EXPRESSION\n                                  PsiElement(identifier)('m')\n                                PsiElement([)('[')\n                                LITERAL\n                                  PsiElement(int)('3')\n                                PsiElement(])(']')\n                              PsiElement([)('[')\n                              LITERAL\n                                PsiElement(int)('0')\n                              PsiElement(])(']')\n                        PsiElement(+)('+')\n                        MUL_EXPR\n                          MUL_EXPR\n                            MUL_EXPR\n                              INDEX_OR_SLICE_EXPR\n                                INDEX_OR_SLICE_EXPR\n                                  REFERENCE_EXPRESSION\n                                    PsiElement(identifier)('m')\n                                  PsiElement([)('[')\n                                  LITERAL\n                                    PsiElement(int)('0')\n                                  PsiElement(])(']')\n                                PsiElement([)('[')\n                                LITERAL\n                                  PsiElement(int)('2')\n                                PsiElement(])(']')\n                              PsiElement(*)('*')\n                              INDEX_OR_SLICE_EXPR\n                                INDEX_OR_SLICE_EXPR\n                                  REFERENCE_EXPRESSION\n                                    PsiElement(identifier)('m')\n                                  PsiElement([)('[')\n                                  LITERAL\n                                    PsiElement(int)('1')\n                                  PsiElement(])(']')\n                                PsiElement([)('[')\n                                LITERAL\n                                  PsiElement(int)('3')\n                                PsiElement(])(']')\n                            PsiElement(*)('*')\n                            INDEX_OR_SLICE_EXPR\n                              INDEX_OR_SLICE_EXPR\n                                REFERENCE_EXPRESSION\n                                  PsiElement(identifier)('m')\n                                PsiElement([)('[')\n                                LITERAL\n                                  PsiElement(int)('2')\n                                PsiElement(])(']')\n                              PsiElement([)('[')\n                              LITERAL\n                                PsiElement(int)('0')\n                              PsiElement(])(']')\n                          PsiElement(*)('*')\n                          INDEX_OR_SLICE_EXPR\n                            INDEX_OR_SLICE_EXPR\n                              REFERENCE_EXPRESSION\n                                PsiElement(identifier)('m')\n                              PsiElement([)('[')\n                              LITERAL\n                                PsiElement(int)('3')\n                              PsiElement(])(']')\n                            PsiElement([)('[')\n                            LITERAL\n                              PsiElement(int)('1')\n                            PsiElement(])(']')\n                      PsiElement(-)('-')\n                      MUL_EXPR\n                        MUL_EXPR\n                          MUL_EXPR\n                            INDEX_OR_SLICE_EXPR\n                              INDEX_OR_SLICE_EXPR\n                                REFERENCE_EXPRESSION\n                                  PsiElement(identifier)('m')\n                                PsiElement([)('[')\n                                LITERAL\n                                  PsiElement(int)('0')\n                                PsiElement(])(']')\n                              PsiElement([)('[')\n                              LITERAL\n                                PsiElement(int)('2')\n                              PsiElement(])(']')\n                            PsiElement(*)('*')\n                            INDEX_OR_SLICE_EXPR\n                              INDEX_OR_SLICE_EXPR\n                                REFERENCE_EXPRESSION\n                                  PsiElement(identifier)('m')\n                                PsiElement([)('[')\n                                LITERAL\n                                  PsiElement(int)('1')\n                                PsiElement(])(']')\n                              PsiElement([)('[')\n                              LITERAL\n                                PsiElement(int)('3')\n                              PsiElement(])(']')\n                          PsiElement(*)('*')\n                          INDEX_OR_SLICE_EXPR\n                            INDEX_OR_SLICE_EXPR\n                              REFERENCE_EXPRESSION\n                                PsiElement(identifier)('m')\n                              PsiElement([)('[')\n                              LITERAL\n                                PsiElement(int)('2')\n                              PsiElement(])(']')\n                            PsiElement([)('[')\n                            LITERAL\n                              PsiElement(int)('1')\n                            PsiElement(])(']')\n                        PsiElement(*)('*')\n                        INDEX_OR_SLICE_EXPR\n                          INDEX_OR_SLICE_EXPR\n                            REFERENCE_EXPRESSION\n                              PsiElement(identifier)('m')\n                            PsiElement([)('[')\n                            LITERAL\n                              PsiElement(int)('3')\n                            PsiElement(])(']')\n                          PsiElement([)('[')\n                          LITERAL\n                            PsiElement(int)('0')\n                          PsiElement(])(']')\n                    PsiElement(-)('-')\n                    MUL_EXPR\n                      MUL_EXPR\n                        MUL_EXPR\n                          INDEX_OR_SLICE_EXPR\n                            INDEX_OR_SLICE_EXPR\n                              REFERENCE_EXPRESSION\n                                PsiElement(identifier)('m')\n                              PsiElement([)('[')\n                              LITERAL\n                                PsiElement(int)('0')\n                              PsiElement(])(']')\n                            PsiElement([)('[')\n                            LITERAL\n                              PsiElement(int)('3')\n                            PsiElement(])(']')\n                          PsiElement(*)('*')\n                          INDEX_OR_SLICE_EXPR\n                            INDEX_OR_SLICE_EXPR\n                              REFERENCE_EXPRESSION\n                                PsiElement(identifier)('m')\n                              PsiElement([)('[')\n                              LITERAL\n                                PsiElement(int)('1')\n                              PsiElement(])(']')\n                            PsiElement([)('[')\n                            LITERAL\n                              PsiElement(int)('0')\n                            PsiElement(])(']')\n                        PsiElement(*)('*')\n                        INDEX_OR_SLICE_EXPR\n                          INDEX_OR_SLICE_EXPR\n                            REFERENCE_EXPRESSION\n                              PsiElement(identifier)('m')\n                            PsiElement([)('[')\n                            LITERAL\n                              PsiElement(int)('2')\n                            PsiElement(])(']')\n                          PsiElement([)('[')\n                          LITERAL\n                            PsiElement(int)('1')\n                          PsiElement(])(']')\n                      PsiElement(*)('*')\n                      INDEX_OR_SLICE_EXPR\n                        INDEX_OR_SLICE_EXPR\n                          REFERENCE_EXPRESSION\n                            PsiElement(identifier)('m')\n                          PsiElement([)('[')\n                          LITERAL\n                            PsiElement(int)('3')\n                          PsiElement(])(']')\n                        PsiElement([)('[')\n                        LITERAL\n                          PsiElement(int)('2')\n                        PsiElement(])(']')\n                  PsiElement(+)('+')\n                  MUL_EXPR\n                    MUL_EXPR\n                      MUL_EXPR\n                        INDEX_OR_SLICE_EXPR\n                          INDEX_OR_SLICE_EXPR\n                            REFERENCE_EXPRESSION\n                              PsiElement(identifier)('m')\n                            PsiElement([)('[')\n                            LITERAL\n                              PsiElement(int)('0')\n                            PsiElement(])(']')\n                          PsiElement([)('[')\n                          LITERAL\n                            PsiElement(int)('3')\n                          PsiElement(])(']')\n                        PsiElement(*)('*')\n                        INDEX_OR_SLICE_EXPR\n                          INDEX_OR_SLICE_EXPR\n                            REFERENCE_EXPRESSION\n                              PsiElement(identifier)('m')\n                            PsiElement([)('[')\n                            LITERAL\n                              PsiElement(int)('1')\n                            PsiElement(])(']')\n                          PsiElement([)('[')\n                          LITERAL\n                            PsiElement(int)('0')\n                          PsiElement(])(']')\n                      PsiElement(*)('*')\n                      INDEX_OR_SLICE_EXPR\n                        INDEX_OR_SLICE_EXPR\n                          REFERENCE_EXPRESSION\n                            PsiElement(identifier)('m')\n                          PsiElement([)('[')\n                          LITERAL\n                            PsiElement(int)('2')\n                          PsiElement(])(']')\n                        PsiElement([)('[')\n                        LITERAL\n                          PsiElement(int)('2')\n                        PsiElement(])(']')\n                    PsiElement(*)('*')\n                    INDEX_OR_SLICE_EXPR\n                      INDEX_OR_SLICE_EXPR\n                        REFERENCE_EXPRESSION\n                          PsiElement(identifier)('m')\n                        PsiElement([)('[')\n                        LITERAL\n                          PsiElement(int)('3')\n                        PsiElement(])(']')\n                      PsiElement([)('[')\n                      LITERAL\n                        PsiElement(int)('1')\n                      PsiElement(])(']')\n                PsiElement(+)('+')\n                MUL_EXPR\n                  MUL_EXPR\n                    MUL_EXPR\n                      INDEX_OR_SLICE_EXPR\n                        INDEX_OR_SLICE_EXPR\n                          REFERENCE_EXPRESSION\n                            PsiElement(identifier)('m')\n                          PsiElement([)('[')\n                          LITERAL\n                            PsiElement(int)('0')\n                          PsiElement(])(']')\n                        PsiElement([)('[')\n                        LITERAL\n                          PsiElement(int)('3')\n                        PsiElement(])(']')\n                      PsiElement(*)('*')\n                      INDEX_OR_SLICE_EXPR\n                        INDEX_OR_SLICE_EXPR\n                          REFERENCE_EXPRESSION\n                            PsiElement(identifier)('m')\n                          PsiElement([)('[')\n                          LITERAL\n                            PsiElement(int)('1')\n                          PsiElement(])(']')\n                        PsiElement([)('[')\n                        LITERAL\n                          PsiElement(int)('1')\n                        PsiElement(])(']')\n                    PsiElement(*)('*')\n                    INDEX_OR_SLICE_EXPR\n                      INDEX_OR_SLICE_EXPR\n                        REFERENCE_EXPRESSION\n                          PsiElement(identifier)('m')\n                        PsiElement([)('[')\n                        LITERAL\n                          PsiElement(int)('2')\n                        PsiElement(])(']')\n                      PsiElement([)('[')\n                      LITERAL\n                        PsiElement(int)('0')\n                      PsiElement(])(']')\n                  PsiElement(*)('*')\n                  INDEX_OR_SLICE_EXPR\n                    INDEX_OR_SLICE_EXPR\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('m')\n                      PsiElement([)('[')\n                      LITERAL\n                        PsiElement(int)('3')\n                      PsiElement(])(']')\n                    PsiElement([)('[')\n                    LITERAL\n                      PsiElement(int)('2')\n                    PsiElement(])(']')\n              PsiElement(-)('-')\n              MUL_EXPR\n                MUL_EXPR\n                  MUL_EXPR\n                    INDEX_OR_SLICE_EXPR\n                      INDEX_OR_SLICE_EXPR\n                        REFERENCE_EXPRESSION\n                          PsiElement(identifier)('m')\n                        PsiElement([)('[')\n                        LITERAL\n                          PsiElement(int)('0')\n                        PsiElement(])(']')\n                      PsiElement([)('[')\n                      LITERAL\n                        PsiElement(int)('3')\n                      PsiElement(])(']')\n                    PsiElement(*)('*')\n                    INDEX_OR_SLICE_EXPR\n                      INDEX_OR_SLICE_EXPR\n                        REFERENCE_EXPRESSION\n                          PsiElement(identifier)('m')\n                        PsiElement([)('[')\n                        LITERAL\n                          PsiElement(int)('1')\n                        PsiElement(])(']')\n                      PsiElement([)('[')\n                      LITERAL\n                        PsiElement(int)('1')\n                      PsiElement(])(']')\n                  PsiElement(*)('*')\n                  INDEX_OR_SLICE_EXPR\n                    INDEX_OR_SLICE_EXPR\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('m')\n                      PsiElement([)('[')\n                      LITERAL\n                        PsiElement(int)('2')\n                      PsiElement(])(']')\n                    PsiElement([)('[')\n                    LITERAL\n                      PsiElement(int)('2')\n                    PsiElement(])(']')\n                PsiElement(*)('*')\n                INDEX_OR_SLICE_EXPR\n                  INDEX_OR_SLICE_EXPR\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('m')\n                    PsiElement([)('[')\n                    LITERAL\n                      PsiElement(int)('3')\n                    PsiElement(])(']')\n                  PsiElement([)('[')\n                  LITERAL\n                    PsiElement(int)('0')\n                  PsiElement(])(']')\n            PsiElement(-)('-')\n            MUL_EXPR\n              MUL_EXPR\n                MUL_EXPR\n                  INDEX_OR_SLICE_EXPR\n                    INDEX_OR_SLICE_EXPR\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('m')\n                      PsiElement([)('[')\n                      LITERAL\n                        PsiElement(int)('0')\n                      PsiElement(])(']')\n                    PsiElement([)('[')\n                    LITERAL\n                      PsiElement(int)('3')\n                    PsiElement(])(']')\n                  PsiElement(*)('*')\n                  INDEX_OR_SLICE_EXPR\n                    INDEX_OR_SLICE_EXPR\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('m')\n                      PsiElement([)('[')\n                      LITERAL\n                        PsiElement(int)('1')\n                      PsiElement(])(']')\n                    PsiElement([)('[')\n                    LITERAL\n                      PsiElement(int)('2')\n                    PsiElement(])(']')\n                PsiElement(*)('*')\n                INDEX_OR_SLICE_EXPR\n                  INDEX_OR_SLICE_EXPR\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('m')\n                    PsiElement([)('[')\n                    LITERAL\n                      PsiElement(int)('2')\n                    PsiElement(])(']')\n                  PsiElement([)('[')\n                  LITERAL\n                    PsiElement(int)('0')\n                  PsiElement(])(']')\n              PsiElement(*)('*')\n              INDEX_OR_SLICE_EXPR\n                INDEX_OR_SLICE_EXPR\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('m')\n                  PsiElement([)('[')\n                  LITERAL\n                    PsiElement(int)('3')\n                  PsiElement(])(']')\n                PsiElement([)('[')\n                LITERAL\n                  PsiElement(int)('1')\n                PsiElement(])(']')\n          PsiElement(+)('+')\n          MUL_EXPR\n            MUL_EXPR\n              MUL_EXPR\n                INDEX_OR_SLICE_EXPR\n                  INDEX_OR_SLICE_EXPR\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('m')\n                    PsiElement([)('[')\n                    LITERAL\n                      PsiElement(int)('0')\n                    PsiElement(])(']')\n                  PsiElement([)('[')\n                  LITERAL\n                    PsiElement(int)('3')\n                  PsiElement(])(']')\n                PsiElement(*)('*')\n                INDEX_OR_SLICE_EXPR\n                  INDEX_OR_SLICE_EXPR\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('m')\n                    PsiElement([)('[')\n                    LITERAL\n                      PsiElement(int)('1')\n                    PsiElement(])(']')\n                  PsiElement([)('[')\n                  LITERAL\n                    PsiElement(int)('2')\n                  PsiElement(])(']')\n              PsiElement(*)('*')\n              INDEX_OR_SLICE_EXPR\n                INDEX_OR_SLICE_EXPR\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('m')\n                  PsiElement([)('[')\n                  LITERAL\n                    PsiElement(int)('2')\n                  PsiElement(])(']')\n                PsiElement([)('[')\n                LITERAL\n                  PsiElement(int)('1')\n                PsiElement(])(']')\n            PsiElement(*)('*')\n            INDEX_OR_SLICE_EXPR\n              INDEX_OR_SLICE_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('m')\n                PsiElement([)('[')\n                LITERAL\n                  PsiElement(int)('3')\n                PsiElement(])(']')\n              PsiElement([)('[')\n              LITERAL\n                PsiElement(int)('0')\n              PsiElement(])(']')\n      PsiElement(})('}')\n  TYPE_DECLARATION\n    PsiElement(type)('type')\n    TYPE_SPEC\n      SPEC_TYPE\n        PsiElement(identifier)('A')\n        ARRAY_OR_SLICE_TYPE\n          PsiElement([)('[')\n          PsiElement(])(']')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('A')\n  PsiComment(GO_LINE_COMMENT)('// A sequence of constant indexings.')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('IndexChain1')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('s')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('A')\n        PsiElement())(')')\n      RESULT\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('A')\n    BLOCK\n      PsiElement({)('{')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n        INDEX_OR_SLICE_EXPR\n          INDEX_OR_SLICE_EXPR\n            INDEX_OR_SLICE_EXPR\n              INDEX_OR_SLICE_EXPR\n                INDEX_OR_SLICE_EXPR\n                  INDEX_OR_SLICE_EXPR\n                    INDEX_OR_SLICE_EXPR\n                      INDEX_OR_SLICE_EXPR\n                        INDEX_OR_SLICE_EXPR\n                          INDEX_OR_SLICE_EXPR\n                            INDEX_OR_SLICE_EXPR\n                              INDEX_OR_SLICE_EXPR\n                                INDEX_OR_SLICE_EXPR\n                                  INDEX_OR_SLICE_EXPR\n                                    INDEX_OR_SLICE_EXPR\n                                      INDEX_OR_SLICE_EXPR\n                                        REFERENCE_EXPRESSION\n                                          PsiElement(identifier)('s')\n                                        PsiElement([)('[')\n                                        LITERAL\n                                          PsiElement(int)('0')\n                                        PsiElement(])(']')\n                                      PsiElement([)('[')\n                                      LITERAL\n                                        PsiElement(int)('0')\n                                      PsiElement(])(']')\n                                    PsiElement([)('[')\n                                    LITERAL\n                                      PsiElement(int)('0')\n                                    PsiElement(])(']')\n                                  PsiElement([)('[')\n                                  LITERAL\n                                    PsiElement(int)('0')\n                                  PsiElement(])(']')\n                                PsiElement([)('[')\n                                LITERAL\n                                  PsiElement(int)('0')\n                                PsiElement(])(']')\n                              PsiElement([)('[')\n                              LITERAL\n                                PsiElement(int)('0')\n                              PsiElement(])(']')\n                            PsiElement([)('[')\n                            LITERAL\n                              PsiElement(int)('0')\n                            PsiElement(])(']')\n                          PsiElement([)('[')\n                          LITERAL\n                            PsiElement(int)('0')\n                          PsiElement(])(']')\n                        PsiElement([)('[')\n                        LITERAL\n                          PsiElement(int)('0')\n                        PsiElement(])(']')\n                      PsiElement([)('[')\n                      LITERAL\n                        PsiElement(int)('0')\n                      PsiElement(])(']')\n                    PsiElement([)('[')\n                    LITERAL\n                      PsiElement(int)('0')\n                    PsiElement(])(']')\n                  PsiElement([)('[')\n                  LITERAL\n                    PsiElement(int)('0')\n                  PsiElement(])(']')\n                PsiElement([)('[')\n                LITERAL\n                  PsiElement(int)('0')\n                PsiElement(])(']')\n              PsiElement([)('[')\n              LITERAL\n                PsiElement(int)('0')\n              PsiElement(])(']')\n            PsiElement([)('[')\n            LITERAL\n              PsiElement(int)('0')\n            PsiElement(])(']')\n          PsiElement([)('[')\n          LITERAL\n            PsiElement(int)('0')\n          PsiElement(])(']')\n      PsiElement(})('}')\n  PsiComment(GO_LINE_COMMENT)('// A sequence of non-constant indexings.')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('IndexChain2')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('s')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('A')\n        PsiElement(,)(',')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('i')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('int')\n        PsiElement())(')')\n      RESULT\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('A')\n    BLOCK\n      PsiElement({)('{')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n        INDEX_OR_SLICE_EXPR\n          INDEX_OR_SLICE_EXPR\n            INDEX_OR_SLICE_EXPR\n              INDEX_OR_SLICE_EXPR\n                INDEX_OR_SLICE_EXPR\n                  INDEX_OR_SLICE_EXPR\n                    INDEX_OR_SLICE_EXPR\n                      INDEX_OR_SLICE_EXPR\n                        INDEX_OR_SLICE_EXPR\n                          INDEX_OR_SLICE_EXPR\n                            INDEX_OR_SLICE_EXPR\n                              INDEX_OR_SLICE_EXPR\n                                INDEX_OR_SLICE_EXPR\n                                  INDEX_OR_SLICE_EXPR\n                                    INDEX_OR_SLICE_EXPR\n                                      INDEX_OR_SLICE_EXPR\n                                        REFERENCE_EXPRESSION\n                                          PsiElement(identifier)('s')\n                                        PsiElement([)('[')\n                                        REFERENCE_EXPRESSION\n                                          PsiElement(identifier)('i')\n                                        PsiElement(])(']')\n                                      PsiElement([)('[')\n                                      REFERENCE_EXPRESSION\n                                        PsiElement(identifier)('i')\n                                      PsiElement(])(']')\n                                    PsiElement([)('[')\n                                    REFERENCE_EXPRESSION\n                                      PsiElement(identifier)('i')\n                                    PsiElement(])(']')\n                                  PsiElement([)('[')\n                                  REFERENCE_EXPRESSION\n                                    PsiElement(identifier)('i')\n                                  PsiElement(])(']')\n                                PsiElement([)('[')\n                                REFERENCE_EXPRESSION\n                                  PsiElement(identifier)('i')\n                                PsiElement(])(']')\n                              PsiElement([)('[')\n                              REFERENCE_EXPRESSION\n                                PsiElement(identifier)('i')\n                              PsiElement(])(']')\n                            PsiElement([)('[')\n                            REFERENCE_EXPRESSION\n                              PsiElement(identifier)('i')\n                            PsiElement(])(']')\n                          PsiElement([)('[')\n                          REFERENCE_EXPRESSION\n                            PsiElement(identifier)('i')\n                          PsiElement(])(']')\n                        PsiElement([)('[')\n                        REFERENCE_EXPRESSION\n                          PsiElement(identifier)('i')\n                        PsiElement(])(']')\n                      PsiElement([)('[')\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('i')\n                      PsiElement(])(']')\n                    PsiElement([)('[')\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('i')\n                    PsiElement(])(']')\n                  PsiElement([)('[')\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('i')\n                  PsiElement(])(']')\n                PsiElement([)('[')\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('i')\n                PsiElement(])(']')\n              PsiElement([)('[')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('i')\n              PsiElement(])(']')\n            PsiElement([)('[')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('i')\n            PsiElement(])(']')\n          PsiElement([)('[')\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('i')\n          PsiElement(])(']')\n      PsiElement(})('}')\n  PsiComment(GO_LINE_COMMENT)('// Another sequence of indexings.')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('IndexChain3')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('s')\n          ARRAY_OR_SLICE_TYPE\n            PsiElement([)('[')\n            PsiElement(])(']')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('int')\n        PsiElement())(')')\n      RESULT\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('int')\n    BLOCK\n      PsiElement({)('{')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n        INDEX_OR_SLICE_EXPR\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('s')\n          PsiElement([)('[')\n          INDEX_OR_SLICE_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('s')\n            PsiElement([)('[')\n            INDEX_OR_SLICE_EXPR\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('s')\n              PsiElement([)('[')\n              INDEX_OR_SLICE_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('s')\n                PsiElement([)('[')\n                INDEX_OR_SLICE_EXPR\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('s')\n                  PsiElement([)('[')\n                  INDEX_OR_SLICE_EXPR\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('s')\n                    PsiElement([)('[')\n                    INDEX_OR_SLICE_EXPR\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('s')\n                      PsiElement([)('[')\n                      INDEX_OR_SLICE_EXPR\n                        REFERENCE_EXPRESSION\n                          PsiElement(identifier)('s')\n                        PsiElement([)('[')\n                        INDEX_OR_SLICE_EXPR\n                          REFERENCE_EXPRESSION\n                            PsiElement(identifier)('s')\n                          PsiElement([)('[')\n                          INDEX_OR_SLICE_EXPR\n                            REFERENCE_EXPRESSION\n                              PsiElement(identifier)('s')\n                            PsiElement([)('[')\n                            INDEX_OR_SLICE_EXPR\n                              REFERENCE_EXPRESSION\n                                PsiElement(identifier)('s')\n                              PsiElement([)('[')\n                              INDEX_OR_SLICE_EXPR\n                                REFERENCE_EXPRESSION\n                                  PsiElement(identifier)('s')\n                                PsiElement([)('[')\n                                INDEX_OR_SLICE_EXPR\n                                  REFERENCE_EXPRESSION\n                                    PsiElement(identifier)('s')\n                                  PsiElement([)('[')\n                                  INDEX_OR_SLICE_EXPR\n                                    REFERENCE_EXPRESSION\n                                      PsiElement(identifier)('s')\n                                    PsiElement([)('[')\n                                    INDEX_OR_SLICE_EXPR\n                                      REFERENCE_EXPRESSION\n                                        PsiElement(identifier)('s')\n                                      PsiElement([)('[')\n                                      INDEX_OR_SLICE_EXPR\n                                        REFERENCE_EXPRESSION\n                                          PsiElement(identifier)('s')\n                                        PsiElement([)('[')\n                                        INDEX_OR_SLICE_EXPR\n                                          REFERENCE_EXPRESSION\n                                            PsiElement(identifier)('s')\n                                          PsiElement([)('[')\n                                          INDEX_OR_SLICE_EXPR\n                                            REFERENCE_EXPRESSION\n                                              PsiElement(identifier)('s')\n                                            PsiElement([)('[')\n                                            INDEX_OR_SLICE_EXPR\n                                              REFERENCE_EXPRESSION\n                                                PsiElement(identifier)('s')\n                                              PsiElement([)('[')\n                                              INDEX_OR_SLICE_EXPR\n                                                REFERENCE_EXPRESSION\n                                                  PsiElement(identifier)('s')\n                                                PsiElement([)('[')\n                                                INDEX_OR_SLICE_EXPR\n                                                  REFERENCE_EXPRESSION\n                                                    PsiElement(identifier)('s')\n                                                  PsiElement([)('[')\n                                                  LITERAL\n                                                    PsiElement(int)('0')\n                                                  PsiElement(])(']')\n                                                PsiElement(])(']')\n                                              PsiElement(])(']')\n                                            PsiElement(])(']')\n                                          PsiElement(])(']')\n                                        PsiElement(])(']')\n                                      PsiElement(])(']')\n                                    PsiElement(])(']')\n                                  PsiElement(])(']')\n                                PsiElement(])(']')\n                              PsiElement(])(']')\n                            PsiElement(])(']')\n                          PsiElement(])(']')\n                        PsiElement(])(']')\n                      PsiElement(])(']')\n                    PsiElement(])(']')\n                  PsiElement(])(']')\n                PsiElement(])(']')\n              PsiElement(])(']')\n            PsiElement(])(']')\n          PsiElement(])(']')\n      PsiElement(})('}')\n  PsiComment(GO_LINE_COMMENT)('// A right-leaning tree of byte multiplications.')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('righttree')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('a')\n          PsiElement(,)(',')\n          PARAM_DEFINITION\n            PsiElement(identifier)('b')\n          PsiElement(,)(',')\n          PARAM_DEFINITION\n            PsiElement(identifier)('c')\n          PsiElement(,)(',')\n          PARAM_DEFINITION\n            PsiElement(identifier)('d')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('uint8')\n        PsiElement())(')')\n      RESULT\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('uint8')\n    BLOCK\n      PsiElement({)('{')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n        MUL_EXPR\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('a')\n          PsiElement(*)('*')\n          PARENTHESES_EXPR\n            PsiElement(()('(')\n            MUL_EXPR\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('b')\n              PsiElement(*)('*')\n              PARENTHESES_EXPR\n                PsiElement(()('(')\n                MUL_EXPR\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('c')\n                  PsiElement(*)('*')\n                  PARENTHESES_EXPR\n                    PsiElement(()('(')\n                    MUL_EXPR\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('d')\n                      PsiElement(*)('*')\n                      PARENTHESES_EXPR\n                        PsiElement(()('(')\n                        MUL_EXPR\n                          REFERENCE_EXPRESSION\n                            PsiElement(identifier)('a')\n                          PsiElement(*)('*')\n                          PARENTHESES_EXPR\n                            PsiElement(()('(')\n                            MUL_EXPR\n                              REFERENCE_EXPRESSION\n                                PsiElement(identifier)('b')\n                              PsiElement(*)('*')\n                              PARENTHESES_EXPR\n                                PsiElement(()('(')\n                                MUL_EXPR\n                                  REFERENCE_EXPRESSION\n                                    PsiElement(identifier)('c')\n                                  PsiElement(*)('*')\n                                  PARENTHESES_EXPR\n                                    PsiElement(()('(')\n                                    MUL_EXPR\n                                      REFERENCE_EXPRESSION\n                                        PsiElement(identifier)('d')\n                                      PsiElement(*)('*')\n                                      PARENTHESES_EXPR\n                                        PsiElement(()('(')\n                                        MUL_EXPR\n                                          REFERENCE_EXPRESSION\n                                            PsiElement(identifier)('a')\n                                          PsiElement(*)('*')\n                                          PARENTHESES_EXPR\n                                            PsiElement(()('(')\n                                            MUL_EXPR\n                                              REFERENCE_EXPRESSION\n                                                PsiElement(identifier)('b')\n                                              PsiElement(*)('*')\n                                              PARENTHESES_EXPR\n                                                PsiElement(()('(')\n                                                MUL_EXPR\n                                                  REFERENCE_EXPRESSION\n                                                    PsiElement(identifier)('c')\n                                                  PsiElement(*)('*')\n                                                  PARENTHESES_EXPR\n                                                    PsiElement(()('(')\n                                                    MUL_EXPR\n                                                      REFERENCE_EXPRESSION\n                                                        PsiElement(identifier)('d')\n                                                      PsiElement(*)('*')\n                                                      PARENTHESES_EXPR\n                                                        PsiElement(()('(')\n                                                        MUL_EXPR\n                                                          REFERENCE_EXPRESSION\n                                                            PsiElement(identifier)('a')\n                                                          PsiElement(*)('*')\n                                                          PARENTHESES_EXPR\n                                                            PsiElement(()('(')\n                                                            MUL_EXPR\n                                                              REFERENCE_EXPRESSION\n                                                                PsiElement(identifier)('b')\n                                                              PsiElement(*)('*')\n                                                              PARENTHESES_EXPR\n                                                                PsiElement(()('(')\n                                                                MUL_EXPR\n                                                                  REFERENCE_EXPRESSION\n                                                                    PsiElement(identifier)('c')\n                                                                  PsiElement(*)('*')\n                                                                  PARENTHESES_EXPR\n                                                                    PsiElement(()('(')\n                                                                    MUL_EXPR\n                                                                      REFERENCE_EXPRESSION\n                                                                        PsiElement(identifier)('d')\n                                                                      PsiElement(*)('*')\n                                                                      PARENTHESES_EXPR\n                                                                        PsiElement(()('(')\n                                                                        MUL_EXPR\n                                                                          REFERENCE_EXPRESSION\n                                                                            PsiElement(identifier)('a')\n                                                                          PsiElement(*)('*')\n                                                                          PARENTHESES_EXPR\n                                                                            PsiElement(()('(')\n                                                                            MUL_EXPR\n                                                                              REFERENCE_EXPRESSION\n                                                                                PsiElement(identifier)('b')\n                                                                              PsiElement(*)('*')\n                                                                              PARENTHESES_EXPR\n                                                                                PsiElement(()('(')\n                                                                                MUL_EXPR\n                                                                                  REFERENCE_EXPRESSION\n                                                                                    PsiElement(identifier)('c')\n                                                                                  PsiElement(*)('*')\n                                                                                  PARENTHESES_EXPR\n                                                                                    PsiElement(()('(')\n                                                                                    MUL_EXPR\n                                                                                      MUL_EXPR\n                                                                                        REFERENCE_EXPRESSION\n                                                                                          PsiElement(identifier)('d')\n                                                                                        PsiElement(*)('*')\n                                                                                        REFERENCE_EXPRESSION\n                                                                                          PsiElement(identifier)('a')\n                                                                                      PsiElement(*)('*')\n                                                                                      PARENTHESES_EXPR\n                                                                                        PsiElement(()('(')\n                                                                                        MUL_EXPR\n                                                                                          REFERENCE_EXPRESSION\n                                                                                            PsiElement(identifier)('b')\n                                                                                          PsiElement(*)('*')\n                                                                                          PARENTHESES_EXPR\n                                                                                            PsiElement(()('(')\n                                                                                            MUL_EXPR\n                                                                                              REFERENCE_EXPRESSION\n                                                                                                PsiElement(identifier)('c')\n                                                                                              PsiElement(*)('*')\n                                                                                              REFERENCE_EXPRESSION\n                                                                                                PsiElement(identifier)('d')\n                                                                                            PsiElement())(')')\n                                                                                        PsiElement())(')')\n                                                                                    PsiElement())(')')\n                                                                                PsiElement())(')')\n                                                                            PsiElement())(')')\n                                                                        PsiElement())(')')\n                                                                    PsiElement())(')')\n                                                                PsiElement())(')')\n                                                            PsiElement())(')')\n                                                        PsiElement())(')')\n                                                    PsiElement())(')')\n                                                PsiElement())(')')\n                                            PsiElement())(')')\n                                        PsiElement())(')')\n                                    PsiElement())(')')\n                                PsiElement())(')')\n                            PsiElement())(')')\n                        PsiElement())(')')\n                    PsiElement())(')')\n                PsiElement())(')')\n            PsiElement())(')')\n      PsiElement(})('}')\n  PsiComment(GO_LINE_COMMENT)('// A left-leaning tree of byte multiplications.')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('lefttree')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('a')\n          PsiElement(,)(',')\n          PARAM_DEFINITION\n            PsiElement(identifier)('b')\n          PsiElement(,)(',')\n          PARAM_DEFINITION\n            PsiElement(identifier)('c')\n          PsiElement(,)(',')\n          PARAM_DEFINITION\n            PsiElement(identifier)('d')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('uint8')\n        PsiElement())(')')\n      RESULT\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('uint8')\n    BLOCK\n      PsiElement({)('{')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n        PARENTHESES_EXPR\n          PsiElement(()('(')\n          MUL_EXPR\n            PARENTHESES_EXPR\n              PsiElement(()('(')\n              MUL_EXPR\n                PARENTHESES_EXPR\n                  PsiElement(()('(')\n                  MUL_EXPR\n                    PARENTHESES_EXPR\n                      PsiElement(()('(')\n                      MUL_EXPR\n                        MUL_EXPR\n                          PARENTHESES_EXPR\n                            PsiElement(()('(')\n                            MUL_EXPR\n                              PARENTHESES_EXPR\n                                PsiElement(()('(')\n                                MUL_EXPR\n                                  PARENTHESES_EXPR\n                                    PsiElement(()('(')\n                                    MUL_EXPR\n                                      MUL_EXPR\n                                        PARENTHESES_EXPR\n                                          PsiElement(()('(')\n                                          MUL_EXPR\n                                            PARENTHESES_EXPR\n                                              PsiElement(()('(')\n                                              MUL_EXPR\n                                                PARENTHESES_EXPR\n                                                  PsiElement(()('(')\n                                                  MUL_EXPR\n                                                    MUL_EXPR\n                                                      PARENTHESES_EXPR\n                                                        PsiElement(()('(')\n                                                        MUL_EXPR\n                                                          PARENTHESES_EXPR\n                                                            PsiElement(()('(')\n                                                            MUL_EXPR\n                                                              PARENTHESES_EXPR\n                                                                PsiElement(()('(')\n                                                                MUL_EXPR\n                                                                  MUL_EXPR\n                                                                    PARENTHESES_EXPR\n                                                                      PsiElement(()('(')\n                                                                      MUL_EXPR\n                                                                        PARENTHESES_EXPR\n                                                                          PsiElement(()('(')\n                                                                          MUL_EXPR\n                                                                            PARENTHESES_EXPR\n                                                                              PsiElement(()('(')\n                                                                              MUL_EXPR\n                                                                                MUL_EXPR\n                                                                                  PARENTHESES_EXPR\n                                                                                    PsiElement(()('(')\n                                                                                    MUL_EXPR\n                                                                                      PARENTHESES_EXPR\n                                                                                        PsiElement(()('(')\n                                                                                        MUL_EXPR\n                                                                                          REFERENCE_EXPRESSION\n                                                                                            PsiElement(identifier)('a')\n                                                                                          PsiElement(*)('*')\n                                                                                          REFERENCE_EXPRESSION\n                                                                                            PsiElement(identifier)('b')\n                                                                                        PsiElement())(')')\n                                                                                      PsiElement(*)('*')\n                                                                                      REFERENCE_EXPRESSION\n                                                                                        PsiElement(identifier)('c')\n                                                                                    PsiElement())(')')\n                                                                                  PsiElement(*)('*')\n                                                                                  REFERENCE_EXPRESSION\n                                                                                    PsiElement(identifier)('d')\n                                                                                PsiElement(*)('*')\n                                                                                REFERENCE_EXPRESSION\n                                                                                  PsiElement(identifier)('a')\n                                                                              PsiElement())(')')\n                                                                            PsiElement(*)('*')\n                                                                            REFERENCE_EXPRESSION\n                                                                              PsiElement(identifier)('b')\n                                                                          PsiElement())(')')\n                                                                        PsiElement(*)('*')\n                                                                        REFERENCE_EXPRESSION\n                                                                          PsiElement(identifier)('c')\n                                                                      PsiElement())(')')\n                                                                    PsiElement(*)('*')\n                                                                    REFERENCE_EXPRESSION\n                                                                      PsiElement(identifier)('d')\n                                                                  PsiElement(*)('*')\n                                                                  REFERENCE_EXPRESSION\n                                                                    PsiElement(identifier)('a')\n                                                                PsiElement())(')')\n                                                              PsiElement(*)('*')\n                                                              REFERENCE_EXPRESSION\n                                                                PsiElement(identifier)('b')\n                                                            PsiElement())(')')\n                                                          PsiElement(*)('*')\n                                                          REFERENCE_EXPRESSION\n                                                            PsiElement(identifier)('c')\n                                                        PsiElement())(')')\n                                                      PsiElement(*)('*')\n                                                      REFERENCE_EXPRESSION\n                                                        PsiElement(identifier)('d')\n                                                    PsiElement(*)('*')\n                                                    REFERENCE_EXPRESSION\n                                                      PsiElement(identifier)('a')\n                                                  PsiElement())(')')\n                                                PsiElement(*)('*')\n                                                REFERENCE_EXPRESSION\n                                                  PsiElement(identifier)('b')\n                                              PsiElement())(')')\n                                            PsiElement(*)('*')\n                                            REFERENCE_EXPRESSION\n                                              PsiElement(identifier)('c')\n                                          PsiElement())(')')\n                                        PsiElement(*)('*')\n                                        REFERENCE_EXPRESSION\n                                          PsiElement(identifier)('d')\n                                      PsiElement(*)('*')\n                                      REFERENCE_EXPRESSION\n                                        PsiElement(identifier)('a')\n                                    PsiElement())(')')\n                                  PsiElement(*)('*')\n                                  REFERENCE_EXPRESSION\n                                    PsiElement(identifier)('b')\n                                PsiElement())(')')\n                              PsiElement(*)('*')\n                              REFERENCE_EXPRESSION\n                                PsiElement(identifier)('c')\n                            PsiElement())(')')\n                          PsiElement(*)('*')\n                          REFERENCE_EXPRESSION\n                            PsiElement(identifier)('d')\n                        PsiElement(*)('*')\n                        REFERENCE_EXPRESSION\n                          PsiElement(identifier)('a')\n                      PsiElement())(')')\n                    PsiElement(*)('*')\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('b')\n                  PsiElement())(')')\n                PsiElement(*)('*')\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('c')\n              PsiElement())(')')\n            PsiElement(*)('*')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('d')\n          PsiElement())(')')\n      PsiElement(})('}')\n  TYPE_DECLARATION\n    PsiElement(type)('type')\n    TYPE_SPEC\n      SPEC_TYPE\n        PsiElement(identifier)('T')\n        STRUCT_TYPE\n          PsiElement(struct)('struct')\n          PsiElement({)('{')\n          FIELD_DECLARATION\n            FIELD_DEFINITION\n              PsiElement(identifier)('Next')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('I')\n          PsiElement(})('}')\n  TYPE_DECLARATION\n    PsiElement(type)('type')\n    TYPE_SPEC\n      SPEC_TYPE\n        PsiElement(identifier)('I')\n        INTERFACE_TYPE\n          PsiElement(interface)('interface')\n          PsiElement({)('{')\n          PsiElement(})('}')\n  PsiComment(GO_LINE_COMMENT)('// A chains of type assertions.')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('ChainT')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('t')\n          POINTER_TYPE\n            PsiElement(*)('*')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('T')\n        PsiElement())(')')\n      RESULT\n        POINTER_TYPE\n          PsiElement(*)('*')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('T')\n    BLOCK\n      PsiElement({)('{')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n        TYPE_ASSERTION_EXPR\n          SELECTOR_EXPR\n            TYPE_ASSERTION_EXPR\n              SELECTOR_EXPR\n                TYPE_ASSERTION_EXPR\n                  SELECTOR_EXPR\n                    TYPE_ASSERTION_EXPR\n                      SELECTOR_EXPR\n                        TYPE_ASSERTION_EXPR\n                          SELECTOR_EXPR\n                            TYPE_ASSERTION_EXPR\n                              SELECTOR_EXPR\n                                TYPE_ASSERTION_EXPR\n                                  SELECTOR_EXPR\n                                    TYPE_ASSERTION_EXPR\n                                      SELECTOR_EXPR\n                                        TYPE_ASSERTION_EXPR\n                                          SELECTOR_EXPR\n                                            TYPE_ASSERTION_EXPR\n                                              SELECTOR_EXPR\n                                                TYPE_ASSERTION_EXPR\n                                                  SELECTOR_EXPR\n                                                    TYPE_ASSERTION_EXPR\n                                                      SELECTOR_EXPR\n                                                        TYPE_ASSERTION_EXPR\n                                                          SELECTOR_EXPR\n                                                            TYPE_ASSERTION_EXPR\n                                                              SELECTOR_EXPR\n                                                                TYPE_ASSERTION_EXPR\n                                                                  SELECTOR_EXPR\n                                                                    TYPE_ASSERTION_EXPR\n                                                                      SELECTOR_EXPR\n                                                                        TYPE_ASSERTION_EXPR\n                                                                          SELECTOR_EXPR\n                                                                            TYPE_ASSERTION_EXPR\n                                                                              SELECTOR_EXPR\n                                                                                TYPE_ASSERTION_EXPR\n                                                                                  SELECTOR_EXPR\n                                                                                    TYPE_ASSERTION_EXPR\n                                                                                      REFERENCE_EXPRESSION\n                                                                                        REFERENCE_EXPRESSION\n                                                                                          PsiElement(identifier)('t')\n                                                                                        PsiElement(.)('.')\n                                                                                        PsiElement(identifier)('Next')\n                                                                                      PsiElement(.)('.')\n                                                                                      PsiElement(()('(')\n                                                                                      POINTER_TYPE\n                                                                                        PsiElement(*)('*')\n                                                                                        TYPE\n                                                                                          TYPE_REFERENCE_EXPRESSION\n                                                                                            PsiElement(identifier)('T')\n                                                                                      PsiElement())(')')\n                                                                                    PsiElement(.)('.')\n                                                                                    REFERENCE_EXPRESSION\n                                                                                      PsiElement(identifier)('Next')\n                                                                                  PsiElement(.)('.')\n                                                                                  PsiElement(()('(')\n                                                                                  POINTER_TYPE\n                                                                                    PsiElement(*)('*')\n                                                                                    TYPE\n                                                                                      TYPE_REFERENCE_EXPRESSION\n                                                                                        PsiElement(identifier)('T')\n                                                                                  PsiElement())(')')\n                                                                                PsiElement(.)('.')\n                                                                                REFERENCE_EXPRESSION\n                                                                                  PsiElement(identifier)('Next')\n                                                                              PsiElement(.)('.')\n                                                                              PsiElement(()('(')\n                                                                              POINTER_TYPE\n                                                                                PsiElement(*)('*')\n                                                                                TYPE\n                                                                                  TYPE_REFERENCE_EXPRESSION\n                                                                                    PsiElement(identifier)('T')\n                                                                              PsiElement())(')')\n                                                                            PsiElement(.)('.')\n                                                                            REFERENCE_EXPRESSION\n                                                                              PsiElement(identifier)('Next')\n                                                                          PsiElement(.)('.')\n                                                                          PsiElement(()('(')\n                                                                          POINTER_TYPE\n                                                                            PsiElement(*)('*')\n                                                                            TYPE\n                                                                              TYPE_REFERENCE_EXPRESSION\n                                                                                PsiElement(identifier)('T')\n                                                                          PsiElement())(')')\n                                                                        PsiElement(.)('.')\n                                                                        REFERENCE_EXPRESSION\n                                                                          PsiElement(identifier)('Next')\n                                                                      PsiElement(.)('.')\n                                                                      PsiElement(()('(')\n                                                                      POINTER_TYPE\n                                                                        PsiElement(*)('*')\n                                                                        TYPE\n                                                                          TYPE_REFERENCE_EXPRESSION\n                                                                            PsiElement(identifier)('T')\n                                                                      PsiElement())(')')\n                                                                    PsiElement(.)('.')\n                                                                    REFERENCE_EXPRESSION\n                                                                      PsiElement(identifier)('Next')\n                                                                  PsiElement(.)('.')\n                                                                  PsiElement(()('(')\n                                                                  POINTER_TYPE\n                                                                    PsiElement(*)('*')\n                                                                    TYPE\n                                                                      TYPE_REFERENCE_EXPRESSION\n                                                                        PsiElement(identifier)('T')\n                                                                  PsiElement())(')')\n                                                                PsiElement(.)('.')\n                                                                REFERENCE_EXPRESSION\n                                                                  PsiElement(identifier)('Next')\n                                                              PsiElement(.)('.')\n                                                              PsiElement(()('(')\n                                                              POINTER_TYPE\n                                                                PsiElement(*)('*')\n                                                                TYPE\n                                                                  TYPE_REFERENCE_EXPRESSION\n                                                                    PsiElement(identifier)('T')\n                                                              PsiElement())(')')\n                                                            PsiElement(.)('.')\n                                                            REFERENCE_EXPRESSION\n                                                              PsiElement(identifier)('Next')\n                                                          PsiElement(.)('.')\n                                                          PsiElement(()('(')\n                                                          POINTER_TYPE\n                                                            PsiElement(*)('*')\n                                                            TYPE\n                                                              TYPE_REFERENCE_EXPRESSION\n                                                                PsiElement(identifier)('T')\n                                                          PsiElement())(')')\n                                                        PsiElement(.)('.')\n                                                        REFERENCE_EXPRESSION\n                                                          PsiElement(identifier)('Next')\n                                                      PsiElement(.)('.')\n                                                      PsiElement(()('(')\n                                                      POINTER_TYPE\n                                                        PsiElement(*)('*')\n                                                        TYPE\n                                                          TYPE_REFERENCE_EXPRESSION\n                                                            PsiElement(identifier)('T')\n                                                      PsiElement())(')')\n                                                    PsiElement(.)('.')\n                                                    REFERENCE_EXPRESSION\n                                                      PsiElement(identifier)('Next')\n                                                  PsiElement(.)('.')\n                                                  PsiElement(()('(')\n                                                  POINTER_TYPE\n                                                    PsiElement(*)('*')\n                                                    TYPE\n                                                      TYPE_REFERENCE_EXPRESSION\n                                                        PsiElement(identifier)('T')\n                                                  PsiElement())(')')\n                                                PsiElement(.)('.')\n                                                REFERENCE_EXPRESSION\n                                                  PsiElement(identifier)('Next')\n                                              PsiElement(.)('.')\n                                              PsiElement(()('(')\n                                              POINTER_TYPE\n                                                PsiElement(*)('*')\n                                                TYPE\n                                                  TYPE_REFERENCE_EXPRESSION\n                                                    PsiElement(identifier)('T')\n                                              PsiElement())(')')\n                                            PsiElement(.)('.')\n                                            REFERENCE_EXPRESSION\n                                              PsiElement(identifier)('Next')\n                                          PsiElement(.)('.')\n                                          PsiElement(()('(')\n                                          POINTER_TYPE\n                                            PsiElement(*)('*')\n                                            TYPE\n                                              TYPE_REFERENCE_EXPRESSION\n                                                PsiElement(identifier)('T')\n                                          PsiElement())(')')\n                                        PsiElement(.)('.')\n                                        REFERENCE_EXPRESSION\n                                          PsiElement(identifier)('Next')\n                                      PsiElement(.)('.')\n                                      PsiElement(()('(')\n                                      POINTER_TYPE\n                                        PsiElement(*)('*')\n                                        TYPE\n                                          TYPE_REFERENCE_EXPRESSION\n                                            PsiElement(identifier)('T')\n                                      PsiElement())(')')\n                                    PsiElement(.)('.')\n                                    REFERENCE_EXPRESSION\n                                      PsiElement(identifier)('Next')\n                                  PsiElement(.)('.')\n                                  PsiElement(()('(')\n                                  POINTER_TYPE\n                                    PsiElement(*)('*')\n                                    TYPE\n                                      TYPE_REFERENCE_EXPRESSION\n                                        PsiElement(identifier)('T')\n                                  PsiElement())(')')\n                                PsiElement(.)('.')\n                                REFERENCE_EXPRESSION\n                                  PsiElement(identifier)('Next')\n                              PsiElement(.)('.')\n                              PsiElement(()('(')\n                              POINTER_TYPE\n                                PsiElement(*)('*')\n                                TYPE\n                                  TYPE_REFERENCE_EXPRESSION\n                                    PsiElement(identifier)('T')\n                              PsiElement())(')')\n                            PsiElement(.)('.')\n                            REFERENCE_EXPRESSION\n                              PsiElement(identifier)('Next')\n                          PsiElement(.)('.')\n                          PsiElement(()('(')\n                          POINTER_TYPE\n                            PsiElement(*)('*')\n                            TYPE\n                              TYPE_REFERENCE_EXPRESSION\n                                PsiElement(identifier)('T')\n                          PsiElement())(')')\n                        PsiElement(.)('.')\n                        REFERENCE_EXPRESSION\n                          PsiElement(identifier)('Next')\n                      PsiElement(.)('.')\n                      PsiElement(()('(')\n                      POINTER_TYPE\n                        PsiElement(*)('*')\n                        TYPE\n                          TYPE_REFERENCE_EXPRESSION\n                            PsiElement(identifier)('T')\n                      PsiElement())(')')\n                    PsiElement(.)('.')\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('Next')\n                  PsiElement(.)('.')\n                  PsiElement(()('(')\n                  POINTER_TYPE\n                    PsiElement(*)('*')\n                    TYPE\n                      TYPE_REFERENCE_EXPRESSION\n                        PsiElement(identifier)('T')\n                  PsiElement())(')')\n                PsiElement(.)('.')\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('Next')\n              PsiElement(.)('.')\n              PsiElement(()('(')\n              POINTER_TYPE\n                PsiElement(*)('*')\n                TYPE\n                  TYPE_REFERENCE_EXPRESSION\n                    PsiElement(identifier)('T')\n              PsiElement())(')')\n            PsiElement(.)('.')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('Next')\n          PsiElement(.)('.')\n          PsiElement(()('(')\n          POINTER_TYPE\n            PsiElement(*)('*')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('T')\n          PsiElement())(')')\n      PsiElement(})('}')\n  TYPE_DECLARATION\n    PsiElement(type)('type')\n    TYPE_SPEC\n      SPEC_TYPE\n        PsiElement(identifier)('U')\n        STRUCT_TYPE\n          PsiElement(struct)('struct')\n          PsiElement({)('{')\n          FIELD_DECLARATION\n            FIELD_DEFINITION\n              PsiElement(identifier)('Children')\n            ARRAY_OR_SLICE_TYPE\n              PsiElement([)('[')\n              PsiElement(])(']')\n              TYPE\n                TYPE_REFERENCE_EXPRESSION\n                  PsiElement(identifier)('J')\n          PsiElement(})('}')\n  METHOD_DECLARATION\n    PsiElement(func)('func')\n    RECEIVER\n      PsiElement(()('(')\n      PsiElement(identifier)('u')\n      POINTER_TYPE\n        PsiElement(*)('*')\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('U')\n      PsiElement())(')')\n    PsiElement(identifier)('Child')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('n')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('int')\n        PsiElement())(')')\n      RESULT\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('J')\n    BLOCK\n      PsiElement({)('{')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n        INDEX_OR_SLICE_EXPR\n          REFERENCE_EXPRESSION\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('u')\n            PsiElement(.)('.')\n            PsiElement(identifier)('Children')\n          PsiElement([)('[')\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('n')\n          PsiElement(])(']')\n      PsiElement(})('}')\n  TYPE_DECLARATION\n    PsiElement(type)('type')\n    TYPE_SPEC\n      SPEC_TYPE\n        PsiElement(identifier)('J')\n        INTERFACE_TYPE\n          PsiElement(interface)('interface')\n          PsiElement({)('{')\n          METHOD_SPEC\n            PsiElement(identifier)('Child')\n            SIGNATURE\n              PARAMETERS\n                PsiElement(()('(')\n                PARAMETER_DECLARATION\n                  PARAM_DEFINITION\n                    PsiElement(identifier)('n')\n                  TYPE\n                    TYPE_REFERENCE_EXPRESSION\n                      PsiElement(identifier)('int')\n                PsiElement())(')')\n              RESULT\n                TYPE\n                  TYPE_REFERENCE_EXPRESSION\n                    PsiElement(identifier)('J')\n          PsiElement(})('}')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('ChainUAssert')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('u')\n          POINTER_TYPE\n            PsiElement(*)('*')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('U')\n        PsiElement())(')')\n      RESULT\n        POINTER_TYPE\n          PsiElement(*)('*')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('U')\n    BLOCK\n      PsiElement({)('{')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n        TYPE_ASSERTION_EXPR\n          CALL_EXPR\n            SELECTOR_EXPR\n              TYPE_ASSERTION_EXPR\n                CALL_EXPR\n                  SELECTOR_EXPR\n                    TYPE_ASSERTION_EXPR\n                      CALL_EXPR\n                        SELECTOR_EXPR\n                          TYPE_ASSERTION_EXPR\n                            CALL_EXPR\n                              SELECTOR_EXPR\n                                TYPE_ASSERTION_EXPR\n                                  CALL_EXPR\n                                    SELECTOR_EXPR\n                                      TYPE_ASSERTION_EXPR\n                                        CALL_EXPR\n                                          SELECTOR_EXPR\n                                            TYPE_ASSERTION_EXPR\n                                              CALL_EXPR\n                                                SELECTOR_EXPR\n                                                  TYPE_ASSERTION_EXPR\n                                                    CALL_EXPR\n                                                      SELECTOR_EXPR\n                                                        TYPE_ASSERTION_EXPR\n                                                          CALL_EXPR\n                                                            SELECTOR_EXPR\n                                                              TYPE_ASSERTION_EXPR\n                                                                CALL_EXPR\n                                                                  SELECTOR_EXPR\n                                                                    TYPE_ASSERTION_EXPR\n                                                                      CALL_EXPR\n                                                                        SELECTOR_EXPR\n                                                                          TYPE_ASSERTION_EXPR\n                                                                            CALL_EXPR\n                                                                              SELECTOR_EXPR\n                                                                                TYPE_ASSERTION_EXPR\n                                                                                  CALL_EXPR\n                                                                                    SELECTOR_EXPR\n                                                                                      TYPE_ASSERTION_EXPR\n                                                                                        CALL_EXPR\n                                                                                          SELECTOR_EXPR\n                                                                                            TYPE_ASSERTION_EXPR\n                                                                                              CALL_EXPR\n                                                                                                SELECTOR_EXPR\n                                                                                                  TYPE_ASSERTION_EXPR\n                                                                                                    CALL_EXPR\n                                                                                                      SELECTOR_EXPR\n                                                                                                        TYPE_ASSERTION_EXPR\n                                                                                                          CALL_EXPR\n                                                                                                            SELECTOR_EXPR\n                                                                                                              TYPE_ASSERTION_EXPR\n                                                                                                                CALL_EXPR\n                                                                                                                  SELECTOR_EXPR\n                                                                                                                    TYPE_ASSERTION_EXPR\n                                                                                                                      CALL_EXPR\n                                                                                                                        SELECTOR_EXPR\n                                                                                                                          TYPE_ASSERTION_EXPR\n                                                                                                                            CALL_EXPR\n                                                                                                                              SELECTOR_EXPR\n                                                                                                                                TYPE_ASSERTION_EXPR\n                                                                                                                                  CALL_EXPR\n                                                                                                                                    SELECTOR_EXPR\n                                                                                                                                      TYPE_ASSERTION_EXPR\n                                                                                                                                        CALL_EXPR\n                                                                                                                                          REFERENCE_EXPRESSION\n                                                                                                                                            REFERENCE_EXPRESSION\n                                                                                                                                              PsiElement(identifier)('u')\n                                                                                                                                            PsiElement(.)('.')\n                                                                                                                                            PsiElement(identifier)('Child')\n                                                                                                                                          ARGUMENT_LIST\n                                                                                                                                            PsiElement(()('(')\n                                                                                                                                            LITERAL\n                                                                                                                                              PsiElement(int)('0')\n                                                                                                                                            PsiElement())(')')\n                                                                                                                                        PsiElement(.)('.')\n                                                                                                                                        PsiElement(()('(')\n                                                                                                                                        POINTER_TYPE\n                                                                                                                                          PsiElement(*)('*')\n                                                                                                                                          TYPE\n                                                                                                                                            TYPE_REFERENCE_EXPRESSION\n                                                                                                                                              PsiElement(identifier)('U')\n                                                                                                                                        PsiElement())(')')\n                                                                                                                                      PsiElement(.)('.')\n                                                                                                                                      REFERENCE_EXPRESSION\n                                                                                                                                        PsiElement(identifier)('Child')\n                                                                                                                                    ARGUMENT_LIST\n                                                                                                                                      PsiElement(()('(')\n                                                                                                                                      LITERAL\n                                                                                                                                        PsiElement(int)('0')\n                                                                                                                                      PsiElement())(')')\n                                                                                                                                  PsiElement(.)('.')\n                                                                                                                                  PsiElement(()('(')\n                                                                                                                                  POINTER_TYPE\n                                                                                                                                    PsiElement(*)('*')\n                                                                                                                                    TYPE\n                                                                                                                                      TYPE_REFERENCE_EXPRESSION\n                                                                                                                                        PsiElement(identifier)('U')\n                                                                                                                                  PsiElement())(')')\n                                                                                                                                PsiElement(.)('.')\n                                                                                                                                REFERENCE_EXPRESSION\n                                                                                                                                  PsiElement(identifier)('Child')\n                                                                                                                              ARGUMENT_LIST\n                                                                                                                                PsiElement(()('(')\n                                                                                                                                LITERAL\n                                                                                                                                  PsiElement(int)('0')\n                                                                                                                                PsiElement())(')')\n                                                                                                                            PsiElement(.)('.')\n                                                                                                                            PsiElement(()('(')\n                                                                                                                            POINTER_TYPE\n                                                                                                                              PsiElement(*)('*')\n                                                                                                                              TYPE\n                                                                                                                                TYPE_REFERENCE_EXPRESSION\n                                                                                                                                  PsiElement(identifier)('U')\n                                                                                                                            PsiElement())(')')\n                                                                                                                          PsiElement(.)('.')\n                                                                                                                          REFERENCE_EXPRESSION\n                                                                                                                            PsiElement(identifier)('Child')\n                                                                                                                        ARGUMENT_LIST\n                                                                                                                          PsiElement(()('(')\n                                                                                                                          LITERAL\n                                                                                                                            PsiElement(int)('0')\n                                                                                                                          PsiElement())(')')\n                                                                                                                      PsiElement(.)('.')\n                                                                                                                      PsiElement(()('(')\n                                                                                                                      POINTER_TYPE\n                                                                                                                        PsiElement(*)('*')\n                                                                                                                        TYPE\n                                                                                                                          TYPE_REFERENCE_EXPRESSION\n                                                                                                                            PsiElement(identifier)('U')\n                                                                                                                      PsiElement())(')')\n                                                                                                                    PsiElement(.)('.')\n                                                                                                                    REFERENCE_EXPRESSION\n                                                                                                                      PsiElement(identifier)('Child')\n                                                                                                                  ARGUMENT_LIST\n                                                                                                                    PsiElement(()('(')\n                                                                                                                    LITERAL\n                                                                                                                      PsiElement(int)('0')\n                                                                                                                    PsiElement())(')')\n                                                                                                                PsiElement(.)('.')\n                                                                                                                PsiElement(()('(')\n                                                                                                                POINTER_TYPE\n                                                                                                                  PsiElement(*)('*')\n                                                                                                                  TYPE\n                                                                                                                    TYPE_REFERENCE_EXPRESSION\n                                                                                                                      PsiElement(identifier)('U')\n                                                                                                                PsiElement())(')')\n                                                                                                              PsiElement(.)('.')\n                                                                                                              REFERENCE_EXPRESSION\n                                                                                                                PsiElement(identifier)('Child')\n                                                                                                            ARGUMENT_LIST\n                                                                                                              PsiElement(()('(')\n                                                                                                              LITERAL\n                                                                                                                PsiElement(int)('0')\n                                                                                                              PsiElement())(')')\n                                                                                                          PsiElement(.)('.')\n                                                                                                          PsiElement(()('(')\n                                                                                                          POINTER_TYPE\n                                                                                                            PsiElement(*)('*')\n                                                                                                            TYPE\n                                                                                                              TYPE_REFERENCE_EXPRESSION\n                                                                                                                PsiElement(identifier)('U')\n                                                                                                          PsiElement())(')')\n                                                                                                        PsiElement(.)('.')\n                                                                                                        REFERENCE_EXPRESSION\n                                                                                                          PsiElement(identifier)('Child')\n                                                                                                      ARGUMENT_LIST\n                                                                                                        PsiElement(()('(')\n                                                                                                        LITERAL\n                                                                                                          PsiElement(int)('0')\n                                                                                                        PsiElement())(')')\n                                                                                                    PsiElement(.)('.')\n                                                                                                    PsiElement(()('(')\n                                                                                                    POINTER_TYPE\n                                                                                                      PsiElement(*)('*')\n                                                                                                      TYPE\n                                                                                                        TYPE_REFERENCE_EXPRESSION\n                                                                                                          PsiElement(identifier)('U')\n                                                                                                    PsiElement())(')')\n                                                                                                  PsiElement(.)('.')\n                                                                                                  REFERENCE_EXPRESSION\n                                                                                                    PsiElement(identifier)('Child')\n                                                                                                ARGUMENT_LIST\n                                                                                                  PsiElement(()('(')\n                                                                                                  LITERAL\n                                                                                                    PsiElement(int)('0')\n                                                                                                  PsiElement())(')')\n                                                                                              PsiElement(.)('.')\n                                                                                              PsiElement(()('(')\n                                                                                              POINTER_TYPE\n                                                                                                PsiElement(*)('*')\n                                                                                                TYPE\n                                                                                                  TYPE_REFERENCE_EXPRESSION\n                                                                                                    PsiElement(identifier)('U')\n                                                                                              PsiElement())(')')\n                                                                                            PsiElement(.)('.')\n                                                                                            REFERENCE_EXPRESSION\n                                                                                              PsiElement(identifier)('Child')\n                                                                                          ARGUMENT_LIST\n                                                                                            PsiElement(()('(')\n                                                                                            LITERAL\n                                                                                              PsiElement(int)('0')\n                                                                                            PsiElement())(')')\n                                                                                        PsiElement(.)('.')\n                                                                                        PsiElement(()('(')\n                                                                                        POINTER_TYPE\n                                                                                          PsiElement(*)('*')\n                                                                                          TYPE\n                                                                                            TYPE_REFERENCE_EXPRESSION\n                                                                                              PsiElement(identifier)('U')\n                                                                                        PsiElement())(')')\n                                                                                      PsiElement(.)('.')\n                                                                                      REFERENCE_EXPRESSION\n                                                                                        PsiElement(identifier)('Child')\n                                                                                    ARGUMENT_LIST\n                                                                                      PsiElement(()('(')\n                                                                                      LITERAL\n                                                                                        PsiElement(int)('0')\n                                                                                      PsiElement())(')')\n                                                                                  PsiElement(.)('.')\n                                                                                  PsiElement(()('(')\n                                                                                  POINTER_TYPE\n                                                                                    PsiElement(*)('*')\n                                                                                    TYPE\n                                                                                      TYPE_REFERENCE_EXPRESSION\n                                                                                        PsiElement(identifier)('U')\n                                                                                  PsiElement())(')')\n                                                                                PsiElement(.)('.')\n                                                                                REFERENCE_EXPRESSION\n                                                                                  PsiElement(identifier)('Child')\n                                                                              ARGUMENT_LIST\n                                                                                PsiElement(()('(')\n                                                                                LITERAL\n                                                                                  PsiElement(int)('0')\n                                                                                PsiElement())(')')\n                                                                            PsiElement(.)('.')\n                                                                            PsiElement(()('(')\n                                                                            POINTER_TYPE\n                                                                              PsiElement(*)('*')\n                                                                              TYPE\n                                                                                TYPE_REFERENCE_EXPRESSION\n                                                                                  PsiElement(identifier)('U')\n                                                                            PsiElement())(')')\n                                                                          PsiElement(.)('.')\n                                                                          REFERENCE_EXPRESSION\n                                                                            PsiElement(identifier)('Child')\n                                                                        ARGUMENT_LIST\n                                                                          PsiElement(()('(')\n                                                                          LITERAL\n                                                                            PsiElement(int)('0')\n                                                                          PsiElement())(')')\n                                                                      PsiElement(.)('.')\n                                                                      PsiElement(()('(')\n                                                                      POINTER_TYPE\n                                                                        PsiElement(*)('*')\n                                                                        TYPE\n                                                                          TYPE_REFERENCE_EXPRESSION\n                                                                            PsiElement(identifier)('U')\n                                                                      PsiElement())(')')\n                                                                    PsiElement(.)('.')\n                                                                    REFERENCE_EXPRESSION\n                                                                      PsiElement(identifier)('Child')\n                                                                  ARGUMENT_LIST\n                                                                    PsiElement(()('(')\n                                                                    LITERAL\n                                                                      PsiElement(int)('0')\n                                                                    PsiElement())(')')\n                                                                PsiElement(.)('.')\n                                                                PsiElement(()('(')\n                                                                POINTER_TYPE\n                                                                  PsiElement(*)('*')\n                                                                  TYPE\n                                                                    TYPE_REFERENCE_EXPRESSION\n                                                                      PsiElement(identifier)('U')\n                                                                PsiElement())(')')\n                                                              PsiElement(.)('.')\n                                                              REFERENCE_EXPRESSION\n                                                                PsiElement(identifier)('Child')\n                                                            ARGUMENT_LIST\n                                                              PsiElement(()('(')\n                                                              LITERAL\n                                                                PsiElement(int)('0')\n                                                              PsiElement())(')')\n                                                          PsiElement(.)('.')\n                                                          PsiElement(()('(')\n                                                          POINTER_TYPE\n                                                            PsiElement(*)('*')\n                                                            TYPE\n                                                              TYPE_REFERENCE_EXPRESSION\n                                                                PsiElement(identifier)('U')\n                                                          PsiElement())(')')\n                                                        PsiElement(.)('.')\n                                                        REFERENCE_EXPRESSION\n                                                          PsiElement(identifier)('Child')\n                                                      ARGUMENT_LIST\n                                                        PsiElement(()('(')\n                                                        LITERAL\n                                                          PsiElement(int)('0')\n                                                        PsiElement())(')')\n                                                    PsiElement(.)('.')\n                                                    PsiElement(()('(')\n                                                    POINTER_TYPE\n                                                      PsiElement(*)('*')\n                                                      TYPE\n                                                        TYPE_REFERENCE_EXPRESSION\n                                                          PsiElement(identifier)('U')\n                                                    PsiElement())(')')\n                                                  PsiElement(.)('.')\n                                                  REFERENCE_EXPRESSION\n                                                    PsiElement(identifier)('Child')\n                                                ARGUMENT_LIST\n                                                  PsiElement(()('(')\n                                                  LITERAL\n                                                    PsiElement(int)('0')\n                                                  PsiElement())(')')\n                                              PsiElement(.)('.')\n                                              PsiElement(()('(')\n                                              POINTER_TYPE\n                                                PsiElement(*)('*')\n                                                TYPE\n                                                  TYPE_REFERENCE_EXPRESSION\n                                                    PsiElement(identifier)('U')\n                                              PsiElement())(')')\n                                            PsiElement(.)('.')\n                                            REFERENCE_EXPRESSION\n                                              PsiElement(identifier)('Child')\n                                          ARGUMENT_LIST\n                                            PsiElement(()('(')\n                                            LITERAL\n                                              PsiElement(int)('0')\n                                            PsiElement())(')')\n                                        PsiElement(.)('.')\n                                        PsiElement(()('(')\n                                        POINTER_TYPE\n                                          PsiElement(*)('*')\n                                          TYPE\n                                            TYPE_REFERENCE_EXPRESSION\n                                              PsiElement(identifier)('U')\n                                        PsiElement())(')')\n                                      PsiElement(.)('.')\n                                      REFERENCE_EXPRESSION\n                                        PsiElement(identifier)('Child')\n                                    ARGUMENT_LIST\n                                      PsiElement(()('(')\n                                      LITERAL\n                                        PsiElement(int)('0')\n                                      PsiElement())(')')\n                                  PsiElement(.)('.')\n                                  PsiElement(()('(')\n                                  POINTER_TYPE\n                                    PsiElement(*)('*')\n                                    TYPE\n                                      TYPE_REFERENCE_EXPRESSION\n                                        PsiElement(identifier)('U')\n                                  PsiElement())(')')\n                                PsiElement(.)('.')\n                                REFERENCE_EXPRESSION\n                                  PsiElement(identifier)('Child')\n                              ARGUMENT_LIST\n                                PsiElement(()('(')\n                                LITERAL\n                                  PsiElement(int)('0')\n                                PsiElement())(')')\n                            PsiElement(.)('.')\n                            PsiElement(()('(')\n                            POINTER_TYPE\n                              PsiElement(*)('*')\n                              TYPE\n                                TYPE_REFERENCE_EXPRESSION\n                                  PsiElement(identifier)('U')\n                            PsiElement())(')')\n                          PsiElement(.)('.')\n                          REFERENCE_EXPRESSION\n                            PsiElement(identifier)('Child')\n                        ARGUMENT_LIST\n                          PsiElement(()('(')\n                          LITERAL\n                            PsiElement(int)('0')\n                          PsiElement())(')')\n                      PsiElement(.)('.')\n                      PsiElement(()('(')\n                      POINTER_TYPE\n                        PsiElement(*)('*')\n                        TYPE\n                          TYPE_REFERENCE_EXPRESSION\n                            PsiElement(identifier)('U')\n                      PsiElement())(')')\n                    PsiElement(.)('.')\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('Child')\n                  ARGUMENT_LIST\n                    PsiElement(()('(')\n                    LITERAL\n                      PsiElement(int)('0')\n                    PsiElement())(')')\n                PsiElement(.)('.')\n                PsiElement(()('(')\n                POINTER_TYPE\n                  PsiElement(*)('*')\n                  TYPE\n                    TYPE_REFERENCE_EXPRESSION\n                      PsiElement(identifier)('U')\n                PsiElement())(')')\n              PsiElement(.)('.')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('Child')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              LITERAL\n                PsiElement(int)('0')\n              PsiElement())(')')\n          PsiElement(.)('.')\n          PsiElement(()('(')\n          POINTER_TYPE\n            PsiElement(*)('*')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('U')\n          PsiElement())(')')\n      PsiElement(})('}')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('ChainUNoAssert')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('u')\n          POINTER_TYPE\n            PsiElement(*)('*')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('U')\n        PsiElement())(')')\n      RESULT\n        POINTER_TYPE\n          PsiElement(*)('*')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('U')\n    BLOCK\n      PsiElement({)('{')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n        TYPE_ASSERTION_EXPR\n          CALL_EXPR\n            SELECTOR_EXPR\n              CALL_EXPR\n                SELECTOR_EXPR\n                  CALL_EXPR\n                    SELECTOR_EXPR\n                      CALL_EXPR\n                        SELECTOR_EXPR\n                          CALL_EXPR\n                            SELECTOR_EXPR\n                              CALL_EXPR\n                                SELECTOR_EXPR\n                                  CALL_EXPR\n                                    SELECTOR_EXPR\n                                      CALL_EXPR\n                                        SELECTOR_EXPR\n                                          CALL_EXPR\n                                            SELECTOR_EXPR\n                                              CALL_EXPR\n                                                SELECTOR_EXPR\n                                                  CALL_EXPR\n                                                    SELECTOR_EXPR\n                                                      CALL_EXPR\n                                                        SELECTOR_EXPR\n                                                          CALL_EXPR\n                                                            SELECTOR_EXPR\n                                                              CALL_EXPR\n                                                                SELECTOR_EXPR\n                                                                  CALL_EXPR\n                                                                    SELECTOR_EXPR\n                                                                      CALL_EXPR\n                                                                        SELECTOR_EXPR\n                                                                          CALL_EXPR\n                                                                            SELECTOR_EXPR\n                                                                              CALL_EXPR\n                                                                                SELECTOR_EXPR\n                                                                                  CALL_EXPR\n                                                                                    SELECTOR_EXPR\n                                                                                      CALL_EXPR\n                                                                                        SELECTOR_EXPR\n                                                                                          CALL_EXPR\n                                                                                            SELECTOR_EXPR\n                                                                                              CALL_EXPR\n                                                                                                REFERENCE_EXPRESSION\n                                                                                                  REFERENCE_EXPRESSION\n                                                                                                    PsiElement(identifier)('u')\n                                                                                                  PsiElement(.)('.')\n                                                                                                  PsiElement(identifier)('Child')\n                                                                                                ARGUMENT_LIST\n                                                                                                  PsiElement(()('(')\n                                                                                                  LITERAL\n                                                                                                    PsiElement(int)('0')\n                                                                                                  PsiElement())(')')\n                                                                                              PsiElement(.)('.')\n                                                                                              REFERENCE_EXPRESSION\n                                                                                                PsiElement(identifier)('Child')\n                                                                                            ARGUMENT_LIST\n                                                                                              PsiElement(()('(')\n                                                                                              LITERAL\n                                                                                                PsiElement(int)('0')\n                                                                                              PsiElement())(')')\n                                                                                          PsiElement(.)('.')\n                                                                                          REFERENCE_EXPRESSION\n                                                                                            PsiElement(identifier)('Child')\n                                                                                        ARGUMENT_LIST\n                                                                                          PsiElement(()('(')\n                                                                                          LITERAL\n                                                                                            PsiElement(int)('0')\n                                                                                          PsiElement())(')')\n                                                                                      PsiElement(.)('.')\n                                                                                      REFERENCE_EXPRESSION\n                                                                                        PsiElement(identifier)('Child')\n                                                                                    ARGUMENT_LIST\n                                                                                      PsiElement(()('(')\n                                                                                      LITERAL\n                                                                                        PsiElement(int)('0')\n                                                                                      PsiElement())(')')\n                                                                                  PsiElement(.)('.')\n                                                                                  REFERENCE_EXPRESSION\n                                                                                    PsiElement(identifier)('Child')\n                                                                                ARGUMENT_LIST\n                                                                                  PsiElement(()('(')\n                                                                                  LITERAL\n                                                                                    PsiElement(int)('0')\n                                                                                  PsiElement())(')')\n                                                                              PsiElement(.)('.')\n                                                                              REFERENCE_EXPRESSION\n                                                                                PsiElement(identifier)('Child')\n                                                                            ARGUMENT_LIST\n                                                                              PsiElement(()('(')\n                                                                              LITERAL\n                                                                                PsiElement(int)('0')\n                                                                              PsiElement())(')')\n                                                                          PsiElement(.)('.')\n                                                                          REFERENCE_EXPRESSION\n                                                                            PsiElement(identifier)('Child')\n                                                                        ARGUMENT_LIST\n                                                                          PsiElement(()('(')\n                                                                          LITERAL\n                                                                            PsiElement(int)('0')\n                                                                          PsiElement())(')')\n                                                                      PsiElement(.)('.')\n                                                                      REFERENCE_EXPRESSION\n                                                                        PsiElement(identifier)('Child')\n                                                                    ARGUMENT_LIST\n                                                                      PsiElement(()('(')\n                                                                      LITERAL\n                                                                        PsiElement(int)('0')\n                                                                      PsiElement())(')')\n                                                                  PsiElement(.)('.')\n                                                                  REFERENCE_EXPRESSION\n                                                                    PsiElement(identifier)('Child')\n                                                                ARGUMENT_LIST\n                                                                  PsiElement(()('(')\n                                                                  LITERAL\n                                                                    PsiElement(int)('0')\n                                                                  PsiElement())(')')\n                                                              PsiElement(.)('.')\n                                                              REFERENCE_EXPRESSION\n                                                                PsiElement(identifier)('Child')\n                                                            ARGUMENT_LIST\n                                                              PsiElement(()('(')\n                                                              LITERAL\n                                                                PsiElement(int)('0')\n                                                              PsiElement())(')')\n                                                          PsiElement(.)('.')\n                                                          REFERENCE_EXPRESSION\n                                                            PsiElement(identifier)('Child')\n                                                        ARGUMENT_LIST\n                                                          PsiElement(()('(')\n                                                          LITERAL\n                                                            PsiElement(int)('0')\n                                                          PsiElement())(')')\n                                                      PsiElement(.)('.')\n                                                      REFERENCE_EXPRESSION\n                                                        PsiElement(identifier)('Child')\n                                                    ARGUMENT_LIST\n                                                      PsiElement(()('(')\n                                                      LITERAL\n                                                        PsiElement(int)('0')\n                                                      PsiElement())(')')\n                                                  PsiElement(.)('.')\n                                                  REFERENCE_EXPRESSION\n                                                    PsiElement(identifier)('Child')\n                                                ARGUMENT_LIST\n                                                  PsiElement(()('(')\n                                                  LITERAL\n                                                    PsiElement(int)('0')\n                                                  PsiElement())(')')\n                                              PsiElement(.)('.')\n                                              REFERENCE_EXPRESSION\n                                                PsiElement(identifier)('Child')\n                                            ARGUMENT_LIST\n                                              PsiElement(()('(')\n                                              LITERAL\n                                                PsiElement(int)('0')\n                                              PsiElement())(')')\n                                          PsiElement(.)('.')\n                                          REFERENCE_EXPRESSION\n                                            PsiElement(identifier)('Child')\n                                        ARGUMENT_LIST\n                                          PsiElement(()('(')\n                                          LITERAL\n                                            PsiElement(int)('0')\n                                          PsiElement())(')')\n                                      PsiElement(.)('.')\n                                      REFERENCE_EXPRESSION\n                                        PsiElement(identifier)('Child')\n                                    ARGUMENT_LIST\n                                      PsiElement(()('(')\n                                      LITERAL\n                                        PsiElement(int)('0')\n                                      PsiElement())(')')\n                                  PsiElement(.)('.')\n                                  REFERENCE_EXPRESSION\n                                    PsiElement(identifier)('Child')\n                                ARGUMENT_LIST\n                                  PsiElement(()('(')\n                                  LITERAL\n                                    PsiElement(int)('0')\n                                  PsiElement())(')')\n                              PsiElement(.)('.')\n                              REFERENCE_EXPRESSION\n                                PsiElement(identifier)('Child')\n                            ARGUMENT_LIST\n                              PsiElement(()('(')\n                              LITERAL\n                                PsiElement(int)('0')\n                              PsiElement())(')')\n                          PsiElement(.)('.')\n                          REFERENCE_EXPRESSION\n                            PsiElement(identifier)('Child')\n                        ARGUMENT_LIST\n                          PsiElement(()('(')\n                          LITERAL\n                            PsiElement(int)('0')\n                          PsiElement())(')')\n                      PsiElement(.)('.')\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('Child')\n                    ARGUMENT_LIST\n                      PsiElement(()('(')\n                      LITERAL\n                        PsiElement(int)('0')\n                      PsiElement())(')')\n                  PsiElement(.)('.')\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('Child')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  LITERAL\n                    PsiElement(int)('0')\n                  PsiElement())(')')\n              PsiElement(.)('.')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('Child')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              LITERAL\n                PsiElement(int)('0')\n              PsiElement())(')')\n          PsiElement(.)('.')\n          PsiElement(()('(')\n          POINTER_TYPE\n            PsiElement(*)('*')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('U')\n          PsiElement())(')')\n      PsiElement(})('}')\n  PsiComment(GO_LINE_COMMENT)('// Type assertions and slice indexing. See issue 4207.')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('ChainAssertIndex')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('u')\n          POINTER_TYPE\n            PsiElement(*)('*')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('U')\n        PsiElement())(')')\n      RESULT\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('J')\n    BLOCK\n      PsiElement({)('{')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n        INDEX_OR_SLICE_EXPR\n          SELECTOR_EXPR\n            TYPE_ASSERTION_EXPR\n              INDEX_OR_SLICE_EXPR\n                SELECTOR_EXPR\n                  TYPE_ASSERTION_EXPR\n                    INDEX_OR_SLICE_EXPR\n                      SELECTOR_EXPR\n                        TYPE_ASSERTION_EXPR\n                          INDEX_OR_SLICE_EXPR\n                            SELECTOR_EXPR\n                              TYPE_ASSERTION_EXPR\n                                INDEX_OR_SLICE_EXPR\n                                  SELECTOR_EXPR\n                                    TYPE_ASSERTION_EXPR\n                                      INDEX_OR_SLICE_EXPR\n                                        SELECTOR_EXPR\n                                          TYPE_ASSERTION_EXPR\n                                            INDEX_OR_SLICE_EXPR\n                                              SELECTOR_EXPR\n                                                TYPE_ASSERTION_EXPR\n                                                  INDEX_OR_SLICE_EXPR\n                                                    SELECTOR_EXPR\n                                                      TYPE_ASSERTION_EXPR\n                                                        INDEX_OR_SLICE_EXPR\n                                                          SELECTOR_EXPR\n                                                            TYPE_ASSERTION_EXPR\n                                                              INDEX_OR_SLICE_EXPR\n                                                                SELECTOR_EXPR\n                                                                  TYPE_ASSERTION_EXPR\n                                                                    INDEX_OR_SLICE_EXPR\n                                                                      SELECTOR_EXPR\n                                                                        TYPE_ASSERTION_EXPR\n                                                                          INDEX_OR_SLICE_EXPR\n                                                                            SELECTOR_EXPR\n                                                                              TYPE_ASSERTION_EXPR\n                                                                                INDEX_OR_SLICE_EXPR\n                                                                                  SELECTOR_EXPR\n                                                                                    TYPE_ASSERTION_EXPR\n                                                                                      INDEX_OR_SLICE_EXPR\n                                                                                        REFERENCE_EXPRESSION\n                                                                                          REFERENCE_EXPRESSION\n                                                                                            PsiElement(identifier)('u')\n                                                                                          PsiElement(.)('.')\n                                                                                          PsiElement(identifier)('Children')\n                                                                                        PsiElement([)('[')\n                                                                                        LITERAL\n                                                                                          PsiElement(int)('0')\n                                                                                        PsiElement(])(']')\n                                                                                      PsiElement(.)('.')\n                                                                                      PsiElement(()('(')\n                                                                                      POINTER_TYPE\n                                                                                        PsiElement(*)('*')\n                                                                                        TYPE\n                                                                                          TYPE_REFERENCE_EXPRESSION\n                                                                                            PsiElement(identifier)('U')\n                                                                                      PsiElement())(')')\n                                                                                    PsiElement(.)('.')\n                                                                                    REFERENCE_EXPRESSION\n                                                                                      PsiElement(identifier)('Children')\n                                                                                  PsiElement([)('[')\n                                                                                  LITERAL\n                                                                                    PsiElement(int)('0')\n                                                                                  PsiElement(])(']')\n                                                                                PsiElement(.)('.')\n                                                                                PsiElement(()('(')\n                                                                                POINTER_TYPE\n                                                                                  PsiElement(*)('*')\n                                                                                  TYPE\n                                                                                    TYPE_REFERENCE_EXPRESSION\n                                                                                      PsiElement(identifier)('U')\n                                                                                PsiElement())(')')\n                                                                              PsiElement(.)('.')\n                                                                              REFERENCE_EXPRESSION\n                                                                                PsiElement(identifier)('Children')\n                                                                            PsiElement([)('[')\n                                                                            LITERAL\n                                                                              PsiElement(int)('0')\n                                                                            PsiElement(])(']')\n                                                                          PsiElement(.)('.')\n                                                                          PsiElement(()('(')\n                                                                          POINTER_TYPE\n                                                                            PsiElement(*)('*')\n                                                                            TYPE\n                                                                              TYPE_REFERENCE_EXPRESSION\n                                                                                PsiElement(identifier)('U')\n                                                                          PsiElement())(')')\n                                                                        PsiElement(.)('.')\n                                                                        REFERENCE_EXPRESSION\n                                                                          PsiElement(identifier)('Children')\n                                                                      PsiElement([)('[')\n                                                                      LITERAL\n                                                                        PsiElement(int)('0')\n                                                                      PsiElement(])(']')\n                                                                    PsiElement(.)('.')\n                                                                    PsiElement(()('(')\n                                                                    POINTER_TYPE\n                                                                      PsiElement(*)('*')\n                                                                      TYPE\n                                                                        TYPE_REFERENCE_EXPRESSION\n                                                                          PsiElement(identifier)('U')\n                                                                    PsiElement())(')')\n                                                                  PsiElement(.)('.')\n                                                                  REFERENCE_EXPRESSION\n                                                                    PsiElement(identifier)('Children')\n                                                                PsiElement([)('[')\n                                                                LITERAL\n                                                                  PsiElement(int)('0')\n                                                                PsiElement(])(']')\n                                                              PsiElement(.)('.')\n                                                              PsiElement(()('(')\n                                                              POINTER_TYPE\n                                                                PsiElement(*)('*')\n                                                                TYPE\n                                                                  TYPE_REFERENCE_EXPRESSION\n                                                                    PsiElement(identifier)('U')\n                                                              PsiElement())(')')\n                                                            PsiElement(.)('.')\n                                                            REFERENCE_EXPRESSION\n                                                              PsiElement(identifier)('Children')\n                                                          PsiElement([)('[')\n                                                          LITERAL\n                                                            PsiElement(int)('0')\n                                                          PsiElement(])(']')\n                                                        PsiElement(.)('.')\n                                                        PsiElement(()('(')\n                                                        POINTER_TYPE\n                                                          PsiElement(*)('*')\n                                                          TYPE\n                                                            TYPE_REFERENCE_EXPRESSION\n                                                              PsiElement(identifier)('U')\n                                                        PsiElement())(')')\n                                                      PsiElement(.)('.')\n                                                      REFERENCE_EXPRESSION\n                                                        PsiElement(identifier)('Children')\n                                                    PsiElement([)('[')\n                                                    LITERAL\n                                                      PsiElement(int)('0')\n                                                    PsiElement(])(']')\n                                                  PsiElement(.)('.')\n                                                  PsiElement(()('(')\n                                                  POINTER_TYPE\n                                                    PsiElement(*)('*')\n                                                    TYPE\n                                                      TYPE_REFERENCE_EXPRESSION\n                                                        PsiElement(identifier)('U')\n                                                  PsiElement())(')')\n                                                PsiElement(.)('.')\n                                                REFERENCE_EXPRESSION\n                                                  PsiElement(identifier)('Children')\n                                              PsiElement([)('[')\n                                              LITERAL\n                                                PsiElement(int)('0')\n                                              PsiElement(])(']')\n                                            PsiElement(.)('.')\n                                            PsiElement(()('(')\n                                            POINTER_TYPE\n                                              PsiElement(*)('*')\n                                              TYPE\n                                                TYPE_REFERENCE_EXPRESSION\n                                                  PsiElement(identifier)('U')\n                                            PsiElement())(')')\n                                          PsiElement(.)('.')\n                                          REFERENCE_EXPRESSION\n                                            PsiElement(identifier)('Children')\n                                        PsiElement([)('[')\n                                        LITERAL\n                                          PsiElement(int)('0')\n                                        PsiElement(])(']')\n                                      PsiElement(.)('.')\n                                      PsiElement(()('(')\n                                      POINTER_TYPE\n                                        PsiElement(*)('*')\n                                        TYPE\n                                          TYPE_REFERENCE_EXPRESSION\n                                            PsiElement(identifier)('U')\n                                      PsiElement())(')')\n                                    PsiElement(.)('.')\n                                    REFERENCE_EXPRESSION\n                                      PsiElement(identifier)('Children')\n                                  PsiElement([)('[')\n                                  LITERAL\n                                    PsiElement(int)('0')\n                                  PsiElement(])(']')\n                                PsiElement(.)('.')\n                                PsiElement(()('(')\n                                POINTER_TYPE\n                                  PsiElement(*)('*')\n                                  TYPE\n                                    TYPE_REFERENCE_EXPRESSION\n                                      PsiElement(identifier)('U')\n                                PsiElement())(')')\n                              PsiElement(.)('.')\n                              REFERENCE_EXPRESSION\n                                PsiElement(identifier)('Children')\n                            PsiElement([)('[')\n                            LITERAL\n                              PsiElement(int)('0')\n                            PsiElement(])(']')\n                          PsiElement(.)('.')\n                          PsiElement(()('(')\n                          POINTER_TYPE\n                            PsiElement(*)('*')\n                            TYPE\n                              TYPE_REFERENCE_EXPRESSION\n                                PsiElement(identifier)('U')\n                          PsiElement())(')')\n                        PsiElement(.)('.')\n                        REFERENCE_EXPRESSION\n                          PsiElement(identifier)('Children')\n                      PsiElement([)('[')\n                      LITERAL\n                        PsiElement(int)('0')\n                      PsiElement(])(']')\n                    PsiElement(.)('.')\n                    PsiElement(()('(')\n                    POINTER_TYPE\n                      PsiElement(*)('*')\n                      TYPE\n                        TYPE_REFERENCE_EXPRESSION\n                          PsiElement(identifier)('U')\n                    PsiElement())(')')\n                  PsiElement(.)('.')\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('Children')\n                PsiElement([)('[')\n                LITERAL\n                  PsiElement(int)('0')\n                PsiElement(])(']')\n              PsiElement(.)('.')\n              PsiElement(()('(')\n              POINTER_TYPE\n                PsiElement(*)('*')\n                TYPE\n                  TYPE_REFERENCE_EXPRESSION\n                    PsiElement(identifier)('U')\n              PsiElement())(')')\n            PsiElement(.)('.')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('Children')\n          PsiElement([)('[')\n          LITERAL\n            PsiElement(int)('0')\n          PsiElement(])(']')\n      PsiElement(})('}')\n  TYPE_DECLARATION\n    PsiElement(type)('type')\n    TYPE_SPEC\n      SPEC_TYPE\n        PsiElement(identifier)('UArr')\n        STRUCT_TYPE\n          PsiElement(struct)('struct')\n          PsiElement({)('{')\n          FIELD_DECLARATION\n            FIELD_DEFINITION\n              PsiElement(identifier)('Children')\n            ARRAY_OR_SLICE_TYPE\n              PsiElement([)('[')\n              LITERAL\n                PsiElement(int)('2')\n              PsiElement(])(']')\n              TYPE\n                TYPE_REFERENCE_EXPRESSION\n                  PsiElement(identifier)('J')\n          PsiElement(})('}')\n  METHOD_DECLARATION\n    PsiElement(func)('func')\n    RECEIVER\n      PsiElement(()('(')\n      PsiElement(identifier)('u')\n      POINTER_TYPE\n        PsiElement(*)('*')\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('UArr')\n      PsiElement())(')')\n    PsiElement(identifier)('Child')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('n')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('int')\n        PsiElement())(')')\n      RESULT\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('J')\n    BLOCK\n      PsiElement({)('{')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n        INDEX_OR_SLICE_EXPR\n          REFERENCE_EXPRESSION\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('u')\n            PsiElement(.)('.')\n            PsiElement(identifier)('Children')\n          PsiElement([)('[')\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('n')\n          PsiElement(])(']')\n      PsiElement(})('}')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('ChainAssertArrayIndex')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('u')\n          POINTER_TYPE\n            PsiElement(*)('*')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('UArr')\n        PsiElement())(')')\n      RESULT\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('J')\n    BLOCK\n      PsiElement({)('{')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n        INDEX_OR_SLICE_EXPR\n          SELECTOR_EXPR\n            TYPE_ASSERTION_EXPR\n              INDEX_OR_SLICE_EXPR\n                SELECTOR_EXPR\n                  TYPE_ASSERTION_EXPR\n                    INDEX_OR_SLICE_EXPR\n                      SELECTOR_EXPR\n                        TYPE_ASSERTION_EXPR\n                          INDEX_OR_SLICE_EXPR\n                            SELECTOR_EXPR\n                              TYPE_ASSERTION_EXPR\n                                INDEX_OR_SLICE_EXPR\n                                  SELECTOR_EXPR\n                                    TYPE_ASSERTION_EXPR\n                                      INDEX_OR_SLICE_EXPR\n                                        SELECTOR_EXPR\n                                          TYPE_ASSERTION_EXPR\n                                            INDEX_OR_SLICE_EXPR\n                                              SELECTOR_EXPR\n                                                TYPE_ASSERTION_EXPR\n                                                  INDEX_OR_SLICE_EXPR\n                                                    SELECTOR_EXPR\n                                                      TYPE_ASSERTION_EXPR\n                                                        INDEX_OR_SLICE_EXPR\n                                                          SELECTOR_EXPR\n                                                            TYPE_ASSERTION_EXPR\n                                                              INDEX_OR_SLICE_EXPR\n                                                                SELECTOR_EXPR\n                                                                  TYPE_ASSERTION_EXPR\n                                                                    INDEX_OR_SLICE_EXPR\n                                                                      SELECTOR_EXPR\n                                                                        TYPE_ASSERTION_EXPR\n                                                                          INDEX_OR_SLICE_EXPR\n                                                                            SELECTOR_EXPR\n                                                                              TYPE_ASSERTION_EXPR\n                                                                                INDEX_OR_SLICE_EXPR\n                                                                                  SELECTOR_EXPR\n                                                                                    TYPE_ASSERTION_EXPR\n                                                                                      INDEX_OR_SLICE_EXPR\n                                                                                        REFERENCE_EXPRESSION\n                                                                                          REFERENCE_EXPRESSION\n                                                                                            PsiElement(identifier)('u')\n                                                                                          PsiElement(.)('.')\n                                                                                          PsiElement(identifier)('Children')\n                                                                                        PsiElement([)('[')\n                                                                                        LITERAL\n                                                                                          PsiElement(int)('0')\n                                                                                        PsiElement(])(']')\n                                                                                      PsiElement(.)('.')\n                                                                                      PsiElement(()('(')\n                                                                                      POINTER_TYPE\n                                                                                        PsiElement(*)('*')\n                                                                                        TYPE\n                                                                                          TYPE_REFERENCE_EXPRESSION\n                                                                                            PsiElement(identifier)('UArr')\n                                                                                      PsiElement())(')')\n                                                                                    PsiElement(.)('.')\n                                                                                    REFERENCE_EXPRESSION\n                                                                                      PsiElement(identifier)('Children')\n                                                                                  PsiElement([)('[')\n                                                                                  LITERAL\n                                                                                    PsiElement(int)('0')\n                                                                                  PsiElement(])(']')\n                                                                                PsiElement(.)('.')\n                                                                                PsiElement(()('(')\n                                                                                POINTER_TYPE\n                                                                                  PsiElement(*)('*')\n                                                                                  TYPE\n                                                                                    TYPE_REFERENCE_EXPRESSION\n                                                                                      PsiElement(identifier)('UArr')\n                                                                                PsiElement())(')')\n                                                                              PsiElement(.)('.')\n                                                                              REFERENCE_EXPRESSION\n                                                                                PsiElement(identifier)('Children')\n                                                                            PsiElement([)('[')\n                                                                            LITERAL\n                                                                              PsiElement(int)('0')\n                                                                            PsiElement(])(']')\n                                                                          PsiElement(.)('.')\n                                                                          PsiElement(()('(')\n                                                                          POINTER_TYPE\n                                                                            PsiElement(*)('*')\n                                                                            TYPE\n                                                                              TYPE_REFERENCE_EXPRESSION\n                                                                                PsiElement(identifier)('UArr')\n                                                                          PsiElement())(')')\n                                                                        PsiElement(.)('.')\n                                                                        REFERENCE_EXPRESSION\n                                                                          PsiElement(identifier)('Children')\n                                                                      PsiElement([)('[')\n                                                                      LITERAL\n                                                                        PsiElement(int)('0')\n                                                                      PsiElement(])(']')\n                                                                    PsiElement(.)('.')\n                                                                    PsiElement(()('(')\n                                                                    POINTER_TYPE\n                                                                      PsiElement(*)('*')\n                                                                      TYPE\n                                                                        TYPE_REFERENCE_EXPRESSION\n                                                                          PsiElement(identifier)('UArr')\n                                                                    PsiElement())(')')\n                                                                  PsiElement(.)('.')\n                                                                  REFERENCE_EXPRESSION\n                                                                    PsiElement(identifier)('Children')\n                                                                PsiElement([)('[')\n                                                                LITERAL\n                                                                  PsiElement(int)('0')\n                                                                PsiElement(])(']')\n                                                              PsiElement(.)('.')\n                                                              PsiElement(()('(')\n                                                              POINTER_TYPE\n                                                                PsiElement(*)('*')\n                                                                TYPE\n                                                                  TYPE_REFERENCE_EXPRESSION\n                                                                    PsiElement(identifier)('UArr')\n                                                              PsiElement())(')')\n                                                            PsiElement(.)('.')\n                                                            REFERENCE_EXPRESSION\n                                                              PsiElement(identifier)('Children')\n                                                          PsiElement([)('[')\n                                                          LITERAL\n                                                            PsiElement(int)('0')\n                                                          PsiElement(])(']')\n                                                        PsiElement(.)('.')\n                                                        PsiElement(()('(')\n                                                        POINTER_TYPE\n                                                          PsiElement(*)('*')\n                                                          TYPE\n                                                            TYPE_REFERENCE_EXPRESSION\n                                                              PsiElement(identifier)('UArr')\n                                                        PsiElement())(')')\n                                                      PsiElement(.)('.')\n                                                      REFERENCE_EXPRESSION\n                                                        PsiElement(identifier)('Children')\n                                                    PsiElement([)('[')\n                                                    LITERAL\n                                                      PsiElement(int)('0')\n                                                    PsiElement(])(']')\n                                                  PsiElement(.)('.')\n                                                  PsiElement(()('(')\n                                                  POINTER_TYPE\n                                                    PsiElement(*)('*')\n                                                    TYPE\n                                                      TYPE_REFERENCE_EXPRESSION\n                                                        PsiElement(identifier)('UArr')\n                                                  PsiElement())(')')\n                                                PsiElement(.)('.')\n                                                REFERENCE_EXPRESSION\n                                                  PsiElement(identifier)('Children')\n                                              PsiElement([)('[')\n                                              LITERAL\n                                                PsiElement(int)('0')\n                                              PsiElement(])(']')\n                                            PsiElement(.)('.')\n                                            PsiElement(()('(')\n                                            POINTER_TYPE\n                                              PsiElement(*)('*')\n                                              TYPE\n                                                TYPE_REFERENCE_EXPRESSION\n                                                  PsiElement(identifier)('UArr')\n                                            PsiElement())(')')\n                                          PsiElement(.)('.')\n                                          REFERENCE_EXPRESSION\n                                            PsiElement(identifier)('Children')\n                                        PsiElement([)('[')\n                                        LITERAL\n                                          PsiElement(int)('0')\n                                        PsiElement(])(']')\n                                      PsiElement(.)('.')\n                                      PsiElement(()('(')\n                                      POINTER_TYPE\n                                        PsiElement(*)('*')\n                                        TYPE\n                                          TYPE_REFERENCE_EXPRESSION\n                                            PsiElement(identifier)('UArr')\n                                      PsiElement())(')')\n                                    PsiElement(.)('.')\n                                    REFERENCE_EXPRESSION\n                                      PsiElement(identifier)('Children')\n                                  PsiElement([)('[')\n                                  LITERAL\n                                    PsiElement(int)('0')\n                                  PsiElement(])(']')\n                                PsiElement(.)('.')\n                                PsiElement(()('(')\n                                POINTER_TYPE\n                                  PsiElement(*)('*')\n                                  TYPE\n                                    TYPE_REFERENCE_EXPRESSION\n                                      PsiElement(identifier)('UArr')\n                                PsiElement())(')')\n                              PsiElement(.)('.')\n                              REFERENCE_EXPRESSION\n                                PsiElement(identifier)('Children')\n                            PsiElement([)('[')\n                            LITERAL\n                              PsiElement(int)('0')\n                            PsiElement(])(']')\n                          PsiElement(.)('.')\n                          PsiElement(()('(')\n                          POINTER_TYPE\n                            PsiElement(*)('*')\n                            TYPE\n                              TYPE_REFERENCE_EXPRESSION\n                                PsiElement(identifier)('UArr')\n                          PsiElement())(')')\n                        PsiElement(.)('.')\n                        REFERENCE_EXPRESSION\n                          PsiElement(identifier)('Children')\n                      PsiElement([)('[')\n                      LITERAL\n                        PsiElement(int)('0')\n                      PsiElement(])(']')\n                    PsiElement(.)('.')\n                    PsiElement(()('(')\n                    POINTER_TYPE\n                      PsiElement(*)('*')\n                      TYPE\n                        TYPE_REFERENCE_EXPRESSION\n                          PsiElement(identifier)('UArr')\n                    PsiElement())(')')\n                  PsiElement(.)('.')\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('Children')\n                PsiElement([)('[')\n                LITERAL\n                  PsiElement(int)('0')\n                PsiElement(])(']')\n              PsiElement(.)('.')\n              PsiElement(()('(')\n              POINTER_TYPE\n                PsiElement(*)('*')\n                TYPE\n                  TYPE_REFERENCE_EXPRESSION\n                    PsiElement(identifier)('UArr')\n              PsiElement())(')')\n            PsiElement(.)('.')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('Children')\n          PsiElement([)('[')\n          LITERAL\n            PsiElement(int)('0')\n          PsiElement(])(']')\n      PsiElement(})('}')\n  TYPE_DECLARATION\n    PsiElement(type)('type')\n    TYPE_SPEC\n      SPEC_TYPE\n        PsiElement(identifier)('UArrPtr')\n        STRUCT_TYPE\n          PsiElement(struct)('struct')\n          PsiElement({)('{')\n          FIELD_DECLARATION\n            FIELD_DEFINITION\n              PsiElement(identifier)('Children')\n            POINTER_TYPE\n              PsiElement(*)('*')\n              ARRAY_OR_SLICE_TYPE\n                PsiElement([)('[')\n                LITERAL\n                  PsiElement(int)('2')\n                PsiElement(])(']')\n                TYPE\n                  TYPE_REFERENCE_EXPRESSION\n                    PsiElement(identifier)('J')\n          PsiElement(})('}')\n  METHOD_DECLARATION\n    PsiElement(func)('func')\n    RECEIVER\n      PsiElement(()('(')\n      PsiElement(identifier)('u')\n      POINTER_TYPE\n        PsiElement(*)('*')\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('UArrPtr')\n      PsiElement())(')')\n    PsiElement(identifier)('Child')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('n')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('int')\n        PsiElement())(')')\n      RESULT\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('J')\n    BLOCK\n      PsiElement({)('{')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n        INDEX_OR_SLICE_EXPR\n          REFERENCE_EXPRESSION\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('u')\n            PsiElement(.)('.')\n            PsiElement(identifier)('Children')\n          PsiElement([)('[')\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('n')\n          PsiElement(])(']')\n      PsiElement(})('}')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('ChainAssertArrayptrIndex')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('u')\n          POINTER_TYPE\n            PsiElement(*)('*')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('UArrPtr')\n        PsiElement())(')')\n      RESULT\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('J')\n    BLOCK\n      PsiElement({)('{')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n        INDEX_OR_SLICE_EXPR\n          SELECTOR_EXPR\n            TYPE_ASSERTION_EXPR\n              INDEX_OR_SLICE_EXPR\n                SELECTOR_EXPR\n                  TYPE_ASSERTION_EXPR\n                    INDEX_OR_SLICE_EXPR\n                      SELECTOR_EXPR\n                        TYPE_ASSERTION_EXPR\n                          INDEX_OR_SLICE_EXPR\n                            SELECTOR_EXPR\n                              TYPE_ASSERTION_EXPR\n                                INDEX_OR_SLICE_EXPR\n                                  SELECTOR_EXPR\n                                    TYPE_ASSERTION_EXPR\n                                      INDEX_OR_SLICE_EXPR\n                                        SELECTOR_EXPR\n                                          TYPE_ASSERTION_EXPR\n                                            INDEX_OR_SLICE_EXPR\n                                              SELECTOR_EXPR\n                                                TYPE_ASSERTION_EXPR\n                                                  INDEX_OR_SLICE_EXPR\n                                                    SELECTOR_EXPR\n                                                      TYPE_ASSERTION_EXPR\n                                                        INDEX_OR_SLICE_EXPR\n                                                          SELECTOR_EXPR\n                                                            TYPE_ASSERTION_EXPR\n                                                              INDEX_OR_SLICE_EXPR\n                                                                SELECTOR_EXPR\n                                                                  TYPE_ASSERTION_EXPR\n                                                                    INDEX_OR_SLICE_EXPR\n                                                                      SELECTOR_EXPR\n                                                                        TYPE_ASSERTION_EXPR\n                                                                          INDEX_OR_SLICE_EXPR\n                                                                            SELECTOR_EXPR\n                                                                              TYPE_ASSERTION_EXPR\n                                                                                INDEX_OR_SLICE_EXPR\n                                                                                  SELECTOR_EXPR\n                                                                                    TYPE_ASSERTION_EXPR\n                                                                                      INDEX_OR_SLICE_EXPR\n                                                                                        REFERENCE_EXPRESSION\n                                                                                          REFERENCE_EXPRESSION\n                                                                                            PsiElement(identifier)('u')\n                                                                                          PsiElement(.)('.')\n                                                                                          PsiElement(identifier)('Children')\n                                                                                        PsiElement([)('[')\n                                                                                        LITERAL\n                                                                                          PsiElement(int)('0')\n                                                                                        PsiElement(])(']')\n                                                                                      PsiElement(.)('.')\n                                                                                      PsiElement(()('(')\n                                                                                      POINTER_TYPE\n                                                                                        PsiElement(*)('*')\n                                                                                        TYPE\n                                                                                          TYPE_REFERENCE_EXPRESSION\n                                                                                            PsiElement(identifier)('UArrPtr')\n                                                                                      PsiElement())(')')\n                                                                                    PsiElement(.)('.')\n                                                                                    REFERENCE_EXPRESSION\n                                                                                      PsiElement(identifier)('Children')\n                                                                                  PsiElement([)('[')\n                                                                                  LITERAL\n                                                                                    PsiElement(int)('0')\n                                                                                  PsiElement(])(']')\n                                                                                PsiElement(.)('.')\n                                                                                PsiElement(()('(')\n                                                                                POINTER_TYPE\n                                                                                  PsiElement(*)('*')\n                                                                                  TYPE\n                                                                                    TYPE_REFERENCE_EXPRESSION\n                                                                                      PsiElement(identifier)('UArrPtr')\n                                                                                PsiElement())(')')\n                                                                              PsiElement(.)('.')\n                                                                              REFERENCE_EXPRESSION\n                                                                                PsiElement(identifier)('Children')\n                                                                            PsiElement([)('[')\n                                                                            LITERAL\n                                                                              PsiElement(int)('0')\n                                                                            PsiElement(])(']')\n                                                                          PsiElement(.)('.')\n                                                                          PsiElement(()('(')\n                                                                          POINTER_TYPE\n                                                                            PsiElement(*)('*')\n                                                                            TYPE\n                                                                              TYPE_REFERENCE_EXPRESSION\n                                                                                PsiElement(identifier)('UArrPtr')\n                                                                          PsiElement())(')')\n                                                                        PsiElement(.)('.')\n                                                                        REFERENCE_EXPRESSION\n                                                                          PsiElement(identifier)('Children')\n                                                                      PsiElement([)('[')\n                                                                      LITERAL\n                                                                        PsiElement(int)('0')\n                                                                      PsiElement(])(']')\n                                                                    PsiElement(.)('.')\n                                                                    PsiElement(()('(')\n                                                                    POINTER_TYPE\n                                                                      PsiElement(*)('*')\n                                                                      TYPE\n                                                                        TYPE_REFERENCE_EXPRESSION\n                                                                          PsiElement(identifier)('UArrPtr')\n                                                                    PsiElement())(')')\n                                                                  PsiElement(.)('.')\n                                                                  REFERENCE_EXPRESSION\n                                                                    PsiElement(identifier)('Children')\n                                                                PsiElement([)('[')\n                                                                LITERAL\n                                                                  PsiElement(int)('0')\n                                                                PsiElement(])(']')\n                                                              PsiElement(.)('.')\n                                                              PsiElement(()('(')\n                                                              POINTER_TYPE\n                                                                PsiElement(*)('*')\n                                                                TYPE\n                                                                  TYPE_REFERENCE_EXPRESSION\n                                                                    PsiElement(identifier)('UArrPtr')\n                                                              PsiElement())(')')\n                                                            PsiElement(.)('.')\n                                                            REFERENCE_EXPRESSION\n                                                              PsiElement(identifier)('Children')\n                                                          PsiElement([)('[')\n                                                          LITERAL\n                                                            PsiElement(int)('0')\n                                                          PsiElement(])(']')\n                                                        PsiElement(.)('.')\n                                                        PsiElement(()('(')\n                                                        POINTER_TYPE\n                                                          PsiElement(*)('*')\n                                                          TYPE\n                                                            TYPE_REFERENCE_EXPRESSION\n                                                              PsiElement(identifier)('UArrPtr')\n                                                        PsiElement())(')')\n                                                      PsiElement(.)('.')\n                                                      REFERENCE_EXPRESSION\n                                                        PsiElement(identifier)('Children')\n                                                    PsiElement([)('[')\n                                                    LITERAL\n                                                      PsiElement(int)('0')\n                                                    PsiElement(])(']')\n                                                  PsiElement(.)('.')\n                                                  PsiElement(()('(')\n                                                  POINTER_TYPE\n                                                    PsiElement(*)('*')\n                                                    TYPE\n                                                      TYPE_REFERENCE_EXPRESSION\n                                                        PsiElement(identifier)('UArrPtr')\n                                                  PsiElement())(')')\n                                                PsiElement(.)('.')\n                                                REFERENCE_EXPRESSION\n                                                  PsiElement(identifier)('Children')\n                                              PsiElement([)('[')\n                                              LITERAL\n                                                PsiElement(int)('0')\n                                              PsiElement(])(']')\n                                            PsiElement(.)('.')\n                                            PsiElement(()('(')\n                                            POINTER_TYPE\n                                              PsiElement(*)('*')\n                                              TYPE\n                                                TYPE_REFERENCE_EXPRESSION\n                                                  PsiElement(identifier)('UArrPtr')\n                                            PsiElement())(')')\n                                          PsiElement(.)('.')\n                                          REFERENCE_EXPRESSION\n                                            PsiElement(identifier)('Children')\n                                        PsiElement([)('[')\n                                        LITERAL\n                                          PsiElement(int)('0')\n                                        PsiElement(])(']')\n                                      PsiElement(.)('.')\n                                      PsiElement(()('(')\n                                      POINTER_TYPE\n                                        PsiElement(*)('*')\n                                        TYPE\n                                          TYPE_REFERENCE_EXPRESSION\n                                            PsiElement(identifier)('UArrPtr')\n                                      PsiElement())(')')\n                                    PsiElement(.)('.')\n                                    REFERENCE_EXPRESSION\n                                      PsiElement(identifier)('Children')\n                                  PsiElement([)('[')\n                                  LITERAL\n                                    PsiElement(int)('0')\n                                  PsiElement(])(']')\n                                PsiElement(.)('.')\n                                PsiElement(()('(')\n                                POINTER_TYPE\n                                  PsiElement(*)('*')\n                                  TYPE\n                                    TYPE_REFERENCE_EXPRESSION\n                                      PsiElement(identifier)('UArrPtr')\n                                PsiElement())(')')\n                              PsiElement(.)('.')\n                              REFERENCE_EXPRESSION\n                                PsiElement(identifier)('Children')\n                            PsiElement([)('[')\n                            LITERAL\n                              PsiElement(int)('0')\n                            PsiElement(])(']')\n                          PsiElement(.)('.')\n                          PsiElement(()('(')\n                          POINTER_TYPE\n                            PsiElement(*)('*')\n                            TYPE\n                              TYPE_REFERENCE_EXPRESSION\n                                PsiElement(identifier)('UArrPtr')\n                          PsiElement())(')')\n                        PsiElement(.)('.')\n                        REFERENCE_EXPRESSION\n                          PsiElement(identifier)('Children')\n                      PsiElement([)('[')\n                      LITERAL\n                        PsiElement(int)('0')\n                      PsiElement(])(']')\n                    PsiElement(.)('.')\n                    PsiElement(()('(')\n                    POINTER_TYPE\n                      PsiElement(*)('*')\n                      TYPE\n                        TYPE_REFERENCE_EXPRESSION\n                          PsiElement(identifier)('UArrPtr')\n                    PsiElement())(')')\n                  PsiElement(.)('.')\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('Children')\n                PsiElement([)('[')\n                LITERAL\n                  PsiElement(int)('0')\n                PsiElement(])(']')\n              PsiElement(.)('.')\n              PsiElement(()('(')\n              POINTER_TYPE\n                PsiElement(*)('*')\n                TYPE\n                  TYPE_REFERENCE_EXPRESSION\n                    PsiElement(identifier)('UArrPtr')\n              PsiElement())(')')\n            PsiElement(.)('.')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('Children')\n          PsiElement([)('[')\n          LITERAL\n            PsiElement(int)('0')\n          PsiElement(])(']')\n      PsiElement(})('}')\n  PsiComment(GO_LINE_COMMENT)('// Chains of divisions. See issue 4201.')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('ChainDiv')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('a')\n          PsiElement(,)(',')\n          PARAM_DEFINITION\n            PsiElement(identifier)('b')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('int')\n        PsiElement())(')')\n      RESULT\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('int')\n    BLOCK\n      PsiElement({)('{')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n        MUL_EXPR\n          MUL_EXPR\n            MUL_EXPR\n              MUL_EXPR\n                MUL_EXPR\n                  MUL_EXPR\n                    MUL_EXPR\n                      MUL_EXPR\n                        MUL_EXPR\n                          MUL_EXPR\n                            MUL_EXPR\n                              MUL_EXPR\n                                MUL_EXPR\n                                  MUL_EXPR\n                                    MUL_EXPR\n                                      MUL_EXPR\n                                        MUL_EXPR\n                                          MUL_EXPR\n                                            MUL_EXPR\n                                              MUL_EXPR\n                                                MUL_EXPR\n                                                  MUL_EXPR\n                                                    MUL_EXPR\n                                                      REFERENCE_EXPRESSION\n                                                        PsiElement(identifier)('a')\n                                                      PsiElement(/)('/')\n                                                      REFERENCE_EXPRESSION\n                                                        PsiElement(identifier)('b')\n                                                    PsiElement(/)('/')\n                                                    REFERENCE_EXPRESSION\n                                                      PsiElement(identifier)('a')\n                                                  PsiElement(/)('/')\n                                                  REFERENCE_EXPRESSION\n                                                    PsiElement(identifier)('b')\n                                                PsiElement(/)('/')\n                                                REFERENCE_EXPRESSION\n                                                  PsiElement(identifier)('a')\n                                              PsiElement(/)('/')\n                                              REFERENCE_EXPRESSION\n                                                PsiElement(identifier)('b')\n                                            PsiElement(/)('/')\n                                            REFERENCE_EXPRESSION\n                                              PsiElement(identifier)('a')\n                                          PsiElement(/)('/')\n                                          REFERENCE_EXPRESSION\n                                            PsiElement(identifier)('b')\n                                        PsiElement(/)('/')\n                                        REFERENCE_EXPRESSION\n                                          PsiElement(identifier)('a')\n                                      PsiElement(/)('/')\n                                      REFERENCE_EXPRESSION\n                                        PsiElement(identifier)('b')\n                                    PsiElement(/)('/')\n                                    REFERENCE_EXPRESSION\n                                      PsiElement(identifier)('a')\n                                  PsiElement(/)('/')\n                                  REFERENCE_EXPRESSION\n                                    PsiElement(identifier)('b')\n                                PsiElement(/)('/')\n                                REFERENCE_EXPRESSION\n                                  PsiElement(identifier)('a')\n                              PsiElement(/)('/')\n                              REFERENCE_EXPRESSION\n                                PsiElement(identifier)('b')\n                            PsiElement(/)('/')\n                            REFERENCE_EXPRESSION\n                              PsiElement(identifier)('a')\n                          PsiElement(/)('/')\n                          REFERENCE_EXPRESSION\n                            PsiElement(identifier)('b')\n                        PsiElement(/)('/')\n                        REFERENCE_EXPRESSION\n                          PsiElement(identifier)('a')\n                      PsiElement(/)('/')\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('b')\n                    PsiElement(/)('/')\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('a')\n                  PsiElement(/)('/')\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('b')\n                PsiElement(/)('/')\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('a')\n              PsiElement(/)('/')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('b')\n            PsiElement(/)('/')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('a')\n          PsiElement(/)('/')\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('b')\n      PsiElement(})('}')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('ChainDivRight')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('a')\n          PsiElement(,)(',')\n          PARAM_DEFINITION\n            PsiElement(identifier)('b')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('int')\n        PsiElement())(')')\n      RESULT\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('int')\n    BLOCK\n      PsiElement({)('{')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n        MUL_EXPR\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('a')\n          PsiElement(/)('/')\n          PARENTHESES_EXPR\n            PsiElement(()('(')\n            MUL_EXPR\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('b')\n              PsiElement(/)('/')\n              PARENTHESES_EXPR\n                PsiElement(()('(')\n                MUL_EXPR\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('a')\n                  PsiElement(/)('/')\n                  PARENTHESES_EXPR\n                    PsiElement(()('(')\n                    MUL_EXPR\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('b')\n                      PsiElement(/)('/')\n                      PARENTHESES_EXPR\n                        PsiElement(()('(')\n                        MUL_EXPR\n                          REFERENCE_EXPRESSION\n                            PsiElement(identifier)('a')\n                          PsiElement(/)('/')\n                          PARENTHESES_EXPR\n                            PsiElement(()('(')\n                            MUL_EXPR\n                              REFERENCE_EXPRESSION\n                                PsiElement(identifier)('b')\n                              PsiElement(/)('/')\n                              PARENTHESES_EXPR\n                                PsiElement(()('(')\n                                MUL_EXPR\n                                  REFERENCE_EXPRESSION\n                                    PsiElement(identifier)('a')\n                                  PsiElement(/)('/')\n                                  PARENTHESES_EXPR\n                                    PsiElement(()('(')\n                                    MUL_EXPR\n                                      REFERENCE_EXPRESSION\n                                        PsiElement(identifier)('b')\n                                      PsiElement(/)('/')\n                                      PARENTHESES_EXPR\n                                        PsiElement(()('(')\n                                        MUL_EXPR\n                                          REFERENCE_EXPRESSION\n                                            PsiElement(identifier)('a')\n                                          PsiElement(/)('/')\n                                          PARENTHESES_EXPR\n                                            PsiElement(()('(')\n                                            MUL_EXPR\n                                              REFERENCE_EXPRESSION\n                                                PsiElement(identifier)('b')\n                                              PsiElement(/)('/')\n                                              PARENTHESES_EXPR\n                                                PsiElement(()('(')\n                                                MUL_EXPR\n                                                  REFERENCE_EXPRESSION\n                                                    PsiElement(identifier)('a')\n                                                  PsiElement(/)('/')\n                                                  PARENTHESES_EXPR\n                                                    PsiElement(()('(')\n                                                    MUL_EXPR\n                                                      REFERENCE_EXPRESSION\n                                                        PsiElement(identifier)('b')\n                                                      PsiElement(/)('/')\n                                                      PARENTHESES_EXPR\n                                                        PsiElement(()('(')\n                                                        MUL_EXPR\n                                                          REFERENCE_EXPRESSION\n                                                            PsiElement(identifier)('a')\n                                                          PsiElement(/)('/')\n                                                          PARENTHESES_EXPR\n                                                            PsiElement(()('(')\n                                                            MUL_EXPR\n                                                              REFERENCE_EXPRESSION\n                                                                PsiElement(identifier)('b')\n                                                              PsiElement(/)('/')\n                                                              PARENTHESES_EXPR\n                                                                PsiElement(()('(')\n                                                                MUL_EXPR\n                                                                  REFERENCE_EXPRESSION\n                                                                    PsiElement(identifier)('a')\n                                                                  PsiElement(/)('/')\n                                                                  PARENTHESES_EXPR\n                                                                    PsiElement(()('(')\n                                                                    MUL_EXPR\n                                                                      REFERENCE_EXPRESSION\n                                                                        PsiElement(identifier)('b')\n                                                                      PsiElement(/)('/')\n                                                                      PARENTHESES_EXPR\n                                                                        PsiElement(()('(')\n                                                                        MUL_EXPR\n                                                                          REFERENCE_EXPRESSION\n                                                                            PsiElement(identifier)('a')\n                                                                          PsiElement(/)('/')\n                                                                          PARENTHESES_EXPR\n                                                                            PsiElement(()('(')\n                                                                            MUL_EXPR\n                                                                              REFERENCE_EXPRESSION\n                                                                                PsiElement(identifier)('b')\n                                                                              PsiElement(/)('/')\n                                                                              PARENTHESES_EXPR\n                                                                                PsiElement(()('(')\n                                                                                MUL_EXPR\n                                                                                  REFERENCE_EXPRESSION\n                                                                                    PsiElement(identifier)('a')\n                                                                                  PsiElement(/)('/')\n                                                                                  REFERENCE_EXPRESSION\n                                                                                    PsiElement(identifier)('b')\n                                                                                PsiElement())(')')\n                                                                            PsiElement())(')')\n                                                                        PsiElement())(')')\n                                                                    PsiElement())(')')\n                                                                PsiElement())(')')\n                                                            PsiElement())(')')\n                                                        PsiElement())(')')\n                                                    PsiElement())(')')\n                                                PsiElement())(')')\n                                            PsiElement())(')')\n                                        PsiElement())(')')\n                                    PsiElement())(')')\n                                PsiElement())(')')\n                            PsiElement())(')')\n                        PsiElement())(')')\n                    PsiElement())(')')\n                PsiElement())(')')\n            PsiElement())(')')\n      PsiElement(})('}')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('ChainDivConst')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('a')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('int')\n        PsiElement())(')')\n      RESULT\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('int')\n    BLOCK\n      PsiElement({)('{')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n        MUL_EXPR\n          MUL_EXPR\n            MUL_EXPR\n              MUL_EXPR\n                MUL_EXPR\n                  MUL_EXPR\n                    MUL_EXPR\n                      MUL_EXPR\n                        MUL_EXPR\n                          MUL_EXPR\n                            MUL_EXPR\n                              REFERENCE_EXPRESSION\n                                PsiElement(identifier)('a')\n                              PsiElement(/)('/')\n                              LITERAL\n                                PsiElement(int)('17')\n                            PsiElement(/)('/')\n                            LITERAL\n                              PsiElement(int)('17')\n                          PsiElement(/)('/')\n                          LITERAL\n                            PsiElement(int)('17')\n                        PsiElement(/)('/')\n                        LITERAL\n                          PsiElement(int)('17')\n                      PsiElement(/)('/')\n                      LITERAL\n                        PsiElement(int)('17')\n                    PsiElement(/)('/')\n                    LITERAL\n                      PsiElement(int)('17')\n                  PsiElement(/)('/')\n                  LITERAL\n                    PsiElement(int)('17')\n                PsiElement(/)('/')\n                LITERAL\n                  PsiElement(int)('17')\n              PsiElement(/)('/')\n              LITERAL\n                PsiElement(int)('17')\n            PsiElement(/)('/')\n            LITERAL\n              PsiElement(int)('17')\n          PsiElement(/)('/')\n          LITERAL\n            PsiElement(int)('17')\n      PsiElement(})('}')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('ChainMulBytes')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('a')\n          PsiElement(,)(',')\n          PARAM_DEFINITION\n            PsiElement(identifier)('b')\n          PsiElement(,)(',')\n          PARAM_DEFINITION\n            PsiElement(identifier)('c')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('byte')\n        PsiElement())(')')\n      RESULT\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('byte')\n    BLOCK\n      PsiElement({)('{')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n        ADD_EXPR\n          MUL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('a')\n            PsiElement(*)('*')\n            PARENTHESES_EXPR\n              PsiElement(()('(')\n              ADD_EXPR\n                MUL_EXPR\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('a')\n                  PsiElement(*)('*')\n                  PARENTHESES_EXPR\n                    PsiElement(()('(')\n                    ADD_EXPR\n                      MUL_EXPR\n                        REFERENCE_EXPRESSION\n                          PsiElement(identifier)('a')\n                        PsiElement(*)('*')\n                        PARENTHESES_EXPR\n                          PsiElement(()('(')\n                          ADD_EXPR\n                            MUL_EXPR\n                              REFERENCE_EXPRESSION\n                                PsiElement(identifier)('a')\n                              PsiElement(*)('*')\n                              PARENTHESES_EXPR\n                                PsiElement(()('(')\n                                ADD_EXPR\n                                  MUL_EXPR\n                                    REFERENCE_EXPRESSION\n                                      PsiElement(identifier)('a')\n                                    PsiElement(*)('*')\n                                    PARENTHESES_EXPR\n                                      PsiElement(()('(')\n                                      ADD_EXPR\n                                        MUL_EXPR\n                                          REFERENCE_EXPRESSION\n                                            PsiElement(identifier)('a')\n                                          PsiElement(*)('*')\n                                          PARENTHESES_EXPR\n                                            PsiElement(()('(')\n                                            ADD_EXPR\n                                              MUL_EXPR\n                                                REFERENCE_EXPRESSION\n                                                  PsiElement(identifier)('a')\n                                                PsiElement(*)('*')\n                                                PARENTHESES_EXPR\n                                                  PsiElement(()('(')\n                                                  ADD_EXPR\n                                                    MUL_EXPR\n                                                      REFERENCE_EXPRESSION\n                                                        PsiElement(identifier)('a')\n                                                      PsiElement(*)('*')\n                                                      PARENTHESES_EXPR\n                                                        PsiElement(()('(')\n                                                        ADD_EXPR\n                                                          MUL_EXPR\n                                                            REFERENCE_EXPRESSION\n                                                              PsiElement(identifier)('a')\n                                                            PsiElement(*)('*')\n                                                            REFERENCE_EXPRESSION\n                                                              PsiElement(identifier)('b')\n                                                          PsiElement(+)('+')\n                                                          REFERENCE_EXPRESSION\n                                                            PsiElement(identifier)('c')\n                                                        PsiElement())(')')\n                                                    PsiElement(+)('+')\n                                                    REFERENCE_EXPRESSION\n                                                      PsiElement(identifier)('c')\n                                                  PsiElement())(')')\n                                              PsiElement(+)('+')\n                                              REFERENCE_EXPRESSION\n                                                PsiElement(identifier)('c')\n                                            PsiElement())(')')\n                                        PsiElement(+)('+')\n                                        REFERENCE_EXPRESSION\n                                          PsiElement(identifier)('c')\n                                      PsiElement())(')')\n                                  PsiElement(+)('+')\n                                  REFERENCE_EXPRESSION\n                                    PsiElement(identifier)('c')\n                                PsiElement())(')')\n                            PsiElement(+)('+')\n                            REFERENCE_EXPRESSION\n                              PsiElement(identifier)('c')\n                          PsiElement())(')')\n                      PsiElement(+)('+')\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('c')\n                    PsiElement())(')')\n                PsiElement(+)('+')\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('c')\n              PsiElement())(')')\n          PsiElement(+)('+')\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('c')\n      PsiElement(})('}')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('ChainCap')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      SELECT_STATEMENT\n        PsiElement(select)('select')\n        PsiElement({)('{')\n        COMM_CLAUSE\n          COMM_CASE\n            PsiElement(case)('case')\n            RECV_STATEMENT\n              UNARY_EXPR\n                PsiElement(<-)('<-')\n                BUILTIN_CALL_EXPR\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('make')\n                  BUILTIN_ARGUMENT_LIST\n                    PsiElement(()('(')\n                    CHANNEL_TYPE\n                      PsiElement(chan)('chan')\n                      TYPE\n                        TYPE_REFERENCE_EXPRESSION\n                          PsiElement(identifier)('int')\n                    PsiElement(,)(',')\n                    CALL_EXPR\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('cap')\n                      ARGUMENT_LIST\n                        PsiElement(()('(')\n                        BUILTIN_CALL_EXPR\n                          REFERENCE_EXPRESSION\n                            PsiElement(identifier)('make')\n                          BUILTIN_ARGUMENT_LIST\n                            PsiElement(()('(')\n                            CHANNEL_TYPE\n                              PsiElement(chan)('chan')\n                              TYPE\n                                TYPE_REFERENCE_EXPRESSION\n                                  PsiElement(identifier)('int')\n                            PsiElement(,)(',')\n                            CALL_EXPR\n                              REFERENCE_EXPRESSION\n                                PsiElement(identifier)('cap')\n                              ARGUMENT_LIST\n                                PsiElement(()('(')\n                                BUILTIN_CALL_EXPR\n                                  REFERENCE_EXPRESSION\n                                    PsiElement(identifier)('make')\n                                  BUILTIN_ARGUMENT_LIST\n                                    PsiElement(()('(')\n                                    CHANNEL_TYPE\n                                      PsiElement(chan)('chan')\n                                      TYPE\n                                        TYPE_REFERENCE_EXPRESSION\n                                          PsiElement(identifier)('int')\n                                    PsiElement(,)(',')\n                                    CALL_EXPR\n                                      REFERENCE_EXPRESSION\n                                        PsiElement(identifier)('cap')\n                                      ARGUMENT_LIST\n                                        PsiElement(()('(')\n                                        BUILTIN_CALL_EXPR\n                                          REFERENCE_EXPRESSION\n                                            PsiElement(identifier)('make')\n                                          BUILTIN_ARGUMENT_LIST\n                                            PsiElement(()('(')\n                                            CHANNEL_TYPE\n                                              PsiElement(chan)('chan')\n                                              TYPE\n                                                TYPE_REFERENCE_EXPRESSION\n                                                  PsiElement(identifier)('int')\n                                            PsiElement(,)(',')\n                                            CALL_EXPR\n                                              REFERENCE_EXPRESSION\n                                                PsiElement(identifier)('cap')\n                                              ARGUMENT_LIST\n                                                PsiElement(()('(')\n                                                BUILTIN_CALL_EXPR\n                                                  REFERENCE_EXPRESSION\n                                                    PsiElement(identifier)('make')\n                                                  BUILTIN_ARGUMENT_LIST\n                                                    PsiElement(()('(')\n                                                    CHANNEL_TYPE\n                                                      PsiElement(chan)('chan')\n                                                      TYPE\n                                                        TYPE_REFERENCE_EXPRESSION\n                                                          PsiElement(identifier)('int')\n                                                    PsiElement())(')')\n                                                PsiElement())(')')\n                                            PsiElement())(')')\n                                        PsiElement())(')')\n                                    PsiElement())(')')\n                                PsiElement())(')')\n                            PsiElement())(')')\n                        PsiElement())(')')\n                    PsiElement())(')')\n          PsiElement(:)(':')\n        COMM_CLAUSE\n          COMM_CASE\n            PsiElement(default)('default')\n          PsiElement(:)(':')\n        PsiElement(})('}')\n      PsiElement(})('}')"
  },
  {
    "path": "testData/parser/TypeComma.go",
    "content": "package main\n\nimport \"fmt\"\n\ntype TestType struct{}\n\nfunc (t TestType) func1() {\n\tfmt.Println(\"func1!!!\")\n}\n\nfunc test2() (\nTestType,\nerror ) {\n\treturn TestType{}, nil\n}\n\nfunc test() (\nTestType,\nerror,\n) {\n\treturn TestType{}, nil\n}\n\nfunc main() {\n\tt, _ := test()\n\tt.func1() // Unresolved reference here\n}"
  },
  {
    "path": "testData/parser/TypeComma.txt",
    "content": "GO_FILE\n  PACKAGE_CLAUSE\n    PsiElement(package)('package')\n    PsiElement(identifier)('main')\n  IMPORT_LIST\n    IMPORT_DECLARATION\n      PsiElement(import)('import')\n      IMPORT_SPEC\n        IMPORT_STRING\n          STRING_LITERAL\n            PsiElement(string)('\"fmt\"')\n  TYPE_DECLARATION\n    PsiElement(type)('type')\n    TYPE_SPEC\n      SPEC_TYPE\n        PsiElement(identifier)('TestType')\n        STRUCT_TYPE\n          PsiElement(struct)('struct')\n          PsiElement({)('{')\n          PsiElement(})('}')\n  METHOD_DECLARATION\n    PsiElement(func)('func')\n    RECEIVER\n      PsiElement(()('(')\n      PsiElement(identifier)('t')\n      TYPE\n        TYPE_REFERENCE_EXPRESSION\n          PsiElement(identifier)('TestType')\n      PsiElement())(')')\n    PsiElement(identifier)('func1')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('fmt')\n              PsiElement(.)('.')\n              PsiElement(identifier)('Println')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              STRING_LITERAL\n                PsiElement(string)('\"func1!!!\"')\n              PsiElement())(')')\n      PsiElement(})('}')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('test2')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n      RESULT\n        PsiElement(()('(')\n        TYPE_LIST\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('TestType')\n          PsiElement(,)(',')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('error')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n        COMPOSITE_LIT\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('TestType')\n          LITERAL_VALUE\n            PsiElement({)('{')\n            PsiElement(})('}')\n        PsiElement(,)(',')\n        REFERENCE_EXPRESSION\n          PsiElement(identifier)('nil')\n      PsiElement(})('}')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('test')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n      RESULT\n        PsiElement(()('(')\n        TYPE_LIST\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('TestType')\n          PsiElement(,)(',')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('error')\n          PsiElement(,)(',')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n        COMPOSITE_LIT\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('TestType')\n          LITERAL_VALUE\n            PsiElement({)('{')\n            PsiElement(})('}')\n        PsiElement(,)(',')\n        REFERENCE_EXPRESSION\n          PsiElement(identifier)('nil')\n      PsiElement(})('}')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('main')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('t')\n          PsiElement(,)(',')\n          VAR_DEFINITION\n            PsiElement(identifier)('_')\n          PsiElement(:=)(':=')\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('test')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              PsiElement())(')')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('t')\n              PsiElement(.)('.')\n              PsiElement(identifier)('func1')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              PsiElement())(')')\n      PsiComment(GO_LINE_COMMENT)('// Unresolved reference here')\n      PsiElement(})('}')"
  },
  {
    "path": "testData/parser/TypeInBlock.go",
    "content": "package exec\n\nfunc Start() {\n\tif c.Process != nil {\n\t\treturn 1\n\t}\n\ttype F func(*Cmd) ()\n}\n\nfunc Start2() {\n\tif c.Process != nil {\n\t\treturn 1\n\t}\n}\n"
  },
  {
    "path": "testData/parser/TypeInBlock.txt",
    "content": "GO_FILE\n  PACKAGE_CLAUSE\n    PsiElement(package)('package')\n    PsiElement(identifier)('exec')\n  IMPORT_LIST\n    <empty list>\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('Start')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            CONDITIONAL_EXPR\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('c')\n                PsiElement(.)('.')\n                PsiElement(identifier)('Process')\n              PsiElement(!=)('!=')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('nil')\n        BLOCK\n          PsiElement({)('{')\n          RETURN_STATEMENT\n            PsiElement(return)('return')\n            LITERAL\n              PsiElement(int)('1')\n          PsiElement(})('}')\n      STATEMENT\n        TYPE_DECLARATION\n          PsiElement(type)('type')\n          TYPE_SPEC\n            SPEC_TYPE\n              PsiElement(identifier)('F')\n              FUNCTION_TYPE\n                PsiElement(func)('func')\n                SIGNATURE\n                  PARAMETERS\n                    PsiElement(()('(')\n                    PARAMETER_DECLARATION\n                      POINTER_TYPE\n                        PsiElement(*)('*')\n                        TYPE\n                          TYPE_REFERENCE_EXPRESSION\n                            PsiElement(identifier)('Cmd')\n                    PsiElement())(')')\n                  RESULT\n                    PARAMETERS\n                      PsiElement(()('(')\n                      PsiElement())(')')\n      PsiElement(})('}')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('Start2')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      PsiElement(if)('if')\n      PsiElement(identifier)('c')\n      PsiElement(.)('.')\n      PsiElement(identifier)('Process')\n      PsiElement(!=)('!=')\n      PsiElement(identifier)('nil')\n      PsiElement({)('{')\n      PsiElement(return)('return')\n      PsiElement(int)('1')\n      PsiElement(})('}')\n      PsiElement(})('}')"
  },
  {
    "path": "testData/parser/Types.go",
    "content": "package main\n\ntype (\n  T0 []string\n  T1 []string\n  T2 struct{ a, b int }\n  T3 struct{ a, c int }\n  T4 func(int, float64) *T0\n  T5 func(x int, y float64) *[]string\n)\n\nfunc main() {\n        type Point interface {\n\t}\n\n\tvar p interface{} = nil\n\tvar c chan int = nil\n\tvar x func() = nil\n\tvar y func()int = nil\n\t*Point(p)        // same as *(Point(p))\n\t*(Point(p))\n\t(*Point)(p)      // p is converted to *Point\n\t<-chan int(c)    // same as <-(chan int(c))\n\t(<-chan int)(c)  // c is converted to <-chan int\n\t(func())(x)      // x is converted to func()\n\t(func() int)(y)  // x is converted to func() int\n\tfunc() int(y)    // x is converted to func() int (unambiguous)\n\t//func()(x)        // function signature func() x\n}"
  },
  {
    "path": "testData/parser/Types.txt",
    "content": "GO_FILE\n  PACKAGE_CLAUSE\n    PsiElement(package)('package')\n    PsiElement(identifier)('main')\n  IMPORT_LIST\n    <empty list>\n  TYPE_DECLARATION\n    PsiElement(type)('type')\n    PsiElement(()('(')\n    TYPE_SPEC\n      SPEC_TYPE\n        PsiElement(identifier)('T0')\n        ARRAY_OR_SLICE_TYPE\n          PsiElement([)('[')\n          PsiElement(])(']')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('string')\n    TYPE_SPEC\n      SPEC_TYPE\n        PsiElement(identifier)('T1')\n        ARRAY_OR_SLICE_TYPE\n          PsiElement([)('[')\n          PsiElement(])(']')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('string')\n    TYPE_SPEC\n      SPEC_TYPE\n        PsiElement(identifier)('T2')\n        STRUCT_TYPE\n          PsiElement(struct)('struct')\n          PsiElement({)('{')\n          FIELD_DECLARATION\n            FIELD_DEFINITION\n              PsiElement(identifier)('a')\n            PsiElement(,)(',')\n            FIELD_DEFINITION\n              PsiElement(identifier)('b')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('int')\n          PsiElement(})('}')\n    TYPE_SPEC\n      SPEC_TYPE\n        PsiElement(identifier)('T3')\n        STRUCT_TYPE\n          PsiElement(struct)('struct')\n          PsiElement({)('{')\n          FIELD_DECLARATION\n            FIELD_DEFINITION\n              PsiElement(identifier)('a')\n            PsiElement(,)(',')\n            FIELD_DEFINITION\n              PsiElement(identifier)('c')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('int')\n          PsiElement(})('}')\n    TYPE_SPEC\n      SPEC_TYPE\n        PsiElement(identifier)('T4')\n        FUNCTION_TYPE\n          PsiElement(func)('func')\n          SIGNATURE\n            PARAMETERS\n              PsiElement(()('(')\n              PARAMETER_DECLARATION\n                TYPE\n                  TYPE_REFERENCE_EXPRESSION\n                    PsiElement(identifier)('int')\n              PsiElement(,)(',')\n              PARAMETER_DECLARATION\n                TYPE\n                  TYPE_REFERENCE_EXPRESSION\n                    PsiElement(identifier)('float64')\n              PsiElement())(')')\n            RESULT\n              POINTER_TYPE\n                PsiElement(*)('*')\n                TYPE\n                  TYPE_REFERENCE_EXPRESSION\n                    PsiElement(identifier)('T0')\n    TYPE_SPEC\n      SPEC_TYPE\n        PsiElement(identifier)('T5')\n        FUNCTION_TYPE\n          PsiElement(func)('func')\n          SIGNATURE\n            PARAMETERS\n              PsiElement(()('(')\n              PARAMETER_DECLARATION\n                PARAM_DEFINITION\n                  PsiElement(identifier)('x')\n                TYPE\n                  TYPE_REFERENCE_EXPRESSION\n                    PsiElement(identifier)('int')\n              PsiElement(,)(',')\n              PARAMETER_DECLARATION\n                PARAM_DEFINITION\n                  PsiElement(identifier)('y')\n                TYPE\n                  TYPE_REFERENCE_EXPRESSION\n                    PsiElement(identifier)('float64')\n              PsiElement())(')')\n            RESULT\n              POINTER_TYPE\n                PsiElement(*)('*')\n                ARRAY_OR_SLICE_TYPE\n                  PsiElement([)('[')\n                  PsiElement(])(']')\n                  TYPE\n                    TYPE_REFERENCE_EXPRESSION\n                      PsiElement(identifier)('string')\n    PsiElement())(')')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('main')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      STATEMENT\n        TYPE_DECLARATION\n          PsiElement(type)('type')\n          TYPE_SPEC\n            SPEC_TYPE\n              PsiElement(identifier)('Point')\n              INTERFACE_TYPE\n                PsiElement(interface)('interface')\n                PsiElement({)('{')\n                PsiElement(})('}')\n      STATEMENT\n        VAR_DECLARATION\n          PsiElement(var)('var')\n          VAR_SPEC\n            VAR_DEFINITION\n              PsiElement(identifier)('p')\n            INTERFACE_TYPE\n              PsiElement(interface)('interface')\n              PsiElement({)('{')\n              PsiElement(})('}')\n            PsiElement(=)('=')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('nil')\n      STATEMENT\n        VAR_DECLARATION\n          PsiElement(var)('var')\n          VAR_SPEC\n            VAR_DEFINITION\n              PsiElement(identifier)('c')\n            CHANNEL_TYPE\n              PsiElement(chan)('chan')\n              TYPE\n                TYPE_REFERENCE_EXPRESSION\n                  PsiElement(identifier)('int')\n            PsiElement(=)('=')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('nil')\n      STATEMENT\n        VAR_DECLARATION\n          PsiElement(var)('var')\n          VAR_SPEC\n            VAR_DEFINITION\n              PsiElement(identifier)('x')\n            FUNCTION_TYPE\n              PsiElement(func)('func')\n              SIGNATURE\n                PARAMETERS\n                  PsiElement(()('(')\n                  PsiElement())(')')\n            PsiElement(=)('=')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('nil')\n      STATEMENT\n        VAR_DECLARATION\n          PsiElement(var)('var')\n          VAR_SPEC\n            VAR_DEFINITION\n              PsiElement(identifier)('y')\n            FUNCTION_TYPE\n              PsiElement(func)('func')\n              SIGNATURE\n                PARAMETERS\n                  PsiElement(()('(')\n                  PsiElement())(')')\n                RESULT\n                  TYPE\n                    TYPE_REFERENCE_EXPRESSION\n                      PsiElement(identifier)('int')\n            PsiElement(=)('=')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('nil')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          UNARY_EXPR\n            PsiElement(*)('*')\n            CALL_EXPR\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('Point')\n              ARGUMENT_LIST\n                PsiElement(()('(')\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('p')\n                PsiElement())(')')\n      PsiComment(GO_LINE_COMMENT)('// same as *(Point(p))')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          UNARY_EXPR\n            PsiElement(*)('*')\n            PARENTHESES_EXPR\n              PsiElement(()('(')\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('Point')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('p')\n                  PsiElement())(')')\n              PsiElement())(')')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CONVERSION_EXPR\n            PAR_TYPE\n              PsiElement(()('(')\n              POINTER_TYPE\n                PsiElement(*)('*')\n                TYPE\n                  TYPE_REFERENCE_EXPRESSION\n                    PsiElement(identifier)('Point')\n              PsiElement())(')')\n            PsiElement(()('(')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('p')\n            PsiElement())(')')\n      PsiComment(GO_LINE_COMMENT)('// p is converted to *Point')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          UNARY_EXPR\n            PsiElement(<-)('<-')\n            CONVERSION_EXPR\n              CHANNEL_TYPE\n                PsiElement(chan)('chan')\n                TYPE\n                  TYPE_REFERENCE_EXPRESSION\n                    PsiElement(identifier)('int')\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('c')\n              PsiElement())(')')\n      PsiComment(GO_LINE_COMMENT)('// same as <-(chan int(c))')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CONVERSION_EXPR\n            PAR_TYPE\n              PsiElement(()('(')\n              CHANNEL_TYPE\n                PsiElement(<-)('<-')\n                PsiElement(chan)('chan')\n                TYPE\n                  TYPE_REFERENCE_EXPRESSION\n                    PsiElement(identifier)('int')\n              PsiElement())(')')\n            PsiElement(()('(')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('c')\n            PsiElement())(')')\n      PsiComment(GO_LINE_COMMENT)('// c is converted to <-chan int')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CONVERSION_EXPR\n            PAR_TYPE\n              PsiElement(()('(')\n              FUNCTION_TYPE\n                PsiElement(func)('func')\n                SIGNATURE\n                  PARAMETERS\n                    PsiElement(()('(')\n                    PsiElement())(')')\n              PsiElement())(')')\n            PsiElement(()('(')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('x')\n            PsiElement())(')')\n      PsiComment(GO_LINE_COMMENT)('// x is converted to func()')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CONVERSION_EXPR\n            PAR_TYPE\n              PsiElement(()('(')\n              FUNCTION_TYPE\n                PsiElement(func)('func')\n                SIGNATURE\n                  PARAMETERS\n                    PsiElement(()('(')\n                    PsiElement())(')')\n                  RESULT\n                    TYPE\n                      TYPE_REFERENCE_EXPRESSION\n                        PsiElement(identifier)('int')\n              PsiElement())(')')\n            PsiElement(()('(')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('y')\n            PsiElement())(')')\n      PsiComment(GO_LINE_COMMENT)('// x is converted to func() int')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CONVERSION_EXPR\n            FUNCTION_TYPE\n              PsiElement(func)('func')\n              SIGNATURE\n                PARAMETERS\n                  PsiElement(()('(')\n                  PsiElement())(')')\n                RESULT\n                  TYPE\n                    TYPE_REFERENCE_EXPRESSION\n                      PsiElement(identifier)('int')\n            PsiElement(()('(')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('y')\n            PsiElement())(')')\n      PsiComment(GO_LINE_COMMENT)('// x is converted to func() int (unambiguous)')\n      PsiComment(GO_LINE_COMMENT)('//func()(x)        // function signature func() x')\n      PsiElement(})('}')"
  },
  {
    "path": "testData/parser/Writer.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage tar\n\n// TODO(dsymonds):\n// - catch more errors (no first header, etc.)\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"path\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n)\n\nvar (\n\tErrWriteTooLong    = errors.New(\"archive/tar: write too long\")\n\tErrFieldTooLong    = errors.New(\"archive/tar: header field too long\")\n\tErrWriteAfterClose = errors.New(\"archive/tar: write after close\")\n\terrNameTooLong     = errors.New(\"archive/tar: name too long\")\n)\n\n// A Writer provides sequential writing of a tar archive in POSIX.1 format.\n// A tar archive consists of a sequence of files.\n// Call WriteHeader to begin a new file, and then call Write to supply that file's data,\n// writing at most hdr.Size bytes in total.\ntype Writer struct {\n\tw          io.Writer\n\terr        error\n\tnb         int64 // number of unwritten bytes for current file entry\n\tpad        int64 // amount of padding to write after current file entry\n\tclosed     bool\n\tusedBinary bool // whether the binary numeric field extension was used\n}\n\n// NewWriter creates a new Writer writing to w.\nfunc NewWriter(w io.Writer) *Writer { return &Writer{w: w} }\n\n// Flush finishes writing the current file (optional).\nfunc (tw *Writer) Flush() error {\n\tif tw.nb > 0 {\n\t\ttw.err = fmt.Errorf(\"archive/tar: missed writing %d bytes\", tw.nb)\n\t\treturn tw.err\n\t}\n\n\tn := tw.nb + tw.pad\n\tfor n > 0 && tw.err == nil {\n\t\tnr := n\n\t\tif nr > blockSize {\n\t\t\tnr = blockSize\n\t\t}\n\t\tvar nw int\n\t\tnw, tw.err = tw.w.Write(zeroBlock[0:nr])\n\t\tn -= int64(nw)\n\t}\n\ttw.nb = 0\n\ttw.pad = 0\n\treturn tw.err\n}\n\n// Write s into b, terminating it with a NUL if there is room.\nfunc (tw *Writer) cString(b []byte, s string) {\n\tif len(s) > len(b) {\n\t\tif tw.err == nil {\n\t\t\ttw.err = ErrFieldTooLong\n\t\t}\n\t\treturn\n\t}\n\tcopy(b, s)\n\tif len(s) < len(b) {\n\t\tb[len(s)] = 0\n\t}\n}\n\n// Encode x as an octal ASCII string and write it into b with leading zeros.\nfunc (tw *Writer) octal(b []byte, x int64) {\n\ts := strconv.FormatInt(x, 8)\n\t// leading zeros, but leave room for a NUL.\n\tfor len(s)+1 < len(b) {\n\t\ts = \"0\" + s\n\t}\n\ttw.cString(b, s)\n}\n\n// Write x into b, either as octal or as binary (GNUtar/star extension).\nfunc (tw *Writer) numeric(b []byte, x int64) {\n\t// Try octal first.\n\ts := strconv.FormatInt(x, 8)\n\tif len(s) < len(b) {\n\t\ttw.octal(b, x)\n\t\treturn\n\t}\n\t// Too big: use binary (big-endian).\n\ttw.usedBinary = true\n\tfor i := len(b) - 1; x > 0 && i >= 0; i-- {\n\t\tb[i] = byte(x)\n\t\tx >>= 8\n\t}\n\tb[0] |= 0x80 // highest bit indicates binary format\n}\n\nvar (\n\tminTime = time.Unix(0, 0)\n\t// There is room for 11 octal digits (33 bits) of mtime.\n\tmaxTime = minTime.Add((1<<33 - 1) * time.Second)\n)\n\n// WriteHeader writes hdr and prepares to accept the file's contents.\n// WriteHeader calls Flush if it is not the first header.\n// Calling after a Close will return ErrWriteAfterClose.\nfunc (tw *Writer) WriteHeader(hdr *Header) error {\n\tif tw.closed {\n\t\treturn ErrWriteAfterClose\n\t}\n\tif tw.err == nil {\n\t\ttw.Flush()\n\t}\n\tif tw.err != nil {\n\t\treturn tw.err\n\t}\n\t// Decide whether or not to use PAX extensions\n\t// TODO(shanemhansen): we might want to use PAX headers for\n\t// subsecond time resolution, but for now let's just capture\n\t// the long name/long symlink use case.\n\tsuffix := hdr.Name\n\tprefix := \"\"\n\tif len(hdr.Name) > fileNameSize || len(hdr.Linkname) > fileNameSize {\n\t\tvar err error\n\t\tprefix, suffix, err = tw.splitUSTARLongName(hdr.Name)\n\t\t// Either we were unable to pack the long name into ustar format\n\t\t// or the link name is too long; use PAX headers.\n\t\tif err == errNameTooLong || len(hdr.Linkname) > fileNameSize {\n\t\t\tif err := tw.writePAXHeader(hdr); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t} else if err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\ttw.nb = int64(hdr.Size)\n\ttw.pad = -tw.nb & (blockSize - 1) // blockSize is a power of two\n\n\theader := make([]byte, blockSize)\n\ts := slicer(header)\n\ttw.cString(s.next(fileNameSize), suffix)\n\n\t// Handle out of range ModTime carefully.\n\tvar modTime int64\n\tif !hdr.ModTime.Before(minTime) && !hdr.ModTime.After(maxTime) {\n\t\tmodTime = hdr.ModTime.Unix()\n\t}\n\n\ttw.octal(s.next(8), hdr.Mode)          // 100:108\n\ttw.numeric(s.next(8), int64(hdr.Uid))  // 108:116\n\ttw.numeric(s.next(8), int64(hdr.Gid))  // 116:124\n\ttw.numeric(s.next(12), hdr.Size)       // 124:136\n\ttw.numeric(s.next(12), modTime)        // 136:148\n\ts.next(8)                              // chksum (148:156)\n\ts.next(1)[0] = hdr.Typeflag            // 156:157\n\ttw.cString(s.next(100), hdr.Linkname)  // linkname (157:257)\n\tcopy(s.next(8), []byte(\"ustar\\x0000\")) // 257:265\n\ttw.cString(s.next(32), hdr.Uname)      // 265:297\n\ttw.cString(s.next(32), hdr.Gname)      // 297:329\n\ttw.numeric(s.next(8), hdr.Devmajor)    // 329:337\n\ttw.numeric(s.next(8), hdr.Devminor)    // 337:345\n\ttw.cString(s.next(155), prefix)        // 345:500\n\t// Use the GNU magic instead of POSIX magic if we used any GNU extensions.\n\tif tw.usedBinary {\n\t\tcopy(header[257:265], []byte(\"ustar  \\x00\"))\n\t}\n\t// Use the ustar magic if we used ustar long names.\n\tif len(prefix) > 0 {\n\t\tcopy(header[257:265], []byte(\"ustar\\000\"))\n\t}\n\n\t// The chksum field is terminated by a NUL and a space.\n\t// This is different from the other octal fields.\n\tchksum, _ := checksum(header)\n\ttw.octal(header[148:155], chksum)\n\theader[155] = ' '\n\n\tif tw.err != nil {\n\t\t// problem with header; probably integer too big for a field.\n\t\treturn tw.err\n\t}\n\n\t_, tw.err = tw.w.Write(header)\n\n\treturn tw.err\n}\n\n// writeUSTARLongName splits a USTAR long name hdr.Name.\n// name must be < 256 characters. errNameTooLong is returned\n// if hdr.Name can't be split. The splitting heuristic\n// is compatible with gnu tar.\nfunc (tw *Writer) splitUSTARLongName(name string) (prefix, suffix string, err error) {\n\tlength := len(name)\n\tif length > fileNamePrefixSize+1 {\n\t\tlength = fileNamePrefixSize + 1\n\t} else if name[length-1] == '/' {\n\t\tlength--\n\t}\n\ti := strings.LastIndex(name[:length], \"/\")\n\tnlen := length - i - 1\n\tif i <= 0 || nlen > fileNameSize || nlen == 0 {\n\t\terr = errNameTooLong\n\t\treturn\n\t}\n\tprefix, suffix = name[:i], name[i+1:]\n\treturn\n}\n\n// writePaxHeader writes an extended pax header to the\n// archive.\nfunc (tw *Writer) writePAXHeader(hdr *Header) error {\n\t// Prepare extended header\n\text := new(Header)\n\text.Typeflag = TypeXHeader\n\t// Setting ModTime is required for reader parsing to\n\t// succeed, and seems harmless enough.\n\text.ModTime = hdr.ModTime\n\t// The spec asks that we namespace our pseudo files\n\t// with the current pid.\n\tpid := os.Getpid()\n\tdir, file := path.Split(hdr.Name)\n\text.Name = path.Join(dir,\n\t\tfmt.Sprintf(\"PaxHeaders.%d\", pid), file)[0:100]\n\t// Construct the body\n\tvar buf bytes.Buffer\n\tif len(hdr.Name) > fileNameSize {\n\t\tfmt.Fprint(&buf, paxHeader(\"path=\"+hdr.Name))\n\t}\n\tif len(hdr.Linkname) > fileNameSize {\n\t\tfmt.Fprint(&buf, paxHeader(\"linkpath=\"+hdr.Linkname))\n\t}\n\text.Size = int64(len(buf.Bytes()))\n\tif err := tw.WriteHeader(ext); err != nil {\n\t\treturn err\n\t}\n\tif _, err := tw.Write(buf.Bytes()); err != nil {\n\t\treturn err\n\t}\n\tif err := tw.Flush(); err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\n// paxHeader formats a single pax record, prefixing it with the appropriate length\nfunc paxHeader(msg string) string {\n\tconst padding = 2 // Extra padding for space and newline\n\tsize := len(msg) + padding\n\tsize += len(strconv.Itoa(size))\n\trecord := fmt.Sprintf(\"%d %s\\n\", size, msg)\n\tif len(record) != size {\n\t\t// Final adjustment if adding size increased\n\t\t// the number of digits in size\n\t\tsize = len(record)\n\t\trecord = fmt.Sprintf(\"%d %s\\n\", size, msg)\n\t}\n\treturn record\n}\n\n// Write writes to the current entry in the tar archive.\n// Write returns the error ErrWriteTooLong if more than\n// hdr.Size bytes are written after WriteHeader.\nfunc (tw *Writer) Write(b []byte) (n int, err error) {\n\tif tw.closed {\n\t\terr = ErrWriteTooLong\n\t\treturn\n\t}\n\toverwrite := false\n\tif int64(len(b)) > tw.nb {\n\t\tb = b[0:tw.nb]\n\t\toverwrite = true\n\t}\n\tn, err = tw.w.Write(b)\n\ttw.nb -= int64(n)\n\tif err == nil && overwrite {\n\t\terr = ErrWriteTooLong\n\t\treturn\n\t}\n\ttw.err = err\n\treturn\n}\n\n// Close closes the tar archive, flushing any unwritten\n// data to the underlying writer.\nfunc (tw *Writer) Close() error {\n\tif tw.err != nil || tw.closed {\n\t\treturn tw.err\n\t}\n\ttw.Flush()\n\ttw.closed = true\n\tif tw.err != nil {\n\t\treturn tw.err\n\t}\n\n\t// trailer: two zero blocks\n\tfor i := 0; i < 2; i++ {\n\t\t_, tw.err = tw.w.Write(zeroBlock)\n\t\tif tw.err != nil {\n\t\t\tbreak\n\t\t}\n\t}\n\treturn tw.err\n}\n"
  },
  {
    "path": "testData/parser/Writer.txt",
    "content": "GO_FILE\n  PsiComment(GO_LINE_COMMENT)('// Copyright 2009 The Go Authors. All rights reserved.')\n  PsiComment(GO_LINE_COMMENT)('// Use of this source code is governed by a BSD-style')\n  PsiComment(GO_LINE_COMMENT)('// license that can be found in the LICENSE file.')\n  PACKAGE_CLAUSE\n    PsiElement(package)('package')\n    PsiElement(identifier)('tar')\n  PsiComment(GO_LINE_COMMENT)('// TODO(dsymonds):')\n  PsiComment(GO_LINE_COMMENT)('// - catch more errors (no first header, etc.)')\n  IMPORT_LIST\n    IMPORT_DECLARATION\n      PsiElement(import)('import')\n      PsiElement(()('(')\n      IMPORT_SPEC\n        IMPORT_STRING\n          STRING_LITERAL\n            PsiElement(string)('\"bytes\"')\n      IMPORT_SPEC\n        IMPORT_STRING\n          STRING_LITERAL\n            PsiElement(string)('\"errors\"')\n      IMPORT_SPEC\n        IMPORT_STRING\n          STRING_LITERAL\n            PsiElement(string)('\"fmt\"')\n      IMPORT_SPEC\n        IMPORT_STRING\n          STRING_LITERAL\n            PsiElement(string)('\"io\"')\n      IMPORT_SPEC\n        IMPORT_STRING\n          STRING_LITERAL\n            PsiElement(string)('\"os\"')\n      IMPORT_SPEC\n        IMPORT_STRING\n          STRING_LITERAL\n            PsiElement(string)('\"path\"')\n      IMPORT_SPEC\n        IMPORT_STRING\n          STRING_LITERAL\n            PsiElement(string)('\"strconv\"')\n      IMPORT_SPEC\n        IMPORT_STRING\n          STRING_LITERAL\n            PsiElement(string)('\"strings\"')\n      IMPORT_SPEC\n        IMPORT_STRING\n          STRING_LITERAL\n            PsiElement(string)('\"time\"')\n      PsiElement())(')')\n  VAR_DECLARATION\n    PsiElement(var)('var')\n    PsiElement(()('(')\n    VAR_SPEC\n      VAR_DEFINITION\n        PsiElement(identifier)('ErrWriteTooLong')\n      PsiElement(=)('=')\n      CALL_EXPR\n        REFERENCE_EXPRESSION\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('errors')\n          PsiElement(.)('.')\n          PsiElement(identifier)('New')\n        ARGUMENT_LIST\n          PsiElement(()('(')\n          STRING_LITERAL\n            PsiElement(string)('\"archive/tar: write too long\"')\n          PsiElement())(')')\n    VAR_SPEC\n      VAR_DEFINITION\n        PsiElement(identifier)('ErrFieldTooLong')\n      PsiElement(=)('=')\n      CALL_EXPR\n        REFERENCE_EXPRESSION\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('errors')\n          PsiElement(.)('.')\n          PsiElement(identifier)('New')\n        ARGUMENT_LIST\n          PsiElement(()('(')\n          STRING_LITERAL\n            PsiElement(string)('\"archive/tar: header field too long\"')\n          PsiElement())(')')\n    VAR_SPEC\n      VAR_DEFINITION\n        PsiElement(identifier)('ErrWriteAfterClose')\n      PsiElement(=)('=')\n      CALL_EXPR\n        REFERENCE_EXPRESSION\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('errors')\n          PsiElement(.)('.')\n          PsiElement(identifier)('New')\n        ARGUMENT_LIST\n          PsiElement(()('(')\n          STRING_LITERAL\n            PsiElement(string)('\"archive/tar: write after close\"')\n          PsiElement())(')')\n    VAR_SPEC\n      VAR_DEFINITION\n        PsiElement(identifier)('errNameTooLong')\n      PsiElement(=)('=')\n      CALL_EXPR\n        REFERENCE_EXPRESSION\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('errors')\n          PsiElement(.)('.')\n          PsiElement(identifier)('New')\n        ARGUMENT_LIST\n          PsiElement(()('(')\n          STRING_LITERAL\n            PsiElement(string)('\"archive/tar: name too long\"')\n          PsiElement())(')')\n    PsiElement())(')')\n  PsiComment(GO_LINE_COMMENT)('// A Writer provides sequential writing of a tar archive in POSIX.1 format.')\n  PsiComment(GO_LINE_COMMENT)('// A tar archive consists of a sequence of files.')\n  PsiComment(GO_LINE_COMMENT)('// Call WriteHeader to begin a new file, and then call Write to supply that file's data,')\n  PsiComment(GO_LINE_COMMENT)('// writing at most hdr.Size bytes in total.')\n  TYPE_DECLARATION\n    PsiElement(type)('type')\n    TYPE_SPEC\n      SPEC_TYPE\n        PsiElement(identifier)('Writer')\n        STRUCT_TYPE\n          PsiElement(struct)('struct')\n          PsiElement({)('{')\n          FIELD_DECLARATION\n            FIELD_DEFINITION\n              PsiElement(identifier)('w')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                TYPE_REFERENCE_EXPRESSION\n                  PsiElement(identifier)('io')\n                PsiElement(.)('.')\n                PsiElement(identifier)('Writer')\n          FIELD_DECLARATION\n            FIELD_DEFINITION\n              PsiElement(identifier)('err')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('error')\n          FIELD_DECLARATION\n            FIELD_DEFINITION\n              PsiElement(identifier)('nb')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('int64')\n          PsiComment(GO_LINE_COMMENT)('// number of unwritten bytes for current file entry')\n          FIELD_DECLARATION\n            FIELD_DEFINITION\n              PsiElement(identifier)('pad')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('int64')\n          PsiComment(GO_LINE_COMMENT)('// amount of padding to write after current file entry')\n          FIELD_DECLARATION\n            FIELD_DEFINITION\n              PsiElement(identifier)('closed')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('bool')\n          FIELD_DECLARATION\n            FIELD_DEFINITION\n              PsiElement(identifier)('usedBinary')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('bool')\n          PsiComment(GO_LINE_COMMENT)('// whether the binary numeric field extension was used')\n          PsiElement(})('}')\n  PsiComment(GO_LINE_COMMENT)('// NewWriter creates a new Writer writing to w.')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('NewWriter')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('w')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('io')\n              PsiElement(.)('.')\n              PsiElement(identifier)('Writer')\n        PsiElement())(')')\n      RESULT\n        POINTER_TYPE\n          PsiElement(*)('*')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('Writer')\n    BLOCK\n      PsiElement({)('{')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n        UNARY_EXPR\n          PsiElement(&)('&')\n          COMPOSITE_LIT\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('Writer')\n            LITERAL_VALUE\n              PsiElement({)('{')\n              ELEMENT\n                KEY\n                  FIELD_NAME\n                    PsiElement(identifier)('w')\n                PsiElement(:)(':')\n                VALUE\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('w')\n              PsiElement(})('}')\n      PsiElement(})('}')\n  PsiComment(GO_LINE_COMMENT)('// Flush finishes writing the current file (optional).')\n  METHOD_DECLARATION\n    PsiElement(func)('func')\n    RECEIVER\n      PsiElement(()('(')\n      PsiElement(identifier)('tw')\n      POINTER_TYPE\n        PsiElement(*)('*')\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('Writer')\n      PsiElement())(')')\n    PsiElement(identifier)('Flush')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n      RESULT\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('error')\n    BLOCK\n      PsiElement({)('{')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            CONDITIONAL_EXPR\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('tw')\n                PsiElement(.)('.')\n                PsiElement(identifier)('nb')\n              PsiElement(>)('>')\n              LITERAL\n                PsiElement(int)('0')\n        BLOCK\n          PsiElement({)('{')\n          ASSIGNMENT_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('tw')\n                PsiElement(.)('.')\n                PsiElement(identifier)('err')\n            ASSIGN_OP\n              PsiElement(=)('=')\n            CALL_EXPR\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('fmt')\n                PsiElement(.)('.')\n                PsiElement(identifier)('Errorf')\n              ARGUMENT_LIST\n                PsiElement(()('(')\n                STRING_LITERAL\n                  PsiElement(string)('\"archive/tar: missed writing %d bytes\"')\n                PsiElement(,)(',')\n                REFERENCE_EXPRESSION\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('tw')\n                  PsiElement(.)('.')\n                  PsiElement(identifier)('nb')\n                PsiElement())(')')\n          RETURN_STATEMENT\n            PsiElement(return)('return')\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('tw')\n              PsiElement(.)('.')\n              PsiElement(identifier)('err')\n          PsiElement(})('}')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('n')\n          PsiElement(:=)(':=')\n          ADD_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('tw')\n              PsiElement(.)('.')\n              PsiElement(identifier)('nb')\n            PsiElement(+)('+')\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('tw')\n              PsiElement(.)('.')\n              PsiElement(identifier)('pad')\n      FOR_STATEMENT\n        PsiElement(for)('for')\n        AND_EXPR\n          CONDITIONAL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('n')\n            PsiElement(>)('>')\n            LITERAL\n              PsiElement(int)('0')\n          PsiElement(&&)('&&')\n          CONDITIONAL_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('tw')\n              PsiElement(.)('.')\n              PsiElement(identifier)('err')\n            PsiElement(==)('==')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('nil')\n        BLOCK\n          PsiElement({)('{')\n          SIMPLE_STATEMENT\n            SHORT_VAR_DECLARATION\n              VAR_DEFINITION\n                PsiElement(identifier)('nr')\n              PsiElement(:=)(':=')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('n')\n          IF_STATEMENT\n            PsiElement(if)('if')\n            SIMPLE_STATEMENT\n              LEFT_HAND_EXPR_LIST\n                CONDITIONAL_EXPR\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('nr')\n                  PsiElement(>)('>')\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('blockSize')\n            BLOCK\n              PsiElement({)('{')\n              ASSIGNMENT_STATEMENT\n                LEFT_HAND_EXPR_LIST\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('nr')\n                ASSIGN_OP\n                  PsiElement(=)('=')\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('blockSize')\n              PsiElement(})('}')\n          STATEMENT\n            VAR_DECLARATION\n              PsiElement(var)('var')\n              VAR_SPEC\n                VAR_DEFINITION\n                  PsiElement(identifier)('nw')\n                TYPE\n                  TYPE_REFERENCE_EXPRESSION\n                    PsiElement(identifier)('int')\n          ASSIGNMENT_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('nw')\n              PsiElement(,)(',')\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('tw')\n                PsiElement(.)('.')\n                PsiElement(identifier)('err')\n            ASSIGN_OP\n              PsiElement(=)('=')\n            CALL_EXPR\n              SELECTOR_EXPR\n                REFERENCE_EXPRESSION\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('tw')\n                  PsiElement(.)('.')\n                  PsiElement(identifier)('w')\n                PsiElement(.)('.')\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('Write')\n              ARGUMENT_LIST\n                PsiElement(()('(')\n                INDEX_OR_SLICE_EXPR\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('zeroBlock')\n                  PsiElement([)('[')\n                  LITERAL\n                    PsiElement(int)('0')\n                  PsiElement(:)(':')\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('nr')\n                  PsiElement(])(']')\n                PsiElement())(')')\n          ASSIGNMENT_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('n')\n            ASSIGN_OP\n              PsiElement(-=)('-=')\n            CALL_EXPR\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('int64')\n              ARGUMENT_LIST\n                PsiElement(()('(')\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('nw')\n                PsiElement())(')')\n          PsiElement(})('}')\n      ASSIGNMENT_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('tw')\n            PsiElement(.)('.')\n            PsiElement(identifier)('nb')\n        ASSIGN_OP\n          PsiElement(=)('=')\n        LITERAL\n          PsiElement(int)('0')\n      ASSIGNMENT_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('tw')\n            PsiElement(.)('.')\n            PsiElement(identifier)('pad')\n        ASSIGN_OP\n          PsiElement(=)('=')\n        LITERAL\n          PsiElement(int)('0')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n        REFERENCE_EXPRESSION\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('tw')\n          PsiElement(.)('.')\n          PsiElement(identifier)('err')\n      PsiElement(})('}')\n  PsiComment(GO_LINE_COMMENT)('// Write s into b, terminating it with a NUL if there is room.')\n  METHOD_DECLARATION\n    PsiElement(func)('func')\n    RECEIVER\n      PsiElement(()('(')\n      PsiElement(identifier)('tw')\n      POINTER_TYPE\n        PsiElement(*)('*')\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('Writer')\n      PsiElement())(')')\n    PsiElement(identifier)('cString')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('b')\n          ARRAY_OR_SLICE_TYPE\n            PsiElement([)('[')\n            PsiElement(])(']')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('byte')\n        PsiElement(,)(',')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('s')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('string')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            CONDITIONAL_EXPR\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('len')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('s')\n                  PsiElement())(')')\n              PsiElement(>)('>')\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('len')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('b')\n                  PsiElement())(')')\n        BLOCK\n          PsiElement({)('{')\n          IF_STATEMENT\n            PsiElement(if)('if')\n            SIMPLE_STATEMENT\n              LEFT_HAND_EXPR_LIST\n                CONDITIONAL_EXPR\n                  REFERENCE_EXPRESSION\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('tw')\n                    PsiElement(.)('.')\n                    PsiElement(identifier)('err')\n                  PsiElement(==)('==')\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('nil')\n            BLOCK\n              PsiElement({)('{')\n              ASSIGNMENT_STATEMENT\n                LEFT_HAND_EXPR_LIST\n                  REFERENCE_EXPRESSION\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('tw')\n                    PsiElement(.)('.')\n                    PsiElement(identifier)('err')\n                ASSIGN_OP\n                  PsiElement(=)('=')\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('ErrFieldTooLong')\n              PsiElement(})('}')\n          RETURN_STATEMENT\n            PsiElement(return)('return')\n          PsiElement(})('}')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('copy')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('b')\n              PsiElement(,)(',')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('s')\n              PsiElement())(')')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            CONDITIONAL_EXPR\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('len')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('s')\n                  PsiElement())(')')\n              PsiElement(<)('<')\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('len')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('b')\n                  PsiElement())(')')\n        BLOCK\n          PsiElement({)('{')\n          ASSIGNMENT_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              INDEX_OR_SLICE_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('b')\n                PsiElement([)('[')\n                CALL_EXPR\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('len')\n                  ARGUMENT_LIST\n                    PsiElement(()('(')\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('s')\n                    PsiElement())(')')\n                PsiElement(])(']')\n            ASSIGN_OP\n              PsiElement(=)('=')\n            LITERAL\n              PsiElement(int)('0')\n          PsiElement(})('}')\n      PsiElement(})('}')\n  PsiComment(GO_LINE_COMMENT)('// Encode x as an octal ASCII string and write it into b with leading zeros.')\n  METHOD_DECLARATION\n    PsiElement(func)('func')\n    RECEIVER\n      PsiElement(()('(')\n      PsiElement(identifier)('tw')\n      POINTER_TYPE\n        PsiElement(*)('*')\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('Writer')\n      PsiElement())(')')\n    PsiElement(identifier)('octal')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('b')\n          ARRAY_OR_SLICE_TYPE\n            PsiElement([)('[')\n            PsiElement(])(']')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('byte')\n        PsiElement(,)(',')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('x')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('int64')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('s')\n          PsiElement(:=)(':=')\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('strconv')\n              PsiElement(.)('.')\n              PsiElement(identifier)('FormatInt')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('x')\n              PsiElement(,)(',')\n              LITERAL\n                PsiElement(int)('8')\n              PsiElement())(')')\n      PsiComment(GO_LINE_COMMENT)('// leading zeros, but leave room for a NUL.')\n      FOR_STATEMENT\n        PsiElement(for)('for')\n        CONDITIONAL_EXPR\n          ADD_EXPR\n            CALL_EXPR\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('len')\n              ARGUMENT_LIST\n                PsiElement(()('(')\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('s')\n                PsiElement())(')')\n            PsiElement(+)('+')\n            LITERAL\n              PsiElement(int)('1')\n          PsiElement(<)('<')\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('len')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('b')\n              PsiElement())(')')\n        BLOCK\n          PsiElement({)('{')\n          ASSIGNMENT_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('s')\n            ASSIGN_OP\n              PsiElement(=)('=')\n            ADD_EXPR\n              STRING_LITERAL\n                PsiElement(string)('\"0\"')\n              PsiElement(+)('+')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('s')\n          PsiElement(})('}')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('tw')\n              PsiElement(.)('.')\n              PsiElement(identifier)('cString')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('b')\n              PsiElement(,)(',')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('s')\n              PsiElement())(')')\n      PsiElement(})('}')\n  PsiComment(GO_LINE_COMMENT)('// Write x into b, either as octal or as binary (GNUtar/star extension).')\n  METHOD_DECLARATION\n    PsiElement(func)('func')\n    RECEIVER\n      PsiElement(()('(')\n      PsiElement(identifier)('tw')\n      POINTER_TYPE\n        PsiElement(*)('*')\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('Writer')\n      PsiElement())(')')\n    PsiElement(identifier)('numeric')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('b')\n          ARRAY_OR_SLICE_TYPE\n            PsiElement([)('[')\n            PsiElement(])(']')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('byte')\n        PsiElement(,)(',')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('x')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('int64')\n        PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      PsiComment(GO_LINE_COMMENT)('// Try octal first.')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('s')\n          PsiElement(:=)(':=')\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('strconv')\n              PsiElement(.)('.')\n              PsiElement(identifier)('FormatInt')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('x')\n              PsiElement(,)(',')\n              LITERAL\n                PsiElement(int)('8')\n              PsiElement())(')')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            CONDITIONAL_EXPR\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('len')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('s')\n                  PsiElement())(')')\n              PsiElement(<)('<')\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('len')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('b')\n                  PsiElement())(')')\n        BLOCK\n          PsiElement({)('{')\n          SIMPLE_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('tw')\n                  PsiElement(.)('.')\n                  PsiElement(identifier)('octal')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('b')\n                  PsiElement(,)(',')\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('x')\n                  PsiElement())(')')\n          RETURN_STATEMENT\n            PsiElement(return)('return')\n          PsiElement(})('}')\n      PsiComment(GO_LINE_COMMENT)('// Too big: use binary (big-endian).')\n      ASSIGNMENT_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('tw')\n            PsiElement(.)('.')\n            PsiElement(identifier)('usedBinary')\n        ASSIGN_OP\n          PsiElement(=)('=')\n        REFERENCE_EXPRESSION\n          PsiElement(identifier)('true')\n      FOR_STATEMENT\n        PsiElement(for)('for')\n        FOR_CLAUSE\n          SIMPLE_STATEMENT\n            SHORT_VAR_DECLARATION\n              VAR_DEFINITION\n                PsiElement(identifier)('i')\n              PsiElement(:=)(':=')\n              ADD_EXPR\n                CALL_EXPR\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('len')\n                  ARGUMENT_LIST\n                    PsiElement(()('(')\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('b')\n                    PsiElement())(')')\n                PsiElement(-)('-')\n                LITERAL\n                  PsiElement(int)('1')\n          PsiElement(;)(';')\n          AND_EXPR\n            CONDITIONAL_EXPR\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('x')\n              PsiElement(>)('>')\n              LITERAL\n                PsiElement(int)('0')\n            PsiElement(&&)('&&')\n            CONDITIONAL_EXPR\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('i')\n              PsiElement(>=)('>=')\n              LITERAL\n                PsiElement(int)('0')\n          PsiElement(;)(';')\n          INC_DEC_STATEMENT\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('i')\n            PsiElement(--)('--')\n        BLOCK\n          PsiElement({)('{')\n          ASSIGNMENT_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              INDEX_OR_SLICE_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('b')\n                PsiElement([)('[')\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('i')\n                PsiElement(])(']')\n            ASSIGN_OP\n              PsiElement(=)('=')\n            CALL_EXPR\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('byte')\n              ARGUMENT_LIST\n                PsiElement(()('(')\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('x')\n                PsiElement())(')')\n          ASSIGNMENT_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('x')\n            ASSIGN_OP\n              PsiElement(>>=)('>>=')\n            LITERAL\n              PsiElement(int)('8')\n          PsiElement(})('}')\n      ASSIGNMENT_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          INDEX_OR_SLICE_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('b')\n            PsiElement([)('[')\n            LITERAL\n              PsiElement(int)('0')\n            PsiElement(])(']')\n        ASSIGN_OP\n          PsiElement(|=)('|=')\n        LITERAL\n          PsiElement(hex)('0x80')\n      PsiComment(GO_LINE_COMMENT)('// highest bit indicates binary format')\n      PsiElement(})('}')\n  VAR_DECLARATION\n    PsiElement(var)('var')\n    PsiElement(()('(')\n    VAR_SPEC\n      VAR_DEFINITION\n        PsiElement(identifier)('minTime')\n      PsiElement(=)('=')\n      CALL_EXPR\n        REFERENCE_EXPRESSION\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('time')\n          PsiElement(.)('.')\n          PsiElement(identifier)('Unix')\n        ARGUMENT_LIST\n          PsiElement(()('(')\n          LITERAL\n            PsiElement(int)('0')\n          PsiElement(,)(',')\n          LITERAL\n            PsiElement(int)('0')\n          PsiElement())(')')\n    PsiComment(GO_LINE_COMMENT)('// There is room for 11 octal digits (33 bits) of mtime.')\n    VAR_SPEC\n      VAR_DEFINITION\n        PsiElement(identifier)('maxTime')\n      PsiElement(=)('=')\n      CALL_EXPR\n        REFERENCE_EXPRESSION\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('minTime')\n          PsiElement(.)('.')\n          PsiElement(identifier)('Add')\n        ARGUMENT_LIST\n          PsiElement(()('(')\n          MUL_EXPR\n            PARENTHESES_EXPR\n              PsiElement(()('(')\n              ADD_EXPR\n                MUL_EXPR\n                  LITERAL\n                    PsiElement(int)('1')\n                  PsiElement(<<)('<<')\n                  LITERAL\n                    PsiElement(int)('33')\n                PsiElement(-)('-')\n                LITERAL\n                  PsiElement(int)('1')\n              PsiElement())(')')\n            PsiElement(*)('*')\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('time')\n              PsiElement(.)('.')\n              PsiElement(identifier)('Second')\n          PsiElement())(')')\n    PsiElement())(')')\n  PsiComment(GO_LINE_COMMENT)('// WriteHeader writes hdr and prepares to accept the file's contents.')\n  PsiComment(GO_LINE_COMMENT)('// WriteHeader calls Flush if it is not the first header.')\n  PsiComment(GO_LINE_COMMENT)('// Calling after a Close will return ErrWriteAfterClose.')\n  METHOD_DECLARATION\n    PsiElement(func)('func')\n    RECEIVER\n      PsiElement(()('(')\n      PsiElement(identifier)('tw')\n      POINTER_TYPE\n        PsiElement(*)('*')\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('Writer')\n      PsiElement())(')')\n    PsiElement(identifier)('WriteHeader')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('hdr')\n          POINTER_TYPE\n            PsiElement(*)('*')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('Header')\n        PsiElement())(')')\n      RESULT\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('error')\n    BLOCK\n      PsiElement({)('{')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('tw')\n              PsiElement(.)('.')\n              PsiElement(identifier)('closed')\n        BLOCK\n          PsiElement({)('{')\n          RETURN_STATEMENT\n            PsiElement(return)('return')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('ErrWriteAfterClose')\n          PsiElement(})('}')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            CONDITIONAL_EXPR\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('tw')\n                PsiElement(.)('.')\n                PsiElement(identifier)('err')\n              PsiElement(==)('==')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('nil')\n        BLOCK\n          PsiElement({)('{')\n          SIMPLE_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('tw')\n                  PsiElement(.)('.')\n                  PsiElement(identifier)('Flush')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  PsiElement())(')')\n          PsiElement(})('}')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            CONDITIONAL_EXPR\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('tw')\n                PsiElement(.)('.')\n                PsiElement(identifier)('err')\n              PsiElement(!=)('!=')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('nil')\n        BLOCK\n          PsiElement({)('{')\n          RETURN_STATEMENT\n            PsiElement(return)('return')\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('tw')\n              PsiElement(.)('.')\n              PsiElement(identifier)('err')\n          PsiElement(})('}')\n      PsiComment(GO_LINE_COMMENT)('// Decide whether or not to use PAX extensions')\n      PsiComment(GO_LINE_COMMENT)('// TODO(shanemhansen): we might want to use PAX headers for')\n      PsiComment(GO_LINE_COMMENT)('// subsecond time resolution, but for now let's just capture')\n      PsiComment(GO_LINE_COMMENT)('// the long name/long symlink use case.')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('suffix')\n          PsiElement(:=)(':=')\n          REFERENCE_EXPRESSION\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('hdr')\n            PsiElement(.)('.')\n            PsiElement(identifier)('Name')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('prefix')\n          PsiElement(:=)(':=')\n          STRING_LITERAL\n            PsiElement(string)('\"\"')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            OR_EXPR\n              CONDITIONAL_EXPR\n                CALL_EXPR\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('len')\n                  ARGUMENT_LIST\n                    PsiElement(()('(')\n                    REFERENCE_EXPRESSION\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('hdr')\n                      PsiElement(.)('.')\n                      PsiElement(identifier)('Name')\n                    PsiElement())(')')\n                PsiElement(>)('>')\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('fileNameSize')\n              PsiElement(||)('||')\n              CONDITIONAL_EXPR\n                CALL_EXPR\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('len')\n                  ARGUMENT_LIST\n                    PsiElement(()('(')\n                    REFERENCE_EXPRESSION\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('hdr')\n                      PsiElement(.)('.')\n                      PsiElement(identifier)('Linkname')\n                    PsiElement())(')')\n                PsiElement(>)('>')\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('fileNameSize')\n        BLOCK\n          PsiElement({)('{')\n          STATEMENT\n            VAR_DECLARATION\n              PsiElement(var)('var')\n              VAR_SPEC\n                VAR_DEFINITION\n                  PsiElement(identifier)('err')\n                TYPE\n                  TYPE_REFERENCE_EXPRESSION\n                    PsiElement(identifier)('error')\n          ASSIGNMENT_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('prefix')\n              PsiElement(,)(',')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('suffix')\n              PsiElement(,)(',')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('err')\n            ASSIGN_OP\n              PsiElement(=)('=')\n            CALL_EXPR\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('tw')\n                PsiElement(.)('.')\n                PsiElement(identifier)('splitUSTARLongName')\n              ARGUMENT_LIST\n                PsiElement(()('(')\n                REFERENCE_EXPRESSION\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('hdr')\n                  PsiElement(.)('.')\n                  PsiElement(identifier)('Name')\n                PsiElement())(')')\n          PsiComment(GO_LINE_COMMENT)('// Either we were unable to pack the long name into ustar format')\n          PsiComment(GO_LINE_COMMENT)('// or the link name is too long; use PAX headers.')\n          IF_STATEMENT\n            PsiElement(if)('if')\n            SIMPLE_STATEMENT\n              LEFT_HAND_EXPR_LIST\n                OR_EXPR\n                  CONDITIONAL_EXPR\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('err')\n                    PsiElement(==)('==')\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('errNameTooLong')\n                  PsiElement(||)('||')\n                  CONDITIONAL_EXPR\n                    CALL_EXPR\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('len')\n                      ARGUMENT_LIST\n                        PsiElement(()('(')\n                        REFERENCE_EXPRESSION\n                          REFERENCE_EXPRESSION\n                            PsiElement(identifier)('hdr')\n                          PsiElement(.)('.')\n                          PsiElement(identifier)('Linkname')\n                        PsiElement())(')')\n                    PsiElement(>)('>')\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('fileNameSize')\n            BLOCK\n              PsiElement({)('{')\n              IF_STATEMENT\n                PsiElement(if)('if')\n                SIMPLE_STATEMENT\n                  SHORT_VAR_DECLARATION\n                    VAR_DEFINITION\n                      PsiElement(identifier)('err')\n                    PsiElement(:=)(':=')\n                    CALL_EXPR\n                      REFERENCE_EXPRESSION\n                        REFERENCE_EXPRESSION\n                          PsiElement(identifier)('tw')\n                        PsiElement(.)('.')\n                        PsiElement(identifier)('writePAXHeader')\n                      ARGUMENT_LIST\n                        PsiElement(()('(')\n                        REFERENCE_EXPRESSION\n                          PsiElement(identifier)('hdr')\n                        PsiElement())(')')\n                PsiElement(;)(';')\n                CONDITIONAL_EXPR\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('err')\n                  PsiElement(!=)('!=')\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('nil')\n                BLOCK\n                  PsiElement({)('{')\n                  RETURN_STATEMENT\n                    PsiElement(return)('return')\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('err')\n                  PsiElement(})('}')\n              PsiElement(})('}')\n            ELSE_STATEMENT\n              PsiElement(else)('else')\n              IF_STATEMENT\n                PsiElement(if)('if')\n                SIMPLE_STATEMENT\n                  LEFT_HAND_EXPR_LIST\n                    CONDITIONAL_EXPR\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('err')\n                      PsiElement(!=)('!=')\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('nil')\n                BLOCK\n                  PsiElement({)('{')\n                  RETURN_STATEMENT\n                    PsiElement(return)('return')\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('err')\n                  PsiElement(})('}')\n          PsiElement(})('}')\n      ASSIGNMENT_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('tw')\n            PsiElement(.)('.')\n            PsiElement(identifier)('nb')\n        ASSIGN_OP\n          PsiElement(=)('=')\n        CALL_EXPR\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('int64')\n          ARGUMENT_LIST\n            PsiElement(()('(')\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('hdr')\n              PsiElement(.)('.')\n              PsiElement(identifier)('Size')\n            PsiElement())(')')\n      ASSIGNMENT_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('tw')\n            PsiElement(.)('.')\n            PsiElement(identifier)('pad')\n        ASSIGN_OP\n          PsiElement(=)('=')\n        MUL_EXPR\n          UNARY_EXPR\n            PsiElement(-)('-')\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('tw')\n              PsiElement(.)('.')\n              PsiElement(identifier)('nb')\n          PsiElement(&)('&')\n          PARENTHESES_EXPR\n            PsiElement(()('(')\n            ADD_EXPR\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('blockSize')\n              PsiElement(-)('-')\n              LITERAL\n                PsiElement(int)('1')\n            PsiElement())(')')\n      PsiComment(GO_LINE_COMMENT)('// blockSize is a power of two')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('header')\n          PsiElement(:=)(':=')\n          BUILTIN_CALL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('make')\n            BUILTIN_ARGUMENT_LIST\n              PsiElement(()('(')\n              ARRAY_OR_SLICE_TYPE\n                PsiElement([)('[')\n                PsiElement(])(']')\n                TYPE\n                  TYPE_REFERENCE_EXPRESSION\n                    PsiElement(identifier)('byte')\n              PsiElement(,)(',')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('blockSize')\n              PsiElement())(')')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('s')\n          PsiElement(:=)(':=')\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('slicer')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('header')\n              PsiElement())(')')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('tw')\n              PsiElement(.)('.')\n              PsiElement(identifier)('cString')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('s')\n                  PsiElement(.)('.')\n                  PsiElement(identifier)('next')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('fileNameSize')\n                  PsiElement())(')')\n              PsiElement(,)(',')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('suffix')\n              PsiElement())(')')\n      PsiComment(GO_LINE_COMMENT)('// Handle out of range ModTime carefully.')\n      STATEMENT\n        VAR_DECLARATION\n          PsiElement(var)('var')\n          VAR_SPEC\n            VAR_DEFINITION\n              PsiElement(identifier)('modTime')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('int64')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            AND_EXPR\n              UNARY_EXPR\n                PsiElement(!)('!')\n                CALL_EXPR\n                  SELECTOR_EXPR\n                    REFERENCE_EXPRESSION\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('hdr')\n                      PsiElement(.)('.')\n                      PsiElement(identifier)('ModTime')\n                    PsiElement(.)('.')\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('Before')\n                  ARGUMENT_LIST\n                    PsiElement(()('(')\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('minTime')\n                    PsiElement())(')')\n              PsiElement(&&)('&&')\n              UNARY_EXPR\n                PsiElement(!)('!')\n                CALL_EXPR\n                  SELECTOR_EXPR\n                    REFERENCE_EXPRESSION\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('hdr')\n                      PsiElement(.)('.')\n                      PsiElement(identifier)('ModTime')\n                    PsiElement(.)('.')\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('After')\n                  ARGUMENT_LIST\n                    PsiElement(()('(')\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('maxTime')\n                    PsiElement())(')')\n        BLOCK\n          PsiElement({)('{')\n          ASSIGNMENT_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('modTime')\n            ASSIGN_OP\n              PsiElement(=)('=')\n            CALL_EXPR\n              SELECTOR_EXPR\n                REFERENCE_EXPRESSION\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('hdr')\n                  PsiElement(.)('.')\n                  PsiElement(identifier)('ModTime')\n                PsiElement(.)('.')\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('Unix')\n              ARGUMENT_LIST\n                PsiElement(()('(')\n                PsiElement())(')')\n          PsiElement(})('}')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('tw')\n              PsiElement(.)('.')\n              PsiElement(identifier)('octal')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('s')\n                  PsiElement(.)('.')\n                  PsiElement(identifier)('next')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  LITERAL\n                    PsiElement(int)('8')\n                  PsiElement())(')')\n              PsiElement(,)(',')\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('hdr')\n                PsiElement(.)('.')\n                PsiElement(identifier)('Mode')\n              PsiElement())(')')\n      PsiComment(GO_LINE_COMMENT)('// 100:108')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('tw')\n              PsiElement(.)('.')\n              PsiElement(identifier)('numeric')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('s')\n                  PsiElement(.)('.')\n                  PsiElement(identifier)('next')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  LITERAL\n                    PsiElement(int)('8')\n                  PsiElement())(')')\n              PsiElement(,)(',')\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('int64')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  REFERENCE_EXPRESSION\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('hdr')\n                    PsiElement(.)('.')\n                    PsiElement(identifier)('Uid')\n                  PsiElement())(')')\n              PsiElement())(')')\n      PsiComment(GO_LINE_COMMENT)('// 108:116')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('tw')\n              PsiElement(.)('.')\n              PsiElement(identifier)('numeric')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('s')\n                  PsiElement(.)('.')\n                  PsiElement(identifier)('next')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  LITERAL\n                    PsiElement(int)('8')\n                  PsiElement())(')')\n              PsiElement(,)(',')\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('int64')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  REFERENCE_EXPRESSION\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('hdr')\n                    PsiElement(.)('.')\n                    PsiElement(identifier)('Gid')\n                  PsiElement())(')')\n              PsiElement())(')')\n      PsiComment(GO_LINE_COMMENT)('// 116:124')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('tw')\n              PsiElement(.)('.')\n              PsiElement(identifier)('numeric')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('s')\n                  PsiElement(.)('.')\n                  PsiElement(identifier)('next')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  LITERAL\n                    PsiElement(int)('12')\n                  PsiElement())(')')\n              PsiElement(,)(',')\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('hdr')\n                PsiElement(.)('.')\n                PsiElement(identifier)('Size')\n              PsiElement())(')')\n      PsiComment(GO_LINE_COMMENT)('// 124:136')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('tw')\n              PsiElement(.)('.')\n              PsiElement(identifier)('numeric')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('s')\n                  PsiElement(.)('.')\n                  PsiElement(identifier)('next')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  LITERAL\n                    PsiElement(int)('12')\n                  PsiElement())(')')\n              PsiElement(,)(',')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('modTime')\n              PsiElement())(')')\n      PsiComment(GO_LINE_COMMENT)('// 136:148')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('s')\n              PsiElement(.)('.')\n              PsiElement(identifier)('next')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              LITERAL\n                PsiElement(int)('8')\n              PsiElement())(')')\n      PsiComment(GO_LINE_COMMENT)('// chksum (148:156)')\n      ASSIGNMENT_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          INDEX_OR_SLICE_EXPR\n            CALL_EXPR\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('s')\n                PsiElement(.)('.')\n                PsiElement(identifier)('next')\n              ARGUMENT_LIST\n                PsiElement(()('(')\n                LITERAL\n                  PsiElement(int)('1')\n                PsiElement())(')')\n            PsiElement([)('[')\n            LITERAL\n              PsiElement(int)('0')\n            PsiElement(])(']')\n        ASSIGN_OP\n          PsiElement(=)('=')\n        REFERENCE_EXPRESSION\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('hdr')\n          PsiElement(.)('.')\n          PsiElement(identifier)('Typeflag')\n      PsiComment(GO_LINE_COMMENT)('// 156:157')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('tw')\n              PsiElement(.)('.')\n              PsiElement(identifier)('cString')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('s')\n                  PsiElement(.)('.')\n                  PsiElement(identifier)('next')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  LITERAL\n                    PsiElement(int)('100')\n                  PsiElement())(')')\n              PsiElement(,)(',')\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('hdr')\n                PsiElement(.)('.')\n                PsiElement(identifier)('Linkname')\n              PsiElement())(')')\n      PsiComment(GO_LINE_COMMENT)('// linkname (157:257)')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('copy')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('s')\n                  PsiElement(.)('.')\n                  PsiElement(identifier)('next')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  LITERAL\n                    PsiElement(int)('8')\n                  PsiElement())(')')\n              PsiElement(,)(',')\n              CONVERSION_EXPR\n                ARRAY_OR_SLICE_TYPE\n                  PsiElement([)('[')\n                  PsiElement(])(']')\n                  TYPE\n                    TYPE_REFERENCE_EXPRESSION\n                      PsiElement(identifier)('byte')\n                PsiElement(()('(')\n                STRING_LITERAL\n                  PsiElement(string)('\"ustar\\x0000\"')\n                PsiElement())(')')\n              PsiElement())(')')\n      PsiComment(GO_LINE_COMMENT)('// 257:265')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('tw')\n              PsiElement(.)('.')\n              PsiElement(identifier)('cString')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('s')\n                  PsiElement(.)('.')\n                  PsiElement(identifier)('next')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  LITERAL\n                    PsiElement(int)('32')\n                  PsiElement())(')')\n              PsiElement(,)(',')\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('hdr')\n                PsiElement(.)('.')\n                PsiElement(identifier)('Uname')\n              PsiElement())(')')\n      PsiComment(GO_LINE_COMMENT)('// 265:297')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('tw')\n              PsiElement(.)('.')\n              PsiElement(identifier)('cString')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('s')\n                  PsiElement(.)('.')\n                  PsiElement(identifier)('next')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  LITERAL\n                    PsiElement(int)('32')\n                  PsiElement())(')')\n              PsiElement(,)(',')\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('hdr')\n                PsiElement(.)('.')\n                PsiElement(identifier)('Gname')\n              PsiElement())(')')\n      PsiComment(GO_LINE_COMMENT)('// 297:329')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('tw')\n              PsiElement(.)('.')\n              PsiElement(identifier)('numeric')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('s')\n                  PsiElement(.)('.')\n                  PsiElement(identifier)('next')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  LITERAL\n                    PsiElement(int)('8')\n                  PsiElement())(')')\n              PsiElement(,)(',')\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('hdr')\n                PsiElement(.)('.')\n                PsiElement(identifier)('Devmajor')\n              PsiElement())(')')\n      PsiComment(GO_LINE_COMMENT)('// 329:337')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('tw')\n              PsiElement(.)('.')\n              PsiElement(identifier)('numeric')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('s')\n                  PsiElement(.)('.')\n                  PsiElement(identifier)('next')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  LITERAL\n                    PsiElement(int)('8')\n                  PsiElement())(')')\n              PsiElement(,)(',')\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('hdr')\n                PsiElement(.)('.')\n                PsiElement(identifier)('Devminor')\n              PsiElement())(')')\n      PsiComment(GO_LINE_COMMENT)('// 337:345')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('tw')\n              PsiElement(.)('.')\n              PsiElement(identifier)('cString')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('s')\n                  PsiElement(.)('.')\n                  PsiElement(identifier)('next')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  LITERAL\n                    PsiElement(int)('155')\n                  PsiElement())(')')\n              PsiElement(,)(',')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('prefix')\n              PsiElement())(')')\n      PsiComment(GO_LINE_COMMENT)('// 345:500')\n      PsiComment(GO_LINE_COMMENT)('// Use the GNU magic instead of POSIX magic if we used any GNU extensions.')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('tw')\n              PsiElement(.)('.')\n              PsiElement(identifier)('usedBinary')\n        BLOCK\n          PsiElement({)('{')\n          SIMPLE_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('copy')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  INDEX_OR_SLICE_EXPR\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('header')\n                    PsiElement([)('[')\n                    LITERAL\n                      PsiElement(int)('257')\n                    PsiElement(:)(':')\n                    LITERAL\n                      PsiElement(int)('265')\n                    PsiElement(])(']')\n                  PsiElement(,)(',')\n                  CONVERSION_EXPR\n                    ARRAY_OR_SLICE_TYPE\n                      PsiElement([)('[')\n                      PsiElement(])(']')\n                      TYPE\n                        TYPE_REFERENCE_EXPRESSION\n                          PsiElement(identifier)('byte')\n                    PsiElement(()('(')\n                    STRING_LITERAL\n                      PsiElement(string)('\"ustar  \\x00\"')\n                    PsiElement())(')')\n                  PsiElement())(')')\n          PsiElement(})('}')\n      PsiComment(GO_LINE_COMMENT)('// Use the ustar magic if we used ustar long names.')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            CONDITIONAL_EXPR\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('len')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('prefix')\n                  PsiElement())(')')\n              PsiElement(>)('>')\n              LITERAL\n                PsiElement(int)('0')\n        BLOCK\n          PsiElement({)('{')\n          SIMPLE_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('copy')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  INDEX_OR_SLICE_EXPR\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('header')\n                    PsiElement([)('[')\n                    LITERAL\n                      PsiElement(int)('257')\n                    PsiElement(:)(':')\n                    LITERAL\n                      PsiElement(int)('265')\n                    PsiElement(])(']')\n                  PsiElement(,)(',')\n                  CONVERSION_EXPR\n                    ARRAY_OR_SLICE_TYPE\n                      PsiElement([)('[')\n                      PsiElement(])(']')\n                      TYPE\n                        TYPE_REFERENCE_EXPRESSION\n                          PsiElement(identifier)('byte')\n                    PsiElement(()('(')\n                    STRING_LITERAL\n                      PsiElement(string)('\"ustar\\000\"')\n                    PsiElement())(')')\n                  PsiElement())(')')\n          PsiElement(})('}')\n      PsiComment(GO_LINE_COMMENT)('// The chksum field is terminated by a NUL and a space.')\n      PsiComment(GO_LINE_COMMENT)('// This is different from the other octal fields.')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('chksum')\n          PsiElement(,)(',')\n          VAR_DEFINITION\n            PsiElement(identifier)('_')\n          PsiElement(:=)(':=')\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('checksum')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('header')\n              PsiElement())(')')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('tw')\n              PsiElement(.)('.')\n              PsiElement(identifier)('octal')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              INDEX_OR_SLICE_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('header')\n                PsiElement([)('[')\n                LITERAL\n                  PsiElement(int)('148')\n                PsiElement(:)(':')\n                LITERAL\n                  PsiElement(int)('155')\n                PsiElement(])(']')\n              PsiElement(,)(',')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('chksum')\n              PsiElement())(')')\n      ASSIGNMENT_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          INDEX_OR_SLICE_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('header')\n            PsiElement([)('[')\n            LITERAL\n              PsiElement(int)('155')\n            PsiElement(])(']')\n        ASSIGN_OP\n          PsiElement(=)('=')\n        LITERAL\n          PsiElement(char)('' '')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            CONDITIONAL_EXPR\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('tw')\n                PsiElement(.)('.')\n                PsiElement(identifier)('err')\n              PsiElement(!=)('!=')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('nil')\n        BLOCK\n          PsiElement({)('{')\n          PsiComment(GO_LINE_COMMENT)('// problem with header; probably integer too big for a field.')\n          RETURN_STATEMENT\n            PsiElement(return)('return')\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('tw')\n              PsiElement(.)('.')\n              PsiElement(identifier)('err')\n          PsiElement(})('}')\n      ASSIGNMENT_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('_')\n          PsiElement(,)(',')\n          REFERENCE_EXPRESSION\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('tw')\n            PsiElement(.)('.')\n            PsiElement(identifier)('err')\n        ASSIGN_OP\n          PsiElement(=)('=')\n        CALL_EXPR\n          SELECTOR_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('tw')\n              PsiElement(.)('.')\n              PsiElement(identifier)('w')\n            PsiElement(.)('.')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('Write')\n          ARGUMENT_LIST\n            PsiElement(()('(')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('header')\n            PsiElement())(')')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n        REFERENCE_EXPRESSION\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('tw')\n          PsiElement(.)('.')\n          PsiElement(identifier)('err')\n      PsiElement(})('}')\n  PsiComment(GO_LINE_COMMENT)('// writeUSTARLongName splits a USTAR long name hdr.Name.')\n  PsiComment(GO_LINE_COMMENT)('// name must be < 256 characters. errNameTooLong is returned')\n  PsiComment(GO_LINE_COMMENT)('// if hdr.Name can't be split. The splitting heuristic')\n  PsiComment(GO_LINE_COMMENT)('// is compatible with gnu tar.')\n  METHOD_DECLARATION\n    PsiElement(func)('func')\n    RECEIVER\n      PsiElement(()('(')\n      PsiElement(identifier)('tw')\n      POINTER_TYPE\n        PsiElement(*)('*')\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('Writer')\n      PsiElement())(')')\n    PsiElement(identifier)('splitUSTARLongName')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('name')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('string')\n        PsiElement())(')')\n      RESULT\n        PARAMETERS\n          PsiElement(()('(')\n          PARAMETER_DECLARATION\n            PARAM_DEFINITION\n              PsiElement(identifier)('prefix')\n            PsiElement(,)(',')\n            PARAM_DEFINITION\n              PsiElement(identifier)('suffix')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('string')\n          PsiElement(,)(',')\n          PARAMETER_DECLARATION\n            PARAM_DEFINITION\n              PsiElement(identifier)('err')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('error')\n          PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('length')\n          PsiElement(:=)(':=')\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('len')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('name')\n              PsiElement())(')')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            CONDITIONAL_EXPR\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('length')\n              PsiElement(>)('>')\n              ADD_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('fileNamePrefixSize')\n                PsiElement(+)('+')\n                LITERAL\n                  PsiElement(int)('1')\n        BLOCK\n          PsiElement({)('{')\n          ASSIGNMENT_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('length')\n            ASSIGN_OP\n              PsiElement(=)('=')\n            ADD_EXPR\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('fileNamePrefixSize')\n              PsiElement(+)('+')\n              LITERAL\n                PsiElement(int)('1')\n          PsiElement(})('}')\n        ELSE_STATEMENT\n          PsiElement(else)('else')\n          IF_STATEMENT\n            PsiElement(if)('if')\n            SIMPLE_STATEMENT\n              LEFT_HAND_EXPR_LIST\n                CONDITIONAL_EXPR\n                  INDEX_OR_SLICE_EXPR\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('name')\n                    PsiElement([)('[')\n                    ADD_EXPR\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('length')\n                      PsiElement(-)('-')\n                      LITERAL\n                        PsiElement(int)('1')\n                    PsiElement(])(']')\n                  PsiElement(==)('==')\n                  LITERAL\n                    PsiElement(char)(''/'')\n            BLOCK\n              PsiElement({)('{')\n              INC_DEC_STATEMENT\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('length')\n                PsiElement(--)('--')\n              PsiElement(})('}')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('i')\n          PsiElement(:=)(':=')\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('strings')\n              PsiElement(.)('.')\n              PsiElement(identifier)('LastIndex')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              INDEX_OR_SLICE_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('name')\n                PsiElement([)('[')\n                PsiElement(:)(':')\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('length')\n                PsiElement(])(']')\n              PsiElement(,)(',')\n              STRING_LITERAL\n                PsiElement(string)('\"/\"')\n              PsiElement())(')')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('nlen')\n          PsiElement(:=)(':=')\n          ADD_EXPR\n            ADD_EXPR\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('length')\n              PsiElement(-)('-')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('i')\n            PsiElement(-)('-')\n            LITERAL\n              PsiElement(int)('1')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            OR_EXPR\n              OR_EXPR\n                CONDITIONAL_EXPR\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('i')\n                  PsiElement(<=)('<=')\n                  LITERAL\n                    PsiElement(int)('0')\n                PsiElement(||)('||')\n                CONDITIONAL_EXPR\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('nlen')\n                  PsiElement(>)('>')\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('fileNameSize')\n              PsiElement(||)('||')\n              CONDITIONAL_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('nlen')\n                PsiElement(==)('==')\n                LITERAL\n                  PsiElement(int)('0')\n        BLOCK\n          PsiElement({)('{')\n          ASSIGNMENT_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('err')\n            ASSIGN_OP\n              PsiElement(=)('=')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('errNameTooLong')\n          RETURN_STATEMENT\n            PsiElement(return)('return')\n          PsiElement(})('}')\n      ASSIGNMENT_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('prefix')\n          PsiElement(,)(',')\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('suffix')\n        ASSIGN_OP\n          PsiElement(=)('=')\n        INDEX_OR_SLICE_EXPR\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('name')\n          PsiElement([)('[')\n          PsiElement(:)(':')\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('i')\n          PsiElement(])(']')\n        PsiElement(,)(',')\n        INDEX_OR_SLICE_EXPR\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('name')\n          PsiElement([)('[')\n          ADD_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('i')\n            PsiElement(+)('+')\n            LITERAL\n              PsiElement(int)('1')\n          PsiElement(:)(':')\n          PsiElement(])(']')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n      PsiElement(})('}')\n  PsiComment(GO_LINE_COMMENT)('// writePaxHeader writes an extended pax header to the')\n  PsiComment(GO_LINE_COMMENT)('// archive.')\n  METHOD_DECLARATION\n    PsiElement(func)('func')\n    RECEIVER\n      PsiElement(()('(')\n      PsiElement(identifier)('tw')\n      POINTER_TYPE\n        PsiElement(*)('*')\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('Writer')\n      PsiElement())(')')\n    PsiElement(identifier)('writePAXHeader')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('hdr')\n          POINTER_TYPE\n            PsiElement(*)('*')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('Header')\n        PsiElement())(')')\n      RESULT\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('error')\n    BLOCK\n      PsiElement({)('{')\n      PsiComment(GO_LINE_COMMENT)('// Prepare extended header')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('ext')\n          PsiElement(:=)(':=')\n          BUILTIN_CALL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('new')\n            BUILTIN_ARGUMENT_LIST\n              PsiElement(()('(')\n              TYPE\n                TYPE_REFERENCE_EXPRESSION\n                  PsiElement(identifier)('Header')\n              PsiElement())(')')\n      ASSIGNMENT_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('ext')\n            PsiElement(.)('.')\n            PsiElement(identifier)('Typeflag')\n        ASSIGN_OP\n          PsiElement(=)('=')\n        REFERENCE_EXPRESSION\n          PsiElement(identifier)('TypeXHeader')\n      PsiComment(GO_LINE_COMMENT)('// Setting ModTime is required for reader parsing to')\n      PsiComment(GO_LINE_COMMENT)('// succeed, and seems harmless enough.')\n      ASSIGNMENT_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('ext')\n            PsiElement(.)('.')\n            PsiElement(identifier)('ModTime')\n        ASSIGN_OP\n          PsiElement(=)('=')\n        REFERENCE_EXPRESSION\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('hdr')\n          PsiElement(.)('.')\n          PsiElement(identifier)('ModTime')\n      PsiComment(GO_LINE_COMMENT)('// The spec asks that we namespace our pseudo files')\n      PsiComment(GO_LINE_COMMENT)('// with the current pid.')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('pid')\n          PsiElement(:=)(':=')\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('os')\n              PsiElement(.)('.')\n              PsiElement(identifier)('Getpid')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              PsiElement())(')')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('dir')\n          PsiElement(,)(',')\n          VAR_DEFINITION\n            PsiElement(identifier)('file')\n          PsiElement(:=)(':=')\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('path')\n              PsiElement(.)('.')\n              PsiElement(identifier)('Split')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('hdr')\n                PsiElement(.)('.')\n                PsiElement(identifier)('Name')\n              PsiElement())(')')\n      ASSIGNMENT_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('ext')\n            PsiElement(.)('.')\n            PsiElement(identifier)('Name')\n        ASSIGN_OP\n          PsiElement(=)('=')\n        INDEX_OR_SLICE_EXPR\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('path')\n              PsiElement(.)('.')\n              PsiElement(identifier)('Join')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('dir')\n              PsiElement(,)(',')\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('fmt')\n                  PsiElement(.)('.')\n                  PsiElement(identifier)('Sprintf')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  STRING_LITERAL\n                    PsiElement(string)('\"PaxHeaders.%d\"')\n                  PsiElement(,)(',')\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('pid')\n                  PsiElement())(')')\n              PsiElement(,)(',')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('file')\n              PsiElement())(')')\n          PsiElement([)('[')\n          LITERAL\n            PsiElement(int)('0')\n          PsiElement(:)(':')\n          LITERAL\n            PsiElement(int)('100')\n          PsiElement(])(']')\n      PsiComment(GO_LINE_COMMENT)('// Construct the body')\n      STATEMENT\n        VAR_DECLARATION\n          PsiElement(var)('var')\n          VAR_SPEC\n            VAR_DEFINITION\n              PsiElement(identifier)('buf')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                TYPE_REFERENCE_EXPRESSION\n                  PsiElement(identifier)('bytes')\n                PsiElement(.)('.')\n                PsiElement(identifier)('Buffer')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            CONDITIONAL_EXPR\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('len')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  REFERENCE_EXPRESSION\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('hdr')\n                    PsiElement(.)('.')\n                    PsiElement(identifier)('Name')\n                  PsiElement())(')')\n              PsiElement(>)('>')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('fileNameSize')\n        BLOCK\n          PsiElement({)('{')\n          SIMPLE_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('fmt')\n                  PsiElement(.)('.')\n                  PsiElement(identifier)('Fprint')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  UNARY_EXPR\n                    PsiElement(&)('&')\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('buf')\n                  PsiElement(,)(',')\n                  CALL_EXPR\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('paxHeader')\n                    ARGUMENT_LIST\n                      PsiElement(()('(')\n                      ADD_EXPR\n                        STRING_LITERAL\n                          PsiElement(string)('\"path=\"')\n                        PsiElement(+)('+')\n                        REFERENCE_EXPRESSION\n                          REFERENCE_EXPRESSION\n                            PsiElement(identifier)('hdr')\n                          PsiElement(.)('.')\n                          PsiElement(identifier)('Name')\n                      PsiElement())(')')\n                  PsiElement())(')')\n          PsiElement(})('}')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            CONDITIONAL_EXPR\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('len')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  REFERENCE_EXPRESSION\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('hdr')\n                    PsiElement(.)('.')\n                    PsiElement(identifier)('Linkname')\n                  PsiElement())(')')\n              PsiElement(>)('>')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('fileNameSize')\n        BLOCK\n          PsiElement({)('{')\n          SIMPLE_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('fmt')\n                  PsiElement(.)('.')\n                  PsiElement(identifier)('Fprint')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  UNARY_EXPR\n                    PsiElement(&)('&')\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('buf')\n                  PsiElement(,)(',')\n                  CALL_EXPR\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('paxHeader')\n                    ARGUMENT_LIST\n                      PsiElement(()('(')\n                      ADD_EXPR\n                        STRING_LITERAL\n                          PsiElement(string)('\"linkpath=\"')\n                        PsiElement(+)('+')\n                        REFERENCE_EXPRESSION\n                          REFERENCE_EXPRESSION\n                            PsiElement(identifier)('hdr')\n                          PsiElement(.)('.')\n                          PsiElement(identifier)('Linkname')\n                      PsiElement())(')')\n                  PsiElement())(')')\n          PsiElement(})('}')\n      ASSIGNMENT_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('ext')\n            PsiElement(.)('.')\n            PsiElement(identifier)('Size')\n        ASSIGN_OP\n          PsiElement(=)('=')\n        CALL_EXPR\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('int64')\n          ARGUMENT_LIST\n            PsiElement(()('(')\n            CALL_EXPR\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('len')\n              ARGUMENT_LIST\n                PsiElement(()('(')\n                CALL_EXPR\n                  REFERENCE_EXPRESSION\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('buf')\n                    PsiElement(.)('.')\n                    PsiElement(identifier)('Bytes')\n                  ARGUMENT_LIST\n                    PsiElement(()('(')\n                    PsiElement())(')')\n                PsiElement())(')')\n            PsiElement())(')')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          SHORT_VAR_DECLARATION\n            VAR_DEFINITION\n              PsiElement(identifier)('err')\n            PsiElement(:=)(':=')\n            CALL_EXPR\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('tw')\n                PsiElement(.)('.')\n                PsiElement(identifier)('WriteHeader')\n              ARGUMENT_LIST\n                PsiElement(()('(')\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('ext')\n                PsiElement())(')')\n        PsiElement(;)(';')\n        CONDITIONAL_EXPR\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('err')\n          PsiElement(!=)('!=')\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('nil')\n        BLOCK\n          PsiElement({)('{')\n          RETURN_STATEMENT\n            PsiElement(return)('return')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('err')\n          PsiElement(})('}')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          SHORT_VAR_DECLARATION\n            VAR_DEFINITION\n              PsiElement(identifier)('_')\n            PsiElement(,)(',')\n            VAR_DEFINITION\n              PsiElement(identifier)('err')\n            PsiElement(:=)(':=')\n            CALL_EXPR\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('tw')\n                PsiElement(.)('.')\n                PsiElement(identifier)('Write')\n              ARGUMENT_LIST\n                PsiElement(()('(')\n                CALL_EXPR\n                  REFERENCE_EXPRESSION\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('buf')\n                    PsiElement(.)('.')\n                    PsiElement(identifier)('Bytes')\n                  ARGUMENT_LIST\n                    PsiElement(()('(')\n                    PsiElement())(')')\n                PsiElement())(')')\n        PsiElement(;)(';')\n        CONDITIONAL_EXPR\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('err')\n          PsiElement(!=)('!=')\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('nil')\n        BLOCK\n          PsiElement({)('{')\n          RETURN_STATEMENT\n            PsiElement(return)('return')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('err')\n          PsiElement(})('}')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          SHORT_VAR_DECLARATION\n            VAR_DEFINITION\n              PsiElement(identifier)('err')\n            PsiElement(:=)(':=')\n            CALL_EXPR\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('tw')\n                PsiElement(.)('.')\n                PsiElement(identifier)('Flush')\n              ARGUMENT_LIST\n                PsiElement(()('(')\n                PsiElement())(')')\n        PsiElement(;)(';')\n        CONDITIONAL_EXPR\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('err')\n          PsiElement(!=)('!=')\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('nil')\n        BLOCK\n          PsiElement({)('{')\n          RETURN_STATEMENT\n            PsiElement(return)('return')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('err')\n          PsiElement(})('}')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n        REFERENCE_EXPRESSION\n          PsiElement(identifier)('nil')\n      PsiElement(})('}')\n  PsiComment(GO_LINE_COMMENT)('// paxHeader formats a single pax record, prefixing it with the appropriate length')\n  FUNCTION_DECLARATION\n    PsiElement(func)('func')\n    PsiElement(identifier)('paxHeader')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('msg')\n          TYPE\n            TYPE_REFERENCE_EXPRESSION\n              PsiElement(identifier)('string')\n        PsiElement())(')')\n      RESULT\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('string')\n    BLOCK\n      PsiElement({)('{')\n      STATEMENT\n        CONST_DECLARATION\n          PsiElement(const)('const')\n          CONST_SPEC\n            CONST_DEFINITION\n              PsiElement(identifier)('padding')\n            PsiElement(=)('=')\n            LITERAL\n              PsiElement(int)('2')\n      PsiComment(GO_LINE_COMMENT)('// Extra padding for space and newline')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('size')\n          PsiElement(:=)(':=')\n          ADD_EXPR\n            CALL_EXPR\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('len')\n              ARGUMENT_LIST\n                PsiElement(()('(')\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('msg')\n                PsiElement())(')')\n            PsiElement(+)('+')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('padding')\n      ASSIGNMENT_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('size')\n        ASSIGN_OP\n          PsiElement(+=)('+=')\n        CALL_EXPR\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('len')\n          ARGUMENT_LIST\n            PsiElement(()('(')\n            CALL_EXPR\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('strconv')\n                PsiElement(.)('.')\n                PsiElement(identifier)('Itoa')\n              ARGUMENT_LIST\n                PsiElement(()('(')\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('size')\n                PsiElement())(')')\n            PsiElement())(')')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('record')\n          PsiElement(:=)(':=')\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('fmt')\n              PsiElement(.)('.')\n              PsiElement(identifier)('Sprintf')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              STRING_LITERAL\n                PsiElement(string)('\"%d %s\\n\"')\n              PsiElement(,)(',')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('size')\n              PsiElement(,)(',')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('msg')\n              PsiElement())(')')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            CONDITIONAL_EXPR\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('len')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('record')\n                  PsiElement())(')')\n              PsiElement(!=)('!=')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('size')\n        BLOCK\n          PsiElement({)('{')\n          PsiComment(GO_LINE_COMMENT)('// Final adjustment if adding size increased')\n          PsiComment(GO_LINE_COMMENT)('// the number of digits in size')\n          ASSIGNMENT_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('size')\n            ASSIGN_OP\n              PsiElement(=)('=')\n            CALL_EXPR\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('len')\n              ARGUMENT_LIST\n                PsiElement(()('(')\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('record')\n                PsiElement())(')')\n          ASSIGNMENT_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('record')\n            ASSIGN_OP\n              PsiElement(=)('=')\n            CALL_EXPR\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('fmt')\n                PsiElement(.)('.')\n                PsiElement(identifier)('Sprintf')\n              ARGUMENT_LIST\n                PsiElement(()('(')\n                STRING_LITERAL\n                  PsiElement(string)('\"%d %s\\n\"')\n                PsiElement(,)(',')\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('size')\n                PsiElement(,)(',')\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('msg')\n                PsiElement())(')')\n          PsiElement(})('}')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n        REFERENCE_EXPRESSION\n          PsiElement(identifier)('record')\n      PsiElement(})('}')\n  PsiComment(GO_LINE_COMMENT)('// Write writes to the current entry in the tar archive.')\n  PsiComment(GO_LINE_COMMENT)('// Write returns the error ErrWriteTooLong if more than')\n  PsiComment(GO_LINE_COMMENT)('// hdr.Size bytes are written after WriteHeader.')\n  METHOD_DECLARATION\n    PsiElement(func)('func')\n    RECEIVER\n      PsiElement(()('(')\n      PsiElement(identifier)('tw')\n      POINTER_TYPE\n        PsiElement(*)('*')\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('Writer')\n      PsiElement())(')')\n    PsiElement(identifier)('Write')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PARAMETER_DECLARATION\n          PARAM_DEFINITION\n            PsiElement(identifier)('b')\n          ARRAY_OR_SLICE_TYPE\n            PsiElement([)('[')\n            PsiElement(])(']')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('byte')\n        PsiElement())(')')\n      RESULT\n        PARAMETERS\n          PsiElement(()('(')\n          PARAMETER_DECLARATION\n            PARAM_DEFINITION\n              PsiElement(identifier)('n')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('int')\n          PsiElement(,)(',')\n          PARAMETER_DECLARATION\n            PARAM_DEFINITION\n              PsiElement(identifier)('err')\n            TYPE\n              TYPE_REFERENCE_EXPRESSION\n                PsiElement(identifier)('error')\n          PsiElement())(')')\n    BLOCK\n      PsiElement({)('{')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('tw')\n              PsiElement(.)('.')\n              PsiElement(identifier)('closed')\n        BLOCK\n          PsiElement({)('{')\n          ASSIGNMENT_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('err')\n            ASSIGN_OP\n              PsiElement(=)('=')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('ErrWriteTooLong')\n          RETURN_STATEMENT\n            PsiElement(return)('return')\n          PsiElement(})('}')\n      SIMPLE_STATEMENT\n        SHORT_VAR_DECLARATION\n          VAR_DEFINITION\n            PsiElement(identifier)('overwrite')\n          PsiElement(:=)(':=')\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('false')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            CONDITIONAL_EXPR\n              CALL_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('int64')\n                ARGUMENT_LIST\n                  PsiElement(()('(')\n                  CALL_EXPR\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('len')\n                    ARGUMENT_LIST\n                      PsiElement(()('(')\n                      REFERENCE_EXPRESSION\n                        PsiElement(identifier)('b')\n                      PsiElement())(')')\n                  PsiElement())(')')\n              PsiElement(>)('>')\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('tw')\n                PsiElement(.)('.')\n                PsiElement(identifier)('nb')\n        BLOCK\n          PsiElement({)('{')\n          ASSIGNMENT_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('b')\n            ASSIGN_OP\n              PsiElement(=)('=')\n            INDEX_OR_SLICE_EXPR\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('b')\n              PsiElement([)('[')\n              LITERAL\n                PsiElement(int)('0')\n              PsiElement(:)(':')\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('tw')\n                PsiElement(.)('.')\n                PsiElement(identifier)('nb')\n              PsiElement(])(']')\n          ASSIGNMENT_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('overwrite')\n            ASSIGN_OP\n              PsiElement(=)('=')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('true')\n          PsiElement(})('}')\n      ASSIGNMENT_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('n')\n          PsiElement(,)(',')\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('err')\n        ASSIGN_OP\n          PsiElement(=)('=')\n        CALL_EXPR\n          SELECTOR_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('tw')\n              PsiElement(.)('.')\n              PsiElement(identifier)('w')\n            PsiElement(.)('.')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('Write')\n          ARGUMENT_LIST\n            PsiElement(()('(')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('b')\n            PsiElement())(')')\n      ASSIGNMENT_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('tw')\n            PsiElement(.)('.')\n            PsiElement(identifier)('nb')\n        ASSIGN_OP\n          PsiElement(-=)('-=')\n        CALL_EXPR\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('int64')\n          ARGUMENT_LIST\n            PsiElement(()('(')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('n')\n            PsiElement())(')')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            AND_EXPR\n              CONDITIONAL_EXPR\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('err')\n                PsiElement(==)('==')\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('nil')\n              PsiElement(&&)('&&')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('overwrite')\n        BLOCK\n          PsiElement({)('{')\n          ASSIGNMENT_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('err')\n            ASSIGN_OP\n              PsiElement(=)('=')\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('ErrWriteTooLong')\n          RETURN_STATEMENT\n            PsiElement(return)('return')\n          PsiElement(})('}')\n      ASSIGNMENT_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('tw')\n            PsiElement(.)('.')\n            PsiElement(identifier)('err')\n        ASSIGN_OP\n          PsiElement(=)('=')\n        REFERENCE_EXPRESSION\n          PsiElement(identifier)('err')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n      PsiElement(})('}')\n  PsiComment(GO_LINE_COMMENT)('// Close closes the tar archive, flushing any unwritten')\n  PsiComment(GO_LINE_COMMENT)('// data to the underlying writer.')\n  METHOD_DECLARATION\n    PsiElement(func)('func')\n    RECEIVER\n      PsiElement(()('(')\n      PsiElement(identifier)('tw')\n      POINTER_TYPE\n        PsiElement(*)('*')\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('Writer')\n      PsiElement())(')')\n    PsiElement(identifier)('Close')\n    SIGNATURE\n      PARAMETERS\n        PsiElement(()('(')\n        PsiElement())(')')\n      RESULT\n        TYPE\n          TYPE_REFERENCE_EXPRESSION\n            PsiElement(identifier)('error')\n    BLOCK\n      PsiElement({)('{')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            OR_EXPR\n              CONDITIONAL_EXPR\n                REFERENCE_EXPRESSION\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('tw')\n                  PsiElement(.)('.')\n                  PsiElement(identifier)('err')\n                PsiElement(!=)('!=')\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('nil')\n              PsiElement(||)('||')\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('tw')\n                PsiElement(.)('.')\n                PsiElement(identifier)('closed')\n        BLOCK\n          PsiElement({)('{')\n          RETURN_STATEMENT\n            PsiElement(return)('return')\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('tw')\n              PsiElement(.)('.')\n              PsiElement(identifier)('err')\n          PsiElement(})('}')\n      SIMPLE_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          CALL_EXPR\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('tw')\n              PsiElement(.)('.')\n              PsiElement(identifier)('Flush')\n            ARGUMENT_LIST\n              PsiElement(()('(')\n              PsiElement())(')')\n      ASSIGNMENT_STATEMENT\n        LEFT_HAND_EXPR_LIST\n          REFERENCE_EXPRESSION\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('tw')\n            PsiElement(.)('.')\n            PsiElement(identifier)('closed')\n        ASSIGN_OP\n          PsiElement(=)('=')\n        REFERENCE_EXPRESSION\n          PsiElement(identifier)('true')\n      IF_STATEMENT\n        PsiElement(if)('if')\n        SIMPLE_STATEMENT\n          LEFT_HAND_EXPR_LIST\n            CONDITIONAL_EXPR\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('tw')\n                PsiElement(.)('.')\n                PsiElement(identifier)('err')\n              PsiElement(!=)('!=')\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('nil')\n        BLOCK\n          PsiElement({)('{')\n          RETURN_STATEMENT\n            PsiElement(return)('return')\n            REFERENCE_EXPRESSION\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('tw')\n              PsiElement(.)('.')\n              PsiElement(identifier)('err')\n          PsiElement(})('}')\n      PsiComment(GO_LINE_COMMENT)('// trailer: two zero blocks')\n      FOR_STATEMENT\n        PsiElement(for)('for')\n        FOR_CLAUSE\n          SIMPLE_STATEMENT\n            SHORT_VAR_DECLARATION\n              VAR_DEFINITION\n                PsiElement(identifier)('i')\n              PsiElement(:=)(':=')\n              LITERAL\n                PsiElement(int)('0')\n          PsiElement(;)(';')\n          CONDITIONAL_EXPR\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('i')\n            PsiElement(<)('<')\n            LITERAL\n              PsiElement(int)('2')\n          PsiElement(;)(';')\n          INC_DEC_STATEMENT\n            REFERENCE_EXPRESSION\n              PsiElement(identifier)('i')\n            PsiElement(++)('++')\n        BLOCK\n          PsiElement({)('{')\n          ASSIGNMENT_STATEMENT\n            LEFT_HAND_EXPR_LIST\n              REFERENCE_EXPRESSION\n                PsiElement(identifier)('_')\n              PsiElement(,)(',')\n              REFERENCE_EXPRESSION\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('tw')\n                PsiElement(.)('.')\n                PsiElement(identifier)('err')\n            ASSIGN_OP\n              PsiElement(=)('=')\n            CALL_EXPR\n              SELECTOR_EXPR\n                REFERENCE_EXPRESSION\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('tw')\n                  PsiElement(.)('.')\n                  PsiElement(identifier)('w')\n                PsiElement(.)('.')\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('Write')\n              ARGUMENT_LIST\n                PsiElement(()('(')\n                REFERENCE_EXPRESSION\n                  PsiElement(identifier)('zeroBlock')\n                PsiElement())(')')\n          IF_STATEMENT\n            PsiElement(if)('if')\n            SIMPLE_STATEMENT\n              LEFT_HAND_EXPR_LIST\n                CONDITIONAL_EXPR\n                  REFERENCE_EXPRESSION\n                    REFERENCE_EXPRESSION\n                      PsiElement(identifier)('tw')\n                    PsiElement(.)('.')\n                    PsiElement(identifier)('err')\n                  PsiElement(!=)('!=')\n                  REFERENCE_EXPRESSION\n                    PsiElement(identifier)('nil')\n            BLOCK\n              PsiElement({)('{')\n              BREAK_STATEMENT\n                PsiElement(break)('break')\n              PsiElement(})('}')\n          PsiElement(})('}')\n      RETURN_STATEMENT\n        PsiElement(return)('return')\n        REFERENCE_EXPRESSION\n          REFERENCE_EXPRESSION\n            PsiElement(identifier)('tw')\n          PsiElement(.)('.')\n          PsiElement(identifier)('err')\n      PsiElement(})('}')"
  },
  {
    "path": "testData/performance/GoUnresolvedReference/expected.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<problems>\n  \n</problems>\n\n"
  },
  {
    "path": "testData/performance/GoUnusedExportedFunction/expected.xml",
    "content": "<!--\n  ~ Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n<problems>\n  <problem>\n    <file>cli.go</file>\n    <line>92</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/api/client/cli.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewDockerCli&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>local.go</file>\n    <line>78</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/api/server/router/local/local.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewRouter&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>network.go</file>\n    <line>21</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/api/server/router/network/network.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewRouter&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>form.go</file>\n    <line>57</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/api/server/httputils/form.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ArchiveFormValues&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>httputils.go</file>\n    <line>28</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/api/server/httputils/httputils.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;HijackConnection&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>httputils.go</file>\n    <line>39</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/api/server/httputils/httputils.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;CloseStreams&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>httputils.go</file>\n    <line>52</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/api/server/httputils/httputils.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;CheckForJSON&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>httputils.go</file>\n    <line>82</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/api/server/httputils/httputils.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ParseMultipartForm&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>httputils.go</file>\n    <line>90</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/api/server/httputils/httputils.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;WriteError&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>httputils.go</file>\n    <line>163</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/api/server/httputils/httputils.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;WriteJSON&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>httputils.go</file>\n    <line>171</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/api/server/httputils/httputils.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;VersionFromContext&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>server.go</file>\n    <line>53</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/api/server/server.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;New&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>cli.go</file>\n    <line>33</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/cli/cli.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;New&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>cli.go</file>\n    <line>148</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/cli/cli.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Subcmd&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>term.go</file>\n    <line>35</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/term/term.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;StdStreams&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>term.go</file>\n    <line>40</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/term/term.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GetFdInfo&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>term.go</file>\n    <line>51</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/term/term.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GetWinsize&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>term.go</file>\n    <line>62</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/term/term.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;SetWinsize&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>term.go</file>\n    <line>90</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/term/term.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;SaveState&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>term.go</file>\n    <line>101</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/term/term.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;DisableEcho&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>term.go</file>\n    <line>114</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/term/term.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;SetRawTerminal&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>flag.go</file>\n    <line>437</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/mflag/flag.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Lookup&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>flag.go</file>\n    <line>442</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/mflag/flag.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;IsSet&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>flag.go</file>\n    <line>619</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/mflag/flag.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NFlag&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>flag.go</file>\n    <line>640</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/mflag/flag.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NArg&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>flag.go</file>\n    <line>656</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/mflag/flag.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;BoolVar&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>flag.go</file>\n    <line>682</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/mflag/flag.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;IntVar&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>flag.go</file>\n    <line>708</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/mflag/flag.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Int64Var&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>flag.go</file>\n    <line>734</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/mflag/flag.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;UintVar&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>flag.go</file>\n    <line>760</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/mflag/flag.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Uint64Var&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>flag.go</file>\n    <line>786</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/mflag/flag.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Uint16Var&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>flag.go</file>\n    <line>800</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/mflag/flag.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Uint16&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>flag.go</file>\n    <line>812</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/mflag/flag.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;StringVar&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>flag.go</file>\n    <line>838</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/mflag/flag.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Float64Var&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>flag.go</file>\n    <line>864</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/mflag/flag.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;DurationVar&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>flag.go</file>\n    <line>917</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/mflag/flag.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Var&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>flag.go</file>\n    <line>1166</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/mflag/flag.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Parsed&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>flag.go</file>\n    <line>1213</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/mflag/flag.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Merge&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>pools.go</file>\n    <line>62</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/pools/pools.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Copy&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>stub_proxy.go</file>\n    <line>26</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/proxy/stub_proxy.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewStubProxy&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>reexec.go</file>\n    <line>13</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/reexec/reexec.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Register&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>reexec.go</file>\n    <line>23</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/reexec/reexec.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Init&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>command_unsupported.go</file>\n    <line>10</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/reexec/command_unsupported.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Command&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>trap.go</file>\n    <line>22</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/signal/trap.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Trap&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>signal.go</file>\n    <line>15</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/signal/signal.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;CatchAll&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>signal.go</file>\n    <line>24</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/signal/signal.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;StopCatch&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>signal.go</file>\n    <line>31</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/signal/signal.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ParseSignal&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>mknod.go</file>\n    <line>11</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/system/mknod.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Mknod&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>mknod.go</file>\n    <line>20</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/system/mknod.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Mkdev&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>umask.go</file>\n    <line>11</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/system/umask.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Umask&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>filesys.go</file>\n    <line>12</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/system/filesys.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;MkdirAll&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>filesys.go</file>\n    <line>17</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/system/filesys.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;IsAbs&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>xattrs_unsupported.go</file>\n    <line>6</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/system/xattrs_unsupported.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Lgetxattr&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>xattrs_unsupported.go</file>\n    <line>11</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/system/xattrs_unsupported.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Lsetxattr&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>meminfo_unsupported.go</file>\n    <line>6</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/system/meminfo_unsupported.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ReadMemInfo&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>diff.go</file>\n    <line>257</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/archive/diff.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ApplyUncompressedLayer&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>archive.go</file>\n    <line>727</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/archive/archive.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;UntarUncompressed&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>graphdb.go</file>\n    <line>63</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/graphdb/graphdb.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;IsNonUniqueNameError&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>conn_sqlite3.go</file>\n    <line>9</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/graphdb/conn_sqlite3.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewSqliteConn&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>idtools.go</file>\n    <line>40</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/idtools/idtools.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;MkdirAllAs&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>idtools.go</file>\n    <line>46</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/idtools/idtools.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;MkdirAs&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>idtools.go</file>\n    <line>52</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/idtools/idtools.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GetRootUIDGID&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>idtools.go</file>\n    <line>75</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/idtools/idtools.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ToContainer&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>idtools.go</file>\n    <line>107</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/idtools/idtools.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;CreateIDMappings&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>usergroupadd_unsupported.go</file>\n    <line>15</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/idtools/usergroupadd_unsupported.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;AddNamespaceRangesUser&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>fmt.go</file>\n    <line>17</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/ioutils/fmt.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;FprintfIfTrue&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>temp_unix.go</file>\n    <line>8</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/ioutils/temp_unix.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;TempDir&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>writeflusher.go</file>\n    <line>84</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/ioutils/writeflusher.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewWriteFlusher&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>kernel.go</file>\n    <line>50</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/parsers/kernel/kernel.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GetKernelVersion&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>parsers.go</file>\n    <line>125</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/parsers/parsers.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;PartParser&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>plugins.go</file>\n    <line>165</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/plugins/plugins.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Get&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>plugins.go</file>\n    <line>180</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/plugins/plugins.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Handle&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>promise.go</file>\n    <line>5</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/promise/promise.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Go&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>tcp_socket.go</file>\n    <line>19</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/sockets/tcp_socket.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewTCPSocket&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>tcp_socket.go</file>\n    <line>35</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/sockets/tcp_socket.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ConfigureTCPTransport&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>fs.go</file>\n    <line>141</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/symlink/fs.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;EvalSymlinks&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>urlutil.go</file>\n    <line>39</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/urlutil/urlutil.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;IsTransportURL&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>stringid.go</file>\n    <line>65</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/stringid/stringid.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GenerateNonCryptoID&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>backends.go</file>\n    <line>24</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/discovery/backends.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Register&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>backends.go</file>\n    <line>45</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/discovery/backends.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ParseAdvertise&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>backends.go</file>\n    <line>102</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/discovery/backends.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;New&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>config.go</file>\n    <line>90</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/tlsconfig/config.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Client&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>config.go</file>\n    <line>113</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/tlsconfig/config.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Server&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>buffered.go</file>\n    <line>33</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/broadcaster/buffered.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewBuffered&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>utils.go</file>\n    <line>336</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/integration/utils.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;RunAtDifferentDate&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>diff.go</file>\n    <line>17</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/chrootarchive/diff.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ApplyUncompressedLayer&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>archive.go</file>\n    <line>27</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/chrootarchive/archive.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;UntarUncompressed&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>opts.go</file>\n    <line>354</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/opts/opts.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ValidateHost&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>image.go</file>\n    <line>77</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/image/image.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ValidateID&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>git.go</file>\n    <line>19</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/utils/git.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GitClone&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>stubs.go</file>\n    <line>7</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/utils/stubs.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ExperimentalBuild&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>utils.go</file>\n    <line>84</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/utils/utils.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;DockerInitPath&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>utils.go</file>\n    <line>129</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/utils/utils.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;TestDirectory&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>utils.go</file>\n    <line>202</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/utils/utils.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ValidateContextDirectory&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>utils.go</file>\n    <line>293</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/utils/utils.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GetErrorMessage&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>timeout.go</file>\n    <line>9</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/utils/timeout.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;IsTimeout&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>filter.go</file>\n    <line>16</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/daemon/events/filter.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewFilter&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>logger.go</file>\n    <line>64</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/daemon/logger/logger.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewLogWatcher&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>factory.go</file>\n    <line>66</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/daemon/logger/factory.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;RegisterLogDriver&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>factory.go</file>\n    <line>72</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/daemon/logger/factory.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;RegisterLogOptValidator&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>factory.go</file>\n    <line>77</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/daemon/logger/factory.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GetLogDriver&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>factory.go</file>\n    <line>83</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/daemon/logger/factory.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ValidateLogOpts&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>605</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/daemon/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewDaemon&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>default_template.go</file>\n    <line>13</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/daemon/execdriver/native/template/default_template.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;New&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>driver_unsupported.go</file>\n    <line>12</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/daemon/execdriver/native/driver_unsupported.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewDriver&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>unsupported.go</file>\n    <line>12</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/daemon/execdriver/windows/unsupported.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewDriver&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>pipes.go</file>\n    <line>15</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/daemon/execdriver/pipes.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewPipes&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>utils.go</file>\n    <line>51</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/daemon/execdriver/utils.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GetCapability&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>utils.go</file>\n    <line>72</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/daemon/execdriver/utils.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;TweakCapabilities&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>driver_unix.go</file>\n    <line>32</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/daemon/execdriver/driver_unix.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;InitContainer&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>driver_unix.go</file>\n    <line>64</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/daemon/execdriver/driver_unix.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;SetupCgroups&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>driver_unix.go</file>\n    <line>128</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/daemon/execdriver/driver_unix.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Stats&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>termconsole.go</file>\n    <line>15</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/daemon/execdriver/termconsole.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewStdConsole&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>driver.go</file>\n    <line>102</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/daemon/graphdriver/driver.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Register&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>driver.go</file>\n    <line>133</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/daemon/graphdriver/driver.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;New&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>graphtest.go</file>\n    <line>29</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/daemon/graphdriver/graphtest/graphtest.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;InitLoopbacks&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>graphtest.go</file>\n    <line>174</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/daemon/graphdriver/graphtest/graphtest.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;DriverTestCreateEmpty&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>graphtest.go</file>\n    <line>265</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/daemon/graphdriver/graphtest/graphtest.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;DriverTestCreateBase&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>graphtest.go</file>\n    <line>278</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/daemon/graphdriver/graphtest/graphtest.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;DriverTestCreateSnap&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>driver_unsupported.go</file>\n    <line>13</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/daemon/graphdriver/driver_unsupported.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GetFSMagic&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>builder.go</file>\n    <line>208</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/daemon/daemonbuilder/builder.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;DetectContextFromRemoteURL&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>kqueue.go</file>\n    <line>43</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/gopkg.in/fsnotify.v1/kqueue.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewWatcher&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>run.go</file>\n    <line>12</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/kr/pty/run.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Start&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>util.go</file>\n    <line>11</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/kr/pty/util.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Getsize&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>ed25519.go</file>\n    <line>27</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/agl/ed25519/ed25519.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GenerateKey&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>ed25519.go</file>\n    <line>54</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/agl/ed25519/ed25519.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Sign&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>ed25519.go</file>\n    <line>97</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/agl/ed25519/ed25519.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Verify&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>edwards25519.go</file>\n    <line>1234</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/agl/ed25519/edwards25519/edwards25519.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GeDoubleScalarMultVartime&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>edwards25519.go</file>\n    <line>1324</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/agl/ed25519/edwards25519/edwards25519.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GeScalarMultBase&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>edwards25519.go</file>\n    <line>1380</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/agl/ed25519/edwards25519/edwards25519.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ScMulAdd&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>edwards25519.go</file>\n    <line>1811</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/agl/ed25519/edwards25519/edwards25519.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ScReduce&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>49</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/aws/awserr/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;New&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>103</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/aws/awserr/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewRequestFailure&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>copy.go</file>\n    <line>14</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/aws/awsutil/copy.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Copy&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>copy.go</file>\n    <line>25</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/aws/awsutil/copy.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;CopyOf&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>prettify.go</file>\n    <line>12</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/aws/awsutil/prettify.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Prettify&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>path_value.go</file>\n    <line>146</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/aws/awsutil/path_value.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ValuesAtPath&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>path_value.go</file>\n    <line>159</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/aws/awsutil/path_value.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ValuesAtAnyPath&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>path_value.go</file>\n    <line>171</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/aws/awsutil/path_value.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;SetValueAtPath&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>path_value.go</file>\n    <line>181</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/aws/awsutil/path_value.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;SetValueAtAnyPath&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>types.go</file>\n    <line>8</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/aws/types.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ReadSeekCloser&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>logger.go</file>\n    <line>14</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/aws/logger.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;LogLevel&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>service.go</file>\n    <line>36</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/aws/service.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewService&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>convutil.go</file>\n    <line>6</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/aws/convutil.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;String&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>convutil.go</file>\n    <line>21</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/aws/convutil.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;StringSlice&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>convutil.go</file>\n    <line>31</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/aws/convutil.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;StringValueSlice&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>convutil.go</file>\n    <line>43</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/aws/convutil.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;StringMap&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>convutil.go</file>\n    <line>54</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/aws/convutil.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;StringValueMap&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>convutil.go</file>\n    <line>80</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/aws/convutil.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;BoolSlice&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>convutil.go</file>\n    <line>90</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/aws/convutil.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;BoolValueSlice&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>convutil.go</file>\n    <line>102</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/aws/convutil.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;BoolMap&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>convutil.go</file>\n    <line>113</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/aws/convutil.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;BoolValueMap&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>convutil.go</file>\n    <line>124</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/aws/convutil.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Int&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>convutil.go</file>\n    <line>139</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/aws/convutil.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;IntSlice&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>convutil.go</file>\n    <line>149</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/aws/convutil.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;IntValueSlice&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>convutil.go</file>\n    <line>161</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/aws/convutil.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;IntMap&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>convutil.go</file>\n    <line>172</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/aws/convutil.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;IntValueMap&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>convutil.go</file>\n    <line>183</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/aws/convutil.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Int64&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>convutil.go</file>\n    <line>189</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/aws/convutil.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Int64Value&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>convutil.go</file>\n    <line>198</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/aws/convutil.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Int64Slice&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>convutil.go</file>\n    <line>208</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/aws/convutil.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Int64ValueSlice&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>convutil.go</file>\n    <line>220</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/aws/convutil.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Int64Map&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>convutil.go</file>\n    <line>231</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/aws/convutil.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Int64ValueMap&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>convutil.go</file>\n    <line>242</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/aws/convutil.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Float64&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>convutil.go</file>\n    <line>248</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/aws/convutil.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Float64Value&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>convutil.go</file>\n    <line>257</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/aws/convutil.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Float64Slice&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>convutil.go</file>\n    <line>267</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/aws/convutil.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Float64ValueSlice&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>convutil.go</file>\n    <line>279</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/aws/convutil.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Float64Map&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>convutil.go</file>\n    <line>290</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/aws/convutil.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Float64ValueMap&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>convutil.go</file>\n    <line>301</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/aws/convutil.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Time&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>convutil.go</file>\n    <line>307</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/aws/convutil.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;TimeValue&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>convutil.go</file>\n    <line>316</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/aws/convutil.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;TimeSlice&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>convutil.go</file>\n    <line>326</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/aws/convutil.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;TimeValueSlice&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>convutil.go</file>\n    <line>338</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/aws/convutil.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;TimeMap&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>convutil.go</file>\n    <line>349</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/aws/convutil.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;TimeValueMap&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>env_provider.go</file>\n    <line>36</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/aws/credentials/env_provider.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewEnvCredentials&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>chain_provider.go</file>\n    <line>52</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/aws/credentials/chain_provider.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewChainCredentials&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>ec2_role_provider.go</file>\n    <line>67</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/aws/credentials/ec2_role_provider.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewEC2RoleCredentials&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>shared_credentials_provider.go</file>\n    <line>40</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\"\n                 FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewSharedCredentials&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>service.go</file>\n    <line>54</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/service/cloudwatchlogs/service.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;New&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>v4.go</file>\n    <line>66</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/internal/signer/v4/v4.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Sign&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>build.go</file>\n    <line>16</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/internal/protocol/json/jsonutil/build.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;BuildJSON&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>unmarshal.go</file>\n    <line>15</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/internal/protocol/json/jsonutil/unmarshal.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;UnmarshalJSON&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>build.go</file>\n    <line>40</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/internal/protocol/rest/build.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Build&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>payload.go</file>\n    <line>6</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/internal/protocol/rest/payload.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;PayloadMember&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>payload.go</file>\n    <line>32</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/internal/protocol/rest/payload.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;PayloadType&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>unmarshal.go</file>\n    <line>18</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/internal/protocol/rest/unmarshal.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Unmarshal&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>jsonrpc.go</file>\n    <line>21</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/internal/protocol/jsonrpc/jsonrpc.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Build&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>jsonrpc.go</file>\n    <line>49</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/internal/protocol/jsonrpc/jsonrpc.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Unmarshal&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>jsonrpc.go</file>\n    <line>61</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/internal/protocol/jsonrpc/jsonrpc.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;UnmarshalMeta&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>jsonrpc.go</file>\n    <line>66</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/internal/protocol/jsonrpc/jsonrpc.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;UnmarshalError&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>endpoints.go</file>\n    <line>11</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/internal/endpoints/endpoints.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;EndpointForRegion&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>inmem.go</file>\n    <line>119</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/armon/go-metrics/inmem.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewInmemSink&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>start.go</file>\n    <line>36</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/armon/go-metrics/start.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;DefaultConfig&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>start.go</file>\n    <line>68</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/armon/go-metrics/start.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewGlobal&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>start.go</file>\n    <line>77</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/armon/go-metrics/start.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;SetGauge&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>start.go</file>\n    <line>81</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/armon/go-metrics/start.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;EmitKey&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>start.go</file>\n    <line>85</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/armon/go-metrics/start.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;IncrCounter&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>start.go</file>\n    <line>89</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/armon/go-metrics/start.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;AddSample&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>start.go</file>\n    <line>93</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/armon/go-metrics/start.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;MeasureSince&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>statsd.go</file>\n    <line>27</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/armon/go-metrics/statsd.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewStatsdSink&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>statsite.go</file>\n    <line>27</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/armon/go-metrics/statsite.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewStatsiteSink&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>inmem_signal.go</file>\n    <line>43</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/armon/go-metrics/inmem_signal.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;DefaultInmemSignal&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>sqlite3.go</file>\n    <line>105</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/sqlite3.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Version&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>patricia.go</file>\n    <line>64</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/tchap/go-patricia/patricia/patricia.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;MaxPrefixPerNode&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>patricia.go</file>\n    <line>70</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/tchap/go-patricia/patricia/patricia.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;MaxChildrenPerSparseNode&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>db.go</file>\n    <line>97</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/boltdb/bolt/db.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Open&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>id.go</file>\n    <line>31</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/coreos/etcd/pkg/types/id.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;IDFromString&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>set.go</file>\n    <line>42</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/coreos/etcd/pkg/types/set.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewThreadsafeSet&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>urlsmap.go</file>\n    <line>29</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/coreos/etcd/pkg/types/urlsmap.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewURLsMap&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>path.go</file>\n    <line>15</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/coreos/etcd/pkg/pathutil/path.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;CanonicalURLPath&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>srv.go</file>\n    <line>31</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/coreos/etcd/client/srv.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewSRVDiscover&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>curl.go</file>\n    <line>29</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/coreos/etcd/client/curl.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;EnablecURLDebug&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>curl.go</file>\n    <line>33</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/coreos/etcd/client/curl.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;DisablecURLDebug&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>keys.go</file>\n    <line>89</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/coreos/etcd/client/keys.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewKeysAPI&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>client.go</file>\n    <line>168</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/coreos/etcd/client/client.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;New&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>auth_role.go</file>\n    <line>52</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/coreos/etcd/client/auth_role.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewAuthRoleAPI&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>auth_user.go</file>\n    <line>50</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/coreos/etcd/client/auth_user.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewAuthAPI&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>auth_user.go</file>\n    <line>113</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/coreos/etcd/client/auth_user.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewAuthUserAPI&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>dbus.go</file>\n    <line>88</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/coreos/go-systemd/dbus/dbus.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;New&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>dbus.go</file>\n    <line>95</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/coreos/go-systemd/dbus/dbus.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewUserConnection&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>properties.go</file>\n    <line>57</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/coreos/go-systemd/dbus/properties.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;PropExecStart&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>properties.go</file>\n    <line>74</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/coreos/go-systemd/dbus/properties.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;PropRemainAfterExit&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>properties.go</file>\n    <line>83</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/coreos/go-systemd/dbus/properties.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;PropDescription&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>properties.go</file>\n    <line>99</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/coreos/go-systemd/dbus/properties.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;PropRequires&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>properties.go</file>\n    <line>105</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/coreos/go-systemd/dbus/properties.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;PropRequiresOverridable&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>properties.go</file>\n    <line>111</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/coreos/go-systemd/dbus/properties.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;PropRequisite&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>properties.go</file>\n    <line>117</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/coreos/go-systemd/dbus/properties.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;PropRequisiteOverridable&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>properties.go</file>\n    <line>123</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/coreos/go-systemd/dbus/properties.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;PropWants&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>properties.go</file>\n    <line>129</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/coreos/go-systemd/dbus/properties.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;PropBindsTo&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>properties.go</file>\n    <line>135</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/coreos/go-systemd/dbus/properties.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;PropRequiredBy&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>properties.go</file>\n    <line>141</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/coreos/go-systemd/dbus/properties.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;PropRequiredByOverridable&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>properties.go</file>\n    <line>147</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/coreos/go-systemd/dbus/properties.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;PropWantedBy&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>properties.go</file>\n    <line>153</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/coreos/go-systemd/dbus/properties.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;PropBoundBy&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>properties.go</file>\n    <line>159</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/coreos/go-systemd/dbus/properties.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;PropConflicts&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>properties.go</file>\n    <line>165</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/coreos/go-systemd/dbus/properties.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;PropConflictedBy&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>properties.go</file>\n    <line>171</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/coreos/go-systemd/dbus/properties.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;PropBefore&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>properties.go</file>\n    <line>177</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/coreos/go-systemd/dbus/properties.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;PropAfter&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>properties.go</file>\n    <line>183</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/coreos/go-systemd/dbus/properties.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;PropOnFailure&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>properties.go</file>\n    <line>189</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/coreos/go-systemd/dbus/properties.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;PropTriggers&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>properties.go</file>\n    <line>195</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/coreos/go-systemd/dbus/properties.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;PropTriggeredBy&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>properties.go</file>\n    <line>201</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/coreos/go-systemd/dbus/properties.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;PropPropagatesReloadTo&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>properties.go</file>\n    <line>207</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/coreos/go-systemd/dbus/properties.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;PropRequiresMountsFor&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>properties.go</file>\n    <line>213</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/coreos/go-systemd/dbus/properties.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;PropSlice&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>util.go</file>\n    <line>27</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/coreos/go-systemd/util/util.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;IsRunningSystemd&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>sdnotify.go</file>\n    <line>13</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/coreos/go-systemd/daemon/sdnotify.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;SdNotify&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>send.go</file>\n    <line>57</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/coreos/go-systemd/journal/send.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Enabled&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>send.go</file>\n    <line>68</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/coreos/go-systemd/journal/send.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Send&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>listeners.go</file>\n    <line>27</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/coreos/go-systemd/activation/listeners.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Listeners&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>packetconns.go</file>\n    <line>27</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/coreos/go-systemd/activation/packetconns.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;PacketConns&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>etcd.go</file>\n    <line>49</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libkv/store/etcd/etcd.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Register&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>boltdb.go</file>\n    <line>54</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libkv/store/boltdb/boltdb.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Register&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>consul.go</file>\n    <line>51</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libkv/store/consul/consul.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Register&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>zookeeper.go</file>\n    <line>34</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libkv/store/zookeeper/zookeeper.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Register&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>helpers.go</file>\n    <line>8</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libkv/store/helpers.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;CreateEndpoints&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>helpers.go</file>\n    <line>19</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libkv/store/helpers.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Normalize&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>helpers.go</file>\n    <line>28</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libkv/store/helpers.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GetDirectory&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>libkv.go</file>\n    <line>29</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libkv/libkv.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewStore&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>libkv.go</file>\n    <line>38</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libkv/libkv.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;AddStore&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>passphrase.go</file>\n    <line>54</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/notary/pkg/passphrase/passphrase.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;PromptRetriever&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>client.go</file>\n    <line>86</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/notary/client/client.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewTarget&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>client.go</file>\n    <line>103</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/notary/client/client.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewNotaryRepository&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>change.go</file>\n    <line>46</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/notary/client/changelist/change.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewTufChange&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>changelist.go</file>\n    <line>9</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/notary/client/changelist/changelist.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewMemChangelist&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>file_changelist.go</file>\n    <line>22</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/notary/client/changelist/file_changelist.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewFileChangelist&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>x509store.go</file>\n    <line>91</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/notary/trustmanager/x509store.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Verify&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>x509utils.go</file>\n    <line>27</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/notary/trustmanager/x509utils.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GetCertFromURL&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>x509utils.go</file>\n    <line>92</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/notary/trustmanager/x509utils.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;FingerprintCert&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>x509utils.go</file>\n    <line>195</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/notary/trustmanager/x509utils.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GetLeafCerts&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>x509utils.go</file>\n    <line>208</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/notary/trustmanager/x509utils.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GetIntermediateCerts&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>x509utils.go</file>\n    <line>303</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/notary/trustmanager/x509utils.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GenerateRSAKey&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>x509utils.go</file>\n    <line>334</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/notary/trustmanager/x509utils.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GenerateECDSAKey&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>x509utils.go</file>\n    <line>353</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/notary/trustmanager/x509utils.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GenerateED25519Key&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>x509utils.go</file>\n    <line>448</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/notary/trustmanager/x509utils.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;CertsToKeys&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>x509utils.go</file>\n    <line>473</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/notary/trustmanager/x509utils.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewCertificate&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>keyfilestore.go</file>\n    <line>30</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/notary/trustmanager/keyfilestore.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewKeyFileStore&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>keyfilestore.go</file>\n    <line>71</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/notary/trustmanager/keyfilestore.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewKeyMemoryStore&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>x509memstore.go</file>\n    <line>18</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/notary/trustmanager/x509memstore.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewX509MemStore&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>x509memstore.go</file>\n    <line>30</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/notary/trustmanager/x509memstore.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewX509FilteredMemStore&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>x509filestore.go</file>\n    <line>22</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/notary/trustmanager/x509filestore.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewX509FileStore&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>x509filestore.go</file>\n    <line>29</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/notary/trustmanager/x509filestore.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewX509FilteredFileStore&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>crypto_service.go</file>\n    <line>31</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/notary/cryptoservice/crypto_service.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewCryptoService&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>unlocked_crypto_service.go</file>\n    <line>25</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/notary/cryptoservice/unlocked_crypto_service.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewUnlockedCryptoService&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>keystoremanager.go</file>\n    <line>64</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/notary/keystoremanager/keystoremanager.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewKeyStoreManager&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>key.go</file>\n    <line>85</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libtrust/key.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;FromCryptoPrivateKey&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>util.go</file>\n    <line>55</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libtrust/util.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewIdentityAuthTLSClientConfig&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>ec_key.go</file>\n    <line>405</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libtrust/ec_key.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GenerateECP384PrivateKey&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>ec_key.go</file>\n    <line>418</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libtrust/ec_key.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GenerateECP521PrivateKey&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>rsa_key.go</file>\n    <line>400</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libtrust/rsa_key.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GenerateRSA2048PrivateKey&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>rsa_key.go</file>\n    <line>410</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libtrust/rsa_key.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GenerateRSA3072PrivateKey&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>rsa_key.go</file>\n    <line>420</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libtrust/rsa_key.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GenerateRSA4096PrivateKey&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>jsonsign.go</file>\n    <line>325</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libtrust/jsonsign.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ParseJWS&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>jsonsign.go</file>\n    <line>441</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libtrust/jsonsign.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewJSONSignatureFromMap&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>jsonsign.go</file>\n    <line>493</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libtrust/jsonsign.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ParsePrettySignature&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>key_manager.go</file>\n    <line>29</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libtrust/key_manager.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewClientKeyManager&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>key_manager.go</file>\n    <line>97</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libtrust/key_manager.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewIdentityAuthTLSConfig&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>key_manager.go</file>\n    <line>127</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libtrust/key_manager.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewCertAuthTLSConfig&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>certificates.go</file>\n    <line>165</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libtrust/certificates.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;LoadCertificatePool&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>idm.go</file>\n    <line>19</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/idm/idm.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;New&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>sandbox_unsupported.go</file>\n    <line>14</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/osl/sandbox_unsupported.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewSandbox&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>sandbox_unsupported.go</file>\n    <line>20</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/osl/sandbox_unsupported.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GenerateKey&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>namespace_unsupported.go</file>\n    <line>7</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/osl/namespace_unsupported.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GC&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>namespace_unsupported.go</file>\n    <line>10</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/osl/namespace_unsupported.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GetSandboxForExternalKey&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>allocator.go</file>\n    <line>39</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/ipam/allocator.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewAllocator&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>remote.go</file>\n    <line>31</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/ipams/remote/remote.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Init&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>builtin.go</file>\n    <line>12</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/ipams/builtin/builtin.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Init&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>types.go</file>\n    <line>248</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/types/types.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GetMacCopy&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>types.go</file>\n    <line>278</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/types/types.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GetIPNetCanonical&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>types.go</file>\n    <line>288</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/types/types.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;CompareIPNet&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>types.go</file>\n    <line>299</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/types/types.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GetMinimalIP&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>types.go</file>\n    <line>307</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/types/types.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GetMinimalIPNet&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>types.go</file>\n    <line>344</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/types/types.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GetHostPartIP&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>types.go</file>\n    <line>363</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/types/types.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GetBroadcastIP&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>types.go</file>\n    <line>380</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/types/types.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ParseCIDR&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>types.go</file>\n    <line>501</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/types/types.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NotFoundErrorf&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>types.go</file>\n    <line>506</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/types/types.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ForbiddenErrorf&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>types.go</file>\n    <line>511</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/types/types.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NoServiceErrorf&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>types.go</file>\n    <line>516</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/types/types.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NotImplementedErrorf&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>types.go</file>\n    <line>521</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/types/types.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;TimeoutErrorf&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>types.go</file>\n    <line>526</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/types/types.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;InternalErrorf&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>types.go</file>\n    <line>531</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/types/types.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;InternalMaskableErrorf&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>types.go</file>\n    <line>536</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/types/types.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;RetryErrorf&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>sequence.go</file>\n    <line>44</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/bitseq/sequence.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewHandle&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>config.go</file>\n    <line>51</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/config/config.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ParseConfig&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>config.go</file>\n    <line>69</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/config/config.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;OptionDefaultNetwork&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>config.go</file>\n    <line>77</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/config/config.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;OptionDefaultDriver&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>config.go</file>\n    <line>85</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/config/config.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;OptionDriverConfig&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>config.go</file>\n    <line>92</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/config/config.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;OptionLabels&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>config.go</file>\n    <line>103</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/config/config.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;OptionKVProvider&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>config.go</file>\n    <line>114</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/config/config.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;OptionKVProviderURL&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>config.go</file>\n    <line>125</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/config/config.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;OptionKVOpts&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>config.go</file>\n    <line>159</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/config/config.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;OptionDiscoveryWatcher&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>config.go</file>\n    <line>166</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/config/config.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;OptionDiscoveryAddress&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>config.go</file>\n    <line>173</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/config/config.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;OptionDataDir&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>config.go</file>\n    <line>189</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/config/config.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;IsValidName&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>config.go</file>\n    <line>197</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/config/config.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;OptionLocalKVProvider&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>config.go</file>\n    <line>208</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/config/config.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;OptionLocalKVProviderURL&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>config.go</file>\n    <line>219</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/config/config.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;OptionLocalKVProviderConfig&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>host.go</file>\n    <line>19</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/drivers/host/host.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Init&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>null.go</file>\n    <line>19</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/drivers/null/null.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Init&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>bridge.go</file>\n    <line>120</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/drivers/bridge/bridge.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Init&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>driver.go</file>\n    <line>30</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/drivers/remote/driver.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Init&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>overlay.go</file>\n    <line>46</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/drivers/overlay/overlay.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Init&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>overlay.go</file>\n    <line>63</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/drivers/overlay/overlay.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Fini&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>windows.go</file>\n    <line>15</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/drivers/windows/windows.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Init&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>options.go</file>\n    <line>48</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/options/options.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewGeneric&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>options.go</file>\n    <line>58</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/options/options.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GenerateFromModel&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>etchosts.go</file>\n    <line>61</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/etchosts/etchosts.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Drop&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>etchosts.go</file>\n    <line>72</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/etchosts/etchosts.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Build&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>etchosts.go</file>\n    <line>106</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/etchosts/etchosts.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Add&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>etchosts.go</file>\n    <line>135</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/etchosts/etchosts.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Delete&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>etchosts.go</file>\n    <line>160</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/etchosts/etchosts.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Update&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>iptables.go</file>\n    <line>76</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/iptables/iptables.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewChain&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>iptables.go</file>\n    <line>98</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/iptables/iptables.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ProgramChain&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>iptables.go</file>\n    <line>147</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/iptables/iptables.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;RemoveExistingChain&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>firewalld.go</file>\n    <line>41</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/iptables/firewalld.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;FirewalldInit&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>firewalld.go</file>\n    <line>134</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/iptables/firewalld.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;OnReloaded&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>labels.go</file>\n    <line>82</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/netlabel/labels.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Key&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>labels.go</file>\n    <line>90</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/netlabel/labels.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Value&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>labels.go</file>\n    <line>98</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/netlabel/labels.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;KeyValue&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>utils.go</file>\n    <line>30</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/netutils/utils.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;CheckNameserverOverlaps&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>utils.go</file>\n    <line>46</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/netutils/utils.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;CheckRouteOverlaps&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>utils.go</file>\n    <line>66</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/netutils/utils.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NetworkRange&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>utils.go</file>\n    <line>86</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/netutils/utils.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GetIfaceAddr&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>utils.go</file>\n    <line>135</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/netutils/utils.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GenerateRandomMAC&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>utils.go</file>\n    <line>141</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/netutils/utils.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GenerateMACFromIP&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>utils.go</file>\n    <line>158</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/netutils/utils.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GenerateIfaceName&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>datastore.go</file>\n    <line>158</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/datastore/datastore.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;DefaultScopes&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>datastore.go</file>\n    <line>187</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/datastore/datastore.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ParseKey&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>datastore.go</file>\n    <line>238</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/datastore/datastore.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewDataStore&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>mock_store.go</file>\n    <line>27</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/datastore/mock_store.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewMockStore&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>network.go</file>\n    <line>475</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/network.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NetworkOptionPersist&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>network.go</file>\n    <line>482</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/network.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NetworkOptionIpam&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>network.go</file>\n    <line>494</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/network.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NetworkOptionDriverOpts&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>network.go</file>\n    <line>518</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/network.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NetworkOptionDeferIPv6Alloc&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>mapper.go</file>\n    <line>45</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/portmapper/mapper.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;New&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>resolvconf.go</file>\n    <line>15</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/resolvconf/dns/resolvconf.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;IsLocalhost&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>resolvconf.go</file>\n    <line>49</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/resolvconf/resolvconf.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Get&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>resolvconf.go</file>\n    <line>62</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/resolvconf/resolvconf.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GetSpecific&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>resolvconf.go</file>\n    <line>77</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/resolvconf/resolvconf.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GetIfChanged&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>resolvconf.go</file>\n    <line>100</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/resolvconf/resolvconf.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GetLastModified&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>resolvconf.go</file>\n    <line>114</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/resolvconf/resolvconf.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;FilterResolvDNS&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>resolvconf.go</file>\n    <line>168</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/resolvconf/resolvconf.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GetNameserversAsCIDR&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>resolvconf.go</file>\n    <line>179</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/resolvconf/resolvconf.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GetSearchDomains&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>resolvconf.go</file>\n    <line>194</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/resolvconf/resolvconf.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GetOptions&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>resolvconf.go</file>\n    <line>209</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/resolvconf/resolvconf.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Build&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>sandbox.go</file>\n    <line>845</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/sandbox.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;OptionHostname&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>sandbox.go</file>\n    <line>853</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/sandbox.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;OptionDomainname&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>sandbox.go</file>\n    <line>861</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/sandbox.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;OptionHostsPath&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>sandbox.go</file>\n    <line>869</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/sandbox.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;OptionOriginHostsPath&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>sandbox.go</file>\n    <line>877</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/sandbox.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;OptionExtraHost&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>sandbox.go</file>\n    <line>885</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/sandbox.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;OptionParentUpdate&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>sandbox.go</file>\n    <line>893</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/sandbox.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;OptionResolvConfPath&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>sandbox.go</file>\n    <line>901</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/sandbox.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;OptionOriginResolvConfPath&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>sandbox.go</file>\n    <line>909</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/sandbox.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;OptionDNS&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>sandbox.go</file>\n    <line>917</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/sandbox.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;OptionDNSSearch&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>sandbox.go</file>\n    <line>925</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/sandbox.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;OptionDNSOptions&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>sandbox.go</file>\n    <line>933</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/sandbox.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;OptionUseDefaultSandbox&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>sandbox.go</file>\n    <line>941</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/sandbox.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;OptionUseExternalKey&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>sandbox.go</file>\n    <line>950</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/sandbox.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;OptionGeneric&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>endpoint.go</file>\n    <line>680</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/endpoint.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;EndpointOptionGeneric&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>endpoint.go</file>\n    <line>722</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/endpoint.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;JoinOptionPriority&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>controller.go</file>\n    <line>153</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/controller.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;New&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>controller.go</file>\n    <line>630</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/controller.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;SandboxKeyWalker&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>hostdiscovery.go</file>\n    <line>33</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/hostdiscovery/hostdiscovery.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewHostDiscovery&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>portallocator.go</file>\n    <line>87</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/portallocator/portallocator.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Get&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>uuid.go</file>\n    <line>40</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/uuid/uuid.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Generate&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>uuid.go</file>\n    <line>87</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/uuid/uuid.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Parse&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>set.go</file>\n    <line>35</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/digest/set.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewSet&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>set.go</file>\n    <line>138</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/digest/set.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ShortCodeTable&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>digest.go</file>\n    <line>47</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/digest/digest.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewDigestFromHex&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>digest.go</file>\n    <line>85</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/digest/digest.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;FromTarArchive&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>digest.go</file>\n    <line>104</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/digest/digest.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;FromBytes&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>verifiers.go</file>\n    <line>25</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/digest/verifiers.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewDigestVerifier&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>verifiers.go</file>\n    <line>75</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/digest/verifiers.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewLengthVerifier&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>http.go</file>\n    <line>55</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/context/http.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;RemoteIP&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>http.go</file>\n    <line>71</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/context/http.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;WithRequest&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>http.go</file>\n    <line>90</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/context/http.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GetRequest&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>http.go</file>\n    <line>99</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/context/http.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GetRequestID&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>http.go</file>\n    <line>105</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/context/http.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;WithResponseWriter&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>http.go</file>\n    <line>117</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/context/http.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GetResponseWriter&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>http.go</file>\n    <line>137</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/context/http.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;WithVars&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>http.go</file>\n    <line>147</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/context/http.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GetRequestLogger&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>http.go</file>\n    <line>163</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/context/http.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GetResponseLogger&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>trace.go</file>\n    <line>39</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/context/trace.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;WithTrace&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>logger.go</file>\n    <line>43</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/context/logger.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;WithLogger&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>logger.go</file>\n    <line>50</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/context/logger.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GetLoggerWithField&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>logger.go</file>\n    <line>57</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/context/logger.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GetLoggerWithFields&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>context.go</file>\n    <line>65</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/context/context.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;WithValues&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>sign.go</file>\n    <line>13</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/manifest/sign.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Sign&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>sign.go</file>\n    <line>42</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/manifest/sign.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;SignWithChain&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>verify.go</file>\n    <line>12</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/manifest/verify.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Verify&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>verify.go</file>\n    <line>25</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/manifest/verify.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;VerifyChains&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>urls.go</file>\n    <line>35</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/registry/api/v2/urls.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewURLBuilderFromString&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>urls.go</file>\n    <line>46</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/registry/api/v2/urls.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewURLBuilderFromRequest&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>names.go</file>\n    <line>78</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/registry/api/v2/names.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ValidateRepositoryName&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>errors.go</file>\n    <line>157</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/registry/api/errcode/errors.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ParseErrorCode&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>handler.go</file>\n    <line>11</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/registry/api/errcode/handler.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ServeJSON&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>register.go</file>\n    <line>78</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/registry/api/errcode/register.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GetErrorAllDescriptors&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>session.go</file>\n    <line>40</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/registry/client/auth/session.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewAuthorizer&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>session.go</file>\n    <line>113</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/registry/client/auth/session.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewTokenHandler&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>session.go</file>\n    <line>237</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/registry/client/auth/session.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewBasicHandler&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>api_version.go</file>\n    <line>28</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/registry/client/auth/api_version.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;APIVersions&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>authchallenge.go</file>\n    <line>45</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/registry/client/auth/authchallenge.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewSimpleChallengeManager&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>transport.go</file>\n    <line>19</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/registry/client/transport/transport.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewHeaderRequestModifier&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>transport.go</file>\n    <line>33</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/registry/client/transport/transport.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewTransport&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>http_reader.go</file>\n    <line>24</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\"\n                 FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/registry/client/transport/http_reader.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewHTTPReadSeeker&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>repository.go</file>\n    <line>30</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/registry/client/repository.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewRegistry&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>repository.go</file>\n    <line>100</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/registry/client/repository.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewRepository&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>repository.go</file>\n    <line>255</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/registry/client/repository.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;AddEtagToTag&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>memory.go</file>\n    <line>21</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/registry/storage/cache/memory/memory.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewInMemoryBlobDescriptorCacheProvider&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>cache.go</file>\n    <line>21</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/registry/storage/cache/cache.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ValidateDescriptor&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>suite.go</file>\n    <line>14</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/registry/storage/cache/suite.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;CheckBlobDescriptorCache&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>cachedblobdescriptorstore.go</file>\n    <line>35</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\"\n                 FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/registry/storage/cache/cachedblobdescriptorstore.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewCachedBlobStatter&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>cachedblobdescriptorstore.go</file>\n    <line>44</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\"\n                 FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/registry/storage/cache/cachedblobdescriptorstore.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewCachedBlobStatterWithMetrics&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>fluent.go</file>\n    <line>44</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/fluent/fluent-logger-golang/fluent/fluent.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;New&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>sig.go</file>\n    <line>44</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/godbus/dbus/sig.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;SignatureOfType&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>sig.go</file>\n    <line>130</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/godbus/dbus/sig.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ParseSignatureMust&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>conn.go</file>\n    <line>65</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/godbus/dbus/conn.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;SessionBus&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>conn.go</file>\n    <line>104</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/godbus/dbus/conn.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;SystemBus&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>conn.go</file>\n    <line>150</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/godbus/dbus/conn.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewConn&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>conn.go</file>\n    <line>514</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/godbus/dbus/conn.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewError&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>variant.go</file>\n    <line>26</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/godbus/dbus/variant.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ParseVariant&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>lib.go</file>\n    <line>243</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/golang/protobuf/proto/lib.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GetStats&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>lib.go</file>\n    <line>294</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/golang/protobuf/proto/lib.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Bool&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>lib.go</file>\n    <line>307</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/golang/protobuf/proto/lib.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Int&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>lib.go</file>\n    <line>315</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/golang/protobuf/proto/lib.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Int64&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>lib.go</file>\n    <line>321</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/golang/protobuf/proto/lib.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Float32&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>lib.go</file>\n    <line>327</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/golang/protobuf/proto/lib.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Float64&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>lib.go</file>\n    <line>333</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/golang/protobuf/proto/lib.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Uint32&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>lib.go</file>\n    <line>339</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/golang/protobuf/proto/lib.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Uint64&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>lib.go</file>\n    <line>345</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/golang/protobuf/proto/lib.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;String&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>lib.go</file>\n    <line>351</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/golang/protobuf/proto/lib.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;EnumName&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>lib.go</file>\n    <line>365</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/golang/protobuf/proto/lib.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;UnmarshalJSONEnum&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>lib.go</file>\n    <line>502</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/golang/protobuf/proto/lib.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;SetDefaults&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>text.go</file>\n    <line>770</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/golang/protobuf/proto/text.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;MarshalText&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>text.go</file>\n    <line>775</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/golang/protobuf/proto/text.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;MarshalTextString&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>text.go</file>\n    <line>782</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/golang/protobuf/proto/text.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;CompactText&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>encode.go</file>\n    <line>261</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/golang/protobuf/proto/encode.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Size&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>extensions.go</file>\n    <line>95</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/golang/protobuf/proto/extensions.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;SetRawExtension&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>extensions.go</file>\n    <line>212</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/golang/protobuf/proto/extensions.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;HasExtension&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>extensions.go</file>\n    <line>219</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/golang/protobuf/proto/extensions.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ClearExtension&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>extensions.go</file>\n    <line>297</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/golang/protobuf/proto/extensions.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GetExtensions&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>extensions.go</file>\n    <line>344</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/golang/protobuf/proto/extensions.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;RegisterExtension&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>properties.go</file>\n    <line>737</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/golang/protobuf/proto/properties.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;RegisterEnum&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>message_set.go</file>\n    <line>159</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/golang/protobuf/proto/message_set.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;MarshalMessageSet&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>message_set.go</file>\n    <line>188</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/golang/protobuf/proto/message_set.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;UnmarshalMessageSet&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>message_set.go</file>\n    <line>219</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/golang/protobuf/proto/message_set.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;MarshalMessageSetJSON&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>message_set.go</file>\n    <line>262</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/golang/protobuf/proto/message_set.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;UnmarshalMessageSetJSON&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>message_set.go</file>\n    <line>282</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/golang/protobuf/proto/message_set.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;RegisterMessageSetType&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>text_parser.go</file>\n    <line>746</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/golang/protobuf/proto/text_parser.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;UnmarshalText&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>flw.go</file>\n    <line>23</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/samuel/go-zookeeper/zk/flw.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;FLWSrvr&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>flw.go</file>\n    <line>129</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/samuel/go-zookeeper/zk/flw.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;FLWRuok&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>flw.go</file>\n    <line>152</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/samuel/go-zookeeper/zk/flw.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;FLWCons&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>lock.go</file>\n    <line>23</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/samuel/go-zookeeper/zk/lock.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewLock&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>util.go</file>\n    <line>15</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/samuel/go-zookeeper/zk/util.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;AuthACL&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>util.go</file>\n    <line>22</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/samuel/go-zookeeper/zk/util.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;WorldACL&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>util.go</file>\n    <line>26</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/samuel/go-zookeeper/zk/util.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;DigestACL&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>tracer.go</file>\n    <line>135</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/samuel/go-zookeeper/zk/tracer.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;StartTracer&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>server_help.go</file>\n    <line>24</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/samuel/go-zookeeper/zk/server_help.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;StartTestCluster&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>enum_gen.go</file>\n    <line>88</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/syndtr/gocapability/capability/enum_gen.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;List&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>capability.go</file>\n    <line>65</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/syndtr/gocapability/capability/capability.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewPid&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>capability.go</file>\n    <line>70</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/syndtr/gocapability/capability/capability.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewFile&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>gen.go</file>\n    <line>120</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/ugorji/go/codec/gen.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Gen&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>gen.go</file>\n    <line>1697</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/ugorji/go/codec/gen.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GenInternalGoFile&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>noop.go</file>\n    <line>15</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/ugorji/go/codec/noop.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NoopHandle&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>decode.go</file>\n    <line>928</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/ugorji/go/codec/decode.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewDecoderBytes&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>gen-helper.generated.go</file>\n    <line>25</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/ugorji/go/codec/gen-helper.generated.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GenHelperEncoder&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>gen-helper.generated.go</file>\n    <line>31</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/ugorji/go/codec/gen-helper.generated.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GenHelperDecoder&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>assemble.go</file>\n    <line>19</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vbatts/tar-split/tar/asm/assemble.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewOutputTarStream&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>disassemble.go</file>\n    <line>21</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vbatts/tar-split/tar/asm/disassemble.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewInputTarStream&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>getter.go</file>\n    <line>37</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vbatts/tar-split/tar/storage/getter.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewPathFileGetter&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>getter.go</file>\n    <line>83</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vbatts/tar-split/tar/storage/getter.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewBufferFileGetPutter&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>getter.go</file>\n    <line>90</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vbatts/tar-split/tar/storage/getter.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewDiscardFilePutter&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>packer.go</file>\n    <line>79</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vbatts/tar-split/tar/storage/packer.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewJSONUnpacker&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>packer.go</file>\n    <line>129</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vbatts/tar-split/tar/storage/packer.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewJSONPacker&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>common.go</file>\n    <line>204</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vbatts/tar-split/archive/tar/common.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;FileInfoHeader&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>reader.go</file>\n    <line>106</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vbatts/tar-split/archive/tar/reader.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewReader&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>writer.go</file>\n    <line>47</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vbatts/tar-split/archive/tar/writer.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewWriter&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>mux.go</file>\n    <line>246</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/gorilla/mux/mux.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Vars&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>mux.go</file>\n    <line>254</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/gorilla/mux/mux.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;CurrentRoute&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>context.go</file>\n    <line>20</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/gorilla/context/context.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Set&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>context.go</file>\n    <line>31</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/gorilla/context/context.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Get&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>context.go</file>\n    <line>43</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/gorilla/context/context.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GetOk&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>context.go</file>\n    <line>55</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/gorilla/context/context.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GetAll&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>context.go</file>\n    <line>71</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/gorilla/context/context.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GetAllOk&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>context.go</file>\n    <line>83</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/gorilla/context/context.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Delete&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>context.go</file>\n    <line>116</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/gorilla/context/context.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Purge&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>context.go</file>\n    <line>138</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/gorilla/context/context.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ClearHandler&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>edit.go</file>\n    <line>11</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/tinylib/msgp/msgp/edit.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Locate&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>edit.go</file>\n    <line>23</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/tinylib/msgp/msgp/edit.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Replace&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>edit.go</file>\n    <line>34</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/tinylib/msgp/msgp/edit.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;CopyReplace&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>edit.go</file>\n    <line>44</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/tinylib/msgp/msgp/edit.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Remove&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>edit.go</file>\n    <line>55</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/tinylib/msgp/msgp/edit.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;HasKey&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>json.go</file>\n    <line>53</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/tinylib/msgp/msgp/json.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;CopyToJSON&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>read.go</file>\n    <line>102</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/tinylib/msgp/msgp/read.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Decode&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>read.go</file>\n    <line>124</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/tinylib/msgp/msgp/read.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewReaderSize&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>write.go</file>\n    <line>63</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/tinylib/msgp/msgp/write.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Require&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>write.go</file>\n    <line>118</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/tinylib/msgp/msgp/write.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewWriterSize&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>write.go</file>\n    <line>133</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/tinylib/msgp/msgp/write.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Encode&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>circular.go</file>\n    <line>17</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/tinylib/msgp/msgp/circular.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewEndlessReader&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>extension.go</file>\n    <line>38</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/tinylib/msgp/msgp/extension.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;RegisterExtension&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>read_bytes.go</file>\n    <line>46</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/tinylib/msgp/msgp/read_bytes.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;IsNil&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>read_bytes.go</file>\n    <line>424</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/tinylib/msgp/msgp/read_bytes.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ReadInt16Bytes&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>read_bytes.go</file>\n    <line>438</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/tinylib/msgp/msgp/read_bytes.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ReadInt8Bytes&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>read_bytes.go</file>\n    <line>452</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/tinylib/msgp/msgp/read_bytes.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ReadIntBytes&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>read_bytes.go</file>\n    <line>542</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/tinylib/msgp/msgp/read_bytes.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ReadUint16Bytes&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>read_bytes.go</file>\n    <line>570</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/tinylib/msgp/msgp/read_bytes.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ReadUintBytes&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>read_bytes.go</file>\n    <line>580</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/tinylib/msgp/msgp/read_bytes.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ReadByteBytes&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>read_bytes.go</file>\n    <line>665</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/tinylib/msgp/msgp/read_bytes.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ReadExactBytes&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>write_bytes.go</file>\n    <line>150</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/tinylib/msgp/msgp/write_bytes.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;AppendUint&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>write_bytes.go</file>\n    <line>156</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/tinylib/msgp/msgp/write_bytes.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;AppendByte&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>number_unsafe.go</file>\n    <line>29</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/tinylib/msgp/msgp/number_unsafe.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;UnsafeBytes&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>set.go</file>\n    <line>149</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/deckarep/golang-set/set.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewSetFromSlice&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>set.go</file>\n    <line>162</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/deckarep/golang-set/set.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewThreadUnsafeSetFromSlice&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>run.go</file>\n    <line>20</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/go-check/check/run.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Suite&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>run.go</file>\n    <line>50</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/go-check/check/run.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;TestingT&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>checkers.go</file>\n    <line>31</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/go-check/check/checkers.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Commentf&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>checkers.go</file>\n    <line>76</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/go-check/check/checkers.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Not&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>reader.go</file>\n    <line>24</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/Graylog2/go-gelf/gelf/reader.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewReader&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>writer.go</file>\n    <line>102</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/Graylog2/go-gelf/gelf/writer.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewWriter&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>logrus.go</file>\n    <line>35</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/Sirupsen/logrus/logrus.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ParseLevel&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>exported.go</file>\n    <line>12</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/Sirupsen/logrus/exported.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;StandardLogger&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>exported.go</file>\n    <line>17</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/Sirupsen/logrus/exported.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;SetOutput&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>exported.go</file>\n    <line>24</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/Sirupsen/logrus/exported.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;SetFormatter&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>exported.go</file>\n    <line>31</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/Sirupsen/logrus/exported.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;SetLevel&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>exported.go</file>\n    <line>38</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/Sirupsen/logrus/exported.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GetLevel&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>exported.go</file>\n    <line>45</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/Sirupsen/logrus/exported.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;AddHook&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>exported.go</file>\n    <line>56</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/Sirupsen/logrus/exported.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;WithField&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>exported.go</file>\n    <line>66</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/Sirupsen/logrus/exported.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;WithFields&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>exported.go</file>\n    <line>71</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/Sirupsen/logrus/exported.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Debug&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>exported.go</file>\n    <line>76</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/Sirupsen/logrus/exported.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Print&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>exported.go</file>\n    <line>81</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/Sirupsen/logrus/exported.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Info&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>exported.go</file>\n    <line>86</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/Sirupsen/logrus/exported.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Warn&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>exported.go</file>\n    <line>91</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/Sirupsen/logrus/exported.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Warning&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>exported.go</file>\n    <line>96</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/Sirupsen/logrus/exported.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Error&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>exported.go</file>\n    <line>101</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/Sirupsen/logrus/exported.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Panic&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>exported.go</file>\n    <line>106</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/Sirupsen/logrus/exported.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Fatal&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>exported.go</file>\n    <line>111</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/Sirupsen/logrus/exported.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Debugf&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>exported.go</file>\n    <line>116</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/Sirupsen/logrus/exported.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Printf&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>exported.go</file>\n    <line>121</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/Sirupsen/logrus/exported.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Infof&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>exported.go</file>\n    <line>126</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/Sirupsen/logrus/exported.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Warnf&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>exported.go</file>\n    <line>131</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/Sirupsen/logrus/exported.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Warningf&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>exported.go</file>\n    <line>136</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/Sirupsen/logrus/exported.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Errorf&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>exported.go</file>\n    <line>141</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/Sirupsen/logrus/exported.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Panicf&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>exported.go</file>\n    <line>146</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/Sirupsen/logrus/exported.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Fatalf&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>exported.go</file>\n    <line>151</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/Sirupsen/logrus/exported.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Debugln&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>exported.go</file>\n    <line>156</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/Sirupsen/logrus/exported.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Println&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>exported.go</file>\n    <line>161</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/Sirupsen/logrus/exported.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Infoln&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>exported.go</file>\n    <line>166</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/Sirupsen/logrus/exported.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Warnln&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>exported.go</file>\n    <line>171</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/Sirupsen/logrus/exported.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Warningln&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>exported.go</file>\n    <line>176</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/Sirupsen/logrus/exported.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Errorln&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>exported.go</file>\n    <line>181</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/Sirupsen/logrus/exported.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Panicln&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>exported.go</file>\n    <line>186</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/Sirupsen/logrus/exported.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Fatalln&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>ini.go</file>\n    <line>112</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vaughan0/go-ini/ini.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Load&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>ini.go</file>\n    <line>119</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vaughan0/go-ini/ini.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;LoadFile&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>keys.go</file>\n    <line>43</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/data/keys.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewPrivateKey&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>keys.go</file>\n    <line>88</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/data/keys.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;PublicKeyFromPrivate&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>root.go</file>\n    <line>26</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/data/root.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewRoot&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>root.go</file>\n    <line>77</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/data/root.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;RootFromSigned&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>roles.go</file>\n    <line>25</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/data/roles.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;SetValidRoles&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>roles.go</file>\n    <line>34</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/data/roles.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;RoleName&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>roles.go</file>\n    <line>94</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/data/roles.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewRole&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>types.go</file>\n    <line>54</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/data/types.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;SetTUFTypes&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>types.go</file>\n    <line>60</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/data/types.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ValidTUFType&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>types.go</file>\n    <line>165</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/data/types.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;SetDefaultExpiryTimes&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>targets.go</file>\n    <line>22</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/data/targets.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewTargets&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>targets.go</file>\n    <line>104</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/data/targets.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;TargetsFromSigned&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>snapshot.go</file>\n    <line>24</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/data/snapshot.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewSnapshot&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>snapshot.go</file>\n    <line>85</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/data/snapshot.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;SnapshotFromSigned&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>timestamp.go</file>\n    <line>23</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/data/timestamp.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewTimestamp&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>timestamp.go</file>\n    <line>63</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/data/timestamp.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;TimestampFromSigned&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>db.go</file>\n    <line>24</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/keys/db.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewDB&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>dbstore.go</file>\n    <line>29</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/store/dbstore.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;DBStore&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>filestore.go</file>\n    <line>11</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/store/filestore.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewFilesystemStore&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>httpstore.go</file>\n    <line>55</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/store/httpstore.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewHTTPStore&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>memorystore.go</file>\n    <line>13</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/store/memorystore.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewMemoryStore&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>util.go</file>\n    <line>52</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/utils/util.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;FileMetaEqual&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>util.go</file>\n    <line>71</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/utils/util.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NormalizeTarget&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>util.go</file>\n    <line>75</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/utils/util.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;HashedPaths&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>utils.go</file>\n    <line>18</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/utils/utils.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Download&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>utils.go</file>\n    <line>26</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/utils/utils.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Upload&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>utils.go</file>\n    <line>34</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/utils/utils.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ValidateTarget&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>utils.go</file>\n    <line>50</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/utils/utils.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;StrSliceContains&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>utils.go</file>\n    <line>59</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/utils/utils.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;StrSliceContainsI&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>utils.go</file>\n    <line>70</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/utils/utils.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;FileExists&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>utils.go</file>\n    <line>83</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/utils/utils.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;DoHash&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>client.go</file>\n    <line>32</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/client/client.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewClient&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>errors.go</file>\n    <line>71</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/client/errors.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;IsNotFound&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>errors.go</file>\n    <line>94</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/client/errors.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;IsLatestSnapshot&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>sign.go</file>\n    <line>13</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/signed/sign.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Sign&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>verify.go</file>\n    <line>25</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/signed/verify.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;VerifyRoot&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>verify.go</file>\n    <line>152</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/signed/verify.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Unmarshal&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>verify.go</file>\n    <line>163</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/signed/verify.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;UnmarshalTrusted&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>ed25519.go</file>\n    <line>16</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/signed/ed25519.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewEd25519&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>verifiers.go</file>\n    <line>37</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/signed/verifiers.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;RegisterVerifier&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>tuf.go</file>\n    <line>64</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/tuf.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewTufRepo&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>serf.go</file>\n    <line>223</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/hashicorp/serf/serf/serf.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Create&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>config.go</file>\n    <line>210</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/hashicorp/serf/serf/config.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;DefaultConfig&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>api.go</file>\n    <line>184</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/hashicorp/consul/api/api.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewClient&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>decode.go</file>\n    <line>570</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/hashicorp/go-msgpack/codec/decode.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewDecoderBytes&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>encode.go</file>\n    <line>631</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/hashicorp/go-msgpack/codec/encode.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewEncoderBytes&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>config.go</file>\n    <line>178</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/hashicorp/memberlist/config.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;DefaultWANConfig&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>config.go</file>\n    <line>193</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/hashicorp/memberlist/config.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;DefaultLocalConfig&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>memberlist.go</file>\n    <line>133</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/hashicorp/memberlist/memberlist.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Create&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>decode.go</file>\n    <line>67</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/jfrazelle/go/canonical/json/decode.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Unmarshal&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>encode.go</file>\n    <line>138</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/jfrazelle/go/canonical/json/encode.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;MarshalIndent&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>encode.go</file>\n    <line>153</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/jfrazelle/go/canonical/json/encode.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;MarshalCanonical&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>encode.go</file>\n    <line>172</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/jfrazelle/go/canonical/json/encode.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;HTMLEscape&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>indent.go</file>\n    <line>11</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/jfrazelle/go/canonical/json/indent.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Compact&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>stream.go</file>\n    <line>26</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/jfrazelle/go/canonical/json/stream.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewDecoder&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>stream.go</file>\n    <line>147</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/jfrazelle/go/canonical/json/stream.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewEncoder&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>guid.go</file>\n    <line>10</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/microsoft/hcsshim/guid.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewGUID&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>copylayer.go</file>\n    <line>15</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/microsoft/hcsshim/copylayer.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;CopyLayer&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>createlayer.go</file>\n    <line>13</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/microsoft/hcsshim/createlayer.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;CreateLayer&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>exportlayer.go</file>\n    <line>16</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/microsoft/hcsshim/exportlayer.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ExportLayer&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>importlayer.go</file>\n    <line>15</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/microsoft/hcsshim/importlayer.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ImportLayer&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>layerexists.go</file>\n    <line>13</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/microsoft/hcsshim/layerexists.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;LayerExists&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>waitprocess.go</file>\n    <line>13</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/microsoft/hcsshim/waitprocess.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;WaitForProcessInComputeSystem&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>destroylayer.go</file>\n    <line>13</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/microsoft/hcsshim/destroylayer.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;DestroyLayer&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>preparelayer.go</file>\n    <line>16</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/microsoft/hcsshim/preparelayer.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;PrepareLayer&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>activatelayer.go</file>\n    <line>15</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/microsoft/hcsshim/activatelayer.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ActivateLayer&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>createprocess.go</file>\n    <line>70</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/microsoft/hcsshim/createprocess.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;CreateProcessInComputeSystem&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>resizeconsole.go</file>\n    <line>13</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/microsoft/hcsshim/resizeconsole.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ResizeConsoleInComputeSystem&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>unpreparelayer.go</file>\n    <line>13</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/microsoft/hcsshim/unpreparelayer.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;UnprepareLayer&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>deactivatelayer.go</file>\n    <line>12</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/microsoft/hcsshim/deactivatelayer.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;DeactivateLayer&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>terminateprocess.go</file>\n    <line>12</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/microsoft/hcsshim/terminateprocess.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;TerminateProcessInComputeSystem&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>getlayermountpath.go</file>\n    <line>15</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/microsoft/hcsshim/getlayermountpath.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GetLayerMountPath&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>createsandboxlayer.go</file>\n    <line>15</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/microsoft/hcsshim/createsandboxlayer.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;CreateSandboxLayer&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>startcomputesystem.go</file>\n    <line>13</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/microsoft/hcsshim/startcomputesystem.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;StartComputeSystem&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>createcomputesystem.go</file>\n    <line>14</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/microsoft/hcsshim/createcomputesystem.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;CreateComputeSystem&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>getsharedbaseimages.go</file>\n    <line>14</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/microsoft/hcsshim/getsharedbaseimages.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GetSharedBaseImages&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>shutdowncomputesystem.go</file>\n    <line>13</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/microsoft/hcsshim/shutdowncomputesystem.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ShutdownComputeSystem&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>terminatecomputesystem.go</file>\n    <line>12</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/microsoft/hcsshim/terminatecomputesystem.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;TerminateComputeSystem&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>zfs.go</file>\n    <line>99</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mistifyio/go-zfs/zfs.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;SetLogger&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>zfs.go</file>\n    <line>126</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mistifyio/go-zfs/zfs.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Filesystems&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>zfs.go</file>\n    <line>133</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mistifyio/go-zfs/zfs.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Volumes&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>zfs.go</file>\n    <line>178</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mistifyio/go-zfs/zfs.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ReceiveSnapshot&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>zfs.go</file>\n    <line>203</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mistifyio/go-zfs/zfs.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;CreateVolume&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>zfs.go</file>\n    <line>279</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mistifyio/go-zfs/zfs.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;CreateFilesystem&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>zpool.go</file>\n    <line>65</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mistifyio/go-zfs/zpool.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;CreateZpool&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>zpool.go</file>\n    <line>88</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mistifyio/go-zfs/zpool.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ListZpools&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>reader.go</file>\n    <line>48</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/philhofer/fwd/reader.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewReader&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>writer.go</file>\n    <line>22</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/philhofer/fwd/writer.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewWriter&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>writer.go</file>\n    <line>35</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/philhofer/fwd/writer.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewWriterSize&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>decode.go</file>\n    <line>22</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/BurntSushi/toml/decode.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Unmarshal&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>decode.go</file>\n    <line>47</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/BurntSushi/toml/decode.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;PrimitiveDecode&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>decode.go</file>\n    <line>119</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/BurntSushi/toml/decode.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;DecodeFile&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>decode.go</file>\n    <line>129</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/BurntSushi/toml/decode.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;DecodeReader&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>encode.go</file>\n    <line>56</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/BurntSushi/toml/encode.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewEncoder&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>netns.go</file>\n    <line>65</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vishvananda/netns/netns.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;None&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>netns_unspecified.go</file>\n    <line>13</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vishvananda/netns/netns_unspecified.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Set&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>netns_unspecified.go</file>\n    <line>17</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vishvananda/netns/netns_unspecified.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;New&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>netns_unspecified.go</file>\n    <line>21</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vishvananda/netns/netns_unspecified.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Get&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>netns_unspecified.go</file>\n    <line>25</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vishvananda/netns/netns_unspecified.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GetFromName&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>netns_unspecified.go</file>\n    <line>29</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vishvananda/netns/netns_unspecified.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GetFromPid&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>netns_unspecified.go</file>\n    <line>33</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vishvananda/netns/netns_unspecified.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GetFromDocker&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>addr.go</file>\n    <line>23</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vishvananda/netlink/addr.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ParseAddr&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>link.go</file>\n    <line>32</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vishvananda/netlink/link.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewLinkAttrs&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>netlink.go</file>\n    <line>37</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vishvananda/netlink/netlink.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewIPNet&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>netlink_unspecified.go</file>\n    <line>13</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vishvananda/netlink/netlink_unspecified.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;LinkSetUp&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>netlink_unspecified.go</file>\n    <line>17</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vishvananda/netlink/netlink_unspecified.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;LinkSetDown&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>netlink_unspecified.go</file>\n    <line>21</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vishvananda/netlink/netlink_unspecified.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;LinkSetMTU&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>netlink_unspecified.go</file>\n    <line>25</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vishvananda/netlink/netlink_unspecified.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;LinkSetMaster&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>netlink_unspecified.go</file>\n    <line>29</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vishvananda/netlink/netlink_unspecified.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;LinkSetNsPid&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>netlink_unspecified.go</file>\n    <line>33</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vishvananda/netlink/netlink_unspecified.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;LinkSetNsFd&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>netlink_unspecified.go</file>\n    <line>37</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vishvananda/netlink/netlink_unspecified.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;LinkAdd&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>netlink_unspecified.go</file>\n    <line>41</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vishvananda/netlink/netlink_unspecified.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;LinkDel&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>netlink_unspecified.go</file>\n    <line>45</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vishvananda/netlink/netlink_unspecified.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;SetHairpin&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>netlink_unspecified.go</file>\n    <line>49</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vishvananda/netlink/netlink_unspecified.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;SetGuard&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>netlink_unspecified.go</file>\n    <line>53</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vishvananda/netlink/netlink_unspecified.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;SetFastLeave&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>netlink_unspecified.go</file>\n    <line>57</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vishvananda/netlink/netlink_unspecified.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;SetLearning&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>netlink_unspecified.go</file>\n    <line>61</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vishvananda/netlink/netlink_unspecified.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;SetRootBlock&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>netlink_unspecified.go</file>\n    <line>65</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vishvananda/netlink/netlink_unspecified.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;SetFlood&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>netlink_unspecified.go</file>\n    <line>69</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vishvananda/netlink/netlink_unspecified.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;LinkList&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>netlink_unspecified.go</file>\n    <line>73</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vishvananda/netlink/netlink_unspecified.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;AddrAdd&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>netlink_unspecified.go</file>\n    <line>77</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vishvananda/netlink/netlink_unspecified.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;AddrDel&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>netlink_unspecified.go</file>\n    <line>81</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vishvananda/netlink/netlink_unspecified.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;AddrList&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>netlink_unspecified.go</file>\n    <line>85</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vishvananda/netlink/netlink_unspecified.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;RouteAdd&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>netlink_unspecified.go</file>\n    <line>89</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vishvananda/netlink/netlink_unspecified.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;RouteDel&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>netlink_unspecified.go</file>\n    <line>93</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vishvananda/netlink/netlink_unspecified.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;RouteList&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>netlink_unspecified.go</file>\n    <line>97</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vishvananda/netlink/netlink_unspecified.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;XfrmPolicyAdd&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>netlink_unspecified.go</file>\n    <line>101</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vishvananda/netlink/netlink_unspecified.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;XfrmPolicyDel&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>netlink_unspecified.go</file>\n    <line>105</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vishvananda/netlink/netlink_unspecified.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;XfrmPolicyList&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>netlink_unspecified.go</file>\n    <line>109</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vishvananda/netlink/netlink_unspecified.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;XfrmStateAdd&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>netlink_unspecified.go</file>\n    <line>113</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vishvananda/netlink/netlink_unspecified.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;XfrmStateDel&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>netlink_unspecified.go</file>\n    <line>117</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vishvananda/netlink/netlink_unspecified.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;XfrmStateList&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>netlink_unspecified.go</file>\n    <line>121</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vishvananda/netlink/netlink_unspecified.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NeighAdd&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>netlink_unspecified.go</file>\n    <line>125</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vishvananda/netlink/netlink_unspecified.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NeighSet&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>netlink_unspecified.go</file>\n    <line>129</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vishvananda/netlink/netlink_unspecified.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NeighAppend&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>netlink_unspecified.go</file>\n    <line>133</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vishvananda/netlink/netlink_unspecified.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NeighDel&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>netlink_unspecified.go</file>\n    <line>137</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vishvananda/netlink/netlink_unspecified.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NeighList&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>netlink_unspecified.go</file>\n    <line>141</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/vishvananda/netlink/netlink_unspecified.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NeighDeserialize&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>user.go</file>\n    <line>72</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/opencontainers/runc/libcontainer/user/user.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ParsePasswdFile&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>user.go</file>\n    <line>85</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/opencontainers/runc/libcontainer/user/user.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ParsePasswdFileFilter&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>user.go</file>\n    <line>133</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/opencontainers/runc/libcontainer/user/user.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ParseGroupFile&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>user.go</file>\n    <line>146</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/opencontainers/runc/libcontainer/user/user.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ParseGroupFileFilter&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>user.go</file>\n    <line>204</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/opencontainers/runc/libcontainer/user/user.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GetExecUserPath&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>user.go</file>\n    <line>412</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/opencontainers/runc/libcontainer/user/user.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GetAdditionalGroupsPath&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>lookup.go</file>\n    <line>40</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/opencontainers/runc/libcontainer/user/lookup.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;CurrentUser&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>lookup.go</file>\n    <line>47</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/opencontainers/runc/libcontainer/user/lookup.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;LookupUser&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>lookup.go</file>\n    <line>88</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/opencontainers/runc/libcontainer/user/lookup.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;CurrentGroup&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>lookup.go</file>\n    <line>95</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/opencontainers/runc/libcontainer/user/lookup.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;LookupGroup&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>lookup_unix.go</file>\n    <line>16</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/opencontainers/runc/libcontainer/user/lookup_unix.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GetPasswdPath&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>lookup_unix.go</file>\n    <line>24</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/opencontainers/runc/libcontainer/user/lookup_unix.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GetGroupPath&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>label.go</file>\n    <line>8</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/opencontainers/runc/libcontainer/label/label.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;InitLabels&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>label.go</file>\n    <line>12</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/opencontainers/runc/libcontainer/label/label.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GenLabels&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>label.go</file>\n    <line>16</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/opencontainers/runc/libcontainer/label/label.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;FormatMountLabel&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>label.go</file>\n    <line>20</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/opencontainers/runc/libcontainer/label/label.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;SetProcessLabel&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>label.go</file>\n    <line>24</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/opencontainers/runc/libcontainer/label/label.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;SetFileLabel&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>label.go</file>\n    <line>28</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/opencontainers/runc/libcontainer/label/label.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;SetFileCreateLabel&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>label.go</file>\n    <line>32</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/opencontainers/runc/libcontainer/label/label.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Relabel&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>label.go</file>\n    <line>36</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/opencontainers/runc/libcontainer/label/label.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GetPidLabel&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>label.go</file>\n    <line>40</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/opencontainers/runc/libcontainer/label/label.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Init&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>label.go</file>\n    <line>43</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/opencontainers/runc/libcontainer/label/label.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ReserveLabel&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>label.go</file>\n    <line>47</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/opencontainers/runc/libcontainer/label/label.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;UnreserveLabel&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>label.go</file>\n    <line>53</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/opencontainers/runc/libcontainer/label/label.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;DupSecOpt&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>label.go</file>\n    <line>59</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/opencontainers/runc/libcontainer/label/label.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;DisableSecOpt&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>label.go</file>\n    <line>64</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/opencontainers/runc/libcontainer/label/label.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Validate&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>label.go</file>\n    <line>69</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/opencontainers/runc/libcontainer/label/label.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;RelabelNeeded&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>label.go</file>\n    <line>74</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/opencontainers/runc/libcontainer/label/label.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;IsShared&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>utils.go</file>\n    <line>17</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/opencontainers/runc/libcontainer/utils/utils.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GenerateRandomName&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>utils.go</file>\n    <line>30</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/opencontainers/runc/libcontainer/utils/utils.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ResolveRootfs&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>utils.go</file>\n    <line>40</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/opencontainers/runc/libcontainer/utils/utils.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ExitStatus&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>utils_unix.go</file>\n    <line>11</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/opencontainers/runc/libcontainer/utils/utils_unix.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;CloseExecFrom&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>proc.go</file>\n    <line>12</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/opencontainers/runc/libcontainer/system/proc.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;GetProcessStartTime&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>apply_nosystemd.go</file>\n    <line>17</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\"\n                 FQNAME=\"temp:///src/docker/vendor/src/github.com/opencontainers/runc/libcontainer/cgroups/systemd/apply_nosystemd.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;UseSystemd&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>apply_nosystemd.go</file>\n    <line>49</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\"\n                 FQNAME=\"temp:///src/docker/vendor/src/github.com/opencontainers/runc/libcontainer/cgroups/systemd/apply_nosystemd.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Freeze&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>config.go</file>\n    <line>15</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/opencontainers/runc/libcontainer/configs/validate/config.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;New&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>config.go</file>\n    <line>204</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/opencontainers/runc/libcontainer/configs/config.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewFunctionHook&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>config.go</file>\n    <line>226</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/opencontainers/runc/libcontainer/configs/config.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewCommandHook&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>blkio_device.go</file>\n    <line>23</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/opencontainers/runc/libcontainer/configs/blkio_device.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewWeightDevice&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>blkio_device.go</file>\n    <line>50</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/opencontainers/runc/libcontainer/configs/blkio_device.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewThrottleDevice&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>config.go</file>\n    <line>13</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/opencontainers/runc/libcontainer/seccomp/config.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ConvertStringToOperator&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>config.go</file>\n    <line>40</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/opencontainers/runc/libcontainer/seccomp/config.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ConvertStringToAction&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>seccomp_unsupported.go</file>\n    <line>14</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\"\n                 FQNAME=\"temp:///src/docker/vendor/src/github.com/opencontainers/runc/libcontainer/seccomp/seccomp_unsupported.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;InitSeccomp&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>apparmor_disabled.go</file>\n    <line>5</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\"\n                 FQNAME=\"temp:///src/docker/vendor/src/github.com/opencontainers/runc/libcontainer/apparmor/apparmor_disabled.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;IsEnabled&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>apparmor_disabled.go</file>\n    <line>9</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\"\n                 FQNAME=\"temp:///src/docker/vendor/src/github.com/opencontainers/runc/libcontainer/apparmor/apparmor_disabled.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ApplyProfile&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>capture.go</file>\n    <line>8</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/opencontainers/runc/libcontainer/stacktrace/capture.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Capture&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>context.go</file>\n    <line>187</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/golang.org/x/net/context/context.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Background&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>context.go</file>\n    <line>196</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/golang.org/x/net/context/context.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;TODO&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>context.go</file>\n    <line>418</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/golang.org/x/net/context/context.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;WithTimeout&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>context.go</file>\n    <line>427</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/golang.org/x/net/context/context.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;WithValue&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>client.go</file>\n    <line>56</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/golang.org/x/net/websocket/client.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Dial&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>extpoint.go</file>\n    <line>64</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/volume/drivers/extpoint.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Unregister&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>volume.go</file>\n    <line>54</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/volume/volume.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ValidMountMode&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>volume.go</file>\n    <line>59</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/volume/volume.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ReadWrite&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>git.go</file>\n    <line>11</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/builder/git.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;MakeGitContext&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>remote.go</file>\n    <line>31</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/builder/remote.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;MakeRemoteContext&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>builder.go</file>\n    <line>259</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/builder/dockerfile/builder.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;Commit&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>config.go</file>\n    <line>370</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/registry/config.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ParseIndexInfo&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>service.go</file>\n    <line>20</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/registry/service.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;NewService&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>reference.go</file>\n    <line>55</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/registry/reference.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;ParseReference&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>reference.go</file>\n    <line>66</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/registry/reference.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;DigestReference&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>hostconfig_unix.go</file>\n    <line>70</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/runconfig/hostconfig_unix.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused exported function inspection</problem_class>\n    <description>Unused function &lt;code&gt;IsPreDefinedNetwork&lt;/code&gt; #loc</description>\n  </problem>\n</problems>"
  },
  {
    "path": "testData/performance/GoUnusedFunction/expected.xml",
    "content": "<!--\n  ~ Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n<problems>\n  <problem>\n    <file>cwlogsiface_mock_test.go</file>\n    <line>52</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/daemon/logger/awslogs/cwlogsiface_mock_test.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused function inspection</problem_class>\n    <description>Unused function &lt;code&gt;test&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>ioctl_bsd.go</file>\n    <line>25</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/kr/pty/ioctl_bsd.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused function inspection</problem_class>\n    <description>Unused function &lt;code&gt;_IO&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>ioctl_bsd.go</file>\n    <line>29</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/kr/pty/ioctl_bsd.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused function inspection</problem_class>\n    <description>Unused function &lt;code&gt;_IOR&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>ioctl_bsd.go</file>\n    <line>37</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/kr/pty/ioctl_bsd.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused function inspection</problem_class>\n    <description>Unused function &lt;code&gt;_IOWR&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>utilities.go</file>\n    <line>17</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/Azure/go-ansiterm/utilities.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused function inspection</problem_class>\n    <description>Unused function &lt;code&gt;convertBytesToInteger&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>parser_test_helpers.go</file>\n    <line>28</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/Azure/go-ansiterm/parser_test_helpers.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused function inspection</problem_class>\n    <description>Unused function &lt;code&gt;anyToXHelper&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>parser_test_helpers.go</file>\n    <line>41</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/Azure/go-ansiterm/parser_test_helpers.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused function inspection</problem_class>\n    <description>Unused function &lt;code&gt;parseParamsHelper&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>parser_test_helpers.go</file>\n    <line>65</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/Azure/go-ansiterm/parser_test_helpers.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused function inspection</problem_class>\n    <description>Unused function &lt;code&gt;cursorSingleParamHelper&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>parser_test_helpers.go</file>\n    <line>74</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/Azure/go-ansiterm/parser_test_helpers.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused function inspection</problem_class>\n    <description>Unused function &lt;code&gt;cursorTwoParamHelper&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>parser_test_helpers.go</file>\n    <line>83</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/Azure/go-ansiterm/parser_test_helpers.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused function inspection</problem_class>\n    <description>Unused function &lt;code&gt;eraseHelper&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>parser_test_helpers.go</file>\n    <line>93</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/Azure/go-ansiterm/parser_test_helpers.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused function inspection</problem_class>\n    <description>Unused function &lt;code&gt;scrollHelper&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>parser_test_helpers.go</file>\n    <line>101</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/Azure/go-ansiterm/parser_test_helpers.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused function inspection</problem_class>\n    <description>Unused function &lt;code&gt;clearOnStateChangeHelper&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>parser_test_helpers.go</file>\n    <line>109</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/Azure/go-ansiterm/parser_test_helpers.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused function inspection</problem_class>\n    <description>Unused function &lt;code&gt;c0Helper&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>db.go</file>\n    <line>678</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/boltdb/bolt/db.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused function inspection</problem_class>\n    <description>Unused function &lt;code&gt;warn&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>db.go</file>\n    <line>682</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/boltdb/bolt/db.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused function inspection</problem_class>\n    <description>Unused function &lt;code&gt;warnf&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>db.go</file>\n    <line>686</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/boltdb/bolt/db.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused function inspection</problem_class>\n    <description>Unused function &lt;code&gt;printstack&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>resolvconf.go</file>\n    <line>23</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/drivers/bridge/resolvconf.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused function inspection</problem_class>\n    <description>Unused function &lt;code&gt;readResolvConf&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>resolvconf.go</file>\n    <line>49</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/drivers/bridge/resolvconf.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused function inspection</problem_class>\n    <description>Unused function &lt;code&gt;getNameserversAsCIDR&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>mock_proxy.go</file>\n    <line>5</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/portmapper/mock_proxy.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused function inspection</problem_class>\n    <description>Unused function &lt;code&gt;newMockProxyCommand&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>sandbox.go</file>\n    <line>1017</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/sandbox.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused function inspection</problem_class>\n    <description>Unused function &lt;code&gt;createFile&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>urls.go</file>\n    <line>226</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/registry/api/v2/urls.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused function inspection</problem_class>\n    <description>Unused function &lt;code&gt;appendValues&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>suite.go</file>\n    <line>143</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/registry/storage/cache/suite.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused function inspection</problem_class>\n    <description>Unused function &lt;code&gt;checkBlobDescriptorClear&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>conn.go</file>\n    <line>586</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/godbus/dbus/conn.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused function inspection</problem_class>\n    <description>Unused function &lt;code&gt;dereferenceAll&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>properties.go</file>\n    <line>707</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/golang/protobuf/proto/properties.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused function inspection</problem_class>\n    <description>Unused function &lt;code&gt;propByIndex&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>time.go</file>\n    <line>173</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/ugorji/go/codec/time.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused function inspection</problem_class>\n    <description>Unused function &lt;code&gt;timeLocUTCName&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>fast-path.generated.go</file>\n    <line>1626</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/ugorji/go/codec/fast-path.generated.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused function inspection</problem_class>\n    <description>Unused function &lt;code&gt;fastpathEncodeTypeSwitchMap&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>json_bytes.go</file>\n    <line>226</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/tinylib/msgp/msgp/json_bytes.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused function inspection</problem_class>\n    <description>Unused function &lt;code&gt;rwFloatBytes&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>errors.go</file>\n    <line>55</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/client/errors.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused function inspection</problem_class>\n    <description>Unused function &lt;code&gt;isDecodeFailedWithErr&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>time.go</file>\n    <line>173</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/hashicorp/go-msgpack/codec/time.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused function inspection</problem_class>\n    <description>Unused function &lt;code&gt;timeLocUTCName&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>helper_internal.go</file>\n    <line>77</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/hashicorp/go-msgpack/codec/helper_internal.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused function inspection</problem_class>\n    <description>Unused function &lt;code&gt;debugf&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>parse.go</file>\n    <line>495</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/BurntSushi/toml/parse.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused function inspection</problem_class>\n    <description>Unused function &lt;code&gt;isStringType&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>encode.go</file>\n    <line>494</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/BurntSushi/toml/encode.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused function inspection</problem_class>\n    <description>Unused function &lt;code&gt;isValidKeyName&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>dispatchers.go</file>\n    <line>38</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/builder/dockerfile/dispatchers.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused function inspection</problem_class>\n    <description>Unused function &lt;code&gt;nullDispatch&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>internals_unix.go</file>\n    <line>10</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/builder/dockerfile/internals_unix.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused function inspection</problem_class>\n    <description>Unused function &lt;code&gt;fixPermissions&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>utils.go</file>\n    <line>12</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/integration-cli/utils.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused function inspection</problem_class>\n    <description>Unused function &lt;code&gt;getExitCode&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>utils.go</file>\n    <line>16</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/integration-cli/utils.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused function inspection</problem_class>\n    <description>Unused function &lt;code&gt;processExitCode&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>utils.go</file>\n    <line>36</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/integration-cli/utils.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused function inspection</problem_class>\n    <description>Unused function &lt;code&gt;runCommandWithOutputAndTimeout&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>docker_utils.go</file>\n    <line>793</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/integration-cli/docker_utils.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused function inspection</problem_class>\n    <description>Unused function &lt;code&gt;dockerCmdInDirWithTimeout&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>docker_utils.go</file>\n    <line>1145</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/integration-cli/docker_utils.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused function inspection</problem_class>\n    <description>Unused function &lt;code&gt;getContainerState&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>docker_cli_nat_test.go</file>\n    <line>45</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/integration-cli/docker_cli_nat_test.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused function inspection</problem_class>\n    <description>Unused function &lt;code&gt;getContainerLogs&lt;/code&gt; #loc</description>\n  </problem>\n  <problem>\n    <file>docker_cli_nat_test.go</file>\n    <line>50</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/integration-cli/docker_cli_nat_test.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused function inspection</problem_class>\n    <description>Unused function &lt;code&gt;getContainerStatus&lt;/code&gt; #loc</description>\n  </problem>\n</problems>"
  },
  {
    "path": "testData/performance/GoUnusedGlobalVariable/expected.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n  ~ Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<problems>\n  <problem>\n    <file>flag.go</file>\n    <line>594</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/mflag/flag.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ShortUsage'</description>\n  </problem>\n  <problem>\n    <file>random.go</file>\n    <line>18</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/random/random.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'Reader'</description>\n  </problem>\n  <problem>\n    <file>copy.go</file>\n    <line>21</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/archive/copy.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrInvalidCopySource'</description>\n  </problem>\n  <problem>\n    <file>archive.go</file>\n    <line>76</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/archive/archive.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrNotImplemented'</description>\n  </problem>\n  <problem>\n    <file>stdcopy.go</file>\n    <line>24</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/stdcopy/stdcopy.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'Stdin'</description>\n  </problem>\n  <problem>\n    <file>discovery.go</file>\n    <line>14</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/discovery/discovery.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrNotImplemented'</description>\n  </problem>\n  <problem>\n    <file>mimetype.go</file>\n    <line>9</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/httputils/mimetype.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'MimeTypes'</description>\n  </problem>\n  <problem>\n    <file>checker.go</file>\n    <line>14</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/integration/checker/checker.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'DeepEquals'</description>\n  </problem>\n  <problem>\n    <file>checker.go</file>\n    <line>15</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/integration/checker/checker.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'Equals'</description>\n  </problem>\n  <problem>\n    <file>checker.go</file>\n    <line>16</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/integration/checker/checker.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorMatches'</description>\n  </problem>\n  <problem>\n    <file>checker.go</file>\n    <line>17</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/integration/checker/checker.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'FitsTypeOf'</description>\n  </problem>\n  <problem>\n    <file>checker.go</file>\n    <line>18</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/integration/checker/checker.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'HasLen'</description>\n  </problem>\n  <problem>\n    <file>checker.go</file>\n    <line>19</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/integration/checker/checker.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'Implements'</description>\n  </problem>\n  <problem>\n    <file>checker.go</file>\n    <line>20</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/integration/checker/checker.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'IsNil'</description>\n  </problem>\n  <problem>\n    <file>checker.go</file>\n    <line>21</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/integration/checker/checker.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'Matches'</description>\n  </problem>\n  <problem>\n    <file>checker.go</file>\n    <line>22</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/integration/checker/checker.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'Not'</description>\n  </problem>\n  <problem>\n    <file>checker.go</file>\n    <line>23</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/integration/checker/checker.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'NotNil'</description>\n  </problem>\n  <problem>\n    <file>checker.go</file>\n    <line>24</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/integration/checker/checker.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'PanicMatches'</description>\n  </problem>\n  <problem>\n    <file>checker.go</file>\n    <line>25</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/pkg/integration/checker/checker.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'Panics'</description>\n  </problem>\n  <problem>\n    <file>hosts_unix.go</file>\n    <line>8</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/opts/hosts_unix.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'DefaultHost'</description>\n  </problem>\n  <problem>\n    <file>names.go</file>\n    <line>9</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/utils/names.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'RestrictedNamePattern'</description>\n  </problem>\n  <problem>\n    <file>logger.go</file>\n    <line>18</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/daemon/logger/logger.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrReadLogsNotSupported'</description>\n  </problem>\n  <problem>\n    <file>driver.go</file>\n    <line>22</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/daemon/execdriver/driver.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrNotRunning'</description>\n  </problem>\n  <problem>\n    <file>driver.go</file>\n    <line>23</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/daemon/execdriver/driver.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrWaitTimeoutReached'</description>\n  </problem>\n  <problem>\n    <file>driver.go</file>\n    <line>24</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/daemon/execdriver/driver.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrDriverAlreadyRegistered'</description>\n  </problem>\n  <problem>\n    <file>driver.go</file>\n    <line>25</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/daemon/execdriver/driver.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrDriverNotFound'</description>\n  </problem>\n  <problem>\n    <file>image.go</file>\n    <line>14</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/image.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeInvalidImageID'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>15</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeNoSuchContainer'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>24</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeUnregisteredContainer'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>33</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeContainerBeingRemoved'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>42</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeUnpauseContainer'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>51</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeAlreadyPaused'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>60</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeNotPaused'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>69</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeImageUnregContainer'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>77</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeEmptyID'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>86</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeLoggingFactory'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>95</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeInitLogger'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>104</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeNotRunning'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>113</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeLinkNotRunning'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>123</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeDeviceInfo'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>132</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeEmptyEndpoint'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>141</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeEmptyNetwork'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>150</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeParsingPort'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>159</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeNoSandbox'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>168</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeNetworkUpdate'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>177</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeNetworkRefresh'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>186</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeHostPort'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>195</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeNetworkConflict'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>204</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeJoinInfo'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>213</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeIPCRunning'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>222</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeNotADir'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>231</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeParseContainer'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>239</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeJoinSelf'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>247</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeJoinRunning'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>256</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeModeNotContainer'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>265</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeRemovingVolume'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>274</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeInvalidNetworkMode'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>283</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeGetGraph'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>292</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeGetLayer'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>301</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodePutLayer'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>310</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeGetLayerMetadata'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>319</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeEmptyConfig'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>328</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeNoSuchImageHash'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>337</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeNoSuchImageTag'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>346</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeMountOverFile'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>355</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeMountSetup'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>364</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeVolumeInvalidMode'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>373</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeVolumeInvalid'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>381</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeVolumeAbs'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>389</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeVolumeName'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>397</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeVolumeFromBlank'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>406</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeVolumeMode'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>415</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeVolumeDup'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>424</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeCantUnpause'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>432</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodePSError'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>441</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeNoPID'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>449</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeBadPID'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>458</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeNoTop'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>467</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeStopped'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>476</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeCantStop'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>485</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeBadCPUFields'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>493</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeBadCPUInt'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>502</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeBadStatFormat'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>510</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeTimedOut'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>519</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeAlreadyRemoving'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>527</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeStartPaused'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>536</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeAlreadyStarted'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>545</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeHostConfigStart'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>554</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeCantStart'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>563</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeCantRestart'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>572</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeEmptyRename'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>581</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeRenameTaken'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>590</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeRenameDelete'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>599</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodePauseError'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>608</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeNeedStream'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>617</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeDanglingOne'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>626</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeImgDelUsed'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>635</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeImgNoParent'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>643</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeExportFailed'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>652</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeExecResize'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>661</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeContainerNotRunning'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>670</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeNoExecID'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>679</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeExecPaused'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>688</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeExecRunning'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>697</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeExecCantRun'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>706</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeExecAttach'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>715</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeExecContainerStopped'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>724</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeDefaultName'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>733</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeNoParent'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>742</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeCantDestroy'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>751</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeRmRunning'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>760</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeRmFailed'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>769</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeRmNotFound'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>778</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeRmState'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>787</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeRmDriverFS'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>796</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeRmInit'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>805</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeRmFS'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>814</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeRmExecDriver'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>823</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeRmVolumeInUse'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>832</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeRmVolume'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>841</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeInvalidCpusetCpus'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>850</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeInvalidCpusetMems'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>859</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeNotAvailableCpusetCpus'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>868</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeNotAvailableCpusetMems'</description>\n  </problem>\n  <problem>\n    <file>daemon.go</file>\n    <line>877</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/daemon.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorVolumeNameTaken'</description>\n  </problem>\n  <problem>\n    <file>server.go</file>\n    <line>12</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/server.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeNewerClientVersion'</description>\n  </problem>\n  <problem>\n    <file>server.go</file>\n    <line>21</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/server.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeOldClientVersion'</description>\n  </problem>\n  <problem>\n    <file>server.go</file>\n    <line>30</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/server.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorNetworkControllerNotEnabled'</description>\n  </problem>\n  <problem>\n    <file>builder.go</file>\n    <line>15</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/builder.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeAtLeastOneArg'</description>\n  </problem>\n  <problem>\n    <file>builder.go</file>\n    <line>24</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/builder.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeExactlyOneArg'</description>\n  </problem>\n  <problem>\n    <file>builder.go</file>\n    <line>33</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/builder.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeAtLeastTwoArgs'</description>\n  </problem>\n  <problem>\n    <file>builder.go</file>\n    <line>42</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/builder.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeTooManyArgs'</description>\n  </problem>\n  <problem>\n    <file>builder.go</file>\n    <line>51</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/builder.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeChainOnBuild'</description>\n  </problem>\n  <problem>\n    <file>builder.go</file>\n    <line>60</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/builder.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeBadOnBuildCmd'</description>\n  </problem>\n  <problem>\n    <file>builder.go</file>\n    <line>69</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/builder.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeMissingFrom'</description>\n  </problem>\n  <problem>\n    <file>builder.go</file>\n    <line>78</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/builder.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeNotOnWindows'</description>\n  </problem>\n  <problem>\n    <file>builder.go</file>\n    <line>87</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/errors/builder.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeVolumeEmpty'</description>\n  </problem>\n  <problem>\n    <file>const.go</file>\n    <line>19</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/agl/ed25519/edwards25519/const.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'A'</description>\n  </problem>\n  <problem>\n    <file>config.go</file>\n    <line>34</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/aws/config.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'DefaultConfig'</description>\n  </problem>\n  <problem>\n    <file>credentials.go</file>\n    <line>67</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/aws/aws-sdk-go/aws/credentials/credentials.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'AnonymousCredentials'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>25</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrError'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>26</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrInternal'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>27</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrPerm'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>31</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrNomem'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>33</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrInterrupt'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>36</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrNotFound'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>37</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrFull'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>39</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrProtocol'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>40</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrEmpty'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>41</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrSchema'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>42</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrTooBig'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>44</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrMismatch'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>45</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrMisuse'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>46</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrNoLFS'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>47</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrAuth'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>48</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrFormat'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>49</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrRange'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>50</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrNotADB'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>76</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrIoErrRead'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>77</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrIoErrShortRead'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>78</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrIoErrWrite'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>79</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrIoErrFsync'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>80</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrIoErrDirFsync'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>81</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrIoErrTruncate'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>82</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrIoErrFstat'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>83</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrIoErrUnlock'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>84</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrIoErrRDlock'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>85</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrIoErrDelete'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>86</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrIoErrBlocked'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>87</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrIoErrNoMem'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>88</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrIoErrAccess'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>89</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrIoErrCheckReservedLock'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>90</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrIoErrLock'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>91</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrIoErrClose'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>92</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrIoErrDirClose'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>93</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrIoErrSHMOpen'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>94</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrIoErrSHMSize'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>95</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrIoErrSHMLock'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>96</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrIoErrSHMMap'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>97</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrIoErrSeek'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>98</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrIoErrDeleteNoent'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>99</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrIoErrMMap'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>100</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrIoErrGetTempPath'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>101</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrIoErrConvPath'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>102</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrLockedSharedCache'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>103</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrBusyRecovery'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>104</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrBusySnapshot'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>105</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrCantOpenNoTempDir'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>106</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrCantOpenIsDir'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>107</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrCantOpenFullPath'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>108</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrCantOpenConvPath'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>109</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrCorruptVTab'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>110</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrReadonlyRecovery'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>111</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrReadonlyCantLock'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>112</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrReadonlyRollback'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>113</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrReadonlyDbMoved'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>114</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrAbortRollback'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>115</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrConstraintCheck'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>116</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrConstraintCommitHook'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>117</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrConstraintForeignKey'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>118</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrConstraintFunction'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>119</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrConstraintNotNull'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>120</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrConstraintPrimaryKey'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>121</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrConstraintTrigger'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>122</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrConstraintUnique'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>123</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrConstraintVTab'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>124</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrConstraintRowId'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>125</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrNoticeRecoverWAL'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>126</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrNoticeRecoverRollback'</description>\n  </problem>\n  <problem>\n    <file>error.go</file>\n    <line>127</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/mattn/go-sqlite3/error.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrWarningAutoIndex'</description>\n  </problem>\n  <problem>\n    <file>errors.go</file>\n    <line>13</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/boltdb/bolt/errors.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrDatabaseOpen'</description>\n  </problem>\n  <problem>\n    <file>client.go</file>\n    <line>40</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/coreos/etcd/client/client.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'DefaultRequestTimeout'</description>\n  </problem>\n  <problem>\n    <file>keys.generated.go</file>\n    <line>25</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/coreos/etcd/client/keys.generated.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'codecSelferBitsize5311'</description>\n  </problem>\n  <problem>\n    <file>store.go</file>\n    <line>25</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libkv/store/store.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrBackendNotSupported'</description>\n  </problem>\n  <problem>\n    <file>store.go</file>\n    <line>27</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libkv/store/store.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrCallNotSupported'</description>\n  </problem>\n  <problem>\n    <file>store.go</file>\n    <line>29</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libkv/store/store.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrNotReachable'</description>\n  </problem>\n  <problem>\n    <file>store.go</file>\n    <line>31</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libkv/store/store.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrCannotLock'</description>\n  </problem>\n  <problem>\n    <file>store.go</file>\n    <line>33</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libkv/store/store.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrKeyModified'</description>\n  </problem>\n  <problem>\n    <file>store.go</file>\n    <line>35</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libkv/store/store.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrKeyNotFound'</description>\n  </problem>\n  <problem>\n    <file>store.go</file>\n    <line>37</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libkv/store/store.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrPreviousNotSpecified'</description>\n  </problem>\n  <problem>\n    <file>client.go</file>\n    <line>61</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/notary/client/client.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrRepositoryNotExist'</description>\n  </problem>\n  <problem>\n    <file>jsonsign.go</file>\n    <line>18</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libtrust/jsonsign.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrInvalidSignContent'</description>\n  </problem>\n  <problem>\n    <file>contract.go</file>\n    <line>32</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/ipamapi/contract.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrInvalidIpamService'</description>\n  </problem>\n  <problem>\n    <file>contract.go</file>\n    <line>33</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/ipamapi/contract.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrInvalidIpamConfigService'</description>\n  </problem>\n  <problem>\n    <file>contract.go</file>\n    <line>34</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/ipamapi/contract.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrIpamNotAvailable'</description>\n  </problem>\n  <problem>\n    <file>contract.go</file>\n    <line>35</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/ipamapi/contract.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrIpamInternalError'</description>\n  </problem>\n  <problem>\n    <file>contract.go</file>\n    <line>36</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/ipamapi/contract.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrInvalidAddressSpace'</description>\n  </problem>\n  <problem>\n    <file>contract.go</file>\n    <line>37</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/ipamapi/contract.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrInvalidPool'</description>\n  </problem>\n  <problem>\n    <file>contract.go</file>\n    <line>38</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/ipamapi/contract.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrInvalidSubPool'</description>\n  </problem>\n  <problem>\n    <file>contract.go</file>\n    <line>39</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/ipamapi/contract.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrInvalidRequest'</description>\n  </problem>\n  <problem>\n    <file>contract.go</file>\n    <line>40</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/ipamapi/contract.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrPoolNotFound'</description>\n  </problem>\n  <problem>\n    <file>contract.go</file>\n    <line>41</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/ipamapi/contract.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrOverlapPool'</description>\n  </problem>\n  <problem>\n    <file>contract.go</file>\n    <line>42</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/ipamapi/contract.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrNoAvailablePool'</description>\n  </problem>\n  <problem>\n    <file>contract.go</file>\n    <line>43</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/ipamapi/contract.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrNoAvailableIPs'</description>\n  </problem>\n  <problem>\n    <file>contract.go</file>\n    <line>44</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/ipamapi/contract.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrIPAlreadyAllocated'</description>\n  </problem>\n  <problem>\n    <file>contract.go</file>\n    <line>45</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/ipamapi/contract.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrIPOutOfRange'</description>\n  </problem>\n  <problem>\n    <file>contract.go</file>\n    <line>46</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/ipamapi/contract.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrPoolOverlap'</description>\n  </problem>\n  <problem>\n    <file>contract.go</file>\n    <line>47</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/ipamapi/contract.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrBadPool'</description>\n  </problem>\n  <problem>\n    <file>labels.go</file>\n    <line>48</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/netlabel/labels.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'GlobalKVProvider'</description>\n  </problem>\n  <problem>\n    <file>labels.go</file>\n    <line>51</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/netlabel/labels.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'GlobalKVProviderURL'</description>\n  </problem>\n  <problem>\n    <file>labels.go</file>\n    <line>54</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/netlabel/labels.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'GlobalKVProviderConfig'</description>\n  </problem>\n  <problem>\n    <file>labels.go</file>\n    <line>57</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/netlabel/labels.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'LocalKVProvider'</description>\n  </problem>\n  <problem>\n    <file>labels.go</file>\n    <line>60</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/netlabel/labels.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'LocalKVProviderURL'</description>\n  </problem>\n  <problem>\n    <file>labels.go</file>\n    <line>63</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/netlabel/labels.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'LocalKVProviderConfig'</description>\n  </problem>\n  <problem>\n    <file>utils.go</file>\n    <line>24</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/netutils/utils.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrNoDefaultRoute'</description>\n  </problem>\n  <problem>\n    <file>datastore.go</file>\n    <line>55</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/datastore/datastore.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrKeyModified'</description>\n  </problem>\n  <problem>\n    <file>utils.go</file>\n    <line>12</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/ipamutils/utils.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'PredefinedGranularNetworks'</description>\n  </problem>\n  <problem>\n    <file>tarsum.go</file>\n    <line>10</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/digest/tarsum.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'TarsumRegexp'</description>\n  </problem>\n  <problem>\n    <file>blobs.go</file>\n    <line>16</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/blobs.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrBlobExists'</description>\n  </problem>\n  <problem>\n    <file>blobs.go</file>\n    <line>19</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/blobs.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrBlobDigestUnsupported'</description>\n  </problem>\n  <problem>\n    <file>blobs.go</file>\n    <line>22</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/blobs.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrBlobUnknown'</description>\n  </problem>\n  <problem>\n    <file>blobs.go</file>\n    <line>25</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/blobs.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrBlobUploadUnknown'</description>\n  </problem>\n  <problem>\n    <file>blobs.go</file>\n    <line>29</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/blobs.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrBlobInvalidLength'</description>\n  </problem>\n  <problem>\n    <file>blobs.go</file>\n    <line>32</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/blobs.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrUnsupported'</description>\n  </problem>\n  <problem>\n    <file>names.go</file>\n    <line>49</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/registry/api/v2/names.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'TagNameAnchoredRegexp'</description>\n  </problem>\n  <problem>\n    <file>errors.go</file>\n    <line>13</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/registry/api/v2/errors.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeUnsupported'</description>\n  </problem>\n  <problem>\n    <file>errors.go</file>\n    <line>44</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/registry/api/v2/errors.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeSizeInvalid'</description>\n  </problem>\n  <problem>\n    <file>errors.go</file>\n    <line>116</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/registry/api/v2/errors.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorCodeManifestBlobUnknown'</description>\n  </problem>\n  <problem>\n    <file>routes.go</file>\n    <line>17</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/registry/api/v2/routes.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'allEndpoints'</description>\n  </problem>\n  <problem>\n    <file>descriptors.go</file>\n    <line>196</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/registry/api/v2/descriptors.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'APIDescriptor'</description>\n  </problem>\n  <problem>\n    <file>registry.go</file>\n    <line>23</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/distribution/registry.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'GlobalScope'</description>\n  </problem>\n  <problem>\n    <file>call.go</file>\n    <line>26</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/godbus/dbus/call.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'errSignature'</description>\n  </problem>\n  <problem>\n    <file>dbus.go</file>\n    <line>12</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/godbus/dbus/dbus.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'uint8Type'</description>\n  </problem>\n  <problem>\n    <file>rpc.go</file>\n    <line>170</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/ugorji/go/codec/rpc.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'GoRpc'</description>\n  </problem>\n  <problem>\n    <file>helper.go</file>\n    <line>233</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/ugorji/go/codec/helper.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'bsAll0x00'</description>\n  </problem>\n  <problem>\n    <file>msgpack.go</file>\n    <line>832</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/ugorji/go/codec/msgpack.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'MsgpackSpecRpc'</description>\n  </problem>\n  <problem>\n    <file>write.go</file>\n    <line>33</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/tinylib/msgp/msgp/write.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'Nowhere'</description>\n  </problem>\n  <problem>\n    <file>checkers.go</file>\n    <line>109</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/go-check/check/checkers.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'IsNil'</description>\n  </problem>\n  <problem>\n    <file>checkers.go</file>\n    <line>145</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/go-check/check/checkers.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'NotNil'</description>\n  </problem>\n  <problem>\n    <file>checkers.go</file>\n    <line>167</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/go-check/check/checkers.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'Equals'</description>\n  </problem>\n  <problem>\n    <file>checkers.go</file>\n    <line>198</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/go-check/check/checkers.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'DeepEquals'</description>\n  </problem>\n  <problem>\n    <file>checkers.go</file>\n    <line>223</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/go-check/check/checkers.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'HasLen'</description>\n  </problem>\n  <problem>\n    <file>checkers.go</file>\n    <line>255</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/go-check/check/checkers.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrorMatches'</description>\n  </problem>\n  <problem>\n    <file>checkers.go</file>\n    <line>287</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/go-check/check/checkers.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'Matches'</description>\n  </problem>\n  <problem>\n    <file>checkers.go</file>\n    <line>331</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/go-check/check/checkers.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'Panics'</description>\n  </problem>\n  <problem>\n    <file>checkers.go</file>\n    <line>366</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/go-check/check/checkers.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'PanicMatches'</description>\n  </problem>\n  <problem>\n    <file>checkers.go</file>\n    <line>412</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/go-check/check/checkers.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'FitsTypeOf'</description>\n  </problem>\n  <problem>\n    <file>checkers.go</file>\n    <line>444</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/go-check/check/checkers.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'Implements'</description>\n  </problem>\n  <problem>\n    <file>db.go</file>\n    <line>10</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/keys/db.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrWrongType'</description>\n  </problem>\n  <problem>\n    <file>db.go</file>\n    <line>11</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/keys/db.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrExists'</description>\n  </problem>\n  <problem>\n    <file>db.go</file>\n    <line>12</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/keys/db.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrWrongID'</description>\n  </problem>\n  <problem>\n    <file>db.go</file>\n    <line>13</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/keys/db.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrInvalidKey'</description>\n  </problem>\n  <problem>\n    <file>errors.go</file>\n    <line>9</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/client/errors.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrNoRootKeys'</description>\n  </problem>\n  <problem>\n    <file>errors.go</file>\n    <line>10</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/client/errors.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrInsufficientKeys'</description>\n  </problem>\n  <problem>\n    <file>errors.go</file>\n    <line>9</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/errors/errors.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrInitNotAllowed'</description>\n  </problem>\n  <problem>\n    <file>verify.go</file>\n    <line>15</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/signed/verify.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrMissingKey'</description>\n  </problem>\n  <problem>\n    <file>verify.go</file>\n    <line>18</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/signed/verify.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrWrongMethod'</description>\n  </problem>\n  <problem>\n    <file>rpc.go</file>\n    <line>142</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/hashicorp/go-msgpack/codec/rpc.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'GoRpc'</description>\n  </problem>\n  <problem>\n    <file>helper.go</file>\n    <line>131</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/hashicorp/go-msgpack/codec/helper.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'boolSliceTypId'</description>\n  </problem>\n  <problem>\n    <file>helper.go</file>\n    <line>132</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/hashicorp/go-msgpack/codec/helper.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'uintSliceTypId'</description>\n  </problem>\n  <problem>\n    <file>helper.go</file>\n    <line>134</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/hashicorp/go-msgpack/codec/helper.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'uint16SliceTypId'</description>\n  </problem>\n  <problem>\n    <file>helper.go</file>\n    <line>135</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/hashicorp/go-msgpack/codec/helper.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'uint32SliceTypId'</description>\n  </problem>\n  <problem>\n    <file>helper.go</file>\n    <line>137</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/hashicorp/go-msgpack/codec/helper.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'intSliceTypId'</description>\n  </problem>\n  <problem>\n    <file>helper.go</file>\n    <line>138</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/hashicorp/go-msgpack/codec/helper.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'int8SliceTypId'</description>\n  </problem>\n  <problem>\n    <file>helper.go</file>\n    <line>139</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/hashicorp/go-msgpack/codec/helper.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'int16SliceTypId'</description>\n  </problem>\n  <problem>\n    <file>helper.go</file>\n    <line>140</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/hashicorp/go-msgpack/codec/helper.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'int32SliceTypId'</description>\n  </problem>\n  <problem>\n    <file>helper.go</file>\n    <line>142</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/hashicorp/go-msgpack/codec/helper.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'float32SliceTypId'</description>\n  </problem>\n  <problem>\n    <file>helper.go</file>\n    <line>143</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/hashicorp/go-msgpack/codec/helper.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'float64SliceTypId'</description>\n  </problem>\n  <problem>\n    <file>helper.go</file>\n    <line>148</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/hashicorp/go-msgpack/codec/helper.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'mapIntIntfTypId'</description>\n  </problem>\n  <problem>\n    <file>helper.go</file>\n    <line>150</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/hashicorp/go-msgpack/codec/helper.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'mapUintIntfTypId'</description>\n  </problem>\n  <problem>\n    <file>helper.go</file>\n    <line>155</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/hashicorp/go-msgpack/codec/helper.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'binaryMarshalerTypId'</description>\n  </problem>\n  <problem>\n    <file>helper.go</file>\n    <line>156</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/hashicorp/go-msgpack/codec/helper.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'binaryUnmarshalerTypId'</description>\n  </problem>\n  <problem>\n    <file>helper.go</file>\n    <line>161</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/hashicorp/go-msgpack/codec/helper.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'bsAll0x00'</description>\n  </problem>\n  <problem>\n    <file>msgpack.go</file>\n    <line>805</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/hashicorp/go-msgpack/codec/msgpack.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'MsgpackSpecRpc'</description>\n  </problem>\n  <problem>\n    <file>hcsshim.go</file>\n    <line>89</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/microsoft/hcsshim/hcsshim.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'temp'</description>\n  </problem>\n  <problem>\n    <file>encode.go</file>\n    <line>30</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/BurntSushi/toml/encode.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'errAnything'</description>\n  </problem>\n  <problem>\n    <file>hybi.go</file>\n    <line>45</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/golang.org/x/net/websocket/hybi.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrBadPongMessage'</description>\n  </problem>\n  <problem>\n    <file>hybi.go</file>\n    <line>46</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/golang.org/x/net/websocket/hybi.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrBadClosingStatus'</description>\n  </problem>\n  <problem>\n    <file>websocket.go</file>\n    <line>54</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/golang.org/x/net/websocket/websocket.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrBadFrame'</description>\n  </problem>\n  <problem>\n    <file>websocket.go</file>\n    <line>55</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/golang.org/x/net/websocket/websocket.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrBadFrameBoundary'</description>\n  </problem>\n  <problem>\n    <file>websocket.go</file>\n    <line>382</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/golang.org/x/net/websocket/websocket.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'Message'</description>\n  </problem>\n  <problem>\n    <file>websocket.go</file>\n    <line>412</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/golang.org/x/net/websocket/websocket.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'JSON'</description>\n  </problem>\n  <problem>\n    <file>command.go</file>\n    <line>25</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/builder/dockerfile/command/command.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'Commands'</description>\n  </problem>\n  <problem>\n    <file>parse.go</file>\n    <line>23</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/runconfig/parse.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrConflictSharedNetwork'</description>\n  </problem>\n  <problem>\n    <file>parse.go</file>\n    <line>25</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/runconfig/parse.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrConflictHostNetwork'</description>\n  </problem>\n  <problem>\n    <file>parse.go</file>\n    <line>27</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/runconfig/parse.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'ErrConflictNoNetwork'</description>\n  </problem>\n  <problem>\n    <file>requirements.go</file>\n    <line>120</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/integration-cli/requirements.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'NotOverlay'</description>\n  </problem>\n  <problem>\n    <file>docker_test_vars.go</file>\n    <line>17</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/integration-cli/docker_test_vars.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'registryImageName'</description>\n  </problem>\n  <problem>\n    <file>docker_test_vars.go</file>\n    <line>39</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/integration-cli/docker_test_vars.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused global variable inspection</problem_class>\n    <description>Unused variable 'daemonDefaultImage'</description>\n  </problem>\n</problems>\n"
  },
  {
    "path": "testData/performance/GoUnusedImport/expected.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n  ~ Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<problems>\n  <problem>\n    <file>consul.go</file>\n    <line>13</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libkv/store/consul/consul.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused import inspection</problem_class>\n    <description>Redundant alias</description>\n  </problem>\n  <problem>\n    <file>zookeeper.go</file>\n    <line>9</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libkv/store/zookeeper/zookeeper.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused import inspection</problem_class>\n    <description>Redundant alias</description>\n  </problem>\n  <problem>\n    <file>dbstore.go</file>\n    <line>11</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/endophage/gotuf/store/dbstore.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused import inspection</problem_class>\n    <description>Redundant alias</description>\n  </problem>\n  <problem>\n    <file>criurpc.pb.go</file>\n    <line>27</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/opencontainers/runc/libcontainer/criurpc/criurpc.pb.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused import inspection</problem_class>\n    <description>Redundant alias</description>\n  </problem>\n  <problem>\n    <file>criurpc.pb.go</file>\n    <line>28</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/opencontainers/runc/libcontainer/criurpc/criurpc.pb.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"NOT_USED_ELEMENT_ATTRIBUTES\">Unused import inspection</problem_class>\n    <description>Redundant alias</description>\n  </problem>\n</problems>\n\n"
  },
  {
    "path": "testData/performance/GoUnusedVariable/expected.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n  ~ Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<problems>\n  <problem>\n    <file>firewalld.go</file>\n    <line>128</line>\n    <module>light_idea_test_case</module>\n    <entry_point TYPE=\"file\" FQNAME=\"temp:///src/docker/vendor/src/github.com/docker/libnetwork/iptables/firewalld.go\"/>\n    <problem_class severity=\"WARNING\" attribute_key=\"WARNING_ATTRIBUTES\">Unused variable inspection</problem_class>\n    <description>Unused variable 'pf'</description>\n  </problem>\n</problems>\n\n"
  },
  {
    "path": "testData/performance/performanceA.go",
    "content": "package main\n\n//var a int = 1\n\nfunc main() {\n\ta := 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\tprint(a)\n}\n"
  },
  {
    "path": "testData/performance/performanceA2.go",
    "content": "package main\n\nvar a int = 1\n\nfunc main() {\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\ta = 1\n\tprint(a)\n}\n"
  },
  {
    "path": "testData/psi/importDeclaration/addImportBeforeFunction.go",
    "content": "package test\n\nimport \"test\"\n\nfunc hello() string {\n  return \"hello\"\n}"
  },
  {
    "path": "testData/psi/importDeclaration/addImportBeforeFunction_after.go",
    "content": "package test\n\nimport (\n\t\"test\"\n\t\"package/path\"\n)\n\nfunc hello() string {\n  return \"hello\"\n}"
  },
  {
    "path": "testData/psi/importDeclaration/addImportToEmptyList.go",
    "content": "package test"
  },
  {
    "path": "testData/psi/importDeclaration/addImportToEmptyListBeforeFunction.go",
    "content": "package test\n\nfunc hello() string {\n  return \"hello\"\n}"
  },
  {
    "path": "testData/psi/importDeclaration/addImportToEmptyListBeforeFunction_after.go",
    "content": "package test\n\nimport \"package/path\"\n\nfunc hello() string {\n  return \"hello\"\n}"
  },
  {
    "path": "testData/psi/importDeclaration/addImportToEmptyList_after.go",
    "content": "package test\n\nimport \"package/path\"\n"
  },
  {
    "path": "testData/psi/importDeclaration/addImportToListWithMultiSpecDeclaration.go",
    "content": "package test\n\nimport ( \"test\"\n\"test2\")"
  },
  {
    "path": "testData/psi/importDeclaration/addImportToListWithMultiSpecDeclaration_after.go",
    "content": "package test\n\nimport ( \"test\"\n\"test2\"\n\t\"package/path\"\n)"
  },
  {
    "path": "testData/psi/importDeclaration/addImportToListWithSingleSpecDeclaration.go",
    "content": "package test\n\nimport \"test\""
  },
  {
    "path": "testData/psi/importDeclaration/addImportToListWithSingleSpecDeclarationWithParens.go",
    "content": "package test\n\nimport ( \"test\" )"
  },
  {
    "path": "testData/psi/importDeclaration/addImportToListWithSingleSpecDeclarationWithParens_after.go",
    "content": "package test\n\nimport ( \"test\"\n\t\"package/path\"\n)"
  },
  {
    "path": "testData/psi/importDeclaration/addImportToListWithSingleSpecDeclaration_after.go",
    "content": "package test\n\nimport (\n\t\"test\"\n\t\"package/path\"\n)"
  },
  {
    "path": "testData/psi/importDeclaration/doNotModifyCImport_1.go",
    "content": "package test\n\n/*\n#cgo LDFLAGS: -L${SRCDIR}/libs -lopus\n\n#include \"include/opus.h\"\n */\nimport \"C\"\n\nfunc hello() string {\n  return \"hello\"\n}"
  },
  {
    "path": "testData/psi/importDeclaration/doNotModifyCImport_1_after.go",
    "content": "package test\n\n/*\n#cgo LDFLAGS: -L${SRCDIR}/libs -lopus\n\n#include \"include/opus.h\"\n */\nimport \"C\"\nimport \"package/path\"\n\nfunc hello() string {\n  return \"hello\"\n}"
  },
  {
    "path": "testData/psi/importDeclaration/doNotModifyCImport_2.go",
    "content": "package test\n\nimport \"test\"\n/*\n#cgo LDFLAGS: -L${SRCDIR}/libs -lopus\n\n#include \"include/opus.h\"\n */\nimport \"C\"\n\nfunc hello() string {\n  return \"hello\"\n}"
  },
  {
    "path": "testData/psi/importDeclaration/doNotModifyCImport_2_after.go",
    "content": "package test\n\nimport (\n\t\"test\"\n\t\"package/path\"\n)\n/*\n#cgo LDFLAGS: -L${SRCDIR}/libs -lopus\n\n#include \"include/opus.h\"\n */\nimport \"C\"\n\nfunc hello() string {\n  return \"hello\"\n}"
  },
  {
    "path": "testData/psi/importDeclaration/invalidImport.go",
    "content": "package main;\n\nimport <caret>\n\nfunc main() {\n\tvendorpackage.Hello()\n}"
  },
  {
    "path": "testData/psi/importDeclaration/invalidImport2.go",
    "content": "package main\n\nimport (\n\"fmt2\"\n\"fe<caret>\n\nfunc main() {\n\tfmt.Println(\"\")\n}"
  },
  {
    "path": "testData/psi/importDeclaration/invalidImport2_after.go",
    "content": "package main\n\nimport (\n\t\"fmt2\"\n\t\"fe\"\n\t\"package/path\"\n)\n\nfunc main() {\n\tfmt.Println(\"\")\n}"
  },
  {
    "path": "testData/psi/importDeclaration/invalidImport_after.go",
    "content": "package main;\n\nimport\nimport \"package/path\"\n\nfunc main() {\n\tvendorpackage.Hello()\n}"
  },
  {
    "path": "testData/psi/resolve/builtin/BuiltinConversion.go",
    "content": "package main\n\nvar a = /*ref*/int(3)\n"
  },
  {
    "path": "testData/psi/resolve/builtin/BuiltinTypes.go",
    "content": "package main\n\ntype A /*ref*/int\n"
  },
  {
    "path": "testData/psi/resolve/builtin/MethodName.go",
    "content": "package main\n\nfunc F() {\n    /*ref*/len()\n}\n"
  },
  {
    "path": "testData/psi/resolve/builtin/ParameterType.go",
    "content": "package main\n\nfunc F(a /*ref*/rune) {\n}\n"
  },
  {
    "path": "testData/psi/resolve/builtin/VarBuiltinType.go",
    "content": "package main\n\nvar x /*ref*/int\n"
  },
  {
    "path": "testData/psi/resolve/builtin/VarMethodType.go",
    "content": "package main\n\nfunc F() {\n    var x /*ref*/float32\n}\n"
  },
  {
    "path": "testData/psi/resolve/calls/CallFromTestToMethodDefinedInTestFile/main2_test.go",
    "content": "package main\n\ntype T struct {\n\n}\n\nfunc f() {\n    r := T()\n    x := r./*ref*/TestMethod()\n}\n"
  },
  {
    "path": "testData/psi/resolve/calls/CallFromTestToMethodDefinedInTestFile/main_test.go",
    "content": "package main\n\nfunc (t *T) /*def*/TestMethod() {\n\n}\n"
  },
  {
    "path": "testData/psi/resolve/calls/CallToDifferentBuildTargetFiles/disabledFile.go",
    "content": "// +build disabled\n\npackage main\n\nfunc function() string {\n  return \"Hello\"\n}"
  },
  {
    "path": "testData/psi/resolve/calls/CallToDifferentBuildTargetFiles/enabledFile.go",
    "content": "// +build enabled\n\npackage main\n\nfunc /*def*/function() string {\n  return \"Hello\"\n}"
  },
  {
    "path": "testData/psi/resolve/calls/CallToDifferentBuildTargetFiles/main.go",
    "content": "package main\n\nfunc main() {\n  println(/*ref*/function())\n}"
  },
  {
    "path": "testData/psi/resolve/calls/CallToEmbeddedInterfaceMethod.go",
    "content": "package main\n\ntype Bird interface {\n\t/*def*/Fly()\n}\n\ntype Swan interface {\n\tBird\n\tSwim()\n}\n\nfunc Play(x Swan) {\n\tx./*ref*/Fly()\n}\n"
  },
  {
    "path": "testData/psi/resolve/calls/CallToFunctionLiteral.go",
    "content": "package main\n\nfunc main() {\n\tvar /*def*/good1 = func(s string) {\n\t}\n\n\t/*ref*/good1(\"Hello, world!\\n\")\n}\n"
  },
  {
    "path": "testData/psi/resolve/calls/CallToFunctionVariable.go",
    "content": "package main\n\nfunc Foo() int {\n    return 5\n}\n\nfunc main() {\n    /*def*/f := Foo\n    println(Foo(), /*ref*/f())\n}\n"
  },
  {
    "path": "testData/psi/resolve/calls/CallToFunctionWithSameNameAsMethod.go",
    "content": "package main\n\ntype T int\n\nfunc /*def*/F() {\n\n}\n\nfunc (T) F() {\n\n}\n\nfunc main() {\n\t/*ref*/F()\n}\n"
  },
  {
    "path": "testData/psi/resolve/calls/CallToFunctionWithSameNameAsMethodAcrossPackages/main.go",
    "content": "package main\n\nimport \"p1\"\n\nfunc main() {\n    p1./*ref*/F()\n}\n"
  },
  {
    "path": "testData/psi/resolve/calls/CallToFunctionWithSameNameAsMethodAcrossPackages/p1/p1.go",
    "content": "package p1\n\ntype T int\n\nfunc /*def*/F() {\n\n}\n\nfunc (T) F() {\n\n}\n"
  },
  {
    "path": "testData/psi/resolve/calls/CallToLocalFunction.go",
    "content": "package main\n\nfunc /*def*/f() {\n}\n\nfunc main() {\n    /*ref*/f()\n}\n"
  },
  {
    "path": "testData/psi/resolve/calls/CallToLocalInterfaceMethod.go",
    "content": "package main\n\ntype T interface {\n    /*def*/Method1()\n}\n\nfunc main() {\n    var x T\n    x./*ref*/Method1()\n}\n"
  },
  {
    "path": "testData/psi/resolve/calls/CallToLocalInterfaceMethodNested.go",
    "content": "package main\n\ntype T interface {\n    Method1() T\n    /*def*/Method2()\n}\n\nfunc main() {\n    var x T\n    x.Method1()./*ref*/Method2()\n}\n"
  },
  {
    "path": "testData/psi/resolve/calls/CallToLocalInterfaceMethodViaMap.go",
    "content": "package main\n\ntype T interface {\n    Method1() T\n    /*def*/Method2()\n}\n\nfunc main() {\n    var x map[int]T\n    x[1].Method1()./*ref*/Method2()\n}\n"
  },
  {
    "path": "testData/psi/resolve/calls/CallToLocalInterfaceMethodViaSlice.go",
    "content": "package main\n\ntype T interface {\n    Method1() T\n    /*def*/Method2()\n}\n\nfunc main() {\n    var x []T\n    x[1].Method1()./*ref*/Method2()\n}\n"
  },
  {
    "path": "testData/psi/resolve/calls/CallToLocalInterfaceMethodViaTypeAssert.go",
    "content": "package main\n\ntype T interface {\n    Method1() T\n    /*def*/Method2()\n}\n\nfunc main() {\n    x.(T).Method1()./*ref*/Method2()\n}\n"
  },
  {
    "path": "testData/psi/resolve/calls/CallToLocalMethod.go",
    "content": "package main\n\ntype T int\n\nfunc (t T) /*def*/Fyy() {\n}\n\nfunc main() {\n    var x T\n    x./*ref*/Fyy()\n}\n"
  },
  {
    "path": "testData/psi/resolve/calls/CallToLocalMethodByPointer.go",
    "content": "package main\n\ntype T int\n\nfunc (t *T) /*def*/Fyy() {\n}\n\nfunc main() {\n    var x *T\n    x./*ref*/Fyy()\n}\n"
  },
  {
    "path": "testData/psi/resolve/calls/CallToLocalMethodNested.go",
    "content": "package main\n\ntype T int\n\nfunc (t T) /*def*/F1() {\n}\n\nfunc (t T) F2() T {\n}\n\nfunc main() {\n    var x T\n    x.F2()./*ref*/F1()\n}\n"
  },
  {
    "path": "testData/psi/resolve/calls/CallToLocalMethodViaMap.go",
    "content": "package main\n\ntype T int\n\nfunc (t T) /*def*/F1() {\n}\n\nfunc (t T) F2() T {\n}\n\nfunc main() {\n    var x map[int]T\n    x[1].F2()./*ref*/F1()\n}\n"
  },
  {
    "path": "testData/psi/resolve/calls/CallToLocalMethodViaShortVarDeclaration.go",
    "content": "package main\n\ntype T int\n\nfunc (t T) /*def*/F1() {\n}\n\nfunc (t T) F2() T {\n}\n\nfunc main() {\n    x := t.(T)\n    x.F2()./*ref*/F1()\n}\n"
  },
  {
    "path": "testData/psi/resolve/calls/CallToLocalMethodViaSlice.go",
    "content": "package main\n\ntype T int\n\nfunc (t T) /*def*/F1() {\n}\n\nfunc (t T) F2() T {\n}\n\nfunc _(x map[int]T) {\n    x[1].F2()./*ref*/F1()\n}\n\nfunc main() {\n\n}\n"
  },
  {
    "path": "testData/psi/resolve/calls/CallToLocalMethodViaTypeAssert.go",
    "content": "package main\n\ntype T int\n\nfunc (t T) /*def*/F1() {\n}\n\nfunc (t T) F2() T {\n}\n\nfunc main() {\n    x.(T).F2()./*ref*/F1()\n}\n"
  },
  {
    "path": "testData/psi/resolve/calls/CallToMethodDefinedInTestFile/main.go",
    "content": "package main\n\ntype T struct {\n\n}\n\nfunc f() {\n    r := T()\n    x := r./*no ref*/TestMethod()\n}\n"
  },
  {
    "path": "testData/psi/resolve/calls/CallToMethodDefinedInTestFile/main_test.go",
    "content": "package main\n\nfunc (t *T) /*def*/TestMethod() {\n\n}\n"
  },
  {
    "path": "testData/psi/resolve/calls/CallToMethodParameter.go",
    "content": "package main\nfunc F(/*def*/n func()) {\n    /*ref*/n()    // <-- first place\n}\n"
  },
  {
    "path": "testData/psi/resolve/calls/CallToMethodViaShortVar/main.go",
    "content": "package main\n\nimport \"test\"\n\nfunc f() {\n    r := test.Method()\n    x := r./*ref*/ActualMethod()\n}\n"
  },
  {
    "path": "testData/psi/resolve/calls/CallToMethodViaShortVar/test/test.go",
    "content": "package test\n\ntype T struct {\n\n}\n\nfunc Method() *T {\n    return nil\n}\n\nfunc (t *T) /*def*/ActualMethod() {\n\n}\n"
  },
  {
    "path": "testData/psi/resolve/calls/CallToMethodWithTheSameNameAsFunction.go",
    "content": "package main\n\ntype T int\n\nfunc F() {\n\n}\n\nfunc (T) /*def*/F() {\n\n}\n\nfunc main() {\n\tT(1)./*ref*/F()\n}\n"
  },
  {
    "path": "testData/psi/resolve/calls/CallToMethodWithTheSameNameAsFunctionAcrossPackages/main.go",
    "content": "package main\n\nimport \"p1\"\n\nfunc main() {\n    p1.T(1)./*ref*/F()\n}\n"
  },
  {
    "path": "testData/psi/resolve/calls/CallToMethodWithTheSameNameAsFunctionAcrossPackages/p1/p1.go",
    "content": "package p1\n\ntype T int\n\nfunc F() {\n\n}\n\nfunc (T) /*def*/F() {\n\n}\n"
  },
  {
    "path": "testData/psi/resolve/calls/ConversionToImportedFunction/main.go",
    "content": "package main\n\nimport \"test\"\n\nfunc main() {\n    println(test./*ref*/Func(10))\n}\n"
  },
  {
    "path": "testData/psi/resolve/calls/ConversionToImportedFunction/test/test.go",
    "content": "package test\n\nfunc /*def*/Func() {\n\n}\n"
  },
  {
    "path": "testData/psi/resolve/calls/ConversionToImportedType/main.go",
    "content": "package main\n\nimport \"test\"\n\nfunc main() {\n    println(test./*ref*/Type(10))\n}\n"
  },
  {
    "path": "testData/psi/resolve/calls/ConversionToImportedType/test/test.go",
    "content": "package test\n\ntype /*def*/Type int\n"
  },
  {
    "path": "testData/psi/resolve/calls/ConversionToLocallyImportedType/main.go",
    "content": "package main\n\nimport . \"test\"\n\nfunc main() {\n    println(/*ref*/Type(10))\n}\n"
  },
  {
    "path": "testData/psi/resolve/calls/ConversionToLocallyImportedType/test/test.go",
    "content": "package test\n\ntype /*def*/Type int\n"
  },
  {
    "path": "testData/psi/resolve/calls/DirectlyInheritedMethodSet.go",
    "content": "package main\n\ntype Common struct {\n}\n\ntype Derived struct {\n\tCommon\n\tderivedMember int\n}\n\nfunc (c*Common) /*def*/commonMethod() {\n\n}\n\nfunc (c*Derived) derivedMethod() {\n\n}\n\nfunc f() {\n\tvar x Derived\n\n\tx./*ref*/commonMethod();\n}\n"
  },
  {
    "path": "testData/psi/resolve/calls/FunctionInSamePackageDifferentFile/callee.go",
    "content": "package bananarama;\n\nfunc /*def*/Call() {\n\n}\n"
  },
  {
    "path": "testData/psi/resolve/calls/FunctionInSamePackageDifferentFile/caller.go",
    "content": "package bananarama;\n\nfunc main() {\n    /*ref*/Call();\n}\n"
  },
  {
    "path": "testData/psi/resolve/calls/GrandParentDirectlyInheritedMethodSet.go",
    "content": "package main\n\ntype MoreCommon struct {\n}\n\ntype Common struct {\n\tMoreCommon\n}\n\ntype Derived struct {\n\tCommon\n\tderivedMember int\n}\n\nfunc (c*MoreCommon) /*def*/moreCommonMethod() {\n\n}\n\nfunc (c*Common) commonMethod() {\n\n}\n\nfunc (c*Derived) derivedMethod() {\n\n}\n\nfunc f() {\n\tvar x Derived\n\n\tx./*ref*/moreCommonMethod();\n}\n"
  },
  {
    "path": "testData/psi/resolve/calls/ImportedEmbeddedTypeMethod/main.go",
    "content": "package main\n\nimport \"p\"\n\ntype SomeOtherFoo struct {\n    p.Embedded\n}\n\nfunc (s SomeOtherFoo) GetThing() string {\n    return \"\"\n}\n\ntype Foo struct {\n    SomeOtherFoo\n}\n\nfunc test() {\n    x := Foo{}\n    x./*ref*/Get(\"asdf\")\n}\n\nfunc main() {\n\n}\n"
  },
  {
    "path": "testData/psi/resolve/calls/ImportedEmbeddedTypeMethod/p/p.go",
    "content": "package p\n\ntype Embedded struct {\n}\n\nfunc (s Embedded) /*def*/Get(string) string {\n    return \"\"\n}\n"
  },
  {
    "path": "testData/psi/resolve/calls/NoConversionToBlankImportedType/main.go",
    "content": "package main\n\nimport _ \"test\"\n\nfunc main() {\n    println(/*no ref*/Type(10))\n}\n"
  },
  {
    "path": "testData/psi/resolve/calls/NoConversionToBlankImportedType/test/test.go",
    "content": "package test\n\ntype Type int\n"
  },
  {
    "path": "testData/psi/resolve/calls/RecursiveMethodCall.go",
    "content": "package main\n\nfunc /*def*/F(n int) int {\n    if n <= 1 {\n        return 1\n    }\n    return n * /*ref*/F(n-1)\n}\n"
  },
  {
    "path": "testData/psi/resolve/calls/RelativePackageReference/main/main.go",
    "content": "package main\n\nimport \"../test2\"\n\nfunc main() {\n\tx := test2./*ref*/Exported\n}\n"
  },
  {
    "path": "testData/psi/resolve/calls/RelativePackageReference/test2/test2.go",
    "content": "package test2\n\nvar /*def*/Exported = 10\n"
  },
  {
    "path": "testData/psi/resolve/calls/RelativePackageReferenceDeep/level1/level2/level2.go",
    "content": "package level2\n\nvar /*def*/Exported = 10\n"
  },
  {
    "path": "testData/psi/resolve/calls/RelativePackageReferenceDeep/level1/main/main.go",
    "content": "package main\n\nimport \"../../level1/level2\"\n\nfunc main() {\n\tx := level2./*ref*/Exported\n}\n"
  },
  {
    "path": "testData/psi/resolve/calls/TypeConversionToLocalType.go",
    "content": "package main\n\ntype /*def*/f int\n\nfunc ff() {\n}\n\nfunc main() {\n    /*ref*/f()\n}\n"
  },
  {
    "path": "testData/psi/resolve/composite/ExpressionKey.go",
    "content": "package main\n\ntype error interface {\n\tError() string\n}\n\ntype scanError struct {\n\terr error\n}\n\nfunc (s *ss) error(/*def*/err error) {\n\tpanic(scanError{/*ref*/err})\n}\n"
  },
  {
    "path": "testData/psi/resolve/composite/KeyAsConstantExpression.go",
    "content": "package main\n\nconst /*def*/MyConstant = \"Hello\"\n\ntype MyMap map[string]int\n\nvar MyVar = MyMap{\n    /*ref*/MyConstant:10,\n}\n\n"
  },
  {
    "path": "testData/psi/resolve/composite/NestedNamedStruct.go",
    "content": "package main\n\nimport \"fmt\"\n\ntype T struct {\n    /*def*/a, b int\n}\n\ntype T2 struct {\n    a, b int\n    c []T\n}\n\nvar x = T2{ c:[]T{{/*ref*/a:1, b:2}} }\n\nfunc main() {\n    fmt.Println(x)\n}"
  },
  {
    "path": "testData/psi/resolve/composite/NestedStruct.go",
    "content": "package main\n\ntype T struct {\n    /*def*/a, b int\n}\n\ntype T2 struct {\n    a, b int\n    c T\n}\n\nvar x = T2{ c:T{/*ref*/a:1, b:2} }\n\n\n"
  },
  {
    "path": "testData/psi/resolve/composite/PromotedAnonymousField1.go",
    "content": "package main\n\ntype T1 struct {\n\t/*def*/intValue int\n}\n\ntype T2 struct {\n\tT1\n}\n\nfunc foo(t2 T2) {\n    t2./*ref*/intValue\n}\n"
  },
  {
    "path": "testData/psi/resolve/composite/PromotedAnonymousField2.go",
    "content": "package main\n\ntype T1 struct {\n\t/*def*/t1Value int\n}\n\ntype T2 struct {\n\tT1\n}\n\ntype T3 struct {\n\tT2\n}\n\ntype T4 struct {\n\tT3\n}\n\nfunc foo(t4 T4) {\n    t4./*ref*/t1Value\n}\n"
  },
  {
    "path": "testData/psi/resolve/composite/PromotedAnonymousField3.go",
    "content": "package main\n\ntype T1 struct {\n\tvalue int\n}\n\ntype T2 struct {\n\tT1\n\t/*def*/value int\n}\n\ntype T3 struct {\n\tT2\n}\n\ntype T4 struct {\n\tT3\n}\n\nfunc foo(t4 T4) {\n    t4./*ref*/value\n}\n"
  },
  {
    "path": "testData/psi/resolve/composite/PromotedAnonymousField4.go",
    "content": "package main\n\ntype T1 struct {\n\tvalue int\n}\n\ntype T2 struct {\n\tT1\n}\n\ntype T3 struct {\n\t/*def*/T2\n}\n\ntype T4 struct {\n\tT3\n}\n\nfunc foo(t4 T4) {\n    t4./*ref*/T2\n}\n"
  },
  {
    "path": "testData/psi/resolve/composite/TypeName.go",
    "content": "package main\n\ntype T struct {\n    /*def*/a, b int\n    c *T\n}\n\nvar x = T{/*ref*/a:1, b:2, c:nil }\n"
  },
  {
    "path": "testData/psi/resolve/composite/TypeNameArray.go",
    "content": "package main\n\ntype T struct {\n    /*def*/a, b int\n    c *T\n}\n\nvar x = [1]T{ {/*ref*/a:1, b:2, c:nil} }\n"
  },
  {
    "path": "testData/psi/resolve/composite/TypeNameMap.go",
    "content": "package main\n\ntype T struct {\n    /*def*/a, b int\n    c *T\n}\n\nvar x = map[string]T{ \"1\":{/*ref*/a:1, b:2, c:nil} }\n"
  },
  {
    "path": "testData/psi/resolve/composite/TypeNameSlice.go",
    "content": "package main\n\ntype T struct {\n    /*def*/a, b int\n    c *T\n}\n\nvar x = []T{ {/*ref*/a:1, b:2, c:nil} }\n"
  },
  {
    "path": "testData/psi/resolve/composite/TypeStruct.go",
    "content": "package main\n\nvar x = struct {\n    /*def*/a, b int\n    c *T\n}{/*ref*/a:1, b:2, c:nil }\n"
  },
  {
    "path": "testData/psi/resolve/composite/TypeStructArray.go",
    "content": "package main\n\nvar x = [1]struct {\n    /*def*/a, b int\n    c *T\n}{ {/*ref*/a:1, b:2, c:nil} }\n"
  },
  {
    "path": "testData/psi/resolve/composite/TypeStructMap.go",
    "content": "package main\n\nvar x = map[string]struct {\n    /*def*/a, b int\n    c *T\n}{ \"1\": {/*ref*/a:1, b:2, c:nil} }\n"
  },
  {
    "path": "testData/psi/resolve/composite/TypeStructSlice.go",
    "content": "package main\n\nvar x = []struct {\n    /*def*/a, b int\n    c *T\n}{ {/*ref*/a:1, b:2, c:nil} }\n"
  },
  {
    "path": "testData/psi/resolve/composite/TypeSwitch.go",
    "content": "package main\n\ntype S struct {\n    /*def*/a int\n}\n\nfunc main() {\n    var a interface{}\n    switch t := a.(type) {\n    case S:\n        println(t./*ref*/a)\n    }\n}\n"
  },
  {
    "path": "testData/psi/resolve/package/ImportAlias.go",
    "content": "package main\n\nimport /*def*/xx \"a\"\n\nfunc main() {\n    /*ref*/xx.\n}\n"
  },
  {
    "path": "testData/psi/resolve/struct/AnonymousDirectStructField.go",
    "content": "package main\n\ntype T1 int\n\ntype T2 struct {\n    a, b, c int\n    /*def*/T1\n}\n\nfunc main() {\n    var x = T2{}\n\n    x./*ref*/T1\n}\n"
  },
  {
    "path": "testData/psi/resolve/struct/DirectExportedFieldFromImportedPackage/main.go",
    "content": "package main\n\nimport \"pack\"\n\nfunc main() {\n    var x = pack.S{}\n    x./*ref*/A\n}\n"
  },
  {
    "path": "testData/psi/resolve/struct/DirectExportedFieldFromImportedPackage/pack/pack.go",
    "content": "package pack\n\ntype S struct {\n    AA, /*def*/A, B, C, AA int\n}\n"
  },
  {
    "path": "testData/psi/resolve/struct/DirectPrivateFieldFromImportedPackage/main.go",
    "content": "package main\n\nimport \"pack\"\n\nfunc main() {\n    var x = pack.S{}\n    x./*no ref*/a\n}\n"
  },
  {
    "path": "testData/psi/resolve/struct/DirectPrivateFieldFromImportedPackage/pack/pack.go",
    "content": "package pack\n\ntype S struct {\n    AA, a, B, C, AA int\n}\n"
  },
  {
    "path": "testData/psi/resolve/struct/DirectStructField.go",
    "content": "package main\n\ntype S struct {\n    b, c, /*def*/a int\n}\n\nfunc main() {\n    var x = S{}\n    x./*ref*/a\n}\n"
  },
  {
    "path": "testData/psi/resolve/struct/FieldVsParam.go",
    "content": "package main\n\ntype A struct {\n    /*def*/b int\n    c int\n}\n\nfunc NewA(b int) *A {\n    return &A{\n        /*ref*/b: b,\n        c: 1,\n    }\n}"
  },
  {
    "path": "testData/psi/resolve/struct/FieldVsParam2.go",
    "content": "package main\n\ntype A struct {\n    b int\n    c int\n}\n\nfunc NewA(/*def*/b int) *A {\n    return &A{\n        b: /*ref*/b,\n        c: 1,\n    }\n}"
  },
  {
    "path": "testData/psi/resolve/struct/FieldVsParam3.go",
    "content": "package main\n\nfunc _() {\n\t/*def*/addr := \"test\"\n\tx := struct{ addr string }{addr: /*ref*/addr}\n\tfmt.Println(x)\n}"
  },
  {
    "path": "testData/psi/resolve/struct/FieldVsParam4.go",
    "content": "package main\n\nfunc _() {\n\taddr := \"test\"\n\tx := struct{ /*def*/addr string }{/*ref*/addr: addr}\n\tfmt.Println(x)\n}"
  },
  {
    "path": "testData/psi/resolve/struct/PromotedStructField.go",
    "content": "package main\n\ntype S1 struct {\n    /*def*/a, b int\n}\n\ntype S2 struct {\n    c, d int\n    S1\n}\n\nfunc main() {\n    var x = S2{}\n\n    x./*ref*/a\n}\n"
  },
  {
    "path": "testData/psi/resolve/struct/StructFieldInMap.go",
    "content": "package main\n\ntype S struct {\n\t/*def*/a int\n}\n\nfunc main() {\n\t_ = map[string][]S{\n\t\t\"key\": {{/*ref*/a: 5}},\n\t}\n}"
  },
  {
    "path": "testData/psi/resolve/types/CompositeLiteralFromImportedPackage/datatier/datatier.go",
    "content": "package datatier\n\ntype /*def*/MyType string\n"
  },
  {
    "path": "testData/psi/resolve/types/CompositeLiteralFromImportedPackage/main/main.go",
    "content": "package main\n\nimport \"datatier\"\n\nvar MyVar datatier./*ref*/MyType == 1\n\nfunc main() {\n}\n"
  },
  {
    "path": "testData/psi/resolve/types/DontResolveIfImportedInAnotherFileSamePackage/imported/imported.go",
    "content": "package imported\n\ntype Type int\n"
  },
  {
    "path": "testData/psi/resolve/types/DontResolveIfImportedInAnotherFileSamePackage/main1.go",
    "content": "package main\n\ntype t imported./*no ref*/Type\n"
  },
  {
    "path": "testData/psi/resolve/types/DontResolveIfImportedInAnotherFileSamePackage/main2.go",
    "content": "package main\n\nimport \"imported\"\n\ntype t1 imported.Type\n"
  },
  {
    "path": "testData/psi/resolve/types/FromCustomImportedPackage/main.go",
    "content": "package main\n\nimport test_x \"test\"\n\nvar x test_x./*ref*/ExportedType\n\nfunc main() {\n\n}\n"
  },
  {
    "path": "testData/psi/resolve/types/FromCustomImportedPackage/test/packageTest.go",
    "content": "package test;\n\ntype /*def*/ExportedType int;\n"
  },
  {
    "path": "testData/psi/resolve/types/FromDefaultImportedPackage/main.go",
    "content": "package main\n\nimport \"test\"\n\nvar x test./*ref*/ExportedType\n\nfunc main() {\n\n}\n"
  },
  {
    "path": "testData/psi/resolve/types/FromDefaultImportedPackage/test/packageTest.go",
    "content": "package test;\n\ntype /*def*/ExportedType int;\n"
  },
  {
    "path": "testData/psi/resolve/types/FromInjectedPackage/main.go",
    "content": "package main\n\nimport . \"test\"\n\nvar x /*ref*/ExportedType\n\nfunc main() {\n\n}\n"
  },
  {
    "path": "testData/psi/resolve/types/FromInjectedPackage/test/packageTest.go",
    "content": "package test;\n\ntype /*def*/ExportedType int;\n"
  },
  {
    "path": "testData/psi/resolve/types/FromLowerCasePackageInMixedCaseFolder/Gongo/gongo.go",
    "content": "package gongo\n\ntype /*def*/MyType string\n"
  },
  {
    "path": "testData/psi/resolve/types/FromLowerCasePackageInMixedCaseFolder/main.go",
    "content": "package main\n\nimport \"Gongo\" // unused import error here\n\nvar MyVar = gongo./*ref*/MyType{} // unresolved symbol error here\n\nfunc main() {\n}\n"
  },
  {
    "path": "testData/psi/resolve/types/FromMethodReceiver.go",
    "content": "package main\ntype /*def*/T struct {\n    a, b int\n}\n\nfunc (t */*ref*/T) f() {\n\n}\n"
  },
  {
    "path": "testData/psi/resolve/types/FromMixedCaseImportedPackage/dataTier/dataTier.go",
    "content": "package dataTier\n\ntype /*def*/MyType string\n"
  },
  {
    "path": "testData/psi/resolve/types/FromMixedCaseImportedPackage/main.go",
    "content": "package main\n\nimport \"dataTier\" // unused import error here\n\nvar MyVar dataTier./*ref*/MyType = \"\" // unresolved symbol error here\n"
  },
  {
    "path": "testData/psi/resolve/types/FromMultipleImportedPackage/imported/imported1.go",
    "content": "package imported\n\ntype ImportedType1 int\n"
  },
  {
    "path": "testData/psi/resolve/types/FromMultipleImportedPackage/imported/imported2.go",
    "content": "package imported\n\ntype (\n    /*def*/ImportedType int\n    A string\n)\n"
  },
  {
    "path": "testData/psi/resolve/types/FromMultipleImportedPackage/main.go",
    "content": "package main\n\nimport \"imported\"\n\nvar x imported./*ref*/ImportedType = 10\n\nfunc main() {\n\n}\n"
  },
  {
    "path": "testData/psi/resolve/types/FunctionTypeByRef.go",
    "content": "package main\n\nimport (\n\t\"fmt\"\n)\n\ntype S struct {\n\t/*def*/a int\n}\n\ntype F func() []S\n\nvar f F = func() []S {\n\treturn make([]S, 1)\n}\n\nfunc main() {\n\tfmt.Println(f()[0]./*ref*/a)\n}"
  },
  {
    "path": "testData/psi/resolve/types/IgnoreBlankImportedPackage/main.go",
    "content": "package main\n\nimport _ \"test\"\n\nvar x /*no ref*/test.ExportedType\n\nfunc main() {\n\n}\n"
  },
  {
    "path": "testData/psi/resolve/types/IgnoreBlankImportedPackage/packageTest.go",
    "content": "package test;\n\ntype ExportedType int;\n"
  },
  {
    "path": "testData/psi/resolve/types/IgnoreBlankImportedPackage/packageTest2.go",
    "content": "package test2;\n\ntype ExportedType int;\n"
  },
  {
    "path": "testData/psi/resolve/types/LocalType.go",
    "content": "package main\n\ntype /*def*/Type int\n\nfunc main() {\n    var a /*ref*/Type = 10\n}\n"
  },
  {
    "path": "testData/psi/resolve/types/MethodsOrder.go",
    "content": "package main\n\ntype One struct {}\n\nfunc (m *One) Method() {}\n\ntype Two struct {\n    One\n}\n\ntype Three struct {\n    One\n}\n\nfunc (m *Three) /*def*/Method() {}\n\nfunc main() {\n    one := One{}\n    one.Method()\n    two := Two{}\n    two.Method()\n    three := Three{}\n    three./*ref*/Method()\n}"
  },
  {
    "path": "testData/psi/resolve/types/ResolveArrayInRange.go",
    "content": "package main;\nimport (\n\t\"fmt\"\n)\n\nfunc aaa() {\n\tfmt.Println()\n}\n\ntype RateHistoryResponse struct {}\ntype RateHistoryResponses []RateHistoryResponse\n\nfunc (r *RateHistoryResponses) persist() {\n\tfor _, rh := range []RateHistoryResponse(*r) {\n\t\trh./*ref*/persist()\n\t}\n}\n\nfunc (r *RateHistoryResponse) /*def*/persist() {\n}"
  },
  {
    "path": "testData/psi/resolve/types/ResolveTypeInCast.go",
    "content": "package main\n\nimport \"unsafe\"\n\ntype emptyInterface struct {\n    /*def*/typ  uintptr\n    word unsafe.Pointer\n}\n\nfunc TypId(i interface{}) uintptr {\n    return (*emptyInterface)(unsafe.Pointer(&i))./*ref*/typ\n}"
  },
  {
    "path": "testData/psi/resolve/types/ResolveTypeNameInTypeSpec.go",
    "content": "package main\n\ntype /*def*/Type int\n\ntype T2 /*ref*/Type\n"
  },
  {
    "path": "testData/psi/resolve/vars/AnonymousFunctionInvocation.go",
    "content": "package main\n\nfunc someFunc(){\n\t/*def*/sub1 := func(){ }\n\t/*ref*/sub1()\n}\n\nfunc main() {\n}\n"
  },
  {
    "path": "testData/psi/resolve/vars/ChainedSelector.go",
    "content": "package main\n\nvar /*def*/x int\n\nfunc method() {\n    /*ref*/x.\n    a.b()\n}\n"
  },
  {
    "path": "testData/psi/resolve/vars/DeclarationInsideLabeledStatement.go",
    "content": "package main\n\nfunc main2() {\nTest:\n    /*def*/i := 0\n    println(i)\n    if /*ref*/i > 0 {\n        goto Test\n    }\n}\n"
  },
  {
    "path": "testData/psi/resolve/vars/DeclaredInForClause.go",
    "content": "package main\n\nconst i iota\n\nfunc main() {\n    i := 1\n    for /*def*/i := 1;; i++  {\n        y := /*ref*/i\n    }\n}\n"
  },
  {
    "path": "testData/psi/resolve/vars/DeclaredInForRange1.go",
    "content": "package main\n\nconst key = iota\n\nfunc main() {\n    key := 1\n    for /*def*/key, val := range m {\n        y := /*ref*/key\n    }\n}\n"
  },
  {
    "path": "testData/psi/resolve/vars/DeclaredInForRange2.go",
    "content": "package main\n\nconst i = iota\n\nfunc main() {\n  i := 0\n  for /*def*/i, _ := range m {\n      println(/*ref*/i)\n  }\n}\n"
  },
  {
    "path": "testData/psi/resolve/vars/DeclaredInForRangeAsValue.go",
    "content": "package main\n\nconst key2 = iota\n\nfunc main() {\n    key1 := 1\n    for key1, /*def*/key2 := range {\n        x := /*ref*/key2\n    }\n}\n"
  },
  {
    "path": "testData/psi/resolve/vars/DefaultImportDifferentPackage/main.go",
    "content": "package main\n\nimport \"test\"\n\nvar x = test./*ref*/Var\n"
  },
  {
    "path": "testData/psi/resolve/vars/DefaultImportDifferentPackage/test/file.go",
    "content": "package test\n\nvar /*def*/Var = 10\n"
  },
  {
    "path": "testData/psi/resolve/vars/DontProcessExpressions.go",
    "content": "package main\n\nfunc main() {\n\tfs := *(*func(width int) struct{})(nil)\n\t/*def*/width := 1\n\t_, _ = fs, /*ref*/width\n}"
  },
  {
    "path": "testData/psi/resolve/vars/FromCustomImportedPackage/main.go",
    "content": "package main\n\nimport tictic \"test\"\n\nvar x = tictic./*ref*/Var\n"
  },
  {
    "path": "testData/psi/resolve/vars/FromCustomImportedPackage/test/test.go",
    "content": "package test\n\nvar /*def*/Var = 10\n"
  },
  {
    "path": "testData/psi/resolve/vars/FromDefaultImportedPackage/main.go",
    "content": "package main\n\nimport \"test\"\n\nvar x = test1./*ref*/Var\n"
  },
  {
    "path": "testData/psi/resolve/vars/FromDefaultImportedPackage/test/test.go",
    "content": "package test1\n\nvar /*def*/Var = 10\n"
  },
  {
    "path": "testData/psi/resolve/vars/FromInjectedImportedPackage/main.go",
    "content": "package main\n\nimport . \"test\"\n\nvar x = /*ref*/Var\n"
  },
  {
    "path": "testData/psi/resolve/vars/FromInjectedImportedPackage/test/test.go",
    "content": "package test\n\nconst /*def*/Var = 10\n"
  },
  {
    "path": "testData/psi/resolve/vars/GlobalConstDeclaration.go",
    "content": "package main\n\nconst /*def*/x = iota\n\nfunc main() {\n    println(/*ref*/x)\n}\n"
  },
  {
    "path": "testData/psi/resolve/vars/GlobalShadowedVarDeclaration.go",
    "content": "package main\n\nvar x int = 10\n\nfunc main() {\n    /*def*/x := 20\n    println(/*ref*/x)\n}\n"
  },
  {
    "path": "testData/psi/resolve/vars/GlobalVarDeclaration.go",
    "content": "package main\n\nvar /*def*/x int = 10\n\nfunc main() {\n    println(/*ref*/x)\n}\n"
  },
  {
    "path": "testData/psi/resolve/vars/GlobalVarDeclarationFromBlock.go",
    "content": "package main\n\nvar /*def*/x int = 10\n\nfunc main() {\n    if true {\n        /*ref*/x = 100\n    }\n    println(x)\n}\n"
  },
  {
    "path": "testData/psi/resolve/vars/LocalConstDeclaration.go",
    "content": "package main\n\nfunc main() {\n    const /*def*/CC = 3\n    println(/*ref*/CC)\n}\n"
  },
  {
    "path": "testData/psi/resolve/vars/LocalPackageDefinitionsShouldBeResolvedFirst/package1/package1.go",
    "content": "package package1\n\ntype Type int\n"
  },
  {
    "path": "testData/psi/resolve/vars/LocalPackageDefinitionsShouldBeResolvedFirst/package2/package21.go",
    "content": "package package2\n\ntype /*def*/Type int\n\n"
  },
  {
    "path": "testData/psi/resolve/vars/LocalPackageDefinitionsShouldBeResolvedFirst/package2/package22.go",
    "content": "package package2\n\nimport \"package1\"\n\nfunc GetType() /*ref*/Type {\n\treturn nil\n}\n\n"
  },
  {
    "path": "testData/psi/resolve/vars/MethodReturn.go",
    "content": "package main\n\nfunc function(a, b int) (/*def*/c, d int) {\n    /*ref*/c, d = b, a\n    return\n}\n"
  },
  {
    "path": "testData/psi/resolve/vars/MethodReturn2.go",
    "content": "package main\n\nfunc gen1() (/*def*/g1v int) {\n    /*ref*/g1v = 5\n    return\n}\n"
  },
  {
    "path": "testData/psi/resolve/vars/MultipleApplications/Application1/main.go",
    "content": "package main\n\nfunc main() {\n    /*no ref*/Test()\n}\n"
  },
  {
    "path": "testData/psi/resolve/vars/MultipleApplications/Application1/test.go",
    "content": "package main\n\nfunc Test1() {\n\n}\n"
  },
  {
    "path": "testData/psi/resolve/vars/MultipleApplications/Application2/main.go",
    "content": "package main\n\nfunc main() {\n    Test1()\n}\n"
  },
  {
    "path": "testData/psi/resolve/vars/MultipleApplications/Application2/test.go",
    "content": "package main\n\nfunc Test() {\n\n}\n"
  },
  {
    "path": "testData/psi/resolve/vars/MultipleGlobalConsts.go",
    "content": "package main\n\nconst (\n    a = /*ref*/b\n    /*def*/b = 10\n)\n\nfunc main() {\n    println(a, b)\n}\n"
  },
  {
    "path": "testData/psi/resolve/vars/MultipleGlobalVars.go",
    "content": "package main\n\nvar (\n    bb = /*ref*/cc\n    /*def*/cc = 1\n)\n\nfunc main() {\n    println(bb, cc)\n}\n"
  },
  {
    "path": "testData/psi/resolve/vars/RangeExpressionVarsShouldNotResolveToRangeVars.go",
    "content": "package main\n\nimport \"bytes\"\n\nfunc main() {\n    var /*def*/b bytes.Buffer\n\n    for i, b := range /*ref*/b {\n        _, _ = i, b\n    }\n}"
  },
  {
    "path": "testData/psi/resolve/vars/ResolveMethodReceiver.go",
    "content": "package main\n\nfunc (/*def*/p *Point) Length() float64 {\n\treturn math.Sqrt(p.x * /*ref*/p.x + p.y * p.y)\n}\n"
  },
  {
    "path": "testData/psi/resolve/vars/ResolveToFunctionName.go",
    "content": "package main\n\nfunc /*def*/Pff() {\n    println(\"hi\")\n}\n\nfunc F(func()) {\n\n}\n\nfunc main() {\n    F(/*ref*/Pff)    // <-- second place\n}\n"
  },
  {
    "path": "testData/psi/resolve/vars/ResolveToMethodName.go",
    "content": "package main\n\nfunc (*int) Pmm() {\n    println(\"hi\")\n}\n\nfunc F(func()) {\n\n}\n\nfunc main() {\n    F(/*no ref*/Pmm)    // <-- second place\n}\n"
  },
  {
    "path": "testData/psi/resolve/vars/ShortAssignToReturnVar.go",
    "content": "package main\n\nfunc Test(x int) (/*def*/r int) {\n\t/*ref*/r, a := x, 1\n\t_ = a\n\treturn\n}\n"
  },
  {
    "path": "testData/psi/resolve/vars/ShortVarDeclaration.go",
    "content": "package main\n\nfunc main() {\n    /*def*/x := 10\n    println(/*ref*/x)\n}\n"
  },
  {
    "path": "testData/psi/resolve/vars/ShortVarDeclarationFromBlock.go",
    "content": "package main\n\nfunc main() {\n    /*def*/x, test := 10, true\n    if test {\n        /*ref*/x = 11\n    }\n    println(x)\n}\n"
  },
  {
    "path": "testData/psi/resolve/vars/ShortVarDeclarationFromSelectClause.go",
    "content": "package main\n\nfunc main() {\n\ti := 1\n\tselect {\n\t\tcase /*def*/i := <-c: {\n\t\t\t/*ref*/i\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "testData/psi/resolve/vars/ShortVarRedeclaration.go",
    "content": "package main\n\nfunc main() {\n    /*def*/x := 10\n    x, a := 11, 2\n    println(/*ref*/x, a)\n}\n"
  },
  {
    "path": "testData/psi/resolve/vars/SimpleMethodParameter.go",
    "content": "package main\n\nfunc method(/*def*/x int) {\n    /*ref*/x\n}\n"
  },
  {
    "path": "testData/psi/resolve/vars/StructFieldViaChannel.go",
    "content": "package main\n\ntype polar struct {\n    /*def*/radius  float64\n    theta   float64\n}\n\nfunc foo(thing chan polar) {\n    aPolarObject := <-thing\n    aPolarObject./*ref*/radius\n}\n"
  },
  {
    "path": "testData/psi/resolve/vars/VarDeclarationInSelectCommClauseDefault.go",
    "content": "package main\n\nfunc main() {\n\tselect {\n\t\tcase: {\n\t\t\t/*def*/test := 1\n\t\t\tprint(/*ref*/test)\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "testData/psi/resolve/vars/VarDeclarationInSelectCommClauseRecv.go",
    "content": "package main\n\nfunc main() {\n\tvar ch = make(chan int)\n\tselect {\n\t\tcase ch <- 1: {\n\t\t\t/*def*/test := 1\n\t\t\tprint(/*ref*/test)\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "testData/psi/resolve/vars/VarDeclarationInSelectCommClauseSend.go",
    "content": "package main\n\nfunc main() {\n\tvar ch = make(chan int)\n\tselect {\n\t\tcase test := <-ch: {\n\t\t\t/*def*/test := 1\n\t\t\tprint(/*ref*/test)\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "testData/psi/resolve/vars/VarDeclarationOutsideSwitch.go",
    "content": "package main\n\nfunc demoFunc(/*def*/demo1 int) {\n\tswitch {\n\tcase 1==2 :\n\t\tdemo1 := 1\n\tdefault:\n\t}\n\t_ = /*ref*/demo1\n}\n"
  },
  {
    "path": "testData/psi/resolve/vars/VarDereferenceAsTypeCast.go",
    "content": "package main\n\ntype Foo struct {\n\tThings []string\n}\n\nfunc doSomething() *Foo {\n\treturn &Foo{}\n}\n\nfunc main() {\n\t/*def*/foo := doSomething()                 // foo marked as Unused\n\tfor _, v := range (*/*ref*/foo).Things {    // foo marked as Unresolved\n\t\t_ = v\n\t}\n}\n"
  },
  {
    "path": "testData/psi/resolve/vars/VarInSwitchExpr.go",
    "content": "package main\n\nfunc main() (int) {\n    switch e {\n    case a:\n        /*def*/x := a;\n        return /*ref*/x\n    }\n\n    return nil\n}\n"
  },
  {
    "path": "testData/psi/resolve/vars/VarInSwitchExprInitialization.go",
    "content": "package main\n\nfunc main() (int) {\n    switch /*def*/i := 1; e {\n    case a:\n        return /*ref*/i\n    }\n\n    return nil\n}\n"
  },
  {
    "path": "testData/psi/resolve/vars/VarInSwitchType.go",
    "content": "package main\n\nfunc main() (int) {\n    switch x.(type) {\n    case int:\n        /*def*/x := 10;\n        return /*ref*/x\n    }\n\n    return nil\n}\n"
  },
  {
    "path": "testData/psi/resolve/vars/VarInSwitchTypeInitialization.go",
    "content": "package main\n\nfunc main() (int) {\n    switch /*def*/x := 10; x.(type) {\n    case int:\n        return /*ref*/x\n    }\n\n    return nil\n}\n"
  },
  {
    "path": "testData/psi/resolve/vars/VarInSwitchTypeWithNamedSwitchGuard.go",
    "content": "package main\n\nfunc main() (int) {\n    switch /*def*/y := x.(type) {\n    case int:\n        return /*ref*/y\n    }\n\n    return nil\n}\n"
  },
  {
    "path": "testData/psi/resolve/vars/VarTypeGuard.go",
    "content": "package main\n\nfunc Test(/*def*/p interface{}) error {\n\tswitch p := /*ref*/p.(type) {\n\t\tcase error:\n\t\treturn nil\n\t}\n\treturn nil\n}"
  },
  {
    "path": "testData/psi/resolve/vars/VarVsInnerTypes.go",
    "content": "package main\n\nfunc main() {\n\ttype demo struct { Field1 int }\n\tvar /*def*/Field1 int\n\t /*ref*/Field1 = 1\n}"
  },
  {
    "path": "testData/quickfixes/add-comma/simple-after.go",
    "content": "package foo\n\nfunc main() {\n\te12 := S{\n\t\ta:1,\n\t}\n}"
  },
  {
    "path": "testData/quickfixes/add-comma/simple.go",
    "content": "package foo\n\nfunc main() {\n\te12 := S{\n\t\ta:1<caret>\n\t}\n}"
  },
  {
    "path": "testData/quickfixes/add-missing-return/simple-after.go",
    "content": "package main\n\nfunc _() int {\n\treturn\n}"
  },
  {
    "path": "testData/quickfixes/add-missing-return/simple.go",
    "content": "package main\n\nfunc _() int {\n<error descr=\"Missing return at end of function\"><caret>}</error>"
  },
  {
    "path": "testData/quickfixes/assignment-to-comparison/assignment-after.go",
    "content": "package foo\n\nfunc demo(v bool) {\n\tif a == v {\n\n\t}\n}"
  },
  {
    "path": "testData/quickfixes/assignment-to-comparison/assignment.go",
    "content": "package foo\n\nfunc demo(v bool) {\n\tif a :<caret>= v {\n\n\t}\n}"
  },
  {
    "path": "testData/quickfixes/assignment-to-comparison/shortVar-after.go",
    "content": "package foo\n\nfunc demo(v bool) {\n\tif a == v {\n\n\t}\n}"
  },
  {
    "path": "testData/quickfixes/assignment-to-comparison/shortVar.go",
    "content": "package foo\n\nfunc demo(v bool) {\n\tif a <caret>= v {\n\n\t}\n}"
  },
  {
    "path": "testData/quickfixes/continue-outside-loop/simple-after.go",
    "content": "package continue_outside_loop\n\nfunc _() {\n\treturn\n}"
  },
  {
    "path": "testData/quickfixes/continue-outside-loop/simple.go",
    "content": "package continue_outside_loop\n\nfunc _() {\n\tc<caret>ontinue\n}"
  },
  {
    "path": "testData/quickfixes/create-type/global-after.go",
    "content": "package foo\n\ntype A<caret>\n\ntype ServerFunc func(params A) (error)"
  },
  {
    "path": "testData/quickfixes/create-type/global.go",
    "content": "package foo\n\ntype ServerFunc func(params A<caret>) (error)"
  },
  {
    "path": "testData/quickfixes/create-type/prohibited.go",
    "content": "package foo\n\nfunc main() {\n  a := &fmt.A<caret>{}\n}"
  },
  {
    "path": "testData/quickfixes/create-type/simple-after.go",
    "content": "package foo\n\ntype A<caret> \n\nfunc main() {\n  a := &A{}\n}"
  },
  {
    "path": "testData/quickfixes/create-type/simple.go",
    "content": "package foo\n\nfunc main() {\n  a := &A<caret>{}\n}"
  },
  {
    "path": "testData/quickfixes/exported-own-declaration/multiLineMultipleConstsWithType-after.go",
    "content": "package demo2049\n\nconst Hello1, hello2, Helllllo = 1, 2, 3 // This is valid\n\nconst Hello3, Hello4 = 3, 4 // exported const Hello4 should have its own declaration\n\nvar Hello5, hello6 int // This is valid\n\n// exported var Hello8 should have its own declaration\nvar Hello7, Hello8 int // exported var Hello8 should have its own declaration\n\nconst (\n\tFoo            = 1\n\tBaz int = 2\n\tBar int = 1\n\tBar2, Baz2     = 1, 2\n)\n\nvar (\n\tHello9, Hello10  int\n\tHello11, Hello12 int\n\tHello13, Hello14 = 1, 2\n)\n\nfunc _() {\n\t_, _, _, _ = Hello5, hello6, Hello7, Hello8\n\t_, _, _, _ = Hello9, Hello10, Hello11, Hello12\n\t_, _ = Hello13, Hello14\n}\n"
  },
  {
    "path": "testData/quickfixes/exported-own-declaration/multiLineMultipleConstsWithType.go",
    "content": "package demo2049\n\nconst Hello1, hello2, Helllllo = 1, 2, 3 // This is valid\n\nconst Hello3, Hello4 = 3, 4 // exported const Hello4 should have its own declaration\n\nvar Hello5, hello6 int // This is valid\n\n// exported var Hello8 should have its own declaration\nvar Hello7, Hello8 int // exported var Hello8 should have its own declaration\n\nconst (\n\tFoo            = 1\n\tBar, B<caret>az   int = 1, 2\n\tBar2, Baz2     = 1, 2\n)\n\nvar (\n\tHello9, Hello10  int\n\tHello11, Hello12 int\n\tHello13, Hello14 = 1, 2\n)\n\nfunc _() {\n\t_, _, _, _ = Hello5, hello6, Hello7, Hello8\n\t_, _, _, _ = Hello9, Hello10, Hello11, Hello12\n\t_, _ = Hello13, Hello14\n}\n"
  },
  {
    "path": "testData/quickfixes/exported-own-declaration/multiLineMultipleConstsWithoutType-after.go",
    "content": "package demo2049\n\nconst Hello1, hello2, Helllllo = 1, 2, 3 // This is valid\n\nconst Hello3, Hello4 = 3, 4 // exported const Hello4 should have its own declaration\n\nvar Hello5, hello6 int // This is valid\n\n// exported var Hello8 should have its own declaration\nvar Hello7, Hello8 int // exported var Hello8 should have its own declaration\n\nconst (\n\tFoo            = 1\n\tBar, Baz   int = 1, 2\n\tBaz2 = 2\n\tBar2 = 1\n)\n\nvar (\n\tHello9, Hello10  int\n\tHello11, Hello12 int\n\tHello13, Hello14 = 1, 2\n)\n\nfunc _() {\n\t_, _, _, _ = Hello5, hello6, Hello7, Hello8\n\t_, _, _, _ = Hello9, Hello10, Hello11, Hello12\n\t_, _ = Hello13, Hello14\n}\n"
  },
  {
    "path": "testData/quickfixes/exported-own-declaration/multiLineMultipleConstsWithoutType.go",
    "content": "package demo2049\n\nconst Hello1, hello2, Helllllo = 1, 2, 3 // This is valid\n\nconst Hello3, Hello4 = 3, 4 // exported const Hello4 should have its own declaration\n\nvar Hello5, hello6 int // This is valid\n\n// exported var Hello8 should have its own declaration\nvar Hello7, Hello8 int // exported var Hello8 should have its own declaration\n\nconst (\n\tFoo            = 1\n\tBar, Baz   int = 1, 2\n\tBar2, Ba<caret>z2     = 1, 2\n)\n\nvar (\n\tHello9, Hello10  int\n\tHello11, Hello12 int\n\tHello13, Hello14 = 1, 2\n)\n\nfunc _() {\n\t_, _, _, _ = Hello5, hello6, Hello7, Hello8\n\t_, _, _, _ = Hello9, Hello10, Hello11, Hello12\n\t_, _ = Hello13, Hello14\n}\n"
  },
  {
    "path": "testData/quickfixes/exported-own-declaration/multiLineMultipleVarsOnlyType-after.go",
    "content": "package demo2049\n\nconst Hello1, hello2, Helllllo = 1, 2, 3 // This is valid\n\nconst Hello3, Hello4 = 3, 4 // exported const Hello4 should have its own declaration\n\nvar Hello5, hello6 int // This is valid\n\n// exported var Hello8 should have its own declaration\nvar Hello7, Hello8 int // exported var Hello8 should have its own declaration\n\nconst (\n\tFoo            = 1\n\tBar, Baz   int = 1, 2\n\tBar2, Baz2     = 1, 2\n)\n\nvar (\n\tHello10 int\n\tHello9 int\n\tHello11, Hello12 int\n\tHello13, Hello14 = 1, 2\n)\n\nfunc _() {\n\t_, _, _, _ = Hello5, hello6, Hello7, Hello8\n\t_, _, _, _ = Hello9, Hello10, Hello11, Hello12\n\t_, _ = Hello13, Hello14\n}\n"
  },
  {
    "path": "testData/quickfixes/exported-own-declaration/multiLineMultipleVarsOnlyType.go",
    "content": "package demo2049\n\nconst Hello1, hello2, Helllllo = 1, 2, 3 // This is valid\n\nconst Hello3, Hello4 = 3, 4 // exported const Hello4 should have its own declaration\n\nvar Hello5, hello6 int // This is valid\n\n// exported var Hello8 should have its own declaration\nvar Hello7, Hello8 int // exported var Hello8 should have its own declaration\n\nconst (\n\tFoo            = 1\n\tBar, Baz   int = 1, 2\n\tBar2, Baz2     = 1, 2\n)\n\nvar (\n\tHello9, Hell<caret>o10  int\n\tHello11, Hello12 int\n\tHello13, Hello14 = 1, 2\n)\n\nfunc _() {\n\t_, _, _, _ = Hello5, hello6, Hello7, Hello8\n\t_, _, _, _ = Hello9, Hello10, Hello11, Hello12\n\t_, _ = Hello13, Hello14\n}\n"
  },
  {
    "path": "testData/quickfixes/exported-own-declaration/multiLineMultipleVarsOnlyValues-after.go",
    "content": "package demo2049\n\nconst Hello1, hello2, Helllllo = 1, 2, 3 // This is valid\n\nconst Hello3, Hello4 = 3, 4 // exported const Hello4 should have its own declaration\n\nvar Hello5, hello6 int // This is valid\n\n// exported var Hello8 should have its own declaration\nvar Hello7, Hello8 int // exported var Hello8 should have its own declaration\n\nconst (\n\tFoo            = 1\n\tBar, Baz   int = 1, 2\n\tBar2, Baz2     = 1, 2\n)\n\nvar (\n\tHello9, Hello10  int\n\tHello11, Hello12 int\n\tHello14 = 2\n\tHello13 = 1\n)\n\nfunc _() {\n\t_, _, _, _ = Hello5, hello6, Hello7, Hello8\n\t_, _, _, _ = Hello9, Hello10, Hello11, Hello12\n\t_, _ = Hello13, Hello14\n}\n"
  },
  {
    "path": "testData/quickfixes/exported-own-declaration/multiLineMultipleVarsOnlyValues.go",
    "content": "package demo2049\n\nconst Hello1, hello2, Helllllo = 1, 2, 3 // This is valid\n\nconst Hello3, Hello4 = 3, 4 // exported const Hello4 should have its own declaration\n\nvar Hello5, hello6 int // This is valid\n\n// exported var Hello8 should have its own declaration\nvar Hello7, Hello8 int // exported var Hello8 should have its own declaration\n\nconst (\n\tFoo            = 1\n\tBar, Baz   int = 1, 2\n\tBar2, Baz2     = 1, 2\n)\n\nvar (\n\tHello9, Hello10  int\n\tHello11, Hello12 int\n\tHello13, Hel<caret>lo14 = 1, 2\n)\n\nfunc _() {\n\t_, _, _, _ = Hello5, hello6, Hello7, Hello8\n\t_, _, _, _ = Hello9, Hello10, Hello11, Hello12\n\t_, _ = Hello13, Hello14\n}\n"
  },
  {
    "path": "testData/quickfixes/exported-own-declaration/multiLineMultipleVarsWithTypeAndValues-after.go",
    "content": "package demo2049\n\nconst Hello1, hello2, Helllllo = 1, 2, 3 // This is valid\n\nconst Hello3, Hello4 = 3, 4 // exported const Hello4 should have its own declaration\n\nvar Hello5, hello6 int // This is valid\n\n// exported var Hello8 should have its own declaration\nvar Hello7, Hello8 int // exported var Hello8 should have its own declaration\n\nconst (\n\tFoo            = 1\n\tBar, Baz   int = 1, 2\n\tBar2, Baz2     = 1, 2\n)\n\nvar (\n\tHello9, Hello10  int\n\tHello12 int = 2\n\tHello11 int = 1\n\tHello13, Hello14 = 1, 2\n)\n\nfunc _() {\n\t_, _, _, _ = Hello5, hello6, Hello7, Hello8\n\t_, _, _, _ = Hello9, Hello10, Hello11, Hello12\n\t_, _ = Hello13, Hello14\n}\n"
  },
  {
    "path": "testData/quickfixes/exported-own-declaration/multiLineMultipleVarsWithTypeAndValues.go",
    "content": "package demo2049\n\nconst Hello1, hello2, Helllllo = 1, 2, 3 // This is valid\n\nconst Hello3, Hello4 = 3, 4 // exported const Hello4 should have its own declaration\n\nvar Hello5, hello6 int // This is valid\n\n// exported var Hello8 should have its own declaration\nvar Hello7, Hello8 int // exported var Hello8 should have its own declaration\n\nconst (\n\tFoo            = 1\n\tBar, Baz   int = 1, 2\n\tBar2, Baz2     = 1, 2\n)\n\nvar (\n\tHello9, Hello10  int\n\tHello11, Hel<caret>lo12 int = 1, 2\n\tHello13, Hello14 = 1, 2\n)\n\nfunc _() {\n\t_, _, _, _ = Hello5, hello6, Hello7, Hello8\n\t_, _, _, _ = Hello9, Hello10, Hello11, Hello12\n\t_, _ = Hello13, Hello14\n}\n"
  },
  {
    "path": "testData/quickfixes/exported-own-declaration/singleLineMultipleConsts-after.go",
    "content": "package demo2049\n\nconst Hello1, hello2, Helllllo = 1, 2, 3 // This is valid\n\nconst (\n\tHello4 = 4\n\tHello3 = 3\n) // exported const Hello4 should have its own declaration\n\nvar Hello5, hello6 int // This is valid\n\n// exported var Hello8 should have its own declaration\nvar Hello7, Hello8 int // exported var Hello8 should have its own declaration\n\nconst (\n\tFoo            = 1\n\tBar, Baz   int = 1, 2\n\tBar2, Baz2     = 1, 2\n)\n\nvar (\n\tHello9, Hello10  int\n\tHello11, Hello12 int\n\tHello13, Hello14 = 1, 2\n)\n\nfunc _() {\n\t_, _, _, _ = Hello5, hello6, Hello7, Hello8\n\t_, _, _, _ = Hello9, Hello10, Hello11, Hello12\n\t_, _ = Hello13, Hello14\n}\n"
  },
  {
    "path": "testData/quickfixes/exported-own-declaration/singleLineMultipleConsts.go",
    "content": "package demo2049\n\nconst Hello1, hello2, Helllllo = 1, 2, 3 // This is valid\n\nconst Hello3, Hel<caret>lo4 = 3, 4 // exported const Hello4 should have its own declaration\n\nvar Hello5, hello6 int // This is valid\n\n// exported var Hello8 should have its own declaration\nvar Hello7, Hello8 int // exported var Hello8 should have its own declaration\n\nconst (\n\tFoo            = 1\n\tBar, Baz   int = 1, 2\n\tBar2, Baz2     = 1, 2\n)\n\nvar (\n\tHello9, Hello10  int\n\tHello11, Hello12 int\n\tHello13, Hello14 = 1, 2\n)\n\nfunc _() {\n\t_, _, _, _ = Hello5, hello6, Hello7, Hello8\n\t_, _, _, _ = Hello9, Hello10, Hello11, Hello12\n\t_, _ = Hello13, Hello14\n}\n"
  },
  {
    "path": "testData/quickfixes/exported-own-declaration/singleLineMultipleExportedAndPrivateConsts-after.go",
    "content": "package demo2049\n\nconst (\n\tHelllllo = 3\n\tHello1, hello2, help = 1, 2, 4\n) // This is valid\n\nconst Hello3, Hello4 = 3, 4 // exported const Hello4 should have its own declaration\n\nvar Hello5, hello6 int // This is valid\n\n// exported var Hello8 should have its own declaration\nvar Hello7, Hello8 int // exported var Hello8 should have its own declaration\n\nconst (\n\tFoo            = 1\n\tBar, Baz   int = 1, 2\n\tBar2, Baz2     = 1, 2\n)\n\nvar (\n\tHello9, Hello10  int\n\tHello11, Hello12 int\n\tHello13, Hello14 = 1, 2\n)\n\nfunc _() {\n\t_, _, _, _ = Hello5, hello6, Hello7, Hello8\n\t_, _, _, _ = Hello9, Hello10, Hello11, Hello12\n\t_, _ = Hello13, Hello14\n}\n"
  },
  {
    "path": "testData/quickfixes/exported-own-declaration/singleLineMultipleExportedAndPrivateConsts.go",
    "content": "package demo2049\n\nconst Hello1, hello2, Hell<caret>lllo, help = 1, 2, 3, 4 // This is valid\n\nconst Hello3, Hello4 = 3, 4 // exported const Hello4 should have its own declaration\n\nvar Hello5, hello6 int // This is valid\n\n// exported var Hello8 should have its own declaration\nvar Hello7, Hello8 int // exported var Hello8 should have its own declaration\n\nconst (\n\tFoo            = 1\n\tBar, Baz   int = 1, 2\n\tBar2, Baz2     = 1, 2\n)\n\nvar (\n\tHello9, Hello10  int\n\tHello11, Hello12 int\n\tHello13, Hello14 = 1, 2\n)\n\nfunc _() {\n\t_, _, _, _ = Hello5, hello6, Hello7, Hello8\n\t_, _, _, _ = Hello9, Hello10, Hello11, Hello12\n\t_, _ = Hello13, Hello14\n}\n"
  },
  {
    "path": "testData/quickfixes/exported-own-declaration/singleLineMultipleVars-after.go",
    "content": "package demo2049\n\nconst Hello1, hello2, Helllllo = 1, 2, 3 // This is valid\n\nconst Hello3, Hello4 = 3, 4 // exported const Hello4 should have its own declaration\n\nvar Hello5, hello6 int // This is valid\n\n// exported var Hello8 should have its own declaration\nvar (\n\tHello8 int\n\tHello7 int\n) // exported var Hello8 should have its own declaration\n\nconst (\n\tFoo            = 1\n\tBar, Baz   int = 1, 2\n\tBar2, Baz2     = 1, 2\n)\n\nvar (\n\tHello9, Hello10  int\n\tHello11, Hello12 int\n\tHello13, Hello14 = 1, 2\n)\n\nfunc _() {\n\t_, _, _, _ = Hello5, hello6, Hello7, Hello8\n\t_, _, _, _ = Hello9, Hello10, Hello11, Hello12\n\t_, _ = Hello13, Hello14\n}\n"
  },
  {
    "path": "testData/quickfixes/exported-own-declaration/singleLineMultipleVars.go",
    "content": "package demo2049\n\nconst Hello1, hello2, Helllllo = 1, 2, 3 // This is valid\n\nconst Hello3, Hello4 = 3, 4 // exported const Hello4 should have its own declaration\n\nvar Hello5, hello6 int // This is valid\n\n// exported var Hello8 should have its own declaration\nvar Hello7, He<caret>llo8 int // exported var Hello8 should have its own declaration\n\nconst (\n\tFoo            = 1\n\tBar, Baz   int = 1, 2\n\tBar2, Baz2     = 1, 2\n)\n\nvar (\n\tHello9, Hello10  int\n\tHello11, Hello12 int\n\tHello13, Hello14 = 1, 2\n)\n\nfunc _() {\n\t_, _, _, _ = Hello5, hello6, Hello7, Hello8\n\t_, _, _, _ = Hello9, Hello10, Hello11, Hello12\n\t_, _ = Hello13, Hello14\n}\n"
  },
  {
    "path": "testData/quickfixes/global-constant/doNotSuggestCreatingConstOnAssignment.go",
    "content": "package foo\n\nfunc main() {\n    a<caret> = 1\n}"
  },
  {
    "path": "testData/quickfixes/global-constant/doNotSuggestCreatingConstOnChanRead.go",
    "content": "package foo\n\nfunc main() {\n    a<caret> <- Struct{\"foo\"}\n}"
  },
  {
    "path": "testData/quickfixes/global-constant/simple-after.go",
    "content": "package foo\n\nconst a<caret> = \n\nfunc main() {\n    b := a\n}"
  },
  {
    "path": "testData/quickfixes/global-constant/simple.go",
    "content": "package foo\n\nfunc main() {\n    b := a<caret>\n}"
  },
  {
    "path": "testData/quickfixes/global-variable/simple-after.go",
    "content": "package foo\n\nvar a<caret> = \n\nfunc main() {\n    b := a\n}"
  },
  {
    "path": "testData/quickfixes/global-variable/simple.go",
    "content": "package foo\n\nfunc main() {\n    b := a<caret>\n}"
  },
  {
    "path": "testData/quickfixes/introduce-function/asFunctionArg-after.go",
    "content": "package main\n\nfunc main() {\n  a(1,asd())\n}\nfunc asd() string {\n <caret>\n}\n\nfunc a(i int, s string) {}"
  },
  {
    "path": "testData/quickfixes/introduce-function/asFunctionArg.go",
    "content": "package main\n\nfunc main() {\n  a(1,asd<caret>())\n}\n\nfunc a(i int, s string) {}"
  },
  {
    "path": "testData/quickfixes/introduce-function/asFunctionArg2-after.go",
    "content": "package main\n\nfunc main() {\n  a(asd())\n}\nfunc asd() (int, string) {\n <caret>\n}\n\nfunc a(i int, s string) {}"
  },
  {
    "path": "testData/quickfixes/introduce-function/asFunctionArg2.go",
    "content": "package main\n\nfunc main() {\n  a(asd<caret>())\n}\n\nfunc a(i int, s string) {}"
  },
  {
    "path": "testData/quickfixes/introduce-function/asFunctionArgWithoutReference-after.go",
    "content": "package main\n\nfunc main() {\n  a(1,asd())\n}\nfunc asd() interface{} {\n <caret>\n}\n"
  },
  {
    "path": "testData/quickfixes/introduce-function/asFunctionArgWithoutReference.go",
    "content": "package main\n\nfunc main() {\n  a(1,asd<caret>())\n}\n"
  },
  {
    "path": "testData/quickfixes/introduce-function/dontCreate.go",
    "content": "package main\n\nfunc main() {\n  asd<caret>()\n}\n\nfunc asd() {\n}"
  },
  {
    "path": "testData/quickfixes/introduce-function/funcWithOneParam-after.go",
    "content": "package main\n\nfunc main() {\n  var i int\n  asd(i)\n}\nfunc asd(i int) {\n <caret>\n}"
  },
  {
    "path": "testData/quickfixes/introduce-function/funcWithOneParam.go",
    "content": "package main\n\nfunc main() {\n  var i int\n  asd<caret>(i)\n}"
  },
  {
    "path": "testData/quickfixes/introduce-function/funcWithResultType-after.go",
    "content": "package main\n\nfunc main() {\n  var a int\n  a = asd()\n}\nfunc asd() int {\n <caret>\n}"
  },
  {
    "path": "testData/quickfixes/introduce-function/funcWithResultType.go",
    "content": "package main\n\nfunc main() {\n  var a int\n  a = asd<caret>()\n}"
  },
  {
    "path": "testData/quickfixes/introduce-function/funcWithThreeParams-after.go",
    "content": "package main\n\nfunc main() {\n  var (\n    i int\n    r struct {i int}\n    q string\n   )\n\n  asd(i, r, q)\n}\nfunc asd(i int, i2 struct {i int}, i3 string) {\n <caret>\n}"
  },
  {
    "path": "testData/quickfixes/introduce-function/funcWithThreeParams.go",
    "content": "package main\n\nfunc main() {\n  var (\n    i int\n    r struct {i int}\n    q string\n   )\n\n  asd<caret>(i, r, q)\n}"
  },
  {
    "path": "testData/quickfixes/introduce-function/funcWithThreeResultValues-after.go",
    "content": "package main\n\nfunc main() {\n  var (\n    i int\n    r struct {i int}\n    q string\n   )\n\n  i, r, q = asd()\n}\nfunc asd() (int, struct {i int}, string) {\n <caret>\n}"
  },
  {
    "path": "testData/quickfixes/introduce-function/funcWithThreeResultValues.go",
    "content": "package main\n\nfunc main() {\n  var (\n    i int\n    r struct {i int}\n    q string\n   )\n\n  i, r, q = asd<caret>()\n}"
  },
  {
    "path": "testData/quickfixes/introduce-function/funcWithUnknownResultType-after.go",
    "content": "package main\n\nfunc main() {\n  a = asd()\n}\nfunc asd() interface{} {\n <caret>\n}"
  },
  {
    "path": "testData/quickfixes/introduce-function/funcWithUnknownResultType.go",
    "content": "package main\n\nfunc main() {\n  a = asd<caret>()\n}"
  },
  {
    "path": "testData/quickfixes/introduce-function/funcWithUnknownTypeParam-after.go",
    "content": "package main\n\nfunc main() {\n  asd(q)\n}\nfunc asd(i interface{}) {\n <caret>\n}"
  },
  {
    "path": "testData/quickfixes/introduce-function/funcWithUnknownTypeParam.go",
    "content": "package main\n\nfunc main() {\n  asd<caret>(q)\n}"
  },
  {
    "path": "testData/quickfixes/introduce-function/inConstDeclaration.go",
    "content": "package main\n\nconst (\n  t = asd<caret>()\n)\n\nfunc main() {\n}"
  },
  {
    "path": "testData/quickfixes/introduce-function/shortVarDecl-after.go",
    "content": "package main\n\nfunc main() {\n  i, g, q := asd()\n}\nfunc asd() (interface{}, interface{}, interface{}) {\n <caret>\n}"
  },
  {
    "path": "testData/quickfixes/introduce-function/shortVarDecl.go",
    "content": "package main\n\nfunc main() {\n  i, g, q := asd<caret>()\n}"
  },
  {
    "path": "testData/quickfixes/introduce-function/simpleFunction-after.go",
    "content": "package main\n\nfunc main() {\n  asd()\n}\nfunc asd() {\n <caret>\n}"
  },
  {
    "path": "testData/quickfixes/introduce-function/simpleFunction.go",
    "content": "package main\n\nfunc main() {\n  asd<caret>()\n}"
  },
  {
    "path": "testData/quickfixes/introduce-function/varSpec-after.go",
    "content": "package main\n\nfunc main() {\n  var (\n    q, w, e string\n    a, b, c int  = asd()\n  )\n}\nfunc asd() (int, int, int) {\n <caret>\n}"
  },
  {
    "path": "testData/quickfixes/introduce-function/varSpec.go",
    "content": "package main\n\nfunc main() {\n  var (\n    q, w, e string\n    a, b, c int  = asd<caret>()\n  )\n}"
  },
  {
    "path": "testData/quickfixes/introduce-function/withChan-after.go",
    "content": "package main\n\nfunc main() {\n  var (\n    i chan chan int\n   )\n\n  asd(i)\n}\nfunc asd(ints chan chan int) {\n <caret>\n}"
  },
  {
    "path": "testData/quickfixes/introduce-function/withChan.go",
    "content": "package main\n\nfunc main() {\n  var (\n    i chan chan int\n   )\n\n  as<caret>d(i)\n}"
  },
  {
    "path": "testData/quickfixes/local-constant/if-after.go",
    "content": "package foo\n\nfunc main() {\n\tconst a =\n\tif a {\n\t\treturn 1\n\t}\n}"
  },
  {
    "path": "testData/quickfixes/local-constant/if.go",
    "content": "package foo\n\nfunc main() {\n\tif a<caret> {\n\t\treturn 1\n\t}\n}"
  },
  {
    "path": "testData/quickfixes/local-constant/onAssignment.go",
    "content": "package foo\n\nfunc main() {\n    a<caret> = 1\n}"
  },
  {
    "path": "testData/quickfixes/local-constant/onChanRead.go",
    "content": "package foo\n\nfunc main() {\n    a<caret> <- Struct{\"foo\"}\n}"
  },
  {
    "path": "testData/quickfixes/local-constant/onTopLevel.go",
    "content": "package main\n\nvar b = a<caret>"
  },
  {
    "path": "testData/quickfixes/local-constant/resolved-after.go",
    "content": "package foo\n\nfunc main() {\n\tif true {\n\t\ta := 123\n\t\t_ = a\n\t}\n\tconst a =\n\tb := a\n}"
  },
  {
    "path": "testData/quickfixes/local-constant/resolved.go",
    "content": "package foo\n\nfunc main() {\n\tif true {\n\t\ta := 123\n\t\t_ = a\n\t}\n\tb := a<caret>\n}"
  },
  {
    "path": "testData/quickfixes/local-constant/simple-after.go",
    "content": "package foo\n\nfunc main() {\n\tconst a =\n\tb := a\n}"
  },
  {
    "path": "testData/quickfixes/local-constant/simple.go",
    "content": "package foo\n\nfunc main() {\n\tb := a<caret>\n}"
  },
  {
    "path": "testData/quickfixes/local-constant/unresolved-after.go",
    "content": "package foo\n\nfunc main() {\n\tconst a =\n\tif true {\n\t\t_ = a\n\t}\n\tb := a\n}"
  },
  {
    "path": "testData/quickfixes/local-constant/unresolved.go",
    "content": "package foo\n\nfunc main() {\n\tif true {\n\t\t_ = a\n\t}\n\tb := a<caret>\n}"
  },
  {
    "path": "testData/quickfixes/local-variable/if-after.go",
    "content": "package foo\n\nfunc main() {\n\ta := \n\tif a {\n\t\treturn 1\n\t}\n}"
  },
  {
    "path": "testData/quickfixes/local-variable/if.go",
    "content": "package foo\n\nfunc main() {\n\tif a<caret> {\n\t\treturn 1\n\t}\n}"
  },
  {
    "path": "testData/quickfixes/local-variable/onTopLevel.go",
    "content": "package main\n\nvar b = a<caret>"
  },
  {
    "path": "testData/quickfixes/local-variable/resolved-after.go",
    "content": "package foo\n\nfunc main() {\n\tif true {\n\t\ta := 123\n\t\t_ = a\n\t}\n\ta :=\n\tb := a\n}"
  },
  {
    "path": "testData/quickfixes/local-variable/resolved.go",
    "content": "package foo\n\nfunc main() {\n\tif true {\n\t\ta := 123\n\t\t_ = a\n\t}\n\tb := a<caret>\n}"
  },
  {
    "path": "testData/quickfixes/local-variable/simple-after.go",
    "content": "package foo\n\nfunc main() {\n\ta<caret> := \n\tb := a\n}"
  },
  {
    "path": "testData/quickfixes/local-variable/simple.go",
    "content": "package foo\n\nfunc main() {\n\tb := a<caret>\n}"
  },
  {
    "path": "testData/quickfixes/local-variable/unresolved-after.go",
    "content": "package foo\n\nfunc main() {\n\ta :=\n\tif true {\n\t\t_ = a\n\t}\n\tb := a\n}"
  },
  {
    "path": "testData/quickfixes/local-variable/unresolved.go",
    "content": "package foo\n\nfunc main() {\n\tif true {\n\t\t_ = a\n\t}\n\tb := a<caret>\n}"
  },
  {
    "path": "testData/quickfixes/multiple-packages/a-after.go",
    "content": "package a"
  },
  {
    "path": "testData/quickfixes/multiple-packages/a.go",
    "content": "package a"
  },
  {
    "path": "testData/quickfixes/multiple-packages/b-after.go",
    "content": "package a"
  },
  {
    "path": "testData/quickfixes/multiple-packages/b.go",
    "content": "package b"
  },
  {
    "path": "testData/quickfixes/multiple-packages/b_test-after.go",
    "content": "package a_test"
  },
  {
    "path": "testData/quickfixes/multiple-packages/b_test.go",
    "content": "package b_test"
  },
  {
    "path": "testData/quickfixes/multiple-packages/c_test-after.go",
    "content": "package a"
  },
  {
    "path": "testData/quickfixes/multiple-packages/c_test.go",
    "content": "package c"
  },
  {
    "path": "testData/quickfixes/rename-function/simple-after.go",
    "content": "package foo\n\nfunc _() {\n}"
  },
  {
    "path": "testData/quickfixes/rename-function/simple.go",
    "content": "package foo\n\nfunc unuse<caret>d() {\n}"
  },
  {
    "path": "testData/quickfixes/rename-var/prohibited.go",
    "content": "package foo\n\nfunc main() {\n    a, <caret>b := demo()\n    _ = a\n    _ = b\n}"
  },
  {
    "path": "testData/quickfixes/rename-var/renameAndReplaceWithAssignmentOnRange-after.go",
    "content": "package foo\n\nfunc main() {\n\tfor _ = range \"asdf\" {\n\t}\n}"
  },
  {
    "path": "testData/quickfixes/rename-var/renameAndReplaceWithAssignmentOnRange.go",
    "content": "package foo\n\nfunc main() {\n\tfor f<caret>oo := range \"asdf\"{\n\t}\n}"
  },
  {
    "path": "testData/quickfixes/rename-var/renameAndReplaceWithAssignment_1-after.go",
    "content": "package foo\n\nfunc main() {\n    _, bar := 0\n}"
  },
  {
    "path": "testData/quickfixes/rename-var/renameAndReplaceWithAssignment_1.go",
    "content": "package foo\n\nfunc main() {\n    f<caret>oo, bar := 0\n}"
  },
  {
    "path": "testData/quickfixes/rename-var/renameAndReplaceWithAssignment_2-after.go",
    "content": "package foo\n\nfunc main() {\n\t_, _ = 0\n}"
  },
  {
    "path": "testData/quickfixes/rename-var/renameAndReplaceWithAssignment_2.go",
    "content": "package foo\n\nfunc main() {\n    fo<caret>o, _ := 0\n}"
  },
  {
    "path": "testData/quickfixes/rename-var/renameAndReplaceWithAssignment_3-after.go",
    "content": "package foo\n\nfunc main() {\n\t_ = 0\n}"
  },
  {
    "path": "testData/quickfixes/rename-var/renameAndReplaceWithAssignment_3.go",
    "content": "package foo\n\nfunc main() {\n    fo<caret>o := 0\n}"
  },
  {
    "path": "testData/quickfixes/rename-var/simple-after.go",
    "content": "package foo\n\nfunc main() {\n    a, <caret>_ := demo()\n    _ = a\n}"
  },
  {
    "path": "testData/quickfixes/rename-var/simple.go",
    "content": "package foo\n\nfunc main() {\n    a, <caret>b := demo()\n    _ = a\n}"
  },
  {
    "path": "testData/quickfixes/replace-with-assignment/rangeClause-after.go",
    "content": "package main\n\nfunc main() {\n\tc := make(chan int)\n\tfor _ = range \"asd\" {\n\t\tfmt.Printf(\"%v\\n\", 1)\n\t}\n}"
  },
  {
    "path": "testData/quickfixes/replace-with-assignment/rangeClause.go",
    "content": "package main\n\nfunc main() {\n\tc := make(chan int)\n\tfor <caret>_ := range \"asd\"  {\n\t\tfmt.Printf(\"%v\\n\", 1)\n\t}\n}"
  },
  {
    "path": "testData/quickfixes/replace-with-assignment/recvStatement-after.go",
    "content": "package main\n\nfunc main() {\n\tc := make(chan int)\n\tbuzz := 0\n\tprintln(buzz)\n\n\tbuzz = <-c\n}"
  },
  {
    "path": "testData/quickfixes/replace-with-assignment/recvStatement.go",
    "content": "package main\n\nfunc main() {\n\tc := make(chan int)\n\tbuzz := 0\n\tprintln(buzz)\n\t\n\tbu<caret>zz := <-c\n}"
  },
  {
    "path": "testData/quickfixes/replace-with-assignment/recvStatementInSelect-after.go",
    "content": "package main\n\nfunc main() {\n\tc := make(chan int)\n\tselect {\n\tcase _ = <-c:\n\t\tprintln(\"Ololo\")\n\tdefault:\n\t}\n}"
  },
  {
    "path": "testData/quickfixes/replace-with-assignment/recvStatementInSelect.go",
    "content": "package main\n\nfunc main() {\n\tc := make(chan int)\n\tselect {\n\tcase <caret>_ := <-c:\n\t\tprintln(\"Ololo\")\n\tdefault:\n\t}\n}"
  },
  {
    "path": "testData/quickfixes/replace-with-assignment/severalAssignments-after.go",
    "content": "package main\n\nfunc main() {\n\tvar a, b = 1, 2\n\ta, b = 3, 4\n}"
  },
  {
    "path": "testData/quickfixes/replace-with-assignment/severalAssignments.go",
    "content": "package main\n\nfunc main() {\n\tvar a, b = 1, 2\n\ta, b<caret> := 3, 4\n}"
  },
  {
    "path": "testData/quickfixes/replace-with-assignment/simple-after.go",
    "content": "package main\n\nfunc main() {\n\tvar a = 1\n\ta = 3\n}"
  },
  {
    "path": "testData/quickfixes/replace-with-assignment/simple.go",
    "content": "package main\n\nfunc main() {\n\tvar a = 1\n\ta<caret> := 3\n}"
  },
  {
    "path": "testData/quickfixes/replace-with-declaration/onAssignment-after.go",
    "content": "package foo\n\nfunc main() {\n\ta := 1\n}"
  },
  {
    "path": "testData/quickfixes/replace-with-declaration/onAssignment.go",
    "content": "package foo\n\nfunc main() {\n    a<caret> = 1\n}"
  },
  {
    "path": "testData/quickfixes/replace-with-declaration/onChanRead.go",
    "content": "package foo\n\nfunc main() {\n    a<caret> <- Struct{\"foo\"}\n}"
  },
  {
    "path": "testData/quickfixes/replace-with-declaration/onRange-after.go",
    "content": "package foo\n\nfunc main() {\n    for a := range os.Args {\n\n    }\n}"
  },
  {
    "path": "testData/quickfixes/replace-with-declaration/onRange.go",
    "content": "package foo\n\nfunc main() {\n    for a<caret> = range os.Args {\n    \n    }\n}"
  },
  {
    "path": "testData/quickfixes/replace-with-declaration/onRecv-after.go",
    "content": "package foo\n\nfunc main() {\n\tselect {\n\tcase foo := bar:\n\t}\n}"
  },
  {
    "path": "testData/quickfixes/replace-with-declaration/onRecv.go",
    "content": "package foo\n\nfunc main() {\n\tselect {\n\tcase fo<caret>o = bar: \n\t}\n}"
  },
  {
    "path": "testData/quickfixes/replace-with-declaration/onTopLevel.go",
    "content": "package main\n\nvar b = a<caret>"
  },
  {
    "path": "testData/quickfixes/replace-with-select/simple-after.go",
    "content": "package foo\n\nfunc _() {\n\tselect {\n\t}\n}"
  },
  {
    "path": "testData/quickfixes/replace-with-select/simple.go",
    "content": "package foo\n\nfunc _() {\n    for<caret> {\n    }\n}"
  },
  {
    "path": "testData/quickfixes/string-index-is-byte/equalsCondition-after.go",
    "content": "package foo\n\nfunc main() {\n\tx := \"text\"\n\tif <caret>x[0] == 't' {\n\n\t}\n}"
  },
  {
    "path": "testData/quickfixes/string-index-is-byte/equalsCondition.go",
    "content": "package foo\n\nfunc main() {\n\tx := \"text\"\n\tif <caret>x[0] == \"t\" {\n\n\t}\n}"
  },
  {
    "path": "testData/quickfixes/string-index-is-byte/greaterCondition-after.go",
    "content": "package foo\n\nfunc main() {\n\tx := \"text\"\n\tif <caret>x[0] > 't' {\n\n\t}\n}"
  },
  {
    "path": "testData/quickfixes/string-index-is-byte/greaterCondition.go",
    "content": "package foo\n\nfunc main() {\n\tx := \"text\"\n\tif <caret>x[0] > \"t\" {\n\n\t}\n}"
  },
  {
    "path": "testData/quickfixes/string-index-is-byte/greaterOrEqualsCondition-after.go",
    "content": "package foo\n\nfunc main() {\n\tx := \"text\"\n\tif <caret>x[0] >= 't' {\n\n\t}\n}"
  },
  {
    "path": "testData/quickfixes/string-index-is-byte/greaterOrEqualsCondition.go",
    "content": "package foo\n\nfunc main() {\n\tx := \"text\"\n\tif <caret>x[0] >= \"t\" {\n\n\t}\n}"
  },
  {
    "path": "testData/quickfixes/string-index-is-byte/lessCondition-after.go",
    "content": "package foo\n\nfunc main() {\n\tx := \"text\"\n\tif <caret>x[0] < 't' {\n\n\t}\n}"
  },
  {
    "path": "testData/quickfixes/string-index-is-byte/lessCondition.go",
    "content": "package foo\n\nfunc main() {\n\tx := \"text\"\n\tif <caret>x[0] < \"t\" {\n\n\t}\n}"
  },
  {
    "path": "testData/quickfixes/string-index-is-byte/lessOrEqualsCondition-after.go",
    "content": "package foo\n\nfunc main() {\n\tx := \"text\"\n\tif <caret>x[0] <= 't' {\n\n\t}\n}"
  },
  {
    "path": "testData/quickfixes/string-index-is-byte/lessOrEqualsCondition.go",
    "content": "package foo\n\nfunc main() {\n\tx := \"text\"\n\tif <caret>x[0] <= \"t\" {\n\n\t}\n}"
  },
  {
    "path": "testData/quickfixes/string-index-is-byte/literals-after.go",
    "content": "package foo\n\nfunc main() {\n\tx := \"text\"\n\tif <caret>x[0] == '\\n' {\n\n\t}\n}"
  },
  {
    "path": "testData/quickfixes/string-index-is-byte/literals.go",
    "content": "package foo\n\nfunc main() {\n\tx := \"text\"\n\tif <caret>x[0] == \"\\n\" {\n\n\t}\n}"
  },
  {
    "path": "testData/quickfixes/string-index-is-byte/longLiteral-after.go",
    "content": "package foo\n\nfunc main() {\n\tx := \"text\"\n\tif <caret>x[0] == '\\U00101234' {\n\n\t}\n}"
  },
  {
    "path": "testData/quickfixes/string-index-is-byte/longLiteral.go",
    "content": "package foo\n\nfunc main() {\n\tx := \"text\"\n\tif <caret>x[0] == \"\\U00101234\" {\n\n\t}\n}"
  },
  {
    "path": "testData/quickfixes/string-index-is-byte/moreThanOneCharInString.go",
    "content": "package foo\n\nfunc main() {\n\tx := \"text\"\n\tif <caret><error descr=\"Mismatched types: byte and string\">x[0] == \"tex\"</error> {\n\n\t}\n}"
  },
  {
    "path": "testData/quickfixes/string-index-is-byte/notEqualsCondition-after.go",
    "content": "package foo\n\nfunc main() {\n\tx := \"text\"\n\tif <caret>x[0] != 't' {\n\n\t}\n}"
  },
  {
    "path": "testData/quickfixes/string-index-is-byte/notEqualsCondition.go",
    "content": "package foo\n\nfunc main() {\n\tx := \"text\"\n\tif <caret>x[0] != \"t\" {\n\n\t}\n}"
  },
  {
    "path": "testData/quickfixes/string-index-is-byte/reverse-after.go",
    "content": "package foo\n\nfunc main() {\n\tx := \"text\"\n\tif 't'<caret> == x[1] {\n\n\t}\n}"
  },
  {
    "path": "testData/quickfixes/string-index-is-byte/reverse.go",
    "content": "package foo\n\nfunc main() {\n\tx := \"text\"\n\tif \"t\"<caret> == x[1] {\n\n\t}\n}"
  },
  {
    "path": "testData/quickfixes/string-index-is-byte/sliceFromLeft.go",
    "content": "package foo\n\nfunc main() {\n\tx := \"text\"\n\tif <caret>\"t\" == x[1:] {\n\n\t}\n}"
  },
  {
    "path": "testData/quickfixes/string-index-is-byte/sliceFromRight.go",
    "content": "package foo\n\nfunc main() {\n\tx := \"text\"\n\tif <caret>\"t\" == x[:1] {\n\n\t}\n}"
  },
  {
    "path": "testData/quickfixes/string-index-is-byte/sliceUnbound.go",
    "content": "package foo\n\nfunc main() {\n\tx := \"text\"\n\tif <caret>\"t\" == x[:] {\n\n\t}\n}"
  },
  {
    "path": "testData/refactor/introduce-variable/caretAfterRightParenthesis-after.go",
    "content": "package a\n\nfunc a() {\n\ti := 1 + 2\n\ta := i\n\tb := i\n}"
  },
  {
    "path": "testData/refactor/introduce-variable/caretAfterRightParenthesis.go",
    "content": "package a\n\nfunc a() {\n\ta := (1 + 2)<caret>\n\tb := (1 + 2)\n}"
  },
  {
    "path": "testData/refactor/introduce-variable/caretOnCallParenthesis-after.go",
    "content": "package a\n\nfunc a() {\n\ti := 1\n\tvar a = b(i)\n}\n\nfunc b(c int) int {\n\treturn 1\n}"
  },
  {
    "path": "testData/refactor/introduce-variable/caretOnCallParenthesis.go",
    "content": "package a\n\nfunc a() {\n\tvar a = b(1<caret>)\n}\n\nfunc b(c int) int {\n\treturn 1\n}"
  },
  {
    "path": "testData/refactor/introduce-variable/caretOnRightParenthesis-after.go",
    "content": "package a\n\nfunc a() {\n\ti := 2\n\ta := (1 + i)\n\tb := (1 + i)\n}"
  },
  {
    "path": "testData/refactor/introduce-variable/caretOnRightParenthesis.go",
    "content": "package a\n\nfunc a() {\n\ta := (1 + 2<caret>)\n\tb := (1 + 2)\n}"
  },
  {
    "path": "testData/refactor/introduce-variable/compositeLiteral-after.go",
    "content": "package main\n\ntype S struct{}\n\nfunc main() () {\n\ts := S{}\n\tfoo := s\n}\n"
  },
  {
    "path": "testData/refactor/introduce-variable/compositeLiteral.go",
    "content": "package main\n\ntype S struct{}\n\nfunc main() () {\n\tfoo := S<caret>{}\n}\n"
  },
  {
    "path": "testData/refactor/introduce-variable/conversion-after.go",
    "content": "package main\n\nfunc main() () {\n\tint := int(0)\n\tvar a int = int\n}\n\ntype int struct {}"
  },
  {
    "path": "testData/refactor/introduce-variable/conversion.go",
    "content": "package main\n\nfunc main() () {\n\tvar a int = <selection>in<caret>t(0)</selection>\n}\n\ntype int struct {}"
  },
  {
    "path": "testData/refactor/introduce-variable/doNotSuggestKeywordBasedOnCallName-after.go",
    "content": "package a\n\nfunc a(s string) {\n\ti := Func()\n}\n\nfunc Func() int {\n\n}"
  },
  {
    "path": "testData/refactor/introduce-variable/doNotSuggestKeywordBasedOnCallName.go",
    "content": "package a\n\nfunc a(s string) {\n\tFu<caret>nc()\n}\n\nfunc Func() int {\n\n}"
  },
  {
    "path": "testData/refactor/introduce-variable/doNotSuggestKeywordBasedOnType-after.go",
    "content": "package a\n\nfunc a(s string) {\n\tfoo := 1\n\ti := Foo()\n}\n\ntype Func int\n\nfunc Foo() Func {\n\t\n}"
  },
  {
    "path": "testData/refactor/introduce-variable/doNotSuggestKeywordBasedOnType.go",
    "content": "package a\n\nfunc a(s string) {\n\tfoo := 1\n\tFo<caret>o()\n}\n\ntype Func int\n\nfunc Foo() Func {\n\t\n}"
  },
  {
    "path": "testData/refactor/introduce-variable/doNotSuggestNameEqualsToType-after.go",
    "content": "package a\n\nfunc a(s string) {\n\ti := s\n\tprintln(i)\n}"
  },
  {
    "path": "testData/refactor/introduce-variable/doNotSuggestNameEqualsToType.go",
    "content": "package a\n\nfunc a(s string) {\n\tprintln(<caret>s)\n}"
  },
  {
    "path": "testData/refactor/introduce-variable/extractFunctionLiteral-after.go",
    "content": "package a\n\nfunc a(s string) {\n\ti := func(int, int) {}\n}"
  },
  {
    "path": "testData/refactor/introduce-variable/extractFunctionLiteral.go",
    "content": "package a\n\nfunc a(s string) {\n\tfun<caret>c(int, int) {}\n}"
  },
  {
    "path": "testData/refactor/introduce-variable/extractSingleExpressionStatement_1-after.go",
    "content": "package a\n\nfunc _() {\n\ti := 2 + 1\n\tvar _ int = i\n}"
  },
  {
    "path": "testData/refactor/introduce-variable/extractSingleExpressionStatement_1.go",
    "content": "package a\n\nfunc _() {\n\t<selection>2 + <caret>1</selection>\n\tvar _ int = 2 + 1\n}"
  },
  {
    "path": "testData/refactor/introduce-variable/extractSingleExpressionStatement_2-after.go",
    "content": "package a\n\nfunc _() {\n\ti := 2 + 1\n\tvar _ int = i\n\ti\n}"
  },
  {
    "path": "testData/refactor/introduce-variable/extractSingleExpressionStatement_2.go",
    "content": "package a\n\nfunc _() {\n\tvar _ int = 2 + 1\n\t<selection>2 + <caret>1</selection>\n}"
  },
  {
    "path": "testData/refactor/introduce-variable/extractSingleExpressionStatement_3-after.go",
    "content": "package a\n\nfunc _() {\n\ti := 2 + 1\n\ti\n}"
  },
  {
    "path": "testData/refactor/introduce-variable/extractSingleExpressionStatement_3.go",
    "content": "package a\n\nfunc _() {\n\t<selection>2 + <caret>1</selection>\n\t2 + 1\n}"
  },
  {
    "path": "testData/refactor/introduce-variable/indexedExpression-after.go",
    "content": "package main\n\nfunc main() () {\n\ts := make([]String, 5)\n\tstring := s[2]\n\tprintln(s[1] + string)\n}\n\ntype String string"
  },
  {
    "path": "testData/refactor/introduce-variable/indexedExpression.go",
    "content": "package main\n\nfunc main() () {\n\ts := make([]String, 5)\n\tprintln(s[1] + <selection>s<caret>[2]</selection>)\n}\n\ntype String string"
  },
  {
    "path": "testData/refactor/introduce-variable/nameSuggestOnArrayType-after.go",
    "content": "package a\n\nfunc a(s []string) {\n\tstrings := s\n\tprintln(strings)\n}"
  },
  {
    "path": "testData/refactor/introduce-variable/nameSuggestOnArrayType.go",
    "content": "package a\n\nfunc a(s []string) {\n\tprintln(<caret>s)\n}"
  },
  {
    "path": "testData/refactor/introduce-variable/nameSuggestOnDefaultName-after.go",
    "content": "package a\n\nfunc a() {\n\ti := 1\n\ti2 := 1 + 2\n\ta := i2\n}"
  },
  {
    "path": "testData/refactor/introduce-variable/nameSuggestOnDefaultName.go",
    "content": "package a\n\nfunc a() {\n\ti := 1\n\ta := 1 +<caret> 2\n}"
  },
  {
    "path": "testData/refactor/introduce-variable/nameSuggestOnGetterFunction-after.go",
    "content": "package a\n\nfunc a() {\n\toffset := getMyOffset()\n\ta := offset\n}\n\nfunc getMyOffset() int {\n\treturn 42;\n}"
  },
  {
    "path": "testData/refactor/introduce-variable/nameSuggestOnGetterFunction.go",
    "content": "package a\n\nfunc a() {\n\ta := getMyOffset()<caret>\n}\n\nfunc getMyOffset() int {\n\treturn 42;\n}"
  },
  {
    "path": "testData/refactor/introduce-variable/nameSuggestOnParamName-after.go",
    "content": "package a\n\nfunc a(i int) {\n\ti2 := 1 + 2\n\ta := i2\n}"
  },
  {
    "path": "testData/refactor/introduce-variable/nameSuggestOnParamName.go",
    "content": "package a\n\nfunc a(i int) {\n\ta := 1 +<caret> 2\n}"
  },
  {
    "path": "testData/refactor/introduce-variable/nameSuggestOnType-after.go",
    "content": "package a\n\nfunc a(s String) {\n\tstring := s\n\tprintln(string)\n}\n\ntype String string"
  },
  {
    "path": "testData/refactor/introduce-variable/nameSuggestOnType.go",
    "content": "package a\n\nfunc a(s String) {\n\tprintln(<caret>s)\n}\n\ntype String string"
  },
  {
    "path": "testData/refactor/introduce-variable/replaceAll-after.go",
    "content": "package a\n\nfunc a() {\n\ti := 1 + 2\n\tvar b = i\n\tvar c = 123\n\tvar d = i\n}"
  },
  {
    "path": "testData/refactor/introduce-variable/replaceAll.go",
    "content": "package a\n\nfunc a() {\n\tvar b = 1 + 2\n\tvar c = 123\n\tvar d = 1 +<caret> 2\n}"
  },
  {
    "path": "testData/refactor/introduce-variable/replaceOnly-after.go",
    "content": "package a\n\nfunc a() {\n\tvar b = 1 + 2\n\tvar c = 123\n\ti := 1 + 2\n\tvar d = i\n}"
  },
  {
    "path": "testData/refactor/introduce-variable/replaceOnly.go",
    "content": "package a\n\nfunc a() {\n\tvar b = 1 + 2\n\tvar c = 123\n\tvar d = 1 +<caret> 2\n}"
  },
  {
    "path": "testData/refactor/introduce-variable/topLevelExpression.go",
    "content": "package a\n\nvar a = 1 +<caret> 2"
  },
  {
    "path": "testData/refactor/introduce-variable/twoOccurrences-after.go",
    "content": "package a\n\nfunc a() {\n\tvar i, g int\n\n\ti2 := g\n\ti2 = i2 + 2\n}"
  },
  {
    "path": "testData/refactor/introduce-variable/twoOccurrences.go",
    "content": "package a\n\nfunc a() {\n\tvar i, g int\n\n        <selection>g = g + 2</selection>\n}"
  },
  {
    "path": "testData/refactor/introduce-variable/voidCallExpression.go",
    "content": "package a\n\nimport \"fmt\"\n\nfunc a() {\n\ta := fmt.Println()<caret>\n}"
  },
  {
    "path": "testData/refactor/introduce-variable/voidExpression.go",
    "content": "package a\n\nimport \"fmt\"\n\nfunc a() {\n\ta := fmt.<caret>Println()\n}"
  },
  {
    "path": "testData/refactor/introduce-variable/wrongSelection.go",
    "content": "package a\n\nfunc a() {\n\tvar a <selection>= 1 +<caret> 2</selection>\n}"
  },
  {
    "path": "testData/regexp/injectingAndHighlighting.go",
    "content": "package main\n\nimport \"regexp\"\n\nfunc main() {\n\tvar _ = regexp.MustCompile(`\\\\n`)\n\tvar _ = regexp.MustCompile(`[a[a-z]b]{2,}`)\n\n\tvar _ = regexp.MustCompile(`x*`);\n\tvar _ = regexp.MustCompile(`x+`);\n\tvar _ = regexp.MustCompile(`x?`);\n\tvar _ = regexp.MustCompile(`x{1,4}`);\n\tvar _ = regexp.MustCompile(`x<weak_warning descr=\"Repetition range replaceable by '+'\">{1,}</weak_warning>`);\n\tvar _ = regexp.MustCompile(`x<weak_warning descr=\"Single repetition\">{1}</weak_warning>`);\n\tvar _ = regexp.MustCompile(`x*?`);\n\tvar _ = regexp.MustCompile(`x+?`);\n\tvar _ = regexp.MustCompile(`x??`);\n\tvar _ = regexp.MustCompile(`x{1,2}?`);\n\tvar _ = regexp.MustCompile(`x<weak_warning descr=\"Repetition range replaceable by '+'\">{1,}?</weak_warning>`);\n\tvar _ = regexp.MustCompile(`x{3}?`);\n\n\tvar _ = regexp.MustCompile(`\\p{^Han}`)\n\tvar _ = regexp.MustCompile(`.`)\n\tvar _ = regexp.MustCompile(`[xyz]`)\n\tvar _ = regexp.MustCompile(`[^xyz]`)\n\tvar _ = regexp.MustCompile(`\\d`)\n\tvar _ = regexp.MustCompile(`\\D`)\n\tvar _ = regexp.MustCompile(`[[:alpha:]]`)\n\tvar _ = regexp.MustCompile(`[^[:alpha:]]`)\n\tvar _ = regexp.MustCompile(`[[^:alph<warning descr=\"Duplicate character 'a' in character class\">a</warning><warning descr=\"Duplicate character ':' in character class\">:</warning>]]`)\n\tvar _ = regexp.MustCompile(`\\pN`)\n\tvar _ = regexp.MustCompile(`\\p{Han}`)\n\tvar _ = regexp.MustCompile(`\\PN`)\n\tvar _ = regexp.MustCompile(`\\P{Han}`)\n\tvar _ = regexp.MustCompile(`\\P{^Coptic}`)\n\tvar _ = regexp.MustCompile(`y`)\n\tvar _ = regexp.MustCompile(`|y`)\n\tvar _ = regexp.MustCompile(`(re)`)\n\tvar _ = regexp.MustCompile(`(?P<name>re)`)\n\tvar _ = regexp.MustCompile(`(?:re)`)\n\tvar _ = regexp.MustCompile(`(?<error descr=\"Unknown inline option flag\">f</error><error descr=\"Unknown inline option flag\">l</error><error descr=\"Unknown inline option flag\">a</error><error descr=\"Unknown inline option flag\">g</error>s)`)\n\tvar _ = regexp.MustCompile(`(?<error descr=\"Unknown inline option flag\">f</error><error descr=\"Unknown inline option flag\">l</error><error descr=\"Unknown inline option flag\">a</error><error descr=\"Unknown inline option flag\">g</error>s:re)`)\n\n\tvar _ = regexp.MustCompile(`(?im-sU)`)\n\tvar _ = regexp.MustCompile(`(?imsU:re)`)\n\tvar _ = regexp.MustCompile(`(?ims<error descr=\"Unknown inline option flag\">G</error>U:re)`)\n\n\tvar _ = regexp.MustCompile(`^`)\n\tvar _ = regexp.MustCompile(`$`)\n\tvar _ = regexp.MustCompile(`\\A`)\n\tvar _ = regexp.MustCompile(`\\b`)\n\tvar _ = regexp.MustCompile(`\\B`)\n\tvar _ = regexp.MustCompile(`\\z`)\n\tvar _ = regexp.MustCompile(`\\a`)\n\tvar _ = regexp.MustCompile(`\\f`)\n\tvar _ = regexp.MustCompile(`\\t`)\n\tvar _ = regexp.MustCompile(`\\n`)\n\tvar _ = regexp.MustCompile(`\\r`)\n\tvar _ = regexp.MustCompile(`\\v`)\n\tvar _ = regexp.MustCompile(`\\*`)\n\tvar _ = regexp.MustCompile(`\\123`)\n\tvar _ = regexp.MustCompile(`\\x7F`)\n\tvar _ = regexp.MustCompile(`\\x{10FFFF}`)\n\tvar _ = regexp.MustCompile(`\\Q...\\E`)\n\tvar _ = regexp.MustCompile(``)\n\tvar _ = regexp.MustCompile(`-Z`)\n\tvar _ = regexp.MustCompile(`\\d`)\n\tvar _ = regexp.MustCompile(`[:fo<warning descr=\"Duplicate character 'o' in character class\">o</warning><warning descr=\"Duplicate character ':' in character class\">:</warning>]`)\n\tvar _ = regexp.MustCompile(`\\p{Han}`)\n\tvar _ = regexp.MustCompile(`\\pC`)\n\tvar _ = regexp.MustCompile(`[\\d]`)\n\tvar _ = regexp.MustCompile(`[^\\d]`)\n\tvar _ = regexp.MustCompile(`[\\D]`)\n\tvar _ = regexp.MustCompile(`[^\\D]`)\n\tvar _ = regexp.MustCompile(`[[:cntrl:]]`)\n\tvar _ = regexp.MustCompile(`[^[:cntrl:]]`)\n\tvar _ = regexp.MustCompile(`[\\p{Han}]`)\n\tvar _ = regexp.MustCompile(`[^\\p{Han}]`)\n\tvar _ = regexp.MustCompile(`\\d`)\n\tvar _ = regexp.MustCompile(`\\D`)\n\tvar _ = regexp.MustCompile(`\\s`)\n\tvar _ = regexp.MustCompile(`\\S`)\n\tvar _ = regexp.MustCompile(`\\w`)\n\tvar _ = regexp.MustCompile(`\\W`)\n\tvar _ = regexp.MustCompile(`[[:alnum:]]`)\n\tvar _ = regexp.MustCompile(`[[:alpha:]]`)\n\tvar _ = regexp.MustCompile(`[[:ascii:]]`)\n\tvar _ = regexp.MustCompile(`[[:blank:]]`)\n\tvar _ = regexp.MustCompile(`[[:cntrl:]]`)\n\tvar _ = regexp.MustCompile(`[[:digit:]]`)\n\tvar _ = regexp.MustCompile(`[[:graph:]]`)\n\tvar _ = regexp.MustCompile(`[[:lower:]]`)\n\tvar _ = regexp.MustCompile(`[[:print:]]`)\n\tvar _ = regexp.MustCompile(`[[:punct:]]`)\n\tvar _ = regexp.MustCompile(`[[:space:]]`)\n\tvar _ = regexp.MustCompile(`[[:upper:]]`)\n\tvar _ = regexp.MustCompile(`[[:word:]]`)\n\tvar _ = regexp.MustCompile(`[[:xdigit:]]`)\n\n\tvar _ = regexp.MustCompile(`[<error descr=\"Unknown POSIX character class\">[:</error><error descr=\"POSIX character class name expected\">^</error><error descr=\"Pattern expected\">a</error>lpha<error descr=\"Pattern expected\">:</error>]<error descr=\"Pattern expected\">]</error>`) // must be fixed in platform\n}"
  },
  {
    "path": "testData/running/producer/directory.xml",
    "content": "<configurations>\n  <configurations name=\"Build import/path and run\" class=\"GoApplicationConfiguration\">\n    <module name=\"light_idea_test_case\" />\n    <kind value=\"PACKAGE\" />\n    <package value=\"import/path\" />\n  </configurations>\n  <configurations name=\"All in 'path'\" class=\"GoTestRunConfiguration\">\n    <module name=\"light_idea_test_case\" />\n    <working_directory value=\"/src/import/path\" />\n    <framework value=\"gotest\" />\n    <kind value=\"DIRECTORY\" />\n    <directory value=\"/src/import/path\" />\n  </configurations>\n  <configurations name=\"gocheck package 'path'\" class=\"GoTestRunConfiguration\">\n    <module name=\"light_idea_test_case\" />\n    <working_directory value=\"/src/import/path\" />\n    <framework value=\"gocheck\" />\n    <kind value=\"DIRECTORY\" />\n    <directory value=\"/src/import/path\" />\n  </configurations>\n  <configurations name=\"gobench package 'path'\" class=\"GoTestRunConfiguration\">\n    <module name=\"light_idea_test_case\" />\n    <working_directory value=\"/src/import/path\" />\n    <framework value=\"gobench\" />\n    <kind value=\"DIRECTORY\" />\n    <directory value=\"/src/import/path\" />\n  </configurations>\n</configurations>"
  },
  {
    "path": "testData/running/producer/fileWithMain.go",
    "content": "package main\n\n<caret>\n\nfunc main() {\n\n}"
  },
  {
    "path": "testData/running/producer/fileWithMain.xml",
    "content": "<configurations>\n  <configurations name=\"go run fileWithMain.go\" class=\"GoRunFileConfiguration\">\n    <module name=\"light_idea_test_case\" />\n    <filePath value=\"/src/import/path/fileWithMain.go\" />\n  </configurations>\n  <configurations name=\"Build fileWithMain.go and run\" class=\"GoApplicationConfiguration\">\n    <module name=\"light_idea_test_case\" />\n    <filePath value=\"/src/import/path/fileWithMain.go\" />\n    <kind value=\"FILE\" />\n  </configurations>\n</configurations>"
  },
  {
    "path": "testData/running/producer/fileWithMainButNotMainPackage.go",
    "content": "package otherPackage\n\n<caret>\n\nfunc main() {\n\n}"
  },
  {
    "path": "testData/running/producer/fileWithMainButNotMainPackage.xml",
    "content": "<configurations />"
  },
  {
    "path": "testData/running/producer/fileWithoutMain.go",
    "content": "package main\n\n<caret>\n\nfunc init() {\n\n}"
  },
  {
    "path": "testData/running/producer/fileWithoutMain.xml",
    "content": "<configurations />"
  },
  {
    "path": "testData/running/producer/packageClause.go",
    "content": "package ma<caret>in\n\nfunc main() {\n\n}"
  },
  {
    "path": "testData/running/producer/packageClause.xml",
    "content": "<configurations>\n  <configurations name=\"go run packageClause.go\" class=\"GoRunFileConfiguration\">\n    <module name=\"light_idea_test_case\" />\n    <filePath value=\"/src/import/path/packageClause.go\" />\n  </configurations>\n  <configurations name=\"Build import/path and run\" class=\"GoApplicationConfiguration\">\n    <module name=\"light_idea_test_case\" />\n    <kind value=\"PACKAGE\" />\n    <package value=\"import/path\" />\n  </configurations>\n</configurations>"
  },
  {
    "path": "testData/running/producer/testFile_test.go",
    "content": "package main\n\n<caret>\n\nfunc main() {\n\n}"
  },
  {
    "path": "testData/running/producer/testFile_test.xml",
    "content": "<configurations />"
  },
  {
    "path": "testData/selectWord/arguments/after1.go",
    "content": "package main\n\nimport \"fmt\"\n\nfunc main() {\n    s := \"hello\"\n    fmt.Printf(\"%s\", <selection><caret>s</selection>)\n}"
  },
  {
    "path": "testData/selectWord/arguments/after2.go",
    "content": "package main\n\nimport \"fmt\"\n\nfunc main() {\n    s := \"hello\"\n    fmt.Printf(<selection>\"%s\", <caret>s</selection>)\n}"
  },
  {
    "path": "testData/selectWord/arguments/after3.go",
    "content": "package main\n\nimport \"fmt\"\n\nfunc main() {\n    s := \"hello\"\n    fmt.Printf<selection>(\"%s\", <caret>s)</selection>\n}"
  },
  {
    "path": "testData/selectWord/arguments/after4.go",
    "content": "package main\n\nimport \"fmt\"\n\nfunc main() {\n    s := \"hello\"\n    <selection>fmt.Printf(\"%s\", <caret>s)</selection>\n}"
  },
  {
    "path": "testData/selectWord/arguments/after5.go",
    "content": "package main\n\nimport \"fmt\"\n\nfunc main() {\n    s := \"hello\"\n<selection>    fmt.Printf(\"%s\", <caret>s)\n</selection>}"
  },
  {
    "path": "testData/selectWord/arguments/before.go",
    "content": "package main\n\nimport \"fmt\"\n\nfunc main() {\n    s := \"hello\"\n    fmt.Printf(\"%s\", <caret>s)\n}"
  },
  {
    "path": "testData/selectWord/block/after1.go",
    "content": "package main\n\nfunc main() {\n    b, _ := foo()\n    <selection><caret>fmt</selection>.Println(b)\n}"
  },
  {
    "path": "testData/selectWord/block/after2.go",
    "content": "package main\n\nfunc main() {\n    b, _ := foo()\n    <selection><caret>fmt.Println</selection>(b)\n}"
  },
  {
    "path": "testData/selectWord/block/after3.go",
    "content": "package main\n\nfunc main() {\n    b, _ := foo()\n    <selection><caret>fmt.Println(b)</selection>\n}"
  },
  {
    "path": "testData/selectWord/block/after4.go",
    "content": "package main\n\nfunc main() {\n    b, _ := foo()\n<selection>    <caret>fmt.Println(b)\n</selection>}"
  },
  {
    "path": "testData/selectWord/block/after5.go",
    "content": "package main\n\nfunc main() {\n<selection>    b, _ := foo()\n    <caret>fmt.Println(b)\n</selection>}"
  },
  {
    "path": "testData/selectWord/block/before.go",
    "content": "package main\n\nfunc main() {\n    b, _ := foo()\n    <caret>fmt.Println(b)\n}"
  },
  {
    "path": "testData/selectWord/functionName/after1.go",
    "content": "package main\n\nfunc <selection>Func<caret>tionName</selection>(int a, string s) (byte, string) {\n\n}"
  },
  {
    "path": "testData/selectWord/functionName/after2.go",
    "content": "package main\n\nfunc <selection>Func<caret>tionName(int a, string s)</selection> (byte, string) {\n\n}"
  },
  {
    "path": "testData/selectWord/functionName/after3.go",
    "content": "package main\n\nfunc <selection>Func<caret>tionName(int a, string s) (byte, string)</selection> {\n\n}"
  },
  {
    "path": "testData/selectWord/functionName/after4.go",
    "content": "package main\n\n<selection>func Func<caret>tionName(int a, string s) (byte, string) {\n\n}</selection>"
  },
  {
    "path": "testData/selectWord/functionName/before.go",
    "content": "package main\n\nfunc Func<caret>tionName(int a, string s) (byte, string) {\n\n}"
  },
  {
    "path": "testData/selectWord/importString/after1.go",
    "content": "package main\n\nimport \"database/<selection>sq<caret>l</selection>/driver\""
  },
  {
    "path": "testData/selectWord/importString/after2.go",
    "content": "package main\n\nimport \"<selection>database/sq<caret>l/driver</selection>\""
  },
  {
    "path": "testData/selectWord/importString/after3.go",
    "content": "package main\n\nimport <selection>\"database/sq<caret>l/driver\"</selection>"
  },
  {
    "path": "testData/selectWord/importString/after4.go",
    "content": "package main\n\n<selection>import \"database/sq<caret>l/driver\"</selection>"
  },
  {
    "path": "testData/selectWord/importString/before.go",
    "content": "package main\n\nimport \"database/sq<caret>l/driver\""
  },
  {
    "path": "testData/selectWord/multipleImportString/after1.go",
    "content": "package main\n\nimport (\n    \"database/sql/driver\"\n    \"database/<selection>s<caret>ql</selection>/driver\"\n    \"database/sql/driver\"\n)"
  },
  {
    "path": "testData/selectWord/multipleImportString/after2.go",
    "content": "package main\n\nimport (\n    \"database/sql/driver\"\n    \"<selection>database/s<caret>ql/driver</selection>\"\n    \"database/sql/driver\"\n)"
  },
  {
    "path": "testData/selectWord/multipleImportString/after3.go",
    "content": "package main\n\nimport (\n    \"database/sql/driver\"\n    <selection>\"database/s<caret>ql/driver\"</selection>\n    \"database/sql/driver\"\n)"
  },
  {
    "path": "testData/selectWord/multipleImportString/after4.go",
    "content": "package main\n\nimport (\n    \"database/sql/driver\"\n<selection>    \"database/s<caret>ql/driver\"\n</selection>    \"database/sql/driver\"\n)"
  },
  {
    "path": "testData/selectWord/multipleImportString/after5.go",
    "content": "package main\n\nimport (\n    <selection>\"database/sql/driver\"\n    \"database/s<caret>ql/driver\"\n    \"database/sql/driver\"</selection>\n)"
  },
  {
    "path": "testData/selectWord/multipleImportString/after6.go",
    "content": "package main\n\n<selection>import (\n    \"database/sql/driver\"\n    \"database/s<caret>ql/driver\"\n    \"database/sql/driver\"\n)</selection>"
  },
  {
    "path": "testData/selectWord/multipleImportString/before.go",
    "content": "package main\n\nimport (\n    \"database/sql/driver\"\n    \"database/s<caret>ql/driver\"\n    \"database/sql/driver\"\n)"
  },
  {
    "path": "testData/selectWord/parameters/after1.go",
    "content": "package main\n\nfunc FunctionName(int a, <selection>st<caret>ring</selection> s) (byte, string) {\n\n}"
  },
  {
    "path": "testData/selectWord/parameters/after2.go",
    "content": "package main\n\nfunc FunctionName(int a, <selection>st<caret>ring s</selection>) (byte, string) {\n\n}"
  },
  {
    "path": "testData/selectWord/parameters/after3.go",
    "content": "package main\n\nfunc FunctionName(<selection>int a, st<caret>ring s</selection>) (byte, string) {\n\n}"
  },
  {
    "path": "testData/selectWord/parameters/after4.go",
    "content": "package main\n\nfunc FunctionName<selection>(int a, st<caret>ring s)</selection> (byte, string) {\n\n}"
  },
  {
    "path": "testData/selectWord/parameters/after5.go",
    "content": "package main\n\nfunc FunctionName<selection>(int a, st<caret>ring s) (byte, string)</selection> {\n\n}"
  },
  {
    "path": "testData/selectWord/parameters/after6.go",
    "content": "package main\n\nfunc <selection>FunctionName(int a, st<caret>ring s) (byte, string)</selection> {\n\n}"
  },
  {
    "path": "testData/selectWord/parameters/after7.go",
    "content": "package main\n\n<selection>func FunctionName(int a, st<caret>ring s) (byte, string) {\n\n}</selection>"
  },
  {
    "path": "testData/selectWord/parameters/before.go",
    "content": "package main\n\nfunc FunctionName(int a, st<caret>ring s) (byte, string) {\n\n}"
  },
  {
    "path": "testData/selectWord/resultParameters/after1.go",
    "content": "package main\n\nfunc FunctionName(int a, string s) (byte, <selection><caret>string</selection>) {\n\n}"
  },
  {
    "path": "testData/selectWord/resultParameters/after2.go",
    "content": "package main\n\nfunc FunctionName(int a, string s) (<selection>byte, <caret>string</selection>) {\n\n}"
  },
  {
    "path": "testData/selectWord/resultParameters/after3.go",
    "content": "package main\n\nfunc FunctionName(int a, string s) <selection>(byte, <caret>string)</selection> {\n\n}"
  },
  {
    "path": "testData/selectWord/resultParameters/after4.go",
    "content": "package main\n\nfunc FunctionName<selection>(int a, string s) (byte, <caret>string)</selection> {\n\n}"
  },
  {
    "path": "testData/selectWord/resultParameters/after5.go",
    "content": "package main\n\nfunc <selection>FunctionName(int a, string s) (byte, <caret>string)</selection> {\n\n}"
  },
  {
    "path": "testData/selectWord/resultParameters/after6.go",
    "content": "package main\n\n<selection>func FunctionName(int a, string s) (byte, <caret>string) {\n\n}</selection>"
  },
  {
    "path": "testData/selectWord/resultParameters/before.go",
    "content": "package main\n\nfunc FunctionName(int a, string s) (byte, <caret>string) {\n\n}"
  },
  {
    "path": "testData/selectWord/stringLiteral/after1.go",
    "content": "package main\n\nfunc main() {\n  println(\"Hello <selection>W<caret>orld</selection>\")\n}"
  },
  {
    "path": "testData/selectWord/stringLiteral/after2.go",
    "content": "package main\n\nfunc main() {\n  println(\"<selection>Hello W<caret>orld</selection>\")\n}"
  },
  {
    "path": "testData/selectWord/stringLiteral/after3.go",
    "content": "package main\n\nfunc main() {\n  println(<selection>\"Hello W<caret>orld\"</selection>)\n}"
  },
  {
    "path": "testData/selectWord/stringLiteral/after4.go",
    "content": "package main\n\nfunc main() {\n  println<selection>(\"Hello W<caret>orld\")</selection>\n}"
  },
  {
    "path": "testData/selectWord/stringLiteral/after5.go",
    "content": "package main\n\nfunc main() {\n  <selection>println(\"Hello W<caret>orld\")</selection>\n}"
  },
  {
    "path": "testData/selectWord/stringLiteral/before.go",
    "content": "package main\n\nfunc main() {\n  println(\"Hello W<caret>orld\")\n}"
  },
  {
    "path": "testData/smartEnter/deferStatement-after.go",
    "content": "package main\n\nfunc _() {\n\tdefer function()\n\t<caret>\n}\n\nfunc function() {\n\n}"
  },
  {
    "path": "testData/smartEnter/deferStatement.go",
    "content": "package main\n\nfunc _() {\n\tdefer functi<caret>on \n}\n\nfunc function() {\n\n}"
  },
  {
    "path": "testData/smartEnter/deferStatementOnNonFunctionType-after.go",
    "content": "package main\n\nfunc _() {\n\tvar variable int \n\tdefer variable \n\t<caret>\n}"
  },
  {
    "path": "testData/smartEnter/deferStatementOnNonFunctionType.go",
    "content": "package main\n\nfunc _() {\n\tvar variable int \n\tdefer var<caret>iable \n}"
  },
  {
    "path": "testData/smartEnter/for-after.go",
    "content": "package main\n\nfunc _() {\n\tfor i := 0; ; {\n\t\t<caret>\n\t}\n}"
  },
  {
    "path": "testData/smartEnter/for.go",
    "content": "package main\n\nfunc _() {\n\tfor i := 0; <caret>;\n}"
  },
  {
    "path": "testData/smartEnter/forWithBlock-after.go",
    "content": "package main\n\nfunc _() {\n\tfor i := 0; ; {\n\t\t<caret>\n\t\n\t}\n}"
  },
  {
    "path": "testData/smartEnter/forWithBlock.go",
    "content": "package main\n\nfunc _() {\n\tfor i := 0; <caret>; {\n\t\n\t}\n}"
  },
  {
    "path": "testData/smartEnter/function-after.go",
    "content": "package main\n\nfunc _() {\n\t<caret>\n}"
  },
  {
    "path": "testData/smartEnter/function.go",
    "content": "package main\n\nfunc _<caret>()"
  },
  {
    "path": "testData/smartEnter/functionLiteral-after.go",
    "content": "package main\n\nfunc _() {\n\ta := func() {\n\t\t<caret>\n\t}\n}"
  },
  {
    "path": "testData/smartEnter/functionLiteral.go",
    "content": "package main\n\nfunc _() {\n\ta := fun<caret>c() \n}"
  },
  {
    "path": "testData/smartEnter/functionLiteralWithBlock-after.go",
    "content": "package main\n\nfunc _() {\n\ta := func() {} \n\t<caret>\n}"
  },
  {
    "path": "testData/smartEnter/functionLiteralWithBlock.go",
    "content": "package main\n\nfunc _() {\n\ta := fun<caret>c() {} \n}"
  },
  {
    "path": "testData/smartEnter/functionWithBlock-after.go",
    "content": "package main\n\nfunc _() {\n\t<caret>\n\n}"
  },
  {
    "path": "testData/smartEnter/functionWithBlock.go",
    "content": "package main\n\nfunc _<caret>() {\n\n}"
  },
  {
    "path": "testData/smartEnter/goStatement-after.go",
    "content": "package main\n\nfunc _() {\n\tgo function()\n\t<caret>\n}\n\nfunc function() {\n\n}"
  },
  {
    "path": "testData/smartEnter/goStatement.go",
    "content": "package main\n\nfunc _() {\n\tgo functi<caret>on \n}\n\nfunc function() {\n\n}"
  },
  {
    "path": "testData/smartEnter/goStatementOnNonFunctionType-after.go",
    "content": "package main\n\nfunc _() {\n\tvar variable int \n\tgo variable \n\t<caret>\n}"
  },
  {
    "path": "testData/smartEnter/goStatementOnNonFunctionType.go",
    "content": "package main\n\nfunc _() {\n\tvar variable int \n\tgo var<caret>iable \n}"
  },
  {
    "path": "testData/smartEnter/if-after.go",
    "content": "package main\n\nfunc _() {\n\tif (true) {\n\t\t<caret>\n\t}\n}"
  },
  {
    "path": "testData/smartEnter/if.go",
    "content": "package main\n\nfunc _() {\n\tif (tru<caret>e)\n}"
  },
  {
    "path": "testData/smartEnter/ifWithBlock-after.go",
    "content": "package main\n\nfunc _() {\n\tif (true) {\n\t\t<caret>\n\t\n\t}\n}"
  },
  {
    "path": "testData/smartEnter/ifWithBlock.go",
    "content": "package main\n\nfunc _() {\n\tif (tru<caret>e) {\n\t\n\t}\n}"
  },
  {
    "path": "testData/spellchecker/functionName.go",
    "content": "package main\n\nfunc <TYPO descr=\"Typo: In word 'intigir'\">intigir</TYPO>() {\n\n}"
  },
  {
    "path": "testData/spellchecker/suppressed.go",
    "content": "package main\n\nfunc <TYPO descr=\"Typo: In word 'intigir'\">intigir</TYPO>() {\n\n}\n\n//noinspection SpellCheckingInspection\nfunc intigir() {\n\n}\n\n//noinspection All\nfunc intigir() {\n\n}\n"
  },
  {
    "path": "testData/spellchecker/variableName.go",
    "content": "package main\n\nimport \"fmt\"\n\nfunc main() {\n\tfmt.Printf(\"Hello\");\n\t<TYPO descr=\"Typo: In word 'integir'\">integir</TYPO> := 3;\n}"
  },
  {
    "path": "testData/stubs/stub.go",
    "content": "package main; func main() { type A struct { a int } }\n"
  },
  {
    "path": "testData/stubs/stub.txt",
    "content": "GoFileStub\n  PACKAGE_CLAUSE:GoPackageClauseStub\n  FUNCTION_DECLARATION:GoFunctionDeclarationStub: main\n    SIGNATURE:GoSignatureStub\n      PARAMETERS:GoParametersStub\n    TYPE_SPEC:GoTypeSpecStub: A\n      SPEC_TYPE:GoTypeStub\n        STRUCT_TYPE:GoTypeStub\n          TYPE:GoTypeStub\n"
  },
  {
    "path": "testData/stubs/stubMismatch2540.go",
    "content": "package main\n\nimport (\n\t\"fmt\"\n\t\"html/template\"\n)\n\n\nfunc main (){\n\n\tvar e template.IsTrue(struct{chan true})\n\tvar a, w int\n\tvar t struct {x int} = struct{x int }{1};\n\n\ta, w = asasd(1,t,lenz(w))\n\n\n\tfmt.Println(w, w)\n}\nfunc asasd(int int, qe struct{ x int }, strings string) (int, int) {\n}\nfunc lenz(a int) string {\n\treturn \"asd\"\n}"
  },
  {
    "path": "testData/stubs/stubMismatch2540.txt",
    "content": "GoFileStub\n  PACKAGE_CLAUSE:GoPackageClauseStub\n  IMPORT_SPEC:GoImportSpecStub\n  IMPORT_SPEC:GoImportSpecStub\n  FUNCTION_DECLARATION:GoFunctionDeclarationStub: main\n    SIGNATURE:GoSignatureStub\n      PARAMETERS:GoParametersStub\n  FUNCTION_DECLARATION:GoFunctionDeclarationStub: asasd\n    SIGNATURE:GoSignatureStub\n      PARAMETERS:GoParametersStub\n        PARAMETER_DECLARATION:GoParameterDeclarationStub\n          PARAM_DEFINITION:GoParamDefinitionStub: int\n          TYPE:GoTypeStub\n        PARAMETER_DECLARATION:GoParameterDeclarationStub\n          PARAM_DEFINITION:GoParamDefinitionStub: qe\n          STRUCT_TYPE:GoTypeStub\n            FIELD_DEFINITION:GoFieldDefinitionStub: x\n            TYPE:GoTypeStub\n        PARAMETER_DECLARATION:GoParameterDeclarationStub\n          PARAM_DEFINITION:GoParamDefinitionStub: strings\n          TYPE:GoTypeStub\n      RESULT:GoResultStub\n        TYPE_LIST:GoTypeStub\n          TYPE:GoTypeStub\n          TYPE:GoTypeStub\n  FUNCTION_DECLARATION:GoFunctionDeclarationStub: lenz\n    SIGNATURE:GoSignatureStub\n      PARAMETERS:GoParametersStub\n        PARAMETER_DECLARATION:GoParameterDeclarationStub\n          PARAM_DEFINITION:GoParamDefinitionStub: a\n          TYPE:GoTypeStub\n      RESULT:GoResultStub\n        TYPE:GoTypeStub\n"
  },
  {
    "path": "testData/testing/gobench/benchmarkWithoutSuffix-expected.txt",
    "content": "TestStarted\n    - locationHint=gotest://Benchmark\n    - name=Benchmark\n  TestStdOut\n      - name=Benchmark\n      - out=20000000               109 ns/op\\n\n  TestStdOut\n      - name=Benchmark\n      - out=ok      github.com/cydev/stok/storage   2.311s\\n\nTestFinished\n    - duration=42\n    - name=Benchmark"
  },
  {
    "path": "testData/testing/gobench/benchmarkWithoutSuffix.txt",
    "content": "PASS\nBenchmark    20000000               109 ns/op\nok      github.com/cydev/stok/storage   2.311s"
  },
  {
    "path": "testData/testing/gobench/failedBenchmark-expected.txt",
    "content": "TestStarted\n    - locationHint=gotest://BenchmarkBulk_Read\n    - name=BenchmarkBulk_Read\n  TestStdOut\n      - name=BenchmarkBulk_Read\n      - out=        bulk_test.go:157: bulk.Read\\n\n  TestStdOut\n      - name=BenchmarkBulk_Read\n      - out=ok      github.com/cydev/stok/storage   0.020s\\n\n  TestFailed\n      - message=\n      - name=BenchmarkBulk_Read\nTestFinished\n    - duration=42\n    - name=BenchmarkBulk_Read"
  },
  {
    "path": "testData/testing/gobench/failedBenchmark.txt",
    "content": "PASS\nBenchmarkBulk_Read-4    --- FAIL: BenchmarkBulk_Read-4\n        bulk_test.go:157: bulk.Read\nok      github.com/cydev/stok/storage   0.020s\n"
  },
  {
    "path": "testData/testing/gobench/failedCompilation-expected.txt",
    "content": ""
  },
  {
    "path": "testData/testing/gobench/failedCompilation.txt",
    "content": "/usr/local/Cellar/go/1.6/libexec/bin/go test -v github.com/cydev/stok/storage -bench '^BenchmarkBulk_Read2|BenchmarkBulk_Read|BenchmarkBulk_Read3$' -run ^$\n# github.com/cydev/stok/storage\nstorage/bulk_test.go:167: no new variables on left side of :=\nFAIL    github.com/cydev/stok/storage [build failed]"
  },
  {
    "path": "testData/testing/gobench/mixedBenchmark-expected.txt",
    "content": "TestStarted\n    - locationHint=gotest://BenchmarkBulk_Read2\n    - name=BenchmarkBulk_Read2\n  TestStdOut\n      - name=BenchmarkBulk_Read2\n      - out=2000000000               0.00 ns/op\\n\nTestFinished\n    - duration=42\n    - name=BenchmarkBulk_Read2\nTestStarted\n    - locationHint=gotest://BenchmarkBulk_Read\n    - name=BenchmarkBulk_Read\n  TestStdOut\n      - name=BenchmarkBulk_Read\n      - out=        bulk_test.go:162: bulk.Read\\n\n  TestStdOut\n      - name=BenchmarkBulk_Read\n      - out=        bulk_test.go:163: asdf\\n\n  TestFailed\n      - message=\n      - name=BenchmarkBulk_Read\nTestFinished\n    - duration=42\n    - name=BenchmarkBulk_Read\nTestStarted\n    - locationHint=gotest://BenchmarkBulk_Read3\n    - name=BenchmarkBulk_Read3\n  TestStdOut\n      - name=BenchmarkBulk_Read3\n      - out=Hellooooo\\n\n  TestStdOut\n      - name=BenchmarkBulk_Read3\n      - out=Hellooooo\\n\n  TestStdOut\n      - name=BenchmarkBulk_Read3\n      - out=Hellooooo\\n\n  TestStdOut\n      - name=BenchmarkBulk_Read3\n      - out=Hellooooo\\n\n  TestStdOut\n      - name=BenchmarkBulk_Read3\n      - out=Hellooooo\\n\n  TestStdOut\n      - name=BenchmarkBulk_Read3\n      - out=Hellooooo\\n\n  TestStdOut\n      - name=BenchmarkBulk_Read3\n      - out=2000000000               0.00 ns/op\\n\n  TestStdOut\n      - name=BenchmarkBulk_Read3\n      - out=ok      github.com/cydev/stok/storage   0.021s\\n\nTestFinished\n    - duration=42\n    - name=BenchmarkBulk_Read3"
  },
  {
    "path": "testData/testing/gobench/mixedBenchmark.txt",
    "content": "PASS\nBenchmarkBulk_Read2-4   2000000000               0.00 ns/op\nBenchmarkBulk_Read-4    --- FAIL: BenchmarkBulk_Read-4\n        bulk_test.go:162: bulk.Read\n        bulk_test.go:163: asdf\nBenchmarkBulk_Read3-4   Hellooooo\nHellooooo\nHellooooo\nHellooooo\nHellooooo\nHellooooo\n2000000000               0.00 ns/op\nok      github.com/cydev/stok/storage   0.021s\n"
  },
  {
    "path": "testData/testing/gobench/successBenchmark-expected.txt",
    "content": "TestStarted\n    - locationHint=gotest://BenchmarkBulk_Read\n    - name=BenchmarkBulk_Read\n  TestStdOut\n      - name=BenchmarkBulk_Read\n      - out=20000000               109 ns/op\\n\n  TestStdOut\n      - name=BenchmarkBulk_Read\n      - out=ok      github.com/cydev/stok/storage   2.311s\\n\nTestFinished\n    - duration=42\n    - name=BenchmarkBulk_Read"
  },
  {
    "path": "testData/testing/gobench/successBenchmark.txt",
    "content": "PASS\nBenchmarkBulk_Read-4    20000000               109 ns/op\nok      github.com/cydev/stok/storage   2.311s"
  },
  {
    "path": "testData/testing/gocheck/assertions-expected.txt",
    "content": "TestSuiteStarted\n    - locationHint=gosuite://SomeFailSuite\n    - name=SomeFailSuite\n  TestStarted\n      - locationHint=gotest://SomeFailSuite.TestA\n      - name=SomeFailSuite.TestA\n    TestFailed\n        - actual=string = \"Foo\"\n        - details=Somethingall_fail_test.go:21\n        - expected=\n        - message=c.Assert(\"Foo\", IsNil)\n        - name=SomeFailSuite.TestA\n        - type=comparisonFailure\n  TestFinished\n      - duration=42\n      - name=SomeFailSuite.TestA\n  TestStarted\n      - locationHint=gotest://SomeFailSuite.TestB\n      - name=SomeFailSuite.TestB\n    TestFailed\n        - actual== nil\n        - details=Somethingall_fail_test.go:26\n        - expected=\n        - message=c.Assert(nil, NotNil)\n        - name=SomeFailSuite.TestB\n        - type=comparisonFailure\n  TestFinished\n      - duration=42\n      - name=SomeFailSuite.TestB\n  TestStarted\n      - locationHint=gotest://SomeFailSuite.TestC\n      - name=SomeFailSuite.TestC\n    TestFailed\n        - actual=string = \"Foo\"\n        - details=Somethingall_fail_test.go:31\n        - expected=string = \"[bB].(R|r)\"\n        - message=c.Assert(\"Foo\", Matches, \"[bB].(R|r)\")\n        - name=SomeFailSuite.TestC\n        - type=comparisonFailure\n  TestFinished\n      - duration=42\n      - name=SomeFailSuite.TestC\n  TestStarted\n      - locationHint=gotest://SomeFailSuite.TestD\n      - name=SomeFailSuite.TestD\n    TestFailed\n        - actual=string = \"Foo\"\n        - details=Somethingall_fail_test.go:36\n        - expected=string = \"Bar\"\n        - message=c.Assert(\"Foo\", Equals, \"Bar\")\n        - name=SomeFailSuite.TestD\n        - type=comparisonFailure\n  TestFinished\n      - duration=42\n      - name=SomeFailSuite.TestD\n  TestStarted\n      - locationHint=gotest://SomeFailSuite.TestE\n      - name=SomeFailSuite.TestE\n    TestFailed\n        - actual=[]string = []string{\"a\", \"b\"}\n        - details=Somethingall_fail_test.go:41\n        - expected=[]string = []string{\"a\", \"B\"}\n        - message=c.Assert([]string{\"a\", \"b\"}, DeepEquals, []string{\"a\", \"B\"})\n        - name=SomeFailSuite.TestE\n        - type=comparisonFailure\n  TestFinished\n      - duration=42\n      - name=SomeFailSuite.TestE\n  TestStarted\n      - locationHint=gotest://SomeFailSuite.TestF\n      - name=SomeFailSuite.TestF\n    TestFailed\n        - actual=string = \"\"\\n\"multi\\n\"\\n\"\\n\"\\n\"\\t          line\\n\"\\n\"\\t          string\"\n        - details=Somethingall_fail_test.go:54\n        - expected=string = \"\"\\n\"Another\\n\"\\n\"multi\\n\"\\n\"\\tline\\n\"\\n\"\\t\\tstring\"\n        - message=c.Assert(`multi\\n\\n    \t          line\\n    \t          string`,\\n        Equals,\\n        `Another\\n    multi\\n    \tline\\n    \t\tstring`)\n        - name=SomeFailSuite.TestF\n        - type=comparisonFailure\n  TestFinished\n      - duration=42\n      - name=SomeFailSuite.TestF\nTestSuiteFinished\n    - name=SomeFailSuite\n"
  },
  {
    "path": "testData/testing/gocheck/assertions.txt",
    "content": "=== RUN Test\nSTART: all_fail_test.go:19: SomeFailSuite.TestA\nSomethingall_fail_test.go:21:\n    c.Assert(\"Foo\", IsNil)\n... value string = \"Foo\"\n\nFAIL: all_fail_test.go:19: SomeFailSuite.TestA\n\nSTART: all_fail_test.go:24: SomeFailSuite.TestB\nSomethingall_fail_test.go:26:\n    c.Assert(nil, NotNil)\n... value = nil\n\nFAIL: all_fail_test.go:24: SomeFailSuite.TestB\n\nSTART: all_fail_test.go:29: SomeFailSuite.TestC\nSomethingall_fail_test.go:31:\n    c.Assert(\"Foo\", Matches, \"[bB].(R|r)\")\n... value string = \"Foo\"\n... regex string = \"[bB].(R|r)\"\n\nFAIL: all_fail_test.go:29: SomeFailSuite.TestC\n\nSTART: all_fail_test.go:34: SomeFailSuite.TestD\nSomethingall_fail_test.go:36:\n    c.Assert(\"Foo\", Equals, \"Bar\")\n... obtained string = \"Foo\"\n... expected string = \"Bar\"\n\nFAIL: all_fail_test.go:34: SomeFailSuite.TestD\n\nSTART: all_fail_test.go:39: SomeFailSuite.TestE\nSomethingall_fail_test.go:41:\n    c.Assert([]string{\"a\", \"b\"}, DeepEquals, []string{\"a\", \"B\"})\n... obtained []string = []string{\"a\", \"b\"}\n... expected []string = []string{\"a\", \"B\"}\n\nFAIL: all_fail_test.go:39: SomeFailSuite.TestE\n\nSTART: all_fail_test.go:44: SomeFailSuite.TestF\nSomethingall_fail_test.go:54:\n    c.Assert(`multi\n\n    \t          line\n    \t          string`,\n        Equals,\n        `Another\n    multi\n    \tline\n    \t\tstring`)\n... obtained string = \"\" +\n...     \"multi\\n\" +\n...     \"\\n\" +\n...     \"\\t          line\\n\" +\n...     \"\\t          string\"\n... expected string = \"\" +\n...     \"Another\\n\" +\n...     \"multi\\n\" +\n...     \"\\tline\\n\" +\n...     \"\\t\\tstring\"\n\nFAIL: all_fail_test.go:46: SomeFailSuite.TestF\n\nOOPS: 0 passed, 6 FAILED\n--- FAIL: Test (0.00s)\nFAIL\nexit status 1\nFAIL\tgithub.com/mailgun/sandbox/all_fail\t0.007s\n"
  },
  {
    "path": "testData/testing/gocheck/assertionsInvalidFormat-expected.txt",
    "content": "TestSuiteStarted\n    - locationHint=gosuite://SomeFailSuite\n    - name=SomeFailSuite\n  TestStarted\n      - locationHint=gotest://SomeFailSuite.TestA\n      - name=SomeFailSuite.TestA\n    TestFailed\n        - actual=string = \"Foo\"\n        - details=\n        - expected=\n        - message=\n        - name=SomeFailSuite.TestA\n        - type=comparisonFailure\n  TestFinished\n      - duration=42\n      - name=SomeFailSuite.TestA\nTestSuiteFinished\n    - name=SomeFailSuite\n"
  },
  {
    "path": "testData/testing/gocheck/assertionsInvalidFormat.txt",
    "content": "=== RUN Test\nSTART: all_fail_test.go:19: SomeFailSuite.TestA\n... value string = \"Foo\"\n\nFAIL: all_fail_test.go:19: SomeFailSuite.TestA\n\nOOPS: 0 passed, 1 FAILED\n--- FAIL: Test (0.00s)\nFAIL\nexit status 1\nFAIL\tgithub.com/mailgun/sandbox/all_fail\t0.007s\n"
  },
  {
    "path": "testData/testing/gocheck/fixtureStdOut-expected.txt",
    "content": "TestSuiteStarted\n    - locationHint=gosuite://FixtureSuite\n    - name=FixtureSuite\n  TestStarted\n      - locationHint=gotest://FixtureSuite.TestA\n      - name=FixtureSuite.TestA\n    TestStdOut\n        - name=FixtureSuite.TestA\n        - out=SetUp\\n\\nTearDown\\n\\n\n  TestFinished\n      - duration=42\n      - name=FixtureSuite.TestA\n  TestStarted\n      - locationHint=gotest://FixtureSuite.TestB\n      - name=FixtureSuite.TestB\n    TestStdOut\n        - name=FixtureSuite.TestB\n        - out=SetUp\\n\\nsomethingTearDown\\n\\n\n  TestFinished\n      - duration=42\n      - name=FixtureSuite.TestB\n  TestStarted\n      - locationHint=gotest://FixtureSuite.TestC\n      - name=FixtureSuite.TestC\n    TestStdOut\n        - name=FixtureSuite.TestC\n        - out=SetUp\\n\\nsomethingTearDown\\n\\n\n  TestFinished\n      - duration=42\n      - name=FixtureSuite.TestC\nTestSuiteFinished\n    - name=FixtureSuite\nTestStdOut\n    - name=SuiteTearDown\n    - out=TearDown\\n\\nOK: 3 passed\\n--- PASS: Test (0.00s)\\n\n"
  },
  {
    "path": "testData/testing/gocheck/fixtureStdOut.txt",
    "content": "=== RUN Test\nSTART: setups_test.go:19: FixtureSuite.SetUpSuite\nSetUp\nPASS: setups_test.go:19: FixtureSuite.SetUpSuite\t0.000s\n\nSTART: setups_test.go:41: FixtureSuite.TestA\nSTART: setups_test.go:30: FixtureSuite.SetUpTest\nSetUp\nPASS: setups_test.go:30: FixtureSuite.SetUpTest\t0.000s\n\nSTART: setups_test.go:35: FixtureSuite.TearDownTest\nTearDown\nPASS: setups_test.go:35: FixtureSuite.TearDownTest\t0.000s\n\nPASS: setups_test.go:41: FixtureSuite.TestA\t0.000s\n\nSTART: setups_test.go:43: FixtureSuite.TestB\nSTART: setups_test.go:30: FixtureSuite.SetUpTest\nSetUp\nPASS: setups_test.go:30: FixtureSuite.SetUpTest\t0.000s\n\nsomethingSTART: setups_test.go:35: FixtureSuite.TearDownTest\nTearDown\nPASS: setups_test.go:35: FixtureSuite.TearDownTest\t0.000s\n\nPASS: setups_test.go:43: FixtureSuite.TestB\t0.000s\n\nSTART: setups_test.go:48: FixtureSuite.TestC\nSTART: setups_test.go:30: FixtureSuite.SetUpTest\nSetUp\nPASS: setups_test.go:30: FixtureSuite.SetUpTest\t0.000s\n\nsomethingSTART: setups_test.go:35: FixtureSuite.TearDownTest\nTearDown\nPASS: setups_test.go:35: FixtureSuite.TearDownTest\t0.000s\n\nPASS: setups_test.go:48: FixtureSuite.TestC\t0.000s\n\nSTART: setups_test.go:25: FixtureSuite.TearDownSuite\nTearDown\nPASS: setups_test.go:25: FixtureSuite.TearDownSuite\t0.000s\n\nOK: 3 passed\n--- PASS: Test (0.00s)\nPASS\nok  \tgithub.com/mailgun/sandbox/setups\t0.005s\n"
  },
  {
    "path": "testData/testing/gocheck/panic-expected.txt",
    "content": "TestSuiteStarted\n    - locationHint=gosuite://SomePanicSuite\n    - name=SomePanicSuite\n  TestStarted\n      - locationHint=gotest://SomePanicSuite.TestA\n      - name=SomePanicSuite.TestA\n  TestFinished\n      - duration=42\n      - name=SomePanicSuite.TestA\n  TestStarted\n      - locationHint=gotest://SomePanicSuite.TestB\n      - name=SomePanicSuite.TestB\n  TestFinished\n      - duration=42\n      - name=SomePanicSuite.TestB\n  TestStarted\n      - locationHint=gotest://SomePanicSuite.TestC\n      - name=SomePanicSuite.TestC\n    TestStdOut\n        - name=SomePanicSuite.TestC\n        - out=something\n    TestFailed\n        - details=/usr/local/go/src/runtime/panic.go:387\\n  in gopanic\\nsome_panic_test.go:27\\n  in SomePanicSuite.TestC\\n/usr/local/go/src/reflect/value.go:296\\n  in Value.Call\\n/usr/local/go/src/runtime/asm_amd64.s:2232\\n  in goexit\\n\n        - message=Panic: foo (PC=0x3B0A5)\\n\n        - name=SomePanicSuite.TestC\n  TestFinished\n      - duration=42\n      - name=SomePanicSuite.TestC\n  TestStarted\n      - locationHint=gotest://SomePanicSuite.TestD\n      - name=SomePanicSuite.TestD\n    TestFailed\n        - details=/usr/local/go/src/runtime/panic.go:387\\n  in gopanic\\nsome_panic_test.go:31\\n  in SomePanicSuite.TestD\\n/usr/local/go/src/reflect/value.go:296\\n  in Value.Call\\n/usr/local/go/src/runtime/asm_amd64.s:2232\\n  in goexit\\n\n        - message=Panic: bar (PC=0x3B0A5)\\n\n        - name=SomePanicSuite.TestD\n  TestFinished\n      - duration=42\n      - name=SomePanicSuite.TestD\n  TestStarted\n      - locationHint=gotest://SomePanicSuite.TestE\n      - name=SomePanicSuite.TestE\n  TestFinished\n      - duration=42\n      - name=SomePanicSuite.TestE\nTestSuiteFinished\n    - name=SomePanicSuite\n"
  },
  {
    "path": "testData/testing/gocheck/panic.txt",
    "content": "=== RUN Test\nSTART: some_panic_test.go:20: SomePanicSuite.TestA\nPASS: some_panic_test.go:20: SomePanicSuite.TestA\t0.000s\n\nSTART: some_panic_test.go:23: SomePanicSuite.TestB\nPASS: some_panic_test.go:23: SomePanicSuite.TestB\t0.000s\n\nSTART: some_panic_test.go:25: SomePanicSuite.TestC\nsomething... Panic: foo (PC=0x3B0A5)\n\n/usr/local/go/src/runtime/panic.go:387\n  in gopanic\nsome_panic_test.go:27\n  in SomePanicSuite.TestC\n/usr/local/go/src/reflect/value.go:296\n  in Value.Call\n/usr/local/go/src/runtime/asm_amd64.s:2232\n  in goexit\nPANIC: some_panic_test.go:25: SomePanicSuite.TestC\n\nSTART: some_panic_test.go:30: SomePanicSuite.TestD\n... Panic: bar (PC=0x3B0A5)\n\n/usr/local/go/src/runtime/panic.go:387\n  in gopanic\nsome_panic_test.go:31\n  in SomePanicSuite.TestD\n/usr/local/go/src/reflect/value.go:296\n  in Value.Call\n/usr/local/go/src/runtime/asm_amd64.s:2232\n  in goexit\nPANIC: some_panic_test.go:30: SomePanicSuite.TestD\n\nSTART: some_panic_test.go:36: SomePanicSuite.TestE\nPASS: some_panic_test.go:36: SomePanicSuite.TestE\t0.000s\n\nOOPS: 3 passed, 2 PANICKED\n--- FAIL: Test (0.00s)\nFAIL\nexit status 1\nFAIL\tgithub.com/mailgun/sandbox/some_panic\t0.005s\n"
  },
  {
    "path": "testData/testing/gocheck/panicInvalidFormat-expected.txt",
    "content": "TestSuiteStarted\n    - locationHint=gosuite://SomePanicSuite\n    - name=SomePanicSuite\n  TestStarted\n      - locationHint=gotest://SomePanicSuite.TestD\n      - name=SomePanicSuite.TestD\n    TestFailed\n        - details=  in SomePanicSuite.TestD\\n/usr/local/go/src/reflect/value.go:296\\n  in Value.Call\\n/usr/local/go/src/runtime/asm_amd64.s:2232\\n  in goexit\\n\n        - message=\n        - name=SomePanicSuite.TestD\n  TestFinished\n      - duration=42\n      - name=SomePanicSuite.TestD\nTestSuiteFinished\n    - name=SomePanicSuite\n"
  },
  {
    "path": "testData/testing/gocheck/panicInvalidFormat.txt",
    "content": "=== RUN Test\nSTART: some_panic_test.go:30: SomePanicSuite.TestD\n  in SomePanicSuite.TestD\n/usr/local/go/src/reflect/value.go:296\n  in Value.Call\n/usr/local/go/src/runtime/asm_amd64.s:2232\n  in goexit\nPANIC: some_panic_test.go:30: SomePanicSuite.TestD\n\nOOPS: 0 passed, 1 PANICKED\n--- FAIL: Test (0.00s)\nFAIL\nexit status 1\nFAIL\tgithub.com/mailgun/sandbox/some_panic\t0.005s\n"
  },
  {
    "path": "testData/testing/gocheck/pass-expected.txt",
    "content": "TestSuiteStarted\n    - locationHint=gosuite://AllPassSuite\n    - name=AllPassSuite\n  TestStarted\n      - locationHint=gotest://AllPassSuite.TestA\n      - name=AllPassSuite.TestA\n  TestFinished\n      - duration=42\n      - name=AllPassSuite.TestA\n  TestStarted\n      - locationHint=gotest://AllPassSuite.TestB\n      - name=AllPassSuite.TestB\n    TestStdOut\n        - name=AllPassSuite.TestB\n        - out=FooBar\n  TestFinished\n      - duration=42\n      - name=AllPassSuite.TestB\n  TestStarted\n      - locationHint=gotest://AllPassSuite.TestC\n      - name=AllPassSuite.TestC\n    TestStdOut\n        - name=AllPassSuite.TestC\n        - out=Blah\\n\n  TestFinished\n      - duration=42\n      - name=AllPassSuite.TestC\n  TestStarted\n      - locationHint=gotest://AllPassSuite.TestD\n      - name=AllPassSuite.TestD\n    TestStdOut\n        - name=AllPassSuite.TestD\n        - out=Превед\\nМедвед\n  TestFinished\n      - duration=42\n      - name=AllPassSuite.TestD\nTestSuiteFinished\n    - name=AllPassSuite\n"
  },
  {
    "path": "testData/testing/gocheck/pass.txt",
    "content": "=== RUN Test\nSTART: all_pass_test.go:20: AllPassSuite.TestA\nPASS: all_pass_test.go:20: AllPassSuite.TestA\t0.000s\n\nSTART: all_pass_test.go:22: AllPassSuite.TestB\nFooBarPASS: all_pass_test.go:22: AllPassSuite.TestB\t0.000s\n\nSTART: all_pass_test.go:27: AllPassSuite.TestC\nBlah\nPASS: all_pass_test.go:27: AllPassSuite.TestC\t0.000s\n\nSTART: all_pass_test.go:31: AllPassSuite.TestD\nПревед\n\t\t\t\tМедведPASS: all_pass_test.go:31: AllPassSuite.TestD\t0.000s\n\nOK: 4 passed\n--- PASS: Test (0.00s)\nPASS\nok  \tgithub.com/mailgun/sandbox/all_pass\t0.005s\n"
  },
  {
    "path": "testData/testing/gocheck/skippingTests-expected.txt",
    "content": "TestSuiteStarted\n    - locationHint=gosuite://FixtureSuiteSetUpErrorSuite\n    - name=FixtureSuiteSetUpErrorSuite\n  TestStarted\n      - locationHint=gotest://FixtureSuiteSetUpErrorSuite.TestA\n      - name=FixtureSuiteSetUpErrorSuite.TestA\n    TestFailed\n        - actual=\n        - details=\n        - expected=\n        - message=\n        - name=FixtureSuiteSetUpErrorSuite.TestA\n        - type=comparisonFailure\n  TestFinished\n      - duration=42\n      - name=FixtureSuiteSetUpErrorSuite.TestA\n  TestStarted\n      - locationHint=gotest://FixtureSuiteSetUpErrorSuite.TestB\n      - name=FixtureSuiteSetUpErrorSuite.TestB\n    TestIgnored\n        - name=FixtureSuiteSetUpErrorSuite.TestB\n  TestFinished\n      - duration=42\n      - name=FixtureSuiteSetUpErrorSuite.TestB\n  TestStarted\n      - locationHint=gotest://FixtureSuiteSetUpErrorSuite.TestC\n      - name=FixtureSuiteSetUpErrorSuite.TestC\n    TestIgnored\n        - name=FixtureSuiteSetUpErrorSuite.TestC\n  TestFinished\n      - duration=42\n      - name=FixtureSuiteSetUpErrorSuite.TestC\n  TestStarted\n      - locationHint=gotest://FixtureSuiteSetUpErrorSuite.TestD\n      - name=FixtureSuiteSetUpErrorSuite.TestD\n    TestIgnored\n        - name=FixtureSuiteSetUpErrorSuite.TestD\n  TestFinished\n      - duration=42\n      - name=FixtureSuiteSetUpErrorSuite.TestD\nTestSuiteFinished\n    - name=FixtureSuiteSetUpErrorSuite\nTestStdOut\n    - name=SuiteTearDown\n    - out=<SuiteTearDown>\\nOOPS: 0 passed, 1 FAILED, 2 MISSED\\n--- FAIL: Test (0.00s)\\n\n"
  },
  {
    "path": "testData/testing/gocheck/skippingTests.txt",
    "content": "=== RUN Test\nSTART: setups_test.go:19: FixtureSuiteSetUpErrorSuite.SetUpSuite\nFAIL: setups_test.go:19: FixtureSuiteSetUpErrorSuite.SetUpSuite\n\nSTART: setups_test.go:36: FixtureSuiteSetUpErrorSuite.TestA\nSKIP: setups_test.go:36: FixtureSuiteSetUpErrorSuite.TestA\n\nSTART: setups_test.go:40: FixtureSuiteSetUpErrorSuite.TestB\nSKIP: setups_test.go:40: FixtureSuiteSetUpErrorSuite.TestB\n\nSTART: setups_test.go:45: FixtureSuiteSetUpErrorSuite.TestC\nSKIP: setups_test.go:45: FixtureSuiteSetUpErrorSuite.TestC\n\nSTART: setups_test.go:51: FixtureSuiteSetUpErrorSuite.TestD\nSKIP: setups_test.go:51: FixtureSuiteSetUpErrorSuite.TestD\n\nSTART: setups_test.go:24: FixtureSuiteSetUpErrorSuite.TearDownSuite\n<SuiteTearDown>PASS: setups_test.go:24: FixtureSuiteSetUpErrorSuite.TearDownSuite\t0.000s\n\nOOPS: 0 passed, 1 FAILED, 2 MISSED\n--- FAIL: Test (0.00s)\nFAIL\nexit status 1\nFAIL\tgithub.com/mailgun/sandbox/fixtureSuiteSetUpError\t0.005s\n"
  },
  {
    "path": "testData/testing/gocheck/suiteSetUpError-expected.txt",
    "content": "TestSuiteStarted\n    - locationHint=gosuite://FixtureSuiteSetUpErrorSuite\n    - name=FixtureSuiteSetUpErrorSuite\n  TestStarted\n      - locationHint=gotest://FixtureSuiteSetUpErrorSuite.TestA\n      - name=FixtureSuiteSetUpErrorSuite.TestA\n    TestFailed\n        - actual=string = \"Foo\"\n        - details=<SuiteSetUp>setups_test.go:21\n        - expected=string = \"Bar\"\n        - message=c.Assert(\"Foo\", Equals, \"Bar\")\n        - name=FixtureSuiteSetUpErrorSuite.TestA\n        - type=comparisonFailure\n  TestFinished\n      - duration=42\n      - name=FixtureSuiteSetUpErrorSuite.TestA\n  TestStarted\n      - locationHint=gotest://FixtureSuiteSetUpErrorSuite.TestB\n      - name=FixtureSuiteSetUpErrorSuite.TestB\n    TestIgnored\n        - name=FixtureSuiteSetUpErrorSuite.TestB\n  TestFinished\n      - duration=42\n      - name=FixtureSuiteSetUpErrorSuite.TestB\n  TestStarted\n      - locationHint=gotest://FixtureSuiteSetUpErrorSuite.TestC\n      - name=FixtureSuiteSetUpErrorSuite.TestC\n    TestIgnored\n        - name=FixtureSuiteSetUpErrorSuite.TestC\n  TestFinished\n      - duration=42\n      - name=FixtureSuiteSetUpErrorSuite.TestC\n  TestStarted\n      - locationHint=gotest://FixtureSuiteSetUpErrorSuite.TestD\n      - name=FixtureSuiteSetUpErrorSuite.TestD\n    TestIgnored\n        - name=FixtureSuiteSetUpErrorSuite.TestD\n  TestFinished\n      - duration=42\n      - name=FixtureSuiteSetUpErrorSuite.TestD\nTestSuiteFinished\n    - name=FixtureSuiteSetUpErrorSuite\nTestStdOut\n    - name=SuiteTearDown\n    - out=<SuiteTearDown>\\nOOPS: 0 passed, 1 FAILED, 2 MISSED\\n--- FAIL: Test (0.00s)\\n\n"
  },
  {
    "path": "testData/testing/gocheck/suiteSetUpError.txt",
    "content": "=== RUN Test\nSTART: setups_test.go:19: FixtureSuiteSetUpErrorSuite.SetUpSuite\n<SuiteSetUp>setups_test.go:21:\n    c.Assert(\"Foo\", Equals, \"Bar\")\n... obtained string = \"Foo\"\n... expected string = \"Bar\"\n\nFAIL: setups_test.go:19: FixtureSuiteSetUpErrorSuite.SetUpSuite\n\nSTART: setups_test.go:36: FixtureSuiteSetUpErrorSuite.TestA\nMISS: setups_test.go:36: FixtureSuiteSetUpErrorSuite.TestA\n\nSTART: setups_test.go:40: FixtureSuiteSetUpErrorSuite.TestB\nMISS: setups_test.go:40: FixtureSuiteSetUpErrorSuite.TestB\n\nSTART: setups_test.go:45: FixtureSuiteSetUpErrorSuite.TestC\nMISS: setups_test.go:45: FixtureSuiteSetUpErrorSuite.TestC\n\nSTART: setups_test.go:51: FixtureSuiteSetUpErrorSuite.TestD\nMISS: setups_test.go:51: FixtureSuiteSetUpErrorSuite.TestD\n\nSTART: setups_test.go:24: FixtureSuiteSetUpErrorSuite.TearDownSuite\n<SuiteTearDown>PASS: setups_test.go:24: FixtureSuiteSetUpErrorSuite.TearDownSuite\t0.000s\n\nOOPS: 0 passed, 1 FAILED, 2 MISSED\n--- FAIL: Test (0.00s)\nFAIL\nexit status 1\nFAIL\tgithub.com/mailgun/sandbox/fixtureSuiteSetUpError\t0.005s\n"
  },
  {
    "path": "testData/testing/gocheck/suiteTearDownError-expected.txt",
    "content": "TestSuiteStarted\n    - locationHint=gosuite://FixtureSuiteTearDownErrorSuite\n    - name=FixtureSuiteTearDownErrorSuite\n  TestStarted\n      - locationHint=gotest://FixtureSuiteTearDownErrorSuite.TestA\n      - name=FixtureSuiteTearDownErrorSuite.TestA\n    TestStdOut\n        - name=FixtureSuiteTearDownErrorSuite.TestA\n        - out=<TestSetUp>\\n<TestA><TestTearDown>\\n\n  TestFinished\n      - duration=42\n      - name=FixtureSuiteTearDownErrorSuite.TestA\n  TestStarted\n      - locationHint=gotest://FixtureSuiteTearDownErrorSuite.TestB\n      - name=FixtureSuiteTearDownErrorSuite.TestB\n    TestStdOut\n        - name=FixtureSuiteTearDownErrorSuite.TestB\n        - out=<TestSetUp>\\n<TestB><TestTearDown>\\n\n  TestFinished\n      - duration=42\n      - name=FixtureSuiteTearDownErrorSuite.TestB\nTestSuiteFinished\n    - name=FixtureSuiteTearDownErrorSuite\nTestStdOut\n    - name=SuiteTearDown\n    - out=<SuiteTearDown>setups_test.go:25:\\n    c.Assert(\"Foo\", Equals, \"Bar\")\\n... obtained string = \"Foo\"\\n... expected string = \"Bar\"\\n\\n\\nOOPS: 2 passed, 1 FAILED\\n--- FAIL: Test (0.00s)\\n\n"
  },
  {
    "path": "testData/testing/gocheck/suiteTearDownError.txt",
    "content": "=== RUN Test\nSTART: setups_test.go:19: FixtureSuiteTearDownErrorSuite.SetUpSuite\n<SuiteSetUp>PASS: setups_test.go:19: FixtureSuiteTearDownErrorSuite.SetUpSuite\t0.000s\n\nSTART: setups_test.go:36: FixtureSuiteTearDownErrorSuite.TestA\nSTART: setups_test.go:28: FixtureSuiteTearDownErrorSuite.SetUpTest\n<TestSetUp>PASS: setups_test.go:28: FixtureSuiteTearDownErrorSuite.SetUpTest\t0.000s\n\n<TestA>START: setups_test.go:32: FixtureSuiteTearDownErrorSuite.TearDownTest\n<TestTearDown>PASS: setups_test.go:32: FixtureSuiteTearDownErrorSuite.TearDownTest\t0.000s\n\nPASS: setups_test.go:36: FixtureSuiteTearDownErrorSuite.TestA\t0.000s\n\nSTART: setups_test.go:40: FixtureSuiteTearDownErrorSuite.TestB\nSTART: setups_test.go:28: FixtureSuiteTearDownErrorSuite.SetUpTest\n<TestSetUp>PASS: setups_test.go:28: FixtureSuiteTearDownErrorSuite.SetUpTest\t0.000s\n\n<TestB>START: setups_test.go:32: FixtureSuiteTearDownErrorSuite.TearDownTest\n<TestTearDown>PASS: setups_test.go:32: FixtureSuiteTearDownErrorSuite.TearDownTest\t0.000s\n\nPASS: setups_test.go:40: FixtureSuiteTearDownErrorSuite.TestB\t0.000s\n\nSTART: setups_test.go:23: FixtureSuiteTearDownErrorSuite.TearDownSuite\n<SuiteTearDown>setups_test.go:25:\n    c.Assert(\"Foo\", Equals, \"Bar\")\n... obtained string = \"Foo\"\n... expected string = \"Bar\"\n\nFAIL: setups_test.go:23: FixtureSuiteTearDownErrorSuite.TearDownSuite\n\nOOPS: 2 passed, 1 FAILED\n--- FAIL: Test (0.00s)\nFAIL\nexit status 1\nFAIL\tgithub.com/mailgun/sandbox/fixtureSuiteTearDownError\t0.006s\n"
  },
  {
    "path": "testData/testing/gocheck/testAndTestTearDownError-expected.txt",
    "content": "TestSuiteStarted\n    - locationHint=gosuite://FixtureTestAndTearDownErrorSuite\n    - name=FixtureTestAndTearDownErrorSuite\n  TestStarted\n      - locationHint=gotest://FixtureTestAndTearDownErrorSuite.TestA\n      - name=FixtureTestAndTearDownErrorSuite.TestA\n    TestStdOut\n        - name=FixtureTestAndTearDownErrorSuite.TestA\n        - out=<TestSetUp>\\n<TestA>setups_test.go:38:\\n    c.Assert(\"blah\", IsNil)\\n... value string = \"blah\"\\n\n    TestFailed\n        - actual=string = \"Foo\"\n        - details=<TestTearDown>setups_test.go:33\n        - expected=string = \"Bar\"\n        - message=c.Assert(\"Foo\", Equals, \"Bar\")\n        - name=FixtureTestAndTearDownErrorSuite.TestA\n        - type=comparisonFailure\n  TestFinished\n      - duration=42\n      - name=FixtureTestAndTearDownErrorSuite.TestA\n  TestStarted\n      - locationHint=gotest://FixtureTestAndTearDownErrorSuite.TestB\n      - name=FixtureTestAndTearDownErrorSuite.TestB\n    TestIgnored\n        - name=FixtureTestAndTearDownErrorSuite.TestB\n  TestFinished\n      - duration=42\n      - name=FixtureTestAndTearDownErrorSuite.TestB\nTestSuiteFinished\n    - name=FixtureTestAndTearDownErrorSuite\nTestStdOut\n    - name=SuiteTearDown\n    - out=<SuiteTearDown>\\nOOPS: 0 passed, 1 FAILED, 2 MISSED\\n--- FAIL: Test (0.00s)\\n\n"
  },
  {
    "path": "testData/testing/gocheck/testAndTestTearDownError.txt",
    "content": "=== RUN Test\nSTART: setups_test.go:19: FixtureTestAndTearDownErrorSuite.SetUpSuite\n<SuiteSetUp>PASS: setups_test.go:19: FixtureTestAndTearDownErrorSuite.SetUpSuite\t0.000s\n\nSTART: setups_test.go:36: FixtureTestAndTearDownErrorSuite.TestA\nSTART: setups_test.go:27: FixtureTestAndTearDownErrorSuite.SetUpTest\n<TestSetUp>PASS: setups_test.go:27: FixtureTestAndTearDownErrorSuite.SetUpTest\t0.000s\n\n<TestA>setups_test.go:38:\n    c.Assert(\"blah\", IsNil)\n... value string = \"blah\"\n\nSTART: setups_test.go:31: FixtureTestAndTearDownErrorSuite.TearDownTest\n<TestTearDown>setups_test.go:33:\n    c.Assert(\"Foo\", Equals, \"Bar\")\n... obtained string = \"Foo\"\n... expected string = \"Bar\"\n\nFAIL: setups_test.go:31: FixtureTestAndTearDownErrorSuite.TearDownTest\n\n... Panic: Fixture has panicked (see related PANIC)\nPANIC: setups_test.go:36: FixtureTestAndTearDownErrorSuite.TestA\n\nSTART: setups_test.go:41: FixtureTestAndTearDownErrorSuite.TestB\nMISS: setups_test.go:41: FixtureTestAndTearDownErrorSuite.TestB\n\nSTART: setups_test.go:23: FixtureTestAndTearDownErrorSuite.TearDownSuite\n<SuiteTearDown>PASS: setups_test.go:23: FixtureTestAndTearDownErrorSuite.TearDownSuite\t0.000s\n\nOOPS: 0 passed, 1 FAILED, 2 MISSED\n--- FAIL: Test (0.00s)\nFAIL\nexit status 1\nFAIL\tgithub.com/mailgun/sandbox/fixtureTestAndTearDownError\t0.006s\n"
  },
  {
    "path": "testData/testing/gocheck/testBothFixturesError-expected.txt",
    "content": "TestSuiteStarted\n    - locationHint=gosuite://FixtureTestBothErrorSuite\n    - name=FixtureTestBothErrorSuite\n  TestStarted\n      - locationHint=gotest://FixtureTestBothErrorSuite.TestA\n      - name=FixtureTestBothErrorSuite.TestA\n    TestStdOut\n        - name=FixtureTestBothErrorSuite.TestA\n        - out=\\n<TestTearDown>setups_test.go:34:\\n    c.Assert(\"Blah\", Equals, \"Bazz\")\\n... obtained string = \"Blah\"\\n... expected string = \"Bazz\"\\n\\n\n    TestFailed\n        - actual=string = \"Foo\"\n        - details=<TestSetUp>setups_test.go:29\n        - expected=string = \"Bar\"\n        - message=c.Assert(\"Foo\", Equals, \"Bar\")\n        - name=FixtureTestBothErrorSuite.TestA\n        - type=comparisonFailure\n  TestFinished\n      - duration=42\n      - name=FixtureTestBothErrorSuite.TestA\n  TestStarted\n      - locationHint=gotest://FixtureTestBothErrorSuite.TestB\n      - name=FixtureTestBothErrorSuite.TestB\n    TestIgnored\n        - name=FixtureTestBothErrorSuite.TestB\n  TestFinished\n      - duration=42\n      - name=FixtureTestBothErrorSuite.TestB\nTestSuiteFinished\n    - name=FixtureTestBothErrorSuite\nTestStdOut\n    - name=SuiteTearDown\n    - out=<SuiteTearDown>\\nOOPS: 0 passed, 2 FAILED, 2 MISSED\\n--- FAIL: Test (0.00s)\\n\n"
  },
  {
    "path": "testData/testing/gocheck/testBothFixturesError.txt",
    "content": "=== RUN Test\nSTART: setups_test.go:19: FixtureTestBothErrorSuite.SetUpSuite\n<SuiteSetUp>PASS: setups_test.go:19: FixtureTestBothErrorSuite.SetUpSuite\t0.000s\n\nSTART: setups_test.go:37: FixtureTestBothErrorSuite.TestA\nSTART: setups_test.go:27: FixtureTestBothErrorSuite.SetUpTest\n<TestSetUp>setups_test.go:29:\n    c.Assert(\"Foo\", Equals, \"Bar\")\n... obtained string = \"Foo\"\n... expected string = \"Bar\"\n\nFAIL: setups_test.go:27: FixtureTestBothErrorSuite.SetUpTest\n\nSTART: setups_test.go:32: FixtureTestBothErrorSuite.TearDownTest\n<TestTearDown>setups_test.go:34:\n    c.Assert(\"Blah\", Equals, \"Bazz\")\n... obtained string = \"Blah\"\n... expected string = \"Bazz\"\n\nFAIL: setups_test.go:32: FixtureTestBothErrorSuite.TearDownTest\n\n... Panic: Fixture has panicked (see related PANIC)\nPANIC: setups_test.go:37: FixtureTestBothErrorSuite.TestA\n\nSTART: setups_test.go:41: FixtureTestBothErrorSuite.TestB\nMISS: setups_test.go:41: FixtureTestBothErrorSuite.TestB\n\nSTART: setups_test.go:23: FixtureTestBothErrorSuite.TearDownSuite\n<SuiteTearDown>PASS: setups_test.go:23: FixtureTestBothErrorSuite.TearDownSuite\t0.000s\n\nOOPS: 0 passed, 2 FAILED, 2 MISSED\n--- FAIL: Test (0.00s)\nFAIL\nexit status 1\nFAIL\tgithub.com/mailgun/sandbox/fixtureTestBothError\t0.006s\n"
  },
  {
    "path": "testData/testing/gocheck/testErrorWithFixtures-expected.txt",
    "content": "TestSuiteStarted\n    - locationHint=gosuite://FixtureTestErrorSuite\n    - name=FixtureTestErrorSuite\n  TestStarted\n      - locationHint=gotest://FixtureTestErrorSuite.TestA\n      - name=FixtureTestErrorSuite.TestA\n    TestStdOut\n        - name=FixtureTestErrorSuite.TestA\n        - out=<TestSetUp>\\n\n    TestFailed\n        - actual=string = \"Foo\"\n        - details=<TestA>setups_test.go:37\n        - expected=string = \"Bar\"\n        - message=c.Assert(\"Foo\", Equals, \"Bar\")\n        - name=FixtureTestErrorSuite.TestA\n        - type=comparisonFailure\n  TestFinished\n      - duration=42\n      - name=FixtureTestErrorSuite.TestA\n  TestStarted\n      - locationHint=gotest://FixtureTestErrorSuite.TestB\n      - name=FixtureTestErrorSuite.TestB\n    TestStdOut\n        - name=FixtureTestErrorSuite.TestB\n        - out=<TestSetUp>\\n<TestB><TestTearDown>\\n\n    TestFailed\n        - details=/usr/local/go/src/runtime/panic.go:387\\n  in gopanic\\nsetups_test.go:42\\n  in FixtureTestErrorSuite.TestB\\n/usr/local/go/src/reflect/value.go:296\\n  in Value.Call\\n/usr/local/go/src/runtime/asm_amd64.s:2232\\n  in goexit\\n\n        - message=Panic: Kaboom! (PC=0x3B0A5)\\n\n        - name=FixtureTestErrorSuite.TestB\n  TestFinished\n      - duration=42\n      - name=FixtureTestErrorSuite.TestB\nTestSuiteFinished\n    - name=FixtureTestErrorSuite\nTestStdOut\n    - name=SuiteTearDown\n    - out=<SuiteTearDown>\\nOOPS: 0 passed, 1 FAILED, 1 PANICKED\\n--- FAIL: Test (0.00s)\\n\n"
  },
  {
    "path": "testData/testing/gocheck/testErrorWithFixtures.txt",
    "content": "=== RUN Test\nSTART: setups_test.go:19: FixtureTestErrorSuite.SetUpSuite\n<SuiteSetUp>PASS: setups_test.go:19: FixtureTestErrorSuite.SetUpSuite\t0.000s\n\nSTART: setups_test.go:35: FixtureTestErrorSuite.TestA\nSTART: setups_test.go:27: FixtureTestErrorSuite.SetUpTest\n<TestSetUp>PASS: setups_test.go:27: FixtureTestErrorSuite.SetUpTest\t0.000s\n\n<TestA>setups_test.go:37:\n    c.Assert(\"Foo\", Equals, \"Bar\")\n... obtained string = \"Foo\"\n... expected string = \"Bar\"\n\nSTART: setups_test.go:31: FixtureTestErrorSuite.TearDownTest\n<TestTearDown>PASS: setups_test.go:31: FixtureTestErrorSuite.TearDownTest\t0.000s\n\nFAIL: setups_test.go:35: FixtureTestErrorSuite.TestA\n\nSTART: setups_test.go:40: FixtureTestErrorSuite.TestB\nSTART: setups_test.go:27: FixtureTestErrorSuite.SetUpTest\n<TestSetUp>PASS: setups_test.go:27: FixtureTestErrorSuite.SetUpTest\t0.000s\n\n<TestB>START: setups_test.go:31: FixtureTestErrorSuite.TearDownTest\n<TestTearDown>PASS: setups_test.go:31: FixtureTestErrorSuite.TearDownTest\t0.000s\n\n... Panic: Kaboom! (PC=0x3B0A5)\n\n/usr/local/go/src/runtime/panic.go:387\n  in gopanic\nsetups_test.go:42\n  in FixtureTestErrorSuite.TestB\n/usr/local/go/src/reflect/value.go:296\n  in Value.Call\n/usr/local/go/src/runtime/asm_amd64.s:2232\n  in goexit\nPANIC: setups_test.go:40: FixtureTestErrorSuite.TestB\n\nSTART: setups_test.go:23: FixtureTestErrorSuite.TearDownSuite\n<SuiteTearDown>PASS: setups_test.go:23: FixtureTestErrorSuite.TearDownSuite\t0.000s\n\nOOPS: 0 passed, 1 FAILED, 1 PANICKED\n--- FAIL: Test (0.00s)\nFAIL\nexit status 1\nFAIL\tgithub.com/mailgun/sandbox/fixtureTestError\t0.006s\n"
  },
  {
    "path": "testData/testing/gocheck/testSetUpError-expected.txt",
    "content": "TestSuiteStarted\n    - locationHint=gosuite://FixtureTestSetUpErrorSuite\n    - name=FixtureTestSetUpErrorSuite\n  TestStarted\n      - locationHint=gotest://FixtureTestSetUpErrorSuite.TestA\n      - name=FixtureTestSetUpErrorSuite.TestA\n    TestFailed\n        - actual=string = \"Foo\"\n        - details=<TestSetUp>setups_test.go:29\n        - expected=string = \"Bar\"\n        - message=c.Assert(\"Foo\", Equals, \"Bar\")\n        - name=FixtureTestSetUpErrorSuite.TestA\n        - type=comparisonFailure\n  TestFinished\n      - duration=42\n      - name=FixtureTestSetUpErrorSuite.TestA\n  TestStarted\n      - locationHint=gotest://FixtureTestSetUpErrorSuite.TestB\n      - name=FixtureTestSetUpErrorSuite.TestB\n    TestIgnored\n        - name=FixtureTestSetUpErrorSuite.TestB\n  TestFinished\n      - duration=42\n      - name=FixtureTestSetUpErrorSuite.TestB\nTestSuiteFinished\n    - name=FixtureTestSetUpErrorSuite\nTestStdOut\n    - name=SuiteTearDown\n    - out=<SuiteTearDown>\\nOOPS: 0 passed, 1 FAILED, 2 MISSED\\n--- FAIL: Test (0.00s)\\n\n"
  },
  {
    "path": "testData/testing/gocheck/testSetUpError.txt",
    "content": "=== RUN Test\nSTART: setups_test.go:19: FixtureTestSetUpErrorSuite.SetUpSuite\n<SuiteSetUp>PASS: setups_test.go:19: FixtureTestSetUpErrorSuite.SetUpSuite\t0.000s\n\nSTART: setups_test.go:36: FixtureTestSetUpErrorSuite.TestA\nSTART: setups_test.go:27: FixtureTestSetUpErrorSuite.SetUpTest\n<TestSetUp>setups_test.go:29:\n    c.Assert(\"Foo\", Equals, \"Bar\")\n... obtained string = \"Foo\"\n... expected string = \"Bar\"\n\nFAIL: setups_test.go:27: FixtureTestSetUpErrorSuite.SetUpTest\n\nSTART: setups_test.go:32: FixtureTestSetUpErrorSuite.TearDownTest\n<TestTearDown>PASS: setups_test.go:32: FixtureTestSetUpErrorSuite.TearDownTest\t0.000s\n\n... Panic: Fixture has panicked (see related PANIC)\nPANIC: setups_test.go:36: FixtureTestSetUpErrorSuite.TestA\n\nSTART: setups_test.go:40: FixtureTestSetUpErrorSuite.TestB\nMISS: setups_test.go:40: FixtureTestSetUpErrorSuite.TestB\n\nSTART: setups_test.go:23: FixtureTestSetUpErrorSuite.TearDownSuite\n<SuiteTearDown>PASS: setups_test.go:23: FixtureTestSetUpErrorSuite.TearDownSuite\t0.000s\n\nOOPS: 0 passed, 1 FAILED, 2 MISSED\n--- FAIL: Test (0.00s)\nFAIL\nexit status 1\nFAIL\tgithub.com/mailgun/sandbox/fixtureTestSetUpError\t0.006s\n"
  },
  {
    "path": "testData/testing/gocheck/testTearDownError-expected.txt",
    "content": "TestSuiteStarted\n    - locationHint=gosuite://FixtureTestTearDownErrorSuite\n    - name=FixtureTestTearDownErrorSuite\n  TestStarted\n      - locationHint=gotest://FixtureTestTearDownErrorSuite.TestA\n      - name=FixtureTestTearDownErrorSuite.TestA\n    TestStdOut\n        - name=FixtureTestTearDownErrorSuite.TestA\n        - out=<TestSetUp>\\n\n    TestFailed\n        - actual=string = \"Foo\"\n        - details=<TestTearDown>setups_test.go:33\n        - expected=string = \"Bar\"\n        - message=c.Assert(\"Foo\", Equals, \"Bar\")\n        - name=FixtureTestTearDownErrorSuite.TestA\n        - type=comparisonFailure\n  TestFinished\n      - duration=42\n      - name=FixtureTestTearDownErrorSuite.TestA\n  TestStarted\n      - locationHint=gotest://FixtureTestTearDownErrorSuite.TestB\n      - name=FixtureTestTearDownErrorSuite.TestB\n    TestIgnored\n        - name=FixtureTestTearDownErrorSuite.TestB\n  TestFinished\n      - duration=42\n      - name=FixtureTestTearDownErrorSuite.TestB\nTestSuiteFinished\n    - name=FixtureTestTearDownErrorSuite\nTestStdOut\n    - name=SuiteTearDown\n    - out=<SuiteTearDown>\\nOOPS: 0 passed, 1 FAILED, 2 MISSED\\n--- FAIL: Test (0.00s)\\n\n"
  },
  {
    "path": "testData/testing/gocheck/testTearDownError.txt",
    "content": "=== RUN Test\nSTART: setups_test.go:19: FixtureTestTearDownErrorSuite.SetUpSuite\n<SuiteSetUp>PASS: setups_test.go:19: FixtureTestTearDownErrorSuite.SetUpSuite\t0.000s\n\nSTART: setups_test.go:36: FixtureTestTearDownErrorSuite.TestA\nSTART: setups_test.go:27: FixtureTestTearDownErrorSuite.SetUpTest\n<TestSetUp>PASS: setups_test.go:27: FixtureTestTearDownErrorSuite.SetUpTest\t0.000s\n\n<TestA>START: setups_test.go:31: FixtureTestTearDownErrorSuite.TearDownTest\n<TestTearDown>setups_test.go:33:\n    c.Assert(\"Foo\", Equals, \"Bar\")\n... obtained string = \"Foo\"\n... expected string = \"Bar\"\n\nFAIL: setups_test.go:31: FixtureTestTearDownErrorSuite.TearDownTest\n\n... Panic: Fixture has panicked (see related PANIC)\nPANIC: setups_test.go:36: FixtureTestTearDownErrorSuite.TestA\n\nSTART: setups_test.go:40: FixtureTestTearDownErrorSuite.TestB\nMISS: setups_test.go:40: FixtureTestTearDownErrorSuite.TestB\n\nSTART: setups_test.go:23: FixtureTestTearDownErrorSuite.TearDownSuite\n<SuiteTearDown>PASS: setups_test.go:23: FixtureTestTearDownErrorSuite.TearDownSuite\t0.000s\n\nOOPS: 0 passed, 1 FAILED, 2 MISSED\n--- FAIL: Test (0.00s)\nFAIL\nexit status 1\nFAIL\tgithub.com/mailgun/sandbox/fixtureTestTearDownError\t0.005s\n"
  },
  {
    "path": "testData/testing/gotest/multipleTestsFailed-expected.txt",
    "content": "TestStarted\n    - locationHint=gotest://TestSqrt3\n    - name=TestSqrt3\nTestFinished\n    - duration=42\n    - name=TestSqrt3\nTestStarted\n    - locationHint=gotest://TestSqrt4\n    - name=TestSqrt4\n  TestStdOut\n      - name=TestSqrt4\n      - out=\ttest2_test.go:15: Sqrt(4) = 2, want 3\\n\n  TestFailed\n      - message=\n      - name=TestSqrt4\nTestFinished\n    - duration=42\n    - name=TestSqrt4\nTestStarted\n    - locationHint=gotest://TestSqrt\n    - name=TestSqrt\nTestFinished\n    - duration=42\n    - name=TestSqrt\nTestStarted\n    - locationHint=gotest://TestSqrt2\n    - name=TestSqrt2\n  TestStdOut\n      - name=TestSqrt2\n      - out=\ttest_test.go:15: Sqrt(4) = 2, want 3\\n\n  TestFailed\n      - message=\n      - name=TestSqrt2\nTestFinished\n    - duration=42\n    - name=TestSqrt2"
  },
  {
    "path": "testData/testing/gotest/multipleTestsFailed.txt",
    "content": "=== RUN TestSqrt3\n--- PASS: TestSqrt3 (0.00 seconds)\n=== RUN TestSqrt4\n--- FAIL: TestSqrt4 (0.00 seconds)\n\ttest2_test.go:15: Sqrt(4) = 2, want 3\n=== RUN TestSqrt\n--- PASS: TestSqrt (0.00 seconds)\n=== RUN TestSqrt2\n--- FAIL: TestSqrt2 (0.00 seconds)\n\ttest_test.go:15: Sqrt(4) = 2, want 3\nFAIL\nexit status 1\nFAIL\t_/Users/zolotov/IdeaProjects/untitled/go\t0.013s\n"
  },
  {
    "path": "testData/testing/gotest/multipleTestsOk-expected.txt",
    "content": "TestStarted\n    - locationHint=gotest://TestSqrt3\n    - name=TestSqrt3\nTestFinished\n    - duration=42\n    - name=TestSqrt3\nTestStarted\n    - locationHint=gotest://TestSqrt4\n    - name=TestSqrt4\nTestFinished\n    - duration=42\n    - name=TestSqrt4\nTestStarted\n    - locationHint=gotest://TestSqrt\n    - name=TestSqrt\nTestFinished\n    - duration=42\n    - name=TestSqrt\nTestStarted\n    - locationHint=gotest://TestSqrt2\n    - name=TestSqrt2\nTestFinished\n    - duration=42\n    - name=TestSqrt2\n"
  },
  {
    "path": "testData/testing/gotest/multipleTestsOk.txt",
    "content": "=== RUN TestSqrt3\n--- PASS: TestSqrt3 (0.00 seconds)\n=== RUN TestSqrt4\n--- PASS: TestSqrt4 (0.00 seconds)\n=== RUN TestSqrt\n--- PASS: TestSqrt (0.00 seconds)\n=== RUN TestSqrt2\n--- PASS: TestSqrt2 (0.00 seconds)\nPASS\nok  \t_/Users/zolotov/IdeaProjects/untitled/go\t0.012s\n"
  },
  {
    "path": "testData/testing/gotest/oneLineEvents-expected.txt",
    "content": "TestStarted\n    - locationHint=gotest://Test_Sd\n    - name=Test_Sd\n  TestStdOut\n      - name=Test_Sd\n      - out=Test_Sd\\n\nTestFinished\n    - duration=42\n    - name=Test_Sd\nTestStarted\n    - locationHint=gotest://Test_Sp\n    - name=Test_Sp\n  TestStdOut\n      - name=Test_Sp\n      - out= text1\\n\n  TestStdOut\n      - name=Test_Sp\n      - out=Test_Sp............end\n  TestStdOut\n      - name=Test_Sp\n      - out=\tsputils_test.go:23: sad\\n\n  TestIgnored\n      - message=\n      - name=Test_Sp\nTestFinished\n    - duration=42\n    - name=Test_Sp\nTestStarted\n    - locationHint=gotest://Test_Sp2\n    - name=Test_Sp2\n  TestStdOut\n      - name=Test_Sp2\n      - out= text2\\n\n  TestStdOut\n      - name=Test_Sp2\n      - out=Test_Sp............end\nTestFinished\n    - duration=42\n    - name=Test_Sp2\nTestStarted\n    - locationHint=gotest://Test_Sp3\n    - name=Test_Sp3\n  TestStdOut\n      - name=Test_Sp3\n      - out= text3\\n\n  TestStdOut\n      - name=Test_Sp3\n      - out=Test_Sp............end\n  TestStdOut\n      - name=Test_Sp3\n      - out=\tsputils_test.go:43: sad\\n\n  TestFailed\n      - message=\n      - name=Test_Sp3\nTestFinished\n    - duration=42\n    - name=Test_Sp3"
  },
  {
    "path": "testData/testing/gotest/oneLineEvents.txt",
    "content": "=== RUN Test_Sd\nTest_Sd\n--- PASS: Test_Sd (0.00 seconds)\n=== RUN Test_Sp\n text1\nTest_Sp............end--- SKIP: Test_Sp (0.00 seconds)\n\tsputils_test.go:23: sad\n=== RUN Test_Sp2\n text2\nTest_Sp............end--- PASS: Test_Sp2 (0.00 seconds)\n=== RUN Test_Sp3\n text3\nTest_Sp............end--- FAIL: Test_Sp3 (0.00 seconds)\n\tsputils_test.go:43: sad\nFAIL\nexit status 1\nFAIL\tSpacer/src\t0.008s\n"
  },
  {
    "path": "testData/testing/gotest/singleTestFailed-expected.txt",
    "content": "TestStarted\n    - locationHint=gotest://TestSqrt2\n    - name=TestSqrt2\n  TestStdOut\n      - name=TestSqrt2\n      - out=\ttest_test.go:15: Sqrt(4) = 2, want 3\\n\n  TestFailed\n      - message=\n      - name=TestSqrt2\nTestFinished\n    - duration=42\n    - name=TestSqrt2"
  },
  {
    "path": "testData/testing/gotest/singleTestFailed.txt",
    "content": "=== RUN TestSqrt2\n--- FAIL: TestSqrt2 (0.00 seconds)\n\ttest_test.go:15: Sqrt(4) = 2, want 3\nFAIL\nexit status 1\nFAIL\t_/Users/zolotov/IdeaProjects/untitled/go\t0.012s\n"
  },
  {
    "path": "testData/testing/gotest/singleTestLeadingSpaceOk-expected.txt",
    "content": "TestStarted\n    - locationHint=gotest://TestFlagsGroups\n    - name=TestFlagsGroups\nTestFinished\n    - duration=42\n    - name=TestFlagsGroups\n"
  },
  {
    "path": "testData/testing/gotest/singleTestLeadingSpaceOk.txt",
    "content": "=== RUN   TestFlagsGroups\n--- PASS: TestFlagsGroups (0.00s)\nPASS\nok  \tsome/package\t0.118s\n"
  },
  {
    "path": "testData/testing/gotest/singleTestOk-expected.txt",
    "content": "TestStarted\n    - locationHint=gotest://TestSqrt2\n    - name=TestSqrt2\nTestFinished\n    - duration=42\n    - name=TestSqrt2\n"
  },
  {
    "path": "testData/testing/gotest/singleTestOk.txt",
    "content": "=== RUN TestSqrt2\n--- PASS: TestSqrt2 (0.00 seconds)\nPASS\nok  \t_/Users/zolotov/IdeaProjects/untitled/go\t0.012s\n"
  },
  {
    "path": "testData/testing/gotest/skipTest-expected.txt",
    "content": "TestStarted\n    - locationHint=gotest://TestRegistryGetOrRegister\n    - name=TestRegistryGetOrRegister\nTestFinished\n    - duration=42\n    - name=TestRegistryGetOrRegister\nTestStarted\n    - locationHint=gotest://TestRuntimeMemStatsBlocking\n    - name=TestRuntimeMemStatsBlocking\n  TestStdOut\n      - name=TestRuntimeMemStatsBlocking\n      - out=\truntime_test.go:20: skipping TestRuntimeMemStatsBlocking with GOMAXPROCS=1\\n\n  TestIgnored\n      - message=\n      - name=TestRuntimeMemStatsBlocking\nTestFinished\n    - duration=42\n    - name=TestRuntimeMemStatsBlocking\nTestStarted\n    - locationHint=gotest://TestExpDecaySample10\n    - name=TestExpDecaySample10\nTestFinished\n    - duration=42\n    - name=TestExpDecaySample10"
  },
  {
    "path": "testData/testing/gotest/skipTest.txt",
    "content": "=== RUN TestRegistryGetOrRegister\n--- PASS: TestRegistryGetOrRegister (0.00 seconds)\n=== RUN TestRuntimeMemStatsBlocking\n--- SKIP: TestRuntimeMemStatsBlocking (0.00 seconds)\n\truntime_test.go:20: skipping TestRuntimeMemStatsBlocking with GOMAXPROCS=1\n=== RUN TestExpDecaySample10\n--- PASS: TestExpDecaySample10 (0.00 seconds)\nPASS\nok  \tgithub.com/dlsniper/go-metrics\t0.069s\n"
  },
  {
    "path": "testData/testing/gotest/stdOut-expected.txt",
    "content": "TestStarted\n    - locationHint=gotest://TestEWMA1\n    - name=TestEWMA1\n  TestStdOut\n      - name=TestEWMA1\n      - out=hello\\n\n  TestStdOut\n      - name=TestEWMA1\n      - out=hello\\n\n  TestStdOut\n      - name=TestEWMA1\n      - out=\\n\nTestFinished\n    - duration=42\n    - name=TestEWMA1\nTestStarted\n    - locationHint=gotest://TestEWMA5\n    - name=TestEWMA5\n  TestStdOut\n      - name=TestEWMA5\n      - out=hello2\\n\n  TestStdOut\n      - name=TestEWMA5\n      - out=hello2\\n\n  TestStdOut\n      - name=TestEWMA5\n      - out=\\n\n  TestStdOut\n      - name=TestEWMA5\n      - out=\tewma_test.go:122: 6 minute a.Rate(): 0.18071652714732128 != 0.18071652714732128\\n\n  TestFailed\n      - message=\n      - name=TestEWMA5\nTestFinished\n    - duration=42\n    - name=TestEWMA5\nTestStarted\n    - locationHint=gotest://TestEWMA15\n    - name=TestEWMA15\n  TestStdOut\n      - name=TestEWMA15\n      - out=hello3\\n\n  TestStdOut\n      - name=TestEWMA15\n      - out=hello3\\n\nTestFinished\n    - duration=42\n    - name=TestEWMA15"
  },
  {
    "path": "testData/testing/gotest/stdOut.txt",
    "content": "=== RUN TestEWMA1\nhello\nhello\n\n--- PASS: TestEWMA1 (0.00 seconds)\n=== RUN TestEWMA5\nhello2\nhello2\n\n--- FAIL: TestEWMA5 (0.00 seconds)\n\tewma_test.go:122: 6 minute a.Rate(): 0.18071652714732128 != 0.18071652714732128\n=== RUN TestEWMA15\nhello3\nhello3\n--- PASS: TestEWMA15 (0.00 seconds)\nFAIL\nexit status 1\n"
  },
  {
    "path": "testData/testing/gotest/subTests-expected.txt",
    "content": "TestStarted\n    - locationHint=gotest://TestFoo\n    - name=TestFoo\n  TestStarted\n      - locationHint=gotest://TestFoo/k[h]kjh_khk_jh\n      - name=TestFoo/k[h]kjh_khk_jh\n    TestStarted\n        - locationHint=gotest://TestFoo/#00\n        - name=TestFoo/#00\n      TestStarted\n          - locationHint=gotest://TestFoo/#00#01\n          - name=TestFoo/#00#01\n        TestStarted\n            - locationHint=gotest://TestFoo/#01\n            - name=TestFoo/#01\n          TestStarted\n              - locationHint=gotest://TestFoo/Bar\n              - name=TestFoo/Bar\n            TestStarted\n                - locationHint=gotest://TestFoo/Bar/Buzz2\n                - name=TestFoo/Bar/Buzz2\n              TestStarted\n                  - locationHint=gotest://TestFoo/Bar/Buzz2#01\n                  - name=TestFoo/Bar/Buzz2#01\n                TestStarted\n                    - locationHint=gotest://TestFoo/Bar#01\n                    - name=TestFoo/Bar#01\n                  TestStarted\n                      - locationHint=gotest://TestFoo/Bar#01/Buzz2\n                      - name=TestFoo/Bar#01/Buzz2\n                    TestStarted\n                        - locationHint=gotest://TestFoo/Bar#01/Buzz2#01\n                        - name=TestFoo/Bar#01/Buzz2#01\n                    TestFinished\n                        - duration=42\n                        - name=TestFoo\n                    TestStdOut\n                        - name=TestFoo/Bar#01/Buzz2#01\n                        - out=    \n                  TestFinished\n                      - duration=42\n                      - name=TestFoo/k[h]kjh_khk_jh\n                  TestStdOut\n                      - name=TestFoo/Bar#01/Buzz2#01\n                      - out=    \n                TestFinished\n                    - duration=42\n                    - name=TestFoo/#00\n                TestStdOut\n                    - name=TestFoo/Bar#01/Buzz2#01\n                    - out=    \n              TestFinished\n                  - duration=42\n                  - name=TestFoo/#00#01\n              TestStdOut\n                  - name=TestFoo/Bar#01/Buzz2#01\n                  - out=    \n            TestFinished\n                - duration=42\n                - name=TestFoo/#01\n            TestStdOut\n                - name=TestFoo/Bar#01/Buzz2#01\n                - out=    \n          TestFinished\n              - duration=42\n              - name=TestFoo/Bar\n          TestStdOut\n              - name=TestFoo/Bar#01/Buzz2#01\n              - out=        \n        TestFinished\n            - duration=42\n            - name=TestFoo/Bar/Buzz2\n        TestStdOut\n            - name=TestFoo/Bar#01/Buzz2#01\n            - out=        \n      TestFinished\n          - duration=42\n          - name=TestFoo/Bar/Buzz2#01\n      TestStdOut\n          - name=TestFoo/Bar#01/Buzz2#01\n          - out=    \n    TestFinished\n        - duration=42\n        - name=TestFoo/Bar#01\n    TestStdOut\n        - name=TestFoo/Bar#01/Buzz2#01\n        - out=        \n  TestFinished\n      - duration=42\n      - name=TestFoo/Bar#01/Buzz2\n  TestStdOut\n      - name=TestFoo/Bar#01/Buzz2#01\n      - out=        \nTestFinished\n    - duration=42\n    - name=TestFoo/Bar#01/Buzz2#01"
  },
  {
    "path": "testData/testing/gotest/subTests.txt",
    "content": "=== RUN   TestFoo\n=== RUN   TestFoo/k[h]kjh_khk_jh\n=== RUN   TestFoo/#00\n=== RUN   TestFoo/#00#01\n=== RUN   TestFoo/#01\n=== RUN   TestFoo/Bar\n=== RUN   TestFoo/Bar/Buzz2\n=== RUN   TestFoo/Bar/Buzz2#01\n=== RUN   TestFoo/Bar#01\n=== RUN   TestFoo/Bar#01/Buzz2\n=== RUN   TestFoo/Bar#01/Buzz2#01\n--- PASS: TestFoo (0.00s)\n    --- PASS: TestFoo/k[h]kjh_khk_jh (0.00s)\n    --- PASS: TestFoo/#00 (0.00s)\n    --- PASS: TestFoo/#00#01 (0.00s)\n    --- PASS: TestFoo/#01 (0.00s)\n    --- PASS: TestFoo/Bar (0.00s)\n        --- PASS: TestFoo/Bar/Buzz2 (0.00s)\n        --- PASS: TestFoo/Bar/Buzz2#01 (0.00s)\n    --- PASS: TestFoo/Bar#01 (0.00s)\n        --- PASS: TestFoo/Bar#01/Buzz2 (0.00s)\n        --- PASS: TestFoo/Bar#01/Buzz2#01 (0.00s)\nPASS\nok  \tfoo\t0.010s"
  },
  {
    "path": "testData/testing/gotest/unicodeTestName-expected.txt",
    "content": "TestStarted\n    - locationHint=gotest://TestМойТест\n    - name=TestМойТест\nTestFinished\n    - duration=42\n    - name=TestМойТест"
  },
  {
    "path": "testData/testing/gotest/unicodeTestName.txt",
    "content": "=== RUN TestМойТест\n--- PASS: TestМойТест (0.00 seconds)\nPASS\nok  \t_/Users/zolotov/IdeaProjects/untitled/go\t0.012s\n"
  },
  {
    "path": "testData/testing/producer/benchmarkFunction_test.go",
    "content": "package main\n\nfunc BenchmarkName() {\n<caret>\n}"
  },
  {
    "path": "testData/testing/producer/benchmarkFunction_test.xml",
    "content": "<configurations>\n  <configurations name=\"BenchmarkName in benchmarkFunction_test.go\" class=\"GoTestRunConfiguration\">\n    <module name=\"light_idea_test_case\" />\n    <framework value=\"gobench\" />\n    <kind value=\"PACKAGE\" />\n    <package value=\"import/path\" />\n    <pattern value=\"^BenchmarkName$\" />\n  </configurations>\n</configurations>"
  },
  {
    "path": "testData/testing/producer/directory.xml",
    "content": "<configurations>\n  <configurations name=\"All in 'src'\" class=\"GoTestRunConfiguration\">\n    <module name=\"light_idea_test_case\" />\n    <working_directory value=\"/src\" />\n    <framework value=\"gotest\" />\n    <kind value=\"DIRECTORY\" />\n    <directory value=\"/src\" />\n  </configurations>\n  <configurations name=\"gocheck package 'src'\" class=\"GoTestRunConfiguration\">\n    <module name=\"light_idea_test_case\" />\n    <working_directory value=\"/src\" />\n    <framework value=\"gocheck\" />\n    <kind value=\"DIRECTORY\" />\n    <directory value=\"/src\" />\n  </configurations>\n  <configurations name=\"gobench package 'src'\" class=\"GoTestRunConfiguration\">\n    <module name=\"light_idea_test_case\" />\n    <working_directory value=\"/src\" />\n    <framework value=\"gobench\" />\n    <kind value=\"DIRECTORY\" />\n    <directory value=\"/src\" />\n  </configurations>\n</configurations>"
  },
  {
    "path": "testData/testing/producer/exampleFunction_test.go",
    "content": "package main\n\nfunc ExampleName() {\n<caret>\n}"
  },
  {
    "path": "testData/testing/producer/exampleFunction_test.xml",
    "content": "<configurations>\n  <configurations name=\"ExampleName in exampleFunction_test.go\" class=\"GoTestRunConfiguration\">\n    <module name=\"light_idea_test_case\" />\n    <framework value=\"gotest\" />\n    <kind value=\"PACKAGE\" />\n    <package value=\"import/path\" />\n    <pattern value=\"^ExampleName$\" />\n  </configurations>\n</configurations>"
  },
  {
    "path": "testData/testing/producer/fileWithBenchmarksOnly_test.go",
    "content": "package main\n<caret>\nfunc BenchmarkName() {\n\n}"
  },
  {
    "path": "testData/testing/producer/fileWithBenchmarksOnly_test.xml",
    "content": "<configurations>\n  <configurations name=\"gobench fileWithBenchmarksOnly_test.go\" class=\"GoTestRunConfiguration\">\n    <module name=\"light_idea_test_case\" />\n    <framework value=\"gobench\" />\n    <kind value=\"FILE\" />\n    <filePath value=\"/src/import/path/fileWithBenchmarksOnly_test.go\" />\n  </configurations>\n</configurations>"
  },
  {
    "path": "testData/testing/producer/fileWithGocheckTestsOnly_test.go",
    "content": "package hello_test\n\nimport . \"gopkg.in/check.v1\"\n\n<caret>\n\ntype MySuite struct{}\nvar _ = Suite(&MySuite{})\nfunc (s *MySuite) TestHelloWorld(c *C) {\n\n}"
  },
  {
    "path": "testData/testing/producer/fileWithGocheckTestsOnly_test.xml",
    "content": "<configurations>\n  <configurations name=\"gocheck fileWithGocheckTestsOnly_test.go\" class=\"GoTestRunConfiguration\">\n    <module name=\"light_idea_test_case\" />\n    <framework value=\"gocheck\" />\n    <kind value=\"FILE\" />\n    <filePath value=\"/src/import/path/fileWithGocheckTestsOnly_test.go\" />\n  </configurations>\n</configurations>"
  },
  {
    "path": "testData/testing/producer/fileWithTestsAndBenchmarks_test.go",
    "content": "package main\n\n<caret>\n\nfunc TestName() {\n \n}\n\nfunc BenchmarkName() {\n\n}"
  },
  {
    "path": "testData/testing/producer/fileWithTestsAndBenchmarks_test.xml",
    "content": "<configurations>\n  <configurations name=\"fileWithTestsAndBenchmarks_test.go\" class=\"GoTestRunConfiguration\">\n    <module name=\"light_idea_test_case\" />\n    <framework value=\"gotest\" />\n    <kind value=\"FILE\" />\n    <filePath value=\"/src/import/path/fileWithTestsAndBenchmarks_test.go\" />\n  </configurations>\n  <configurations name=\"gobench fileWithTestsAndBenchmarks_test.go\" class=\"GoTestRunConfiguration\">\n    <module name=\"light_idea_test_case\" />\n    <framework value=\"gobench\" />\n    <kind value=\"FILE\" />\n    <filePath value=\"/src/import/path/fileWithTestsAndBenchmarks_test.go\" />\n  </configurations>\n</configurations>"
  },
  {
    "path": "testData/testing/producer/fileWithTestsOnly_test.go",
    "content": "package main\n<caret>\nfunc TestName() {\n\n}"
  },
  {
    "path": "testData/testing/producer/fileWithTestsOnly_test.xml",
    "content": "<configurations>\n  <configurations name=\"fileWithTestsOnly_test.go\" class=\"GoTestRunConfiguration\">\n    <module name=\"light_idea_test_case\" />\n    <framework value=\"gotest\" />\n    <kind value=\"FILE\" />\n    <filePath value=\"/src/import/path/fileWithTestsOnly_test.go\" />\n  </configurations>\n</configurations>"
  },
  {
    "path": "testData/testing/producer/fileWithoutTest_test.go",
    "content": "package main\n\n<caret>\n\nfunc Hello() {\n\n}"
  },
  {
    "path": "testData/testing/producer/fileWithoutTest_test.xml",
    "content": "<configurations />"
  },
  {
    "path": "testData/testing/producer/gocheckMethod_test.go",
    "content": "package hello_test\n\nimport . \"gopkg.in/check.v1\"\n\ntype MySuite struct{}\nvar _ = Suite(&MySuite{})\nfunc (s *MySuite) TestHelloWorld(c *C) {\n<caret>\n}"
  },
  {
    "path": "testData/testing/producer/gocheckMethod_test.xml",
    "content": "<configurations>\n  <configurations name=\"*MySuite.TestHelloWorld in gocheckMethod_test.go\" class=\"GoTestRunConfiguration\">\n    <module name=\"light_idea_test_case\" />\n    <framework value=\"gocheck\" />\n    <kind value=\"PACKAGE\" />\n    <package value=\"import/path\" />\n    <pattern value=\"^TestHelloWorld$\" />\n  </configurations>\n</configurations>"
  },
  {
    "path": "testData/testing/producer/nonTestFile.go",
    "content": "package main\n\n<caret>\n\nfunc TestName() {\n\n}"
  },
  {
    "path": "testData/testing/producer/nonTestFile.xml",
    "content": "<configurations />"
  },
  {
    "path": "testData/testing/producer/package_test.xml",
    "content": "<configurations>\n  <configurations name=\"All in 'import/path'\" class=\"GoTestRunConfiguration\">\n    <module name=\"light_idea_test_case\" />\n    <framework value=\"gotest\" />\n    <kind value=\"PACKAGE\" />\n    <package value=\"import/path\" />\n  </configurations>\n  <configurations name=\"gocheck package 'import/path'\" class=\"GoTestRunConfiguration\">\n    <module name=\"light_idea_test_case\" />\n    <framework value=\"gocheck\" />\n    <kind value=\"PACKAGE\" />\n    <package value=\"import/path\" />\n  </configurations>\n  <configurations name=\"gobench package 'import/path'\" class=\"GoTestRunConfiguration\">\n    <module name=\"light_idea_test_case\" />\n    <framework value=\"gobench\" />\n    <kind value=\"PACKAGE\" />\n    <package value=\"import/path\" />\n  </configurations>\n</configurations>"
  },
  {
    "path": "testData/testing/producer/simpleFunctionInFileWithTests_test.go",
    "content": "package main\n\nfunc NonTestName() {\n<caret>\n}\n\nfunc TestName() {\n\n}\n\nfunc BenchmarkName() {\n\n}"
  },
  {
    "path": "testData/testing/producer/simpleFunctionInFileWithTests_test.xml",
    "content": "<configurations>\n  <configurations name=\"simpleFunctionInFileWithTests_test.go\" class=\"GoTestRunConfiguration\">\n    <module name=\"light_idea_test_case\" />\n    <framework value=\"gotest\" />\n    <kind value=\"FILE\" />\n    <filePath value=\"/src/import/path/simpleFunctionInFileWithTests_test.go\" />\n  </configurations>\n  <configurations name=\"gobench simpleFunctionInFileWithTests_test.go\" class=\"GoTestRunConfiguration\">\n    <module name=\"light_idea_test_case\" />\n    <framework value=\"gobench\" />\n    <kind value=\"FILE\" />\n    <filePath value=\"/src/import/path/simpleFunctionInFileWithTests_test.go\" />\n  </configurations>\n</configurations>"
  },
  {
    "path": "testData/testing/producer/simpleFunction_test.go",
    "content": "package main\n\nfunc NonTestName() {\n<caret>\n}"
  },
  {
    "path": "testData/testing/producer/simpleFunction_test.xml",
    "content": "<configurations />"
  },
  {
    "path": "testData/testing/producer/testFunctionNonTestFile.go",
    "content": "package main\n\nfunc TestName() {\n<caret>\n}"
  },
  {
    "path": "testData/testing/producer/testFunctionNonTestFile.xml",
    "content": "<configurations />"
  },
  {
    "path": "testData/testing/producer/testFunction_test.go",
    "content": "package main\n\nfunc TestName() {\n<caret>\n\n}"
  },
  {
    "path": "testData/testing/producer/testFunction_test.xml",
    "content": "<configurations>\n  <configurations name=\"TestName in testFunction_test.go\" class=\"GoTestRunConfiguration\">\n    <module name=\"light_idea_test_case\" />\n    <framework value=\"gotest\" />\n    <kind value=\"PACKAGE\" />\n    <package value=\"import/path\" />\n    <pattern value=\"^TestName$\" />\n  </configurations>\n</configurations>"
  },
  {
    "path": "testData/usages/method.go",
    "content": "package main\n\ntype My<caret>Type struct {}\n\nfunc _() {\n\tvar s MyType = \"asdf\"\n\tprintln(s)\n}"
  },
  {
    "path": "testData/usages/type.go",
    "content": "package main\n\ntype MyT<caret>ype struct {}\n\ntype a struct {\n\tw MyType\n}"
  },
  {
    "path": "tests/com/goide/GoCodeInsightFixtureTestCase.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide;\n\nimport com.goide.project.GoApplicationLibrariesService;\nimport com.goide.project.GoBuildTargetSettings;\nimport com.goide.project.GoModuleSettings;\nimport com.goide.sdk.GoSdkType;\nimport com.intellij.codeInsight.intention.IntentionAction;\nimport com.intellij.openapi.application.ApplicationManager;\nimport com.intellij.openapi.editor.SelectionModel;\nimport com.intellij.openapi.module.ModuleType;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.projectRoots.ProjectJdkTable;\nimport com.intellij.openapi.projectRoots.Sdk;\nimport com.intellij.openapi.projectRoots.impl.ProjectJdkImpl;\nimport com.intellij.openapi.roots.ProjectRootManager;\nimport com.intellij.openapi.util.Comparing;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.openapi.vfs.VfsUtilCore;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.PsiFileFactory;\nimport com.intellij.psi.impl.DebugUtil;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport com.intellij.testFramework.LightProjectDescriptor;\nimport com.intellij.testFramework.UsefulTestCase;\nimport com.intellij.testFramework.fixtures.DefaultLightProjectDescriptor;\nimport com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;\nimport com.intellij.util.ObjectUtils;\nimport com.intellij.util.ThreeState;\nimport com.intellij.util.containers.ContainerUtil;\nimport com.intellij.util.indexing.FileContentImpl;\nimport com.intellij.util.indexing.IndexingDataKeys;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.io.File;\nimport java.io.IOException;\nimport java.util.List;\n\nabstract public class GoCodeInsightFixtureTestCase extends LightPlatformCodeInsightFixtureTestCase {\n  protected static String buildStubTreeText(@NotNull Project project,\n                                            @NotNull VirtualFile file,\n                                            @NotNull String fileContent,\n                                            boolean checkErrors) throws IOException {\n    String path = file.getPath();\n    PsiFile psi = PsiFileFactory.getInstance(project).createFileFromText(file.getName(), file.getFileType(), fileContent);\n    if (checkErrors) {\n      assertFalse(path + \" contains error elements\", DebugUtil.psiToString(psi, true).contains(\"PsiErrorElement\"));\n    }\n    String full = DebugUtil.stubTreeToString(GoFileElementType.INSTANCE.getBuilder().buildStubTree(psi));\n    psi.putUserData(IndexingDataKeys.VIRTUAL_FILE, file);\n    FileContentImpl content = new FileContentImpl(file, fileContent, file.getCharset());\n    PsiFile psiFile = content.getPsiFile();\n    String fast = DebugUtil.stubTreeToString(GoFileElementType.INSTANCE.getBuilder().buildStubTree(psiFile));\n    if (!Comparing.strEqual(full, fast)) {\n      System.err.println(path);\n      UsefulTestCase.assertSameLines(full, fast);\n    }\n    return fast;\n  }\n\n  @NotNull\n  protected PsiElement findElementAtCaretOrInSelection() {\n    SelectionModel selectionModel = myFixture.getEditor().getSelectionModel();\n    if (selectionModel.hasSelection()) {\n      PsiElement left = myFixture.getFile().findElementAt(selectionModel.getSelectionStart());\n      PsiElement right = myFixture.getFile().findElementAt(selectionModel.getSelectionEnd() - 1);\n      assertNotNull(left);\n      assertNotNull(right);\n      return ObjectUtils.assertNotNull(PsiTreeUtil.findCommonParent(left, right));\n    }\n    else {\n      return ObjectUtils.assertNotNull(myFixture.getFile().findElementAt(myFixture.getEditor().getCaretModel().getOffset()));\n    }\n  }\n\n  @Override\n  protected void setUp() throws Exception {\n    super.setUp();\n    GoApplicationLibrariesService.getInstance().setLibraryRootUrls(\"temp:///\");\n    GoModuleSettings.getInstance(myFixture.getModule()).setVendoringEnabled(ThreeState.YES);\n    if (isSdkAware()) setUpProjectSdk();\n  }\n  \n  @Override\n  protected void tearDown() throws Exception {\n    try {\n      GoApplicationLibrariesService.getInstance().setLibraryRootUrls();\n      GoModuleSettings.getInstance(myFixture.getModule()).setBuildTargetSettings(new GoBuildTargetSettings());\n      GoModuleSettings.getInstance(myFixture.getModule()).setVendoringEnabled(ThreeState.UNSURE);\n    }\n    finally {\n      //noinspection ThrowFromFinallyBlock\n      super.tearDown();\n    }\n  }\n\n  // todo[zolotov] remove after 2016.3\n  @Override\n  protected boolean isWriteActionRequired() {\n    return false;\n  }\n\n  @Override\n  protected final String getTestDataPath() {\n    return new File(\"testData/\" + getBasePath()).getAbsolutePath();\n  }\n\n  @NotNull\n  private static DefaultLightProjectDescriptor createMockProjectDescriptor() {\n    return new DefaultLightProjectDescriptor() {\n      @NotNull\n      @Override\n      public Sdk getSdk() {\n        return createMockSdk(\"1.1.2\");\n      }\n\n      @NotNull\n      @Override\n      public ModuleType getModuleType() {\n        return GoModuleType.getInstance();\n      }\n    };\n  }\n\n  private void setUpProjectSdk() {\n    ApplicationManager.getApplication().runWriteAction(() -> {\n      Sdk sdk = getProjectDescriptor().getSdk();\n      ProjectJdkTable.getInstance().addJdk(sdk);\n      ProjectRootManager.getInstance(myFixture.getProject()).setProjectSdk(sdk);\n    });\n  }\n\n  @NotNull\n  private static Sdk createMockSdk(@NotNull String version) {\n    String homePath = new File(\"testData/mockSdk-\" + version + \"/\").getAbsolutePath();\n    GoSdkType sdkType = GoSdkType.getInstance();\n    ProjectJdkImpl sdk = new ProjectJdkImpl(\"Go \" + version, sdkType, homePath, version);\n    sdkType.setupSdkPaths(sdk);\n    sdk.setVersionString(version);\n    return sdk;\n  }\n\n  @NotNull\n  protected static String loadText(@NotNull VirtualFile file) {\n    try {\n      return StringUtil.convertLineSeparators(VfsUtilCore.loadText(file));\n    }\n    catch (IOException e) {\n      throw new RuntimeException(e);\n    }\n  }\n\n  protected void disableVendoring() {\n    GoModuleSettings.getInstance(myFixture.getModule()).setVendoringEnabled(ThreeState.NO);\n  }\n\n  protected static String normalizeCode(@NotNull String codeBefore) {\n    StringBuilder result = new StringBuilder(\"package main\\nfunc main() {\\n\");\n    if (\"\\n\".equals(codeBefore)) {\n      result.append(codeBefore);\n    }\n    for (String line : StringUtil.splitByLines(codeBefore, false)) {\n      result.append('\\t').append(line).append('\\n');\n    }\n    result.append(\"}\");\n    return result.toString();\n  }\n\n  @Override\n  protected LightProjectDescriptor getProjectDescriptor() {\n    return isSdkAware() ? createMockProjectDescriptor() : null;\n  }\n\n  private boolean isSdkAware() {return annotatedWith(SdkAware.class);}\n\n  protected void applySingleQuickFix(@NotNull String quickFixName) {\n    List<IntentionAction> availableIntentions = myFixture.filterAvailableIntentions(quickFixName);\n    IntentionAction action = ContainerUtil.getFirstItem(availableIntentions);\n    assertNotNull(action);\n    myFixture.launchAction(action);\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/GoDocumentationProviderTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide;\n\nimport com.intellij.codeInsight.documentation.DocumentationManager;\nimport com.intellij.lang.documentation.DocumentationProvider;\nimport com.intellij.openapi.editor.Editor;\nimport com.intellij.openapi.util.io.FileUtil;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.io.IOException;\nimport java.util.List;\n\n@SdkAware\npublic class GoDocumentationProviderTest extends GoCodeInsightFixtureTestCase {\n\n  public void testPrintln()                           { doTest(); }\n  public void testFprintln()                          { doTest(); }\n  public void testMethod()                            { doTest(); }\n  public void testVariable()                          { doTest(); }\n  public void testVariableInSwitch()                  { doTest(); }\n  public void testEscape()                            { doTest(); }\n  public void testEscapeReturnValues()                { doTest(); }\n  public void testPackageWithDoc()                    { doTest(); }\n  public void testPackage()                           { doTest(); }\n  public void testPackageOnQualifier()                { doTest(); }\n  public void testPackageOnImportAlias()              { doTest(); }\n  public void testTypeResultDefinition()              { doTest(); }\n  public void testMultilineTypeListDefinition()       { doTest(); }\n  public void testMultilineVariable_1()               { doTest(); }\n  public void testMultilineVariable_2()               { doTest(); }\n  public void testMultilineVariable_3()               { doTest(); }\n  public void testMultilineVariable_4()               { doTest(); }\n  public void testMultilineVariable_5()               { doTest(); }\n  public void testFieldDeclaration()                  { doTest(); }\n  public void testSignature()                         { doTest(); }\n  public void testStruct()                            { doTest(); }\n  public void testTypeSpec()                          { doTest(); }\n  public void testTypeTopDefinition()                 { doTest(); }\n  public void testTypeInnerDefinitionWithoutComment() { doTest(); }\n  public void testConstants()                         { doTest(); }\n  public void testVarShortDefinition()                { doTest(); }\n  public void testSpecType()                          { doTest(); }\n  public void testPointer()                           { doTest(); }\n  public void testFunctionType()                      { doTest(); }\n  public void testParameter()                         { doTest(); }\n  public void testResultParameter()                   { doTest(); }\n  public void testReceiver()                          { doTest(); }\n  public void testStructWithAnon()                    { doTest(); }\n\n  public void testMultiBlockDoc()                     { doConverterTest(); }\n  public void testIndentedBlock()                     { doConverterTest(); }\n  public void testCommentEndsWithIndentedBlock()      { doConverterTest(); }\n  public void testQuotedStrings()                     { doConverterTest(); }\n  public void testLinks()                             { doConverterTest(); }\n\n  @NotNull\n  @Override\n  protected String getBasePath() {\n    return \"doc\";\n  }\n\n  private void doConverterTest() {\n    try {\n      List<String> lines = FileUtil.loadLines(getTestDataPath() + \"/\" + getTestName(true) + \"_source.txt\");\n      assertSameLinesWithFile(getTestDataPath() + \"/\" + getTestName(true) + \"_after.txt\", new GoCommentsConverter().textToHtml(lines));\n    }\n    catch (IOException e) {\n      throw new RuntimeException(e);\n    }\n  }\n\n  private void doTest() {\n    myFixture.configureByFile(getTestName(true) + \".go\");\n    Editor editor = myFixture.getEditor();\n    PsiFile file = myFixture.getFile();\n    PsiElement originalElement = file.findElementAt(editor.getCaretModel().getOffset());\n    assertNotNull(originalElement);\n\n    PsiElement docElement = DocumentationManager.getInstance(getProject()).findTargetElement(editor, file);\n    DocumentationProvider documentationProvider = DocumentationManager.getProviderFromElement(originalElement);\n    String actualDoc = StringUtil.notNullize(documentationProvider.generateDoc(docElement, originalElement));\n    \n    String quickNavigateInfo = documentationProvider.getQuickNavigateInfo(docElement, originalElement);\n    actualDoc += \"\\n=====\\n\" + StringUtil.notNullize(quickNavigateInfo, \"No navigation info\");\n    \n    List<String> urls = documentationProvider.getUrlFor(docElement, originalElement);\n    actualDoc += \"\\n=====\\n\" + (urls != null ? StringUtil.join(urls, \"\\n\") : \"No urls\");\n    \n    String localUrl = GoDocumentationProvider.getLocalUrlToElement(docElement);\n    actualDoc += \"\\n=====\\n\" + StringUtil.notNullize(localUrl, \"No local urls\");\n    assertSameLinesWithFile(getTestDataPath() + \"/\" + getTestName(true) + \".txt\", actualDoc);\n    \n    if (localUrl != null) {\n      PsiElement elementForLink = documentationProvider.getDocumentationElementForLink(myFixture.getPsiManager(), localUrl, originalElement);\n      assertNotNull(\"Link '\" + localUrl + \"' wasn't resolved\", elementForLink);\n      assertEquals(\"Link was resolved to unexpected element.\\nExpected: \" + docElement.getText() + \"\\n\" +\n                   \"Actual: \" + elementForLink.getText(), docElement, elementForLink);\n    }\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/GoFindUsageTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide;\n\nimport com.goide.psi.GoStatement;\nimport com.goide.sdk.GoSdkService;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.openapi.vfs.VirtualFileFilter;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.PsiReference;\nimport com.intellij.psi.impl.PsiManagerImpl;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport com.intellij.testFramework.exceptionCases.AssertionErrorCase;\nimport com.intellij.usageView.UsageInfo;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.Collection;\nimport java.util.List;\n\nimport static com.intellij.util.containers.ContainerUtil.newArrayList;\n\n@SdkAware\npublic class GoFindUsageTest extends GoCodeInsightFixtureTestCase {\n  private static final String USAGE = \"/*usage*/\";\n\n  private void doTest(@NotNull String text) {\n    List<Integer> offsets = allOccurrences(StringUtil.replace(text, \"<caret>\", \"\"), USAGE);\n    String replace = StringUtil.replace(text, USAGE, \"\");\n    myFixture.configureByText(\"a.go\", replace);\n    PsiElement atCaret = myFixture.getElementAtCaret();\n    List<Integer> actual = ContainerUtil.map(myFixture.findUsages(atCaret), UsageInfo::getNavigationOffset);\n    assertSameElements(actual, offsets);\n  }\n\n  @NotNull\n  private static List<Integer> allOccurrences(@NotNull String text, @NotNull String what) {\n    List<Integer> list = newArrayList();\n    int index = text.indexOf(what);\n    while (index >= 0) {\n      list.add(index - list.size() * what.length());\n      index = text.indexOf(what, index + 1);\n    }\n    return list;\n  }\n\n  public void testBuiltinHighlighting() {\n    myFixture.configureByText(\"a.go\", \"package main; func bar() i<caret>nt {}\");\n    assertSize(1, myFixture.findUsages(myFixture.getElementAtCaret()));\n  }\n\n  // #2301\n  public void testCheckImportInWholePackage() {\n    myFixture.addFileToProject(\"bar/bar1.go\", \"package bar; func Bar() { b := bar{}; b.f.Method() }\");\n    myFixture.addFileToProject(\"bar/bar.go\", \"package bar; import \\\"foo\\\"; type bar struct { f *foo.Foo }\");\n    PsiFile file = myFixture.addFileToProject(\"foo/foo.go\", \"package foo; type Foo struct{}; func (*Foo) M<caret>ethod() {}\");\n    myFixture.configureFromExistingVirtualFile(file.getVirtualFile());\n    Collection<UsageInfo> usages = myFixture.findUsages(myFixture.getElementAtCaret());\n    assertSize(1, usages);\n    UsageInfo first = usages.iterator().next();\n    PsiElement e = first.getElement();\n    GoStatement statement = PsiTreeUtil.getParentOfType(e, GoStatement.class);\n    assertNotNull(statement);\n    assertEquals(\"b.f.Method()\", statement.getText());\n  }\n\n  public void testCheckImportInWholePackageWithRelativeImports() {\n    myFixture.addFileToProject(\"bar/bar1.go\", \"package bar; func Bar() { b := bar{}; b.f.Method() }\");\n    myFixture.addFileToProject(\"bar/bar.go\", \"package bar; import \\\"..\\\"; type bar struct { f *foo.Foo }\");\n    myFixture.configureByText(\"foo.go\", \"package foo; type Foo struct{}; func (*Foo) M<caret>ethod() {}\");\n    assertSize(1, myFixture.findUsages(myFixture.getElementAtCaret()));\n  }\n\n  public void testOverride() {\n    doTest(\"package p\\n\" +\n           \"func test2() {\\n\" +\n           \"    y := 1\\n\" +\n           \"    {\\n\" +\n           \"        <caret>y, _ := 10, 1\\n\" +\n           \"        fmt.Println(/*usage*/y)\\n\" +\n           \"    }\\n\" +\n           \"}\\n\");\n  }\n\n  public void testOverride1() {\n    doTest(\"package p\\n\" +\n           \"func test2() {\\n\" +\n           \"    <caret>y := 1\\n\" +\n           \"    /*usage*/y, _ := 10, 1\\n\" +\n           \"    /*usage*/y, x := 10, 1\\n\" +\n           \"    fmt.Println(/*usage*/y)\\n\" +\n           \"}\\n\");\n  }\n\n  public void testOverride2() {\n    doTest(\"package p\\n\" +\n           \"func test2() {\\n\" +\n           \"    <caret>y := 1\\n\" +\n           \"    {\\n\" +\n           \"        y, _ := 10, 1\\n\" +\n           \"        fmt.Println(y)\\n\" +\n           \"    }\\n\" +\n           \"}\\n\");\n  }\n\n  public void testFunctionParam() {\n    doTest(\"package p\\n\" +\n           \"func aaa(<caret>a int) {\\n\" +\n           \"    /*usage*/a\\n\" +\n           \"    var a int\\n\" +\n           \"    a := 1\\n\" +\n           \"}\\n\");\n  }\n\n  public void testDeclaredInForRange() {\n    doTest(\"package main\\n\" +\n           \"const key = iota\\n\" +\n           \"func main() {\\n\" +\n           \"    key := 1\\n\" +\n           \"    for <caret>key, val := range m {\\n\" +\n           \"        y := /*usage*/key\\n\" +\n           \"    }\\n\" +\n           \"}\");\n  }\n\n  public void testMethodWithTransitiveImport() {\n    myFixture.addFileToProject(\"a.go\", \"package main; import `middle`; func main() { fmt.Println(middle.A.Method()) }\");\n    myFixture.addFileToProject(\"middle/middle.go\", \"package middle; import `declaration`; var A *declaration.D = nil\");\n    PsiFile file =\n      myFixture.addFileToProject(\"declaration/declaration.go\", \"package declaration; type D struct {}; func (D) Met<caret>hod() {}\");\n    myFixture.configureFromExistingVirtualFile(file.getVirtualFile());\n    Collection<UsageInfo> usages = myFixture.findUsages(myFixture.getElementAtCaret());\n    assertEquals(1, usages.size());\n    //noinspection ConstantConditions\n    assertEquals(\"a.go\", usages.iterator().next().getFile().getName());\n  }\n\n  public void testDoNoLoadUnreachableVendorDirectory() {\n    myFixture.addFileToProject(\"a.go\", \"package a; import `foo/vendor/foo`; func _() { println(CONST_NAME) }\");\n    PsiFile declarationFile = myFixture.addFileToProject(\"foo/vendor/foo/foo.go\", \"package foo; const CON<caret>ST_NAME = 1;\");\n    myFixture.configureFromExistingVirtualFile(declarationFile.getVirtualFile());\n    failOnFileLoading();\n    myFixture.findUsages(myFixture.getElementAtCaret());\n  }\n\n  public void testDoNoLoadUnreachableInternalDirectory() {\n    GoSdkService.setTestingSdkVersion(\"1.5\", getTestRootDisposable());\n    myFixture.addFileToProject(\"a.go\", \"package a; import `foo/internal/foo`; func _() { println(CONST_NAME) }\");\n    PsiFile declarationFile = myFixture.addFileToProject(\"foo/internal/foo/foo.go\", \"package foo; const CON<caret>ST_NAME = 1;\");\n    myFixture.configureFromExistingVirtualFile(declarationFile.getVirtualFile());\n    failOnFileLoading();\n    myFixture.findUsages(myFixture.getElementAtCaret());\n  }\n\n  public void testDoNoLoadNotImportedDirectory() {\n    myFixture.addFileToProject(\"bar/bar.go\", \"package bar; func _() { println(CONST_NAME) }\");\n    PsiFile declarationFile = myFixture.addFileToProject(\"foo/foo.go\", \"package foo; const CON<caret>ST_NAME = 1;\");\n    myFixture.configureFromExistingVirtualFile(declarationFile.getVirtualFile());\n    failOnFileLoading();\n    myFixture.findUsages(myFixture.getElementAtCaret());\n  }\n\n  public void testDoNoLoadTestDirectoryFromTestFileWithDifferentPackage() {\n    myFixture.addFileToProject(\"bar/bar_test.go\", \"package bar; import `foo`; func _() { println(CONST_NAME) }\");\n    PsiFile declarationFile = myFixture.addFileToProject(\"foo/foo_test.go\", \"package foo; const CON<caret>ST_NAME = 1;\");\n    myFixture.configureFromExistingVirtualFile(declarationFile.getVirtualFile());\n    failOnFileLoading();\n    myFixture.findUsages(myFixture.getElementAtCaret());\n  }\n\n  public void testDoNoLoadTestDirectoryFromProductionFile() {\n    myFixture.addFileToProject(\"bar/bar.go\", \"package bar; import `foo`; func _() { println(CONST_NAME) }\");\n    PsiFile declarationFile = myFixture.addFileToProject(\"foo/foo_test.go\", \"package foo; const CON<caret>ST_NAME = 1;\");\n    myFixture.configureFromExistingVirtualFile(declarationFile.getVirtualFile());\n    failOnFileLoading();\n    myFixture.findUsages(myFixture.getElementAtCaret());\n  }\n\n  public void testLoadTestDirectoryFromTestFile() throws Throwable {\n    myFixture.addFileToProject(\"foo/bar_test.go\", \"package foo_test; import `foo`; func _() { println(CONST_NAME) }\");\n    PsiFile declarationFile = myFixture.addFileToProject(\"foo/foo_test.go\", \"package foo; const CON<caret>ST_NAME = 1;\");\n    myFixture.configureFromExistingVirtualFile(declarationFile.getVirtualFile());\n    failOnFileLoading();\n    assertException(new AssertionErrorCase() {\n      @Override\n      public void tryClosure() {\n        try {\n          myFixture.findUsages(myFixture.getElementAtCaret());\n        }\n        catch (AssertionError e) {\n          String message = e.getMessage();\n          assertTrue(message.contains(\"Access to tree elements not allowed in tests\"));\n          assertTrue(message.contains(\"bar_test.go\"));\n          throw e;\n        }\n      }\n    });\n  }\n\n  public void testLoadSdkUsagesForSdkDeclarations() throws Throwable {\n    myFixture.configureByText(\"bar.go\", \"package foo; import `io`; type ReaderWrapper interface{io.Rea<caret>der}\");\n    failOnFileLoading();\n    assertException(new AssertionErrorCase() {\n      @Override\n      public void tryClosure() {\n        try {\n          assertSize(5, myFixture.findUsages(myFixture.getElementAtCaret()));\n        }\n        catch (AssertionError e) {\n          String message = e.getMessage();\n          assertTrue(message.contains(\"Access to tree elements not allowed in tests\"));\n          assertTrue(message.contains(\"io.go\"));\n          throw e;\n        }\n      }\n    });\n  }\n\n  public void testDoNotLoadSdkUsagesForProjectDeclarations() {\n    myFixture.configureByText(\"foo.go\", \"package foo; func _() { Println() }\");\n    myFixture.configureByText(\"bar.go\", \"package foo; func Pri<caret>ntln() {}\");\n    failOnFileLoading();\n    assertSize(1, myFixture.findUsages(myFixture.getElementAtCaret()));\n  }\n\n  public void testLoadImportedDirectory() throws Throwable {\n    myFixture.addFileToProject(\"bar/bar.go\", \"package bar; import `foo`; func _() { println(CONST_NAME) }\");\n    PsiFile declarationFile = myFixture.addFileToProject(\"foo/foo.go\", \"package foo; const CON<caret>ST_NAME = 1;\");\n    myFixture.configureFromExistingVirtualFile(declarationFile.getVirtualFile());\n    failOnFileLoading();\n    assertException(new AssertionErrorCase() {\n      @Override\n      public void tryClosure() {\n        try {\n          assertSize(1, myFixture.findUsages(myFixture.getElementAtCaret()));\n        }\n        catch (AssertionError e) {\n          String message = e.getMessage();\n          assertTrue(message.contains(\"Access to tree elements not allowed in tests\"));\n          assertTrue(message.contains(\"bar.go\"));\n          throw e;\n        }\n      }\n    });\n  }\n\n  public void testSdkTestDataDirectory() {\n    myFixture.configureByText(\"a.go\", \"package a; import `doc/testdata`; func _() { println(pkg.ExportedConst<caret>ant) } \");\n    PsiReference reference = myFixture.getFile().findReferenceAt(myFixture.getCaretOffset());\n    PsiElement resolve = reference != null ? reference.resolve() : null;\n    assertNotNull(resolve);\n    assertEquals(\"pkg.go\", resolve.getContainingFile().getName());\n    assertEmpty(myFixture.findUsages(resolve));\n  }\n\n  private void failOnFileLoading() {\n    ((PsiManagerImpl)myFixture.getPsiManager()).setAssertOnFileLoadingFilter(VirtualFileFilter.ALL, getTestRootDisposable());\n  }\n\n  private void doTestDoNotFind(@NotNull String text) {\n    myFixture.configureByText(\"a.go\", text);\n    PsiElement atCaret = myFixture.getElementAtCaret();\n    try {\n      myFixture.findUsages(atCaret);\n      fail(\"Shouldn't be performed\");\n    }\n    catch (AssertionError e) {\n      assertEquals(\"Cannot find handler for: IMPORT_SPEC\", e.getMessage());\n    }\n  }\n\n  public void testDot()              { doTestDoNotFind(\"package main; import <caret>. \\\"fmt\\\"\"); }\n\n  public void testUnderscore()       { doTestDoNotFind(\"package main; import <caret>_ \\\"fmt\\\"\"); }\n\n  public void testNearImportString() { doTestDoNotFind(\"package main; import <caret>\\\"fmt\\\"\"); }\n}\n"
  },
  {
    "path": "tests/com/goide/GoParametrizedTestBase.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide;\n\nimport com.intellij.testFramework.EdtTestUtil;\nimport com.intellij.testFramework.TestRunnerUtil;\nimport com.intellij.util.ThrowableRunnable;\nimport org.jetbrains.annotations.NotNull;\nimport org.junit.After;\nimport org.junit.Before;\nimport org.junit.Test;\nimport org.junit.runner.RunWith;\nimport org.junit.runners.Parameterized;\n\n@RunWith(Parameterized.class)\npublic abstract class GoParametrizedTestBase extends GoCodeInsightFixtureTestCase {\n  protected abstract void doTest();\n\n  @Test\n  public void test() {\n    safeEdt(this::doTest);\n  }\n\n  @SuppressWarnings(\"SetUpDoesntCallSuperSetUp\")\n  @Before\n  @Override\n  public void setUp() throws Exception {\n    safeEdt(super::setUp);\n  }\n\n  @SuppressWarnings(\"TearDownDoesntCallSuperTearDown\")\n  @After\n  @Override\n  public void tearDown() {\n    safeEdt(super::tearDown);\n  }\n\n  private void safeEdt(@NotNull ThrowableRunnable<Throwable> r) {\n    if (runInDispatchThread()) {\n      TestRunnerUtil.replaceIdeEventQueueSafely();\n      EdtTestUtil.runInEdtAndWait(r);\n    }\n    else {\n      try {\n        r.run();\n      }\n      catch (Throwable t) {\n        throw new RuntimeException(t);\n      }\n    }\n  }\n}"
  },
  {
    "path": "tests/com/goide/GoPerformanceTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide;\n\nimport com.goide.categories.Performance;\nimport com.goide.completion.GoCompletionUtil;\nimport com.goide.inspections.GoUnusedImportInspection;\nimport com.goide.inspections.unresolved.*;\nimport com.goide.project.GoBuildTargetSettings;\nimport com.goide.project.GoModuleSettings;\nimport com.intellij.analysis.AnalysisScope;\nimport com.intellij.codeInsight.completion.CompletionType;\nimport com.intellij.codeInspection.InspectionManager;\nimport com.intellij.codeInspection.InspectionProfileEntry;\nimport com.intellij.codeInspection.ex.InspectionManagerEx;\nimport com.intellij.codeInspection.ex.InspectionToolRegistrar;\nimport com.intellij.codeInspection.ex.InspectionToolWrapper;\nimport com.intellij.openapi.util.io.FileUtil;\nimport com.intellij.openapi.vfs.LocalFileSystem;\nimport com.intellij.openapi.vfs.VfsUtilCore;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.openapi.vfs.VirtualFileVisitor;\nimport com.intellij.testFramework.InspectionTestUtil;\nimport com.intellij.testFramework.PlatformTestUtil;\nimport com.intellij.testFramework.fixtures.impl.CodeInsightTestFixtureImpl;\nimport com.intellij.testFramework.fixtures.impl.GlobalInspectionContextForTests;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\nimport org.junit.experimental.categories.Category;\n\nimport java.io.File;\nimport java.io.IOException;\nimport java.util.concurrent.TimeUnit;\n\n@Category(Performance.class)\npublic class GoPerformanceTest extends GoCodeInsightFixtureTestCase {\n  @Override\n  public void setUp() throws Exception {\n    super.setUp();\n    GoBuildTargetSettings buildTargetSettings = new GoBuildTargetSettings();\n    buildTargetSettings.os = \"darwin\";\n    buildTargetSettings.arch = \"amd64\";\n    buildTargetSettings.goVersion = \"1.5.1\";\n    GoModuleSettings.getInstance(myFixture.getModule()).setBuildTargetSettings(buildTargetSettings);\n  }\n\n  public void testUnusedVariable() {\n    doInspectionTest(new GoUnusedVariableInspection(), TimeUnit.SECONDS.toMillis(30));\n  }\n\n  public void testUnusedGlobalVariable() {\n    doInspectionTest(new GoUnusedGlobalVariableInspection(), TimeUnit.SECONDS.toMillis(30));\n  }\n\n  public void _testUnresolvedReference() {\n    doInspectionTest(new GoUnresolvedReferenceInspection(), TimeUnit.MINUTES.toMillis(4));\n  }\n\n  public void testUnusedFunction() {\n    doInspectionTest(new GoUnusedFunctionInspection(), TimeUnit.SECONDS.toMillis(15));\n  }\n\n  public void testUnusedExportedFunction() {\n    doInspectionTest(new GoUnusedExportedFunctionInspection(), TimeUnit.SECONDS.toMillis(30));\n  }\n\n  public void testUnusedImport() {\n    doInspectionTest(new GoUnusedImportInspection(), TimeUnit.SECONDS.toMillis(20));\n  }\n\n  public void testPerformanceA() {\n    doHighlightingTest(TimeUnit.SECONDS.toMillis(10));\n  }\n\n  public void testPerformanceA2() {\n    doHighlightingTest(TimeUnit.SECONDS.toMillis(10));\n  }\n\n  public void testCompletionPerformance() {\n    doCompletionTest(\"package main; func main() { <caret> }\", 2, TimeUnit.SECONDS.toMillis(15));\n  }\n\n  public void testCompletionWithPrefixPerformance() {\n    doCompletionTest(\"package main; func main() { slee<caret> }\", 1, TimeUnit.SECONDS.toMillis(5));\n  }\n  \n  public void testCompletionPerformanceWithoutTypes() {\n    GoCompletionUtil.disableTypeInfoInLookup(getTestRootDisposable());\n    doCompletionTest(\"package main; func main() { <caret> }\", 2, TimeUnit.SECONDS.toMillis(15));\n  }\n\n  public void testCompletionWithPrefixPerformanceWithoutTypes() {\n    GoCompletionUtil.disableTypeInfoInLookup(getTestRootDisposable());\n    doCompletionTest(\"package main; func main() { slee<caret> }\", 1, TimeUnit.SECONDS.toMillis(5));\n  }\n\n  private void doCompletionTest(@NotNull String source, int invocationCount, long expectation) {\n    VirtualFile go = installTestData(\"go\");\n    if (go == null) return;\n    \n    myFixture.configureByText(GoFileType.INSTANCE, source);\n    PlatformTestUtil.startPerformanceTest(getTestName(true), (int)expectation,\n                                          () -> myFixture.complete(CompletionType.BASIC, invocationCount)).cpuBound().usesAllCPUCores().assertTiming();\n  }\n\n  private void doHighlightingTest(long expectation) {\n    PlatformTestUtil.startPerformanceTest(getTestName(true), (int)expectation,\n                                          () -> myFixture.testHighlighting(true, false, false, getTestName(true) + \".go\")).cpuBound().usesAllCPUCores().assertTiming();\n  }\n\n  private void doInspectionTest(@NotNull InspectionProfileEntry tool, long expected) {\n    VirtualFile sourceDir = installTestData(\"docker\");\n    if (sourceDir == null) return;\n    //noinspection ConstantConditions\n    AnalysisScope scope = new AnalysisScope(getPsiManager().findDirectory(sourceDir));\n\n    scope.invalidate();\n\n    InspectionManagerEx inspectionManager = (InspectionManagerEx)InspectionManager.getInstance(getProject());\n    InspectionToolWrapper wrapper = InspectionToolRegistrar.wrapTool(tool);\n    GlobalInspectionContextForTests globalContext =\n      CodeInsightTestFixtureImpl.createGlobalContextForTool(scope, getProject(), inspectionManager, wrapper);\n\n    PlatformTestUtil.startPerformanceTest(getTestName(true), (int)expected, () -> InspectionTestUtil.runTool(wrapper, scope, globalContext)).cpuBound().usesAllCPUCores().assertTiming();\n    InspectionTestUtil.compareToolResults(globalContext, wrapper, false, new File(getTestDataPath(), wrapper.getShortName()).getPath());\n  }\n\n  @Nullable\n  private VirtualFile installTestData(@NotNull String testData) {\n    if (!new File(myFixture.getTestDataPath(), testData).exists()) {\n      System.err.println(\"For performance tests you need to have a docker project inside testData/\" + getBasePath() + \" directory\");\n      return null;\n    }\n\n    return myFixture.copyDirectoryToProject(testData, testData);\n  }\n  \n  public void testParserAndStubs() {\n    File go = new File(getTestDataPath(), \"go\");\n    if (!go.exists()) {\n      System.err.println(\n        \"For performance tests you need to have a go sources (https://storage.googleapis.com/golang/go1.4.2.src.tar.gz) inside testData/\" +\n        getBasePath() +\n        \" directory\");\n      return;\n    }\n\n    PlatformTestUtil.startPerformanceTest(getTestName(true), (int)TimeUnit.MINUTES.toMillis(1), () -> {\n      VirtualFile root = LocalFileSystem.getInstance().findFileByIoFile(go);\n      assertNotNull(root);\n      VfsUtilCore.visitChildrenRecursively(root, new VirtualFileVisitor() {\n        @NotNull\n        @Override\n        public Result visitFileEx(@NotNull VirtualFile file) {\n          if (file.isDirectory() && \"testdata\".equals(file.getName())) return SKIP_CHILDREN;\n          if (file.isDirectory() && \"test\".equals(file.getName()) && file.getParent().equals(root)) return SKIP_CHILDREN;\n          if (file.getFileType() != GoFileType.INSTANCE) return CONTINUE;\n          try {\n            System.out.print(\".\");\n            buildStubTreeText(getProject(), file, FileUtil.loadFile(new File(file.getPath()), \"UTF-8\", true).trim(), true);\n          }\n          catch (IOException ignored) {\n          }\n          return CONTINUE;\n        }\n      });\n    }).usesAllCPUCores().assertTiming();\n  }\n\n  @NotNull\n  @Override\n  protected String getBasePath() {\n    return \"performance\";\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/GoSdkServiceTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide;\n\nimport com.goide.sdk.GoSdkService;\nimport com.intellij.openapi.util.Disposer;\nimport com.intellij.openapi.util.SystemInfo;\nimport com.intellij.openapi.util.io.FileUtil;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.testFramework.PlatformTestUtil;\nimport com.intellij.testFramework.UsefulTestCase;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.io.File;\nimport java.io.IOException;\nimport java.lang.reflect.Field;\nimport java.lang.reflect.Modifier;\n\npublic class GoSdkServiceTest extends UsefulTestCase {\n  public void testRegularSdkPath() {\n    setIsWindows(false);\n    setIsLinux(false);\n    PlatformTestUtil.assertPathsEqual(\"/path/to/sdk/bin/go\", executable(\"/path/to/sdk\"));\n  }\n  \n  public void testRegularSdkPathWithGorootName() {\n    setIsWindows(false);\n    setIsLinux(false);\n    String sdkPath = createDir(\"goroot/\").getAbsolutePath();\n    PlatformTestUtil.assertPathsEqual(sdkPath + \"/goroot/bin/go\", executable(sdkPath + \"/goroot\"));\n  }\n\n  public void testSingletonAppEngineSdkPath() {\n    setIsWindows(false);\n    String sdkPath = createDir(\"goroot/\", \"goapp\").getAbsolutePath();\n    PlatformTestUtil.assertPathsEqual(sdkPath + \"/goapp\", executable(sdkPath + \"/goroot\"));\n  }\n\n  public void testGcloudAppEngineSdkPath() {\n    setIsWindows(false);\n    String sdkPath = createDir(\"platform/google_appengine/goroot/\", \"bin/goapp\").getAbsolutePath();\n    PlatformTestUtil.assertPathsEqual(sdkPath + \"/bin/goapp\", executable(sdkPath + \"/platform/google_appengine/goroot\"));\n  }\n\n  public void testRegularSdkPathWindows() {\n    setIsWindows(true);\n    setIsLinux(false);\n    String sdkPath = createDir(\"platform/google_appengine/goroot/\", \"bin/goapp\").getAbsolutePath();\n    PlatformTestUtil.assertPathsEqual(sdkPath + \"/bin/go.exe\", executable(sdkPath));\n  }\n\n  public void testSingletonAppEngineSdkPathWindows() {\n    setIsWindows(true);\n    String sdkPath = createDir(\"goroot/\", \"goapp.bat\").getAbsolutePath();\n    PlatformTestUtil.assertPathsEqual(sdkPath + \"/goapp.bat\", executable(sdkPath + \"/goroot\"));\n  }\n\n  public void testGcloudAppEngineSdkPathWindows() {\n    setIsWindows(true);\n    String sdkPath = createDir(\"platform/google_appengine/goroot/\", \"bin/goapp.cmd\").getAbsolutePath();\n    PlatformTestUtil.assertPathsEqual(sdkPath + \"/bin/goapp.cmd\", executable(sdkPath + \"/platform/google_appengine/goroot\"));\n  }\n\n  private static String executable(@NotNull String sdkPath) {\n    return GoSdkService.getGoExecutablePath(sdkPath);\n  }\n\n  private void setIsWindows(boolean value) {\n    setIsWindows(value, SystemInfo.isWindows, \"isWindows\");\n  }\n\n  private void setIsLinux(boolean value) {\n    setIsWindows(value, SystemInfo.isLinux, \"isLinux\");\n  }\n\n  private void setIsWindows(boolean value, boolean oldValue, @NotNull String fieldName) {\n    try {\n      Field field = SystemInfo.class.getField(fieldName);\n      field.setAccessible(true);\n      Field modifiersField = Field.class.getDeclaredField(\"modifiers\");\n      modifiersField.setAccessible(true);\n      modifiersField.setInt(field, field.getModifiers() & ~Modifier.FINAL);\n      field.set(null, value);\n\n      Disposer.register(getTestRootDisposable(), () -> {\n        try {\n          field.set(null, oldValue);\n        }\n        catch (IllegalAccessException e) {\n          throw new RuntimeException(e);\n        }\n      });\n    }\n    catch (IllegalAccessException | NoSuchFieldException e) {\n      throw new RuntimeException(e);\n    }\n  }\n\n  private static File createDir(String... children) {\n    try {\n      File dir = FileUtil.createTempDirectory(\"goSdk\", \"test\");\n      for (String child : children) {\n        File file = new File(dir, child);\n        FileUtil.createParentDirs(file);\n        if (StringUtil.endsWithChar(child, '/')) {\n          assertTrue(file.mkdir());\n        }\n        else {\n          assertTrue(file.createNewFile());\n        }\n      }\n      return dir;\n    }\n    catch (IOException e) {\n      throw new RuntimeException(e);\n    }\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/SdkAware.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide;\n\nimport java.lang.annotation.*;\n\n@Retention(RetentionPolicy.RUNTIME)\n@Target(ElementType.TYPE)\n@Inherited\npublic @interface SdkAware {\n}\n"
  },
  {
    "path": "tests/com/goide/actions/GoCreateFileActionTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.actions;\n\nimport com.goide.GoCodeInsightFixtureTestCase;\nimport com.goide.psi.GoFile;\nimport com.intellij.ide.actions.CreateFileFromTemplateAction;\nimport com.intellij.ide.fileTemplates.impl.CustomFileTemplate;\nimport com.intellij.openapi.command.WriteCommandAction;\nimport com.intellij.psi.PsiDirectory;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.io.IOException;\n\npublic class GoCreateFileActionTest extends GoCodeInsightFixtureTestCase {\n  public void testPackageNameInEmptyDirectory() throws Exception {\n    doTestInEmptyDirectory(\"empty-dir\", \"a\", \"empty_dir\", \"empty_dir\");\n  }\n\n  public void testPackageNameInEmptyDirectoryWithTestSuffix() throws Exception {\n    doTestInEmptyDirectory(\"empty-dir-test\", \"a_test\", \"empty_dir_test\", \"empty_dir_test_test\");\n  }\n\n  public void testPackageNameInExistingPackage() {\n    doTestWithExistingPackage(\"b\", \"a\", \"a\");\n  }\n\n  public void testTestPackageNameInExistingPackage() {\n    doTestWithExistingPackage(\"a_test\", \"a\", \"a_test\");\n  }\n\n  public void testPackageNameInExistingPackageWithExtension() {\n    doTestWithExistingPackage(\"b.go\", \"a\", \"a\");\n  }\n\n  public void testTestPackageNameInExistingPackageWithExtension() {\n    doTestWithExistingPackage(\"a_test.go\", \"a\", \"a_test\");\n  }\n\n  private void doTestWithExistingPackage(@NotNull String fileName,\n                                         @NotNull String expectedPackage,\n                                         @NotNull String expectedPackageWithTestSuffix) {\n    myFixture.configureByText(\"a.go\", \"package a\");\n    doTest(myFixture.getFile().getContainingDirectory(), fileName, expectedPackage, expectedPackageWithTestSuffix);\n  }\n\n  private void doTestInEmptyDirectory(@NotNull String directoryName,\n                                      @NotNull String newFileName,\n                                      @NotNull String expectedPackage,\n                                      @NotNull String expectedPackageWithTestSuffix) {\n    try {\n      PsiDirectory dir = myFixture.getPsiManager().findDirectory(myFixture.getTempDirFixture().findOrCreateDir(directoryName));\n      assertNotNull(dir);\n      doTest(dir, newFileName, expectedPackage, expectedPackageWithTestSuffix);\n    }\n    catch (IOException e) {\n      throw new RuntimeException(e);\n    }\n  }\n\n  private static void doTest(@NotNull PsiDirectory dir,\n                             @NotNull String newFileName,\n                             @NotNull String expectedPackage,\n                             @NotNull String expectedPackageWithTestSuffix) {\n    CustomFileTemplate template = new CustomFileTemplate(\"testTemplate\", \"go\");\n    template.setText(\"package ${GO_PACKAGE_NAME}\");\n\n    CustomFileTemplate templateWithSuffix = new CustomFileTemplate(\"testTemplate\", \"go\");\n    templateWithSuffix.setText(\"package ${GO_PACKAGE_NAME_WITH_TEST_SUFFIX}\");\n    \n    doTemplateTest(dir, newFileName, expectedPackage, template);\n    doTemplateTest(dir, newFileName, expectedPackageWithTestSuffix, templateWithSuffix);\n  }\n\n  private static void doTemplateTest(@NotNull PsiDirectory dir, @NotNull String newFileName, @NotNull String expectedPackage, @NotNull  CustomFileTemplate template) {\n    GoFile file = (GoFile)CreateFileFromTemplateAction.createFileFromTemplate(newFileName, template, dir, null, true);\n    assertNotNull(file);\n    assertEquals(expectedPackage, file.getPackageName());\n    WriteCommandAction.runWriteCommandAction(dir.getProject(), file::delete);\n  }\n}\n\n"
  },
  {
    "path": "tests/com/goide/categories/Performance.java",
    "content": "package com.goide.categories;\n\npublic interface Performance {}\n"
  },
  {
    "path": "tests/com/goide/codeInsight/imports/GoImportOptimizerTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.codeInsight.imports;\n\nimport com.goide.SdkAware;\nimport com.goide.inspections.GoUnusedImportInspection;\nimport com.goide.quickfix.GoQuickFixTestBase;\nimport com.intellij.codeInsight.actions.OptimizeImportsAction;\nimport com.intellij.ide.DataManager;\nimport com.intellij.openapi.application.ApplicationManager;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.PsiRecursiveElementVisitor;\nimport com.intellij.psi.PsiReference;\nimport com.intellij.testFramework.fixtures.impl.CodeInsightTestFixtureImpl;\nimport org.jetbrains.annotations.NotNull;\n\n@SdkAware\npublic class GoImportOptimizerTest extends GoQuickFixTestBase {\n  public void testUnusedImports()                                        { doTest(); }\n  public void testUnusedImportsWithSemicolon()                           { doTest(); }\n  public void testUnusedImplicitImports()                                { doTest(); }\n  public void testUsedImplicitImports()                                  { doTest(); }\n  public void testUsedDuplicatedImports()                                { doTest(); }\n  public void testDuplicatedImportsWithSameStringAndDifferentQuotes()    { doTest(); }\n  public void testDuplicatedImportsWithSameString()                      { doTest(); }\n  public void testDuplicatedImportsWithDifferentString()                 { doTest(); }\n  public void testUnusedDuplicatedImports()                              { doTest(); }\n  public void testImportPackageWithMainFiles()                           { doTest(); }\n  public void testImportDirectoryWithoutPackages()                       { doTest(); } \n  public void testUnusedImportsWithBacktick()                            { doTest(); } \n  public void testDoNotOptimizeSideEffectImports()                       { doTest(); } \n  public void testRedundantImportQualifier()                             { doTest(); } \n\n  public void testUnusedImportsQuickFix() { \n    myFixture.configureByFile(getTestName(true) + \".go\");\n    myFixture.checkHighlighting();\n    applySingleQuickFix(\"Optimize imports\");\n    myFixture.checkResultByFile(getTestName(true) + \"_after.go\");\n  }\n\n  public void testImportWithSameIdentifier() {\n    myFixture.addFileToProject(\"foo/bar/buzz.go\", \"package bar; func Hello() {}\");\n    doTest();\n  }\n\n  public void testImportWithMultiplePackages() {\n    myFixture.addFileToProject(\"pack/pack_test.go\", \"package pack_test; func Test() {}\");\n    myFixture.addFileToProject(\"pack/pack.go\", \"package pack;\");\n    doTest();\n  }\n\n  private void doTest() {\n    PsiFile file = myFixture.configureByFile(getTestName(true) + \".go\");\n    resolveAllReferences(file);\n    myFixture.checkHighlighting();\n    ApplicationManager.getApplication().runWriteAction(\n      () -> OptimizeImportsAction.actionPerformedImpl(DataManager.getInstance().getDataContext(myFixture.getEditor().getContentComponent())));\n    myFixture.checkResultByFile(getTestName(true) + \"_after.go\");\n  }\n\n  public static void resolveAllReferences(PsiFile file) {\n    file.accept(new PsiRecursiveElementVisitor() {\n      @Override\n      public void visitElement(@NotNull PsiElement o) {\n        for (PsiReference reference : o.getReferences()) {\n          reference.resolve();\n        }\n        super.visitElement(o);\n      }\n    });\n  }\n\n  @Override\n  public void setUp() throws Exception {\n    super.setUp();\n    ((CodeInsightTestFixtureImpl)myFixture).canChangeDocumentDuringHighlighting(true);\n    myFixture.enableInspections(GoUnusedImportInspection.class);\n  }\n\n  @NotNull\n  @Override\n  protected String getBasePath() {\n    return \"imports/optimize\";\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/codeInsight/imports/GoReferenceImporterTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.codeInsight.imports;\n\nimport com.goide.GoCodeInsightFixtureTestCase;\nimport com.goide.SdkAware;\nimport com.goide.inspections.unresolved.GoUnresolvedReferenceInspection;\nimport com.intellij.codeInsight.CodeInsightSettings;\nimport com.intellij.codeInsight.daemon.DaemonCodeAnalyzerSettings;\nimport com.intellij.codeInsight.intention.IntentionAction;\nimport com.intellij.openapi.command.undo.UndoManager;\nimport com.intellij.openapi.fileEditor.FileEditor;\nimport com.intellij.openapi.fileEditor.FileEditorManager;\nimport com.intellij.openapi.util.io.FileUtil;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.testFramework.fixtures.impl.CodeInsightTestFixtureImpl;\n\nimport java.util.List;\n\n@SdkAware\npublic class GoReferenceImporterTest extends GoCodeInsightFixtureTestCase {\n  private boolean defaultJavaOnTheFly;\n  private boolean defaultJavaMemberOnTheFly;\n  private boolean defaultGoOnTheFly;\n\n  private static void updateSettings(boolean onTheFlyEnabled) {\n    GoCodeInsightSettings.getInstance().setAddUnambiguousImportsOnTheFly(onTheFlyEnabled);\n  }\n\n  @Override\n  protected void setUp() throws Exception {\n    super.setUp();\n    myFixture.enableInspections(GoUnresolvedReferenceInspection.class);\n    ((CodeInsightTestFixtureImpl)myFixture).canChangeDocumentDuringHighlighting(true);\n    CodeInsightSettings codeInsightSettings = CodeInsightSettings.getInstance();\n    defaultJavaOnTheFly = codeInsightSettings.ADD_UNAMBIGIOUS_IMPORTS_ON_THE_FLY;\n    defaultJavaMemberOnTheFly = codeInsightSettings.ADD_MEMBER_IMPORTS_ON_THE_FLY;\n    defaultGoOnTheFly = GoCodeInsightSettings.getInstance().isAddUnambiguousImportsOnTheFly();\n\n    codeInsightSettings.ADD_UNAMBIGIOUS_IMPORTS_ON_THE_FLY = true;\n    codeInsightSettings.ADD_MEMBER_IMPORTS_ON_THE_FLY = true;\n  }\n\n  @Override\n  protected void tearDown() throws Exception {\n    try {\n      updateSettings(defaultGoOnTheFly);\n      CodeInsightSettings codeInsightSettings = CodeInsightSettings.getInstance();\n      codeInsightSettings.ADD_MEMBER_IMPORTS_ON_THE_FLY = defaultJavaMemberOnTheFly;\n      codeInsightSettings.ADD_UNAMBIGIOUS_IMPORTS_ON_THE_FLY = defaultJavaOnTheFly;\n    }\n    finally {\n      //noinspection ThrowFromFinallyBlock\n      super.tearDown();\n    }\n  }\n\n  private void doTestAddOnTheFly(boolean goOnTheFlyEnabled) {\n    DaemonCodeAnalyzerSettings.getInstance().setImportHintEnabled(true);\n    updateSettings(goOnTheFlyEnabled);\n\n    String initial = \"package a; func a() {\\n fmt.Println() <caret> \\n}\";\n    myFixture.configureByText(\"a.go\", initial);\n    myFixture.doHighlighting();\n    myFixture.doHighlighting();\n    String after = \"package a;\\n\\nimport \\\"fmt\\\"\\n\\nfunc a() {\\n fmt.Println()  \\n}\";\n    String result = goOnTheFlyEnabled ? after : initial;\n    myFixture.checkResult(result);\n  }\n\n  public void testUndo() {\n    DaemonCodeAnalyzerSettings.getInstance().setImportHintEnabled(true);\n    updateSettings(true);\n    myFixture.configureByText(\"a.go\", \"package main\\n\\nfunc main() { <caret> }\");\n    myFixture.type(\"fmt.\");\n    myFixture.doHighlighting();\n    myFixture.doHighlighting();\n    myFixture.checkResult(\"package main\\n\\nimport \\\"fmt\\\"\\n\\nfunc main() { fmt. }\");\n    FileEditor editor = FileEditorManager.getInstance(myFixture.getProject()).getSelectedEditor(myFixture.getFile().getVirtualFile());\n    UndoManager.getInstance(myFixture.getProject()).undo(editor);\n    myFixture.checkResult(\"package main\\n\\nfunc main() { <caret> }\");\n  }\n\n  public void testOnTheFlyEnabled() {\n    doTestAddOnTheFly(true);\n  }\n\n  public void testOnTheFlyDisabled() {\n    doTestAddOnTheFly(false);\n  }\n\n  private void doTestImportOwnPath(String text, String testText, boolean shouldImport) {\n    updateSettings(false);\n    myFixture.addFileToProject(FileUtil.join(\"pack\", \"a.go\"), text);\n    PsiFile testFile = myFixture.addFileToProject(FileUtil.join(\"pack\", \"a_test.go\"), testText);\n    myFixture.configureFromExistingVirtualFile(testFile.getVirtualFile());\n    List<IntentionAction> actions = myFixture.filterAvailableIntentions(\"Import \" + \"pack\" + \"?\");\n    assertTrue(shouldImport != actions.isEmpty());\n  }\n\n  public void testOwnAddPathFromTest() {\n    doTestImportOwnPath(\"package myPack; func Func() {}\",\n                        \"package myPack_test; func TestFunc() { my<caret>Pack.Func() }\",\n                        true);\n  }\n\n  public void testDoNotImportOwnPathFromDifferentPackage() {\n    doTestImportOwnPath(\"package pack1; func Func() {}\",\n                        \"package pack2_test; func TestFunc() { pack<caret>1.Func() }\",\n                        false);\n  }\n\n  public void testCompleteDifferentPackageFromTest() {\n    myFixture.configureByText(\"a.go\", \"package foo; func a() { fmt.Print<caret> }\");\n    assertNotEmpty(myFixture.getLookupElementStrings());\n  }\n\n  public void testImportVendoringPackage() {\n    myFixture.addFileToProject(\"vendor/a/b/c.go\", \"package b\");\n    myFixture.configureByText(\"a.go\", \"package a; func a() { b<caret>.Println() }\");\n    myFixture.launchAction(myFixture.findSingleIntention(\"Import a/b?\"));\n    myFixture.checkResult(\"package a;\\n\\nimport \\\"a/b\\\"\\n\\nfunc a() { b<caret>.Println() }\");\n  }\n\n  public void testImportVendoringPackageWithDisabledVendoring() {\n    disableVendoring();\n    myFixture.addFileToProject(\"vendor/a/b/c.go\", \"package b\");\n    myFixture.configureByText(\"a.go\", \"package a; func a() { b<caret>.Println() }\");\n    myFixture.launchAction(myFixture.findSingleIntention(\"Import vendor/a/b?\"));\n    myFixture.checkResult(\"package a;\\n\\nimport \\\"vendor/a/b\\\"\\n\\nfunc a() { b<caret>.Println() }\");\n  }\n\n  public void testImportBuiltinPackage() {\n    myFixture.configureByText(\"a.go\", \"package a; func a() { built<caret>in.Println() }\");\n    assertEmpty(myFixture.filterAvailableIntentions(\"Import builtin?\"));\n  }\n\n  public void testImportSdkTestData() {\n    myFixture.configureByText(\"a.go\", \"package a; func _() { println(p<caret>kg.ExportedConstant) } \");\n    assertEmpty(myFixture.filterAvailableIntentions(\"Import doc/testdata?\"));\n  }\n\n  public void testImportVendoredBuiltinPackage() {\n    myFixture.addFileToProject(\"vendor/builtin/builtin.go\", \"package builtin\");\n    myFixture.configureByText(\"a.go\", \"package a; func a() { built<caret>in.Println() }\");\n    myFixture.launchAction(myFixture.findSingleIntention(\"Import builtin?\"));\n    myFixture.checkResult(\"package a;\\n\\nimport \\\"builtin\\\"\\n\\nfunc a() { builtin.Println() }\");\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/codeInsight/unwrap/GoBracesUnwrapperTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.codeInsight.unwrap;\n\npublic class GoBracesUnwrapperTest extends GoUnwrapTestCase {\n  public void testNoActionFor() {\n    assertOptions(\"for { <caret>\\n}\", \"Unwrap for\");\n  }\n\n  public void testNoActionIf() {\n    assertOptions(\"if true { <caret>\\n}\", \"Unwrap if\");\n  }\n\n  public void testVoidBraces() {\n    assertUnwrapped(\"{ <caret>\\n}\", \"\\n\");\n  }\n\n  public void testBracesWithOneStatement() {\n    assertUnwrapped(\n      \"{ <caret>\\n\" +\n      \"var i int\\n\" +\n      \"}\",\n      \"var i int\\n\"\n    );\n  }\n\n  public void testBracesWithThreeStatements() {\n    assertUnwrapped(\n      \"{ <caret>\\n\" +\n      \"var i int\\n\" +\n      \"i = 2\\n\" +\n      \"i++\\n\" +\n      \"}\",\n\n      \"var i int\\n\" +\n      \"i = 2\\n\" +\n      \"i++\\n\"\n    );\n  }\n}"
  },
  {
    "path": "tests/com/goide/codeInsight/unwrap/GoElseRemoverTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.codeInsight.unwrap;\n\npublic class GoElseRemoverTest extends GoUnwrapTestCase {\n  public void testNoAction() {\n    assertUnwrapped(\n      \"if true { \\n\" +\n      \"}<caret>\",\n      \"if true { \\n\" +\n      \"}<caret>\"\n    );\n  }\n\n  public void testVoidElse() {\n    assertUnwrapped(\"if true { } else <caret> {  }\", \"if true { }\");\n  }\n\n  public void testVoidElseWithCaretReturn() {\n    assertUnwrapped(\"if true {\\n } else <caret> {  \\n}\\n\", \"if true {\\n }\\n\");\n  }\n\n  public void testElse() {\n    assertUnwrapped(\"if true {\\n } else <caret> {  \\n  var i int \\n }\\n\", \"if true {\\n }\\n\");\n  }\n}"
  },
  {
    "path": "tests/com/goide/codeInsight/unwrap/GoElseUnwrapperTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.codeInsight.unwrap;\n\npublic class GoElseUnwrapperTest extends GoUnwrapTestCase {\n  public void testNoAction() {\n    assertUnwrapped(\"if true { \\n}<caret>\", \"if true { \\n}<caret>\", 1);\n  }\n\n  public void testVoidElse() {\n    assertUnwrapped(\"if true {\\n } else <caret> {  \\n}\\n\", \"if true {\\n }\\n\", 1);\n  }\n\n  public void testElse() {\n    assertUnwrapped(\"if true {\\n } else <caret> {  \\n  var i int \\n }\\n\", \"if true {\\n }\\nvar i int\\n\", 1);\n  }\n\n  public void testElseWithTwoStatements() {\n    assertUnwrapped(\"if true {\\n } else <caret> {  \\nvar i int\\n i = 23\\n }\\n\", \"if true {\\n }\\nvar i int\\ni = 23\\n\", 1);\n  }\n\n  public void testElseIf() {\n    assertUnwrapped(\"if true {\\n } else if <caret> {  \\nvar i int\\n i = 23\\n }\\n\", \"if true {\\n }\\nif {\\n\\tvar i int\\n\\ti = 23\\n}\\n\", 1);\n  }\n}"
  },
  {
    "path": "tests/com/goide/codeInsight/unwrap/GoForUnwrapperTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.codeInsight.unwrap;\n\npublic class GoForUnwrapperTest extends GoUnwrapTestCase {\n  public void testVoidFor() {\n    assertUnwrapped(\"for <caret> { \\n}\", \"\\n\");\n  }\n\n  public void testForWithOneStatement() {\n    assertUnwrapped(\n      \"for <caret> { \\n\" +\n      \"var i int\\n\" +\n      \"}\", \"var i int\\n\");\n  }\n\n  public void testForWithThreeStatements() {\n    assertUnwrapped(\n      \"for <caret> { \\n\" +\n      \"var a, b int\\n\" +\n      \"a = 2\\n\" +\n      \"b = 3\\n\" +\n      \"}\",\n      \"var a, b int\\n\" +\n      \"a = 2\\n\" +\n      \"b = 3\\n\"\n    );\n  }\n\n  public void testForWithForClause() {\n    assertUnwrapped(\n      \"for i := 1; i < 10; i++ { \\n\" +\n      \"<caret>var a int\\n\" +\n      \"a = i\\n\" +\n      \"}\",\n      \"i := 1\\n\" +\n      \"var a int\\n\" +\n      \"a = i\\n\"\n    );\n  }\n\n  public void testForWithRangeClause() {\n    assertUnwrapped(\n      \"for i := range \\\"asd\\\" { \\n\" +\n      \"<caret>var a string\\n\" +\n      \"a = i\\n\" +\n      \"}\",\n      \"var a string\\n\" +\n      \"a = i\\n\"\n    );\n  }\n}"
  },
  {
    "path": "tests/com/goide/codeInsight/unwrap/GoFunctionArgumentUnwrapperTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.codeInsight.unwrap;\n\npublic class GoFunctionArgumentUnwrapperTest extends GoUnwrapTestCase {\n  public void testNoAction() {\n    assertUnwrapped(\"asd(<caret>)\", \"asd(<caret>)\");\n  }\n\n  public void testOneArg() {\n    assertUnwrapped(\"asd(<caret>3)\", \"3\");\n  }\n\n  public void testThreeArgs() {\n    assertUnwrapped(\"asd(f(), 3, <caret>f())\", \"f()\");\n  }\n\n  public void testInsertedCalls() {\n    assertUnwrapped(\"f1(f2(<caret>4))\", \"f1(4)\", 0);\n  }\n\n  public void testInsertedCallsUseSecodAction() {\n    assertUnwrapped(\"f1(f2(<caret>4))\", \"f2(4)\", 1);\n  }\n}"
  },
  {
    "path": "tests/com/goide/codeInsight/unwrap/GoIfUnwrapperTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.codeInsight.unwrap;\n\npublic class GoIfUnwrapperTest extends GoUnwrapTestCase {\n  public void testNoAction() {\n    assertUnwrapped(\n      \"if true { \\n\" +\n      \"}  <caret>\",\n      \"if true { \\n\" +\n      \"}  \"\n    );\n  }\n\n  public void testVoidIf() {\n    assertUnwrapped(\n      \"if true <caret> { \\n\" +\n      \"} else { }\\n\",\n      \"\\n\"\n    );\n  }\n\n  public void testIfWithOneStatement() {\n    assertUnwrapped(\n      \"if true <caret> { \\n\" +\n      \"var i int\\n\" +\n      \"} else { }\",\n      \"var i int\"\n    );\n  }\n\n  public void testIfThreeStatements() {\n    assertUnwrapped(\n      \"if true <caret> { \\n\" +\n      \"var a, b int\\n\" +\n      \"a = 2\\n\" +\n      \"b = 3\\n\" +\n      \"} else { }\",\n      \"var a, b int\\n\" +\n      \"a = 2\\n\" +\n      \"b = 3\\n\"\n    );\n  }\n\n  public void testInsertedIndents() {\n    assertUnwrapped(\n      \"if true <caret> { \\n\" +\n      \"\\tif {\\n\" +\n      \"\\t\\tvar i int\\n\" +\n      \"\\t}\\n\" +\n      \"}\",\n      \"if {\\n\" +\n      \"\\tvar i int\\n\" +\n      \"}\\n\"\n    );\n  }\n}"
  },
  {
    "path": "tests/com/goide/codeInsight/unwrap/GoUnwrapTestCase.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.codeInsight.unwrap;\n\nimport com.goide.GoCodeInsightFixtureTestCase;\nimport com.intellij.codeInsight.unwrap.UnwrapHandler;\nimport com.intellij.openapi.actionSystem.AnAction;\nimport com.intellij.openapi.editor.Editor;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.List;\nimport java.util.stream.Collectors;\n\npublic abstract class GoUnwrapTestCase extends GoCodeInsightFixtureTestCase {\n  protected void assertUnwrapped(@NotNull String codeBefore, @NotNull String codeAfter) {\n    assertUnwrapped(codeBefore, codeAfter, 0);\n  }\n\n  protected void assertUnwrapped(@NotNull String codeBefore, @NotNull String codeAfter, int option) {\n    myFixture.configureByText(\"a.go\", normalizeCode(codeBefore));\n    UnwrapHandler h = new UnwrapHandler() {\n      @Override\n      protected void selectOption(List<AnAction> options, Editor editor, PsiFile file) {\n        if (options.isEmpty()) return;\n        options.get(option).actionPerformed(null);\n      }\n    };\n    h.invoke(getProject(), myFixture.getEditor(), myFixture.getFile());\n    myFixture.checkResult(normalizeCode(codeAfter));\n  }\n\n  protected void assertOptions(@NotNull String code, String... expectedOptions) {\n    myFixture.configureByText(\"a.go\", normalizeCode(code));\n    List<String> actualOptions = ContainerUtil.newArrayList();\n    UnwrapHandler h = new UnwrapHandler() {\n      @Override\n      protected void selectOption(List<AnAction> options, Editor editor, PsiFile file) {\n        actualOptions.addAll(options.stream().map(each -> each.getTemplatePresentation().getText()).collect(Collectors.toList()));\n      }\n    };\n    h.invoke(getProject(), myFixture.getEditor(), myFixture.getFile());\n    assertOrderedEquals(actualOptions, expectedOptions);\n  }\n}"
  },
  {
    "path": "tests/com/goide/completion/GoCompletionSdkAwareTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.completion;\n\nimport com.goide.SdkAware;\nimport com.goide.sdk.GoSdkService;\nimport com.intellij.codeInsight.completion.CompletionType;\nimport com.intellij.codeInsight.lookup.Lookup;\nimport com.intellij.psi.PsiFile;\n\nimport java.io.IOException;\nimport java.util.List;\n\n@SdkAware\npublic class GoCompletionSdkAwareTest extends GoCompletionTestBase {\n  public void testFormatter() {\n    doTestInclude(\"package main; import . \\\"fmt\\\"; type alias <caret>\", \"Formatter\");\n  }\n\n  public void testDoNotCompleteBuiltinFunctions() {\n    doCheckResult(\"package main; var a = fals<caret>\", \"package main; var a = false<caret>\");\n  }\n\n  public void testCamelHumpTypeCompletion() {\n    doCheckResult(\"package main;\\n\" +\n                  \"func test(){io.reWSC<caret>}\",\n                  \"package main;\\n\\n\" +\n                  \"import \\\"idea_io\\\"\\n\\n\" +\n                  \"func test(){idea_io.ReadWriteSeekerCustom()}\", Lookup.NORMAL_SELECT_CHAR);\n  }\n\n\n  public void testCamelHumpFunctionCompletion() {\n    doCheckResult(\"package main;\\n\" +\n                  \"func test(){io.reALC<caret>}\",\n                  \"package main;\\n\\n\" +\n                  \"import \\\"idea_io\\\"\\n\\n\" +\n                  \"func test(){idea_io.ReadAtLeastCustom()}\", Lookup.NORMAL_SELECT_CHAR);\n  }\n\n  public void testTypeAutoImport() {\n    doCheckResult(\"package main; \\n\" +\n                  \"func test(){Templat<caret>}\",\n                  \"package main;\\n\\n\" +\n                  \"import \\\"text/template\\\"\\n\\n\" +\n                  \"func test(){template.Template{<caret>}}\", \"template.Template\");\n  }\n\n  public void testTypeAutoImportOnQualifiedName() {\n    doCheckResult(\"package main; \\n\" +\n                  \"func test(){template.Templat<caret>}\",\n                  \"package main;\\n\\n\" +\n                  \"import \\\"text/template\\\"\\n\\n\" +\n                  \"func test(){template.Template{<caret>}}\");\n  }\n\n  public void testFunctionAutoImport() {\n    doCheckResult(\"package main; \\n\" +\n                  \"func test(){Fprintl<caret>}\",\n                  \"package main;\\n\\n\" +\n                  \"import \\\"fmt\\\"\\n\\n\" +\n                  \"func test(){fmt.Fprintln(<caret>)}\", \"fmt.Fprintln\");\n  }\n\n  public void testVariableAutoImport() {\n    doCheckResult(\"package main; \\n\" +\n                  \"func test(){ErrNotSuppor<caret>}\",\n                  \"package main;\\n\\n\" +\n                  \"import \\\"net/http\\\"\\n\\n\" +\n                  \"func test(){http.ErrNotSupported}\", \"http.ErrNotSupported\");\n  }\n\n  public void testConstantAutoImport() {\n    doCheckResult(\"package main; \\n\" +\n                  \"func test(){O_RDO<caret>}\", \"package main;\\n\\n\" +\n                                               \"import \\\"os\\\"\\n\\n\" +\n                                               \"func test(){os.O_RDONLY}\");\n  }\n\n  public void testDuplicateAutoImport() {\n    doCheckResult(\"package main; \\n\" +\n                  \"func test(){Fprintl<caret>}\",\n                  \"package main;\\n\\n\" +\n                  \"import \\\"fmt\\\"\\n\\n\" +\n                  \"func test(){fmt.Fprintln(<caret>)}\", \"fmt.Fprintln\");\n    myFixture.type(\");Fprintl\");\n    myFixture.completeBasic();\n    selectLookupItem(\"fmt.Fprintln\");\n    myFixture.checkResult(\"package main;\\n\\n\" +\n                          \"import \\\"fmt\\\"\\n\\n\" +\n                          \"func test(){fmt.Fprintln();fmt.Fprintln()}\");\n  }\n\n  public void testForceAutoImportBlankImports() {\n    doCheckResult(\"package main; \\n\" +\n                  \"import _ \\\"fmt\\\"\\n\" +\n                  \"func test(){Fprintl<caret>}\",\n                  \"package main;\\n\\n\" +\n                  \"import (\\n\" +\n                  \"\\t_ \\\"fmt\\\"\\n\" +\n                  \"\\t\\\"fmt\\\"\\n\" +\n                  \")\\n\" +\n                  \"func test(){fmt.Fprintln()}\", \"fmt.Fprintln\");\n  }\n\n  public void testAutoImportWithAlias() {\n    doCheckResult(\"package main; \\n\" +\n                  \"import alias `fmt`\\n\" +\n                  \"func test(){Fprintl<caret>}\",\n                  \"package main; \\n\" +\n                  \"import alias `fmt`\\n\" +\n                  \"func test(){alias.Fprintln()}\",\n                  \"alias.Fprintln\");\n  }\n\n  public void testAutoImportWithDotAlias() {\n    doCheckResult(\"package main; \\n\" +\n                  \"import . `fmt`\\n\" +\n                  \"func test(){Fprintl<caret>}\",\n                  \"package main; \\n\" +\n                  \"import . `fmt`\\n\" +\n                  \"func test(){Fprintln()}\");\n  }\n\n  public void testUseImportPathInsteadOfPackageNameForAutoImport() {\n    doCheckResult(\"package main\\n\" +\n                  \"\\n\" +\n                  \"import (\\n\" +\n                  \"    \\\"fmt\\\"\\n\" +\n                  \")\\n\" +\n                  \"\\n\" +\n                  \"func main() {\\n\" +\n                  \"    fmt.Printf(FunctionInPackageThatDoesNotMatchDirectory<caret>);\\n\" +\n                  \"}\",\n                  \"package main\\n\" +\n                  \"\\n\" +\n                  \"import (\\n\" +\n                  \"    \\\"fmt\\\"\\n\" +\n                  \"\\t\\\"dirName\\\"\\n\" +\n                  \")\\n\" +\n                  \"\\n\" +\n                  \"func main() {\\n\" +\n                  \"    fmt.Printf(otherPackage.FunctionInPackageThatDoesNotMatchDirectoryName());\\n\" +\n                  \"}\", \"otherPackage.FunctionInPackageThatDoesNotMatchDirectoryName\");\n  }\n\n  public void testUsePackageNameInsteadOfImportPathIfPackageIsImported() {\n    doCheckResult(\"package main\\n\" +\n                  \"\\n\" +\n                  \"import (\\n\" +\n                  \"    \\\"fmt\\\"\\n\" +\n                  \"    \\\"dirName\\\"\\n\" +\n                  \")\\n\" +\n                  \"\\n\" +\n                  \"func main() {\\n\" +\n                  \"    fmt.Printf(FunctionInPackageThatDoesNotMatchDirectory<caret>);\\n\" +\n                  \"}\",\n                  \"package main\\n\" +\n                  \"\\n\" +\n                  \"import (\\n\" +\n                  \"    \\\"fmt\\\"\\n\" +\n                  \"    \\\"dirName\\\"\\n\" +\n                  \")\\n\" +\n                  \"\\n\" +\n                  \"func main() {\\n\" +\n                  \"    fmt.Printf(otherPackage.FunctionInPackageThatDoesNotMatchDirectoryName());\\n\" +\n                  \"}\", \"otherPackage.FunctionInPackageThatDoesNotMatchDirectoryName\");\n  }\n\n  public void testDoNotImportLocallyImportedPackage() throws IOException {\n    myFixture.addFileToProject(\"imported/imported.go\", \"package imported\\n\" +\n                                                       \"func LocallyImported() {}\");\n    doCheckResult(\"package main; \\n\" +\n                  \"import `./imported`\\n\" +\n                  \"func test(){LocallyImport<caret>}\", \"package main; \\n\" +\n                                                       \"import `./imported`\\n\" +\n                                                       \"func test(){imported.LocallyImported()}\",\n                  \"imported.LocallyImported\");\n  }\n\n  public void testImportedFunctionsPriority() {\n    myFixture.configureByText(\"a.go\", \"package main; \\n\" +\n                                      \"import `io`\\n\" +\n                                      \"func test(){ReadA<caret>}\");\n    failOnFileLoading();\n    myFixture.completeBasic();\n    myFixture.assertPreferredCompletionItems(0, \"io.ReadAtLeast\", \"io.ReaderAt\", \"idea_io.ReadAtLeastCustom\", \"idea_io.ReaderAtCustom\");\n  }\n\n  public void testImportedTypesPriority() {\n    myFixture.configureByText(\"a.go\", \"package main; \\n\" +\n                                      \"import `io`\\n\" +\n                                      \"func test(ReadWriteSeeke<caret>){}\");\n    failOnFileLoading();\n    myFixture.completeBasic();\n    myFixture.assertPreferredCompletionItems(0, \"io.ReadWriteSeeker\", \"idea_io.ReadWriteSeekerCustom\");\n  }\n\n  public void testDoNothingInsideSelector() {\n    doTestVariants(\n      \"package main\\n\" +\n      \"import \\\"fmt\\\"\\n\" +\n      \"func test(){fmt.Sprintln().<caret>}\", CompletionType.BASIC, 1, CheckType.EQUALS\n    );\n  }\n\n  public void testDoNotRunAutoImportCompletionAfterDot() {\n    doTestCompletion();\n  }\n\n  public void testDoNotRunAutoImportFunctionCompletionAfterUnaryAmpersand() {\n    doCheckResult(\"package main;\\n\" +\n                  \"func test(){println(&io.reALC<caret>)}\",\n                  \"package main;\\n\" +\n                  \"func test(){println(&io.reALC\\n\" +\n                  \"\\t<caret>)}\", Lookup.NORMAL_SELECT_CHAR);\n    assertNull(myFixture.getLookup());\n  }\n\n  public void testDoNotRunAutoImportCompletionAfterDotAndSpace() {\n    doTestCompletion();\n    assertNull(myFixture.getLookup());\n  }\n\n  public void testImports() {\n    doTestInclude(\"package main; import \\\"<caret>\", \"fmt\", \"io\");\n  }\n\n  public void testCaseInsensitiveTypeConversion() {\n    doCheckResult(\"package main; import \\\"fmt\\\"; func test(){fmt.form<caret>}\",\n                  \"package main; import \\\"fmt\\\"; func test(){fmt.Formatter(<caret>)}\");\n  }\n\n  public void testCaseInsensitiveFunction() {\n    doCheckResult(\"package main; import \\\"fmt\\\"; func test(){fmt.err<caret>}\",\n                  \"package main; import \\\"fmt\\\"; func test(){fmt.Errorf(<caret>)}\");\n  }\n\n  public void testCaseInsensitiveType() {\n    doCheckResult(\"package main; import \\\"fmt\\\"; func test(fmt.form<caret>}\",\n                  \"package main; import \\\"fmt\\\"; func test(fmt.Formatter<caret>}\");\n  }\n\n  public void testPrintlnBuiltin() {\n    doTestInclude(\"package main; func test(){pr<caret>}\", \"print\", \"println\");\n  }\n\n  public void testNothingUnrelatedInsideSelector() {\n    doTestEquals(\"package foo; type E struct {}; type B struct {E}; func (e E) foo() {}; func boo() {}\" +\n                 \"func main() {B{}.E..<caret>foo()}\", \"foo\");\n  }\n\n  public void testCompleteWithUnfinishedPackage() {\n    doCheckResult(\"package main\\n\" +\n                  \"func main() {\\n\" +\n                  \"    f.fprintl<caret>\\n\" +\n                  \"}\",\n                  \"package main\\n\\n\" +\n                  \"import \\\"fmt\\\"\\n\\n\" +\n                  \"func main() {\\n\" +\n                  \"    fmt.Fprintln()\\n\" +\n                  \"}\");\n  }\n\n  public void testDoNotCompleteTestFunctions() throws IOException {\n    myFixture.addFileToProject(\"pack/pack_test.go\", \"package pack; func TestFoo() {}\");\n    myFixture.configureByText(\"my_test.go\", \"package a; func main() { _ = TestF<caret>\");\n    myFixture.completeBasic();\n    assertNull(myFixture.getLookup());\n    myFixture.checkResult(\"package a; func main() { _ = TestF<caret>\");\n  }\n\n  public void testDoNotCompleteBenchmarkFunctions() throws IOException {\n    myFixture.addFileToProject(\"pack/pack_test.go\", \"package pack; func BenchmarkFoo() {}\");\n    myFixture.configureByText(\"my_test.go\", \"package a; func main() { _ = BenchmarkF<caret>\");\n    myFixture.completeBasic();\n    assertNull(myFixture.getLookup());\n    myFixture.checkResult(\"package a; func main() { _ = BenchmarkF<caret>\");\n  }\n\n  public void testDoNotCompleteExampleFunctions() throws IOException {\n    myFixture.addFileToProject(\"pack/pack_test.go\", \"package pack; func ExampleFoo() {}\");\n    myFixture.configureByText(\"my_test.go\", \"package a; func main() { _ = ExampleF<caret>\");\n    assertNull(myFixture.getLookup());\n    myFixture.completeBasic();\n  }\n\n  public void testCompleteTestBenchmarkExamplesFromNonTestFiles() throws IOException {\n    myFixture.addFileToProject(\"pack/pack.go\", \"package pack; func TestFoo() {} func BenchmarkFoo() {} func ExampleFoo() {}\");\n    myFixture.configureByText(\"my_test.go\", \"package a; func main() { _ = Foo<caret>\");\n    myFixture.completeBasic();\n    //noinspection ConstantConditions\n    assertContainsElements(myFixture.getLookupElementStrings(), \"pack.TestFoo\", \"pack.BenchmarkFoo\", \"pack.ExampleFoo\");\n  }\n\n  public void testDoNotAutoImportWithTheSameImportPath() throws IOException {\n    myFixture.addFileToProject(\"pack1/file2.go\", \"package pack1; func MyFunctionFromSamePath() {}\");\n    myFixture.addFileToProject(\"pack2/file2.go\", \"package pack1; func MyFunctionFromOtherPath() {}\");\n    PsiFile file = myFixture.addFileToProject(\"pack1/file1.go\", \"package pack1; func test() { pack1.MyFunc<caret> }\");\n    myFixture.configureFromExistingVirtualFile(file.getVirtualFile());\n    myFixture.completeBasic();\n    myFixture.checkResult(\"package pack1;\\n\\nimport \\\"pack2\\\"\\n\\nfunc test() { pack1.MyFunctionFromOtherPath() }\");\n  }\n\n  public void testAutoImportOwnImportPathFromTest() throws IOException {\n    myFixture.addFileToProject(\"pack/a.go\", \"package myPack; func Func() {}\");\n    PsiFile testFile = myFixture.addFileToProject(\"pack/a_test.go\", \"package myPack_test; func TestFunc() { myPack.Fun<caret> }\");\n    myFixture.configureFromExistingVirtualFile(testFile.getVirtualFile());\n    myFixture.completeBasic();\n    myFixture.checkResult(\"package myPack_test;\\n\\nimport \\\"pack\\\"\\n\\nfunc TestFunc() { myPack.Func() }\");\n  }\n\n  public void testDoNotAutoImportDifferentPackageInSamePathFromTest() throws IOException {\n    String text = \"package foo_test; func TestFunc() { bar.Fun<caret> }\";\n    myFixture.addFileToProject(\"pack/a.go\", \"package bar; func Func() {}\");\n    PsiFile file = myFixture.addFileToProject(\"pack/a_test.go\", text);\n    myFixture.configureFromExistingVirtualFile(file.getVirtualFile());\n    myFixture.completeBasic();\n    assertNull(myFixture.getLookup());\n    myFixture.checkResult(text);\n  }\n\n  public void testImportOwnPathFromTestFile() throws IOException {\n    PsiFile testFile = myFixture.addFileToProject(\"fuzz/fuzy_test.go\", \"package fuzy_test; import \\\"<caret>\\\"\");\n    myFixture.configureFromExistingVirtualFile(testFile.getVirtualFile());\n    myFixture.completeBasic();\n    //noinspection ConstantConditions\n    assertContainsElements(myFixture.getLookupElementStrings(), \"fuzz\");\n  }\n\n  public void testDoNotImportOwnPathFromNonTestPackage() throws IOException {\n    PsiFile testFile = myFixture.addFileToProject(\"fuzz/fuzy_test.go\", \"package fuzy; import \\\"<caret>\\\"\");\n    myFixture.configureFromExistingVirtualFile(testFile.getVirtualFile());\n    myFixture.completeBasic();\n    List<String> strings = myFixture.getLookupElementStrings();\n    assertTrue(strings != null && !strings.contains(\"fuzz\"));\n  }\n\n  public void testDoNotCompleteBuiltinImport() {\n    doCheckResult(\"package a; import \\\"built<caret>\\\"\", \"package a; import \\\"built<caret>\\\"\");\n    assertNull(myFixture.getLookup());\n  }\n\n  public void testCompleteVendoredBuiltinImport() {\n    myFixture.addFileToProject(\"vendor/builtin/builtin.go\", \"package builtin; func Hello() {}\");\n    doCheckResult(\"package a; import \\\"built<caret>\\\"\", \"package a; import \\\"builtin<caret>\\\"\");\n  }\n\n  public void testAutoImportVendorPackage() {\n    myFixture.addFileToProject(\"vendor/vendorPackage/foo.go\", \"package vendorPackage; func Bar() {}\");\n    doCheckResult(\"package src; func _() { ven.Ba<caret> }\", \"package src;\\n\" +\n                                                             \"\\n\" +\n                                                             \"import \\\"vendorPackage\\\"\\n\" +\n                                                             \"\\n\" +\n                                                             \"func _() { vendorPackage.Bar() }\");\n  }\n\n  public void testAutoImportVendorPackageWithDisabledVendoring() {\n    disableVendoring();\n    myFixture.addFileToProject(\"vendor/vendorPackage/foo.go\", \"package vendorPackage; func Bar() {}\");\n    doCheckResult(\"package src; func _() { ven.Ba<caret> }\", \"package src;\\n\" +\n                                                             \"\\n\" +\n                                                             \"import \\\"vendor/vendorPackage\\\"\\n\" +\n                                                             \"\\n\" +\n                                                             \"func _() { vendorPackage.Bar() }\");\n  }\n\n  public void testDoNotCompleteSymbolsFromUnreachableVendoredPackages() {\n    myFixture.addFileToProject(\"vendor/foo/foo.go\", \"package foo; func VendoredFunction() {}\");\n    myFixture.addFileToProject(\"vendor/foo/vendor/bar/bar.go\", \"package bar; func VendoredFunction() {}\");\n    myFixture.configureByText(\"a.go\", \"package src; func _() { VendorF<caret> }\");\n    myFixture.completeBasic();\n    //noinspection ConstantConditions\n    assertSameElements(myFixture.getLookupElementStrings(), \"foo.VendoredFunction\");\n  }\n\n  public void testDoNotCompleteSymbolsFromShadowedPackages() {\n    myFixture.addFileToProject(\"foo/foo.go\", \"package foo; func ShadowedFunction() {}\");\n    myFixture.addFileToProject(\"vendor/foo/foo.go\", \"package bar; func ShadowedFunction() {}\");\n    myFixture.configureByText(\"a.go\", \"package src; func _() { ShadowF<caret> }\");\n    myFixture.completeBasic();\n    //noinspection ConstantConditions\n    assertSameElements(myFixture.getLookupElementStrings(), \"bar.ShadowedFunction\");\n  }\n\n  public void testDoNotCompleteSymbolsFromShadowedVendoredPackages() {\n    myFixture.addFileToProject(\"vendor/foo/foo.go\", \"package bar; func ShadowedFunction() {}\");\n    myFixture.addFileToProject(\"vendor/foo/vendor/foo/foo.go\", \"package bar; func ShadowedFunction() {}\");\n    PsiFile file = myFixture.addFileToProject(\"vendor/foo/main.go\", \"package foo; func _() { ShadowF<caret> }\");\n    myFixture.configureFromExistingVirtualFile(file.getVirtualFile());\n    myFixture.completeBasic();\n    //noinspection ConstantConditions\n    assertSameElements(myFixture.getLookupElementStrings(), \"bar.ShadowedFunction\");\n  }\n\n  public void testDoNotCompletePackagesShadowedBySdkDirectories() {\n    myFixture.addFileToProject(\"fmt/subdir/fmt.go\", \"package subdir; func Println() {}\");\n    myFixture.addFileToProject(\"fmt/fmt.go\", \"package shadowed; func Println() {}\");\n    myFixture.configureByText(\"a.go\", \"package src; import `fmt<caret>`\");\n    myFixture.completeBasic();\n    //noinspection ConstantConditions\n    assertSameElements(myFixture.getLookupElementStrings(), \"fmt\", \"fmt/subdir\");\n  }\n\n  public void testDoNotCompleteFunctionsFromPackagesShadowedBySdkDirectories() {\n    myFixture.addFileToProject(\"fmt/subdir/fmt.go\", \"package subdir; func Println() {}\");\n    myFixture.addFileToProject(\"fmt/fmt.go\", \"package shadowed; func Println() {}\");\n    myFixture.configureByText(\"a.go\", \"package src; func _() { Printl<caret> }\");\n    myFixture.completeBasic();\n    List<String> elementStrings = myFixture.getLookupElementStrings();\n    assertNotNull(elementStrings);\n    assertContainsElements(elementStrings, \"subdir.Println\");\n    assertDoesntContain(elementStrings, \"shadowed.Println\");\n  }\n  \n  public void testCompleteInternalPackageOn1_2_SDK() {\n    myFixture.addFileToProject(\"internal/internal.go\", \"package internalPackage; func InternalFunction() {}\");\n    myFixture.addFileToProject(\"sub/internal/internal.go\", \"package subInternalPackage; func InternalFunction() {}\");\n    myFixture.configureByText(\"a.go\", \"package a; import `inte<caret>`\");\n    myFixture.completeBasic();\n    List<String> elementStrings = myFixture.getLookupElementStrings();\n    assertNotNull(elementStrings);\n    assertContainsElements(elementStrings, \"internal\", \"sub/internal\", \"net/internal\");\n  }\n\n  public void testCompleteInternalPackageOn1_4_SDK() {\n    GoSdkService.setTestingSdkVersion(\"1.4\", getTestRootDisposable());\n    myFixture.addFileToProject(\"internal/internal.go\", \"package internalPackage; func InternalFunction() {}\");\n    myFixture.addFileToProject(\"sub/internal/internal.go\", \"package subInternalPackage; func InternalFunction() {}\");\n    myFixture.configureByText(\"a.go\", \"package a; import `inte<caret>`\");\n    myFixture.completeBasic();\n    List<String> elementStrings = myFixture.getLookupElementStrings();\n    assertNotNull(elementStrings);\n    assertContainsElements(elementStrings, \"internal\", \"sub/internal\");\n    assertDoesntContain(elementStrings, \"net/internal\");\n  }\n\n  public void testCompleteInternalPackageOn1_5_SDK() {\n    GoSdkService.setTestingSdkVersion(\"1.5\", getTestRootDisposable());\n    myFixture.addFileToProject(\"internal/internal.go\", \"package internalPackage; func InternalFunction() {}\");\n    myFixture.addFileToProject(\"sub/internal/internal.go\", \"package subInternalPackage; func InternalFunction() {}\");\n    doCheckResult(\"package a; import `inte<caret>`\", \"package a; import `internal`\");\n  }\n\n  public void testIntArray()  { doTestInclude(\"package a; var x = []<caret>\", \"int\"); }\n  public void testMapIntInt() { doTestInclude(\"package a; var x = map[int]<caret>\", \"int\"); }\n  public void testStruct()    { doTestInclude(\"package a; var x = <caret>\", \"struct\"); }\n}\n"
  },
  {
    "path": "tests/com/goide/completion/GoCompletionTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.completion;\n\nimport com.intellij.codeInsight.lookup.Lookup;\nimport com.intellij.codeInsight.lookup.LookupElement;\nimport com.intellij.codeInsight.lookup.LookupElementPresentation;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.testFramework.TreePrintCondition;\nimport com.intellij.util.ArrayUtil;\nimport com.intellij.util.containers.ContainerUtil;\n\nimport java.util.List;\n\npublic class GoCompletionTest extends GoCompletionTestBase {\n  public void testPackageWithoutAlias() {\n    doTestInclude(\"package foo; import `fmt`; func main(){<caret>}\", \"fmt\");\n  }\n\n  public void testLocalFunction() {\n    doTestInclude(\"package foo; func foo() {}; func main() {<caret>}\", \"foo\", \"main\");\n  }\n\n  public void testLocalType() {\n    doTestInclude(\"package foo; type (T struct {}; T2 struct{}); func main(){var i <caret>}\", \"T\", \"T2\");\n  }\n\n  public void testLocalFunctionInDifferentFiles() {\n    myFixture.copyFileToProject(getTestName(true) + \"_context.go\", \"importPath/context.go\");\n    myFixture.configureFromExistingVirtualFile(myFixture.copyFileToProject(getTestName(true) + \".go\", \"importPath/main.go\"));\n    myFixture.completeBasic();\n    myFixture.checkResultByFile(getTestName(true) + \"_after.go\");\n  }\n  \n  public void testImportVendoringPackages() {\n    myFixture.addFileToProject(\"vendor/pack1/pack2/test.go\", \"package foo\");\n    doCheckResult(\"package foo; import `pa<caret>`\", \"package foo; import `pack1/pack2<caret>`\");\n  }\n\n  public void testImportVendoringPackagesWithDisabledVendoring() {\n    disableVendoring();\n    myFixture.addFileToProject(\"vendor/pack1/pack2/test.go\", \"package foo\");\n    doCheckResult(\"package foo; import `pa<caret>`\", \"package foo; import `vendor/pack1/pack2<caret>`\", Lookup.NORMAL_SELECT_CHAR);\n  }\n\n  public void testImportPackages() {\n    myFixture.addFileToProject(\"package1/pack/test.go\", \"package foo\");\n    myFixture.addFileToProject(\"package2/pack/test.go\", \"package bar\");\n    myFixture.configureByText(\"test.go\", \"package foo; import `pack<caret>`\");\n    myFixture.completeBasic();\n    List<String> lookupElementStrings = myFixture.getLookupElementStrings();\n    assertNotNull(lookupElementStrings);\n    assertSameElements(lookupElementStrings, \"package1/pack\", \"package2/pack\");\n  }\n\n  public void testImportPackagesWithoutClosingQuote() {\n    myFixture.addFileToProject(\"package1/pack/test.go\", \"package foo\");\n    myFixture.addFileToProject(\"package2/pack/test.go\", \"package bar\");\n    myFixture.configureByText(\"test.go\", \"package foo; import `pack<caret>\");\n    myFixture.completeBasic();\n    List<String> lookupElementStrings = myFixture.getLookupElementStrings();\n    assertNotNull(lookupElementStrings);\n    assertSameElements(lookupElementStrings, \"package1/pack\", \"package2/pack\");\n  }\n\n  public void testImportRelativePackages() {\n    myFixture.addFileToProject(\"package1/pack/test.go\", \"package foo\");\n    myFixture.addFileToProject(\"package2/pack/test.go\", \"package bar\");\n    myFixture.configureByText(\"test.go\", \"package foo; import `./pack<caret>`\");\n    myFixture.completeBasic();\n    List<String> lookupElementStrings = myFixture.getLookupElementStrings();\n    assertNotNull(lookupElementStrings);\n    assertSameElements(lookupElementStrings, \"package1\", \"package2\");\n  }\n\n  public void testDoNotCompleteFullPackagesForRelativeImports() {\n    myFixture.addFileToProject(\"package1/pack/test.go\", \"package foo\");\n    myFixture.addFileToProject(\"package2/pack/test.go\", \"package bar\");\n    myFixture.configureByText(\"test.go\", \"package foo; import `./pack<caret>`\");\n    myFixture.completeBasic();\n    List<String> lookupElementStrings = myFixture.getLookupElementStrings();\n    assertNotNull(lookupElementStrings);\n    assertSameElements(lookupElementStrings, \"package1\", \"package2\");\n  }\n\n  public void testDoNotCompleteOwnImportPath() {\n    myFixture.addFileToProject(\"package/long/long/path/test.go\", \"package pack\");\n    PsiFile testFile = myFixture.addFileToProject(\"package/very/long/path/but/same/package/test.go\",\n                                                  \"package pack; import `package/<caret>`\");\n    myFixture.configureFromExistingVirtualFile(testFile.getVirtualFile());\n    myFixture.completeBasic();\n    myFixture.checkResult(\"package pack; import `package/long/long/path`\");\n  }\n\n  public void testImportsPriority() {\n    myFixture.addFileToProject(\"package/long/but/similar/path/test.go\", \"package pack\");\n    myFixture.addFileToProject(\"package/very/long/path/test.go\", \"package pack\");\n    myFixture.addFileToProject(\"package/middle/path/test.go\", \"package pack\");\n    myFixture.addFileToProject(\"package/short/test.go\", \"package pack\");\n    PsiFile testFile = myFixture.addFileToProject(\"package/long/but/similar/test.go\", \"package pack; import `package/<caret>`\");\n    myFixture.configureFromExistingVirtualFile(testFile.getVirtualFile());\n    myFixture.completeBasic();\n    myFixture.assertPreferredCompletionItems(0, \"package/long/but/similar/path\", \"package/short\", \"package/middle/path\",\n                                             \"package/very/long/path\");\n  }\n\n  public void testDoNotHidePopupOnSlash() {\n    myFixture.addFileToProject(\"package1/pack/test.go\", \"package foo\");\n    myFixture.addFileToProject(\"package2/pack/test.go\", \"package bar\");\n    myFixture.configureByText(\"test.go\", \"package foo; import `<caret>`\");\n    myFixture.completeBasic();\n    myFixture.type(\"package1/\\n\");\n    myFixture.checkResult(\"package foo; import `package1/pack<caret>`\");\n  }\n\n  public void testLocalVar() {\n    doTestInclude(\"package foo; func main(){var i, j int; <caret>}\", \"i\", \"j\");\n  }\n\n  public void testPackageLocalVar() {\n    doTestInclude(\"package foo; var i, j int; func main(){<caret>}\", \"i\", \"j\");\n  }\n\n  public void testLocalVarExclude() {\n    doTestExclude(\"package foo; func main(){{var i, j int;}; <caret>}\", \"i\", \"j\");\n  }\n\n  public void testParams() {\n    doTestInclude(\"package foo; func main(i, j int){<caret>}\", \"i\", \"j\");\n  }\n\n  public void testConsts() {\n    doTestInclude(\"package foo; const i, j; func main(){<caret>}\", \"i\", \"j\");\n  }\n\n  public void testNoCompletionInsideStrings() {\n    doTestEquals(\"package foo; func main(){\\\"<caret>\\\"}\");\n  }\n\n  public void testNoKeywordCompletionInsideTypeDeclarationList() {\n    doTestEquals(\"package foo; type (\\n\\t<caret>\\n)\");\n  }\n\n  public void testNoKeywordCompletionInsideConstDeclarationList() {\n    doTestEquals(\"package foo; const (\\n\\t<caret>\\n)\");\n  }\n\n  public void testNoKeywordCompletionInsideVarDeclarationList() {\n    doTestEquals(\"package foo; var (\\n\\t<caret>\\n)\");\n  }\n  \n  public void testKeywordCompletionInsideVarDeclarationListAfterEquals() {\n    doTestInclude(\"package foo; var (\\n\\ta = <caret>\\n)\", \"map\", \"func\", \"struct\");\n  }\n\n  public void testNoCompletionInsideComments() {\n    doTestEquals(\"package foo; func main(){/*<caret>*/}\");\n  }\n\n  public void testStructTypes() {\n    doTestEquals(\"package foo; type AA struct {N AA}; func foo(a AA) {a.<caret>}\", \"N\");\n  }\n\n  public void testStructTypes2() {\n    doTestEquals(\"package foo; type AA struct {N AA}; func foo(a *AA) {a.<caret>}\", \"N\");\n  }\n\n  public void testStructKeyword() {\n    doCheckResult(\"package main; func main() { d := struct { name str<caret> }; _ = d }\",\n                  \"package main; func main() { d := struct { name struct{} }; _ = d }\");\n  }\n\n  public void testStructKeyword2() {\n    doTestInclude(\"package main; func main() { d := struct { name <caret> }; _ = d }\", \"struct\");\n  }\n\n  public void testStructKeyword3() {\n    doCheckResult(\"package main; func main() { d := str<caret>; _ = d }\",\n                  \"package main; func main() { d := struct {\\n\" +\n                  \"\\t<caret>\\n\" +\n                  \"}{}; _ = d }\");\n  }\n\n  public void testImports() {\n    doCheckResult(\"package foo; import imp \\\"\\\"; func foo(a im<caret>) {}\", \"package foo; import imp \\\"\\\"; func foo(a imp.) {}\");\n  }\n\n  public void testImportsForRefs() {\n    doCheckResult(\"package foo; import imp \\\"\\\"; func foo() {im<caret>.foo}\", \"package foo; import imp \\\"\\\"; func foo() {imp.<caret>foo}\");\n  }\n\n  public void testCompleteFieldWithoutColon() {\n    doCheckResult(\"package main;func main(){a:=struct{Demo int}{Demo:1};println(a.D<caret>)}\",\n                  \"package main;func main(){a:=struct{Demo int}{Demo:1};println(a.Demo<caret>)}\");\n  }\n\n  public void testCompleteFieldWithoutColonAfterKey() {\n    doCheckResult(\"package main; type Test struct { ID string }; func t() { var n Test; _ = &Test{ID: n.I<caret>} }\",\n                  \"package main; type Test struct { ID string }; func t() { var n Test; _ = &Test{ID: n.ID<caret>} }\");\n  }\n\n  public void testTopLevelKeywords() {\n    myFixture.testCompletionVariants(getTestName(true) + \".go\", \"const\", \"func\", \"import\", \"type\", \"var\");\n  }\n\n  public void testTopLevelKeywords_2() {\n    myFixture.testCompletionVariants(getTestName(true) + \".go\", \"const\", \"func\", \"type\", \"var\");\n  }\n\n  public void testBlockKeywords() {\n    myFixture.testCompletionVariants(getTestName(true) + \".go\", \"for\", \"const\", \"var\", \"return\", \"if\", \"switch\", \"go\", \"defer\", \"select\",\n                                     \"fallthrough\", \"goto\", \"main\", \"struct\", \"map\", \"type\");\n  }\n\n  public void testBlockKeywordsInsideOneLineFunction() {\n    myFixture.testCompletionVariants(getTestName(true) + \".go\", \"for\", \"const\", \"var\", \"return\", \"if\", \"switch\", \"go\", \"defer\", \"select\",\n                                     \"fallthrough\", \"goto\", \"main\", \"struct\", \"map\", \"type\");\n  }\n\n  public void testBlockKeywordsInsideCaseStatement() {\n    myFixture.testCompletionVariants(getTestName(true) + \".go\", \"break\", \"for\", \"const\", \"var\", \"return\", \"if\", \"switch\", \"go\", \"defer\", \"select\",\n                                     \"fallthrough\", \"goto\", \"main\", \"struct\", \"map\", \"case\", \"default\", \"type\");\n  }\n\n  public void testAddSpaceAfterKeyword() {\n    doTestCompletion();\n  }\n\n  public void testTypeKeywords() {\n    myFixture.testCompletionVariants(getTestName(true) + \".go\", \"struct\", \"interface\", \"chan\", \"map\");\n  }\n\n  public void testExpressionKeywords() {\n    myFixture.testCompletionVariants(getTestName(true) + \".go\", \"struct\", \"map\", \"main\", \"func\");\n  }\n\n  public void testTypeKeywordsInsideParentheses() {\n    myFixture.testCompletionVariants(getTestName(true) + \".go\", \"chan\", \"map\", \"interface\", \"struct\");\n  }\n\n  public void testSelectKeywordInsertHandler() {\n    doTestCompletion();\n  }\n\n  public void testTypeKeywordInsertBraces() {\n    doTestCompletion();\n  }\n\n  public void testTypeKeywordDoNotInsertBraces() {\n    doTestCompletion();\n  }\n\n  public void testInterfaceKeywordAsFunctionParameter() {\n    doTestCompletion();\n  }\n\n  public void testStructKeywordAsFunctionParameter() {\n    doTestCompletion();\n  }\n\n  public void testForStatementKeywords() {\n    myFixture.testCompletionVariants(getTestName(true) + \".go\", \"bar\", \"break\", \"const\", \"continue\", \"defer\", \"for\", \"go\", \"if\", \"return\",\n                                     \"fallthrough\", \"goto\", \"select\", \"switch\", \"var\", \"struct\", \"map\", \"type\");\n  }\n  \n  public void testForStatementKeywordsInsideFuncLit() {\n    myFixture.testCompletionVariants(getTestName(true) + \".go\", \"bar\", \"const\", \"defer\", \"for\", \"go\", \"if\", \"return\",\n                                     \"fallthrough\", \"goto\", \"select\", \"switch\", \"var\", \"struct\", \"map\", \"type\");\n  }\n\n  public void testDoNotCompleteKeywordsInsideConstSpec() {\n    myFixture.testCompletionVariants(getTestName(true) + \".go\", \"a\");\n  }\n\n  public void testDoNotCompleteKeywordsInsideSelectorExpression() {\n    myFixture.testCompletionVariants(getTestName(true) + \".go\", \"FuncA\", \"FuncB\");\n  }\n\n  public void testRangeKeyword_1() {\n    doTestCompletion();\n  }\n\n  public void testRangeKeyword_2() {\n    doTestCompletion();\n  }\n\n  public void testRangeKeyword_3() {\n    doTestCompletion();\n  }\n\n  public void testChanKeyword() {\n    doTestCompletion();\n  }\n\n  public void testChanKeyword_2() {\n    doTestCompletion();\n  }\n\n  public void testChanKeyword_3() {\n    doTestCompletion();\n  }\n\n  public void testMapKeyword() {\n    doTestCompletion();\n  }\n\n  public void testMapKeyword_2() {\n    doTestCompletion();\n  }\n\n  public void testMapKeywordInsertHandler() {\n    doTestCompletion();\n  }\n\n  public void testMapKeywordInsertHandlerDoNotInsertBrackets() {\n    doTestCompletion();\n  }\n\n  public void testElseKeyword() {\n    doTestCompletion();\n  }\n\n  public void testElseKeywordRegression() {\n    doTestEmptyCompletion();\n  }\n\n  public void testIfKeywordAfterElse() {\n    doTestCompletion();\n  }\n\n  public void testForStatementKeywordsDoNotInsertSpace() {\n    doTestCompletion();\n  }\n\n  public void testFunctionInDefer() {\n    doTestCompletion();\n  }\n\n  public void testFunctionAsFunctionArgument() {\n    doTestCompletion();\n  }\n\n  public void testFunctionAsVariableValue() {\n    doTestCompletion();\n  }\n\n  public void testFunctionInGo() {\n    doTestCompletion();\n  }\n\n  public void testPackageKeyword() {\n    doTestCompletion();\n  }\n\n  public void testPackageKeywordInEmptyFile() {\n    doTestCompletion();\n  }\n\n  public void testExpressionCaseKeywordCompletion() {\n    doTestCompletion();\n  }\n\n  public void testExpressionDefaultKeywordCompletion() {\n    doTestCompletion();\n  }\n\n  public void testTypeCaseKeywordCompletion() {\n    doTestCompletion();\n  }\n\n  public void testTypeDefaultKeywordCompletion() {\n    doTestCompletion();\n  }\n\n  public void testMethods() {\n    doTestEquals(\"package foo; type T interface{}; func (t T) f() {t.<caret>}\", \"f\");\n  }\n\n  public void testPreventStackOverflow() {\n    doTestEquals(\"package foo; type E struct {*E}; func (e E) foo() {}; func main() {e := E{}; e.<caret>}\", \"foo\", \"E\");\n  }\n\n  public void testNestedStructures() {\n    doTestEquals(\"package foo; type E struct {}; type B struct {E}; func (e E) foo() {}; func (b B) bar(){}\" +\n                 \"func main() {b := B{}; b.<caret>}\", \"foo\", \"bar\", \"E\");\n  }\n\n  public void testNestedStructures2() {\n    doTestEquals(\"package foo; type E struct {}; type B struct {E}; func (e E) foo() {}; \" +\n                 \"func main() {b := B{}; b.E.<caret>}\", \"foo\");\n  }\n\n  public void testNestedStructures3() {\n    doTestEquals(\"package foo; type E struct {}; type B struct {E}; func (e E) foo() {}; \" +\n                 \"func main() {B{}.E.<caret>}\", \"foo\");\n  }\n\n  public void testInterfaceTypes() {\n    doTestInclude(\"package foo; type E interface {}; type B interface {<caret>}\", \"E\");\n  }\n\n  public void testReceiverCompletion() {\n    doTestInclude(\"package foo; type E interface {}; func (e <caret>\", \"E\");\n  }\n\n  public void testInterfaceTypesNoStruct() {\n    doTestExclude(\"package foo; type E struct {}; type B interface {<caret>}\", \"E\");\n  }\n\n  public void testOnlyTypesInParameters() {\n    doTestExclude(\"package foo; const a int = 1; var b = 2; func main(<caret>) {}\", \"a\", \"b\", \"main\");\n  }\n\n  public void testInnerTypes() {\n    doTestInclude(\"package foo; func foo() {type innerType struct {}; var i <caret>}\", \"innerType\");\n  }\n\n  public void testChannelType() {\n    doTestInclude(\"package foo; func foo() {type T struct {cn *T}; var i T; i.<caret>}\", \"cn\");\n  }\n\n  public void testInterfaceType() {\n    doTestInclude(\"package foo; func foo(i interface {Boo() int}) {i.<caret>}\", \"Boo\");\n  }\n\n  public void testInterfaceType2() {\n    doTestInclude(\"package foo; type I interface {Boo() int}; func foo(i I) {i.<caret>}\", \"Boo\");\n  }\n\n  public void testLabel() {\n    doTestInclude(\"package foo; func main() { goto <caret>; Label1: 1}\", \"Label1\");\n  }\n  \n  public void testNoKeywordsInReceiver() {\n    doTestExclude(\"package foo; func (a <caret>) main() { }\", \"map\", \"chan\", \"struct\", \"interface\");\n  }\n\n  public void testOnlyLocalTypesInReceiver() {\n    doTestEquals(\"package foo; type ( t int; s int; ); func (c <caret>)\", \"s\", \"t\");\n  }\n\n  public void testNestedBlocks() {\n    doTestInclude(\"package main; func main() {def := 1; abc := 0; {<caret>}}\", \"abc\", \"def\");\n  }\n\n  public void testNoMainAnymore() {\n    doTestEquals(\"package foo; func ma<caret> { }\");\n  }\n\n  public void testNoChanOrMap() {\n    doTestEquals(\"package foo; func ma(f int.<caret>) { }\");\n  }\n\n  public void testOnTopLevel() {\n    doTestEquals(\"package foo; func ma() { }\\n<caret>\", \"var\", \"const\", \"func\", \"type\");\n  }\n\n  public void testPackageBeforeDot() {\n    doCheckResult(\"package foo; import imp \\\"\\\"; func foo(a im<caret>.SomeType) {}\",\n                  \"package foo; import imp \\\"\\\"; func foo(a imp.<caret>SomeType) {}\");\n  }\n\n  public void testNoUnderscore() {\n    String theSame = \"package foo; func foo() {_ := 1; <caret>}\";\n    doCheckResult(theSame, theSame);\n  }\n\n  public void testVarFuncTypeZeroParam() {\n    doCheckResult(\"package foo; var abc = func() {}; func main() {ab<caret>}\",\n                  \"package foo; var abc = func() {}; func main() {abc()<caret>}\");\n  }\n\n  public void testVarFuncTypeOneParam() {\n    doCheckResult(\"package foo; var abc = func(o int) {}; func main() {ab<caret>}\",\n                  \"package foo; var abc = func(o int) {}; func main() {abc(<caret>)}\");\n  }\n\n  public void testCaseInsensitiveVariable() {\n    doCheckResult(\"package main; func test(BBA int){b<caret>}\",\n                  \"package main; func test(BBA int){BBA<caret>}\");\n  }\n\n  public void testArrayType() {\n    doCheckResult(\"package main; type custom []string; func main() { _ = custom<caret> }\",\n                  \"package main; type custom []string; func main() { _ = custom{<caret>} }\");\n  }\n\n  public void testMapType() {\n    doCheckResult(\"package main; type custom map[string]string; func main() { _ = custom<caret> }\",\n                  \"package main; type custom map[string]string; func main() { _ = custom{<caret>} }\");\n  }\n\n  public void testRanges() {\n    doTestInclude(\"package foo; func foo(a int) {for k := range <caret>}\", \"a\");\n  }\n\n  public void testNoDuplicates() {\n    doTestInclude(\"package foo; type a struct {<caret>\", \"a\");\n    List<String> stringList = myFixture.getLookupElementStrings();\n    assertNotNull(stringList);\n    assertSize(1, ContainerUtil.filter(stringList, new TreePrintCondition.Include(\"a\")));\n  }\n\n  public void testTypeCastAsVar() {\n    doTestInclude(\"package main\\n\" +\n                  \"var fooVar int = 1\\n\" +\n                  \"func main() {\\n\" +\n                  \"    for _, v := range (*<caret>) {\\n\" +\n                  \"    }\\n\" +\n                  \"}\", \"fooVar\");\n  }\n\n  private static final String TYPE = \"package main;\\n\" +\n                                     \"type WaitGroup struct {\\n\" +\n                                     \"    counter int32\\n\" +\n                                     \"    waiters int32\\n\" +\n                                     \"    sema    *uint32\\n\" +\n                                     \"}\\n\";\n\n  public void testStructField() {\n    myFixture.configureByText(\"a.go\", TYPE + \"func main() {WaitGroup{<caret>}};\");\n    myFixture.completeBasic();\n    myFixture.assertPreferredCompletionItems(0, \"counter\", \"sema\", \"waiters\");\n  }\n\n  public void testAnonymousStructField() {\n    myFixture.configureByText(\"a.go\", TYPE + \"var baz = []*WaitGroup{{<caret>}}\");\n    myFixture.completeBasic();\n    myFixture.assertPreferredCompletionItems(0, \"counter\", \"sema\", \"waiters\");\n  }\n\n  public void testStructField2() {\n    doTestInclude(TYPE + \"func main() {WaitGroup{foo:bar, <caret>}};\", \"counter\", \"waiters\", \"sema\");\n  }\n\n  public void testStructFieldReplace() {\n    doCheckResult(TYPE + \"func main() { WaitGroup{sem<caret>abc} }\", TYPE + \"func main() { WaitGroup{sema:<caret>} }\",\n                  Lookup.REPLACE_SELECT_CHAR);\n  }\n\n  public void testStructFieldFromOtherStruct() {\n    doCheckResult(\"package main; type Example struct { ID string }; func main() { a := Example{ID: \\\"a\\\"}; _ = []string{a.<caret>} }\",\n                  \"package main; type Example struct { ID string }; func main() { a := Example{ID: \\\"a\\\"}; _ = []string{a.ID<caret>} }\",\n                  Lookup.NORMAL_SELECT_CHAR);\n  }\n\n  public void testNoStructFieldAfterColon() {\n    doTestExclude(TYPE + \"func main() {WaitGroup{sema:<caret>}};\", \"counter\", \"waiters\", \"sema\");\n  }\n\n  public void testStructConstructions() {\n    doCheckResult(\"package main; func main() {WaitGr<caret>}; type WaitGroup struct {sema *uint32}\",\n                  \"package main; func main() {WaitGroup{<caret>}}; type WaitGroup struct {sema *uint32}\");\n  }\n\n  public void testIntConversion() {\n    doCheckResult(\"package main; func main() {int<caret>}; type int int\",\n                  \"package main; func main() {int(<caret>)}; type int int\");\n  }\n\n  public void testPreventSOE() {\n    doTestInclude(\"package rubex; const ( IGNORECASE = 1; EXTEND = (IGNORECASE << 1); MULTILINE = (EXTEND << 1)); func m() {<caret>}\",\n                  \"EXTEND\");\n  }\n\n  public void testPreventSOE2() {\n    doTestInclude(\"package main; import \\\"fmt\\\"; var fmt = &fmt.<caret>\");\n  }\n\n  @SuppressWarnings(\"ConstantConditions\")\n  public void testPackageNames() {\n    myFixture.configureByText(\"test_test.go\", \"package myFromTest_test\");\n    myFixture.configureByText(\"test_file.go\", \"package myFromFile\");\n    myFixture.configureByText(\"test.go\", \"package m<caret>\");\n    myFixture.completeBasic();\n    assertSameElements(myFixture.getLookupElementStrings(), \"myFromTest\", \"myFromFile\", \"main\");\n  }\n\n  @SuppressWarnings(\"ConstantConditions\")\n  public void testPackageNamesInTestFile() {\n    myFixture.configureByText(\"foo.go\", \"package foo\");\n    myFixture.configureByText(\"foo_test.go\", \"package <caret>\");\n    myFixture.completeBasic();\n    assertSameElements(myFixture.getLookupElementStrings(), \"foo\", \"foo_test\", \"main\");\n  }\n\n  public void testPointerSpecType() {\n    myFixture.configureByText(\"foo.go\", \"package main; type a struct{};\" +\n                                        \"func main() {q1, q2:=&a{};q<caret>}\");\n    myFixture.completeBasic();\n    LookupElement first = ArrayUtil.getFirstElement(myFixture.getLookupElements());\n    assertNotNull(first);\n    LookupElementPresentation presentation = new LookupElementPresentation();\n    first.renderElement(presentation);\n    assertEquals(\"*main.a\", presentation.getTypeText());\n  }\n\n  public void testPackageNamesInEmptyDirectory() {\n    PsiFile file = myFixture.addFileToProject(\"my-directory-name/test.go\", \"package m<caret>\");\n    myFixture.configureFromExistingVirtualFile(file.getVirtualFile());\n    myFixture.completeBasic();\n    List<String> strings = myFixture.getLookupElementStrings();\n    assertNotNull(strings);\n    assertSameElements(strings, \"my_directory_name\", \"main\");\n  }\n  \n  public void testCompleteFromTestsDefinedInCurrentPackage() {\n    myFixture.addFileToProject(\"my_test.go\", \"package mytest; func MyFunction() {}\");\n    myFixture.configureByText(\"current_test.go\", \"package mytest; func TestSomething() { MyFunc<caret> }\");\n    myFixture.completeBasic();\n    myFixture.checkResult(\"package mytest; func TestSomething() { MyFunction() }\");\n  }\n\n  public void testFieldNamesInEmptyStructLiteral() {\n    String source = \"package test; \" +\n                    \"type A struct { field_in_a string }; \" +\n                    \"type B struct { A; field_in_b string }; \" +\n                    \"func Test() B { a := A{}; s := \\\"\\\"; return B{<caret>}; }\";\n    doTestInclude(source, \"a\", \"A\", \"field_in_b\");\n  }\n\n  public void testFieldNamesInStructLiteralWithNameValueInitializers() {\n    String source = \"package test; \" +\n                    \"type A struct { field_in_a string }; \" +\n                    \"type B struct { A; field_in_b string }; \" +\n                    \"func Test() B { a := A{}; s := \\\"\\\"; return B{ A: A{}, <caret>}; }\";\n    doTestEquals(source, \"field_in_b\");\n  }\n\n  public void testNoFieldNamesInStructLiteralWithValueInitializers() {\n    String source = \"package test; \" +\n                    \"type A struct { field_in_a string }; \" +\n                    \"type B struct { A; field_in_b string }; \" +\n                    \"func Test() B { a := A{}; s := \\\"\\\"; return B{ A{}, <caret>}; }\";\n    myFixture.configureByText(\"test.go\", source);\n    myFixture.completeBasic();\n    List<String> variants = myFixture.getLookupElementStrings();\n    assertNotNull(variants);\n    assertContainsElements(variants, \"s\");\n    assertDoesntContain(variants, \"field_in_b\");\n  }\n\n  public void testStructFieldValueCompletion() {\n    String source = \"package test; \" +\n                    \"type A struct { field1 string; field2 string }; \" +\n                    \"func Test() A { s := \\\"\\\"; return A{field1: \\\"\\\", field2: <caret>}; }\";\n    doTestInclude(source, \"s\");\n  }\n\n  public void testDoNotCompleteVariableTwice() {\n    doCheckResult(\"package t; func _() {\\n err := 1; for { err := 1; return er<caret> } }\", \n                  \"package t; func _() {\\n err := 1; for { err := 1; return err<caret> } }\"); \n  }\n\n  private void doTestEmptyCompletion() {\n    myFixture.testCompletionVariants(getTestName(true) + \".go\");\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/completion/GoCompletionTestBase.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.completion;\n\nimport com.goide.GoCodeInsightFixtureTestCase;\nimport com.intellij.codeInsight.completion.CompletionType;\nimport com.intellij.codeInsight.lookup.Lookup;\nimport com.intellij.codeInsight.lookup.LookupElement;\nimport com.intellij.testFramework.UsefulTestCase;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.Collection;\nimport java.util.List;\n\npublic abstract class GoCompletionTestBase extends GoCodeInsightFixtureTestCase {\n  @NotNull\n  @Override\n  protected String getBasePath() {\n    return \"completion\";\n  }\n\n  protected void doTestCompletion() {\n    myFixture.testCompletion(getTestName(true) + \".go\", getTestName(true) + \"_after.go\");\n  }\n\n  protected enum CheckType {EQUALS, INCLUDES, EXCLUDES, ORDERED_EQUALS}\n\n  private void doTestVariantsInner(@NotNull CompletionType type, int count, CheckType checkType, String... variants) {\n    myFixture.complete(type, count);\n    List<String> stringList = myFixture.getLookupElementStrings();\n\n    assertNotNull(\"\\nPossibly the single variant has been completed.\\nFile after:\\n\" + myFixture.getFile().getText(), stringList);\n    Collection<String> varList = ContainerUtil.newArrayList(variants);\n    if (checkType == CheckType.ORDERED_EQUALS) {\n      UsefulTestCase.assertOrderedEquals(stringList, variants);\n    }\n    else if (checkType == CheckType.EQUALS) {\n      UsefulTestCase.assertSameElements(stringList, variants);\n    }\n    else if (checkType == CheckType.INCLUDES) {\n      varList.removeAll(stringList);\n      assertTrue(\"Missing variants: \" + varList, varList.isEmpty());\n    }\n    else if (checkType == CheckType.EXCLUDES) {\n      varList.retainAll(stringList);\n      assertTrue(\"Unexpected variants: \" + varList, varList.isEmpty());\n    }\n  }\n\n  protected void doTestVariants(@NotNull String txt, @NotNull CompletionType type, int count, CheckType checkType, String... variants) {\n    myFixture.configureByText(getDefaultFileName(), txt);\n    failOnFileLoading();\n    doTestVariantsInner(type, count, checkType, variants);\n  }\n\n  protected void doTestInclude(@NotNull String txt, String... variants) {\n    doTestVariants(txt, CompletionType.BASIC, 1, CheckType.INCLUDES, variants);\n  }\n\n  protected void doTestExclude(@NotNull String txt, String... variants) {\n    doTestVariants(txt, CompletionType.BASIC, 1, CheckType.EXCLUDES, variants);\n  }\n\n  protected void doTestEquals(@NotNull String txt, String... variants) {\n    doTestVariants(txt, CompletionType.BASIC, 1, CheckType.EQUALS, variants);\n  }\n\n  protected void doCheckResult(@NotNull String before, @NotNull String after) {\n    doCheckResult(before, after, (Character)null);\n  }\n\n  protected void doCheckResult(@NotNull String before, @NotNull String after, @Nullable Character c) {\n    myFixture.configureByText(getDefaultFileName(), before);\n    failOnFileLoading();\n    myFixture.completeBasic();\n    if (c != null) myFixture.type(c);\n    myFixture.checkResult(after);\n  }\n  \n  protected void doCheckResult(@NotNull String before, @NotNull String after, @NotNull String selectItem) {\n    myFixture.configureByText(getDefaultFileName(), before);\n    failOnFileLoading();\n    myFixture.completeBasic();\n    selectLookupItem(selectItem);\n    myFixture.checkResult(after);\n  }\n\n  protected void selectLookupItem(@NotNull String selectItem) {\n    LookupElement[] lookupElements = myFixture.getLookupElements();\n    assertNotNull(\"Lookup is empty\", lookupElements);\n    LookupElement toSelect = null;\n    for (LookupElement lookupElement : lookupElements) {\n      if (selectItem.equals(lookupElement.getLookupString())) {\n        toSelect = lookupElement;\n        break;\n      }\n    }\n    assertNotNull(selectItem + \" not found in lookup\", toSelect);\n    myFixture.getLookup().setCurrentItem(toSelect);\n    myFixture.type(Lookup.NORMAL_SELECT_CHAR);\n  }\n\n  protected void failOnFileLoading() {\n    //((PsiManagerImpl)myFixture.getPsiManager()).setAssertOnFileLoadingFilter(VirtualFileFilter.ALL, getTestRootDisposable());\n  }\n  \n  protected String getDefaultFileName() {\n    return \"a.go\";\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/completion/GoExcludedPackagesTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.completion;\n\nimport com.goide.SdkAware;\nimport com.goide.project.GoExcludedPathsSettings;\nimport com.intellij.util.ArrayUtil;\nimport org.jetbrains.annotations.NotNull;\n\n@SdkAware\npublic class GoExcludedPackagesTest extends GoCompletionTestBase {\n  @Override\n  protected void tearDown() throws Exception {\n    GoExcludedPathsSettings.getInstance(getProject()).setExcludedPackages(ArrayUtil.EMPTY_STRING_ARRAY);\n    super.tearDown();\n  }\n\n  private void doTestExcluded(@NotNull String initial, @NotNull String after, String... excludedPaths) {\n    GoExcludedPathsSettings.getInstance(getProject()).setExcludedPackages(excludedPaths);\n    myFixture.configureByText(\"a.go\", initial);\n    myFixture.completeBasic();\n    myFixture.checkResult(after);\n  }\n\n  public void testExcludedPathCompletion() {\n    String initial = \"package a; func b() {\\n fmt.Printl<caret> \\n}\";\n    doTestExcluded(initial, initial, \"fmt\");\n  }\n\n  public void testExcludedPathSameBeginning() {\n    String initial = \"package a; func b() {\\n fmt.Printl<caret> \\n}\";\n    String after = \"package a;\\n\\nimport \\\"fmt\\\"\\n\\nfunc b() {\\n fmt.Println(<caret>) \\n}\";\n    doTestExcluded(initial, after, \"fm\");\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/completion/GoTestNameCompletionTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.completion;\n\nimport com.intellij.codeInsight.completion.CompletionType;\n\npublic class GoTestNameCompletionTest extends GoCompletionTestBase {\n  public void testShowFromSimilarFileFirst() {\n    myFixture.addFileToProject(\"foo.go\", \"package main; func FooPublic() {}\");\n    myFixture.addFileToProject(\"a.go\", \"package main; func BarPublic() {}\");\n    doTestVariants(\"package main; func <caret>\", CompletionType.BASIC, 1, CheckType.ORDERED_EQUALS, \"BenchmarkBarPublic\",\n                   \"ExampleBarPublic\", \"TestBarPublic\", \"BenchmarkFooPublic\", \"ExampleFooPublic\", \"TestFooPublic\");\n  }\n\n  public void testForFunctions() {\n    myFixture.addFileToProject(\"foo.go\", \"package main; func Public() {}; func private() {}; func _() {}\");\n    doTestEquals(\"package main; func <caret>\", \"BenchmarkPublic\", \"ExamplePublic\", \"TestPublic\");\n  }\n\n  public void testForMethods() {\n    myFixture.addFileToProject(\"foo.go\",\n                               \"package main; type Foo struct {}; func (Foo) Public() {}; func (Foo) private() {}; func (Foo) _() {}\");\n    doTestEquals(\"package main; func <caret>\", \"BenchmarkFoo_Public\", \"ExampleFoo_Public\", \"TestFoo_Public\");\n  }\n\n  public void testAlreadyImplementTests() {\n    myFixture.addFileToProject(\"foo.go\", \"package main; func Public() {}; func private() {}; func _() {}\");\n    myFixture.addFileToProject(\"foo_test.go\", \"package main; func TestPublic() {}; func ExampleFunc() {}\");\n    doTestEquals(\"package main; func <caret>\", \"BenchmarkPublic\", \"ExamplePublic\", \"TestPublic2\");\n  }\n\n  public void testWithoutSignature() {\n    myFixture.addFileToProject(\"foo.go\", \"package main; func Public() {}; func private() {}; func _() {}\");\n    doCheckResult(\"package main; func TestP<caret>\", \"package main;\\n\" +\n                                                     \"\\n\" +\n                                                     \"import \\\"testing\\\"\\n\" +\n                                                     \"\\n\" +\n                                                     \"func TestPublic(t *testing.T) {\\n\" +\n                                                     \"\\t<caret>\\n\" +\n                                                     \"}\");\n  }\n\n  public void testWithoutSignatureWithBlock() {\n    myFixture.addFileToProject(\"foo.go\", \"package main; func Public() {}; func private() {}; func _() {}\");\n    doCheckResult(\"package main; func TestP<caret>{}\", \"package main;\\n\" +\n                                                       \"\\n\" +\n                                                       \"import \\\"testing\\\"\\n\" +\n                                                       \"\\n\" +\n                                                       \"func TestPublic(t *testing.T) {\\n\" +\n                                                       \"\\t<caret>\\n\" +\n                                                       \"}\");\n  }\n\n  public void testWithInvalidSignatureWithoutParameters() {\n    myFixture.addFileToProject(\"foo.go\", \"package main; func Public() {}; func private() {}; func _() {}\");\n    doCheckResult(\"package main; func TestP<caret>(){}\", \"package main;\\n\" +\n                                                         \"\\n\" +\n                                                         \"import \\\"testing\\\"\\n\" +\n                                                         \"\\n\" +\n                                                         \"func TestPublic(t *testing.T) {\\n\" +\n                                                         \"\\t<caret>\\n\" +\n                                                         \"}\");\n  }\n\n  public void testWithInvalidSignature() {\n    myFixture.addFileToProject(\"foo.go\", \"package main; func Public() {}; func private() {}; func _() {}\");\n    doCheckResult(\"package main; func TestP<caret>(foo Bar){}\", \"package main;\\n\" +\n                                                                \"\\n\" +\n                                                                \"import \\\"testing\\\"\\n\" +\n                                                                \"\\n\" +\n                                                                \"func TestPublic(foo Bar) {\\n\" +\n                                                                \"\\t<caret>\\n\" +\n                                                                \"}\");\n  }\n\n  public void testWithoutBody() {\n    myFixture.addFileToProject(\"foo.go\", \"package main; func Public() {}; func private() {}; func _() {}\");\n    doCheckResult(\"package main; func TestP<caret>()\", \"package main;\\n\" +\n                                                       \"\\n\" +\n                                                       \"import \\\"testing\\\"\\n\" +\n                                                       \"\\n\" +\n                                                       \"func TestPublic(t *testing.T) {\\n\" +\n                                                       \"\\t<caret>\\n\" +\n                                                       \"}\");\n  }\n\n  public void testWithIncompleteBody() {\n    myFixture.addFileToProject(\"foo.go\", \"package main; func Public() {}; func private() {}; func _() {}\");\n    doCheckResult(\"package main; func TestP<caret>() {\", \"package main;\\n\" +\n                                                         \"\\n\" +\n                                                         \"import \\\"testing\\\"\\n\" +\n                                                         \"\\n\" +\n                                                         \"func TestPublic(t *testing.T) {\\n\" +\n                                                         \"\\t<caret>\\n\" +\n                                                         \"}\");\n  }\n\n  public void testWithEmptyBody() {\n    myFixture.addFileToProject(\"foo.go\", \"package main; func Public() {}; func private() {}; func _() {}\");\n    doCheckResult(\"package main; func TestP<caret>(){}\", \"package main;\\n\" +\n                                                         \"\\n\" +\n                                                         \"import \\\"testing\\\"\\n\" +\n                                                         \"\\n\" +\n                                                         \"func TestPublic(t *testing.T) {\\n\" +\n                                                         \"\\t<caret>\\n\" +\n                                                         \"}\");\n  }\n\n  public void testWithoutStatements() {\n    myFixture.addFileToProject(\"foo.go\", \"package main; func Public() {}; func private() {}; func _() {}\");\n    doCheckResult(\"package main; func TestP<caret>() {\\n}\", \"package main;\\n\" +\n                                                            \"\\n\" +\n                                                            \"import \\\"testing\\\"\\n\" +\n                                                            \"\\n\" +\n                                                            \"func TestPublic(t *testing.T) {\\n\" +\n                                                            \"\\t<caret>\\n\" +\n                                                            \"}\");\n  }\n\n  public void testWithStatements() {\n    myFixture.addFileToProject(\"foo.go\", \"package main; func Public() {}; func private() {}; func _() {}\");\n    doCheckResult(\"package main; func TestP<caret>() { println(); println(); }\",\n                  \"package main;\\n\" +\n                  \"\\n\" +\n                  \"import \\\"testing\\\"\\n\" +\n                  \"\\n\" +\n                  \"func TestPublic(t *testing.T) { <caret>println(); println(); }\");\n  }\n\n  public void testCrossTestPackage() {\n    myFixture.addFileToProject(\"foo.go\", \"package foo; func Public() {}; func private() {}; func _() {}\");\n    doCheckResult(\"package foo_test; func TestP<caret>() { }\", \"package foo_test;\\n\\n\" +\n                                                               \"import \\\"testing\\\"\\n\\n\" +\n                                                               \"func TestPublic(t *testing.T) {\\n\" +\n                                                               \"\\t\\n\" +\n                                                               \"}\");\n  }\n\n  public void testDoNotSuggestDuplicatedFunction() {\n    myFixture.addFileToProject(\"foo.go\", \"package foo\\n\\nfunc Public() {} func private() {}; func _() {}\");\n    doCheckResult(\"package foo; func TestPublic() {}\\n\\nfunc TestP<caret>() { }\", \"package foo;\\n\\n\" +\n                                                                                  \"import \\\"testing\\\"\\n\\n\" +\n                                                                                  \"func TestPublic() {}\\n\\n\" +\n                                                                                  \"func TestPublic2(t *testing.T) {\\n\" +\n                                                                                  \"\\t\\n\" +\n                                                                                  \"}\");\n  }\n\n  public void testDoNotSuggestDuplicatedFunctionForTestPackages() {\n    myFixture.addFileToProject(\"foo.go\", \"package foo\\n\\nfunc Public() {} func private() {}; func _() {}\");\n    doCheckResult(\"package foo_test; func TestPublic() {}\\n\\nfunc TestP<caret>() { }\", \"package foo_test;\\n\\n\" +\n                                                                                       \"import \\\"testing\\\"\\n\\n\" +\n                                                                                       \"func TestPublic() {}\\n\\n\" +\n                                                                                       \"func TestPublic2(t *testing.T) {\\n\" +\n                                                                                       \"\\t\\n\" +\n                                                                                       \"}\");\n  }\n\n  @Override\n  protected String getDefaultFileName() {\n    return \"a_test.go\";\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/coverage/GoCoverageCalculationTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.coverage;\n\nimport com.goide.GoCodeInsightFixtureTestCase;\nimport com.goide.runconfig.testing.coverage.GoCoverageAnnotator;\nimport com.goide.runconfig.testing.coverage.GoCoverageProjectData;\nimport com.goide.runconfig.testing.coverage.GoCoverageRunner;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.io.BufferedReader;\nimport java.io.File;\nimport java.io.FileReader;\nimport java.io.IOException;\n\npublic class GoCoverageCalculationTest extends GoCodeInsightFixtureTestCase {\n  public void testCoverage() throws IOException {\n    assertEquals(\"75% statements\", annotate().getFileCoverageInformationString(myFixture.findFileInTempDir(file())));\n  }\n\n  public void testCoverage2() throws IOException {\n    assertEquals(\"83.3% statements\", annotate().getFileCoverageInformationString(myFixture.findFileInTempDir(file())));\n  }\n\n  public void testWithoutHits() throws IOException {\n    assertEquals(\"0% statements\", annotate().getFileCoverageInformationString(myFixture.findFileInTempDir(file())));\n  }\n\n  public void testWithoutAnything() throws IOException {\n    assertNull(annotate().getFileCoverageInformationString(myFixture.findFileInTempDir(file())));\n  }\n\n  public void testDirectory() throws IOException {\n    GoCoverageAnnotator annotator = annotate(\"coverage.go\", \"coverage2.go\", \"withoutHits.go\");\n    VirtualFile firstFile = myFixture.findFileInTempDir(\"coverage.go\");\n    VirtualFile secondFile = myFixture.findFileInTempDir(\"coverage2.go\");\n    VirtualFile thirdFile = myFixture.findFileInTempDir(\"withoutHits.go\");\n\n    assertEquals(\"75% statements\", annotator.getFileCoverageInformationString(firstFile));\n    assertEquals(\"83.3% statements\", annotator.getFileCoverageInformationString(secondFile));\n    assertEquals(\"0% statements\", annotator.getFileCoverageInformationString(thirdFile));\n    assertEquals(\"66.7% files, 72.7% statements\", annotator.getDirCoverageInformationString(firstFile.getParent()));\n  }\n\n  public void testMerging() throws IOException {\n    VirtualFile file = myFixture.getTempDirFixture().createFile(file());\n    GoCoverageProjectData firstData = parseData(\"coverage.out\");\n    GoCoverageProjectData secondData = parseData(\"coverage_for_merge.out\");\n\n    GoCoverageAnnotator firstAnnotator = annotate(firstData);\n    GoCoverageAnnotator secondAnnotator = annotate(secondData);\n    \n    firstData.merge(secondData);\n    GoCoverageAnnotator mergeAnnotator = annotate(firstData);\n    \n    assertEquals(\"75% statements\", firstAnnotator.getFileCoverageInformationString(file));\n    assertEquals(\"33.3% statements\", secondAnnotator.getFileCoverageInformationString(file));\n    assertEquals(\"80% statements\", mergeAnnotator.getFileCoverageInformationString(file));\n  }\n\n  private GoCoverageAnnotator annotate() throws IOException {\n    return annotate(file());\n  }\n\n  @NotNull\n  private GoCoverageAnnotator annotate(@NotNull String fileName, @NotNull String... fileNames) throws IOException {\n    myFixture.getTempDirFixture().createFile(fileName);\n    for (String name : fileNames) {\n      myFixture.getTempDirFixture().createFile(name);\n    }\n    return annotate(parseData(\"coverage.out\"));\n  }\n\n  @NotNull\n  private GoCoverageAnnotator annotate(@NotNull GoCoverageProjectData data) {\n    GoCoverageAnnotator annotator = new GoCoverageAnnotator(myFixture.getProject());\n    annotator.annotateAllFiles(data, getRoot());\n    return annotator;\n  }\n\n  @NotNull\n  private GoCoverageProjectData parseData(@NotNull String coverageSource) throws IOException {\n    try (BufferedReader reader = new BufferedReader(new FileReader(new File(getTestDataPath(), coverageSource)))) {\n      GoCoverageProjectData data = GoCoverageRunner.parseCoverage(reader, myFixture.getProject(), myModule);\n      assertNotNull(data);\n      return data;\n    }\n  }\n\n  @NotNull\n  private String file() {\n    return getTestName(true) + \".go\";\n  }\n\n  @Override\n  @NotNull\n  protected String getBasePath() {\n    return \"coverage\";\n  }\n\n  @NotNull\n  private VirtualFile getRoot() {\n    VirtualFile root = myFixture.getTempDirFixture().getFile(\"\");\n    assertNotNull(root);\n    return root;\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/editor/GoBraceMatcherTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.editor;\n\nimport com.goide.GoCodeInsightFixtureTestCase;\nimport com.goide.GoFileType;\n\npublic class GoBraceMatcherTest extends GoCodeInsightFixtureTestCase {\n  public void testCloseParenBeforeOpeningBrace() {\n    myFixture.configureByText(GoFileType.INSTANCE, \"package foo; func name<caret>{}\");\n    myFixture.type('(');\n    myFixture.checkResult(\"package foo; func name(<caret>){}\");\n  }\n}"
  },
  {
    "path": "tests/com/goide/editor/GoExitPointsHighlightingTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.editor;\n\nimport com.goide.GoCodeInsightFixtureTestCase;\nimport com.goide.SdkAware;\nimport com.intellij.codeInsight.highlighting.HighlightUsagesHandler;\nimport com.intellij.codeInsight.highlighting.HighlightUsagesHandlerBase;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.List;\n\n@SdkAware\npublic class GoExitPointsHighlightingTest extends GoCodeInsightFixtureTestCase {\n  public void testBasicExitPoints() {\n    String text = \"package main;\\n\" +\n                  \"func bar(x int) int {\\n\" +\n                  \"  if (x < 10) {\\n\" +\n                  \"    retur<caret>n -1\" +\n                  \"  }\" +\n                  \"  return x\\n\" +\n                  \"}\";\n    doTest(text, \"func\", \"return -1\", \"return x\");\n  }\n\n  public void testCaretOnFuncWithReturnAndPanic() {\n    String text = \"package main;\\n\" +\n                  \"fun<caret>c bar(x int) int {\\n\" +\n                  \"  if (9 < 10) {\\n\" +\n                  \"    return -1\" +\n                  \"  }\" +\n                  \"  panic(x)\\n\" +\n                  \"}\";\n    doTest(text, \"func\", \"return -1\", \"panic(x)\");\n  }\n\n  public void testCaretOnFuncWithNoExitPoints() {\n    String text = \"package main\\n\" +\n                  \"import \\\"fmt\\\"\\n\" +\n                  \"f<caret>unc main() {\\n\" +\n                  \"  fmt.Println(\\\"Hello, world!\\\"\\n\" +\n                  \"}\";\n    doTest(text, \"func\");\n  }\n\n  public void testCaretOnFuncOnType() {\n    String text = \"package main\\n\" +\n                  \"\\n\" +\n                  \"type Demo struct {}\\n\" +\n                  \"\\n\" +\n                  \"f<caret>unc (a Demo) demo() int {\\n\" +\n                  \"    return -1\\n\" +\n                  \"}\";\n    doTest(text, \"func\", \"return -1\");\n  }\n\n  public void testBreakSwitch() {\n    String text = \"package main\\n\" +\n                  \"import \\\"fmt\\\"\\n\" +\n                  \"\\n\" +\n                  \"type Demo struct {}\\n\" +\n                  \"\\n\" +\n                  \"\\n\" +\n                  \"func (a Demo) demo() int {\\n\" +\n                  \"    i := 2\\n\" +\n                  \"    n := 10\\n\" +\n                  \"    var j int\\n\" +\n                  \"    var m int = 10\\n\" +\n                  \"    var a [][]int\\n\" +\n                  \"    var item = 10\\n\" +\n                  \"    for i = 0; i < n; i++ {\\n\" +\n                  \"        for j = 0; j < m; j++ {\\n\" +\n                  \"            switch a[i][j] {\\n\" +\n                  \"            case nil:\\n\" +\n                  \"                fmt.Println()\\n\" +\n                  \"                break\\n\" +\n                  \"            case item:\\n\" +\n                  \"                fmt.Println()\\n\" +\n                  \"                br<caret>eak\\n\" +\n                  \"            }\\n\" +\n                  \"        }\\n\" +\n                  \"    }\\n\" +\n                  \"    return -1\\n\" +\n                  \"}\";\n    doTest(text, \"break\", \"break\", \"switch\");\n  }\n\n  public void testBreakFor() {\n    String text = \"package main\\n\" +\n                  \"import \\\"fmt\\\"\\n\" +\n                  \"\\n\" +\n                  \"type Demo struct {}\\n\" +\n                  \"\\n\" +\n                  \"\\n\" +\n                  \"func (a Demo) demo() int {\\n\" +\n                  \"    i := 2\\n\" +\n                  \"    n := 10\\n\" +\n                  \"    var j int\\n\" +\n                  \"    var m int = 10\\n\" +\n                  \"    for i = 0; i < n; i++ {\\n\" +\n                  \"        fo<caret>r j = 0; j < m; j++ {\\n\" +\n                  \"            if j < 10 {\\n\" +\n                  \"                break\\n\" +\n                  \"            }\\n\" +\n                  \"        }\\n\" +\n                  \"    }\\n\" +\n                  \"    return -1\\n\" +\n                  \"}\";\n    doTest(text, \"for\", \"break\");\n  }\n\n  public void testBreakSelect() {\n    String text = \"package main\\n\" +\n                  \"\\n\" +\n                  \"import \\\"fmt\\\"\\n\" +\n                  \"\\n\" +\n                  \"func main() {\\n\" +\n                  \"    fmt.Println(\\\"FOO\\\")\\n\" +\n                  \"    c1 := make(chan string)\\n\" +\n                  \"    c2 := make(chan string)\\n\" +\n                  \"    for i := 0; i < 2; i++ {\\n\" +\n                  \"        sele<caret>ct {\\n\" +\n                  \"        case msg1 := <-c1:\\n\" +\n                  \"            fmt.Println(\\\"received\\\", msg1)\\n\" +\n                  \"            break\\n\" +\n                  \"        case msg2 := <-c2:\\n\" +\n                  \"            fmt.Println(\\\"received\\\", msg2)\\n\" +\n                  \"        }\\n\" +\n                  \"    }\\n\" +\n                  \"}\\n\";\n    doTest(text, \"select\", \"break\");\n  }\n\n  public void testBreakWithLabel() {\n    String text = \"package main\\n\" +\n                  \"\\n\" +\n                  \"func main() {\\n\" +\n                  \"\\n\" +\n                  \"    L:\\n\" +\n                  \"    for i := 0; i < 2; i++ {\\n\" +\n                  \"        switch i {\\n\" +\n                  \"        case 2:\\n\" +\n                  \"            break\\n\" +\n                  \"        case 1:\\n\" +\n                  \"            b<caret>reak L\\n\" +\n                  \"        default:\\n\" +\n                  \"            break L\\n\" +\n                  \"        }\\n\" +\n                  \"    }\\n\" +\n                  \"}\\n\";\n    doTest(text, \"L\", \"break L\", \"break L\");\n  }\n\n  private void doTest(@NotNull String text, String... usages) {\n    myFixture.configureByText(\"foo.go\", text);\n    @SuppressWarnings(\"unchecked\")\n    HighlightUsagesHandlerBase<PsiElement> handler = HighlightUsagesHandler.createCustomHandler(myFixture.getEditor(), myFixture.getFile());\n    assertNotNull(handler);\n    List<PsiElement> targets = handler.getTargets();\n    assertEquals(1, targets.size());\n    handler.computeUsages(targets);\n    List<String> textUsages = ContainerUtil.map(handler.getReadUsages(), range -> range.substring(myFixture.getFile().getText()));\n    assertSameElements(textUsages, usages);\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/editor/GoFoldingBuilderTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.editor;\n\nimport com.goide.GoCodeInsightFixtureTestCase;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoFoldingBuilderTest extends GoCodeInsightFixtureTestCase {\n  @NotNull\n  @Override\n  protected String getBasePath() {\n    return \"folding\";\n  }\n\n  private void doTest() { myFixture.testFolding(getTestDataPath() + \"/\" + getTestName(true) + \".go\"); }\n\n  public void testSimple()                                        { doTest(); }\n  public void testImportList()                                    { doTest(); }\n  public void testImportListWithJustSingleImportKeyword()         { doTest(); }\n  public void testImportListWithoutSpaceBetweenKeywordAndString() { doTest(); }\n  public void testImportListWithoutSpaceBetweenKeywordAndParen()  { doTest(); }\n  public void testEmptyImportList()                               { doTest(); }\n  public void testImportListWithNewLineAfterKeyword()             { doTest(); }\n  public void testImportListWithOnlyThreeSymbolsToFold()          { doTest(); }\n  public void testVarDeclaration()                                { doTest(); }\n  public void testConstDeclaration()                              { doTest(); }\n  public void testTypeDeclaration()                               { doTest(); }\n  public void testCompositeLiteral()                              { doTest(); }\n  public void testIfStatement()                                   { doTest(); }\n  public void testForStatement()                                  { doTest(); }\n  public void testSwitchSelectCaseStatement()                     { doTest(); }\n  public void testTypeSwitchStatement()                           { doTest(); }\n}\n"
  },
  {
    "path": "tests/com/goide/editor/GoHighlightingAnnotatorTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.editor;\n\nimport com.goide.GoCodeInsightFixtureTestCase;\nimport com.goide.SdkAware;\nimport com.intellij.testFramework.TestDataPath;\nimport org.jetbrains.annotations.NotNull;\n\n@SdkAware\n@TestDataPath(\"$PROJECT_ROOT/testData/colorHighlighting\")\npublic class GoHighlightingAnnotatorTest extends GoCodeInsightFixtureTestCase {\n\n  public void testSimple() {\n    doTest();\n  }\n\n  public void testLabel() {\n    doTest();\n  }\n\n  public void testReceiver() {\n    doTest();\n  }\n\n  public void testFuncAndMethod() {\n    doTest();\n  }\n\n  public void testOctAndHex() {\n    doTest();\n  }\n\n  public void testTypes() {\n    doTest();\n  }\n\n  public void testStructFields() {\n    doTest();\n  }\n\n  public void testBuiltinFunctions() {\n    doTest();\n  }\n\n  private void doTest() {\n    myFixture.testHighlighting(false, true, false, getTestName(true) + \".go\");\n  }\n\n  @NotNull\n  @Override\n  protected String getBasePath() {\n    return \"colorHighlighting\";\n  }\n}\n\n"
  },
  {
    "path": "tests/com/goide/editor/GoLiveTemplateTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.editor;\n\nimport com.goide.GoCodeInsightFixtureTestCase;\n\npublic class GoLiveTemplateTest extends GoCodeInsightFixtureTestCase {\n  public void testErrOnStatementBeginning() {\n    myFixture.configureByText(\"a.go\", \"package main; func main() { <caret> }\");\n    myFixture.type(\"err\\t\");\n    myFixture.checkResult(\"package main; func main() {\\n\" +\n                          \"\\tif err != nil {\\n\" +\n                          \"\\t\\t<caret>\\n\" +\n                          \"\\t} }\");\n  }\n\n  public void testErrAfterIf() {\n    myFixture.configureByText(\"a.go\", \"package main; func main() { if <caret> }\");\n    myFixture.type(\"err\\t\");\n    myFixture.checkResult(\"package main; func main() { if err\\t<caret> }\");\n  }\n\n  public void testJsonInTag() {\n    myFixture.configureByText(\"a.go\", \"package main; type foo struct { MyFieldDeclaration int <caret> }\");\n    myFixture.type(\"json\\t\");\n    myFixture.checkResult(\"package main; type foo struct { MyFieldDeclaration int `json:\\\"my_field_declaration\\\"` }\");\n  }\n\n  public void testJsonInTagAfterComplexType() {\n    myFixture.configureByText(\"a.go\", \"package main; type foo struct { a []int <caret> }\");\n    myFixture.type(\"json\\t\");\n    myFixture.checkResult(\"package main; type foo struct { a []int `json:\\\"a\\\"` }\");\n  }\n\n  public void testXmlInTagOfAnonymousField() {\n    myFixture.configureByText(\"a.go\", \"package main; type foo struct { int <caret> }\");\n    myFixture.type(\"xml\\t\");\n    myFixture.checkResult(\"package main; type foo struct { int `xml:\\\"<caret>\\\"` }\");\n  }\n\n  public void testXmlInTagLiteral() {\n    myFixture.configureByText(\"a.go\", \"package main; type foo struct { a int `<caret>` }\");\n    myFixture.type(\"xml\\t\");\n    myFixture.checkResult(\"package main; type foo struct { a int `xml:\\\"a\\\"` }\");\n  }\n\n  public void testJsonNotInTag() {\n    myFixture.configureByText(\"a.go\", \"package main; func main() { <caret> }\");\n    myFixture.type(\"json\\t\");\n    myFixture.checkResult(\"package main; func main() { json\\t<caret> }\");\n  }\n\n  public void testJsonNotInTag_2() {\n    myFixture.configureByText(\"a.go\", \"package main; type foo struct { int \\n<caret> }\");\n    myFixture.type(\"json\\t\");\n    myFixture.checkResult(\"package main; type foo struct { int \\njson\\t<caret> }\");\n  }\n\n  public void testForInSignature() {\n    myFixture.configureByText(\"a.go\", \"package main; func <caret>\");\n    myFixture.type(\"for\\t\");\n    myFixture.checkResult(\"package main; func for\\t<caret>\");\n  }\n\n  public void testForInBlock() {\n    myFixture.configureByText(\"a.go\", \"package main; func main() { <caret> }\");\n    myFixture.type(\"for\\t\");\n    myFixture.checkResult(\"package main; func main() {\\n\" +\n                          \"\\tfor ; ;  {\\n\" +\n                          \"\\t\\t\\n\" +\n                          \"\\t} }\");\n  }\n\n  public void testVarDeclarationInBlock() {\n    myFixture.configureByText(\"a.go\", \"package main; func main() { <caret> }\");\n    myFixture.type(\":\\t\");\n    myFixture.checkResult(\"package main; func main() {\\n\\tname :=  }\");\n  }\n\n  public void testVarDeclarationInLabel() {\n    myFixture.configureByText(\"a.go\", \"package main; func main() { name <caret> }\");\n    myFixture.type(\":\\t\");\n    myFixture.checkResult(\"package main; func main() { name :\\t<caret> }\");\n  }\n\n  public void testMainAfterPackageClause() {\n    myFixture.configureByText(\"a.go\", \"package mai<caret>\");\n    myFixture.type(\"n\\t\");\n    myFixture.checkResult(\"package main\\t<caret>\");\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/editor/GoParameterInfoHandlerTest.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.editor;\n\nimport com.goide.GoCodeInsightFixtureTestCase;\nimport com.goide.psi.GoArgumentList;\nimport com.intellij.codeInsight.hint.ParameterInfoComponent;\nimport com.intellij.lang.parameterInfo.CreateParameterInfoContext;\nimport com.intellij.lang.parameterInfo.ParameterInfoUIContextEx;\nimport com.intellij.testFramework.utils.parameterInfo.MockCreateParameterInfoContext;\nimport com.intellij.testFramework.utils.parameterInfo.MockUpdateParameterInfoContext;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoParameterInfoHandlerTest extends GoCodeInsightFixtureTestCase {\n  private GoParameterInfoHandler myParameterInfoHandler;\n\n  @Override\n  protected void setUp() throws Exception {\n    super.setUp();\n    myParameterInfoHandler = new GoParameterInfoHandler();\n  }\n\n  // @formatter:off\n  public void testUnnamedParameters()         { doTest(\"<html><b>string</b>, interface{}</html>\"); }\n  public void testUnnamedAndNamedParameters() { doTest(\"<html><b>a string</b>, interface{}</html>\"); }\n  public void testFuncParamNone()             { doTest(\"<html>&lt;no parameters&gt;</html>\"); }\n  public void testChainedCall()               { doTest(\"<html><b>param1 string</b>, param2 int</html>\"); }\n  public void testMethParamNone()             { doTest(\"<html>&lt;no parameters&gt;</html>\"); }\n  public void testFieldMethCall()             { doTest(\"<html><b>a int</b>, b int</html>\"); }\n  public void testFuncTypes()                 { doTest(\"<html><b>string</b></html>\"); }\n  public void testFunctionTypeByRef()         { doTest(\"<html><b>intParam int</b></html>\"); }\n  public void testFuncParam()                 { doTest(1, \"<html>num int, <b>text string</b></html>\"); }\n  public void testFuncParamMulti()            { doTest(4, \"<html>a int, b int, c int, d string, <b>e string</b>, f string</html>\"); }\n  public void testFuncParamEllipsis()         { doTest(5, \"<html>num int, text string, <b>more ...int</b></html>\"); }\n  public void testFuncEmbedInner()            { doTest(1, \"<html>num int, <b>text string</b></html>\"); }\n  public void testFuncEmbedOuter()            { doTest(2, \"<html>a int, b int, <b>c int</b>, d int</html>\"); }\n  public void testMethParam()                 { doTest(1, \"<html>num int, <b>text string</b></html>\"); }\n  public void testMethParamEllipsis()         { doTest(5, \"<html>num int, text string, <b>more ...int</b></html>\"); }\n  public void testClosure()                   { doTest(1, \"<html>param1 string, <b>param2 string</b></html>\"); }\n\n  private void doTest(@NotNull String expectedPresentation) { doTest(0, expectedPresentation); }\n  // @formatter:on\n\n  private void doTest(int expectedParamIdx, @NotNull String expectedPresentation) {\n    // Given\n    myFixture.configureByFile(getTestName(true) + \".go\");\n    // When\n    Object[] itemsToShow = getItemsToShow();\n    int paramIdx = getHighlightedItem();\n    String presentation = getPresentation(itemsToShow, paramIdx);\n    // Then\n    assertEquals(1, itemsToShow.length);\n    assertEquals(expectedParamIdx, paramIdx);\n    assertEquals(expectedPresentation, presentation);\n  }\n\n  private Object[] getItemsToShow() {\n    CreateParameterInfoContext createCtx = new MockCreateParameterInfoContext(myFixture.getEditor(), myFixture.getFile());\n    GoArgumentList psiElement = myParameterInfoHandler.findElementForParameterInfo(createCtx);\n    assertNotNull(psiElement);\n    myParameterInfoHandler.showParameterInfo(psiElement, createCtx);\n    return createCtx.getItemsToShow();\n  }\n\n  private int getHighlightedItem() {\n    MockUpdateParameterInfoContext updateCtx = new MockUpdateParameterInfoContext(myFixture.getEditor(), myFixture.getFile());\n    GoArgumentList psiElement = myParameterInfoHandler.findElementForUpdatingParameterInfo(updateCtx);\n    assertNotNull(psiElement);\n    myParameterInfoHandler.updateParameterInfo(psiElement, updateCtx);\n    return updateCtx.getCurrentParameter();\n  }\n\n  private String getPresentation(Object[] itemsToShow, int paramIdx) {\n    ParameterInfoUIContextEx uiCtx =\n      ParameterInfoComponent.createContext(itemsToShow, myFixture.getEditor(), myParameterInfoHandler, paramIdx);\n    return GoParameterInfoHandler.updatePresentation(itemsToShow[0], uiCtx);\n  }\n\n  @NotNull\n  @Override\n  protected String getBasePath() {\n    return \"parameterInfo\";\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/editor/GoQuoteHandlerTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.editor;\n\nimport com.goide.GoCodeInsightFixtureTestCase;\n\npublic class GoQuoteHandlerTest extends GoCodeInsightFixtureTestCase {\n  public void testNewlineInStringLiteral() {\n    myFixture.configureByText(\"t.go\", \"package t; const c = \\\"const<caret>value\\\"\");\n    myFixture.type('\\n');\n    myFixture.checkResult(\"package t; const c = \\\"const\\\" +\\n\\t\\\"<caret>value\\\"\");\n  }\n\n  public void testRemoveSingleQuote() {\n    myFixture.configureByText(\"t.go\", \"package main; const _ = '\\\\n''<caret>'\");\n    myFixture.type('\\b');\n    myFixture.checkResult(\"package main; const _ = '\\\\n'<caret>\");\n  }\n\n  public void testAddSingleQuote() {\n    myFixture.configureByText(\"t.go\", \"package main; const _ = '\\\\n'<caret>\");\n    myFixture.type('\\'');\n    myFixture.checkResult(\"package main; const _ = '\\\\n''<caret>'\");\n  }\n\n  public void testTypeSingleQuote() { doTypeQuoteTest('\\''); }\n  public void testTypeDoubleQuote() { doTypeQuoteTest('\\\"'); }\n  public void testTypeBacktick()    { doTypeQuoteTest('`'); }\n\n  private void doTypeQuoteTest(char q) {\n    myFixture.configureByText(\"t.go\", \"package t; const c = <caret>\");\n    myFixture.type(q);\n    myFixture.checkResult(\"package t; const c = \" + q + \"<caret>\" + q);\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/editor/GoSelectWordTest.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.editor;\n\nimport com.goide.GoCodeInsightFixtureTestCase;\nimport com.intellij.testFramework.fixtures.CodeInsightTestUtil;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoSelectWordTest extends GoCodeInsightFixtureTestCase {\n  public void testImportString()            { doTest(); }\n  public void testMultipleImportString()    { doTest(); }\n  public void testStringLiteral()           { doTest(); }\n  public void testBlock()                   { doTest(); }\n  public void testArguments()               { doTest(); }\n  public void testParameters()              { doTest(); }\n  public void testResultParameters()        { doTest(); }\n  public void testFunctionName()            { doTest(); }\n\n  private void doTest() {\n    CodeInsightTestUtil.doWordSelectionTestOnDirectory(myFixture, getTestName(true), \"go\");\n  }\n\n  @NotNull\n  @Override\n  protected String getBasePath() {\n    return \"selectWord\";\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/editor/GoSmartEnterTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.editor;\n\nimport com.goide.GoCodeInsightFixtureTestCase;\nimport com.intellij.openapi.actionSystem.IdeActions;\n\npublic class GoSmartEnterTest extends GoCodeInsightFixtureTestCase {\n  public void testGoStatement()                          { doTest(); }\n  public void testDeferStatement()                       { doTest(); }\n  public void testGoStatementOnNonFunctionType()         { doTest(); }\n  public void testDeferStatementOnNonFunctionType()      { doTest(); }\n  public void testFunction()                             { doTest(); }\n  public void testFunctionLiteral()                      { doTest(); }\n  public void testFunctionWithBlock()                    { doTest(); }\n  public void testFunctionLiteralWithBlock()             { doTest(); }\n  public void testIf()                                   { doTest(); }\n  public void testIfWithBlock()                          { doTest(); }\n  public void testFor()                                  { doTest(); }\n  public void testForWithBlock()                         { doTest(); }\n\n  private void doTest() {\n    myFixture.configureByFile(getTestName(true) + \".go\");\n    myFixture.performEditorAction(IdeActions.ACTION_EDITOR_COMPLETE_STATEMENT);\n    myFixture.checkResultByFile(getTestName(true) + \"-after.go\");\n  }\n\n  @Override\n  protected String getBasePath() {\n    return \"smartEnter\";\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/editor/GoStatementMoverTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.editor;\n\nimport com.goide.GoCodeInsightFixtureTestCase;\nimport com.intellij.openapi.actionSystem.IdeActions;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoStatementMoverTest extends GoCodeInsightFixtureTestCase {\n  public void testSimpleStatement() {\n    doTest(false);\n    doTest(true);\n  }\n\n  public void testStatementInEndOfBlock() {\n    doTest(true);\n    doTest(false);\n  }\n\n  public void testInsertedStatement() {\n    doTest(false);\n  }\n\n  public void testInsertedStatementDown() {\n    doTest(true);\n  }\n\n  public void testFunctionDeclaration() {\n    doTest(true);\n    doTest(false);\n  }\n\n  public void testFunctionDeclarationWithFewTopLevelDeclarations() {\n    doTest(false);\n  }\n\n  public void testFunctionDeclarationWithFewTopLevelDeclarationsDown() {\n    doTest(true);\n  }\n\n  public void testImport() {\n    doTest(false);\n  }\n\n  public void testImportWithCaretAtLastImport() {\n    doTest(false);\n  }\n\n  public void testImportWithCaretAtImportString() {\n    doTest(false);\n    doTest(true);\n  }\n\n  public void testImportDown() {\n    doTest(true);\n  }\n\n  public void testPackage() {\n    doTest(true);\n  }\n\n  public void testTwoFunc() {\n    doTest(true);\n    doTest(false);\n  }\n\n  public void testTwoStatements() {\n    doTest(false);\n  }\n\n  public void testTwoStatementsDown() {\n    doTest(true);\n  }\n\n  public void testVarSpecTopLevelDeclaration() {\n    doTest(true);\n  }\n\n  public void testAnonymousFunction() {\n    doTest(false);\n    doTest(true);\n  }\n\n  public void testAnonymousFunctionAtAssignment() {\n    doTest(false);\n    doTest(true);\n  }\n\n  private void doTest(boolean down) {\n    String testName = getTestName(true);\n    myFixture.configureByFile(testName + \".go\");\n    if (down) {\n      myFixture.performEditorAction(IdeActions.ACTION_MOVE_STATEMENT_DOWN_ACTION);\n      myFixture.checkResultByFile(testName + \"-afterDown.go\", true);\n    }\n    else {\n      myFixture.performEditorAction(IdeActions.ACTION_MOVE_STATEMENT_UP_ACTION);\n      myFixture.checkResultByFile(testName + \"-afterUp.go\", true);\n    }\n  }\n\n  @NotNull\n  @Override\n  protected String getBasePath() {\n    return \"editor/statement-mover\";\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/editor/surround/GoSurrounderTestBase.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.editor.surround;\n\nimport com.goide.GoCodeInsightFixtureTestCase;\nimport com.goide.SdkAware;\nimport com.intellij.codeInsight.generation.surroundWith.SurroundWithHandler;\nimport com.intellij.openapi.actionSystem.AnAction;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.psi.PsiFile;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.List;\n\n@SdkAware\npublic abstract class GoSurrounderTestBase extends GoCodeInsightFixtureTestCase {\n\n  protected void doTest(@NotNull String codeBefore,\n                        @NotNull String expectedCodeAfter,\n                        @NotNull String surrounderDescription,\n                        boolean apply) {\n    PsiFile file = myFixture.configureByText(\"a.go\", normalizeCode(codeBefore));\n    List<AnAction> applicable = SurroundWithHandler.buildSurroundActions(myFixture.getProject(), myFixture.getEditor(), file, null);\n    if (applicable == null) {\n      assertFalse(apply);\n      return;\n    }\n    String suffix = \". \" + surrounderDescription;\n    for (AnAction action : applicable) {\n      String actionPresentation = action.getTemplatePresentation().getText();\n      if (actionPresentation != null && StringUtil.endsWith(actionPresentation, suffix)) {\n        assertTrue(apply);\n        myFixture.testAction(action);\n        return;\n      }\n    }\n    if (apply) {\n      myFixture.checkResult(normalizeCode(expectedCodeAfter), true);\n    }\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/editor/surround/GoWithBlockSurrounderTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.editor.surround;\n\npublic class GoWithBlockSurrounderTest extends GoSurrounderTestBase {\n  private static final String SURROUNDER_DESCRIPTION = new GoWithBlockSurrounder().getTemplateDescription();\n\n  public void testWithOneStatement() {\n    doTest(\"<selection>var b bool</selection>\", \"{\\n\\tvar b bool\\n}<caret>\\n\", SURROUNDER_DESCRIPTION, true);\n  }\n\n  public void testWithThreeStatements() {\n    doTest(\"<selection>var b int = 1\\nb = true\\ntype Type int</selection>\", \"{\\n\\tvar b int = 1\\n\\tb = true\\n\\ttype Type int\\n}<caret>\\n\",\n           SURROUNDER_DESCRIPTION, true);\n  }\n\n  public void testNoBlock() {\n    doTest(\"var b, c bool = true, <selection>false</selection>\", \"var b, c bool = true, false\", SURROUNDER_DESCRIPTION, false);\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/editor/surround/GoWithForSurrounderTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.editor.surround;\n\npublic class GoWithForSurrounderTest extends GoSurrounderTestBase {\n  private static final String SURROUNDER_DESCRIPTION = new GoWithForSurrounder().getTemplateDescription();\n\n  public void testWithOneStatement() {\n    doTest(\"<selection>var b bool</selection>\", \"for <caret>{\\n\\tvar b bool\\n}\\n\", SURROUNDER_DESCRIPTION, true);\n  }\n\n  public void testWithThreeStatements() {\n    doTest(\"<selection>var b int = 1\\nb = true\\ntype Type int</selection>\", \"for <caret>{\\n\\tvar b int = 1\\n\\tb = true\\n\\ttype Type int\\n}\\n\",\n           SURROUNDER_DESCRIPTION, true);\n  }\n\n  public void testNoFor() {\n    doTest(\"var b, c bool = true, <selection>false</selection>\", \"var b, c bool = true, false\", SURROUNDER_DESCRIPTION, false);\n  }\n\n  public void testWithCaretAtMultilineStatement() {\n    doTest(\"fo<caret>r {\\n\\n}\", \"for <caret>{\\n\\tfor {\\n\\n\\t}\\n}\\n\", SURROUNDER_DESCRIPTION, true);\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/editor/surround/GoWithIfElseExpressionSurrounderTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.editor.surround;\n\npublic class GoWithIfElseExpressionSurrounderTest extends GoSurrounderTestBase {\n  private static final String SURROUNDER_DESCRIPTION = new GoWithIfElseExpressionSurrounder().getTemplateDescription();\n\n  public void testWithOneBoolVariable() {\n    doTest(\"var b bool\\n<selection>b</selection>\", \"var b bool\\nif b {\\n\\n} else {\\n\\n}\", SURROUNDER_DESCRIPTION, true);\n  }\n\n  public void testWithNotBoolExpressions() {\n    doTest(\"var b int = 1\\n<selection>b</selection>\", \"var b int = 1\\nb\", SURROUNDER_DESCRIPTION, false);\n  }\n\n  public void testWithTwoBoolExpressions() {\n    doTest(\"var b, c bool = true, false\\n<selection>b c</selection>\", \"var b, c bool = true, false\\nif b {\\n\\n} else {\\n\\n}\\nc\",\n           SURROUNDER_DESCRIPTION, true);\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/editor/surround/GoWithIfElseSurrounderTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.editor.surround;\n\npublic class GoWithIfElseSurrounderTest extends GoSurrounderTestBase {\n  private static final String SURROUNDER_DESCRIPTION = new GoWithIfElseSurrounder().getTemplateDescription();\n\n  public void testWithOneStatement() {\n    doTest(\"<selection>var b bool</selection>\", \"if <caret>{\\n\\tvar b bool\\n} else {\\n\\n}\\n\", SURROUNDER_DESCRIPTION, true);\n  }\n\n  public void testWithThreeStatements() {\n    doTest(\"<selection>var b int = 1\\nb = true\\ntype Type int</selection>\",\n           \"if <caret>{\\n\\tvar b int = 1\\n\\tb = true\\n\\ttype Type int\\n} else {\\n\\n}\\n\", SURROUNDER_DESCRIPTION, true);\n  }\n\n  public void testNoIf() {\n    doTest(\"var b, c bool = true, <selection>false</selection>\", \"\", SURROUNDER_DESCRIPTION, false);\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/editor/surround/GoWithIfExpressionSurrounderTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.editor.surround;\n\npublic class GoWithIfExpressionSurrounderTest extends GoSurrounderTestBase {\n  private static final String SURROUNDER_DESCRIPTION = new GoWithIfExpressionSurrounder().getTemplateDescription();\n\n  public void testWithOneBoolVariable() {\n    doTest(\"var b bool\\n<selection>b</selection>\", \"var b bool\\nif b {\\n\\n}\", SURROUNDER_DESCRIPTION, true);\n  }\n\n  public void testWithNotBoolExpressions() {\n    doTest(\"var b int = 1\\n<selection>b</selection>\", \"var b int = 1\\nb\", SURROUNDER_DESCRIPTION, false);\n  }\n\n  public void testWithTwoBoolExpressions() {\n    doTest(\"var b, c bool = true, false\\n<selection>b c</selection>\", \"var b, c bool = true, false\\nif b {\\n\\n}\\nc\", SURROUNDER_DESCRIPTION,\n           true);\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/editor/surround/GoWithIfSurrounderTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.editor.surround;\n\npublic class GoWithIfSurrounderTest extends GoSurrounderTestBase {\n  private static final String SURROUNDER_DESCRIPTION = new GoWithIfSurrounder().getTemplateDescription();\n\n  public void testWithOneStatement() {\n    doTest(\"<selection>var b bool</selection>\", \"if <caret>{\\n\\tvar b bool\\n}\\n\", SURROUNDER_DESCRIPTION, true);\n  }\n\n  public void testWithThreeStatements() {\n    doTest(\"<selection>var b int = 1\\nb = true\\ntype Type int</selection>\", \n           \"if <caret>{\\n\\tvar b int = 1\\n\\tb = true\\n\\ttype Type int\\n}\\n\",\n           SURROUNDER_DESCRIPTION, true);\n  }\n\n  public void testNoIf() {\n    doTest(\"var b, c bool = true, <selection>false</selection>\", \"var b, c bool = true, false\", SURROUNDER_DESCRIPTION, false);\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/editor/surround/GoWithNotExpressionSurrounderTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.editor.surround;\n\npublic class GoWithNotExpressionSurrounderTest extends GoSurrounderTestBase {\n  private static final String SURROUNDER_DESCRIPTION = new GoWithNotExpressionSurrounder().getTemplateDescription();\n\n  public void testWithOneBoolVariable() {\n    doTest(\"var b bool\\n<selection>b</selection>\", \"var b bool\\n!(b)\", SURROUNDER_DESCRIPTION, true);\n  }\n\n  public void testWithNotBoolExpressions() {\n    doTest(\"var b int = 1\\n<selection>b</selection>\", \"var b int = 1\\nb\", SURROUNDER_DESCRIPTION, false);\n  }\n\n  public void testInAssignment() {\n    doTest(\"var b, c bool = true, false\\nc = <selection>b</selection>\", \"var b, c bool = true, false\\nc = !(b)\",\n           SURROUNDER_DESCRIPTION, true);\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/editor/surround/GoWithParenthesisSurrounderTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.editor.surround;\n\npublic class GoWithParenthesisSurrounderTest extends GoSurrounderTestBase {\n  private static final String PARENTHESIS_SURROUNDER = new GoWithParenthesisSurrounder().getTemplateDescription();\n\n  public void testParenthesis() {\n    doTest(\"a := <selection>1 + 2</selection>\", \"a := (1 + 2)\\n\", PARENTHESIS_SURROUNDER, true);\n  }\n\n  public void testNoParenthesis() {\n    doTest(\"<selection>a := 1 + 2</selection>}\", \"<selection>a := 1 + 2</selection>\", PARENTHESIS_SURROUNDER, false);\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/formatter/GoFormatterTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.formatter;\n\nimport com.goide.GoCodeInsightFixtureTestCase;\nimport com.intellij.openapi.command.WriteCommandAction;\nimport com.intellij.psi.codeStyle.CodeStyleManager;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoFormatterTest extends GoCodeInsightFixtureTestCase {\n  @NotNull\n  @Override\n  protected String getBasePath() {\n    return \"formatting\";\n  }\n\n  public void testSimple()                          { doTest(); }\n  public void testCaseE()                           { doTest('e'); }\n  public void testCaseEnter()                       { doTestEnter(); }\n  public void testCase2Enter()                      { doTestEnter(); }\n  public void testSwitchEnter()                     { doTestEnter(); }\n  public void testTypeEnter()                       { doTestEnter(); }\n  public void testSpacesInArithmeticExpressions()   { doTest(); }\n  public void testConstDeclaration()                { doTest(); }\n  public void testVarDeclaration()                  { doTest(); }\n  public void testBreakLines()                      { doTest(); }\n  public void testCommentIndentation()              { doTest(); }\n  public void testElseStatement()                   { doTest(); }\n  public void testEmptyStatementInForClause()       { doTest(); }\n  public void testExpressionsContinuationIndent()   { doTest(); }\n\n  private void doTest() { doTest(null); }\n\n  private void doTestEnter() { doTest('\\n'); }\n\n  private void doTest(@Nullable Character c) {\n    String testName = getTestName(true);\n    myFixture.configureByFile(testName + \".go\");\n    String after = doTest(c, testName);\n    myFixture.checkResultByFile(after);\n  }\n\n  private String doTest(@Nullable Character c, String testName) {\n    if (c == null) {\n      WriteCommandAction.runWriteCommandAction(myFixture.getProject(), () -> {\n        CodeStyleManager.getInstance(getProject()).reformat(myFixture.getFile());\n      });\n    }\n    else {\n      myFixture.type(c);\n    }\n    return String.format(\"%s-after.go\", testName);\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/generate/GoGenerateTestActionTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.generate;\n\nimport com.goide.GoCodeInsightFixtureTestCase;\nimport com.goide.runconfig.testing.GoTestFunctionType;\nimport com.goide.runconfig.testing.frameworks.gotest.GotestGenerateAction;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoGenerateTestActionTest extends GoCodeInsightFixtureTestCase {\n  public void testTest() {\n    doTest(GoTestFunctionType.TEST, \"package test\\n<caret>\", \"package test\\n\" +\n                                                             \"\\n\" +\n                                                             \"import \\\"testing\\\"\\n\" +\n                                                             \"func Test<caret>(t *testing.T) {\\n\" +\n                                                             \"\\t\\n\" +\n                                                             \"}\");\n  }\n\n  public void testBenchmark() {\n    doTest(GoTestFunctionType.BENCHMARK, \"package test\\n<caret>\", \"package test\\n\" +\n                                                                  \"\\n\" +\n                                                                  \"import \\\"testing\\\"\\n\" +\n                                                                  \"func Benchmark<caret>(b *testing.B) {\\n\" +\n                                                                  \"\\t\\n\" +\n                                                                  \"}\");\n  }\n\n  public void testExample() {\n    doTest(GoTestFunctionType.EXAMPLE, \"package test\\n<caret>\", \"package test\\n\" +\n                                                                \"func Example<caret>() {\\n\" +\n                                                                \"\\t\\n\" +\n                                                                \"}\");\n  }\n\n  public void testImportedTestingPackage() {\n    doTest(GoTestFunctionType.TEST, \"package test\\n\" +\n                                    \"import `testing`\\n\" +\n                                    \"<caret>\", \"package test\\n\" +\n                                               \"import `testing`\\n\" +\n                                               \"func Test<caret>(t *testing.T) {\\n\" +\n                                               \"\\t\\n\" +\n                                               \"}\");\n  }\n\n  public void testImportedTestingPackageWithDifferentAlias() {\n    doTest(GoTestFunctionType.TEST, \"package test\\n\" +\n                                    \"import my_alias `testing`\\n\" +\n                                    \"<caret>\", \"package test\\n\" +\n                                               \"import my_alias `testing`\\n\" +\n                                               \"func Test<caret>(t *my_alias.T) {\\n\" +\n                                               \"\\t\\n\" +\n                                               \"}\");\n  }\n\n  public void testImportedTestingPackageWithDot() {\n    doTest(GoTestFunctionType.TEST, \"package test\\n\" +\n                                    \"import . `testing`\\n\" +\n                                    \"<caret>\", \"package test\\n\" +\n                                               \"import . `testing`\\n\" +\n                                               \"func Test<caret>(t *T) {\\n\" +\n                                               \"\\t\\n\" +\n                                               \"}\");\n  }\n\n  public void testImportedTestingPackageWithForSideEffects() {\n    doTest(GoTestFunctionType.TEST, \"package test\\n\" +\n                                    \"import _ `testing`\\n\" +\n                                    \"<caret>\", \"package test\\n\" +\n                                               \"\\n\" +\n                                               \"import (\\n\" +\n                                               \"\\t_ \\\"testing\\\"\\n\" +\n                                               \"\\t\\\"testing\\\"\\n\" +\n                                               \")\\n\" +\n                                               \"func Test<caret>(t *testing.T) {\\n\" +\n                                               \"\\t\\n\" +\n                                               \"}\");\n  }\n\n  public void testImportedPackageWithTestingAlias() {\n    doTest(GoTestFunctionType.TEST, \"package test\\n\" +\n                                    \"import testing `some_other_package`\\n\" +\n                                    \"<caret>\", \"package test\\n\" +\n                                               \"\\n\" +\n                                               \"import (\\n\" +\n                                               \"\\ttesting \\\"some_other_package\\\"\\n\" +\n                                               \"\\ttesting2 \\\"testing\\\"\\n\" +\n                                               \")\\n\" +\n                                               \"func Test<caret>(t *testing2.T) {\\n\" +\n                                               \"\\t\\n\" +\n                                               \"}\");\n  }\n\n\n  private void doTest(@NotNull GoTestFunctionType type, @NotNull String beforeText, @NotNull String afterText) {\n    myFixture.configureByText(\"test_test.go\", beforeText);\n    myFixture.testAction(new GotestGenerateAction(type));\n    myFixture.checkResult(afterText);\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/highlighting/GoColorsAndFontsPageTest.java",
    "content": "package com.goide.highlighting;\n\nimport junit.framework.TestCase;\nimport org.junit.Assert;\n\nimport java.util.Set;\nimport java.util.regex.Matcher;\nimport java.util.regex.Pattern;\n\npublic class GoColorsAndFontsPageTest extends TestCase {\n\n  public void testDemoText() {\n    GoColorsAndFontsPage testee = new GoColorsAndFontsPage();\n    String demoText = testee.getDemoText();\n    Set<String> knownElements = testee.getAdditionalHighlightingTagToDescriptorMap().keySet();\n\n    Matcher m = Pattern.compile(\"</?(\\\\w+)>\").matcher(demoText);\n    while (m.find()) {\n      String name = m.group(1);\n      if (!knownElements.contains(name)) {\n        Assert.fail(\"Unknown element \\\"\" + m.group() + \"\\\".\");\n      }\n    }\n  }\n\n}\n"
  },
  {
    "path": "tests/com/goide/inspections/GoAnonymousFieldDefinitionTypeInspectionTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.quickfix.GoCreateWrapperTypeQuickFix;\nimport com.goide.quickfix.GoQuickFixTestBase;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoAnonymousFieldDefinitionTypeInspectionTest extends GoQuickFixTestBase{\n  @Override\n  public void setUp() throws Exception {\n    super.setUp();\n    myFixture.enableInspections(GoAnonymousFieldDefinitionTypeInspection.class);\n  }\n\n  public void testSimple()        { doTest(); }\n\n  private void doTest() {\n    doTest(GoCreateWrapperTypeQuickFix.QUICKFIX_NAME, true);\n  }\n  @NotNull\n  @Override\n  protected String getBasePath() {\n    return \"inspections/anon-field\";\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/inspections/GoAssignmentToReceiverInspectionTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.GoCodeInsightFixtureTestCase;\n\npublic class GoAssignmentToReceiverInspectionTest extends GoCodeInsightFixtureTestCase {\n\n  @Override\n  public void setUp() throws Exception {\n    super.setUp();\n    myFixture.enableInspections(GoAssignmentToReceiverInspection.class);\n  }\n\n  public void testDoesNotPropagateToOtherCallsForNonPointerReceiver() {\n    doTest(\"func (r MyType) foo() { <weak_warning descr=\\\"Assignment to method receiver doesn't propagate to other calls\\\">r<caret></weak_warning> = 0 }\");\n  }\n\n  public void testDoesNotPropagateToOtherCallsForPointerReceiver() {\n    doTest(\"func (r *MyType) foo() { <weak_warning descr=\\\"Assignment to method receiver propagates only to callees but not to callers\\\">r<caret></weak_warning> = 0 }\");\n  }\n\n  public void testNoFixForDereferencedPointerReceiver() {\n    doTest(\"func (r *MyType) foo() { *r<caret> = 0 }\");\n  }\n\n  private void doTest(String code) {\n    myFixture.configureByText(\"a.go\", \"package main; type MyType int; \" + code);\n    myFixture.checkHighlighting();\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/inspections/GoDeferGoInspectionTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.SdkAware;\nimport com.goide.quickfix.GoQuickFixTestBase;\nimport org.jetbrains.annotations.NotNull;\n\n@SdkAware\npublic class GoDeferGoInspectionTest extends GoQuickFixTestBase {\n  @Override\n  public void setUp() throws Exception {\n    super.setUp();\n    myFixture.enableInspections(GoDeferGoInspection.class);\n  }\n\n  public void testParens() {\n    doTest(GoDeferGoInspection.UNWRAP_PARENTHESES_QUICK_FIX_NAME, true);\n  }\n\n  public void testTwiceParens() {\n    doTest(GoDeferGoInspection.UNWRAP_PARENTHESES_QUICK_FIX_NAME, true);\n  }\n\n  public void testParensFunctionType() {\n    doTest(GoDeferGoInspection.ADD_CALL_QUICK_FIX_NAME, true);\n  }\n\n  public void testLiteral() {\n    doTestNoFix(GoDeferGoInspection.ADD_CALL_QUICK_FIX_NAME, true);\n  }\n\n  public void testFuncLiteral() {\n    doTest(GoDeferGoInspection.ADD_CALL_QUICK_FIX_NAME, true);\n  }\n\n  public void testConversions() {\n    myFixture.testHighlighting(getTestName(true) + \".go\");\n  }\n\n  public void testValid() {\n    myFixture.testHighlighting(getTestName(true) + \".go\");\n  }\n\n  public void testDeferRecover() { doTest(GoDeferGoInspection.REPLACE_WITH_CORRECT_DEFER_RECOVER, true); }\n\n  @NotNull\n  @Override\n  protected String getBasePath() {\n    return \"inspections/go-defer-function-call\";\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/inspections/GoEmptyDeclarationInspectionTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.quickfix.GoQuickFixTestBase;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoEmptyDeclarationInspectionTest extends GoQuickFixTestBase {\n  @Override\n  public void setUp() throws Exception {\n    super.setUp();\n    myFixture.enableInspections(GoEmptyDeclarationInspection.class);\n  }\n\n  public void testConstVoidDeclaration() {\n    doTest(GoEmptyDeclarationInspection.QUICK_FIX_NAME, true);\n  }\n\n  public void testVarVoidDeclarationWithInnerComment() {\n    doTestNoFix(GoEmptyDeclarationInspection.QUICK_FIX_NAME, true);\n  }\n\n  public void testNotVoidImportDeclaration() {\n    doTestNoFix(GoEmptyDeclarationInspection.QUICK_FIX_NAME, true);\n  }\n\n  public void testImportVoidDeclarationWithUpperComment()  {\n    doTestNoFix(GoEmptyDeclarationInspection.QUICK_FIX_NAME, true);\n  }\n\n  public void testTypeVoidDeclaration() {\n    doTest(GoEmptyDeclarationInspection.QUICK_FIX_NAME, true);\n  }\n\n  public void testTwoVoidImportsWithOneComment() {\n    doTest(GoEmptyDeclarationInspection.QUICK_FIX_NAME, true);\n  }\n\n  public void testVarVoidDeclarationInFunction() {\n    doTestNoFix(GoEmptyDeclarationInspection.QUICK_FIX_NAME, true);\n  }\n\n  public void testVarVoidDeclarationNotInFunction() {\n    doTest(GoEmptyDeclarationInspection.QUICK_FIX_NAME, true);\n  }\n\n  @NotNull\n  @Override\n  protected String getBasePath() {\n    return \"inspections/go-empty-declaration\";\n  }\n}\n\n\n\n"
  },
  {
    "path": "tests/com/goide/inspections/GoHighlightingTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.GoCodeInsightFixtureTestCase;\nimport com.goide.SdkAware;\nimport com.goide.codeInsight.imports.GoImportOptimizerTest;\nimport com.goide.inspections.unresolved.*;\nimport com.goide.project.GoModuleLibrariesService;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.psi.PsiDirectory;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.PsiReference;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.io.IOException;\n\n@SdkAware\npublic class GoHighlightingTest extends GoCodeInsightFixtureTestCase {\n  @Override\n  public void setUp() throws Exception {\n    super.setUp();\n    myFixture.enableInspections(\n      GoUnresolvedReferenceInspection.class,\n      GoDuplicateFieldsOrMethodsInspection.class,\n      GoUnusedImportInspection.class,\n      GoUnusedVariableInspection.class,\n      GoUnusedConstInspection.class,\n      GoUnusedGlobalVariableInspection.class,\n      GoUnusedFunctionInspection.class,\n      GoUnusedExportedFunctionInspection.class,\n      GoAssignmentToConstantInspection.class,\n      GoDuplicateFunctionOrMethodInspection.class,\n      GoDuplicateArgumentInspection.class,\n      GoDuplicateReturnArgumentInspection.class,\n      GoFunctionVariadicParameterInspection.class,\n      GoVarDeclarationInspection.class,\n      GoNoNewVariablesInspection.class,\n      GoMissingReturnInspection.class,\n      GoFunctionCallInspection.class,\n      GoDeferGoInspection.class,\n      GoReservedWordUsedAsNameInspection.class,\n      GoImportUsedAsNameInspection.class,\n      GoMultiplePackagesInspection.class,\n      GoCgoInTestInspection.class,\n      GoTestSignaturesInspection.class,\n      GoAssignmentNilWithoutExplicitTypeInspection.class,\n      GoRedeclareImportAsFunctionInspection.class,\n      GoStructTagInspection.class,\n      GoUsedAsValueInCondition.class,\n      GoDeferInLoopInspection.class,\n      GoCommentStartInspection.class,\n      GoPlaceholderCountInspection.class,\n      GoEmbeddedInterfacePointerInspection.class,\n      GoUnderscoreUsedAsValueInspection.class,\n      GoRangeIterationOnIllegalTypeInspection.class,\n      GoUnusedParameterInspection.class,\n      GoDirectAssignToStructFieldInMapInspection.class,\n      GoInfiniteForInspection.class,\n      GoAssignmentToReceiverInspection.class,\n      GoInvalidStringOrCharInspection.class,\n      GoMixedNamedUnnamedParametersInspection.class,\n      GoAnonymousFieldDefinitionTypeInspection.class,\n      GoStringAndByteTypeMismatchInspection.class\n    );\n  }\n\n  private void doTest() {\n    myFixture.testHighlighting(true, false, false, getTestName(true) + \".go\");\n  }\n\n  @NotNull\n  @Override\n  protected String getBasePath() {\n    return \"highlighting\";\n  }\n\n  @Override\n  protected boolean isWriteActionRequired() {\n    return false;\n  }\n\n  public void testSimple()                    { doTest(); }\n  public void testLabels()                    { doTest(); }\n  public void testStruct()                    { doTest(); }\n  public void testBoxes()                     { doTest(); }\n  public void testRanges()                    { doTest(); }\n  public void testSelector()                  { doTest(); }\n  public void testComposite()                 { doTest(); }\n  public void testVars()                      { doTest(); }\n  public void testRecv()                      { doTest(); }\n  public void testPointers()                  { doTest(); }\n  public void testSlices()                    { doTest(); }\n  public void testShortVars()                 { doTest(); }\n  public void testReturns()                   { doTest(); }\n  public void testRequest()                   { doTest(); }\n  public void testStop()                      { doTest(); }\n  public void testVarBlocks()                 { doTest(); }\n  public void testBlankImport()               { doTest(); }\n  public void testVariadic()                  { doTest(); }\n  public void testCheck()                     { doTest(); }\n  public void testCheck_test()                { doTest(); }\n  public void testFuncCall()                  { doTest(); }\n  public void testBuiltinFuncCalls()          { doTest(); }\n  public void testBackticks()                 { doTest(); }\n  public void testConsts()                    { doTest(); }\n  public void testFields()                    { doTest(); }\n  public void testBlankFields()               { doTest(); }\n  public void testFuncLiteral()               { doTest(); }\n  public void testTypeLiterals()              { doTest(); }\n  public void testFuncType()                  { doTest(); }\n  public void testTemplates()                 { doTest(); }\n  public void testInterfaces()                { doTest(); }\n  public void testReceiverType()              { doTest(); }\n  public void testForRange()                  { doTest(); }\n  public void testMismatch()                  { doTest(); }\n  public void testStubParams()                { doTest(); }\n  public void testNil()                       { doTest(); }\n  public void testAssignUsages()              { doTest(); }\n  public void testMethodExpr()                { doTest(); }\n  public void testVarToImport()               { doTest(); }\n  public void testCgotest()                   { doTest(); }\n  public void testRedeclaredImportAsFunction(){ doTest(); }\n  public void testStructTags()                { doTest(); }\n  public void testContinue()                  { doTest(); }\n  public void testBreak()                     { doTest(); }\n  public void testEqualinif()                 { doTest(); }\n  public void testSpecTypes()                 { doTest(); }\n  public void testFunctionTypes()             { doTest(); }\n  public void testGithubIssue2099()           { doTest(); }\n  public void testCyclicDefinition()          { doTest(); }\n  public void testEmbeddedInterfacePointer()  { doTest(); }\n  public void testPlaceholderCount()          { doTest(); }\n  public void testPlaceholderCountVet()       { doTest(); }\n  public void testTypeConversion()            { doTest(); }\n  public void testInit()                      { doTest(); }\n  public void testMainWithWrongSignature()    { doTest(); }\n  public void testChan()                      { doTest(); }\n  public void testIota()                      { doTest(); }\n  public void testIota2()                     { doTest(); }\n  public void testUnaryPointer()              { doTest(); }\n  public void testUnaryMinus()                { doTest(); }\n  public void testFileRead()                  { doTest(); }\n  public void testLiteralValues()             { doTest(); }\n  public void testUnderscoreUsedAsValue()     { doTest(); }\n  public void testUnusedParameter()           { doTest(); }\n  public void testUnusedParameter_test()      { doTest(); }\n  public void testVoidFunctionUsedAsValue()   { doTest(); }\n  public void testIndexedStringAssign()       { doTest(); }\n  public void testStringSliceWithThirdIndex() { doTest(); }\n  public void testSliceWithThirdIndex()       { doTest(); }\n  public void testAssignToStructFieldInMap()  { doTest(); }\n  public void testInfiniteFor()               { doTest(); }\n  public void testGh2147()                    { doTest(); }\n  public void testAssignmentToReceiver()      { doTest(); }\n  public void testReservedWordUsedAsName()    { doTest(); }\n  public void testImportUsedAsName()          { doTest(); }\n  public void testMixedNamedUnnamedParameters() { doTest(); }\n  public void testStringInStructSliceWithThirdIndex() { doTest(); }\n  public void testAnonymousFieldDefinition()  { doTest(); }\n  public void testStringIndexIsByte()         { doTest(); }\n\n  public void testCodedImportString() {\n    myFixture.addFileToProject(\"a/a.go\", \"package a\\n const A = 3\");\n    PsiFile file = myFixture.addFileToProject(\"b/b.go\", \"package b\\n import \\\"\\\\u0061\\\" \\n\" +\n                                                        \"const <warning descr=\\\"Unused constant 'my'\\\">my</warning> = a.A\");\n    myFixture.configureFromExistingVirtualFile(file.getVirtualFile());\n    myFixture.checkHighlighting();\n  }\n\n  public void testDoNotResolveReceiverTypeToFunction() { \n    myFixture.addFileToProject(\"pack1/a.go\", \"package foo; func functionInCurrentPackage() {}\");\n    PsiFile file = myFixture.addFileToProject(\"pack1/b.go\", \n                                              \"package foo; func (<error descr=\\\"Unresolved type 'functionInCurrentPackage'\\\">functionInCurrentPackage</error>) method() {}\");\n    myFixture.configureFromExistingVirtualFile(file.getVirtualFile());\n    myFixture.checkHighlighting();\n  }\n\n  public void testAvoidDuplicatedUnusedImportReports() {\n    myFixture.addFileToProject(\"pack1/a.go\", \"package foo;\");\n    myFixture.addFileToProject(\"pack1/b.go\", \"package foo_test;\");\n    myFixture.addFileToProject(\"pack2/a.go\", \"package foo;\");\n    myFixture.addFileToProject(\"pack3/a.go\", \"package foo; func Hi() {}\");\n    doTest();\n  }\n\n  public void testCheckSamePackage_test() {\n    myFixture.configureByText(\"a_test.go\", \"package check; func TestStringer(t *testing.T) {}\");\n    doTest();\n  }\n\n  public void testRelativeImportIgnoringDirectories() throws IOException {\n    myFixture.getTempDirFixture().findOrCreateDir(\"to_import/testdata\");\n    myFixture.getTempDirFixture().findOrCreateDir(\"to_import/.name\");\n    myFixture.getTempDirFixture().findOrCreateDir(\"to_import/_name\");\n    doTest();\n  }\n\n  public void testImportWithSlashAtTheEnd() {\n    myFixture.addFileToProject(\"a/pack/pack.go\", \"package pack; func Foo() {}\");\n    PsiFile file = myFixture.addFileToProject(\"pack2/pack2.go\",\n                                              \"package main; import \\\"a/pack/<error descr=\\\"Cannot resolve file ''\\\"></error>\\\"; import \\\"../a/pack/\\\"; func main() { pack.Foo() }\");\n    myFixture.configureFromExistingVirtualFile(file.getVirtualFile());\n    myFixture.checkHighlighting();\n  }\n\n  @SuppressWarnings(\"ConstantConditions\")\n  public void testDoNotReportNonLastMultiResolvedImport() {\n    myFixture.addFileToProject(\"root1/src/to_import/unique/foo.go\", \"package unique; func Foo() {}\");\n    myFixture.addFileToProject(\"root1/src/to_import/shared/a.go\", \"package shared\");\n    myFixture.addFileToProject(\"root2/src/to_import/shared/a.go\", \"package shared\");\n    GoModuleLibrariesService.getInstance(myFixture.getModule()).setLibraryRootUrls(myFixture.findFileInTempDir(\"root1\").getUrl(),\n                                                                                   myFixture.findFileInTempDir(\"root2\").getUrl());\n    doTest();\n\n    PsiReference reference = myFixture.getFile().findReferenceAt(myFixture.getCaretOffset());\n    PsiElement resolve = reference.resolve();\n    assertInstanceOf(resolve, PsiDirectory.class);\n    assertTrue(((PsiDirectory)resolve).getVirtualFile().getPath().endsWith(\"root1/src/to_import/shared\"));\n\n    GoModuleLibrariesService.getInstance(myFixture.getModule()).setLibraryRootUrls(myFixture.findFileInTempDir(\"root2\").getUrl(),\n                                                                                   myFixture.findFileInTempDir(\"root1\").getUrl());\n    reference = myFixture.getFile().findReferenceAt(myFixture.getCaretOffset());\n    resolve = reference.resolve();\n    assertInstanceOf(resolve, PsiDirectory.class);\n    assertTrue(((PsiDirectory)resolve).getVirtualFile().getPath().endsWith(\"root2/src/to_import/shared\"));\n  }\n\n  public void testLocalScope() {\n    myFixture.configureByText(\"a.go\", \"package foo; func bar() {}\");\n    myFixture.configureByText(\"b.go\", \"package foo; func init(){bar()}\");\n    myFixture.checkHighlighting();\n  }\n\n  public void testInnerTypesFromOtherPackage() {\n    myFixture.configureByText(\"main.go\", \"package main; import \\\"io\\\"; type Outer struct { *io.LimitedReader };\" +\n                                         \"func main() { _ = &Outer{LimitedReader: &io.LimitedReader{}, } }\");\n    myFixture.checkHighlighting();\n  }\n\n  public void testNoLocalResolveForTest() {\n    myFixture.configureByText(\"a.go\", \"package i; type P struct { v1 int }\");\n    myFixture\n      .configureByText(\"b_test.go\", \"package i_test; import ( \\\".\\\" ); func <warning>f</warning>() { print(i.P{}.<error>v1</error>) }\");\n    myFixture.checkHighlighting();\n  }\n\n  public void testDuplicateFunctionsInOnePackage() {\n    myFixture.configureByText(\"a.go\", \"package foo; func init() {bar()}; func bar() {};\");\n    myFixture.configureByText(\"b.go\", \"//+build appengine\\n\\npackage foo; func init() {buzz()}; func buzz() {}\");\n    myFixture.configureByText(\"c.go\",\n                              \"package foo; func init() {bar(); buzz();}; func <error descr=\\\"Duplicate function name\\\">bar</error>() {}; func buzz() {}\");\n    myFixture.checkHighlighting();\n  }\n\n  public void testDuplicateFunctionsInDifferentPackages() {\n    myFixture.configureByText(\"a.go\", \"package foo; func init() {bar()}; func bar() {};\");\n    myFixture.configureByText(\"b_test.go\", \"package foo_test; func init() {bar(); buzz();}; func bar() {}; func buzz() {}\");\n    myFixture.checkHighlighting();\n  }\n\n  public void testDoNotSearchFunctionDuplicatesForNotTargetMatchingFiles() {\n    myFixture.configureByText(\"a.go\", \"//+build appengine\\n\\npackage foo; func init() {buzz()}; func buzz() {}\");\n    myFixture.configureByText(\"b.go\", \"package foo; func init() {buzz()}; func buzz() {}\");\n    myFixture.checkHighlighting();\n  }\n\n  public void testDuplicateMethodsInOnePackage() {\n    myFixture.configureByText(\"a.go\", \"package main; type Foo int; func (f Foo) bar(a, b string) {}\");\n    myFixture.configureByText(\"b.go\", \"//+build appengine\\n\\npackage main; func (a *Foo) bar() {};func (a *Foo) buzz() {}\");\n    myFixture.configureByText(\"c.go\", \"package main; func (a *Foo) <error>bar</error>() {};func (a *Foo) buzz() {}\");\n    myFixture.checkHighlighting();\n  }\n\n  public void testDoNotSearchMethodDuplicatesForNotTargetMatchingFiles() {\n    myFixture.configureByText(\"b.go\", \"//+build appengine\\n\\npackage main; func (a *Foo) bar() {}\");\n    myFixture.configureByText(\"a.go\", \"package main; type Foo int; func (f Foo) bar(_, _ string) {}\");\n    myFixture.checkHighlighting();\n  }\n\n  public void testNoDuplicateMethodsInOnePackage() {\n    myFixture.configureByText(\"a.go\", \"package main; type Foo int; func (f Foo) bar() {}\");\n    myFixture.configureByText(\"b.go\", \"package main; type Baz int; func (f Baz) bar() {}\");\n    myFixture.checkHighlighting();\n  }\n\n  public void testInitInOnePackage() {\n    myFixture.configureByText(\"a.go\", \"package foo; func init() {bar()}; func bar() {}\");\n    myFixture.configureByText(\"b.go\", \"package foo; func init() {bar()}; func <error>bar</error>() {}; func init() {}\");\n    myFixture.checkHighlighting();\n  }\n\n  public void testMainInFooPackage() {\n    myFixture.configureByText(\"a.go\", \"package foo; func main() {bar()}; func bar() {}\");\n    myFixture.configureByText(\"b.go\", \"package foo; func <error>main</error>() {bar()}; func <error>bar</error>() {}\");\n    myFixture.checkHighlighting();\n  }\n\n  public void testMainInMainPackage() {\n    myFixture.configureByText(\"a.go\", \"package main; func main() {bar()}; func bar() {}\");\n    myFixture.configureByText(\"b.go\", \"package main; func main() {bar()}; func <error>bar</error>() {}\");\n    myFixture.checkHighlighting();\n  }\n\n  public void testUseNilWithoutExplicitType() {\n    myFixture.configureByText(\"a.go\", \"package main; func main() { var x string = nil; _ = x; var y = <error>nil</error>; _ = y}\");\n    myFixture.checkHighlighting();\n  }\n\n  public void testPackageWithTestPrefix() {\n    myFixture.addFileToProject(\"pack1/pack1_test.go\", \"package pack1_test; func Test() {}\");\n    PsiFile file = myFixture.addFileToProject(\"pack2/pack2_test.go\",\n                                              \"package pack2_test; import \\\"testing\\\"; func TestTest(*testing.T) {<error>pack1_test</error>.Test()}\");\n    myFixture.configureFromExistingVirtualFile(file.getVirtualFile());\n    myFixture.checkHighlighting();\n  }\n\n  public void testMethodOnNonLocalType() {\n    VirtualFile file = myFixture.copyFileToProject(getTestName(true) + \".go\", \"method/nonlocaltype.go\");\n    myFixture.configureFromExistingVirtualFile(file);\n    GoImportOptimizerTest.resolveAllReferences(myFixture.getFile());\n    myFixture.checkHighlighting();\n  }\n\n  public void testMethodOnNonLocalTypeInTheSameDirectory() {\n    myFixture.addFileToProject(\"method/foo.go\", \"package a; type H struct {}\");\n    PsiFile psiFile = myFixture.addFileToProject(\"method/foo_test.go\", \"package a_test;\\n\" +\n                                                                       \"func (<error descr=\\\"Unresolved type 'H'\\\">H</error>) Hello() {}\");\n    myFixture.configureFromExistingVirtualFile(psiFile.getVirtualFile());\n    myFixture.checkHighlighting();\n  }\n\n  public void testPackageWithTestPrefixNotInsideTestFile() {\n    myFixture.addFileToProject(\"pack1/pack1.go\", \"package pack1_test; func Test() {}\");\n    PsiFile file = myFixture.addFileToProject(\"pack2/pack2_test.go\",\n                                              \"package pack2_test; import `pack1`; import \\\"testing\\\"; func TestTest(*testing.T) {pack1_test.Test()}\");\n    myFixture.configureFromExistingVirtualFile(file.getVirtualFile());\n    myFixture.checkHighlighting();\n  }\n\n  public void testBlankPackage() {\n    myFixture.configureByText(\"a.go\", \"package <error descr=\\\"Invalid package name\\\">_</error>\");\n    myFixture.checkHighlighting();\n  }\n\n  public void testMultiplePackages() {\n    myFixture.addFileToProject(\"a.go\", \"package a\");\n    myFixture.configureByText(\"b.go\", \"<error>package b</error>\");\n    myFixture.checkHighlighting();\n  }\n\n  public void testMultiplePackagesWithIgnoredFile() {\n    myFixture.addFileToProject(\"a.go\", \"// +build ignored\\n\\npackage a\");\n    myFixture.addFileToProject(\".c.go\", \"// package a\");\n    myFixture.addFileToProject(\"_c.go\", \"// package a\");\n    // Should be OK to have package b because package a has a non-matching\n    // build tag.\n    myFixture.configureByText(\"b.go\", \"package b\");\n    myFixture.checkHighlighting();\n  }\n\n  public void testMultiplePackagesWithDocumentationPackage() {\n    myFixture.addFileToProject(\"a.go\", \"package documentation\");\n    myFixture.configureByText(\"b.go\", \"package b\");\n    myFixture.checkHighlighting();\n  }\n\n  public void testDocumentationPackage() {\n    myFixture.addFileToProject(\"a.go\", \"package a\");\n    myFixture.configureByText(\"docs.go\", \"package documentation\");\n    myFixture.checkHighlighting();\n  }\n\n  public void testTestPackage() {\n    myFixture.addFileToProject(\"a.go\", \"package a\");\n    myFixture.configureByText(\"a_test.go\", \"package a_test\");\n    myFixture.checkHighlighting();\n  }\n\n  public void testCGOImportInTestFile() {\n    myFixture.configureByText(\"a_test.go\", \"package a; import<error>\\\"C\\\"</error>; import<error>\\\"C\\\"</error>;\");\n    myFixture.checkHighlighting();\n  }\n\n  public void testDeferInLoop() { doWeakTest(); }\n  public void testDeferGo()     { doWeakTest(); }\n\n  public void testCommentStart() { doWeakTest(); }\n\n  private long doWeakTest() {return myFixture.testHighlighting(true, false, true, getTestName(true) + \".go\");}\n\n  public void testDoNotHighlightCommentOfMainPackage() {\n    myFixture.configureByText(\"a.go\", \"// Some comment\\npackage main; func main() {}\");\n    myFixture.checkHighlighting(true, false, true);\n  }\n\n  public void testCGOImportInNonTestFile() {\n    myFixture.configureByText(\"a.go\", \"package a; import \\\"C\\\"\");\n    myFixture.checkHighlighting();\n  }\n\n  public void testVendoringImportPaths() {\n    myFixture.addFileToProject(\"vendor/vendoringPackage/v.go\", \"package vendoringPackage; func Hello() {}\");\n    myFixture.addFileToProject(\"subPackage/vendor/subVendoringPackage/v.go\", \"package subVendoringPackage; func Hello() {}\");\n    doTest();\n  }\n\n  public void testVendoredBuiltinImport() {\n    myFixture.addFileToProject(\"vendor/builtin/builtin.go\", \"package builtin; func Hello() {}\");\n    myFixture.configureByText(\"a.go\", \"package a; import _ `builtin`\");\n    myFixture.checkHighlighting();\n  }\n\n  public void testDuplicatePackageAlias() {\n    myFixture.addFileToProject(\"pack1/pack1.go\", \"package pack1; func Foo() {}\");\n    myFixture.addFileToProject(\"pack2/pack2.go\", \"package pack2\");\n    PsiFile file = myFixture.addFileToProject(\"pack3/pack3.go\",\n                                              \"package main; import p \\\"pack1\\\"; import <error>p \\\"pack2\\\"</error>; func main() { p.Foo() }\");\n    myFixture.configureFromExistingVirtualFile(file.getVirtualFile());\n    myFixture.checkHighlighting();\n  }\n\n  public void testDuplicatePackageImport() {\n    myFixture.addFileToProject(\"pack/pack1.go\", \"package pack; func Foo() {}\");\n    PsiFile file = myFixture.addFileToProject(\"pack3/pack3.go\",\n                                              \"package main; import \\\"pack\\\"; import <error>\\\"pack\\\"</error>; func main() { pack.Foo() }\");\n    myFixture.configureFromExistingVirtualFile(file.getVirtualFile());\n    myFixture.checkHighlighting();\n  }\n\n  public void testDuplicateFinalPackageComponent() {\n    myFixture.addFileToProject(\"a/pack/pack1.go\", \"package pack; func Foo() {}\");\n    myFixture.addFileToProject(\"b/pack/pack2.go\", \"package pack\");\n    PsiFile file = myFixture.addFileToProject(\"pack3/pack3.go\", \"package main; import \\\"a/pack\\\"\\n\" +\n                                                                \"import <error>\\\"b/pack\\\"</error>\\n\" +\n                                                                \"func main() { pack.Foo() }\");\n    myFixture.configureFromExistingVirtualFile(file.getVirtualFile());\n    myFixture.checkHighlighting();\n  }\n\n  public void testIgnoredBuildTag() {\n    myFixture.addFileToProject(\"a/pack1.go\", \"package a; func Foo() {}\");\n    myFixture.addFileToProject(\"a/pack2.go\", \"// +build ignored\\n\\npackage main\");\n    myFixture.addFileToProject(\"b/pack1.go\", \"package b; func Bar() {}\");\n    myFixture.addFileToProject(\"b/pack2.go\", \"// +build ignored\\n\\npackage main\");\n    // There should be no errors: package main exists in the a/ and b/\n    // directories, but it is not imported as it has a non-matching build tag. \n    // For more details see https://github.com/go-lang-plugin-org/go-lang-idea-plugin/issues/1858#issuecomment-139794391.\n    PsiFile file = myFixture.addFileToProject(\"c/pack1.go\", \"package main; import \\\"a\\\"; import \\\"b\\\"; func main() { a.Foo(); b.Bar(); }\");\n    myFixture.configureFromExistingVirtualFile(file.getVirtualFile());\n    myFixture.checkHighlighting();\n  }\n\n  public void testImportUnderscore() {\n    myFixture.addFileToProject(\"a/pack/pack1.go\", \"package pack; func Foo() {}\");\n    myFixture.addFileToProject(\"b/pack/pack2.go\", \"package pack\");\n    myFixture.addFileToProject(\"c/pack/pack3.go\", \"package whatever; func Bar() {}\");\n    myFixture.addFileToProject(\"d/pack/pack4.go\", \"package another; func Baz() {}\");\n    PsiFile file = myFixture.addFileToProject(\"pack3/pack3.go\",\n                                              \"package main; import _ \\\"a/pack\\\"; import _ \\\"b/pack\\\"; import . \\\"c/pack\\\"; import . \\\"d/pack\\\"; func main() { Bar(); Baz() }\");\n    myFixture.configureFromExistingVirtualFile(file.getVirtualFile());\n    myFixture.checkHighlighting();\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/inspections/GoInspectionUtilTest.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.GoCodeInsightFixtureTestCase;\nimport com.goide.psi.GoBuiltinCallExpr;\nimport com.goide.psi.GoCallExpr;\nimport com.goide.psi.GoExpression;\nimport com.goide.psi.GoStringLiteral;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoInspectionUtilTest extends GoCodeInsightFixtureTestCase {\n\n  private <T extends GoExpression> void doTest(@NotNull String text, @NotNull Class<T> aClass, int expected) {\n    myFixture.configureByText(\"a.go\", text);\n    PsiElement element = myFixture.getFile().findElementAt(myFixture.getEditor().getCaretModel().getOffset());\n    T callExpr = PsiTreeUtil.getParentOfType(element, aClass);\n    assertEquals(expected, GoInspectionUtil.getExpressionResultCount(callExpr));\n  }\n\n  public void testBuiltinCallResultCount() {\n    String text = \"package a; func b() {\\n b := <caret>make(int, 10); _ = b }\";\n    doTest(text, GoBuiltinCallExpr.class, 1);\n  }\n\n  public void testMultipleResultCount() {\n    String text = \"package a; func vals() (int, int) {\\n return 42, 0}; func b() {\\n <caret>vals()}\";\n    doTest(text, GoCallExpr.class, 2);\n  }\n\n  public void testLiteralResultCount() {\n    String text = \"package a; func b() {\\n a := \\\"hello <caret>world\\\"}\";\n    doTest(text, GoStringLiteral.class, 1);\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/inspections/GoInvalidPackageImportInspectionTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.SdkAware;\nimport com.goide.quickfix.GoDeleteImportQuickFix;\nimport com.goide.quickfix.GoQuickFixTestBase;\nimport com.goide.sdk.GoSdkService;\nimport com.intellij.codeInsight.intention.IntentionAction;\nimport com.intellij.openapi.command.WriteCommandAction;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.util.containers.ContainerUtil;\n\nimport java.util.Collection;\n\n@SdkAware\npublic class GoInvalidPackageImportInspectionTest extends GoQuickFixTestBase {\n  @Override\n  public void setUp() throws Exception {\n    super.setUp();\n    myFixture.enableInspections(GoInvalidPackageImportInspection.class);\n  }\n\n  public void testImportBuiltinPackage() {\n    myFixture.addFileToProject(\"builtin/hello.go\", \"package builtin\");\n    myFixture.configureByText(\"a.go\", \"package pack; import <error descr=\\\"Cannot import 'builtin' package\\\">`builtin`</error>\");\n    myFixture.checkHighlighting();\n  }\n\n  public void testImportBuiltinSubPackage() {\n    myFixture.addFileToProject(\"builtin/hello.go\", \"package builtin\");\n    myFixture.addFileToProject(\"builtin/sub/hello.go\", \"package builtin\");\n    myFixture.configureByText(\"a.go\", \"package pack; import `builtin/sub`\");\n    myFixture.checkHighlighting();\n  }\n\n  public void testImportVendoredBuiltin() {\n    myFixture.addFileToProject(\"vendor/builtin/hello.go\", \"package builtin\");\n    myFixture.configureByText(\"a.go\", \"package pack; import `builtin`\");\n    myFixture.checkHighlighting();\n  }\n\n  public void testImportUnreachableVendoredPackage() {\n    myFixture.addFileToProject(\"pack/vendor/foo/a.go\", \"package foo\");\n    myFixture.configureByText(\"a.go\", \"package bar\\n\" +\n                                      \"import _ `pack/vendor/unresolved`\\n\" +\n                                      \"import <error descr=\\\"Use of vendored package is not allowed\\\">_ `pack/ve<caret>ndor/foo`</error>\");\n    myFixture.checkHighlighting();\n    assertContainsElements(getIntentionNames(), \"Disable vendoring experiment support in module 'light_idea_test_case'\", \"Delete import\");\n    assertDoesntContain(getIntentionNames(), \"Replace with `foo`\");\n  }\n\n  public void testReplaceImportWithVendoredPath() {\n    myFixture.addFileToProject(\"vendor/foo/a.go\", \"package foo\");\n    myFixture.configureByText(\"a.go\", \"package pack\\n\" +\n                                      \"import _ `pack/vendor/unresolved`\\n\" +\n                                      \"import <error descr=\\\"Must be imported as 'foo'\\\">_ `vend<caret>or/foo`</error>\");\n    myFixture.checkHighlighting();\n    assertContainsElements(getIntentionNames(), \"Disable vendoring experiment support in module 'light_idea_test_case'\", \"Delete import\");\n    myFixture.launchAction(myFixture.findSingleIntention(\"Replace with 'foo'\"));\n    myFixture.checkResult(\"package pack\\n\" +\n                          \"import _ `pack/vendor/unresolved`\\n\" +\n                          \"import _ `foo`\");\n  }\n\n  public void testDoNoSuggestDisablingVendoringOnGo1_7() {\n    GoSdkService.setTestingSdkVersion(\"1.7\", getTestRootDisposable());\n    myFixture.addFileToProject(\"vendor/foo/a.go\", \"package foo\");\n    myFixture.configureByText(\"a.go\", \"package pack\\n\" +\n                                      \"import _ `pack/vendor/unresolved`\\n\" +\n                                      \"import <error descr=\\\"Must be imported as 'foo'\\\">_ `vend<caret>or/foo`</error>\");\n    myFixture.checkHighlighting();\n    assertDoesntContain(getIntentionNames(), \"Disable vendoring experiment support in module 'light_idea_test_case'\");\n  }\n\n  public void testWithDisabledVendoring() {\n    disableVendoring();\n    myFixture.addFileToProject(\"pack/vendor/foo/a.go\", \"package foo\");\n    myFixture.addFileToProject(\"vendor/foo/a.go\", \"package foo\");\n    myFixture.configureByText(\"a.go\", \"package pack\\n\" +\n                                      \"import _ `pack/vendor/unresolved`\\n\" +\n                                      \"import _ `pack/vendor/foo/a`\\n\" +\n                                      \"import _ `vendor/foo/a`\");\n    myFixture.checkHighlighting();\n  }\n\n  public void testVendorInsideVendorShouldBeUnreachable() {\n    myFixture.addFileToProject(\"vendor/foo/a.go\", \"package foo\");\n    myFixture.addFileToProject(\"vendor/foo/vendor/bar/a.go\", \"package bar\");\n    myFixture.configureByText(\"a.go\", \"package bar\\n\" +\n                                      \"import _ `foo`\\n\" +\n                                      \"import <error descr=\\\"Use of vendored package is not allowed\\\">_ `foo/vendor/bar`</error>\");\n    myFixture.checkHighlighting();\n  }\n\n  public void testImportMainPackage() {\n    myFixture.addFileToProject(\"foo/main/main.go\", \"package main\");\n    myFixture.addFileToProject(\"bar/main/main_test.go\", \"package main_test\");\n    myFixture.addFileToProject(\"buzz/main/other_main_test.go\", \"package main\");\n    myFixture.addFileToProject(\"not_program/main/other_main.go\", \"package main_test\");\n    myFixture.addFileToProject(\"foo/not_main/main.go\", \"package main\");\n    myFixture.addFileToProject(\"bar/not_main/main_test.go\", \"package main_test\");\n    myFixture.addFileToProject(\"buzz/not_main/other_main_test.go\", \"package main\");\n    myFixture.addFileToProject(\"not_program/not_main/other_main.go\", \"package main_test\");\n    myFixture.configureByText(\"a.go\", \"package a\\n\" +\n                                      \"import <error descr=\\\"'foo/main' is a program, not an importable package\\\">`foo/main`</error>\\n\" +\n                                      \"import <error descr=\\\"'bar/main' is a program, not an importable package\\\">`bar/main`</error>\\n\" +\n                                      \"import <error descr=\\\"'buzz/main' is a program, not an importable package\\\">`buzz/main`</error>\\n\" +\n                                      \"import `not_program/main`\\n\" +\n                                      \"import <error descr=\\\"'foo/not_main' is a program, not an importable package\\\">`foo/not_main`</error>\\n\" +\n                                      \"import <error descr=\\\"'bar/not_main' is a program, not an importable package\\\">`bar/not_main`</error>\\n\" +\n                                      \"import <error descr=\\\"'buzz/not_main' is a program, not an importable package\\\">`buzz/not_main`</error>\\n\" +\n                                      \"import `not_program/not_main`\");\n    myFixture.checkHighlighting();\n  }\n  \n  public void testImportMainPackageInTest() {\n    myFixture.addFileToProject(\"foo/main/main.go\", \"package main\");\n    myFixture.configureByText(\"a_test.go\", \"package a\\nimport `foo/main`\");\n    myFixture.checkHighlighting();\n  }\n\n  public void testInternalPackageOn1_2_SDK() {\n    myFixture.addFileToProject(\"internal/internal.go\", \"package internalPackage; func InternalFunction() {}\");\n    myFixture.addFileToProject(\"sub/internal/internal.go\", \"package subInternalPackage; func InternalFunction() {}\");\n    myFixture.configureByText(\"a.go\", \"package src\\n\" +\n                                      \"import (\\n\" +\n                                      \"  `internal`\\n\" +\n                                      \"  `sub/internal`\\n\" +\n                                      \"  `net/internal`\\n\" +\n                                      \")\");\n    myFixture.checkHighlighting();\n  }\n\n  public void testInternalPackageOn1_4_SDK() {\n    GoSdkService.setTestingSdkVersion(\"1.4\", getTestRootDisposable());\n    myFixture.addFileToProject(\"internal/internal.go\", \"package internalPackage; func InternalFunction() {}\");\n    myFixture.addFileToProject(\"sub/internal/internal.go\", \"package subInternalPackage; func InternalFunction() {}\");\n    myFixture.configureByText(\"a.go\", \"package src\\n\" +\n                                      \"import (\\n\" +\n                                      \"  `internal`\\n\" +\n                                      \"  `sub/internal`\\n\" +\n                                      \"  <error descr=\\\"Use of internal package is not allowed\\\">`net/internal`</error>\\n\" +\n                                      \")\");\n    myFixture.checkHighlighting();\n  }\n\n  public void testInternalPackageOn1_5_SDK() {\n    GoSdkService.setTestingSdkVersion(\"1.5\", getTestRootDisposable());\n    myFixture.addFileToProject(\"internal/internal.go\", \"package internalPackage; func InternalFunction() {}\");\n    myFixture.addFileToProject(\"sub/internal/internal.go\", \"package subInternalPackage; func InternalFunction() {}\");\n    myFixture.configureByText(\"a.go\", \"package src\\n\" +\n                                      \"import (\\n\" +\n                                      \"  `internal`\\n\" +\n                                      \"  <error descr=\\\"Use of internal package is not allowed\\\">`sub/internal`</error>\\n\" +\n                                      \"  <error descr=\\\"Use of internal package is not allowed\\\">`net/internal`</error>\\n\" +\n                                      \")\");\n    myFixture.checkHighlighting();\n  }\n\n  public void testImportPackageWithoutBuildableSource() {\n    PsiFile file = myFixture.addFileToProject(\"withSources/a.go\", \"package withSources\");\n    myFixture.addFileToProject(\"withIgnoredFiles/a.go\", \"package documentation\");\n    myFixture.addFileToProject(\"withIgnoredFiles/.b.go\", \"package withIgnoredFiles\");\n    myFixture.addFileToProject(\"withIgnoredFiles/_b.go\", \"package withIgnoredFiles\");\n    WriteCommandAction.runWriteCommandAction(myFixture.getProject(), () -> {\n      //noinspection ConstantConditions\n      file.getParent().getParent().createSubdirectory(\"withoutSources\");\n    });\n    myFixture.configureByText(\"a.go\", \"package pack\\n\" +\n                                      \"import `withSources`\\n\" +\n                                      \"import <error descr=\\\"'/src/withIgnoredFiles' has no buildable Go source files\\\">`withIgnoredFiles`</error>\\n\" +\n                                      \"import <error descr=\\\"'/src/withoutSources' has no buildable Go source files\\\">`withoutSources`</error>\\n\" +\n                                      \"import <error descr=\\\"'/src/withoutSources' has no buildable Go source files\\\">_ `without<caret>Sources`</error>\\n\" +\n                                      \"import `unresolved`\\n\");\n    myFixture.checkHighlighting();\n    applySingleQuickFix(GoDeleteImportQuickFix.QUICK_FIX_NAME);\n    myFixture.checkResult(\"package pack\\n\" +\n                          \"import `withSources`\\n\" +\n                          \"import `withIgnoredFiles`\\n\" +\n                          \"import `withoutSources`\\n\" +\n                          \"import `unresolved`\\n\");\n  }\n\n  public void testImportAbsolutePath() {\n    myFixture.configureByText(\"a.go\", \"package a; import <error descr=\\\"Cannot import absolute path\\\">`/f<caret>mt`</error>\");\n    myFixture.checkHighlighting();\n    assertEmpty(myFixture.filterAvailableIntentions(\"go get\"));\n    applySingleQuickFix(GoDeleteImportQuickFix.QUICK_FIX_NAME);\n    myFixture.checkResult(\"package a; \");\n  }\n\n  public void testImportTestDataDirectory() {\n    myFixture.addFileToProject(\"pack/testdata/pack/foo.go\", \"package test\");\n    myFixture.configureByText(\"a.go\", \"package a\\n\" +\n                                      \"import `pack/testdata/pack`\\n\" +\n                                      \"import <error descr=\\\"Use of testdata package from SDK is not allowed\\\">`doc/te<caret>stdata`</error>\");\n    myFixture.checkHighlighting();\n    applySingleQuickFix(GoDeleteImportQuickFix.QUICK_FIX_NAME);\n    myFixture.checkResult(\"package a\\nimport `pack/testdata/pack`\\n\");\n  }\n\n  public void testImportCWithAlias() {\n    myFixture.configureByText(\"a.go\", \n                              \"package t; import `C`; import <error descr=\\\"Cannot import 'builtin' package\\\">alias `<caret>C`</error>;\");\n    myFixture.checkHighlighting();\n    applySingleQuickFix(GoInvalidPackageImportInspection.DELETE_ALIAS_QUICK_FIX_NAME);\n    myFixture.checkResult(\"package t; import `C`; import `C`;\");\n  }\n\n  public void testImportCWithDot() {\n    myFixture.configureByText(\"a.go\", \"package t; import `C`; import <error descr=\\\"Cannot rename import `C`\\\">. `<caret>C`</error>;\");\n    myFixture.checkHighlighting();\n    applySingleQuickFix(GoInvalidPackageImportInspection.DELETE_ALIAS_QUICK_FIX_NAME);\n    myFixture.checkResult(\"package t; import `C`; import `C`;\");\n  }\n\n  private Collection<String> getIntentionNames() {\n    return ContainerUtil.map(myFixture.getAvailableIntentions(), IntentionAction::getText);\n  }\n\n}\n"
  },
  {
    "path": "tests/com/goide/inspections/GoReceiverNamesInspectionTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.GoCodeInsightFixtureTestCase;\n\npublic class GoReceiverNamesInspectionTest extends GoCodeInsightFixtureTestCase {\n\n  @Override\n  public void setUp() throws Exception {\n    super.setUp();\n    myFixture.enableInspections(GoReceiverNamesInspection.class);\n  }\n\n  public void testThis() {\n    doTest(\"func (<weak_warning descr=\\\"Receiver has generic name\\\">this<caret></weak_warning> MyType) asd() {}\");\n  }\n\n\n  public void testNoFix() {\n    doTest(\"func (myType<caret> MyType) asd() {}\");\n  }\n\n\n  private void doTest(String code) {\n    myFixture.configureByText(\"a.go\", \"package main; type MyType int; \" + code);\n    myFixture.checkHighlighting();\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/inspections/GoRedundantBlankArgInRangeInspectionTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.quickfix.GoQuickFixTestBase;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoRedundantBlankArgInRangeInspectionTest extends GoQuickFixTestBase {\n\n  @Override\n  public void setUp() throws Exception {\n    super.setUp();\n    myFixture.enableInspections(GoRedundantBlankArgInRangeInspection.class);\n  }\n\n  // Tests ranges\n  public void testRangeSimplifyWithOneBlankArg() {\n    doTest(GoRedundantBlankArgInRangeInspection.DELETE_BLANK_ARGUMENT_QUICK_FIX_NAME, true);\n  }\n\n  public void testRangeSimplifyWithOneArg() {\n    doTestNoFix(GoRedundantBlankArgInRangeInspection.DELETE_BLANK_ARGUMENT_QUICK_FIX_NAME, true);\n  }\n\n  public void testRangeSimplifyWithTwoBlankArgs() {\n    doTest(GoRedundantBlankArgInRangeInspection.DELETE_BLANK_ARGUMENT_QUICK_FIX_NAME, true);\n  }\n\n  public void testRangeSimplifyWithTwoArgs() {\n    doTestNoFix(GoRedundantBlankArgInRangeInspection.DELETE_BLANK_ARGUMENT_QUICK_FIX_NAME, true);\n  }\n\n  public void testRangeSimplifyWithOneBlankAndOneNotBlankArgs() {\n    doTestNoFix(GoRedundantBlankArgInRangeInspection.DELETE_BLANK_ARGUMENT_QUICK_FIX_NAME, true);\n  }\n\n  public void testRangeSimplifyWithOneNotBlankAndOneBlankArgs() {\n    doTest(GoRedundantBlankArgInRangeInspection.DELETE_BLANK_ARGUMENT_QUICK_FIX_NAME, true);\n  }\n\n  public void testRangeSimplifyWithVarAssign() {\n    doTest(GoRedundantBlankArgInRangeInspection.DELETE_BLANK_ARGUMENT_QUICK_FIX_NAME, true);\n  }\n\n  @NotNull\n  @Override\n  protected String getBasePath() {\n    return \"inspections/go-simplify\";\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/inspections/GoRedundantSecondIndexInSlicesInspectionTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.SdkAware;\nimport com.goide.quickfix.GoQuickFixTestBase;\nimport org.jetbrains.annotations.NotNull;\n\n@SdkAware\npublic class GoRedundantSecondIndexInSlicesInspectionTest extends GoQuickFixTestBase {\n  @Override\n  public void setUp() throws Exception {\n    super.setUp();\n    myFixture.enableInspections(GoRedundantSecondIndexInSlicesInspection.class);\n  }\n\n  public void testSlice() {\n    doTest(GoRedundantSecondIndexInSlicesInspection.DELETE_REDUNDANT_INDEX_QUICK_FIX_NAME, true);\n  }\n\n  public void testSliceWithLenAnotherArray() {\n    doTestNoFix(GoRedundantSecondIndexInSlicesInspection.DELETE_REDUNDANT_INDEX_QUICK_FIX_NAME, true);\n  }\n\n  public void testSliceWithOnlySecondIndex() {\n    doTest(GoRedundantSecondIndexInSlicesInspection.DELETE_REDUNDANT_INDEX_QUICK_FIX_NAME, true);\n  }\n\n  public void testSliceWithStructIndex() {\n    doTestNoFix(GoRedundantSecondIndexInSlicesInspection.DELETE_REDUNDANT_INDEX_QUICK_FIX_NAME, true);\n  }\n\n  public void testSliceWithThreeIndexes() {\n    doTestNoFix(GoRedundantSecondIndexInSlicesInspection.DELETE_REDUNDANT_INDEX_QUICK_FIX_NAME, true);\n  }\n\n  public void testSliceWithRedeclaredLen() {\n    doTestNoFix(GoRedundantSecondIndexInSlicesInspection.DELETE_REDUNDANT_INDEX_QUICK_FIX_NAME, true);\n  }\n\n  @NotNull\n  @Override\n  protected String getBasePath() {\n    return \"inspections/go-simplify\";\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/inspections/GoRedundantTypeDeclInCompositeLitTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.quickfix.GoQuickFixTestBase;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoRedundantTypeDeclInCompositeLitTest extends GoQuickFixTestBase {\n  @Override\n  public void setUp() throws Exception {\n    super.setUp();\n    myFixture.enableInspections(GoRedundantTypeDeclInCompositeLit.class);\n  }\n\n  @Override\n  protected boolean isWriteActionRequired() {\n    return false;\n  }\n\n  //Test Composite literals\n  public void testCompositeLitWithOneSimpleRedundantTypeDecl() {\n    doTest(GoRedundantTypeDeclInCompositeLit.DELETE_TYPE_DECLARATION_QUICK_FIX_NAME, true);\n  }\n\n  public void testCompositeLitWithKeysAndSimpleRedundantTypeDecl() {\n    doTest(GoRedundantTypeDeclInCompositeLit.DELETE_TYPE_DECLARATION_QUICK_FIX_NAME, true);\n  }\n\n  public void testCompositeLitWithInterface() {\n    doTestNoFix(GoRedundantTypeDeclInCompositeLit.DELETE_TYPE_DECLARATION_QUICK_FIX_NAME, true);\n  }\n\n  public void testCompositeLitWithArrays() {\n    doTest(GoRedundantTypeDeclInCompositeLit.DELETE_TYPE_DECLARATION_QUICK_FIX_NAME, true);\n  }\n\n  public void testCompositeLitWithArraysInBrackets() {\n    doTestNoFix(GoRedundantTypeDeclInCompositeLit.DELETE_TYPE_DECLARATION_QUICK_FIX_NAME, true);\n  }\n\n  public void testCompositeLitWithMap() {\n    doTest(GoRedundantTypeDeclInCompositeLit.DELETE_TYPE_DECLARATION_QUICK_FIX_NAME, true);\n  }\n\n  /*public void testCompositeLitWithInsertedArrays () {\n    doTest(GoRedundantTypeDeclInCompositeLit.DELETE_TYPE_DECLARATION_QUICK_FIX_NAME, true);\n  }\n\n  public void testCompositeLitWithStruct() {\n    doTest(GoRedundantTypeDeclInCompositeLit.DELETE_TYPE_DECLARATION_QUICK_FIX_NAME, true);\n  }\n\n  public void testCompositeLitWithMapOfStruct() {\n    doTest(GoRedundantTypeDeclInCompositeLit.DELETE_TYPE_DECLARATION_QUICK_FIX_NAME, true);\n  }\n\n  public void testCompositeLitWithTwoDimensionalArray() {\n    doTest(GoRedundantTypeDeclInCompositeLit.DELETE_TYPE_DECLARATION_QUICK_FIX_NAME, true);\n  }*/\n\n  //Test Composite literals with pointers *T == &T\n  public void testCompositeLitWithPointers() {\n    doTest(GoRedundantTypeDeclInCompositeLit.DELETE_TYPE_DECLARATION_QUICK_FIX_NAME, true);\n  }\n\n  public void testCompositeLitWithPointersNoFix() {\n    doTestNoFix(GoRedundantTypeDeclInCompositeLit.DELETE_TYPE_DECLARATION_QUICK_FIX_NAME, true);\n  }\n\n  /*public void testCompositeLitWithPointerAndStructAndInsertedElement() {\n    doTest(GoRedundantTypeDeclInCompositeLit.DELETE_TYPE_DECLARATION_QUICK_FIX_NAME, true);\n  }\n\n  public void testCompositeLitWithMapWithPointerAndStruct() {\n    doTest(GoRedundantTypeDeclInCompositeLit.DELETE_TYPE_DECLARATION_QUICK_FIX_NAME, true);\n  }*/\n\n  @NotNull\n  @Override\n  protected String getBasePath() {\n    return \"inspections/go-simplify\";\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/inspections/GoSelfImportInspectionTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.quickfix.GoDeleteImportQuickFix;\nimport com.goide.quickfix.GoQuickFixTestBase;\nimport com.intellij.psi.PsiFile;\n\npublic class GoSelfImportInspectionTest extends GoQuickFixTestBase {\n  @Override\n  public void setUp() throws Exception {\n    super.setUp();\n    myFixture.enableInspections(GoSelfImportInspection.class);\n  }\n\n  public void testRemoveSelfImport() {\n    PsiFile file = myFixture.addFileToProject(\"path/a.go\", \"package pack;\" +\n                                                           \"import <error descr=\\\"Self import is not allowed\\\"><caret>\\\"path\\\"</error>\");\n    myFixture.configureFromExistingVirtualFile(file.getVirtualFile());\n    myFixture.checkHighlighting();\n    applySingleQuickFix(GoDeleteImportQuickFix.QUICK_FIX_NAME);\n    myFixture.checkResult(\"package pack;\");\n  }\n\n  public void testRemoveRelativeSelfImport() {\n    myFixture.configureByText(\"a.go\", \"package pack;import <error descr=\\\"Self import is not allowed\\\"><caret>\\\".\\\"</error>\");\n    myFixture.checkHighlighting();\n    applySingleQuickFix(GoDeleteImportQuickFix.QUICK_FIX_NAME);\n    myFixture.checkResult(\"package pack;\");\n  }\n\n  public void testDoNotConsiderImportFromTestPackageAsSelfImport() {\n    PsiFile file = myFixture.addFileToProject(\"path/a_test.go\", \"package pack_test; import <caret>\\\"path\\\"\");\n    myFixture.configureFromExistingVirtualFile(file.getVirtualFile());\n    myFixture.checkHighlighting();\n  }\n\n  public void testVendoringSelfImport() {\n    PsiFile file = myFixture.addFileToProject(\"vendor/vendorPackage/a.go\", \"package vendorPackage;\" +\n                                                                           \"import <error descr=\\\"Self import is not allowed\\\"><caret>\\\"vendorPackage\\\"</error>\");\n    myFixture.configureFromExistingVirtualFile(file.getVirtualFile());\n    myFixture.checkHighlighting();\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/inspections/GoSpellcheckingTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.GoCodeInsightFixtureTestCase;\nimport com.intellij.spellchecker.inspections.SpellCheckingInspection;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoSpellcheckingTest extends GoCodeInsightFixtureTestCase {\n  @Override\n  public void setUp() throws Exception {\n    super.setUp();\n    myFixture.enableInspections(new SpellCheckingInspection());\n  }\n\n  public void testVariableName() throws Exception { doTest(); }\n  public void testFunctionName() throws Exception { doTest(); }\n  public void testSuppressed() throws Exception { doTest(); }\n\n  private void doTest() {\n    myFixture.testHighlighting(false, false, true, getTestName(true) + \".go\");\n  }\n\n  @NotNull\n  @Override\n  protected String getBasePath() {\n    return \"spellchecker\";\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/inspections/GoStructInitializationInspectionTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.SdkAware;\nimport com.goide.quickfix.GoQuickFixTestBase;\nimport org.jetbrains.annotations.NotNull;\n\n@SdkAware\npublic class GoStructInitializationInspectionTest extends GoQuickFixTestBase {\n  private GoStructInitializationInspection myInspectionTool = new GoStructInitializationInspection();\n  private boolean myDefaultReportLocalStructs;\n\n  @Override\n  public void setUp() throws Exception {\n    super.setUp();\n    myFixture.enableInspections(myInspectionTool);\n    myDefaultReportLocalStructs = myInspectionTool.reportLocalStructs;\n  }\n\n  @Override\n  protected void tearDown() throws Exception {\n    myInspectionTool.reportLocalStructs = myDefaultReportLocalStructs;\n    super.tearDown();\n  }\n\n  public void testUninitializedStructWithLocal() {\n    doTest(true);\n  }\n\n  public void testUninitializedStructImportedOnly() {\n    doTest(false);\n  }\n\n  public void testQuickFix() {\n    doTest(GoStructInitializationInspection.REPLACE_WITH_NAMED_STRUCT_FIELD_FIX_NAME, true);\n  }\n\n  private long doTest(boolean allowLocalStructs) {\n    myInspectionTool.reportLocalStructs = allowLocalStructs;\n    return myFixture.testHighlighting(true, false, true, getTestName(true) + \".go\");\n  }\n\n  @NotNull\n  @Override\n  protected String getBasePath() {\n    return \"inspections/go-struct-initialization\";\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/inspections/GoTestSignaturesInspectionTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.SdkAware;\nimport com.goide.quickfix.GoQuickFixTestBase;\nimport org.jetbrains.annotations.NotNull;\n\n@SdkAware\npublic class GoTestSignaturesInspectionTest extends GoQuickFixTestBase {\n  @Override\n  protected void setUp() throws Exception {\n    super.setUp();\n    myFixture.enableInspections(GoTestSignaturesInspection.class);\n  }\n\n  @NotNull\n  @Override\n  protected String getBasePath() {\n    return \"inspections/test-signatures\";\n  }\n\n  private void doTest() {\n    String testName = getTestName(true);\n    myFixture.configureByFile(testName + \"_test.go\");\n    myFixture.checkHighlighting();\n    applySingleQuickFix(\"Fix signature\");\n    myFixture.checkResultByFile(testName + \"_test-after.go\");\n  }\n\n  public void testExampleNonEmptySignature()  { doTest(); }\n  public void testTestNoTestingImport()       { doTest(); }\n  public void testTestWrongTestingAlias()     { doTest(); }\n  public void testTestLocalTestingImport()    { doTest(); }\n  public void testTestMain()                  { doTest(); }\n  public void testBenchmark()                 { doTest(); }\n  public void testExampleWithReturnValue()    { doTest(); }\n  public void testTestWithReturnValue()       { doTest(); }\n}\n"
  },
  {
    "path": "tests/com/goide/inspections/GoUnusedLabelInspectionTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections;\n\nimport com.goide.inspections.unresolved.GoUnusedLabelInspection;\nimport com.goide.quickfix.GoQuickFixTestBase;\nimport com.goide.quickfix.GoRenameToBlankQuickFix;\n\npublic class GoUnusedLabelInspectionTest extends GoQuickFixTestBase {\n  @Override\n  public void setUp() throws Exception {\n    super.setUp();\n    myFixture.enableInspections(GoUnusedLabelInspection.class);\n  }\n  \n  public void testSimple() {\n    myFixture.testHighlighting(getTestName(true) + \".go\");\n  }\n  \n  public void testDeleteLabelFix() {\n    doTest(\"Delete label 'UnusedLabel'\", true);\n  }\n  \n  public void testRenameToBlankFix() {\n    doTest(GoRenameToBlankQuickFix.NAME, true);\n  }\n\n  @Override\n  protected String getBasePath() {\n    return \"inspections/unused-label\";\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/inspections/suppression/GoSuppressionFixTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.inspections.suppression;\n\nimport com.goide.inspections.GoMultiplePackagesInspection;\nimport com.goide.inspections.GoUnusedImportInspection;\nimport com.goide.inspections.unresolved.GoUnresolvedReferenceInspection;\nimport com.goide.inspections.unresolved.GoUnusedGlobalVariableInspection;\nimport com.goide.inspections.unresolved.GoUnusedVariableInspection;\nimport com.goide.quickfix.GoQuickFixTestBase;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoSuppressionFixTest extends GoQuickFixTestBase {\n  @Override\n  protected void setUp() throws Exception {\n    super.setUp();\n    myFixture.enableInspections(GoUnusedImportInspection.class);\n    myFixture.enableInspections(GoUnresolvedReferenceInspection.class);\n    myFixture.enableInspections(GoUnusedGlobalVariableInspection.class);\n    myFixture.enableInspections(GoUnusedVariableInspection.class);\n    myFixture.enableInspections(GoMultiplePackagesInspection.class);\n  }\n\n  public void testImportStatement() {\n    doTest(\"Suppress for import\");\n  }\n\n  public void testFirstImportStatement() {\n    doTest(\"Suppress for import\");\n  }\n\n  public void testFunctionSuppressionFix() {\n    doTest(\"Suppress for function\");\n  }\n\n  public void testFunctionSuppressionFixWithExistingComment() {\n    doTest(\"Suppress for function\");\n  }\n\n  public void testStatementSuppressionFix() {\n    doTest(\"Suppress for statement\");\n  }\n\n  public void testStatementSuppressionFixWithExistingComment() {\n    doTest(\"Suppress for statement\");\n  }\n\n  public void testSwitchCaseSuppressionFix() {\n    doTest(\"Suppress all inspections for case\");\n  }\n\n  public void testSwitchCaseSuppressionFixWithExistingComment() {\n    doTest(\"Suppress all inspections for case\");\n  }\n\n  public void testSelectCaseSuppressionFix() {\n    doTest(\"Suppress all inspections for case\");\n  }\n\n  public void testSelectCaseSuppressionFixWithExistingComment() {\n    doTest(\"Suppress all inspections for case\");\n  }\n\n  public void testVariableDeclarationSuppressionFix() {\n    doTest(\"Suppress for variable\");\n  }\n\n  public void testVariableDeclarationSuppressionFixWithExistingComment() {\n    doTest(\"Suppress for variable\");\n  }\n\n  public void testFunctionAllSuppressionFix() {\n    doTest(\"Suppress all inspections for function\");\n  }\n\n  public void testFunctionAllSuppressionFixWithExistingComment() {\n    doTest(\"Suppress all inspections for function\");\n  }\n\n  public void testStatementAllSuppressionFix() {\n    doTest(\"Suppress all inspections for statement\");\n  }\n\n  public void testStatementAllSuppressionFixWithExistingComment() {\n    doTest(\"Suppress all inspections for statement\");\n  }\n\n  public void testSwitchCaseAllSuppressionFix() {\n    doTest(\"Suppress all inspections for case\");\n  }\n\n  public void testSwitchCaseAllSuppressionFixWithExistingComment() {\n    doTest(\"Suppress all inspections for case\");\n  }\n\n  public void testSelectCaseAllSuppressionFix() {\n    doTest(\"Suppress all inspections for case\");\n  }\n\n  public void testSelectCaseAllSuppressionFixWithExistingComment() {\n    doTest(\"Suppress all inspections for case\");\n  }\n\n  public void testVariableDeclarationAllSuppressionFix() {\n    doTest(\"Suppress all inspections for variable\");\n  }\n\n  public void testVariableDeclarationAllSuppressionFixWithExistingComment() {\n    doTest(\"Suppress all inspections for variable\");\n  }\n\n  public void testInnerVariableDeclarationSuppressionFix() {\n    doTestNoFix(\"Suppress for variable\");\n  }\n\n  public void testInnerVariableDeclarationSuppressionFix2() {\n    doTest(\"Suppress for statement\");\n  }\n\n  public void testInnerVariableDeclarationSuppressionFix3() {\n    doTest(\"Suppress for function\");\n  }\n\n  public void testCommClauseStatementSuppressionFix() {\n    doTest(\"Suppress all inspections for statement\");\n  }\n\n  public void testPackageClause() {\n    myFixture.configureByText(\"a.go\", \"package somePackage\");\n    doTest(\"Suppress for package statement\");\n  }\n\n  public void testPackageClauseSuppressAll() {\n    myFixture.configureByText(\"a.go\", \"package somePackage\");\n    doTest(\"Suppress all inspections for package statement\");\n  }\n\n  public void testSuppressedNestedSelect() {\n    myFixture.testHighlighting(getTestName(true) + \".go\");\n  }\n\n  @NotNull\n  @Override\n  protected String getBasePath() {\n    return \"inspections/suppression/fix\";\n  }\n\n  @Override\n  protected void doTest(@NotNull String quickFixName) {\n    super.doTest(quickFixName);\n    myFixture.testHighlighting(String.format(\"%s-after-highlighting.go\", getTestName(true)));\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/intentions/GoAddFunctionBlockIntentionTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.intentions;\n\nimport com.goide.quickfix.GoQuickFixTestBase;\n\npublic class GoAddFunctionBlockIntentionTest extends GoQuickFixTestBase {\n  public void testSimple() {\n    doTest(GoAddFunctionBlockIntention.NAME, true);\n  }\n\n  @Override\n  protected String getBasePath() {\n    return \"intentions/add-missing-body\";\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/lexer/GoLexerTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.lexer;\n\nimport com.intellij.lexer.Lexer;\nimport com.intellij.openapi.util.io.FileUtil;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.openapi.vfs.CharsetToolkit;\nimport com.intellij.testFramework.LexerTestCase;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.io.File;\nimport java.io.IOException;\n\npublic class GoLexerTest extends LexerTestCase {\n  private static final String PATH = \"testData/lexer\";\n\n  public void testBasicTypes()        { doTest(); }\n  public void testConstants()         { doTest(); }\n  public void testFor()               { doTest(); }\n  public void testFunctionArguments() { doTest(); }\n  public void testHelloWorld()        { doTest(); }\n  public void testIf()                { doTest(); }\n  public void testImports()           { doTest(); }\n  public void testMultipleResult()    { doTest(); }\n  public void testNamedResult()       { doTest(); }\n  public void testPointers()          { doTest(); }\n  public void testRangeFor()          { doTest(); }\n  public void testSlices()            { doTest(); }\n  public void testStructs()           { doTest(); }\n  public void testVariables()         { doTest(); }\n  public void testEscapedQuote()      { doTest(); }\n  public void testUtf16()             { doTest(); }\n  public void testCouldNotMatch()     { doTest(); }\n\n  private void doTest() {\n    try {\n      String text = FileUtil.loadFile(new File(\"./\" + PATH + \"/\" + getTestName(true) + \".go\"), CharsetToolkit.UTF8);\n      String actual = printTokens(StringUtil.convertLineSeparators(text.trim()), 0);\n      assertSameLinesWithFile(new File(PATH + \"/\" + getTestName(true) + \".txt\").getAbsolutePath(), actual);\n    } catch (IOException e) {\n      throw new RuntimeException(e);\n    }\n  }\n\n  @NotNull\n  @Override\n  protected Lexer createLexer() { return new GoLexer(); }\n\n  @NotNull\n  @Override\n  protected String getDirPath() { \n    return \"../\" + PATH; \n  }\n}\n"
  },
  {
    "path": "tests/com/goide/marker/GoRecursiveMethodCallMarkerInfoTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.marker;\n\nimport com.goide.GoCodeInsightFixtureTestCase;\nimport com.intellij.codeInsight.daemon.GutterMark;\nimport com.intellij.icons.AllIcons;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.List;\n\npublic class GoRecursiveMethodCallMarkerInfoTest extends GoCodeInsightFixtureTestCase {\n  public void testRecursive() { doTest(); }\n  public void testGo()        { doTest(); }\n\n  @NotNull\n  @Override\n  protected String getBasePath() {\n    return \"marker\";\n  }\n\n  private void doTest() {\n    myFixture.configureByFile(getTestName(false) + \".go\");\n    List<String> textList = ContainerUtil.newArrayList();\n    for (GutterMark gutter : myFixture.findGuttersAtCaret()) {\n      String text = gutter.getTooltipText();\n      textList.add(text);\n      if (\"Recursive call\".equals(text) && AllIcons.Gutter.RecursiveMethod.equals(gutter.getIcon())) return;\n    }\n    fail(\"Not found gutter mark: \" + \"Recursive call\" + \" \" + AllIcons.Gutter.RecursiveMethod + \"\\nin\\n\" + StringUtil.join(textList, \"\\n\"));\n  }\n}"
  },
  {
    "path": "tests/com/goide/parser/GoParseAndConsumeTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.parser;\n\nimport com.goide.GoParserDefinition;\nimport com.intellij.util.indexing.IndexingDataKeys;\n\npublic class GoParseAndConsumeTest extends GoParserTestBase {\n  public GoParseAndConsumeTest()                 { super(\"parser\", \"go\", new GoParserDefinition()); }\n\n  public void testTypeInBlock() throws Exception { doTest(); }\n\n  protected void doTest() throws Exception {\n    String name = getTestName();\n    String text = loadFile(name + \".\" + myFileExt);\n    myFile = createPsiFile(name, text);\n    myFile.putUserData(IndexingDataKeys.VIRTUAL_FILE, myFile.getVirtualFile());\n    ensureParsed(myFile);\n    checkResult(name, myFile);\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/parser/GoParserTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.parser;\n\nimport com.goide.GoParserDefinition;\n\npublic class GoParserTest extends GoParserTestBase {\n  public GoParserTest() {\n    super(\"parser\", \"go\", new GoParserDefinition());\n  }\n\n  public void testError()                           { doTest(true);  }\n  public void testWriter()                          { doTest(true);  }\n  public void testPrimer()                          { doTest(true);  }\n  public void testTypes()                           { doTest(true);  }\n  public void testStr2Num()                         { doTest(true);  }\n  public void testCars()                            { doTest(true);  }\n  public void testIfWithNew()                       { doTest(true);  }\n  public void testRanges()                          { doTest(true);  }\n  public void testIncompleteRanges()                { doTest(false); }\n  public void testTorture()                         { doTest(true);  }\n  public void testLiteralValues()                   { doTest(true);  }\n  public void testLiteralValuesElse()               { doTest(true);  }\n  public void testIfComposite()                     { doTest(true);  }\n  public void testArrayTypes()                      { doTest(true);  }\n  public void testArrayTypesInRanges()              { doTest(true);  }\n  public void testIf()                              { doTest(false); }\n  public void testSimple()                          { doTest(false); }\n  public void testRecover()                         { doTest(false); }\n  public void testRecover2()                        { doTest(false); }\n  public void testRecover3()                        { doTest(false); }\n  public void testMethodExpr()                      { doTest(false); }\n  public void testLabels()                          { doTest(false); }\n  public void testBlockRecover()                    { doTest(false); }\n  public void testMethodWithoutReceiverIdentifier() { doTest(false); }\n  public void testExpressionPerformance()           { doTest(false); }\n  public void testElementRecover()                  { doTest(false); }\n  public void testChanRecover()                     { doTest(false); }\n  public void testMapLiteralRecover()               { doTest(false); }\n  public void testPlusPlusRecover()                 { doTest(false); }\n  public void testTypeComma()                       { doTest(false); }\n  public void testIncDec()                          { doTest(false); }\n  public void testIncompleteTypeDeclaration()       { doTest(false); } \n  public void testIncompleteVarDeclaration()        { doTest(false); } \n}\n"
  },
  {
    "path": "tests/com/goide/parser/GoParserTestBase.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.parser;\n\nimport com.intellij.core.CoreApplicationEnvironment;\nimport com.intellij.lang.LanguageExtensionPoint;\nimport com.intellij.lang.ParserDefinition;\nimport com.intellij.openapi.extensions.Extensions;\nimport com.intellij.testFramework.ParsingTestCase;\nimport org.jetbrains.annotations.NotNull;\n\npublic abstract class GoParserTestBase extends ParsingTestCase {\n  public GoParserTestBase(String dataPath, String fileExt, ParserDefinition... definitions) {super(dataPath, fileExt, definitions);}\n\n  @NotNull\n  @Override\n  protected String getTestDataPath() {\n    return \"testData\";\n  }\n\n  @Override\n  protected boolean skipSpaces() {\n    return true;\n  }\n\n  @Override\n  protected void doTest(boolean checkErrors) {\n    super.doTest(true);\n    if (checkErrors) {\n      assertFalse(\n        \"PsiFile contains error elements\",\n        toParseTreeText(myFile, skipSpaces(), includeRanges()).contains(\"PsiErrorElement\")\n      );\n    }\n  }\n\n  @Override\n  protected void setUp() throws Exception {\n    super.setUp();\n    CoreApplicationEnvironment.registerExtensionPoint(\n      Extensions.getRootArea(), \"com.intellij.lang.braceMatcher\", LanguageExtensionPoint.class);\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/psi/GoFileTest.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi;\n\nimport com.goide.GoCodeInsightFixtureTestCase;\n\npublic class GoFileTest extends GoCodeInsightFixtureTestCase {\n  public void testRetrieveBuildFlags() {\n    myFixture.configureByText(\"a.go\", \"// Copyright 2009 The Go Authors.  All rights reserved.\\n\" +\n                                      \"// Use of this source code is governed by a BSD-style\\n\" +\n                                      \"// license that can be found in the LICENSE file.\\n\" +\n                                      \"\\n\" +\n                                      \"// +build darwin dragonfly\\n\" +\n                                      \"\\n\" +\n                                      \"package net\\n\");\n    assertEquals(\"darwin dragonfly\", ((GoFile)myFixture.getFile()).getBuildFlags());\n  }\n\n  public void testRetrieveMultipleBuildFlags() {\n    myFixture.configureByText(\"a.go\", \"// +build openbsd windows\\n\" +\n                                      \"// +build linux\\n\" +\n                                      \"\\n\" +\n                                      \"package net\\n\");\n    assertEquals(\"openbsd windows|linux\", ((GoFile)myFixture.getFile()).getBuildFlags());\n  }\n\n  public void testRetrieveBuildFlagsWithoutNewLineAfter() {\n    myFixture.configureByText(\"a.go\", \"// Copyright 2009 The Go Authors.  All rights reserved.\\n\" +\n                                      \"// Use of this source code is governed by a BSD-style\\n\" +\n                                      \"// license that can be found in the LICENSE file.\\n\" +\n                                      \"\\n\" +\n                                      \"// +build freebsd linux\\n\" +\n                                      \"package net\\n\");\n    assertNull(((GoFile)myFixture.getFile()).getBuildFlags());\n  }\n\n  public void testPackageNameOfTestFile() {\n    myFixture.configureByText(\"foo_test.go\", \"package foo_test\");\n    assertEquals(\"foo_test\", ((GoFile)myFixture.getFile()).getPackageName());\n  }\n\n  public void testPackageNameOfNonTestPackageInTestFile() {\n    myFixture.configureByText(\"foo_test.go\", \"package fooa\");\n    assertEquals(\"fooa\",((GoFile)myFixture.getFile()).getPackageName());\n  }\n\n  public void testPackageNameOfTestPackageInNonTestFile() {\n    myFixture.configureByText(\"foo.go\", \"package foo_test\");\n    assertEquals(\"foo_test\", ((GoFile)myFixture.getFile()).getPackageName());\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/psi/GoImportListTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi;\n\nimport com.goide.GoCodeInsightFixtureTestCase;\nimport com.intellij.openapi.command.WriteCommandAction;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoImportListTest extends GoCodeInsightFixtureTestCase {\n  public void testAddImportToEmptyList()                                { doAddImportTest(); }\n  public void testAddImportToListWithMultiSpecDeclaration()             { doAddImportTest(); }\n  public void testAddImportToListWithSingleSpecDeclaration()            { doAddImportTest(); }\n  public void testAddImportToListWithSingleSpecDeclarationWithParens()  { doAddImportTest(); }\n  public void testAddImportToEmptyListBeforeFunction()                  { doAddImportTest(); }\n  public void testAddImportBeforeFunction()                             { doAddImportTest(); }\n  public void testDoNotModifyCImport_1()                                { doAddImportTest(); }\n  public void testDoNotModifyCImport_2()                                { doAddImportTest(); }\n  public void testInvalidImport()                                       { doAddImportTest(); }\n  public void testInvalidImport2()                                      { doAddImportTest(); }\n  \n  private void doAddImportTest() {\n    myFixture.configureByFile(getTestName(true) + \".go\");\n    WriteCommandAction.runWriteCommandAction(myFixture.getProject(), () -> {\n      ((GoFile)myFixture.getFile()).addImport(\"package/path\", null);\n    });\n    myFixture.checkResultByFile(getTestName(true) + \"_after.go\");\n  }\n\n  @NotNull\n  @Override\n  protected String getBasePath() {\n    return \"psi/importDeclaration\";\n  }\n}"
  },
  {
    "path": "tests/com/goide/psi/GoReadWriteAccessTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi;\n\nimport com.goide.GoCodeInsightFixtureTestCase;\nimport com.intellij.codeInsight.highlighting.ReadWriteAccessDetector;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport org.jetbrains.annotations.NotNull;\n\nimport static com.intellij.codeInsight.highlighting.ReadWriteAccessDetector.Access.*;\n\npublic class GoReadWriteAccessTest extends GoCodeInsightFixtureTestCase {\n  public void testAssignment() {\n    doTest(\"fo<caret>o = 1\", Write);\n  }\n\n  public void testSimpleStatement() {\n    doTest(\"fo<caret>o\", Read);\n  }\n\n  public void testIncDec() {\n    doTest(\"fo<caret>o++\", Write);\n  }\n\n  public void testPlusAssign() {\n    doTest(\"fo<caret>o += 1\", ReadWrite);\n  }\n\n  public void testParenthesisExpression() {\n    doTest(\"(fo<caret>o) = 2\", Write);\n  }\n\n  public void testPointer() {\n    doTest(\"(*fo<caret>o) = 2\", Write);\n  }\n\n  public void testLeftPartOfSelectorExpressionInAssignment() {\n    doTest(\"foo.b<caret>ar.baz = 1\", Read);\n  }\n\n  public void testLeftPartOfSelectorExpressionInAssignment_1() {\n    doTest(\"f<caret>oo.bar.baz = 1\", Read);\n  }\n\n  public void testRightPartOfSelectorExpressionInAssignment() {\n    doTest(\"foo.bar.ba<caret>z = 1\", Write);\n  }\n\n  public void testRangeLeftExpression() {\n    doTest(\"for fo<caret>o = range bar {\\n}\", Write);\n  }\n\n  public void testRangeLeftExpression_1() {\n    doTest(\"for (*fo<caret>o) = range bar {\\n}\", Write);\n  }\n\n  public void testRangeRightExpression() {\n    doTest(\"for foo = range ba<caret>r {\\n}\", Read);\n  }\n\n  public void testRangeRightExpression_1() {\n    doTest(\"for foo := range ba<caret>r {\\n}\", Read);\n  }\n\n  public void testRangeRightExpression_2() {\n    doTest(\"for foo = range (*ba<caret>r) {\\n}\", Read);\n  }\n\n  public void testSendRead() {\n    doTest(\"a := <- cha<caret>nnel\", Read);\n  }\n\n  public void testSendWrite() {\n    doTest(\"chan<caret>nel <- a\", Write);\n  }\n\n  public void testCallExpression() {\n    doTest(\"fmt.Print<caret>ln(a)\", Read);\n  }\n\n  public void testRecvStatementWrite() {\n    doTest(\"select {\\n\\tcase fo<caret>o = bar:\\n}\", Write);\n  }\n\n  public void testRecvStatementRead() {\n    doTest(\"select {\\n\\tcase foo = b<caret>ar:\\n}\", Read);\n  }\n\n  public void testSendStatementInCaseWrite() {\n    doTest(\"select {\\n\\tcase (*fo<caret>o) <- bar:\\n}\", ReadWrite);\n  }\n\n  public void testSendStatementInCaseRead() {\n    doTest(\"select {\\n\\tcase foo <- (*b<caret>ar):\\n}\", Read);\n  }\n\n  public void testFieldInInitializer() {\n    myFixture.configureByText(\"a.go\", \"package main\\n\" +\n                                      \"type aStruct struct {\\n\" +\n                                      \"\\taField string\\n\" +\n                                      \"}\\n\" +\n                                      \"func newStruct() aStruct {\\n\" +\n                                      \"\\treturn aStruct{\\n\" +\n                                      \"\\t\\taFie<caret>ld: \\\"a value\\\",\\n\" +\n                                      \"\\t}\\n\" +\n                                      \"}\");\n    PsiElement element = myFixture.getFile().findElementAt(myFixture.getCaretOffset());\n    GoFieldName goFieldName = PsiTreeUtil.getNonStrictParentOfType(element, GoFieldName.class);\n    assertNotNull(goFieldName);\n    //noinspection ConstantConditions\n    assertEquals(Write, ReadWriteAccessDetector.findDetector(goFieldName.getReference().resolve()).getExpressionAccess(goFieldName));\n  }\n\n  private void doTest(@NotNull String expressionText, @NotNull ReadWriteAccessDetector.Access expectedAccess) {\n    myFixture.configureByText(\"a.go\", \"package main; func _() {\\n\" + expressionText + \"\\n}\");\n    PsiElement element = myFixture.getFile().findElementAt(myFixture.getCaretOffset());\n    GoReferenceExpression expression = PsiTreeUtil.getNonStrictParentOfType(element, GoReferenceExpression.class);\n    assertNotNull(expression);\n    assertEquals(expectedAccess, expression.getReadWriteAccess());\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/psi/impl/GoNamedElementTest.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi.impl;\n\nimport com.goide.GoCodeInsightFixtureTestCase;\nimport com.goide.psi.GoVarDefinition;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.search.GlobalSearchScope;\nimport com.intellij.psi.search.LocalSearchScope;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoNamedElementTest extends GoCodeInsightFixtureTestCase{\n  private <T> void doTestGetUseScope(@NotNull String text, @NotNull Class<T> scope) {\n    myFixture.configureByText(\"a.go\", text);\n    PsiFile file = myFixture.getFile();\n    GoVarDefinition var = PsiTreeUtil.findChildOfType(file, GoVarDefinition.class);\n    assertNotNull(var);\n    assertTrue(scope.isInstance(var.getUseScope()));\n  }\n\n  public void testGlobalVarScope() {\n    doTestGetUseScope(\"package a; var b = 1\", GlobalSearchScope.class);\n  }\n\n  public void testLocalVarScope() {\n    doTestGetUseScope(\"package a; func a() {\\n var b = 1 }\", LocalSearchScope.class);\n  }\n\n}\n"
  },
  {
    "path": "tests/com/goide/psi/impl/GoPsiImplUtilTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi.impl;\n\nimport com.goide.GoCodeInsightFixtureTestCase;\nimport com.goide.psi.*;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.util.PsiTreeUtil;\n\npublic class GoPsiImplUtilTest extends GoCodeInsightFixtureTestCase {\n  public void testGetLocalPackageNameDash() {\n    assertEquals(\"test_directory\", GoPsiImplUtil.getLocalPackageName(\"test-directory\"));\n  }\n\n  public void testGetLocalPackageNameDigitAtBeginning() {\n    assertEquals(\"_23abc\", GoPsiImplUtil.getLocalPackageName(\"123abc\"));\n  }\n\n  public void testGetLocalPackageNameUnderscore() {\n    assertEquals(\"_\", GoPsiImplUtil.getLocalPackageName(\"_\"));\n  }\n  \n  public void testGetLocalPackageNameForPath() {\n    assertEquals(\"test_directory\", GoPsiImplUtil.getLocalPackageName(\"path/test-directory\"));\n  }\n\n  public void testAddVarSpec() {\n    myFixture.configureByText(\"a.go\", \"package main\\n\\nvar (\\n\" +\n                                      \"  fo<caret>o int\\n\" +\n                                      \")\");\n    GoVarDeclaration declaration = PsiTreeUtil.getNonStrictParentOfType(myFixture.getElementAtCaret(), GoVarDeclaration.class);\n    assertNotNull(declaration);\n    declaration.addSpec(\"bar\", \"string\", \"`1`\", null);\n    myFixture.checkResult(\"package main\\n\\nvar (\\n  foo int\\nbar string = `1`\\n)\");\n  }\n\n  public void testAddVarSpecWithoutParens() {\n    myFixture.configureByText(\"a.go\", \"package main\\n\\nvar fo<caret>o int\\n\");\n    GoVarDeclaration declaration = PsiTreeUtil.getNonStrictParentOfType(myFixture.getElementAtCaret(), GoVarDeclaration.class);\n    assertNotNull(declaration);\n    declaration.addSpec(\"bar\", \"string\", \"`1`\", null);\n    myFixture.checkResult(\"package main\\n\\nvar (foo int\\nbar string = `1`\\n)\\n\");\n  }\n\n  public void testAddVarSpecNoNewLines() {\n    myFixture.configureByText(\"a.go\", \"package main\\n\\nvar (fo<caret>o int\\n)\");\n    GoVarDeclaration declaration = PsiTreeUtil.getNonStrictParentOfType(myFixture.getElementAtCaret(), GoVarDeclaration.class);\n    assertNotNull(declaration);\n    declaration.addSpec(\"bar\", \"string\", \"`1`\", null);\n    myFixture.checkResult(\"package main\\n\\nvar (foo int\\nbar string = `1`\\n)\");\n  }\n\n  public void testAddVarSpecWithAnchor() {\n    myFixture.configureByText(\"a.go\", \"package main\\n\\nvar (\\n\" +\n                                      \"  fo<caret>o int\\n\" +\n                                      \")\");\n    GoVarSpec spec = PsiTreeUtil.getNonStrictParentOfType(myFixture.getElementAtCaret(), GoVarSpec.class);\n    assertNotNull(spec);\n    GoVarDeclaration declaration = (GoVarDeclaration)spec.getParent();\n    declaration.addSpec(\"bar\", \"string\", \"`1`\", spec);\n    myFixture.checkResult(\"package main\\n\\nvar (\\n  bar string = `1`\\nfoo int\\n)\");\n  }\n\n  public void testAddVarSpecWithoutParensWithAnchor() {\n    myFixture.configureByText(\"a.go\", \"package main\\n\\nvar fo<caret>o int\\n\");\n    GoVarSpec spec = PsiTreeUtil.getNonStrictParentOfType(myFixture.getElementAtCaret(), GoVarSpec.class);\n    assertNotNull(spec);\n    GoVarDeclaration declaration = (GoVarDeclaration)spec.getParent();\n    declaration.addSpec(\"bar\", \"string\", \"`1`\", spec);\n    myFixture.checkResult(\"package main\\n\\nvar (\\nbar string = `1`\\nfoo int)\\n\");\n  }\n\n  public void testAddVarSpecNoNewLinesWithAnchor() {\n    myFixture.configureByText(\"a.go\", \"package main\\n\\nvar (fo<caret>o int\\n)\");\n    GoVarSpec spec = PsiTreeUtil.getNonStrictParentOfType(myFixture.getElementAtCaret(), GoVarSpec.class);\n    assertNotNull(spec);\n    GoVarDeclaration declaration = (GoVarDeclaration)spec.getParent();\n    declaration.addSpec(\"bar\", \"string\", \"`1`\", spec);\n    myFixture.checkResult(\"package main\\n\\nvar (\\nbar string = `1`\\nfoo int\\n)\");\n  }\n\n  public void testAddConstSpec() {\n    myFixture.configureByText(\"a.go\", \"package main\\n\\nconst (\\n\" +\n                                      \"  fo<caret>o int\\n\" +\n                                      \")\");\n    GoConstDeclaration declaration = PsiTreeUtil.getNonStrictParentOfType(myFixture.getElementAtCaret(), GoConstDeclaration.class);\n    assertNotNull(declaration);\n    declaration.addSpec(\"bar\", \"string\", \"`1`\", null);\n    myFixture.checkResult(\"package main\\n\\nconst (\\n  foo int\\nbar string = `1`\\n)\");\n  }\n\n  public void testAddConstSpecWithoutParens() {\n    myFixture.configureByText(\"a.go\", \"package main\\n\\nconst fo<caret>o int\\n\");\n    GoConstDeclaration declaration = PsiTreeUtil.getNonStrictParentOfType(myFixture.getElementAtCaret(), GoConstDeclaration.class);\n    assertNotNull(declaration);\n    declaration.addSpec(\"bar\", \"string\", \"`1`\", null);\n    myFixture.checkResult(\"package main\\n\\nconst (foo int\\nbar string = `1`\\n)\\n\");\n  }\n\n  public void testAddConstSpecNoNewLines() {\n    myFixture.configureByText(\"a.go\", \"package main\\n\\nconst (fo<caret>o int\\n)\");\n    GoConstDeclaration declaration = PsiTreeUtil.getNonStrictParentOfType(myFixture.getElementAtCaret(), GoConstDeclaration.class);\n    assertNotNull(declaration);\n    declaration.addSpec(\"bar\", \"string\", \"`1`\", null);\n    myFixture.checkResult(\"package main\\n\\nconst (foo int\\nbar string = `1`\\n)\");\n  }\n\n  public void testAddConstSpecWithAnchor() {\n    myFixture.configureByText(\"a.go\", \"package main\\n\\nconst (\\n\" +\n                                      \"  fo<caret>o int\\n\" +\n                                      \")\");\n    GoConstSpec spec = PsiTreeUtil.getNonStrictParentOfType(myFixture.getElementAtCaret(), GoConstSpec.class);\n    assertNotNull(spec);\n    GoConstDeclaration declaration = (GoConstDeclaration)spec.getParent();\n    declaration.addSpec(\"bar\", \"string\", \"`1`\", spec);\n    myFixture.checkResult(\"package main\\n\\nconst (\\n  bar string = `1`\\nfoo int\\n)\");\n  }\n\n  public void testAddConstSpecWithoutParensWithAnchor() {\n    myFixture.configureByText(\"a.go\", \"package main\\n\\nconst fo<caret>o int\\n\");\n    GoConstSpec spec = PsiTreeUtil.getNonStrictParentOfType(myFixture.getElementAtCaret(), GoConstSpec.class);\n    assertNotNull(spec);\n    GoConstDeclaration declaration = (GoConstDeclaration)spec.getParent();\n    declaration.addSpec(\"bar\", \"string\", \"`1`\", spec);\n    myFixture.checkResult(\"package main\\n\\nconst (\\nbar string = `1`\\nfoo int)\\n\");\n  }\n\n  public void testAddConstSpecNoNewLinesWithAnchor() {\n    myFixture.configureByText(\"a.go\", \"package main\\n\\nconst (fo<caret>o int\\n)\");\n    GoConstSpec spec = PsiTreeUtil.getNonStrictParentOfType(myFixture.getElementAtCaret(), GoConstSpec.class);\n    assertNotNull(spec);\n    GoConstDeclaration declaration = (GoConstDeclaration)spec.getParent();\n    declaration.addSpec(\"bar\", \"string\", \"`1`\", spec);\n    myFixture.checkResult(\"package main\\n\\nconst (\\nbar string = `1`\\nfoo int\\n)\");\n  }\n\n  public void testGetTypeOfSingleVarDefinition() {\n    myFixture.configureByText(\"a.go\", \"package main\\n\\n var f<caret>oo int\");\n    GoVarDefinition definition = PsiTreeUtil.getNonStrictParentOfType(myFixture.getElementAtCaret(), GoVarDefinition.class);\n    assertNotNull(definition);                      \n    GoType type = definition.findSiblingType();\n    assertNotNull(type);\n    assertEquals(\"int\", type.getText());\n  }\n\n  public void testGetTypeOfMultipleVarDefinition() {\n    myFixture.configureByText(\"a.go\", \"package main\\n\\n var fo<caret>o, bar int\");\n    GoVarDefinition definition = PsiTreeUtil.getNonStrictParentOfType(myFixture.getElementAtCaret(), GoVarDefinition.class);\n    assertNotNull(definition);\n    GoType type = definition.findSiblingType();\n    assertNotNull(type);\n    assertEquals(\"int\", type.getText());\n  }\n\n  public void testGetTypeOfSingleConstDefinition() {\n    myFixture.configureByText(\"a.go\", \"package main\\n\\n const fo<caret>o int = 1\");\n    GoConstDefinition definition = PsiTreeUtil.getNonStrictParentOfType(myFixture.getElementAtCaret(), GoConstDefinition.class);\n    assertNotNull(definition);\n    GoType type = definition.findSiblingType();\n    assertNotNull(type);\n    assertEquals(\"int\", type.getText());\n  }\n\n  public void testGetTypeOfMultipleConstDefinition() {\n    myFixture.configureByText(\"a.go\", \"package main\\n\\n const fo<caret>o, bar int = 1, 2\");\n    GoConstDefinition definition = PsiTreeUtil.getNonStrictParentOfType(myFixture.getElementAtCaret(), GoConstDefinition.class);\n    assertNotNull(definition);\n    GoType type = definition.findSiblingType();\n    assertNotNull(type);\n    assertEquals(\"int\", type.getText());\n  }\n  \n  public void testGetValueOfVarDefinitionInSwitch() {\n    myFixture.configureByText(\"a.go\", \"package main\\n\\n func _() { bar := nil; switch fo<caret>o := bar.(type){}}\");\n    GoVarDefinition definition = PsiTreeUtil.getNonStrictParentOfType(myFixture.getElementAtCaret(), GoVarDefinition.class);\n    assertNotNull(definition);\n    GoExpression value = definition.getValue();\n    assertNotNull(value);\n    assertEquals(\"bar\", value.getText());\n  }\n  \n  public void testGetValueOfSingleVarDefinition() {\n    myFixture.configureByText(\"a.go\", \"package main\\n\\n var fo<caret>o int = 1\");\n    GoVarDefinition definition = PsiTreeUtil.getNonStrictParentOfType(myFixture.getElementAtCaret(), GoVarDefinition.class);\n    assertNotNull(definition);\n    GoExpression value = definition.getValue();\n    assertNotNull(value);\n    assertEquals(\"1\", value.getText());\n  }\n  \n  public void testGetValueOfMultipleVarDefinition_1() {\n    myFixture.configureByText(\"a.go\", \"package main\\n\\n var fo<caret>o, bar int = 1, 2\");\n    GoVarDefinition definition = PsiTreeUtil.getNonStrictParentOfType(myFixture.getElementAtCaret(), GoVarDefinition.class);\n    assertNotNull(definition);\n    GoExpression value = definition.getValue();\n    assertNotNull(value);\n    assertEquals(\"1\", value.getText());\n  }\n  \n  public void testGetValueOfMultipleVarDefinition_2() {\n    myFixture.configureByText(\"a.go\", \"package main\\n\\n var foo, b<caret>ar int = 1, 2\");\n    GoVarDefinition definition = PsiTreeUtil.getNonStrictParentOfType(myFixture.getElementAtCaret(), GoVarDefinition.class);\n    assertNotNull(definition);\n    GoExpression value = definition.getValue();\n    assertNotNull(value);\n    assertEquals(\"2\", value.getText());\n  }\n  \n  public void testGetValueOfMultipleVarDefinitionWithoutValues() {\n    myFixture.configureByText(\"a.go\", \"package main\\n\\n var f<caret>oo, bar int\");\n    GoVarDefinition definition = PsiTreeUtil.getNonStrictParentOfType(myFixture.getElementAtCaret(), GoVarDefinition.class);\n    assertNotNull(definition);\n    assertNull(definition.getValue());\n  }\n  \n  public void testGetValueOfMultipleInvalidVarDefinition() {\n    myFixture.configureByText(\"a.go\", \"package main\\n\\n var foo, b<caret>ar int = 1\");\n    GoVarDefinition definition = PsiTreeUtil.getNonStrictParentOfType(myFixture.getElementAtCaret(), GoVarDefinition.class);\n    assertNotNull(definition);\n    assertNull(definition.getValue());\n  }\n  \n  public void testGetValueOfSingleConstDefinition() {\n    myFixture.configureByText(\"a.go\", \"package main\\n\\n const fo<caret>o int = 1\");\n    GoConstDefinition definition = PsiTreeUtil.getNonStrictParentOfType(myFixture.getElementAtCaret(), GoConstDefinition.class);\n    assertNotNull(definition);\n    GoExpression value = definition.getValue();\n    assertNotNull(value);\n    assertEquals(\"1\", value.getText());\n  }\n  \n  public void testGetValueOfMultipleConstDefinition_1() {\n    myFixture.configureByText(\"a.go\", \"package main\\n\\n const fo<caret>o, bar int = 1, 2\");\n    GoConstDefinition definition = PsiTreeUtil.getNonStrictParentOfType(myFixture.getElementAtCaret(), GoConstDefinition.class);\n    assertNotNull(definition);\n    GoExpression value = definition.getValue();\n    assertNotNull(value);\n    assertEquals(\"1\", value.getText());\n  }\n  \n  public void testGetValueOfMultipleConstDefinition_2() {\n    myFixture.configureByText(\"a.go\", \"package main\\n\\n const foo, b<caret>ar int = 1, 2\");\n    GoConstDefinition definition = PsiTreeUtil.getNonStrictParentOfType(myFixture.getElementAtCaret(), GoConstDefinition.class);\n    assertNotNull(definition);\n    GoExpression value = definition.getValue();\n    assertNotNull(value);\n    assertEquals(\"2\", value.getText());\n  }\n  \n  public void testDeleteSingleVarDefinition() {\n    myFixture.configureByText(\"a.go\", \"package main\\n\\n var b<caret>ar int = 1, 2\");\n    GoVarDefinition definition = PsiTreeUtil.getNonStrictParentOfType(myFixture.getElementAtCaret(), GoVarDefinition.class);\n    assertNotNull(definition);\n    GoVarSpec spec = PsiTreeUtil.getNonStrictParentOfType(myFixture.getElementAtCaret(), GoVarSpec.class);\n    assertNotNull(spec);\n    spec.deleteDefinition(definition);\n    myFixture.checkResult(\"package main\\n\\n \");\n  }\n\n  public void testDeleteFirstMultipleVarDefinitionWithValue() {\n    myFixture.configureByText(\"a.go\", \"package main\\n\\n var fo<caret>o, bar int = 1, 2\");\n    GoVarDefinition definition = PsiTreeUtil.getNonStrictParentOfType(myFixture.getElementAtCaret(), GoVarDefinition.class);\n    assertNotNull(definition);\n    GoVarSpec spec = PsiTreeUtil.getNonStrictParentOfType(myFixture.getElementAtCaret(), GoVarSpec.class);\n    assertNotNull(spec);\n    spec.deleteDefinition(definition);\n    myFixture.checkResult(\"package main\\n\\n var bar int =  2\");\n  }\n  \n  public void testDeleteMiddleMultipleVarDefinitionWithValue() {\n    myFixture.configureByText(\"a.go\", \"package main\\n\\n var buzz, fo<caret>o, bar int = 1, 2, 3\");\n    GoVarDefinition definition = PsiTreeUtil.getNonStrictParentOfType(myFixture.getElementAtCaret(), GoVarDefinition.class);\n    assertNotNull(definition);\n    GoVarSpec spec = PsiTreeUtil.getNonStrictParentOfType(myFixture.getElementAtCaret(), GoVarSpec.class);\n    assertNotNull(spec);\n    spec.deleteDefinition(definition);\n    myFixture.checkResult(\"package main\\n\\n var buzz , bar int = 1 , 3\");\n  }\n  \n  public void testDeleteLastMultipleVarDefinitionWithValue() {\n    myFixture.configureByText(\"a.go\", \"package main\\n\\n var foo, b<caret>ar int = 1, 2\");\n    GoVarDefinition definition = PsiTreeUtil.getNonStrictParentOfType(myFixture.getElementAtCaret(), GoVarDefinition.class);\n    assertNotNull(definition);\n    GoVarSpec spec = PsiTreeUtil.getNonStrictParentOfType(myFixture.getElementAtCaret(), GoVarSpec.class);\n    assertNotNull(spec);\n    spec.deleteDefinition(definition);\n    myFixture.checkResult(\"package main\\n\\n var foo  int = 1 \");\n  }\n\n  public void testDeleteLastMultipleVarDefinitionWithoutValue() {\n    myFixture.configureByText(\"a.go\", \"package main\\n\\n var foo, b<caret>ar int = 1\");\n    GoVarDefinition definition = PsiTreeUtil.getNonStrictParentOfType(myFixture.getElementAtCaret(), GoVarDefinition.class);\n    assertNotNull(definition);\n    GoVarSpec spec = PsiTreeUtil.getNonStrictParentOfType(myFixture.getElementAtCaret(), GoVarSpec.class);\n    assertNotNull(spec);\n    spec.deleteDefinition(definition);\n    myFixture.checkResult(\"package main\\n\\n var foo  int = 1\");\n  }\n  \n  public void testDeleteFirstMultipleVarDefinitionWithoutValue() {\n    myFixture.configureByText(\"a.go\", \"package main\\n\\n var f<caret>oo, bar int = 1\");\n    GoVarDefinition definition = PsiTreeUtil.getNonStrictParentOfType(myFixture.getElementAtCaret(), GoVarDefinition.class);\n    assertNotNull(definition);\n    GoVarSpec spec = PsiTreeUtil.getNonStrictParentOfType(myFixture.getElementAtCaret(), GoVarSpec.class);\n    assertNotNull(spec);\n    spec.deleteDefinition(definition);\n    myFixture.checkResult(\"package main\\n\\n var bar int  \");\n  }\n  \n  public void testDeleteSingleConstDefinition() {\n    myFixture.configureByText(\"a.go\", \"package main\\n\\n const b<caret>ar int = 1, 2\");\n    GoConstDefinition definition = PsiTreeUtil.getNonStrictParentOfType(myFixture.getElementAtCaret(), GoConstDefinition.class);\n    assertNotNull(definition);\n    GoConstSpec spec = PsiTreeUtil.getNonStrictParentOfType(myFixture.getElementAtCaret(), GoConstSpec.class);\n    assertNotNull(spec);\n    spec.deleteDefinition(definition);\n    myFixture.checkResult(\"package main\\n\\n \");\n  }\n\n  public void testDeleteFirstMultipleConstDefinitionWithValue() {\n    myFixture.configureByText(\"a.go\", \"package main\\n\\n const fo<caret>o, bar int = 1, 2\");\n    GoConstDefinition definition = PsiTreeUtil.getNonStrictParentOfType(myFixture.getElementAtCaret(), GoConstDefinition.class);\n    assertNotNull(definition);\n    GoConstSpec spec = PsiTreeUtil.getNonStrictParentOfType(myFixture.getElementAtCaret(), GoConstSpec.class);\n    assertNotNull(spec);\n    spec.deleteDefinition(definition);\n    myFixture.checkResult(\"package main\\n\\n const bar int =  2\");\n  }\n  \n  public void testDeleteMiddleMultipleConstDefinitionWithValue() {\n    myFixture.configureByText(\"a.go\", \"package main\\n\\n const buzz, fo<caret>o, bar int = 1, 2, 3\");\n    GoConstDefinition definition = PsiTreeUtil.getNonStrictParentOfType(myFixture.getElementAtCaret(), GoConstDefinition.class);\n    assertNotNull(definition);\n    GoConstSpec spec = PsiTreeUtil.getNonStrictParentOfType(myFixture.getElementAtCaret(), GoConstSpec.class);\n    assertNotNull(spec);\n    spec.deleteDefinition(definition);\n    myFixture.checkResult(\"package main\\n\\n const buzz , bar int = 1 , 3\");\n  }\n  \n  public void testDeleteLastMultipleConstDefinitionWithValue() {\n    myFixture.configureByText(\"a.go\", \"package main\\n\\n const foo, b<caret>ar int = 1, 2\");\n    GoConstDefinition definition = PsiTreeUtil.getNonStrictParentOfType(myFixture.getElementAtCaret(), GoConstDefinition.class);\n    assertNotNull(definition);\n    GoConstSpec spec = PsiTreeUtil.getNonStrictParentOfType(myFixture.getElementAtCaret(), GoConstSpec.class);\n    assertNotNull(spec);\n    spec.deleteDefinition(definition);\n    myFixture.checkResult(\"package main\\n\\n const foo  int = 1 \");\n  }\n\n  public void testDeleteLastMultipleConstDefinitionWithoutValue() {\n    myFixture.configureByText(\"a.go\", \"package main\\n\\n const foo, b<caret>ar int = 1\");\n    GoConstDefinition definition = PsiTreeUtil.getNonStrictParentOfType(myFixture.getElementAtCaret(), GoConstDefinition.class);\n    assertNotNull(definition);\n    GoConstSpec spec = PsiTreeUtil.getNonStrictParentOfType(myFixture.getElementAtCaret(), GoConstSpec.class);\n    assertNotNull(spec);\n    spec.deleteDefinition(definition);\n    myFixture.checkResult(\"package main\\n\\n const foo  int = 1\");\n  }\n  \n  public void testDeleteFirstMultipleConstDefinitionWithoutValue() {\n    myFixture.configureByText(\"a.go\", \"package main\\n\\n const f<caret>oo, bar int = 1\");\n    GoConstDefinition definition = PsiTreeUtil.getNonStrictParentOfType(myFixture.getElementAtCaret(), GoConstDefinition.class);\n    assertNotNull(definition);\n    GoConstSpec spec = PsiTreeUtil.getNonStrictParentOfType(myFixture.getElementAtCaret(), GoConstSpec.class);\n    assertNotNull(spec);\n    spec.deleteDefinition(definition);\n    myFixture.checkResult(\"package main\\n\\n const bar int  \");\n  }\n\n  public void testGoIndexOrSliceExprGetIndices() {\n    PsiFile file = myFixture.configureByText(\"a.go\", \"package main\\n var a []int\\n var b = a<caret>[1]\");\n    GoIndexOrSliceExpr index = PsiTreeUtil.getParentOfType(file.findElementAt(myFixture.getCaretOffset()), GoIndexOrSliceExpr.class);\n    assertNotNull(index);\n    assertEquals(\"1\", index.getIndices().first.getText());\n  }\n\n  @Override\n  protected boolean isWriteActionRequired() {\n    return true;\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/psi/legacy/GoLegacyResolveBuiltinTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi.legacy;\n\nimport com.goide.SdkAware;\nimport org.jetbrains.annotations.NotNull;\n\n@SdkAware\npublic class GoLegacyResolveBuiltinTest extends GoLegacyResolveTestBase {\n  @NotNull\n  @Override\n  protected String getBasePath() { return \"psi/resolve/builtin\"; }\n\n  @Override\n  protected boolean allowNullDefinition() {\n    return true;\n  }\n  \n  public void testMethodName()        { doFileTest(); } \n  public void testBuiltinTypes()      { doFileTest(); } \n  public void testBuiltinConversion() { doFileTest(); } \n  public void testVarBuiltinType()    { doFileTest(); } \n  public void testVarMethodType()     { doFileTest(); } \n  public void testParameterType()     { doFileTest(); }\n}\n"
  },
  {
    "path": "tests/com/goide/psi/legacy/GoLegacyResolveCallsTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi.legacy;\n\nimport com.goide.project.GoBuildTargetSettings;\nimport com.goide.project.GoModuleSettings;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoLegacyResolveCallsTest extends GoLegacyResolveTestBase {\n  @NotNull\n  @Override\n  protected String getBasePath() { return \"psi/resolve/calls\"; }\n\n  public void testCallToLocalMethodByPointer()                           { doFileTest(); } \n  public void testCallToLocalMethod()                                    { doFileTest(); } \n  public void testCallToLocalMethodNested()                              { doFileTest(); } \n  public void testCallToLocalMethodViaMap()                              { doFileTest(); } \n  public void testCallToLocalMethodViaShortVarDeclaration()              { doFileTest(); } \n  public void testCallToLocalMethodViaSlice()                            { doFileTest(); } \n  public void testCallToLocalMethodViaTypeAssert()                       { doFileTest(); } \n  public void testCallToLocalInterfaceMethod()                           { doFileTest(); } \n  public void testCallToLocalInterfaceMethodNested()                     { doFileTest(); } \n  public void testCallToLocalInterfaceMethodViaMap()                     { doFileTest(); } \n  public void testCallToLocalInterfaceMethodViaSlice()                   { doFileTest(); } \n  public void testCallToLocalInterfaceMethodViaTypeAssert()              { doFileTest(); } \n  public void testCallToLocalFunction()                                  { doFileTest(); } \n  public void testCallToFunctionLiteral()                                { doFileTest(); } \n  public void testTypeConversionToLocalType()                            { doFileTest(); } \n  public void testRecursiveMethodCall()                                  { doFileTest(); } \n  public void testCallToMethodParameter()                                { doFileTest(); } \n  public void testCallToFunctionVariable()                               { doFileTest(); } \n  public void testDirectlyInheritedMethodSet()                           { doFileTest(); } \n  public void testGrandParentDirectlyInheritedMethodSet()                { doFileTest(); } \n  public void testCallToEmbeddedInterfaceMethod()                        { doFileTest(); } \n  public void testCallToFunctionWithSameNameAsMethod()                   { doFileTest(); } \n  public void testCallToMethodWithTheSameNameAsFunction()                { doFileTest(); } \n\n  public void testConversionToImportedType()                             { doDirTest(); } \n  public void testConversionToImportedFunction()                         { doDirTest(); } \n  public void testNoConversionToBlankImportedType()                      { doDirTest(); } \n  public void testConversionToLocallyImportedType()                      { doDirTest(); } \n  public void testFunctionInSamePackageDifferentFile()                   { doDirTest(); } \n  public void testRelativePackageReference()                             { doDirTest(); }\n  public void testRelativePackageReferenceDeep()                         { doDirTest(); } \n  public void testCallToFunctionWithSameNameAsMethodAcrossPackages()     { doDirTest(); } \n  public void testCallToMethodViaShortVar()                              { doDirTest(); } \n  public void testImportedEmbeddedTypeMethod()                           { doDirTest(); } \n  public void testCallToMethodWithTheSameNameAsFunctionAcrossPackages()  { doDirTest(); }\n  public void testCallFromTestToMethodDefinedInTestFile()                { doDirTest(); }\n  public void testCallToMethodDefinedInTestFile()                        { doDirTest(); }\n\n  public void testCallToDifferentBuildTargetFiles() {\n    GoBuildTargetSettings buildTargetSettings = new GoBuildTargetSettings();\n    buildTargetSettings.customFlags = new String[]{\"enabled\"};\n    GoModuleSettings.getInstance(myFixture.getModule()).setBuildTargetSettings(buildTargetSettings);\n    doDirTest();\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/psi/legacy/GoLegacyResolveCompositeTest.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi.legacy;\n\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoLegacyResolveCompositeTest extends GoLegacyResolveTestBase {\n  @NotNull\n  @Override\n  protected String getBasePath() { return \"psi/resolve/composite\"; }\n\n  public void testTypeName()                { doFileTest(); } \n  public void testTypeStruct()              { doFileTest(); } \n  public void testTypeStructArray()         { doFileTest(); } \n  public void testTypeStructSlice()         { doFileTest(); } \n  public void testTypeStructMap()           { doFileTest(); } \n  public void testTypeNameArray()           { doFileTest(); } \n  public void testTypeNameMap()             { doFileTest(); } \n  public void testTypeNameSlice()           { doFileTest(); } \n  public void testNestedStruct()            { doFileTest(); } \n  public void testNestedNamedStruct()       { doFileTest(); } \n  public void testKeyAsConstantExpression() { doFileTest(); } \n  public void testExpressionKey()           { doFileTest(); } \n  public void testPromotedAnonymousField1() { doFileTest(); } \n  public void testPromotedAnonymousField2() { doFileTest(); } \n  public void testPromotedAnonymousField3() { doFileTest(); } \n  public void testPromotedAnonymousField4() { doFileTest(); } \n  public void testTypeSwitch()              { doFileTest(); }\n}\n"
  },
  {
    "path": "tests/com/goide/psi/legacy/GoLegacyResolvePackageTest.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi.legacy;\n\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoLegacyResolvePackageTest extends GoLegacyResolveTestBase {\n  @NotNull\n  @Override\n  protected String getBasePath() { return \"psi/resolve/package\"; }\n\n  public void testImportAlias() { doFileTest(); } \n}\n"
  },
  {
    "path": "tests/com/goide/psi/legacy/GoLegacyResolveStructTest.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi.legacy;\n\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoLegacyResolveStructTest extends GoLegacyResolveTestBase {\n  @NotNull\n  @Override\n  protected String getBasePath() { return \"psi/resolve/struct\"; }\n\n  public void testDirectStructField()                       { doFileTest(); } \n  public void testAnonymousDirectStructField()              { doFileTest(); } \n  public void testPromotedStructField()                     { doFileTest(); } \n  public void testStructFieldInMap()                        { doFileTest(); } \n  public void testFieldVsParam()                            { doFileTest(); } \n  public void testFieldVsParam2()                           { doFileTest(); }\n  public void testFieldVsParam3()                           { doFileTest(); }\n  public void testFieldVsParam4()                           { doFileTest(); }\n\n  public void testDirectExportedFieldFromImportedPackage()  { doDirTest(); } \n  public void testDirectPrivateFieldFromImportedPackage()   { doDirTest(); }\n}\n"
  },
  {
    "path": "tests/com/goide/psi/legacy/GoLegacyResolveTestBase.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi.legacy;\n\nimport com.goide.GoCodeInsightFixtureTestCase;\nimport com.goide.project.GoModuleLibrariesService;\nimport com.goide.psi.GoFile;\nimport com.intellij.openapi.vfs.VfsUtilCore;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.PsiReference;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport com.intellij.util.FilteringProcessor;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.io.File;\n\npublic abstract class GoLegacyResolveTestBase extends GoCodeInsightFixtureTestCase {\n  @NotNull private static final String REF_MARK = \"/*ref*/\";\n  @NotNull private static final String NO_REF_MARK = \"/*no ref*/\";\n  @NotNull private static final String DEF_MARK = \"/*def*/\";\n\n  @Nullable private PsiReference myReference;\n  @Nullable private PsiElement myDefinition;\n  private boolean myShouldBeResolved = true;\n\n  @Override\n  protected String getBasePath() {\n    return \"psi/resolve\";\n  }\n\n  protected void doFileTest() {\n    processPsiFile((GoFile)myFixture.configureByFile(getTestName(false) + \".go\"));\n    doResolveTest();\n  }\n  \n  protected void doDirTest() {\n    String testDataPath = getTestDataPath();\n    String testName = getTestName(false);\n    File fromDir = new File(testDataPath + \"/\" + testName);\n    if (!fromDir.isDirectory()) {\n      throw new RuntimeException(\"Given file is not directory: \" + fromDir);\n    }\n    //noinspection ConstantConditions\n    for (File file : fromDir.listFiles()) {\n      if (file.isDirectory()) {\n        myFixture.copyDirectoryToProject(testName + \"/\" + file.getName(), file.getName());\n      }\n      else {\n        myFixture.copyFileToProject(testName + \"/\" + file.getName());\n      }\n    }\n    VirtualFile dirToTest = myFixture.getTempDirFixture().getFile(\".\");\n    assertNotNull(dirToTest);\n    GoModuleLibrariesService.getInstance(myFixture.getModule()).setLibraryRootUrls(dirToTest.getUrl());\n    doDirectoryTest(dirToTest);\n  }\n\n  private void doResolveTest() {\n    if (myReference == null) fail(\"no reference defined in test case\");\n    if (myShouldBeResolved && !allowNullDefinition() && myDefinition == null) fail(\"no definition defined in test case\");\n    PsiElement resolve = myReference.resolve();\n    if (myShouldBeResolved) {\n      assertNotNull(\"cannot resolve reference \" + myReference.getCanonicalText(), resolve);\n      if (myDefinition != null) {\n        PsiElement def = PsiTreeUtil.getParentOfType(myDefinition, resolve.getClass(), false);\n        assertSame(\"element resolved in non-expected element from \" + getFileName(resolve) + \":\\n\" + resolve.getText(), \n                   def, resolve);\n      }\n    }\n    else if (resolve != null) {\n        fail(\"element is resolved but it wasn't should. resolved to element from \" + getFileName(resolve) + \":\\n\" + resolve.getText());\n      }\n  }\n\n  @NotNull\n  private static String getFileName(@NotNull PsiElement resolve) {\n    return resolve instanceof PsiFile ? ((PsiFile)resolve).getName() : resolve.getContainingFile().getName();\n  }\n\n  protected boolean allowNullDefinition() {\n    return false;\n  }\n  \n  private void processPsiFile(@NotNull GoFile file) {\n    String fileContent = loadText(file.getVirtualFile());\n\n    String fileName = file.getName();\n    int refIndex = fileContent.indexOf(REF_MARK);\n    if (refIndex != -1) {\n      int offset = refIndex + REF_MARK.length();\n      myReference = findReference(file, offset);\n    }\n    int noRefIndex = fileContent.indexOf(NO_REF_MARK);\n    if (noRefIndex != -1) {\n      int offset = noRefIndex + NO_REF_MARK.length();\n      myReference = findReference(file, offset);\n      myShouldBeResolved = false;\n    }\n\n    int defIndex = fileContent.indexOf(DEF_MARK);\n    if (defIndex != -1) {\n      if (myDefinition != null) fail(\"only one definition should be allowed in a resolve test case, see file: \" + fileName);\n      int offset = defIndex + DEF_MARK.length();\n      myDefinition = file.findElementAt(offset);\n      if (myDefinition == null) fail(\"no definition was found at mark in file: \" + fileName + \", offset: \" + offset);\n    }\n  }\n\n  @NotNull\n  private PsiReference findReference(@NotNull GoFile file, int offset) {\n    if (myReference != null) fail(\"only one reference should be declared in a test case, see file: \" + file.getName());\n    PsiReference result = file.findReferenceAt(offset);\n    if (result == null) fail(\"no reference was found at mark in file: \" + file.getName() + \", offset: \" + offset);\n    return result;\n  }\n\n  private void doDirectoryTest(@NotNull VirtualFile file) {\n    VfsUtilCore.processFilesRecursively(file, new FilteringProcessor<>(\n                                          virtualFile -> !virtualFile.isDirectory() && virtualFile.getName().endsWith(\".go\"),\n                                          virtualFile -> {\n                                            PsiFile goFile = myFixture.getPsiManager().findFile(virtualFile);\n                                            assert goFile instanceof GoFile;\n                                            processPsiFile((GoFile)goFile);\n                                            return true;\n                                          }\n                                        ));\n    doResolveTest();\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/psi/legacy/GoLegacyResolveTypesTest.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi.legacy;\n\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoLegacyResolveTypesTest extends GoLegacyResolveTestBase {\n  @NotNull\n  @Override\n  protected String getBasePath() { return \"psi/resolve/types\"; }\n\n  public void testLocalType()                                     { doFileTest(); } \n  public void testFromMethodReceiver()                            { doFileTest(); } \n  public void testResolveTypeNameInTypeSpec()                     { doFileTest(); } \n  public void testResolveTypeInCast()                             { doFileTest(); } \n  public void testResolveArrayInRange()                           { doFileTest(); } \n  public void testMethodsOrder()                                  { doFileTest(); }\n  public void testFunctionTypeByRef()                             { doFileTest(); }\n\n  public void testFromDefaultImportedPackage()                    { doDirTest(); } \n  public void testFromInjectedPackage()                           { doDirTest(); } \n  public void testFromCustomImportedPackage()                     { doDirTest(); } \n  public void testIgnoreBlankImportedPackage()                    { doDirTest(); } \n  public void testFromMultipleImportedPackage()                   { doDirTest(); } \n  public void testCompositeLiteralFromImportedPackage()           { doDirTest(); } \n  public void testFromMixedCaseImportedPackage()                  { doDirTest(); } \n  public void testFromLowerCasePackageInMixedCaseFolder()         { doDirTest(); } \n  public void testDontResolveIfImportedInAnotherFileSamePackage() { doDirTest(); } \n}\n"
  },
  {
    "path": "tests/com/goide/psi/legacy/GoLegacyResolveVarsTest.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.psi.legacy;\n\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoLegacyResolveVarsTest extends GoLegacyResolveTestBase {\n  @NotNull\n  @Override\n  protected String getBasePath() { return \"psi/resolve/vars\"; }\n\n  public void testAnonymousFunctionInvocation()                     { doFileTest(); } \n  public void testDeclaredInForRange1()                             { doFileTest(); }\n  public void testDeclaredInForRange2()                             { doFileTest(); }\n  public void testDeclaredInForRangeAsValue()                       { doFileTest(); }\n  public void testDeclaredInForClause()                             { doFileTest(); }\n  public void testMethodReturn()                                    { doFileTest(); }\n  public void testSimpleMethodParameter()                           { doFileTest(); }\n  public void testMethodReturn2()                                   { doFileTest(); }\n  public void testGlobalVarDeclaration()                            { doFileTest(); }\n  public void testGlobalShadowedVarDeclaration()                    { doFileTest(); }\n  public void testGlobalVarDeclarationFromBlock()                   { doFileTest(); }\n  public void testShortVarDeclaration()                             { doFileTest(); }\n  public void testShortVarRedeclaration()                           { doFileTest(); }\n  public void testShortVarDeclarationFromBlock()                    { doFileTest(); }\n  public void testGlobalConstDeclaration()                          { doFileTest(); }\n  public void testResolveToMethodName()                             { doFileTest(); }\n  public void testLocalConstDeclaration()                           { doFileTest(); }\n  public void testChainedSelector()                                 { doFileTest(); }\n  public void testVarInSwitchExpr()                                 { doFileTest(); }\n  public void testVarInSwitchExprInitialization()                   { doFileTest(); }\n  public void testVarInSwitchType()                                 { doFileTest(); }\n  public void testVarInSwitchTypeInitialization()                   { doFileTest(); }\n  public void testMultipleGlobalVars()                              { doFileTest(); }\n  public void testMultipleGlobalConsts()                            { doFileTest(); }\n  public void testDeclarationInsideLabeledStatement()               { doFileTest(); }\n  public void testStructFieldViaChannel()                           { doFileTest(); }\n  public void testShortVarDeclarationFromSelectClause()             { doFileTest(); }\n  public void testVarDeclarationInSelectCommClauseRecv()            { doFileTest(); }\n  public void testVarDeclarationInSelectCommClauseDefault()         { doFileTest(); }\n  public void testRangeExpressionVarsShouldNotResolveToRangeVars()  { doFileTest(); }\n  public void testVarDereferenceAsTypeCast()                        { doFileTest(); }\n  public void testShortAssignToReturnVar()                          { doFileTest(); }\n  public void testResolveToFunctionName()                           { doFileTest(); }\n  public void testVarInSwitchTypeWithNamedSwitchGuard()             { doFileTest(); }\n  public void testVarDeclarationInSelectCommClauseSend()            { doFileTest(); }\n  public void testVarDeclarationOutsideSwitch()                     { doFileTest(); }\n  public void testVarVsInnerTypes()                                 { doFileTest(); }\n  public void testVarTypeGuard()                                    { doFileTest(); }\n  public void testResolveMethodReceiver()                           { doFileTest(); }\n  public void testDontProcessExpressions()                          { doFileTest(); }\n\n  public void testFromDefaultImportedPackage()                      { doDirTest(); }\n  public void testLocalPackageDefinitionsShouldBeResolvedFirst()    { doDirTest(); }\n  public void testMultipleApplications()                            { doDirTest(); }\n  public void testFromInjectedImportedPackage()                     { doDirTest(); }\n  public void testDefaultImportDifferentPackage()                   { doDirTest(); }\n  public void testFromCustomImportedPackage()                       { doDirTest(); }\n}\n"
  },
  {
    "path": "tests/com/goide/quickfix/GoAddMissingReturnQuickFixTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.quickfix;\n\nimport com.goide.inspections.GoMissingReturnInspection;\n\npublic class GoAddMissingReturnQuickFixTest extends GoQuickFixTestBase {\n  @Override\n  public void setUp() throws Exception {\n    super.setUp();\n    myFixture.enableInspections(GoMissingReturnInspection.class);\n  }\n\n  public void testSimple() {\n    doTest(GoMissingReturnInspection.ADD_RETURN_STATEMENT_QUICK_FIX_NAME, true);\n  }\n  \n  @Override\n  protected String getBasePath() {\n    return \"quickfixes/add-missing-return\";\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/quickfix/GoAddTrailingCommaQuickFixTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.quickfix;\n\nimport com.goide.inspections.GoAddTrailingCommaInspection;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoAddTrailingCommaQuickFixTest extends GoQuickFixTestBase {\n  @Override\n  protected void setUp() throws Exception {\n    super.setUp();\n    myFixture.enableInspections(GoAddTrailingCommaInspection.class);\n  }\n\n  @NotNull\n  @Override\n  protected String getBasePath() {\n    return \"quickfixes/add-comma\";\n  }\n\n  public void testSimple() { doTest(GoAddTrailingCommaInspection.QUICK_FIX_NAME); }\n}\n"
  },
  {
    "path": "tests/com/goide/quickfix/GoAssignmentToComparisonQuickFixTest.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.quickfix;\n\nimport com.goide.inspections.GoUsedAsValueInCondition;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoAssignmentToComparisonQuickFixTest extends GoQuickFixTestBase {\n  @Override\n  protected void setUp() throws Exception {\n    super.setUp();\n    myFixture.enableInspections(GoUsedAsValueInCondition.class);\n  }\n\n  @NotNull\n  @Override\n  protected String getBasePath() {\n    return \"quickfixes/assignment-to-comparison\";\n  }\n\n  public void testAssignment() {\n    doTest(GoUsedAsValueInCondition.QUICK_FIX_NAME);\n  }\n\n  public void testShortVar() {\n    doTest(GoUsedAsValueInCondition.QUICK_FIX_NAME);\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/quickfix/GoBoolExpressionsInspectionTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.quickfix;\n\nimport com.goide.GoParametrizedTestBase;\nimport com.goide.SdkAware;\nimport com.goide.inspections.GoBoolExpressionsInspection;\nimport org.junit.Before;\nimport org.junit.runner.RunWith;\nimport org.junit.runners.Parameterized;\n\nimport java.util.Arrays;\nimport java.util.Collection;\n\n@RunWith(Parameterized.class)\n@SdkAware\npublic class GoBoolExpressionsInspectionTest extends GoParametrizedTestBase {\n  private final String expr;\n  private final String vars;\n  private final String after;\n\n  @Parameterized.Parameters(name = \"{1}\")\n  public static Collection<Object[]> data() {\n    return Arrays.asList(new Object[][]{\n      {\"var b bool\", \"b || true\", \"true\"},\n      {\"var b bool\", \"b || false\", \"b\"},\n      {\"var b bool\", \"b && true\", \"b\"},\n      {\"var b bool\", \"b && false\", \"false\"},\n      {\"var b bool\", \"b && b\", \"b\"},\n      {\"var b bool\", \"b || b\", \"b\"},\n      {\"var b,c,d bool\", \"b || c && b\", \"b || c && b\"},\n      {\"var b,c,d bool\", \"b || c || !b\", \"true\"},\n      {\"var b,c,d bool\", \"!b || !(!b)\", \"true\"},\n      {\"var b,c,d bool\", \"!b || d || c\", \"!b || d || c\"},\n      {\"var b,c,d bool\", \"!b && b\", \"false\"},\n      {\"var b,c,d bool\", \"(b && c) || (c && b)\", \"c && b\"},\n      {\"var b,c,d bool\", \"(b == c || c == b) || (b == c)\", \"b == c\"},\n\n      {\"var c1, c2 = 1, 2; var a, b, c int\", \"b == c1 || b == c2\", \"b == c1 || b == c2\"},\n      {\"var c1, c2 = 1, 2; var a, b, c int\", \"b != c1 && b != c2\", \"b != c1 && b != c2\"},\n    });\n  }\n\n  @Before\n  public void enableInspections() {\n    myFixture.enableInspections(GoBoolExpressionsInspection.class);\n  }\n\n  public GoBoolExpressionsInspectionTest(String vars, String expr, String after) {\n    this.expr = expr;\n    this.vars = vars;\n    this.after = after;\n  }\n\n  @Override\n  public void doTest() {\n    myFixture.configureByText(\"a.go\", \"package main\\n func main(){\\n\" + vars + \"\\nvar a = \" + expr + \"<caret>\" + \"\\n}\");\n    if (!expr.equals(after)) {\n      applySingleQuickFix(GoSimplifyBoolExprQuickFix.QUICK_FIX_NAME);\n      myFixture.checkResult(\"package main\\n func main(){\\n\" + vars + \"\\nvar a = \" + after + \"<caret>\" + \"\\n}\");\n    }\n    else {\n      assertEmpty(myFixture.filterAvailableIntentions(GoSimplifyBoolExprQuickFix.QUICK_FIX_NAME));\n    }\n  }\n}\n\n\n\n\n"
  },
  {
    "path": "tests/com/goide/quickfix/GoContinueNotInLoopQuickFixTest.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.quickfix;\n\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoContinueNotInLoopQuickFixTest extends GoQuickFixTestBase {\n  @NotNull\n  @Override\n  protected String getBasePath() {\n    return \"quickfixes/continue-outside-loop\";\n  }\n\n  public void testSimple() { doTest(GoReplaceWithReturnStatementQuickFix.QUICK_FIX_NAME); }\n}\n"
  },
  {
    "path": "tests/com/goide/quickfix/GoConvertStringToByteQuickFixTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.quickfix;\n\nimport com.goide.SdkAware;\nimport com.goide.inspections.GoStringAndByteTypeMismatchInspection;\nimport org.jetbrains.annotations.NotNull;\n\n@SdkAware\npublic class GoConvertStringToByteQuickFixTest extends GoQuickFixTestBase {\n  @Override\n  protected void setUp() throws Exception {\n    super.setUp();\n    myFixture.enableInspections(GoStringAndByteTypeMismatchInspection.class);\n  }\n\n  @NotNull\n  @Override\n  protected String getBasePath() {\n    return \"quickfixes/string-index-is-byte\";\n  }\n\n  private void doTest()                               { doTest(GoConvertStringToByteQuickFix.NAME); }\n  private void doTestNoFix(boolean checkHighlighting) { doTestNoFix(GoConvertStringToByteQuickFix.NAME, checkHighlighting); }\n\n  public void testEqualsCondition()                   { doTest(); }\n  public void testNotEqualsCondition()                { doTest(); }\n  public void testGreaterCondition()                  { doTest(); }\n  public void testGreaterOrEqualsCondition()          { doTest(); }\n  public void testLessCondition()                     { doTest(); }\n  public void testLessOrEqualsCondition()             { doTest(); }\n  public void testReverse()                           { doTest(); }\n  public void testLiterals()                          { doTest(); }\n  public void testLongLiteral()                       { doTest(); }\n  public void testSliceFromLeft()                     { doTestNoFix(false); }\n  public void testSliceFromRight()                    { doTestNoFix(false); }\n  public void testSliceUnbound()                      { doTestNoFix(false); }\n  public void testMoreThanOneCharInString()           { doTestNoFix(true); }\n}"
  },
  {
    "path": "tests/com/goide/quickfix/GoCreateGlobalConstQuickFixTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.quickfix;\n\nimport com.goide.inspections.unresolved.GoUnresolvedReferenceInspection;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoCreateGlobalConstQuickFixTest extends GoQuickFixTestBase {\n  @Override\n  protected void setUp() throws Exception {\n    super.setUp();\n    myFixture.enableInspections(GoUnresolvedReferenceInspection.class);\n  }\n\n  @NotNull\n  @Override\n  protected String getBasePath() {\n    return \"quickfixes/global-constant\";\n  }\n\n  public void testSimple() { doTest(\"Create global constant 'a'\"); }\n\n  public void testDoNotSuggestCreatingConstOnAssignment() {\n    doTestNoFix(\"Create global constant 'a'\");\n  }\n\n  public void testDoNotSuggestCreatingConstOnChanRead() {\n    doTestNoFix(\"Create global constant 'a'\");\n  }\n}"
  },
  {
    "path": "tests/com/goide/quickfix/GoCreateGlobalVariableQuickFixTest.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.quickfix;\n\nimport com.goide.inspections.unresolved.GoUnresolvedReferenceInspection;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoCreateGlobalVariableQuickFixTest extends GoQuickFixTestBase {\n  @Override\n  protected void setUp() throws Exception {\n    super.setUp();\n    myFixture.enableInspections(GoUnresolvedReferenceInspection.class);\n  }\n\n  @NotNull\n  @Override\n  protected String getBasePath() {\n    return \"quickfixes/global-variable\";\n  }\n\n  public void testSimple() { doTest(\"Create global variable 'a'\"); }\n}\n"
  },
  {
    "path": "tests/com/goide/quickfix/GoCreateLocalConstantQuickFixTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.quickfix;\n\nimport com.goide.inspections.unresolved.GoUnresolvedReferenceInspection;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoCreateLocalConstantQuickFixTest extends GoQuickFixTestBase {\n  private static final String CREATE_LOCAL_CONSTANT_A = \"Create local constant 'a'\";\n\n  @Override\n  protected void setUp() throws Exception {\n    super.setUp();\n    myFixture.enableInspections(GoUnresolvedReferenceInspection.class);\n  }\n\n  @NotNull\n  @Override\n  protected String getBasePath() {\n    return \"quickfixes/local-constant\";\n  }\n\n  private void doTestCreateA() {\n    doTest(CREATE_LOCAL_CONSTANT_A);\n  }\n\n  public void testSimple()          { doTestCreateA(); }\n  public void testIf()              { doTestCreateA(); }\n  public void testUnresolved()      { doTestCreateA(); }\n  public void testResolved()        { doTestCreateA(); }\n  public void testOnAssignment()    { doTestNoFix(CREATE_LOCAL_CONSTANT_A); }\n  public void testOnChanRead()      { doTestNoFix(CREATE_LOCAL_CONSTANT_A); }\n  public void testOnTopLevel()      { doTestNoFix(CREATE_LOCAL_CONSTANT_A); }\n}\n"
  },
  {
    "path": "tests/com/goide/quickfix/GoCreateLocalVariableQuickFixTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.quickfix;\n\nimport com.goide.inspections.unresolved.GoUnresolvedReferenceInspection;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoCreateLocalVariableQuickFixTest extends GoQuickFixTestBase {\n  private static final String CREATE_LOCAL_VARIABLE_A = \"Create local variable 'a'\";\n\n  @Override\n  protected void setUp() throws Exception {\n    super.setUp();\n    myFixture.enableInspections(GoUnresolvedReferenceInspection.class);\n  }\n\n  @NotNull\n  @Override\n  protected String getBasePath() {\n    return \"quickfixes/local-variable\";\n  }\n\n  private void doTestCreateA() {\n    doTest(CREATE_LOCAL_VARIABLE_A);\n  }\n\n  public void testSimple()     { doTestCreateA(); }\n  public void testIf()         { doTestCreateA(); }\n  public void testUnresolved() { doTestCreateA(); }\n  public void testResolved()   { doTestCreateA(); }\n  public void testOnTopLevel() { doTestNoFix(CREATE_LOCAL_VARIABLE_A); }\n}\n"
  },
  {
    "path": "tests/com/goide/quickfix/GoCreateWrapperTypeQuickFixTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.quickfix;\n\nimport com.goide.inspections.unresolved.GoUnresolvedReferenceInspection;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoCreateWrapperTypeQuickFixTest extends GoQuickFixTestBase {\n  private static final String CREATE_TYPE_A = \"Create type 'A'\";\n\n  @Override\n  protected void setUp() throws Exception {\n    super.setUp();\n    myFixture.enableInspections(GoUnresolvedReferenceInspection.class);\n  }\n\n  @NotNull\n  @Override\n  protected String getBasePath() {\n    return \"quickfixes/create-type\";\n  }\n\n  public void testSimple()      { doTest(CREATE_TYPE_A);      }\n  public void testGlobal()      { doTest(CREATE_TYPE_A);      }\n  public void testProhibited()  { doTestNoFix(CREATE_TYPE_A); }\n}\n"
  },
  {
    "path": "tests/com/goide/quickfix/GoDeleteConstDefinitionQuickFixTest.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.quickfix;\n\nimport com.goide.inspections.unresolved.GoUnusedConstInspection;\n\npublic class GoDeleteConstDefinitionQuickFixTest extends GoQuickFixTestBase {\n  @Override\n  public void setUp() throws Exception {\n    super.setUp();\n    myFixture.enableInspections(GoUnusedConstInspection.class);\n  }\n  \n  public void testSimple() {\n    myFixture.configureByText(\"a.go\", \"package main; func main() { const fo<caret>o int = 2 }\");\n    applySingleQuickFix(\"Delete const 'foo'\");\n    myFixture.checkResult(\"package main; func main() {}\");\n  }\n  \n  public void testRemoveFromMultiSpec() {\n    myFixture.configureByText(\"a.go\", \"package main; func main() { const (fo<caret>o, bar int = 2, 3) }\");\n    applySingleQuickFix(\"Delete const 'foo'\");\n    myFixture.checkResult(\"package main; func main() { const (\\n\" +\n                          \"\\tbar int = 3) }\");\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/quickfix/GoDeleteVarDefinitionQuickFixTest.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.quickfix;\n\nimport com.goide.inspections.unresolved.GoUnusedVariableInspection;\n\npublic class GoDeleteVarDefinitionQuickFixTest extends GoQuickFixTestBase {\n  @Override\n  public void setUp() throws Exception {\n    super.setUp();\n    myFixture.enableInspections(GoUnusedVariableInspection.class);\n  }\n  \n  public void testSimple() {\n    myFixture.configureByText(\"a.go\", \"package main; func main() { var vari<caret>able int = 2 }\");\n    applySingleQuickFix(\"Delete variable 'variable'\");\n    myFixture.checkResult(\"package main; func main() {}\");\n  }\n  \n  public void testRemoveFromMultiSpec() {\n    myFixture.configureByText(\"a.go\", \"package main; func main() { var (\\nfo<caret>o, bar int = 2, 3\\n) }\");\n    applySingleQuickFix(\"Delete variable 'foo'\");\n    myFixture.checkResult(\"package main; func main() { var (\\n\" +\n                          \"bar int = 3\\n\" +\n                          \") }\");\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/quickfix/GoEmptySignatureQuickFixTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.quickfix;\n\npublic class GoEmptySignatureQuickFixTest extends GoQuickFixTestBase {\n  public void testSimple() {\n    myFixture.configureByText(\"a.go\", \"package main; func main() <caret>int {}\");\n    applySingleQuickFix(GoEmptySignatureQuickFix.QUICK_FIX_NAME);\n    myFixture.checkResult(\"package main; func main() {}\");\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/quickfix/GoExportedOwnDeclarationQuickFixTest.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.quickfix;\n\nimport com.goide.inspections.GoExportedOwnDeclarationInspection;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoExportedOwnDeclarationQuickFixTest extends GoQuickFixTestBase {\n  @Override\n  protected void setUp() throws Exception {\n    super.setUp();\n    myFixture.enableInspections(GoExportedOwnDeclarationInspection.class);\n  }\n\n  @NotNull\n  @Override\n  protected String getBasePath() {\n    return \"quickfixes/exported-own-declaration\";\n  }\n\n  public void testSingleLineMultipleExportedAndPrivateConsts() { doTest(GoExportedOwnDeclarationInspection.QUICK_FIX_NAME); }\n  public void testSingleLineMultipleConsts()                   { doTest(GoExportedOwnDeclarationInspection.QUICK_FIX_NAME); }\n  public void testSingleLineMultipleVars()                     { doTest(GoExportedOwnDeclarationInspection.QUICK_FIX_NAME); }\n  public void testMultiLineMultipleConstsWithType()            { doTest(GoExportedOwnDeclarationInspection.QUICK_FIX_NAME); }\n  public void testMultiLineMultipleConstsWithoutType()         { doTest(GoExportedOwnDeclarationInspection.QUICK_FIX_NAME); }\n  public void testMultiLineMultipleVarsOnlyType()              { doTest(GoExportedOwnDeclarationInspection.QUICK_FIX_NAME); }\n  public void testMultiLineMultipleVarsWithTypeAndValues()     { doTest(GoExportedOwnDeclarationInspection.QUICK_FIX_NAME); }\n  public void testMultiLineMultipleVarsOnlyValues()            { doTest(GoExportedOwnDeclarationInspection.QUICK_FIX_NAME); }\n}\n"
  },
  {
    "path": "tests/com/goide/quickfix/GoIntroduceFunctionFixTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.quickfix;\n\nimport com.goide.SdkAware;\nimport com.goide.inspections.unresolved.GoUnresolvedReferenceInspection;\nimport com.intellij.psi.PsiFile;\nimport org.jetbrains.annotations.NotNull;\n\n@SdkAware\npublic class GoIntroduceFunctionFixTest extends GoQuickFixTestBase {\n\n  private final static String QUICK_FIX_NAME = \"Create function asd\";\n\n  @Override\n  protected void setUp() throws Exception {\n    super.setUp();\n    myFixture.enableInspections(GoUnresolvedReferenceInspection.class);\n  }\n\n  public void testSimpleFunction() {\n    doTest(QUICK_FIX_NAME, false);\n  }\n\n  public void testFuncWithOneParam() {\n    doTest(QUICK_FIX_NAME, false);\n  }\n\n  public void testFuncWithUnknownTypeParam() {\n    doTest(QUICK_FIX_NAME, false);\n  }\n\n  public void testFuncWithResultType() {\n    doTest(QUICK_FIX_NAME, false);\n  }\n\n  public void testFuncWithUnknownResultType() {\n    doTest(QUICK_FIX_NAME, false);\n  }\n\n  public void testFuncWithThreeParams() {\n    doTest(QUICK_FIX_NAME, false);\n  }\n\n  public void testFuncWithThreeResultValues() {\n    doTest(QUICK_FIX_NAME, false);\n  }\n\n  public void testDontCreate() {\n    doTestNoFix(QUICK_FIX_NAME, false);\n  }\n\n  public void testShortVarDecl() {\n    doTest(QUICK_FIX_NAME, false);\n  }\n\n  public void testInConstDeclaration() {\n    doTestNoFix(QUICK_FIX_NAME);\n  }\n\n  public void testVarSpec() {\n    doTest(QUICK_FIX_NAME, false);\n  }\n\n  public void testAsFunctionArg() {\n    doTest(QUICK_FIX_NAME, false);\n  }\n\n  public void testAsFunctionArg2() {\n    doTest(QUICK_FIX_NAME, false);\n  }\n\n  public void testAsFunctionArgWithoutReference() {\n    doTest(QUICK_FIX_NAME, false);\n  }\n\n  public void testWithChan() {\n    doTest(QUICK_FIX_NAME, false);\n  }\n\n  public void testInSamePackage() {\n    myFixture.configureByText(\"a.go\", \"package foo; type MyType int; func createMyType() MyType { return MyType{}};\");\n    myFixture.configureByText(\"b.go\", \"package foo; func _() { asd<caret>(createMyType());};\");\n    myFixture.doHighlighting();\n    applySingleQuickFix(QUICK_FIX_NAME);\n    myFixture.checkResult(\"package foo; func _() { asd(createMyType());}\\nfunc asd(myType MyType) {\\n\\t<caret>\\n};\");\n  }\n\n  public void testInOtherPackage() {\n    myFixture.addFileToProject(\"a/a.go\", \"package a; type MyType int; func CreateMyType() MyType { return MyType{}};\");\n    PsiFile file = myFixture.addFileToProject(\"b/b.go\", \"package b; import \\\"a\\\"; func _() { asd<caret>(a.CreateMyType());};\");\n    myFixture.configureFromExistingVirtualFile(file.getVirtualFile());\n    applySingleQuickFix(QUICK_FIX_NAME);\n    myFixture.checkResult(\"package b; import \\\"a\\\"; func _() { asd(a.CreateMyType());}\\nfunc asd(myType a.MyType) {\\n\\t<caret>\\n};\");\n  }\n\n  public void testInOtherPackageWithAlias() {\n    myFixture.addFileToProject(\"a/a.go\", \"package a; type MyType int; func CreateMyType() MyType { return MyType{}};\");\n    PsiFile file = myFixture.addFileToProject(\"b/b.go\", \"package b; import alias \\\"a\\\"; func _() { asd<caret>(alias.CreateMyType());};\");\n    myFixture.configureFromExistingVirtualFile(file.getVirtualFile());\n    applySingleQuickFix(QUICK_FIX_NAME);\n    myFixture\n      .checkResult(\"package b; import alias \\\"a\\\"; func _() { asd(alias.CreateMyType());}\\nfunc asd(myType alias.MyType) {\\n\\t<caret>\\n};\");\n  }\n\n  public void testInOtherPackageWithDotAlias() {\n    myFixture.addFileToProject(\"a/a.go\", \"package a; type MyType int; func CreateMyType() MyType { return MyType{}};\");\n    PsiFile file = myFixture.addFileToProject(\"b/b.go\", \"package b; import . \\\"a\\\"; func _() { asd<caret>(CreateMyType());};\");\n    myFixture.configureFromExistingVirtualFile(file.getVirtualFile());\n    applySingleQuickFix(QUICK_FIX_NAME);\n    myFixture.checkResult(\"package b; import . \\\"a\\\"; func _() { asd(CreateMyType());}\\nfunc asd(myType MyType) {\\n\\t<caret>\\n};\");\n  }\n\n  public void testInOtherPackageWithImportForSideEffects() {\n    myFixture.addFileToProject(\"a/a.go\", \"package a; type MyType int\");\n    myFixture.addFileToProject(\"b/b.go\", \"package b; import `a`; func CreateMyType() b.MyType {return b.MyType{}};\");\n    PsiFile file = myFixture.addFileToProject(\"c/c.go\", \"package c; import `b`; import _ `a`; func _() { asd<caret>(b.CreateMyType());};\");\n    myFixture.configureFromExistingVirtualFile(file.getVirtualFile());\n    applySingleQuickFix(QUICK_FIX_NAME);\n    myFixture.checkResult(\n      \"package c; import `b`; import _ `a`; func _() { asd(b.CreateMyType());}\\nfunc asd(myType interface{}) {\\n\\t<caret>\\n};\");\n  }\n\n  public void testInOtherPackageWithTwoAlias() {\n    myFixture.addFileToProject(\"c/c.go\", \"package c; type MyType int;\");\n    myFixture.addFileToProject(\"a/a.go\", \"package a; import myC \\\"c\\\" func CreateMyType() myC.MyType { return myC.MyType{}};\");\n    PsiFile file =\n      myFixture.addFileToProject(\"b/b.go\", \"package b; import (. \\\"a\\\"; importC \\\"c\\\"); func _() { asd<caret>(CreateMyType());};\");\n    myFixture.configureFromExistingVirtualFile(file.getVirtualFile());\n    applySingleQuickFix(QUICK_FIX_NAME);\n    myFixture\n      .checkResult(\n        \"package b; import (. \\\"a\\\"; importC \\\"c\\\"); func _() { asd(CreateMyType());}\\nfunc asd(myType importC.MyType) {\\n\\t<caret>\\n};\");\n  }\n\n  public void testInOtherPackageWithPrivateType() {\n    myFixture.addFileToProject(\"a/a.go\", \"package a; type myType int; func CreateMyType() myType { return myType{}};\");\n    PsiFile file = myFixture.addFileToProject(\"b/b.go\", \"package b; import . \\\"a\\\"; func _() { asd<caret>(CreateMyType());};\");\n    myFixture.configureFromExistingVirtualFile(file.getVirtualFile());\n    applySingleQuickFix(QUICK_FIX_NAME);\n    myFixture.checkResult(\"package b; import . \\\"a\\\"; func _() { asd(CreateMyType());}\\nfunc asd(myType interface{}) {\\n\\t<caret>\\n};\");\n  }\n\n  public void testInOtherPackageWithVendoring() {\n    myFixture.addFileToProject(\"a/vendor/c.go\", \"package c; type MyType int;\");\n    myFixture.addFileToProject(\"a/a.go\", \"package a; import myC \\\"vendor\\\" func CreateMyType() myC.MyType { return myC.MyType{}};\");\n    PsiFile file = myFixture.addFileToProject(\"b/b.go\", \"package b; import . \\\"a\\\"; func _() { asd<caret>(CreateMyType());};\");\n    myFixture.configureFromExistingVirtualFile(file.getVirtualFile());\n    applySingleQuickFix(QUICK_FIX_NAME);\n    myFixture.checkResult(\"package b; import . \\\"a\\\"; func _() { asd(CreateMyType());}\\nfunc asd(myType interface{}) {\\n\\t<caret>\\n};\");\n  }\n\n  public void testInOtherPackageWithChanOfImportedTypes() {\n    myFixture.addFileToProject(\"a/a.go\", \"package a; type MyType int; func CreateChanOfMyType() chan MyType { return nil};\");\n    PsiFile file = myFixture.addFileToProject(\"b/b.go\",\n                                              \"package b; import alias \\\"a\\\"; func _() { asd<caret>(alias.CreateChanOfMyType());};\");\n    myFixture.configureFromExistingVirtualFile(file.getVirtualFile());\n    applySingleQuickFix(QUICK_FIX_NAME);\n    myFixture.checkResult(\"package b; import alias \\\"a\\\"; \" +\n                          \"func _() { asd(alias.CreateChanOfMyType());}\\nfunc asd(myType chan alias.MyType) {\\n\\t<caret>\\n};\");\n  }\n\n  public void testInOtherPackageWithStruct() {\n    myFixture.addFileToProject(\"a/a.go\", \"package a; type MyType int; func CreateChanOfMyType() struct{ ch chan chan MyType} { return nil};\");\n    PsiFile file = myFixture.addFileToProject(\"b/b.go\",\n                                              \"package b; import alias \\\"a\\\"; func _() { asd<caret>(alias.CreateChanOfMyType());};\");\n    myFixture.configureFromExistingVirtualFile(file.getVirtualFile());\n    applySingleQuickFix(QUICK_FIX_NAME);\n    myFixture.checkResult(\"package b; import alias \\\"a\\\"; \" +\n                          \"func _() { asd(alias.CreateChanOfMyType());}\\nfunc asd(myType struct {ch chan chan alias.MyType}) {\\n\\t<caret>\\n};\");\n  }\n\n  @NotNull\n  @Override\n  protected String getBasePath() {\n    return \"quickfixes/introduce-function\";\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/quickfix/GoMoveToStructInitializationIntentionTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.quickfix;\n\nimport com.goide.intentions.GoMoveToStructInitializationIntention;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoMoveToStructInitializationIntentionTest extends GoQuickFixTestBase {\n  @NotNull\n  @Override\n  protected String getBasePath() {\n    return \"intentions/move-to-struct-initialization\";\n  }\n\n  private void doTest()                                     { doTest(GoMoveToStructInitializationIntention.NAME); }\n  private void doTestNoFix()                                { doTestNoFix(GoMoveToStructInitializationIntention.NAME); }\n\n  public void testSimple()                                  { doTest(); }\n  public void testFieldExchange()                           { doTest(); }\n  public void testCaretAtValue()                            { doTest(); }\n  public void testAnonymousField()                          { doTest(); }\n  public void testStructAssignment()                        { doTest(); }\n  public void testStructAssignmentMultipleAssignee()        { doTest(); }\n  public void testMultipleFieldsSameStructureCaretAtValue() { doTest(); }\n  public void testOneLineFieldDeclaration()                 { doTest(); }\n  public void testMultipleFields()                          { doTest(); }\n  public void testTwoSameStructures()                       { doTest(); }\n  public void testTwoSameStructuresAssignment()             { doTest(); }\n  public void testJustAssignedVar()                         { doTest(); }\n  public void testJustInitializedVar()                      { doTest(); }\n  public void testInvalidAssignment()                       { doTest(); }\n  public void testExistingField()                           { doTest(); }\n  public void testMultipleAssignmentsLeftmost()             { doTest(); }\n  public void testMultipleAssignmentsRightmost()            { doTest(); }\n  public void testMultipleAssignmentsMiddle()               { doTest(); }\n  public void testMultipleFieldsPartlyAssigned()            { doTest(); }\n  public void testWithParens()                              { doTest(); }\n  public void testFieldExtractedFromParens()                { doTest(); }\n\n  public void testDuplicateFields()                         { doTest(); }\n  public void testMultiReturnFunction()                     { doTestNoFix(); }\n  public void testWrongStruct()                             { doTestNoFix(); }\n  public void testExistingDeclaration()                     { doTestNoFix(); }\n  public void testNotExistingField()                        { doTestNoFix(); }\n  public void testJustAssignedVarWrongCaret()               { doTestNoFix(); }\n  public void testJustAssignedVarWrongCaretWithParens()     { doTestNoFix(); }\n  public void testJustInitializedVarWrongCaret()            { doTestNoFix(); }\n  public void testJustAssignedVarBothParens()               { doTestNoFix(); }\n  public void testJustAssignedFieldParens()                 { doTestNoFix(); }\n}\n\n"
  },
  {
    "path": "tests/com/goide/quickfix/GoMultiplePackagesQuickFixTest.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.quickfix;\n\nimport com.goide.inspections.GoMultiplePackagesInspection;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoMultiplePackagesQuickFixTest extends GoQuickFixTestBase {\n  @Override\n  protected void setUp() throws Exception {\n    super.setUp();\n    myFixture.enableInspections(GoMultiplePackagesInspection.class);\n  }\n\n  @NotNull\n  @Override\n  protected String getBasePath() {\n    return \"quickfixes/multiple-packages\";\n  }\n\n  public void testMultiplePackagesQuickFix() {\n    myFixture.configureByFile(\"c_test.go\");\n    myFixture.configureByFile(\"b.go\");\n    myFixture.configureByFile(\"b_test.go\");\n    myFixture.configureByFile(\"a.go\");\n\n    GoMultiplePackagesQuickFix.setTestingPackageName(\"a\", getTestRootDisposable());\n    applySingleQuickFix(\"Rename packages\");\n\n    myFixture.checkResultByFile(\"a.go\", \"a-after.go\", true);\n    myFixture.checkResultByFile(\"b.go\", \"b-after.go\", true);\n    myFixture.checkResultByFile(\"b_test.go\", \"b_test-after.go\", true);\n    myFixture.checkResultByFile(\"c_test.go\", \"c_test-after.go\", true);\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/quickfix/GoQuickFixTestBase.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.quickfix;\n\nimport com.goide.GoCodeInsightFixtureTestCase;\nimport com.intellij.codeInsight.intention.IntentionAction;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.List;\n\npublic abstract class GoQuickFixTestBase extends GoCodeInsightFixtureTestCase {\n  protected void doTest(@NotNull String quickFixName) {\n    doTest(quickFixName, false);\n  }\n\n  protected void doTest(@NotNull String quickFixName, boolean checkHighlighting) {\n    String testName = getTestName(true);\n    configure(checkHighlighting, testName);\n    applySingleQuickFix(quickFixName);\n    myFixture.checkResultByFile(testName + \"-after.go\", true);\n  }\n\n  protected void doTestNoFix(@NotNull String name) {\n    doTestNoFix(name, false);\n  }\n\n  protected void doTestNoFix(@NotNull String name, boolean checkHighlighting) {\n    configure(checkHighlighting, getTestName(true));\n    List<IntentionAction> availableIntentions = myFixture.filterAvailableIntentions(name);\n    assertEmpty(availableIntentions);\n  }\n\n  private void configure(boolean checkHighlighting, String testName) {\n    if (checkHighlighting) {\n      myFixture.testHighlighting(testName + \".go\");\n    }\n    else {\n      myFixture.configureByFile(testName + \".go\");\n      myFixture.doHighlighting();\n    }\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/quickfix/GoRenameFunctionQuickFixTest.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.quickfix;\n\nimport com.goide.inspections.unresolved.GoUnusedFunctionInspection;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoRenameFunctionQuickFixTest extends GoQuickFixTestBase {\n  @Override\n  protected void setUp() throws Exception {\n    super.setUp();\n    myFixture.enableInspections(GoUnusedFunctionInspection.class);\n  }\n\n  @NotNull\n  @Override\n  protected String getBasePath() {\n    return \"quickfixes/rename-function\";\n  }\n\n  public void testSimple() {\n    doTest(GoRenameToBlankQuickFix.NAME);\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/quickfix/GoRenameVarQuickFixTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.quickfix;\n\nimport com.goide.inspections.unresolved.GoUnusedVariableInspection;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoRenameVarQuickFixTest extends GoQuickFixTestBase {\n  @Override\n  protected void setUp() throws Exception {\n    super.setUp();\n    myFixture.enableInspections(GoUnusedVariableInspection.class);\n  }\n\n  @NotNull\n  @Override\n  protected String getBasePath() {\n    return \"quickfixes/rename-var\";\n  }\n\n  public void testSimple()                                    { doTest(GoRenameToBlankQuickFix.NAME);      }\n  public void testProhibited()                                { doTestNoFix(GoRenameToBlankQuickFix.NAME); }\n  public void testRenameAndReplaceWithAssignment_1()          { doTest(GoRenameToBlankQuickFix.NAME);      }\n  public void testRenameAndReplaceWithAssignment_2()          { doTest(GoRenameToBlankQuickFix.NAME);      }\n  public void testRenameAndReplaceWithAssignment_3()          { doTest(GoRenameToBlankQuickFix.NAME);      }\n  public void testRenameAndReplaceWithAssignmentOnRange()     { doTest(GoRenameToBlankQuickFix.NAME);      }\n}\n"
  },
  {
    "path": "tests/com/goide/quickfix/GoReplaceWithAssignmentStatementQuickFixTest.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.quickfix;\n\nimport com.goide.inspections.GoNoNewVariablesInspection;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoReplaceWithAssignmentStatementQuickFixTest extends GoQuickFixTestBase {\n  @Override\n  protected void setUp() throws Exception {\n    super.setUp();\n    myFixture.enableInspections(GoNoNewVariablesInspection.class);\n  }\n\n  @NotNull\n  @Override\n  protected String getBasePath() {\n    return \"quickfixes/replace-with-assignment\";\n  }\n\n  public void testSimple() {\n    doTest(GoNoNewVariablesInspection.QUICK_FIX_NAME);\n  }\n\n  public void testSeveralAssignments() {\n    doTest(GoNoNewVariablesInspection.QUICK_FIX_NAME);\n  }\n  \n  public void testRecvStatement() {\n    doTest(GoNoNewVariablesInspection.QUICK_FIX_NAME);\n  }\n  \n  public void testRecvStatementInSelect() {\n    doTest(GoNoNewVariablesInspection.QUICK_FIX_NAME);\n  }\n  \n  public void testRangeClause() {\n    doTest(GoNoNewVariablesInspection.QUICK_FIX_NAME);\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/quickfix/GoReplaceWithDeclarationQuickFixTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.quickfix;\n\nimport com.goide.inspections.unresolved.GoReplaceAssignmentWithDeclarationQuickFix;\nimport com.goide.inspections.unresolved.GoUnresolvedReferenceInspection;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoReplaceWithDeclarationQuickFixTest extends GoQuickFixTestBase {\n  @Override\n  protected void setUp() throws Exception {\n    super.setUp();\n    myFixture.enableInspections(GoUnresolvedReferenceInspection.class);\n  }\n\n  @NotNull\n  @Override\n  protected String getBasePath() {\n    return \"quickfixes/replace-with-declaration\";\n  }\n\n  public void testOnRecv() {\n    doTest(GoReplaceAssignmentWithDeclarationQuickFix.QUICK_FIX_NAME);\n  }\n\n  public void testOnRange() {\n    doTest(GoReplaceAssignmentWithDeclarationQuickFix.QUICK_FIX_NAME);\n  }\n\n  public void testOnAssignment() {\n    doTest(GoReplaceAssignmentWithDeclarationQuickFix.QUICK_FIX_NAME);\n  }\n\n  public void testOnChanRead() {\n    doTestNoFix(GoReplaceAssignmentWithDeclarationQuickFix.QUICK_FIX_NAME);\n  }\n\n  public void testOnTopLevel() {\n    doTestNoFix(GoReplaceAssignmentWithDeclarationQuickFix.QUICK_FIX_NAME);\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/quickfix/GoReplaceWithImportForSideEffectsQuickFixTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.quickfix;\n\nimport com.goide.SdkAware;\nimport com.goide.inspections.GoUnusedImportInspection;\n\n@SdkAware\npublic class GoReplaceWithImportForSideEffectsQuickFixTest extends GoQuickFixTestBase {\n  @Override\n  public void setUp() throws Exception {\n    super.setUp();\n    myFixture.enableInspections(GoUnusedImportInspection.class);\n  }\n\n  public void testSimple() {\n    myFixture.configureByText(\"a.go\", \"package pack; import \\\"fm<caret>t\\\"\");\n    applySingleQuickFix(\"Import for side-effects\");\n    myFixture.checkResult(\"package pack; import _ \\\"fmt\\\"\");\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/quickfix/GoReplaceWithSelectStatementQuickFixTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.quickfix;\n\nimport com.goide.inspections.GoInfiniteForInspection;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoReplaceWithSelectStatementQuickFixTest extends GoQuickFixTestBase {\n  @Override\n  protected void setUp() throws Exception {\n    super.setUp();\n    myFixture.enableInspections(GoInfiniteForInspection.class);\n  }\n\n  @NotNull\n  @Override\n  protected String getBasePath() {\n    return \"quickfixes/replace-with-select\";\n  }\n\n  public void testSimple() {\n    doTest(GoReplaceWithSelectStatementQuickFix.QUICK_FIX_NAME);\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/refactor/GoIntroduceVariableTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.refactor;\n\nimport com.goide.GoCodeInsightFixtureTestCase;\nimport com.intellij.refactoring.RefactoringBundle;\nimport com.intellij.refactoring.util.CommonRefactoringUtil;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoIntroduceVariableTest extends GoCodeInsightFixtureTestCase {\n  @NotNull\n  @Override\n  protected String getBasePath() {\n    return \"refactor/introduce-variable\";\n  }\n\n  private void doTest() {\n    doTest(true);\n  }\n\n  private void doTest(boolean replaceAll) {\n    String testName = getTestName(true);\n    myFixture.configureByFile(testName + \".go\");\n    GoIntroduceVariableBase.performAction(new GoIntroduceOperation(getProject(), myFixture.getEditor(), myFixture.getFile(), replaceAll));\n    myFixture.checkResultByFile(testName + \"-after.go\");\n  }\n\n  private void doFailureTest(String msg) {\n    try {\n      doTest();\n      fail(\"Shouldn't be performed\");\n    }\n    catch (CommonRefactoringUtil.RefactoringErrorHintException e) {\n      assertEquals(\"Cannot perform refactoring.\\n\" + msg, e.getMessage());\n    }\n  }\n\n  public void testCaretAfterRightParenthesis()                      { doTest(); }\n  public void testCaretOnRightParenthesis()                         { doTest(); }\n  public void testCaretOnCallParenthesis()                          { doTest(); }\n  public void testNameSuggestOnGetterFunction()                     { doTest(); }\n  public void testNameSuggestOnDefaultName()                        { doTest(); }\n  public void testNameSuggestOnParamName()                          { doTest(); }\n  public void testNameSuggestOnType()                               { doTest(); }\n  public void testNameSuggestOnArrayType()                          { doTest(); }\n  public void testDoNotSuggestKeywordBasedOnType()                  { doTest(); }\n  public void testDoNotSuggestKeywordBasedOnCallName()              { doTest(); }\n  public void testDoNotSuggestNameEqualsToType()                    { doTest(); }\n  public void testExtractFunctionLiteral()                          { doTest(); }\n  \n  public void testExtractSingleExpressionStatement_1()              { doTest(); }\n  public void testExtractSingleExpressionStatement_2()              { doTest(); }\n  public void testExtractSingleExpressionStatement_3()              { doTest(); }\n\n  public void testCompositeLiteral()                                { doTest(); }\n  public void testIndexedExpression()                               { doTest(); }\n  public void testConversion()                                      { doTest(); }\n\n  public void testVoidExpression()      { doFailureTest(\"Expression fmt.Println() returns multiple values.\"); }\n  public void testVoidCallExpression()  { doFailureTest(\"Expression fmt.Println() returns multiple values.\"); }\n  public void testWrongSelection()      { doFailureTest(RefactoringBundle.message(\"selected.block.should.represent.an.expression\")); }\n  public void testTopLevelExpression()  { doFailureTest(RefactoringBundle.message(\"refactoring.introduce.context.error\"));}\n\n  public void testReplaceAll()          { doTest(true); }\n  public void testReplaceOnly()         { doTest(false);}\n\n  public void testTwoOccurrences()      { doTest(true);}\n}\n"
  },
  {
    "path": "tests/com/goide/regexp/GoRegExpLanguageTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.regexp;\n\nimport com.goide.GoCodeInsightFixtureTestCase;\nimport com.goide.SdkAware;\n\n@SdkAware\npublic class GoRegExpLanguageTest extends GoCodeInsightFixtureTestCase {\n  public void testInjectingAndHighlighting() {\n    // myFixture.testHighlighting(getTestName(true) + \".go\");\n  }\n\n  @Override\n  protected String getBasePath() {\n    return \"regexp\";\n  }\n}"
  },
  {
    "path": "tests/com/goide/rename/GoRenameTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.rename;\n\nimport com.goide.GoCodeInsightFixtureTestCase;\nimport com.intellij.refactoring.util.CommonRefactoringUtil;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoRenameTest extends GoCodeInsightFixtureTestCase {\n  public void testAnonymousField() {\n    doTest(\"package foo; type A struct {*A}; func foo(a A) {a.<caret>A}\", \"B\",\n           \"package foo; type B struct { *B }; func foo(a B) {a.B\\n}\");\n  }\n\n  public void testType() {\n    doTest(\"package foo; type A<caret> struct {*A}; func foo(a A) {a.A}\", \"B\",\n           \"package foo; type B struct { *B }; func foo(a B) {a.B\\n}\");\n  }\n  \n  public void testLabel() {\n    doTest(\"package foo; func foo() {a:{}; goto <caret>a}\", \"b\", \"package foo; func foo() {\\n\\tb:{}; goto b\\n}\");\n  }\n\n  public void testAliasQualifier() {\n    doTest(\"package foo; import a \\\"fmt\\\"; func c() { a<caret>.Println() }\", \"b\",\n           \"package foo; import b \\\"fmt\\\"; func c() { b<caret>.Println() }\");\n  }\n\n  public void testImportAlias() {\n    doTest(\"package foo; import <caret>a \\\"fmt\\\"; func foo() { a.Println() }\", \"b\",\n           \"package foo; import <caret>b \\\"fmt\\\"; func foo() { b.Println() }\");\n  }\n\n  public void testDotImportAlias() {\n    doTestDoNotRename(\"package foo; import <caret>. \\\"fmt\\\"\");\n  }\n\n  public void testBlankImportAlias() {\n    doTestDoNotRename(\"package foo; import <caret>_ \\\"fmt\\\"\");\n  }\n\n  public void testNullAlias() {\n    doTestDoNotRename(\"package foo; import <caret>\\\"fmt\\\"\");\n  }\n\n  public void testPackageQualifier() {\n    doTestDoNotRename(\"package foo; import \\\"fmt\\\" func foo() { <caret>fmt.Println() }\");\n  }\n\n  private void doTest(@NotNull String before, @NotNull String newName, @NotNull String after) {\n    myFixture.configureByText(\"foo.go\", before);\n    myFixture.renameElementAtCaret(newName);\n    myFixture.checkResult(after);\n  }\n\n  private void doTestDoNotRename(@NotNull String text) {\n    myFixture.configureByText(\"foo.go\", text);\n    try {\n      myFixture.renameElementAtCaret(\"bar\");\n      fail(\"Shouldn't be performed\");\n    }\n    catch (CommonRefactoringUtil.RefactoringErrorHintException e) {\n      assertEquals(\"This element cannot be renamed\", e.getMessage());\n    }\n    myFixture.checkResult(text);\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/runconfig/GoConsoleFilterTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig;\n\nimport com.goide.GoCodeInsightFixtureTestCase;\nimport com.goide.project.GoApplicationLibrariesService;\nimport com.intellij.execution.filters.Filter;\nimport com.intellij.execution.filters.HyperlinkInfo;\nimport com.intellij.execution.filters.OpenFileHyperlinkInfo;\nimport com.intellij.openapi.application.ApplicationManager;\nimport com.intellij.openapi.fileEditor.OpenFileDescriptor;\nimport com.intellij.openapi.util.ThrowableComputable;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.io.IOException;\nimport java.util.List;\n\npublic class GoConsoleFilterTest extends GoCodeInsightFixtureTestCase {\n  private GoConsoleFilter myFilter;\n\n  @Override\n  protected void setUp() throws Exception {\n    super.setUp();\n    VirtualFile workingDirectory = createTestRoot(\"workingDirectory\");\n    VirtualFile goPath = createTestRoot(\"goPath\");\n    GoApplicationLibrariesService.getInstance().setLibraryRootUrls(goPath.getUrl());\n    myFilter = new GoConsoleFilter(myFixture.getProject(), myFixture.getModule(), workingDirectory.getUrl());\n  }\n\n  @Override\n  protected void tearDown() throws Exception {\n    myFilter = null;\n    super.tearDown();\n  }\n  \n  public void testFileNameInParens() {\n    doFileLineTest(\"Message (nestedWorkingDirectory.go) with file\", 9, 34, \"/src/workingDirectory/src/nestedWorkingDirectory.go\", 1, 1);\n  }\n  \n  public void testSimpleFileName() {\n    doFileLineTest(\"nestedWorkingDirectory.go:57\", 0, 28, \"/src/workingDirectory/src/nestedWorkingDirectory.go\", 57, 1);\n  }\n  \n  public void testAbsolutePath() {\n    doFileLineTest(\"\\t/src/goPath/src/nestedGoPath.go:57: expected operand, found '<'\",\n                   1, 35, \"/src/goPath/src/nestedGoPath.go\", 57, 1);\n  }\n  \n  public void testAbsolutePathWithoutColumn() {\n    doFileLineTest(\"\\t/src/goPath/src/nestedGoPath.go:57:1: expected operand, found '<'\",\n                   1, 37, \"/src/goPath/src/nestedGoPath.go\", 57, 1);\n  }\n  \n  public void testAbsolutePathWithLoggingTime() {\n    doFileLineTest(\"2015/03/30 09:15:13 /src/goPath/src/nestedGoPath.go:57:1: expected operand, found '<'\",\n                   20, 56, \"/src/goPath/src/nestedGoPath.go\", 57, 1);\n  }\n\n  public void testRelativeToWorkingDirectory() {\n    doFileLineTest(\"src/nestedWorkingDirectory.go:5:5: found packages file.go (main) and file2.go (my) in /Some/path/to/directory\",\n                   0, 33, \"/src/workingDirectory/src/nestedWorkingDirectory.go\", 5, 5);\n  }\n\n  public void testRelativeToGoPath() {\n    doFileLineTest(\"src/nestedGoPath.go:2: found packages file.go (main) and file2.go (my) in /Some/path/to/directory\",\n                   0, 21, \"/src/goPath/src/nestedGoPath.go\", 2, 1);\n  }\n\n  public void testAppEngineFullPaths() {\n    doFileLineTest(\"/var/folders/m8/8sm6vlls2cs8xdmgs16y27zh0000gn/T/tmpzNDwX9appengine-go-bin/nestedGoPath.go:5:9: error\",\n                   0, 94, \"/src/goPath/src/nestedGoPath.go\", 5, 9);\n  }\n\n  public void testGoGetLines() {\n    doGoGetTest(\"\\tgo get golang.org/x/tools/cmd/cover\", 1, 36, \"golang.org/x/tools/cmd/cover\");\n  }\n\n  private void doGoGetTest(@NotNull String line, int startOffset, int endOffset, @NotNull String packageName) {\n    Filter.Result result = myFilter.applyFilter(line, line.length());\n    assertNotNull(result);\n    HyperlinkInfo info = assertResultAndGetHyperlink(result, startOffset, endOffset);\n    assertInstanceOf(info, GoConsoleFilter.GoGetHyperlinkInfo.class);\n    assertEquals(packageName, ((GoConsoleFilter.GoGetHyperlinkInfo)info).getPackageName());\n  }\n\n  private void doFileLineTest(@NotNull String line, int startOffset, int endOffset, String targetPath, int targetLine, int targetColumn) {\n    Filter.Result result = myFilter.applyFilter(line, line.length());\n    assertNotNull(result);\n    HyperlinkInfo info = assertResultAndGetHyperlink(result, startOffset, endOffset);\n    assertInstanceOf(info, OpenFileHyperlinkInfo.class);\n    OpenFileDescriptor fileDescriptor = ((OpenFileHyperlinkInfo)info).getDescriptor();\n    assertNotNull(fileDescriptor);\n    assertEquals(targetPath, fileDescriptor.getFile().getPath());\n    assertEquals(\"line\", targetLine, fileDescriptor.getLine() + 1);\n    assertEquals(\"column\", targetColumn, fileDescriptor.getColumn() + 1);\n  }\n\n  @NotNull\n  private static HyperlinkInfo assertResultAndGetHyperlink(@NotNull Filter.Result result, int startOffset, int endOffset) {\n    List<Filter.ResultItem> items = result.getResultItems();\n    assertSize(1, items);\n    Filter.ResultItem item = ContainerUtil.getFirstItem(items);\n    assertNotNull(item);\n    assertEquals(\"start\", startOffset, item.getHighlightStartOffset());\n    assertEquals(\"end\", endOffset, item.getHighlightEndOffset());\n    HyperlinkInfo hyperlinkInfo = item.getHyperlinkInfo();\n    assertNotNull(hyperlinkInfo);\n    return hyperlinkInfo;\n  }\n\n  @NotNull\n  private VirtualFile createTestRoot(@NotNull String rootName) throws IOException {\n    return ApplicationManager.getApplication().runWriteAction(new ThrowableComputable<VirtualFile, IOException>() {\n      @NotNull\n      @Override\n      public VirtualFile compute() throws IOException {\n        VirtualFile workingDirectory = myFixture.getTempDirFixture().findOrCreateDir(rootName);\n        workingDirectory.createChildData(this, rootName + \".go\");\n        VirtualFile childDirectory = workingDirectory.createChildDirectory(this, \"src\");\n        childDirectory.createChildData(this, \"nested\" + Character.toUpperCase(rootName.charAt(0)) + rootName.substring(1) + \".go\");\n        return workingDirectory;\n      }\n    });\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/runconfig/GoRunConfigurationProducerTest.java",
    "content": "package com.goide.runconfig;\n\nimport com.goide.runconfig.application.GoApplicationConfiguration;\nimport com.goide.runconfig.application.GoApplicationRunConfigurationProducer;\nimport com.goide.runconfig.application.GoApplicationRunConfigurationType;\nimport com.goide.runconfig.file.GoRunFileConfiguration;\nimport com.goide.runconfig.file.GoRunFileConfigurationProducer;\nimport com.goide.runconfig.file.GoRunFileConfigurationType;\nimport com.intellij.execution.actions.ConfigurationContext;\nimport com.intellij.psi.PsiDirectory;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\n\npublic class GoRunConfigurationProducerTest extends GoRunConfigurationTestCase {\n  public void testTestFile_test() {\n    doTestProducedConfigurations();\n  }\n\n  public void testFileWithMain() {\n    doTestProducedConfigurations();\n  }\n\n  public void testFileWithMainButNotMainPackage() {\n    doTestProducedConfigurations();\n  }\n\n  public void testFileWithoutMain() {\n    doTestProducedConfigurations();\n  }\n\n  public void testPackageClause() {\n    doTestProducedConfigurations();\n  }\n\n  public void testDirectory() {\n    PsiFile file = myFixture.addFileToProject(\"import/path/a.go\", \"package main; func main(){}\");\n    doTestProducedConfigurations(file.getParent());\n  }\n\n  public void testSameRunFileConfigurationOnFile() {\n    PsiFile file = myFixture.configureByText(\"a.go\", \"package main; <caret>\\nfunc main() {}\");\n    PsiElement at = file.findElementAt(myFixture.getCaretOffset());\n    assertNotNull(at);\n    ConfigurationContext configurationContext = new ConfigurationContext(at);\n    GoRunFileConfigurationProducer producer = new GoRunFileConfigurationProducer();\n\n    GoRunFileConfiguration runConfiguration = createFileConfiguration(file.getVirtualFile().getPath());\n    assertTrue(producer.isConfigurationFromContext(runConfiguration, configurationContext));\n\n    runConfiguration = createFileConfiguration(file.getVirtualFile().getPath() + \"_vl\");\n    assertFalse(producer.isConfigurationFromContext(runConfiguration, configurationContext));\n  }\n\n  public void testSameRunApplicationConfigurationOnFile() {\n    PsiFile file = myFixture.configureByText(\"a.go\", \"package main; <caret>\\nfunc main() {}\");\n    PsiElement at = file.findElementAt(myFixture.getCaretOffset());\n    assertNotNull(at);\n    ConfigurationContext configurationContext = new ConfigurationContext(at);\n    GoRunFileConfigurationProducer producer = new GoRunFileConfigurationProducer();\n\n    GoRunFileConfiguration runConfiguration = createFileConfiguration(file.getVirtualFile().getPath());\n    assertTrue(producer.isConfigurationFromContext(runConfiguration, configurationContext));\n\n    runConfiguration = createFileConfiguration(file.getVirtualFile().getPath() + \"_vl\");\n    assertFalse(producer.isConfigurationFromContext(runConfiguration, configurationContext));\n  }\n\n  public void testSameRunApplicationConfigurationOnPackage() {\n    PsiFile file = myFixture.configureByText(\"a.go\", \"package main; <caret>\\nfunc main() {}\");\n    PsiElement at = file.findElementAt(myFixture.getCaretOffset());\n    assertNotNull(at);\n    ConfigurationContext configurationContext = new ConfigurationContext(at);\n    GoApplicationRunConfigurationProducer producer = new GoApplicationRunConfigurationProducer();\n\n    GoApplicationConfiguration runConfiguration = createRunAppFileConfiguration(file.getVirtualFile().getPath());\n    assertTrue(producer.isConfigurationFromContext(runConfiguration, configurationContext));\n\n    runConfiguration = createRunAppFileConfiguration(file.getVirtualFile().getPath() + \"_vl\");\n    assertFalse(producer.isConfigurationFromContext(runConfiguration, configurationContext));\n  }\n\n  public void testSameRunApplicationConfigurationOnDirectory() {\n    PsiFile file = myFixture.addFileToProject(\"import/path/a.go\", \"package main; func main(){}\");\n    PsiDirectory directory = file.getParent();\n    assertNotNull(directory);\n    ConfigurationContext configurationContext = new ConfigurationContext(directory);\n    GoApplicationRunConfigurationProducer producer = new GoApplicationRunConfigurationProducer();\n\n    GoApplicationConfiguration runConfiguration = createRunAppPackageConfiguration(\"import/path\");\n    assertTrue(producer.isConfigurationFromContext(runConfiguration, configurationContext));\n\n    runConfiguration = createRunAppPackageConfiguration(\"import/path/other\");\n    assertFalse(producer.isConfigurationFromContext(runConfiguration, configurationContext));\n  }\n\n  private GoRunFileConfiguration createFileConfiguration(String filePath) {\n    GoRunFileConfigurationType type = GoRunFileConfigurationType.getInstance();\n    GoRunFileConfiguration result = new GoRunFileConfiguration(myFixture.getProject(), \"run file\", type);\n    result.setFilePath(filePath);\n    return result;\n  }\n\n  private GoApplicationConfiguration createRunAppFileConfiguration(String filePath) {\n    GoRunFileConfigurationType type = GoRunFileConfigurationType.getInstance();\n    GoApplicationConfiguration result = new GoApplicationConfiguration(myFixture.getProject(), \"run file\", type);\n    result.setKind(GoApplicationConfiguration.Kind.FILE);\n    result.setFilePath(filePath);\n    return result;\n  }\n\n  private GoApplicationConfiguration createRunAppPackageConfiguration(String importPath) {\n    GoApplicationRunConfigurationType type = GoApplicationRunConfigurationType.getInstance();\n    GoApplicationConfiguration result = new GoApplicationConfiguration(myFixture.getProject(), \"run package\", type);\n    result.setKind(GoApplicationConfiguration.Kind.PACKAGE);\n    result.setPackage(importPath);\n    return result;\n  }\n\n\n  @Override\n  protected String getBasePath() {\n    return \"running/producer\";\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/runconfig/GoRunConfigurationTestCase.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig;\n\nimport com.goide.GoCodeInsightFixtureTestCase;\nimport com.goide.SdkAware;\nimport com.intellij.execution.actions.ConfigurationContext;\nimport com.intellij.execution.actions.ConfigurationFromContext;\nimport com.intellij.execution.configurations.RunConfiguration;\nimport com.intellij.openapi.util.JDOMUtil;\nimport com.intellij.openapi.util.WriteExternalException;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.psi.PsiElement;\nimport org.jdom.Element;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.util.List;\n\n@SdkAware\npublic abstract class GoRunConfigurationTestCase extends GoCodeInsightFixtureTestCase {\n  protected void doTestProducedConfigurations() {\n    VirtualFile file = myFixture.copyFileToProject(getTestName(true) + \".go\", \"import/path/\" + getTestName(true) + \".go\");\n    myFixture.configureFromExistingVirtualFile(file);\n    doTestProducedConfigurations(myFixture.getFile().findElementAt(myFixture.getCaretOffset()));\n  }\n\n  protected void doTestProducedConfigurations(@Nullable PsiElement context) {\n    assertNotNull(context);\n    ConfigurationContext configurationContext = new ConfigurationContext(context);\n    List<ConfigurationFromContext> configurationAndSettings = configurationContext.getConfigurationsFromContext();\n    Element configurationsElement = new Element(\"configurations\");\n    if (configurationAndSettings != null) {\n      for (ConfigurationFromContext setting : configurationAndSettings) {\n        try {\n          RunConfiguration configuration = setting.getConfiguration();\n          Element configurationElement = new Element(\"configurations\");\n          configurationElement.setAttribute(\"name\", configuration.getName());\n          configurationElement.setAttribute(\"class\", configuration.getClass().getSimpleName());\n          configuration.writeExternal(configurationElement);\n          configurationsElement.addContent(configurationElement);\n        }\n        catch (WriteExternalException e) {\n          throw new RuntimeException(e);\n        }\n      }\n    }\n    assertSameLinesWithFile(getTestDataPath() + \"/\" + getTestName(true) + \".xml\", JDOMUtil.writeElement(configurationsElement));\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/runconfig/testing/GoEventsConverterTestCase.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.testing;\n\nimport com.goide.GoCodeInsightFixtureTestCase;\nimport com.intellij.execution.Executor;\nimport com.intellij.execution.executors.DefaultRunExecutor;\nimport com.intellij.execution.process.ProcessOutputTypes;\nimport com.intellij.execution.testframework.sm.runner.OutputToGeneralTestEventsConverter;\nimport com.intellij.openapi.util.Disposer;\nimport com.intellij.openapi.util.io.FileUtil;\nimport com.intellij.openapi.vfs.CharsetToolkit;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.io.File;\nimport java.io.IOException;\nimport java.text.ParseException;\n\npublic abstract class GoEventsConverterTestCase extends GoCodeInsightFixtureTestCase {\n  protected void doTest() {\n    Executor executor = new DefaultRunExecutor();\n    GoTestRunConfiguration runConfig = new GoTestRunConfiguration(myFixture.getProject(), \"\", GoTestRunConfigurationType.getInstance());\n    runConfig.setTestFramework(getTestFramework());\n    GoTestConsoleProperties consoleProperties = new GoTestConsoleProperties(runConfig, executor);\n    GoTestEventsConverterBase converter =\n      (GoTestEventsConverterBase)consoleProperties.createTestEventsConverter(\"gotest\", consoleProperties);\n\n    LoggingServiceMessageVisitor serviceMessageVisitor = new LoggingServiceMessageVisitor();\n    try {\n      for (String line : FileUtil.loadLines(new File(getTestDataPath(), getTestName(true) + \".txt\"), CharsetToolkit.UTF8)) {\n        converter.processServiceMessages(line + \"\\n\", ProcessOutputTypes.STDOUT, serviceMessageVisitor);\n      }\n    }\n    catch (IOException | ParseException e) {\n      throw new RuntimeException(e);\n    }\n    ((OutputToGeneralTestEventsConverter)converter).flushBufferBeforeTerminating();\n    Disposer.dispose((OutputToGeneralTestEventsConverter)converter);\n    assertSameLinesWithFile(getTestDataPath() + \"/\" + getTestName(true) + \"-expected.txt\", serviceMessageVisitor.getLog());\n  }\n\n  @NotNull\n  protected abstract GoTestFramework getTestFramework();\n}\n\n"
  },
  {
    "path": "tests/com/goide/runconfig/testing/GoRunLineMarkerTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.testing;\n\nimport com.goide.runconfig.GoRunConfigurationTestCase;\n\npublic class GoRunLineMarkerTest extends GoRunConfigurationTestCase {\n  public void testRunTestLineMarker() {\n    myFixture.configureByText(\"a_test.go\", \"package <caret>main\\n\" +\n                                           \"import .`gopkg.in/check.v1`\\n\" +\n                                           \"func TestName(){}\\n\" +\n                                           \"func BenchmarkName(){}\\n\" +\n                                           \"func ExampleName(){}\\n\" +\n                                           \"type MySuite struct{}\\n\" +\n                                           \"var _ = Suite(&MySuite{})\\n\" +\n                                           \"func (s *MySuite) TestHelloWorld(c *C) {}\\n\" +\n                                           \"func Hello() {}\");\n    assertEquals(1, myFixture.findGuttersAtCaret().size());\n    assertEquals(5, myFixture.findAllGutters().size());\n  }\n\n  public void testRunLineMarker() {\n    myFixture.configureByText(\"a.go\", \"package main\\n\" +\n                                      \"func <caret>main(){}\");\n    assertEquals(1, myFixture.findGuttersAtCaret().size());\n    assertEquals(1, myFixture.findAllGutters().size());\n  }\n\n  public void testRunLineMarkerInNonMainFile() {\n    myFixture.configureByText(\"a.go\", \"package not_main\\n\" +\n                                      \"func <caret>main(){}\");\n    assertEquals(0, myFixture.findGuttersAtCaret().size());\n    assertEquals(0, myFixture.findAllGutters().size());\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/runconfig/testing/GoTestRunConfigurationProducerTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.testing;\n\nimport com.goide.runconfig.GoRunConfigurationTestCase;\nimport com.goide.runconfig.testing.frameworks.gobench.GobenchFramework;\nimport com.goide.runconfig.testing.frameworks.gobench.GobenchRunConfigurationProducer;\nimport com.goide.runconfig.testing.frameworks.gotest.GotestFramework;\nimport com.goide.runconfig.testing.frameworks.gotest.GotestRunConfigurationProducer;\nimport com.intellij.execution.actions.ConfigurationContext;\nimport com.intellij.execution.actions.RunConfigurationProducer;\nimport com.intellij.psi.PsiDirectory;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiFile;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoTestRunConfigurationProducerTest extends GoRunConfigurationTestCase {\n  public void testDirectory() {\n    PsiFile file = myFixture.configureByText(\"a.go\", \"package main\");\n    doTestProducedConfigurations(file.getParent());\n  }\n\n  public void testPackage_test() {\n    PsiFile file = myFixture.addFileToProject(\"import/path/package_test.go\", \"package ma<caret>in; import `gopkg.in/check.v1`\");\n    myFixture.configureFromExistingVirtualFile(file.getVirtualFile());\n    doTestProducedConfigurations(myFixture.getFile().findElementAt(myFixture.getCaretOffset()));\n  }\n\n  public void testFileWithoutTest_test() {\n    doTestProducedConfigurations();\n  }\n\n  public void testNonTestFile() {\n    doTestProducedConfigurations();\n  }\n\n  public void testFileWithTestsOnly_test() {\n    doTestProducedConfigurations();\n  }\n\n  public void testFileWithBenchmarksOnly_test() {\n    doTestProducedConfigurations();\n  }\n\n  public void testFileWithGocheckTestsOnly_test() {\n    doTestProducedConfigurations();\n  }\n\n  public void testFileWithTestsAndBenchmarks_test() {\n    doTestProducedConfigurations();\n  }\n\n  public void testSimpleFunction_test() {\n    doTestProducedConfigurations();\n  }\n\n  public void testSimpleFunctionInFileWithTests_test() {\n    doTestProducedConfigurations();\n  }\n\n  public void testBenchmarkFunction_test() {\n    doTestProducedConfigurations();\n  }\n\n  public void testExampleFunction_test() {\n    doTestProducedConfigurations();\n  }\n\n  public void testTestFunction_test() {\n    doTestProducedConfigurations();\n  }\n\n  public void testGocheckMethod_test() {\n    doTestProducedConfigurations();\n  }\n\n  public void testTestFunctionNonTestFile() {\n    doTestProducedConfigurations();\n  }\n\n  public void testSameConfigurationOnFunction() {\n    PsiFile file = myFixture.addFileToProject(\"import/path/a_test.go\", \"package main; func TestName() {<caret>}\");\n    myFixture.configureFromExistingVirtualFile(file.getVirtualFile());\n    ConfigurationContext configurationContext = createConfigurationContext();\n    RunConfigurationProducer<GoTestRunConfiguration> producer = new GotestRunConfigurationProducer();\n\n    GoTestRunConfiguration runConfiguration = createPackageConfiguration(GotestFramework.INSTANCE, \"^TestName$\", \"import/path\");\n    assertTrue(producer.isConfigurationFromContext(runConfiguration, configurationContext));\n\n    runConfiguration = createPackageConfiguration(GotestFramework.INSTANCE, \"otherPattern\", \"import/path\");\n    assertFalse(producer.isConfigurationFromContext(runConfiguration, configurationContext));\n\n    runConfiguration = createPackageConfiguration(GobenchFramework.INSTANCE, \"^TestName$\", \"import/path\");\n    assertFalse(producer.isConfigurationFromContext(runConfiguration, configurationContext));\n\n    runConfiguration = createPackageConfiguration(GotestFramework.INSTANCE, \"^TestName$\", \"import/path/other\");\n    assertFalse(producer.isConfigurationFromContext(runConfiguration, configurationContext));\n\n    producer = new GobenchRunConfigurationProducer();\n    runConfiguration = createFileConfiguration(GobenchFramework.INSTANCE, file.getVirtualFile().getPath());\n    assertFalse(producer.isConfigurationFromContext(runConfiguration, configurationContext));\n  }\n\n  public void testSameConfigurationOnNonTestFunction() {\n    PsiFile file = myFixture.addFileToProject(\"import/path/a_test.go\", \"package main; func SomeNonTestName() {<caret>}\");\n    myFixture.configureFromExistingVirtualFile(file.getVirtualFile());\n    ConfigurationContext configurationContext = createConfigurationContext();\n    GotestRunConfigurationProducer producer = new GotestRunConfigurationProducer();\n\n    GoTestRunConfiguration runConfiguration = createFileConfiguration(GotestFramework.INSTANCE, file.getVirtualFile().getPath());\n    assertTrue(producer.isConfigurationFromContext(runConfiguration, configurationContext));\n\n    runConfiguration = createFileConfiguration(GotestFramework.INSTANCE, file.getVirtualFile().getPath() + \"_vl\");\n    assertFalse(producer.isConfigurationFromContext(runConfiguration, configurationContext));\n\n    runConfiguration = createFileConfiguration(GobenchFramework.INSTANCE, file.getVirtualFile().getPath());\n    assertFalse(producer.isConfigurationFromContext(runConfiguration, configurationContext));\n  }\n\n  public void testSameConfigurationOnPackageClause() {\n    PsiFile file = myFixture.addFileToProject(\"import/path/a_test.go\", \"packag<caret>e main; func SomeNonTestName() {}\");\n    myFixture.configureFromExistingVirtualFile(file.getVirtualFile());\n    ConfigurationContext configurationContext = createConfigurationContext();\n    GotestRunConfigurationProducer producer = new GotestRunConfigurationProducer();\n\n    GoTestRunConfiguration runConfiguration = createPackageConfiguration(GotestFramework.INSTANCE, \"\", \"import/path\");\n    assertTrue(producer.isConfigurationFromContext(runConfiguration, configurationContext));\n\n    runConfiguration = createPackageConfiguration(GotestFramework.INSTANCE, \"otherPattern\", \"import/path\");\n    assertFalse(producer.isConfigurationFromContext(runConfiguration, configurationContext));\n\n    runConfiguration = createPackageConfiguration(GobenchFramework.INSTANCE, \"\", \"import/path\");\n    assertFalse(producer.isConfigurationFromContext(runConfiguration, configurationContext));\n\n    runConfiguration = createPackageConfiguration(GotestFramework.INSTANCE, \"\", \"import/path/other\");\n    assertFalse(producer.isConfigurationFromContext(runConfiguration, configurationContext));\n  }\n\n  public void testSameConfigurationOnFile() {\n    PsiFile file = myFixture.configureByText(\"a_test.go\", \"package main; <caret>\\n\\nfunc SomeNonTestName() {}\");\n    ConfigurationContext configurationContext = createConfigurationContext();\n    GotestRunConfigurationProducer producer = new GotestRunConfigurationProducer();\n\n    GoTestRunConfiguration runConfiguration = createFileConfiguration(GotestFramework.INSTANCE, file.getVirtualFile().getPath());\n    assertTrue(producer.isConfigurationFromContext(runConfiguration, configurationContext));\n\n    runConfiguration = createFileConfiguration(GotestFramework.INSTANCE, file.getVirtualFile().getPath() + \"_vl\");\n    assertFalse(producer.isConfigurationFromContext(runConfiguration, configurationContext));\n\n    runConfiguration = createFileConfiguration(GobenchFramework.INSTANCE, file.getVirtualFile().getPath());\n    assertFalse(producer.isConfigurationFromContext(runConfiguration, configurationContext));\n  }\n\n  public void testSameConfigurationOnDirectory() {\n    PsiFile file = myFixture.configureByText(\"a.go\", \"package main\");\n    PsiDirectory directory = file.getParent();\n    assertNotNull(directory);\n    ConfigurationContext configurationContext = new ConfigurationContext(directory);\n    GotestRunConfigurationProducer producer = new GotestRunConfigurationProducer();\n\n    GoTestRunConfiguration runConfiguration = createDirectoryConfiguration(GotestFramework.INSTANCE, directory.getVirtualFile().getPath(),\n                                                                           directory.getVirtualFile().getPath());\n    assertTrue(producer.isConfigurationFromContext(runConfiguration, configurationContext));\n\n    runConfiguration = createDirectoryConfiguration(GotestFramework.INSTANCE, directory.getVirtualFile().getPath() + \"_vl\",\n                                                    directory.getVirtualFile().getPath());\n    assertFalse(producer.isConfigurationFromContext(runConfiguration, configurationContext));\n\n    runConfiguration = createDirectoryConfiguration(GobenchFramework.INSTANCE, directory.getVirtualFile().getPath(),\n                                                    directory.getVirtualFile().getPath());\n    assertFalse(producer.isConfigurationFromContext(runConfiguration, configurationContext));\n\n    runConfiguration = createDirectoryConfiguration(GotestFramework.INSTANCE, directory.getVirtualFile().getPath(),\n                                                    directory.getVirtualFile().getPath() + \"_vl\");\n    assertFalse(producer.isConfigurationFromContext(runConfiguration, configurationContext));\n  }\n\n  @NotNull\n  private ConfigurationContext createConfigurationContext() {\n    PsiElement at = myFixture.getFile().findElementAt(myFixture.getCaretOffset());\n    assertNotNull(at);\n    return new ConfigurationContext(at);\n  }\n\n  @NotNull\n  private GoTestRunConfiguration createPackageConfiguration(GoTestFramework framework, String pattern, String importPath) {\n    GoTestRunConfigurationType configurationType = GoTestRunConfigurationType.getInstance();\n    GoTestRunConfiguration runConfiguration = new GoTestRunConfiguration(myFixture.getProject(), \"name\", configurationType);\n    runConfiguration.setPattern(pattern);\n    runConfiguration.setPackage(importPath);\n    runConfiguration.setKind(GoTestRunConfiguration.Kind.PACKAGE);\n    runConfiguration.setTestFramework(framework);\n    return runConfiguration;\n  }\n\n  @NotNull\n  private GoTestRunConfiguration createFileConfiguration(GoTestFramework framework, String path) {\n    GoTestRunConfigurationType configurationType = GoTestRunConfigurationType.getInstance();\n    GoTestRunConfiguration runConfiguration = new GoTestRunConfiguration(myFixture.getProject(), \"name\", configurationType);\n    runConfiguration.setFilePath(path);\n    runConfiguration.setKind(GoTestRunConfiguration.Kind.FILE);\n    runConfiguration.setTestFramework(framework);\n    return runConfiguration;\n  }\n\n  @NotNull\n  private GoTestRunConfiguration createDirectoryConfiguration(GoTestFramework framework, String path, String workingDirectoryPath) {\n    GoTestRunConfigurationType configurationType = GoTestRunConfigurationType.getInstance();\n    GoTestRunConfiguration runConfiguration = new GoTestRunConfiguration(myFixture.getProject(), \"name\", configurationType);\n    runConfiguration.setDirectoryPath(path);\n    runConfiguration.setWorkingDirectory(workingDirectoryPath);\n    runConfiguration.setKind(GoTestRunConfiguration.Kind.DIRECTORY);\n    runConfiguration.setTestFramework(framework);\n    return runConfiguration;\n  }\n\n  @Override\n  protected String getBasePath() {\n    return \"testing/producer\";\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/runconfig/testing/GobenchEventsConverterTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.testing;\n\nimport com.goide.runconfig.testing.frameworks.gobench.GobenchFramework;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GobenchEventsConverterTest extends GoEventsConverterTestCase {\n  public void testSuccessBenchmark() {\n    doTest();\n  }\n\n  public void testBenchmarkWithoutSuffix() {\n    doTest();\n  }\n\n  public void testFailedBenchmark() {\n    doTest();\n  }\n  \n  public void testMixedBenchmark() {\n    doTest();\n  }\n  \n  public void testFailedCompilation() {\n    doTest();\n  }\n\n  @NotNull\n  @Override\n  protected String getBasePath() {\n    return \"testing/gobench\";\n  }\n  \n  @NotNull\n  @Override\n  protected GoTestFramework getTestFramework() {\n    return GobenchFramework.INSTANCE;\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/runconfig/testing/GocheckEventsConverterTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.testing;\n\nimport com.goide.runconfig.testing.frameworks.gocheck.GocheckFramework;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GocheckEventsConverterTest extends GoEventsConverterTestCase {\n  public void testPass()                      { doTest(); }\n  public void testAssertions()                { doTest(); }\n  public void testAssertionsInvalidFormat()   { doTest(); }\n  public void testPanic()                     { doTest(); }\n  public void testPanicInvalidFormat()        { doTest(); }\n  public void testFixtureStdOut()             { doTest(); }\n  public void testSuiteSetUpError()           { doTest(); }\n  public void testSuiteTearDownError()        { doTest(); }\n  public void testTestSetUpError()            { doTest(); }\n  public void testTestTearDownError()         { doTest(); }\n  public void testTestErrorWithFixtures()     { doTest(); }\n  public void testTestAndTestTearDownError()  { doTest(); }\n  public void testTestBothFixturesError()     { doTest(); }\n  public void testSkippingTests()             { doTest(); }\n\n  @NotNull\n  @Override\n  protected String getBasePath() {\n    return \"testing/gocheck\";\n  }\n  \n  @NotNull\n  @Override\n  protected GoTestFramework getTestFramework() {\n    return GocheckFramework.INSTANCE;\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/runconfig/testing/GotestEventsConverterTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.testing;\n\nimport com.goide.runconfig.testing.frameworks.gotest.GotestFramework;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GotestEventsConverterTest extends GoEventsConverterTestCase {\n  public void testSingleTestFailed() {\n    doTest();\n  }\n\n  public void testSingleTestOk() {\n    doTest();\n  }\n\n  public void testMultipleTestsFailed() {\n    doTest();\n  }\n\n  public void testMultipleTestsOk() {\n    doTest();\n  }\n\n  public void testSingleTestLeadingSpaceOk() {\n    doTest();\n  }\n\n  public void testSkipTest() {\n    doTest();\n  }\n\n  public void testStdOut() {\n    doTest();\n  }\n\n  public void testOneLineEvents() {\n    doTest();\n  }\n\n  public void testUnicodeTestName() {\n    doTest();\n  }\n\n  public void testSubTests() {\n    doTest();\n  }\n\n  @NotNull\n  @Override\n  protected String getBasePath() {\n    return \"testing/gotest\";\n  }\n\n  @NotNull\n  @Override\n  protected GoTestFramework getTestFramework() {\n    return GotestFramework.INSTANCE;\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/runconfig/testing/LoggingServiceMessageVisitor.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.runconfig.testing;\n\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.util.containers.ContainerUtil;\nimport jetbrains.buildServer.messages.serviceMessages.*;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.Map;\n\npublic class LoggingServiceMessageVisitor implements ServiceMessageVisitor {\n  private static final String MY_INDENT = \"  \";\n  private final StringBuilder myLog = new StringBuilder();\n  private String myIndent = \"\";\n\n  @NotNull\n  public String getLog() {\n    return myLog.toString();\n  }\n\n  private void increaseIndent() {\n    myIndent += MY_INDENT;\n  }\n\n  private void decreaseIndent() {\n    myIndent = StringUtil.trimEnd(myIndent, MY_INDENT);\n  }\n\n  private void append(@NotNull MessageWithAttributes message) {\n    myLog.append(myIndent).append(message.getClass().getSimpleName()).append('\\n');\n    increaseIndent();\n    increaseIndent();\n    for (Map.Entry<String, String> entry : ContainerUtil.newTreeMap(message.getAttributes()).entrySet()) {\n      String key = entry.getKey();\n      String value = \"duration\".equals(key) ? \"42\" : entry.getValue();\n      myLog.append(myIndent).append(\"- \").append(key).append(\"=\")\n        .append(value.replace(\"\\n\", \"\\\\n\")).append('\\n');\n    }\n    decreaseIndent();\n    decreaseIndent();\n  }\n\n  @Override\n  public void visitTestSuiteStarted(@NotNull TestSuiteStarted testSuiteStarted) {\n    append(testSuiteStarted);\n    increaseIndent();\n  }\n\n  @Override\n  public void visitTestSuiteFinished(@NotNull TestSuiteFinished testSuiteFinished) {\n    decreaseIndent();\n    append(testSuiteFinished);\n  }\n\n  @Override\n  public void visitTestStarted(@NotNull TestStarted testStarted) {\n    append(testStarted);\n    increaseIndent();\n  }\n\n  @Override\n  public void visitTestFinished(@NotNull TestFinished testFinished) {\n    decreaseIndent();\n    append(testFinished);\n  }\n\n  @Override\n  public void visitTestIgnored(@NotNull TestIgnored testIgnored) {\n    append(testIgnored);\n  }\n\n  @Override\n  public void visitTestStdOut(@NotNull TestStdOut testStdOut) {\n    append(testStdOut);\n  }\n\n  @Override\n  public void visitTestStdErr(@NotNull TestStdErr testStdErr) {\n    append(testStdErr);\n  }\n\n  @Override\n  public void visitTestFailed(@NotNull TestFailed testFailed) {\n    append(testFailed);\n  }\n\n  @Override\n  public void visitPublishArtifacts(@NotNull PublishArtifacts artifacts) {\n  }\n\n  @Override\n  public void visitProgressMessage(@NotNull ProgressMessage message) {\n  }\n\n  @Override\n  public void visitProgressStart(@NotNull ProgressStart start) {\n  }\n\n  @Override\n  public void visitProgressFinish(@NotNull ProgressFinish finish) {\n  }\n\n  @Override\n  public void visitBuildStatus(@NotNull BuildStatus status) {\n  }\n\n  @Override\n  public void visitBuildNumber(@NotNull BuildNumber number) {\n  }\n\n  @Override\n  public void visitBuildStatisticValue(@NotNull BuildStatisticValue value) {\n  }\n\n  @Override\n  public void visitMessageWithStatus(@NotNull Message message) {\n  }\n\n  @Override\n  public void visitBlockOpened(@NotNull BlockOpened opened) {\n  }\n\n  @Override\n  public void visitBlockClosed(@NotNull BlockClosed closed) {\n  }\n\n  @Override\n  public void visitCompilationStarted(@NotNull CompilationStarted started) {\n  }\n\n  @Override\n  public void visitCompilationFinished(@NotNull CompilationFinished finished) {\n  }\n\n  @Override\n  public void visitServiceMessage(@NotNull ServiceMessage message) {\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/sdk/GoPathLibraryTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.sdk;\n\nimport com.goide.GoCodeInsightFixtureTestCase;\nimport com.goide.GoModuleType;\nimport com.goide.project.GoApplicationLibrariesService;\nimport com.goide.project.GoModuleLibrariesInitializer;\nimport com.intellij.openapi.application.ApplicationManager;\nimport com.intellij.openapi.module.ModuleType;\nimport com.intellij.openapi.roots.*;\nimport com.intellij.openapi.roots.impl.OrderEntryUtil;\nimport com.intellij.openapi.roots.impl.libraries.LibraryEx;\nimport com.intellij.openapi.util.io.FileUtil;\nimport com.intellij.openapi.vfs.VfsUtil;\nimport com.intellij.openapi.vfs.VirtualFile;\nimport com.intellij.testFramework.LightProjectDescriptor;\nimport com.intellij.testFramework.fixtures.DefaultLightProjectDescriptor;\nimport com.intellij.util.containers.ContainerUtil;\nimport com.intellij.util.ui.UIUtil;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.io.IOException;\nimport java.util.Arrays;\nimport java.util.Collection;\nimport java.util.Collections;\n\n@SuppressWarnings(\"ConstantConditions\")\npublic class GoPathLibraryTest extends GoCodeInsightFixtureTestCase {\n  @NotNull\n  @Override\n  protected LightProjectDescriptor getProjectDescriptor() {\n    return new DefaultLightProjectDescriptor() {\n      @NotNull\n      @Override\n      public ModuleType getModuleType() {\n        return GoModuleType.getInstance();\n      }\n    };\n  }\n  private final Collection<VirtualFile> contentRootsToClean = ContainerUtil.newHashSet();\n  private final Collection<VirtualFile> tempRootsToClean = ContainerUtil.newHashSet();\n\n  @Override\n  protected void setUp() throws Exception {\n    super.setUp();\n    GoModuleLibrariesInitializer.setTestingMode(getTestRootDisposable());\n  }\n\n  @Override\n  protected void tearDown() throws Exception {\n    try {\n      for (VirtualFile file : tempRootsToClean) {\n        ApplicationManager.getApplication().runWriteAction(() -> {\n          try {\n            file.delete(this);\n          }\n          catch (IOException e) {\n            e.printStackTrace();\n          }\n        });\n      }\n    }\n    finally {\n      tempRootsToClean.clear();\n    }\n    ModifiableRootModel model = ModuleRootManager.getInstance(myModule).getModifiableModel();\n    try {\n      for (ContentEntry entry : model.getContentEntries()) {\n        if (contentRootsToClean.contains(entry.getFile())) {\n          model.removeContentEntry(entry);\n        }\n      }\n      ApplicationManager.getApplication().runWriteAction(model::commit);\n    }\n    finally {\n      contentRootsToClean.clear();\n      if (!model.isDisposed()) model.dispose();\n    }\n    super.tearDown();\n  }\n\n  /**\n   * src <content root>\n   * goPath <gopath>\n   * - src\n   * -- test\n   */\n  public void testAddGoPathAsLibrary() throws IOException {\n    VirtualFile goPath = createGoPath();\n    VirtualFile goPathContent = goPath.createChildDirectory(this, \"src\").createChildDirectory(this, \"test\");\n    GoApplicationLibrariesService.getInstance().setLibraryRootUrls(goPath.getUrl());\n    assertLibrary(Collections.singletonList(goPathContent.getUrl()), \"temp:///src\");\n  }\n\n  /**\n   * src <content root>\n   * goPath <gopath>\n   * - src\n   * -- contentRoot <content root>\n   * -- notContentRoot\n   */\n  public void testExcludeChildContentRootFromLibrary() throws IOException {\n    VirtualFile goPath = createGoPath();\n    VirtualFile src = goPath.createChildDirectory(this, \"src\");\n    VirtualFile contentRoot = src.createChildDirectory(this, \"contentRoot\");\n    VirtualFile notContentRoot = src.createChildDirectory(this, \"notContentRoot\");\n    addContentRoot(contentRoot);\n    GoApplicationLibrariesService.getInstance().setLibraryRootUrls(goPath.getUrl());\n    assertLibrary(Collections.singletonList(notContentRoot.getUrl()), \"temp:///src\", contentRoot.getUrl());\n  }\n\n  /**\n   * src <content root>\n   * contentRoot <content root>\n   * - gopath <gopath>\n   * -- src\n   * --- test\n   * otherGoPath <gopath>\n   * -- src\n   * --- test\n   */\n  public void testExcludeParentContentRootFromLibrary() throws IOException {\n    VirtualFile contentRoot = createGoPath();\n    VirtualFile goPath = contentRoot.createChildDirectory(this, \"gopath\");\n    VirtualFile goPathContent = goPath.createChildDirectory(this, \"src\").createChildDirectory(this, \"test\");\n\n    VirtualFile otherGoPath = createGoPath();\n    VirtualFile otherGoPathContent = otherGoPath.createChildDirectory(this, \"src\").createChildDirectory(this, \"test\");\n    GoApplicationLibrariesService.getInstance().setLibraryRootUrls(goPath.getUrl(), otherGoPath.getUrl());\n    assertLibrary(ContainerUtil.newHashSet(goPathContent.getUrl(), otherGoPathContent.getUrl()), \"temp:///src\");\n\n    addContentRoot(contentRoot);\n    assertLibrary(Collections.singletonList(otherGoPathContent.getUrl()), \"temp:///src\", contentRoot.getUrl());\n  }\n\n  /**\n   * src <content root>\n   * gopath <gopath>\n   * - src\n   * -- subdir\n   * --- contentRoot <content root>\n   */\n  public void testUpdateLibraryOnAddingContentRoot() throws IOException {\n    VirtualFile goPath = createGoPath();\n    VirtualFile goPathContent = goPath.createChildDirectory(this, \"src\").createChildDirectory(this, \"subdir\");\n\n    GoApplicationLibrariesService.getInstance().setLibraryRootUrls(goPath.getUrl());\n    assertLibrary(Collections.singletonList(goPathContent.getUrl()), \"temp:///src\");\n\n    VirtualFile contentRoot = goPathContent.createChildDirectory(this, \"contentRoot\");\n    addContentRoot(contentRoot);\n    assertLibrary(Collections.singletonList(goPathContent.getUrl()), \"temp:///src\", contentRoot.getUrl());\n  }\n\n  private void addContentRoot(@NotNull VirtualFile contentRoot) {\n    ModifiableRootModel model = ModuleRootManager.getInstance(myModule).getModifiableModel();\n      try {\n      model.addContentEntry(contentRoot);\n    contentRootsToClean.add(contentRoot);\n      model.commit();\n    }\n    finally {\n      if (!model.isDisposed()) model.dispose();\n    }\n  }\n\n  private void assertLibrary(@NotNull Collection<String> libUrls, String... exclusionUrls) {\n    UIUtil.dispatchAllInvocationEvents();\n\n    GoModuleLibrariesInitializer initializer = myModule.getComponent(GoModuleLibrariesInitializer.class);\n    ModuleRootManager model = ModuleRootManager.getInstance(myModule);\n    LibraryOrderEntry libraryOrderEntry = OrderEntryUtil.findLibraryOrderEntry(model, initializer.getLibraryName());\n    if (libUrls.isEmpty()) {\n      assertNull(libraryOrderEntry);\n      return;\n    }\n    LibraryEx library = (LibraryEx)libraryOrderEntry.getLibrary();\n    assertNotNull(library);\n    assertSameElements(Arrays.asList(library.getUrls(OrderRootType.CLASSES)), libUrls);\n    assertSameElements(library.getExcludedRootUrls(), exclusionUrls);\n  }\n\n  private VirtualFile createGoPath() throws IOException {\n    VirtualFile goPath = VfsUtil.findFileByIoFile(FileUtil.createTempDirectory(\"go\", \"path\"), true);\n    tempRootsToClean.add(goPath);\n    return goPath;\n  }\n\n  @Override\n  protected boolean isWriteActionRequired() {\n    return true;\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/sdk/GoSdkUtilTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.sdk;\n\nimport org.junit.Test;\n\nimport static org.junit.Assert.assertEquals;\n\npublic class GoSdkUtilTest {\n  @Test\n  public void testCompareVersions() {\n    assertEquals(-1, GoSdkUtil.compareVersions(\"1.1.2\", \"1.1.3\"));\n    assertEquals(-1, GoSdkUtil.compareVersions(\"1.1.2\", \"1.2.1\"));\n    assertEquals(-1, GoSdkUtil.compareVersions(\"1.1.2\", \"2.1.1\"));\n    assertEquals(-1, GoSdkUtil.compareVersions(\"1.2\", \"1.2.1\"));\n    assertEquals(-1, GoSdkUtil.compareVersions(\"1\", \"1.1\"));\n    assertEquals(-1, GoSdkUtil.compareVersions(\"1.4rc2\", \"1.4\"));\n    assertEquals(0, GoSdkUtil.compareVersions(\"1.2.3\", \"1.2.3\"));\n    assertEquals(0, GoSdkUtil.compareVersions(\"1.2\", \"1.2\"));\n    assertEquals(0, GoSdkUtil.compareVersions(\"1\", \"1\"));\n    assertEquals(0, GoSdkUtil.compareVersions(\"1.4rc2\", \"1.4rc2\"));\n    assertEquals(1, GoSdkUtil.compareVersions(\"1.2.4\", \"1.2.3\"));\n    assertEquals(1, GoSdkUtil.compareVersions(\"1.3.3\", \"1.2.4\"));\n    assertEquals(1, GoSdkUtil.compareVersions(\"2.2.3\", \"1.4.4\"));\n    assertEquals(1, GoSdkUtil.compareVersions(\"1.2.1\", \"1.2\"));\n    assertEquals(1, GoSdkUtil.compareVersions(\"1.4rc2\", \"1.3\"));\n    assertEquals(1, GoSdkUtil.compareVersions(\"1.5beta1\", \"1.4rc2\"));\n  }\n\n  @Test\n  public void testParseGoVersion() {\n    assertEquals(\"1.5beta1\", GoSdkUtil.parseGoVersion(\"const theVersion = `go1.5beta1`\"));\n    assertEquals(\"1.4rc2\", GoSdkUtil.parseGoVersion(\"const theVersion = `go1.4rc2`\"));\n    assertEquals(\"1.4.2\", GoSdkUtil.parseGoVersion(\"const theVersion = `go1.4.2`\"));\n    assertEquals(\"1.4.1 (appengine-1.9.18)\", GoSdkUtil.parseGoVersion(\"const theVersion = `go1.4.1 (appengine-1.9.18)`\"));\n    assertEquals(\"devel +e8057df Sun May 3 05:34:01 2015 +0000\",\n                 GoSdkUtil.parseGoVersion(\"const theVersion = `devel +e8057df Sun May 3 05:34:01 2015 +0000`\"));\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/stubs/GoPackageClauseStubTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs;\n\nimport com.goide.GoCodeInsightFixtureTestCase;\nimport com.goide.psi.GoFile;\nimport com.goide.psi.GoPackageClause;\nimport com.intellij.openapi.vfs.VirtualFileFilter;\nimport com.intellij.psi.impl.PsiManagerImpl;\nimport com.intellij.testFramework.exceptionCases.AssertionErrorCase;\n\npublic class GoPackageClauseStubTest extends GoCodeInsightFixtureTestCase {\n  public void testStub() {\n    GoFile file = (GoFile)myFixture.addFileToProject(\"bar/bar.go\", \"package bar; import `foo`; func _() { println(CONST_NAME) }\");\n    failOnFileLoading();\n    file.getPackageName();\n  }\n\n  public void testParsingPsi() throws Throwable {\n    GoFile file = (GoFile)myFixture.addFileToProject(\"bar/bar.go\", \"package bar; import `foo`; func _() { println(CONST_NAME) }\");\n    failOnFileLoading();\n    GoPackageClause packageClause = file.getPackage();\n    assertNotNull(packageClause);\n    assertException(new AssertionErrorCase() {\n      @Override\n      public void tryClosure() {\n        try {\n          packageClause.getIdentifier();\n        }\n        catch (AssertionError e) {\n          String message = e.getMessage();\n          assertTrue(message.contains(\"Access to tree elements not allowed in tests\"));\n          assertTrue(message.contains(\"bar.go\"));\n          throw e;\n        }\n      }\n    });\n  }\n\n  private void failOnFileLoading() {\n    ((PsiManagerImpl)myFixture.getPsiManager()).setAssertOnFileLoadingFilter(VirtualFileFilter.ALL, getTestRootDisposable());\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/stubs/GoStubTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.stubs;\n\nimport com.goide.GoCodeInsightFixtureTestCase;\nimport com.intellij.openapi.util.io.FileUtil;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.testFramework.ParsingTestCase;\n\nimport java.io.File;\nimport java.io.IOException;\n\npublic class GoStubTest extends GoCodeInsightFixtureTestCase {\n  public void testStub()              throws IOException { doTest(true); }\n  public void testStubMismatch2540()  throws IOException { doTest(false); }\n\n  private void doTest(boolean checkErrors) throws IOException {\n    String fileName = getTestName(true) + \".go\";\n    String text = FileUtil.loadFile(new File(getTestDataPath(), fileName));\n    PsiFile file = myFixture.addFileToProject(fileName, text);\n    String s = buildStubTreeText(getProject(), file.getVirtualFile(), text, checkErrors);\n    ParsingTestCase.doCheckResult(getTestDataPath(), getTestName(true) + \".txt\", s);\n  }\n\n  @Override\n  protected String getBasePath() {\n    return \"stubs\";\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/type/GoExpectedTypesTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.type;\n\nimport com.goide.GoCodeInsightFixtureTestCase;\nimport com.goide.SdkAware;\nimport com.goide.psi.GoExpression;\nimport com.goide.psi.impl.GoTypeUtil;\nimport com.intellij.openapi.util.text.StringUtil;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport org.jetbrains.annotations.NotNull;\n\n@SdkAware\npublic class GoExpectedTypesTest extends GoCodeInsightFixtureTestCase {\n  public void testAssignment() {\n    doStatementTest(\"var a int; a = <selection>asd()</selection>\", \"int\");\n  }\n\n  public void testTwoVariablesAssignment() {\n    doStatementTest(\"var (a int; b string); a, b = <selection>asd()</selection>\", \"int, string; int\");\n  }\n\n  public void testTwoVariablesAssignmentWithTeoRightExpressions() {\n    doStatementTest(\"var (a int; b string); a, b = <selection>asd()</selection>, \\\"qwe\\\"\", \"int\");\n  }\n\n  public void testTwoVariablesAssignmentWithFewLeftAndRightExpressions() {\n    doStatementTest(\"var (a, c int; b string); a, b, c = 1, <selection>asd()</selection>, \\\"qwe\\\"\", \"string\");\n  }\n\n  public void testTwoVariablesAssignmentWithLeftWithoutRightExpressions() {\n    doStatementTest(\"var (a, c int; b string); a, b, c = 1, <selection>asd()</selection>\", \"string\");\n  }\n\n  public void testShortVarDeclaration() {\n    doStatementTest(\" c := <selection>asd()</selection>\", \"interface{}\");\n  }\n\n  public void testShortVarDeclarationWithTwoVariablesAtRight() {\n    doStatementTest(\" c, d := <selection>asd()</selection>\", \"interface{}, interface{}; interface{}\");\n  }\n\n  public void testVarDeclaration() {\n    doStatementTest(\" var a int = <selection>asd()</selection>\", \"int\");\n  }\n\n  public void testVarDeclarationWithStructTypeAndTwoVariablesAtRight() {\n    doStatementTest(\" var a, b struct{i int} = <selection>asd()</selection>\", \"struct{i int}, struct{i int}; struct{i int}\");\n  }\n\n  public void testVarDeclWithTwoMembersAtRightAndLeft() {\n    doStatementTest(\" var a, b struct{i int} = struct{i int} {1}, <selection>asd()</selection>\", \"struct{i int}\");\n  }\n\n  public void testCall() {\n    doTopLevelTest(\" func f(string){}; func _() { f(<selection>asd()</selection>) }\", \"string\");\n  }\n\n  public void testCallWithThreeParametersInReceiver() {\n    doTopLevelTest(\" func f(string, int, int){}; func _() { f(<selection>asd()</selection>) }\", \"string, int, int; string\");\n  }\n\n  public void testCallWithTwoArgumentsAndThreeParametersInReceiver() {\n    doTopLevelTest(\" func f(string, int, int){}; func _() { f(\\\"\\\", <selection>asd()</selection>) }\", \"int\");\n  }\n\n  public void testCallWithNoParametersInReceiver() {\n    doTopLevelTest(\" func f(){}; func _() { f(<selection>asd()</selection>) }\", \"interface{}\");\n  }\n\n  public void testCallWithNoParametersInReceiverAndThreeArguments() {\n    doTopLevelTest(\" func f(){}; func _() { f(1, 2, <selection>asd()</selection>) }\", \"interface{}\");\n  }\n\n  public void testCallWithOneExpectedType() {\n    doTopLevelTest(\" func f(int, int){}; func _() { f(1,  <selection>asd()</selection>) }\", \"int\");\n  }\n\n  public void testCallWithParamDefinition() {\n    doTopLevelTest(\" func f(i, j int, string, int){}; func _() { f(<selection>asd()</selection>) }\", \"int, int, string, int; int\");\n  }\n\n  public void testRange() {\n    doStatementTest(\"for _ = range <selection>asd()</selection> {}\", \"interface{}\");\n  }\n\n  public void testRangeWithTwoArguments() {\n    doStatementTest(\"for _, _ = range <selection>asd()</selection> {}\", \"interface{}\");\n  }\n\n  public void testCaseStatement() {\n    doStatementTest(\"var k int; switch k { case <selection>asd()</selection>: }\", \"int\");\n  }\n\n  public void testCaseStatementWithoutArg() {\n    doStatementTest(\"var k int; switch  { case <selection>asd()</selection>: }\", \"bool\");\n  }\n\n  public void testCaseStatementOnStatementAndExpr() {\n    doStatementTest(\"var k int; switch q:=1; q { case <selection>asd()</selection>: }\", \"int\");\n  }\n\n  public void testSendStatementArg() {\n    doStatementTest(\"var ch chan int; ch <- <selection>asd()</selection>\", \"int\");\n  }\n\n  public void testSendStatementChan() {\n    doStatementTest(\"var i string; <selection>asd()</selection> <- i\", \"chan string\");\n  }\n\n  public void testSendStatementArgInSelect() {\n    doStatementTest(\"var ch chan int; select { case ch <- <selection>asd()</selection> : }\", \"int\");\n  }\n\n  public void testSendUnaryOperation() {\n    doStatementTest(\"var i int; i = <-<selection>asd()</selection>\", \"chan int\");\n  }\n\n  public void testSendUnaryOperationVarSpec() {\n    doStatementTest(\"i := <-<selection>asd()</selection>\", \"chan interface{}\");\n  }\n\n  public void testSendUnaryOperationNoExpectedType() {\n    doStatementTest(\" <-<selection>asd()</selection>\", \"chan interface{}\");\n  }\n\n  public void testRecvStatement() {\n    doStatementTest(\"var i string; select { case <-<selection>asd()</selection> : }\", \"chan interface{}\");\n  }\n\n  public void testRecvStatementOnFunc() {\n    doStatementTest(\"var i string; select { case <selection>asd()</selection> : }\", \"interface{}\");\n  }\n\n  public void testRecvStatementOnVarAssign() {\n    doStatementTest(\"var i string; select { case i = <selection>asd()</selection> : }\", \"string\");\n  }\n\n  public void testRecvStatementOnShortVarAssign() {\n    doStatementTest(\"select { case i := <selection>asd()</selection> : }\", \"interface{}\");\n  }\n\n  private void doTopLevelTest(@NotNull String text, @NotNull String expectedTypeText) {\n    myFixture.configureByText(\"a.go\", \"package a;\" + text);\n    PsiElement elementAt = findElementAtCaretOrInSelection();\n\n    GoExpression typeOwner = PsiTreeUtil.getNonStrictParentOfType(elementAt, GoExpression.class);\n    assertNotNull(\"Cannot find type owner. Context element: \" + elementAt.getText(), typeOwner);\n\n    assertEquals(expectedTypeText, StringUtil.join(GoTypeUtil.getExpectedTypes(typeOwner), PsiElement::getText, \"; \"));\n  }\n\n  private void doStatementTest(@NotNull String text, @NotNull String expectedTypeText) {\n    doTopLevelTest(\"func _() {\\n\" + text + \"\\n}\", expectedTypeText);\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/type/GoTypeResolveTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.type;\n\nimport com.goide.GoCodeInsightFixtureTestCase;\nimport com.goide.SdkAware;\nimport com.goide.psi.GoType;\nimport com.goide.psi.GoTypeOwner;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport org.jetbrains.annotations.NotNull;\n\n@SdkAware\npublic class GoTypeResolveTest extends GoCodeInsightFixtureTestCase {\n  public void testAnon() {\n    doTopLevelTest(\"type A struct{};type E A;type B struct{ E };func (e E) foo() {};func main() { b := B{}; b.<caret>E }\", \"E\");\n  }\n\n  public void testAnon2() {\n    doTopLevelTest(\"type A struct{};type E A;type B struct{ *E };func (e E) foo() {};func main() { b := B{}; b.<caret>E }\", \"*E\");\n  }\n\n  public void testTypeSwitchDeclaration() {\n    doStatementTest(\"switch fo<caret>o := \\\"hello\\\".(type) {}\", \"string\");\n  }\n\n  public void testTypeSwitchUsageInContext() {\n    doStatementTest(\"switch foo := \\\"hello\\\".(type) { case bool:\\n println(fo<caret>o)\\n}\", \"bool\");\n  }\n\n  public void testWrappedSlice() {\n    doTopLevelTest(\"type Foo int[]\\nfunc _() { var foo Foo\\nb<caret>ar := foo[2:9]\", \"Foo\");\n  }\n\n  public void testSlice() {\n    doStatementTest(\"var foo []int\\nb<caret>ar := foo[2:9]\", \"[]int\");\n  }\n\n  public void testRangeOverString() {\n    doStatementTest(\"for _, fo<caret>o := range \\\"hello\\\" {}\", \"int32\");\n  }\n\n  public void testIndexExpressionOfString() {\n    doStatementTest(\"foo := \\\"hello\\\"\\na := <selection>foo[0]</selection>\", \"byte\");\n  }\n\n  public void testIndexExpressionOfStringLiteral() {\n    doExpressionTest(\"<selection>\\\"hello\\\"[0]</selection>\", \"byte\");\n  }\n\n  public void testIndexExpressionOfPointer() {\n    doStatementTest(\"var buckhash *[20]*int\\nfo<caret>o := buckhash[0]\", \"*int\");\n  }\n\n  public void testNestedTypeSwitchUsageInContext() {\n    doStatementTest(\"var p interface{}\\n\" +\n                    \"switch foo := p.(type) {\\n\" +\n                    \"case int:\\n\" +\n                    \"  switch p.(type) {\\n\" +\n                    \"  case bool:\" +\n                    \"    println(f<caret>oo)\\n\" +\n                    \"  }\\n\" +\n                    \"}\", \"int\");\n  }\n\n  public void testIndexExpression() {\n    doTopLevelTest(\"type foo string; var bar []foo; func _() { println(<selection>bar[0]</selection>) }\", \"foo\");\n    doTopLevelTest(\"var bar []string; func _() { println(<selection>bar[0]</selection>) }\", \"string\");\n  }\n  \n  public void testFuncLiteral() {\n    doTopLevelTest(\"func voidFunction(a int) {} func _() { <selection>voidFunction</selection>() }\", \"func (a int)\");\n  }\n  \n  public void testCallExpression() {\n    doTopLevelTest(\"func voidFunction() int {} func _() { <selection>voidFunction()</selection> }\", \"int\");\n  }\n  \n  public void testCallExpressionOnVoidFunction() {\n    doTopLevelTest(\"func voidFunction() {} func _() { <selection>voidFunction()</selection> }\", \"<unknown>\");\n  }\n\n  public void testCallExpressionOnVoidFunction2() {\n    doTopLevelTest(\"func voidFunction() () {} func _() { <selection>voidFunction()</selection> }\", \"<unknown>\");\n  }\n\n  private void doTopLevelTest(@NotNull String text, @NotNull String expectedTypeText) {\n    myFixture.configureByText(\"a.go\", \"package a;\" + text);\n    PsiElement elementAt = findElementAtCaretOrInSelection();\n\n    GoTypeOwner typeOwner = PsiTreeUtil.getNonStrictParentOfType(elementAt, GoTypeOwner.class);\n    assertNotNull(\"Cannot find type owner. Context element: \" + elementAt.getText(), typeOwner);\n\n    GoType type = typeOwner.getGoType(null);\n    assertEquals(expectedTypeText, type == null ? \"<unknown>\" : type.getText());\n  }\n\n  private void doStatementTest(@NotNull String text, @NotNull String expectedTypeText) {\n    doTopLevelTest(\"func _() {\\n\" + text + \"\\n}\", expectedTypeText);\n  }\n\n  private void doExpressionTest(@NotNull String text, @NotNull String expectedTypeText) {\n    doStatementTest(\"a := \" + text, expectedTypeText);\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/type/GoUnderlyingTypeTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.type;\n\nimport com.goide.GoCodeInsightFixtureTestCase;\nimport com.goide.psi.GoType;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoUnderlyingTypeTest extends GoCodeInsightFixtureTestCase {\n  private void doTest(@NotNull String text, String expected) {\n    myFixture.configureByText(\"a.go\", \"package a\\n\" + text);\n    PsiElement element = myFixture.getFile().findElementAt(myFixture.getEditor().getCaretModel().getOffset());\n    GoType type = PsiTreeUtil.getParentOfType(element, GoType.class);\n    assertNotNull(type);\n    assertEquals(expected, type.getUnderlyingType().getText());\n  }\n\n  public void testT1()          { doTest(\"type <caret>T1 string\", \"string\"); }\n  public void testT1SOE()       { doTest(\"type <caret>T1 T2; type T2 T1\", \"T1 T2\"); }\n  public void testT2SOE()       { doTest(\"type <caret>T1 T2; type T2 T3; type T3 T2\", \"T2 T3\"); }\n  public void testT2()          { doTest(\"type T1 string; type <caret>T2 T1\", \"string\"); }\n  public void testT3()          { doTest(\"type T1 string; type T2 T1; type <caret>T3 []T1\", \"[]T1\"); }\n  public void testT4()          { doTest(\"type T1 string; type T2 T1; type T3 []T1; type <caret>T4 T3\", \"[]T1\"); }\n  public void testLiteralType() { doTest(\"type T1 string; type T4 <caret>[]T1\", \"[]T1\"); }\n}\n"
  },
  {
    "path": "tests/com/goide/usages/GoFileStructureGroupRuleTest.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.usages;\n\nimport com.goide.GoCodeInsightFixtureTestCase;\nimport com.goide.psi.GoFunctionDeclaration;\nimport com.goide.psi.GoTypeSpec;\nimport com.intellij.psi.PsiElement;\nimport com.intellij.usageView.UsageInfo;\nimport com.intellij.usages.PsiElementUsageGroupBase;\nimport com.intellij.usages.Usage;\nimport com.intellij.usages.UsageGroup;\nimport com.intellij.usages.UsageInfo2UsageAdapter;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.Collection;\n\npublic class GoFileStructureGroupRuleTest extends GoCodeInsightFixtureTestCase {\n  public void testMethod() {\n    assertInstanceOf(getGroupElement(), GoFunctionDeclaration.class);\n  }\n\n  public void testType() {\n    assertInstanceOf(getGroupElement(), GoTypeSpec.class);\n  }\n\n  @NotNull\n  private PsiElement getGroupElement() {\n    UsageGroup group = GoFileStructureGroupRuleProvider.USAGE_GROUPING_RULE.groupUsage(findSingleUsage());\n    assertNotNull(group);\n    assertInstanceOf(group, PsiElementUsageGroupBase.class);\n    return ((PsiElementUsageGroupBase)group).getElement();\n  }\n\n  @NotNull\n  private Usage findSingleUsage() {\n    Collection<UsageInfo> infos = myFixture.testFindUsages(getTestName(true) + \".go\");\n    assertEquals(1, infos.size());\n    UsageInfo item = ContainerUtil.getFirstItem(infos);\n    assertNotNull(item);\n    return new UsageInfo2UsageAdapter(item);\n  }\n\n  @Override\n  protected String getBasePath() {\n    return \"usages\";\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/util/GoBuildMatcherTest.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.util;\n\nimport com.goide.GoCodeInsightFixtureTestCase;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.util.ThreeState;\nimport org.jetbrains.annotations.NotNull;\n\npublic class GoBuildMatcherTest extends GoCodeInsightFixtureTestCase {\n  public void testMatchFile() {\n    GoBuildMatcher matcher;\n\n    matcher = new GoBuildMatcher(new GoTargetSystem(\"plan9\", \"arm\", \"1.4\", null, ThreeState.UNSURE));\n    checkMatchFile(matcher, true, \"foo_arm.go\", \"\");\n    checkMatchFile(matcher, false, \"foo1_arm.go\", \"// +build linux\");\n    checkMatchFile(matcher, false, \"foo_darwin.go\", \"\");\n    checkMatchFile(matcher, true, \"foo.go\", \"\");\n    checkMatchFile(matcher, false, \"foo1.go\", \"// +build linux\");\n\n    matcher = new GoBuildMatcher(new GoTargetSystem(\"android\", \"arm\", \"1.4\", null, ThreeState.UNSURE));\n    checkMatchFile(matcher, true, \"foo_linux.go\", \"\");\n    checkMatchFile(matcher, true, \"foo_android.go\", \"\");\n    checkMatchFile(matcher, false, \"foo_plan9.go\", \"\");\n    checkMatchFile(matcher, true, \"android.go\", \"\");\n    checkMatchFile(matcher, true, \"android.go\", \"// +build linux\\n\");\n    checkMatchFile(matcher, true, \"plan9.go\", \"\");\n    checkMatchFile(matcher, true, \"plan9_test.go\", \"\");\n  }\n\n  public void testMatchFileName() {\n    GoBuildMatcher matcher = new GoBuildMatcher(new GoTargetSystem(\"linux\", \"amd64\", \"1.4\", null, ThreeState.UNSURE));\n\n    assertTrue(matcher.matchFileName(\"file.go\"));\n    assertTrue(matcher.matchFileName(\"file_foo.go\"));\n    assertTrue(matcher.matchFileName(\"file_linux.go\"));\n    assertTrue(matcher.matchFileName(\"file_amd64.go\"));\n    assertTrue(matcher.matchFileName(\"file_linux_test.go\"));\n    assertTrue(matcher.matchFileName(\"file_amd64_test.go\"));\n    assertTrue(matcher.matchFileName(\"file_foo_linux.go\"));\n    assertTrue(matcher.matchFileName(\"file_foo_linux_test.go\"));\n    assertTrue(matcher.matchFileName(\"file_foo_amd64.go\"));\n    assertTrue(matcher.matchFileName(\"file_foo_amd64_test.go\"));\n    assertTrue(matcher.matchFileName(\"file_linux_amd64.go\"));\n    assertTrue(matcher.matchFileName(\"file_linux_amd64_test.go\"));\n\n    assertFalse(matcher.matchFileName(\"file_386.go\"));\n    assertFalse(matcher.matchFileName(\"file_windows.go\"));\n    assertFalse(matcher.matchFileName(\"file_windows_test.go\"));\n    assertFalse(matcher.matchFileName(\"file_linux_386.go\"));\n    assertFalse(matcher.matchFileName(\"file_linux_386_test.go\"));\n    assertFalse(matcher.matchFileName(\"file_windows_amd64.go\"));\n    assertFalse(matcher.matchFileName(\"file_windows_amd64_test.go\"));\n    assertFalse(matcher.matchFileName(\"file_darwin_arm.go\"));\n    assertFalse(matcher.matchFileName(\"file_foo_arm.go\"));\n  }\n\n  public void testMatchBuildFlags() {\n    GoBuildMatcher matcher = new GoBuildMatcher(new GoTargetSystem(\"linux\", \"amd64\", \"1.4\", null, ThreeState.UNSURE));\n    assertFalse(matcher.matchBuildFlag(\"\"));\n    assertFalse(matcher.matchBuildFlag(\"!!\"));\n    assertTrue(matcher.matchBuildFlag(\"linux,amd64\"));\n    assertTrue(matcher.matchBuildFlag(\"linux,amd64,!foo\"));\n    assertFalse(matcher.matchBuildFlag(\"linux,amd64,foo\"));\n    assertTrue(matcher.matchBuildFlag(\"!windows,!foo\"));\n  }\n\n  public void testMatchCompiler() {\n    assertTrue(new GoBuildMatcher(new GoTargetSystem(\"linux\", \"amd64\", \"1.4\", null, ThreeState.UNSURE)).matchBuildFlag(\"gc\"));\n    assertTrue(new GoBuildMatcher(new GoTargetSystem(\"linux\", \"amd64\", \"1.4\", null, ThreeState.UNSURE)).matchBuildFlag(\"gccgo\"));\n    assertTrue(new GoBuildMatcher(new GoTargetSystem(\"linux\", \"amd64\", \"1.4\", \"gc\", ThreeState.UNSURE)).matchBuildFlag(\"gc\"));\n    assertTrue(new GoBuildMatcher(new GoTargetSystem(\"linux\", \"amd64\", \"1.4\", \"gccgo\", ThreeState.UNSURE)).matchBuildFlag(\"gccgo\"));\n    assertFalse(new GoBuildMatcher(new GoTargetSystem(\"linux\", \"amd64\", \"1.4\", \"gc\", ThreeState.UNSURE)).matchBuildFlag(\"gccgo\"));\n    assertFalse(new GoBuildMatcher(new GoTargetSystem(\"linux\", \"amd64\", \"1.4\", \"gccgo\", ThreeState.UNSURE)).matchBuildFlag(\"gc\"));\n  }\n\n  public void testMatchVersion() {\n    assertTrue(new GoBuildMatcher(new GoTargetSystem(\"linux\", \"amd64\", \"1.4\", null, ThreeState.UNSURE)).matchBuildFlag(\"go1.4\"));\n    assertTrue(new GoBuildMatcher(new GoTargetSystem(\"linux\", \"amd64\", \"1.4\", null, ThreeState.UNSURE)).matchBuildFlag(\"go1.3\"));\n    assertTrue(new GoBuildMatcher(new GoTargetSystem(\"linux\", \"amd64\", \"1.4\", null, ThreeState.UNSURE)).matchBuildFlag(\"go1.2\"));\n    assertTrue(new GoBuildMatcher(new GoTargetSystem(\"linux\", \"amd64\", \"1.4\", \"gc\", ThreeState.UNSURE)).matchBuildFlag(\"go1.1\"));\n    assertTrue(new GoBuildMatcher(new GoTargetSystem(\"linux\", \"amd64\", \"1.2\", \"gc\", ThreeState.UNSURE)).matchBuildFlag(\"go1.1\"));\n    assertFalse(new GoBuildMatcher(new GoTargetSystem(\"linux\", \"amd64\", \"1.2\", \"gc\", ThreeState.UNSURE)).matchBuildFlag(\"go1.3\"));\n    assertFalse(new GoBuildMatcher(new GoTargetSystem(\"linux\", \"amd64\", \"1.2\", \"gc\", ThreeState.UNSURE)).matchBuildFlag(\"go1.4\"));\n  }\n  \n  public void testMatchCgo() {\n    assertTrue(new GoBuildMatcher(new GoTargetSystem(\"linux\", \"amd64\", \"1.4\", null, ThreeState.YES)).matchBuildFlag(\"cgo\"));\n    assertFalse(new GoBuildMatcher(new GoTargetSystem(\"linux\", \"amd64\", \"1.4\", null, ThreeState.NO)).matchBuildFlag(\"cgo\"));\n  }\n\n  public void testCgoCImport() {\n    myFixture.configureByText(\"a.go\", \"package a; import \\\"C\\\"\");\n    PsiFile file = myFixture.getFile();\n    assertTrue(new GoBuildMatcher(new GoTargetSystem(\"linux\", \"amd64\", \"1.4\", null, ThreeState.YES)).matchFile(file));\n    assertFalse(new GoBuildMatcher(new GoTargetSystem(\"linux\", \"amd64\", \"1.4\", null, ThreeState.NO)).matchFile(file));\n  }\n\n  public void testMatchSupportedTags() {\n    GoBuildMatcher matcher = new GoBuildMatcher(new GoTargetSystem(\"linux\", \"amd64\", \"1.4\", null, ThreeState.UNSURE, \"foo\"));\n    assertTrue(matcher.matchBuildFlag(\"linux,amd64\"));\n    assertTrue(matcher.matchBuildFlag(\"linux,amd64,foo\"));\n    assertFalse(matcher.matchBuildFlag(\"linux,amd64,!foo\"));\n    assertTrue(matcher.matchBuildFlag(\"linux,amd64,!bar\"));\n    assertFalse(matcher.matchBuildFlag(\"linux,amd64,bar\"));\n  }\n\n  private void checkMatchFile(@NotNull GoBuildMatcher matcher, boolean expected, @NotNull String fileName, @NotNull String text) {\n    myFixture.configureByText(fileName, text + \"\\n\\n package main\\n\\n func main() {}\");\n    assertEquals(fileName + \":\" + text, expected, matcher.matchFile(myFixture.getFile()));\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/util/GoExpressionUtilTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.util;\n\nimport com.goide.GoParametrizedTestBase;\nimport com.goide.SdkAware;\nimport com.goide.psi.GoCallExpr;\nimport com.goide.psi.GoExpression;\nimport com.goide.psi.impl.GoExpressionUtil;\nimport com.intellij.psi.PsiFile;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.junit.runner.RunWith;\nimport org.junit.runners.Parameterized;\n\nimport java.util.Arrays;\nimport java.util.Collection;\nimport java.util.List;\n\n@RunWith(Parameterized.class)\n@SdkAware\npublic class GoExpressionUtilTest extends GoParametrizedTestBase {\n  private final String vars;\n  private final String left;\n  private final String right;\n  private final boolean ok;\n\n\n  @Parameterized.Parameters(name = \"{1} == {2}; {0}\")\n  public static Collection<Object[]> data() {\n    return Arrays.asList(new Object[][]{\n      {\"var a = 1\", \"a\", \"a\", true},\n      //{\"\", \"1.00\", \"1.0\", false},\n      {\"var a, b = 1, 2\", \"a + b\", \"a    + b\", true},\n      {\"var a, b = 1, 2\", \"a + b\", \"(a    + b)\", true},\n      {\"var a, b = 1, 2\", \"+a\", \"a\", true},\n      {\"var a, b = 1, 2\", \"a + b\", \"(+((+(a    + b))))\", true},\n      {\"var a, b []int\", \"len(a)\", \"len(a)\", false},\n      {\"var a, b = 1, 2\", \"a + b\", \"a - b\", false},\n      {\"var a, b = 1, 2\", \"a + b\", \"a >> b\", false},\n      {\"var a, b = 1, 2\", \"a + b\", \" -(a + b)\", false},\n      {\"var a, b = 1, 2\", \"1\", \" 23\", false},\n      {\"var a, b = 1, 2\", \"1\", \" 1\", true},\n      {\"var a, b = 1, 2\", \"105 - 3\", \" 105 - (+3)\", true},\n      {\"var a, b = 1, 2\", \"\\\"hello\\\"\", \" `hello`\", true},\n      {\"var a, b []int\", \"a[1]\", \"a[2]\", false},\n      {\"var a, b []int\", \"a[1 : 2]\", \"a[1 : 2]\", true},\n      {\"type T struct{name string}\", \"&T{name : \\\"name\\\"}\", \"&T{name : \\\"name\\\"}\", true},\n      {\"type T struct{name string}\", \"&T{name : \\\"name\\\"}\", \"&T{name : \\\"\\\"}\", false},\n      {\"func f() int {return 0}\", \"f()\", \"f()\", false},\n      {\"var i interface{}; type T int\", \"i.(T)\", \"i.(T)\", true},\n      {\"var i interface{}; type T int\", \"(a).(T)\", \"i.(T)\", false},\n    });\n  }\n\n  @SuppressWarnings(\"JUnitTestCaseWithNonTrivialConstructors\")\n  public GoExpressionUtilTest(@NotNull String vars, @NotNull String left, @NotNull String right, boolean ok) {\n    this.vars = vars;\n    this.left = left;\n    this.right = right;\n    this.ok = ok;\n  }\n\n  @Override\n  protected void doTest() {\n    PsiFile file = myFixture.configureByText(\"a.go\", \"package main\\n func foo(i interface{}, j interface{}){}\\n\" + vars +\n                                                     \"\\n func _(){\\n fo<caret>o(\" + left + \", \" + right + \")\\n}\");\n    myFixture.checkHighlighting();\n    GoCallExpr call = PsiTreeUtil.getParentOfType(file.findElementAt(myFixture.getCaretOffset()), GoCallExpr.class);\n    assert call != null;\n    List<GoExpression> expressions = call.getArgumentList().getExpressionList();\n    assertTrue(left + \" should \" + (ok ? \"\" : \"not \") + \"be identical \" + right,\n               ok == GoExpressionUtil.identical(expressions.get(0), expressions.get(1)));\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/util/GoPackageUtilTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.util;\n\nimport com.goide.GoCodeInsightFixtureTestCase;\nimport com.goide.project.GoBuildTargetSettings;\nimport com.goide.project.GoModuleSettings;\nimport com.goide.sdk.GoPackageUtil;\n\npublic class GoPackageUtilTest extends GoCodeInsightFixtureTestCase {\n  public void testPackageNameOfTestPackageInNonTestFile() {\n    myFixture.configureByText(\"foo.go\", \"package foo\");\n    myFixture.configureByText(\"foo_test.go\", \"package foo_test\");\n    myFixture.configureByText(\"main.go\", \"package main\");\n    myFixture.configureByText(\"docs.go\", \"package documentation\");\n    myFixture.configureByText(\"bar_test.go\", \"package tricky_package_name\");\n    myFixture.configureByText(\"non_test_file.go\", \"package non_test\");\n    myFixture.configureByText(\"ignored.go\", \"// +build ignored\\n\\npackage ignored\");\n\n    assertSameElements(GoPackageUtil.getAllPackagesInDirectory(myFixture.getFile().getContainingDirectory(), null, true),\n                       \"foo\", \"main\", \"non_test\", \"tricky_package_name\");\n\n    assertSameElements(GoPackageUtil.getAllPackagesInDirectory(myFixture.getFile().getContainingDirectory(), null, false),\n                       \"foo\", \"foo_test\", \"main\", \"non_test\", \"tricky_package_name\");\n  }\n\n  public void testInvalidateCacheOnChangingBuildTags() {\n    myFixture.configureByText(\"foo.go\", \"// +build ignored\\n\\npackage ignored\");\n    myFixture.configureByText(\"bar.go\", \"package not_ignored\");\n    assertSameElements(GoPackageUtil.getAllPackagesInDirectory(myFixture.getFile().getContainingDirectory(), null, true),\n                       \"not_ignored\");\n\n    GoBuildTargetSettings newSettings = new GoBuildTargetSettings();\n    newSettings.customFlags = new String[]{\"ignored\"};\n    GoModuleSettings.getInstance(myFixture.getModule()).setBuildTargetSettings(newSettings);\n    assertSameElements(GoPackageUtil.getAllPackagesInDirectory(myFixture.getFile().getContainingDirectory(), null, true),\n                       \"not_ignored\", \"ignored\");\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/util/GoStringLiteralEscaperEscapeStringTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.util;\n\nimport org.junit.Test;\nimport org.junit.runner.RunWith;\nimport org.junit.runners.Parameterized;\n\nimport java.util.Arrays;\nimport java.util.Collection;\n\nimport static org.junit.Assert.assertEquals;\n\n@RunWith(Parameterized.class)\npublic class GoStringLiteralEscaperEscapeStringTest {\n  @Parameterized.Parameter \n  public String input;\n  @Parameterized.Parameter(1)\n  public String expected;\n\n  @Parameterized.Parameters(name = \"{0}\")\n  public static Collection<Object[]> data() {\n    return Arrays.asList(new Object[][]{\n      {\"abc\", \"abc\"},\n      {\"歡迎\", \"歡迎\"},\n      {\"歡\\t迎\", \"歡\\\\t迎\"},\n      {\"a\\u0007b\", \"a\\\\ab\"},\n      {\"a\\u0008b\", \"a\\\\bb\"},\n      {\"a\\u000Cb\", \"a\\\\fb\"},\n      {\"a\\nb\", \"a\\\\nb\"},\n      {\"a\\rb\", \"a\\\\rb\"},\n      {\"a\\tb\", \"a\\\\tb\"},\n      {\"a\\u000bb\", \"a\\\\vb\"},\n      {\"a\\\\b\", \"a\\\\\\\\b\"},\n      {\"a'b\", \"a\\\\'b\"},\n      {\"a\\\"b\", \"a\\\\\\\"b\"},\n      {\"a\\u0001b\", \"a\\\\u0001b\"},\n      {\"\\uD801\\uDC37\", \"\\uD801\\uDC37\"},\n      {\"\\uD852\\uDF62\", \"\\uD852\\uDF62\"},\n    });\n  }\n\n  @Test\n  public void testEscapeString() {\n    StringBuilder outChars = new StringBuilder();\n    GoStringLiteralEscaper.escapeString(input, outChars);\n    assertEquals(expected, outChars.toString());\n  }\n}\n"
  },
  {
    "path": "tests/com/goide/util/GoStringLiteralEscaperTest.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide.util;\n\nimport com.goide.GoCodeInsightFixtureTestCase;\nimport com.goide.psi.GoStringLiteral;\nimport com.goide.psi.impl.GoElementFactory;\nimport com.intellij.openapi.util.TextRange;\nimport com.intellij.openapi.vfs.CharsetToolkit;\nimport com.intellij.psi.LiteralTextEscaper;\nimport com.intellij.psi.PsiLanguageInjectionHost;\nimport com.intellij.testFramework.PlatformTestUtil;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.Locale;\n\npublic class GoStringLiteralEscaperTest extends GoCodeInsightFixtureTestCase {\n  private static String decodeRange(@NotNull GoStringLiteral expr, @NotNull TextRange range) {\n    StringBuilder builder = new StringBuilder();\n    expr.createLiteralTextEscaper().decode(range, builder);\n    return builder.toString();\n  }\n\n  public void testEscaperDecodeString() {\n    GoStringLiteral expr = createStringFromText(\"\\\\nfoo\");\n    assertNotNull(expr);\n    assertEquals(\"fo\", decodeRange(expr, TextRange.create(3, 5)));\n    assertEquals(\"\\n\", decodeRange(expr, TextRange.create(1, 3)));\n  }\n\n  public void testEscaperDecodeRawString() {\n    GoStringLiteral expr = createRawStringFromText(\"\\nfoo\");\n    assertNotNull(expr);\n    assertEquals(\"fo\", decodeRange(expr, TextRange.create(2, 4)));\n    assertEquals(\"\\n\", decodeRange(expr, TextRange.create(1, 2)));\n  }\n\n  public void testEscaperOffsetInStringHost() {\n    GoStringLiteral expr = createStringFromText(\"\\\\nfoo\");\n    assertNotNull(expr);\n    LiteralTextEscaper<? extends PsiLanguageInjectionHost> escaper = expr.createLiteralTextEscaper();\n    TextRange newLineFoo = TextRange.create(1, 6);\n    escaper.decode(newLineFoo, new StringBuilder());\n    assertEquals(1, escaper.getOffsetInHost(0, newLineFoo));\n    assertEquals(3, escaper.getOffsetInHost(1, newLineFoo));\n    assertEquals(4, escaper.getOffsetInHost(2, newLineFoo));\n    assertEquals(5, escaper.getOffsetInHost(3, newLineFoo));\n    assertEquals(6, escaper.getOffsetInHost(4, newLineFoo));\n    assertEquals(-1, escaper.getOffsetInHost(5, newLineFoo));\n  }\n\n  public void testEscaperOffsetInRawStringHost() {\n    GoStringLiteral expr = createRawStringFromText(\"\\nfoo\");\n    assertNotNull(expr);\n    LiteralTextEscaper<? extends PsiLanguageInjectionHost> escaper = expr.createLiteralTextEscaper();\n    TextRange newLineFoo = TextRange.create(1, 5);\n    escaper.decode(newLineFoo, new StringBuilder());\n    assertEquals(1, escaper.getOffsetInHost(0, newLineFoo));\n    assertEquals(2, escaper.getOffsetInHost(1, newLineFoo));\n    assertEquals(3, escaper.getOffsetInHost(2, newLineFoo));\n    assertEquals(4, escaper.getOffsetInHost(3, newLineFoo));\n    assertEquals(5, escaper.getOffsetInHost(4, newLineFoo));\n    assertEquals(-1, escaper.getOffsetInHost(5, newLineFoo));\n  }\n\n  public void testEscaperOffsetInStringHostSubString() {\n    GoStringLiteral expr = createStringFromText(\"\\\\nfoo\");\n    assertNotNull(expr);\n    LiteralTextEscaper<? extends PsiLanguageInjectionHost> escaper = expr.createLiteralTextEscaper();\n    TextRange fooOnly = TextRange.create(3, 6);\n    escaper.decode(fooOnly, new StringBuilder());\n    assertEquals(3, escaper.getOffsetInHost(0, fooOnly));\n    assertEquals(4, escaper.getOffsetInHost(1, fooOnly));\n    assertEquals(5, escaper.getOffsetInHost(2, fooOnly));\n    assertEquals(6, escaper.getOffsetInHost(3, fooOnly));\n    assertEquals(-1, escaper.getOffsetInHost(4, fooOnly));\n  }\n\n  public void testEscaperOffsetInRawStringHostSubString() {\n    GoStringLiteral expr = createRawStringFromText(\"\\nfoo\");\n    assertNotNull(expr);\n    LiteralTextEscaper<? extends PsiLanguageInjectionHost> escaper = expr.createLiteralTextEscaper();\n    TextRange fooOnly = TextRange.create(2, 5);\n    escaper.decode(fooOnly, new StringBuilder());\n    assertEquals(2, escaper.getOffsetInHost(0, fooOnly));\n    assertEquals(3, escaper.getOffsetInHost(1, fooOnly));\n    assertEquals(4, escaper.getOffsetInHost(2, fooOnly));\n    assertEquals(5, escaper.getOffsetInHost(3, fooOnly));\n    assertEquals(-1, escaper.getOffsetInHost(4, fooOnly));\n  }\n\n  public void testEscaperOffsetInSingleCharString() {\n    doSingleCharTest(createStringFromText(\"c\"));\n  }\n\n  public void testEscaperOffsetInSingleCharRawString() {\n    doSingleCharTest(createRawStringFromText(\"c\"));\n  }\n\n  private static void doSingleCharTest(@NotNull GoStringLiteral expr) {\n    LiteralTextEscaper<? extends PsiLanguageInjectionHost> escaper = expr.createLiteralTextEscaper();\n    TextRange range = TextRange.create(1, 2);\n    escaper.decode(range, new StringBuilder());\n    assertEquals(1, escaper.getOffsetInHost(0, range));\n    assertEquals(2, escaper.getOffsetInHost(1, range));\n    assertEquals(-1, escaper.getOffsetInHost(2, range));\n  }\n\n  public void testEscaperOffsetInSingleEscapedCharString() {\n    GoStringLiteral expr = createStringFromText(\"\\\\n\");\n    assertNotNull(expr);\n    LiteralTextEscaper<? extends PsiLanguageInjectionHost> escaper = expr.createLiteralTextEscaper();\n    TextRange range = TextRange.create(1, 3);\n    escaper.decode(range, new StringBuilder());\n    assertEquals(1, escaper.getOffsetInHost(0, range));\n    assertEquals(3, escaper.getOffsetInHost(1, range));\n    assertEquals(-1, escaper.getOffsetInHost(2, range));\n  }\n\n  // region decode tests\n\n  public void testDecodeEscapedString() {\n    GoStringLiteral expr = createStringFromText(\"\\\\t\\\\n\\\\b\");\n    assertNotNull(expr);\n    String a = decodeRange(expr, TextRange.create(1, 7));\n    assertEquals(\"\\t\\n\\b\", a);\n  }\n\n  public void testDecodeEscapedVerticalTabString() {\n    GoStringLiteral expr = createStringFromText(\"\\\\v\");\n    assertNotNull(expr);\n    String a = decodeRange(expr, TextRange.create(1, 3));\n    assertEquals(\"\\013\", a);\n  }\n\n  public void testDecodeEscapedBellString() {\n    GoStringLiteral expr = createStringFromText(\"\\\\a\");\n    assertNotNull(expr);\n    String a = decodeRange(expr, TextRange.create(1, 3));\n    assertEquals(\"\\007\", a);\n  }\n\n  public void testDecodeOctalCharString() {\n    GoStringLiteral expr = createStringFromText(\"\\\\011\");\n    assertNotNull(expr);\n    String a = decodeRange(expr, TextRange.create(1, 5));\n    assertEquals(\"\\t\", a);\n  }\n\n  public void testDecodeHexCharString() {\n    GoStringLiteral expr = createStringFromText(\"\\\\x41\");\n    assertNotNull(expr);\n    String a = decodeRange(expr, TextRange.create(1, 5));\n    assertEquals(\"A\", a);\n  }\n\n  public void testDecodeShortUnicodeCharString() {\n    GoStringLiteral expr = createStringFromText(\"\\\\u8a9e\");\n    assertNotNull(expr);\n    String a = decodeRange(expr, TextRange.create(1, 7));\n    assertEquals(\"語\", a);\n  }\n\n  public void testDecodeLongUnicodeCharString() {\n    PlatformTestUtil.withEncoding(CharsetToolkit.UTF8, () -> {\n      GoStringLiteral expr = createStringFromText(\"\\\\U00008a9e\");\n      assertNotNull(expr);\n      String a = decodeRange(expr, TextRange.create(1, 11));\n      assertEquals(\"語\", a);\n    });\n  }\n\n  public void testQuote() {\n    PlatformTestUtil.withEncoding(CharsetToolkit.UTF8, () -> {\n      GoStringLiteral expr = createStringFromText(\"import \\\\\\\"fmt\\\\\\\"\");\n      assertNotNull(expr);\n      assertEquals(\"\\\"fmt\\\"\", decodeRange(expr, TextRange.create(8, 15)));\n    });\n  }\n\n  // endregion\n\n  @NotNull\n  private GoStringLiteral createStringFromText(@NotNull String text) {\n    return GoElementFactory.createStringLiteral(myFixture.getProject(), String.format(Locale.US, \"\\\"%s\\\"\", text));\n  }\n\n  @NotNull\n  private GoStringLiteral createRawStringFromText(@NotNull String text) {\n    return GoElementFactory.createStringLiteral(myFixture.getProject(), String.format(Locale.US, \"`%s`\", text));\n  }\n}\n"
  },
  {
    "path": "utils/src/com/goide/GoConstants.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide;\n\nimport com.intellij.notification.NotificationGroup;\nimport com.intellij.openapi.wm.ToolWindowId;\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NonNls;\n\nimport java.util.Set;\n\npublic class GoConstants {\n  public static final String MODULE_TYPE_ID = \"GO_MODULE\";\n  public static final String SDK_TYPE_ID = \"Go SDK\";\n  public static final String PATH = \"PATH\";\n  public static final String GO_PATH = \"GOPATH\";\n  public static final String GO_ROOT = \"GOROOT\";\n  public static final String GO_VENDORING_EXPERIMENT = \"GO15VENDOREXPERIMENT\";\n  public static final String GO_LIBRARIES_SERVICE_NAME = \"GoLibraries\";\n  public static final String GO_LIBRARIES_CONFIG_FILE = \"goLibraries.xml\";\n  public static final String GO_MODULE_SESTTINGS_SERVICE_NAME = \"Go\";\n\n  private static final String IDENTIFIER_REGEX = \"[\\\\p{javaLetter}_][\\\\p{javaLetterOrDigit}_]*\";\n  public static final String TEST_NAME_REGEX = IDENTIFIER_REGEX + \"(/\\\\S*)?\";\n  public static final String TESTDATA_NAME = \"testdata\";\n  public static final String TEST_SUFFIX = \"_test\";\n  public static final String TEST_SUFFIX_WITH_EXTENSION = \"_test.go\";\n  public static final String TEST_PREFIX = \"Test\";\n  public static final String BENCHMARK_PREFIX = \"Benchmark\";\n  public static final String EXAMPLE_PREFIX = \"Example\";\n  public static final String TEST_MAIN = \"TestMain\";\n  public static final String MAIN = \"main\";\n  public static final String INIT = \"init\";\n  public static final String IOTA = \"iota\";\n  public static final String DOCUMENTATION = \"documentation\";\n  public static final String C_PATH = \"C\";\n  public static final String TESTING_PATH = \"testing\";\n  public static final String VENDOR = \"vendor\";\n  public static final String INTERNAL = \"internal\";\n  public static final String INTERFACE_TYPE = \"interface{}\";\n\n  public static final NotificationGroup GO_NOTIFICATION_GROUP = NotificationGroup.balloonGroup(\"Go plugin notifications\");\n  public static final NotificationGroup GO_EXECUTION_NOTIFICATION_GROUP = NotificationGroup.toolWindowGroup(\"Go Execution\", ToolWindowId.RUN);\n\n  @NonNls public static final String LIB_EXEC_DIRECTORY = \"libexec\";\n  @NonNls public static final String GO_VERSION_FILE_PATH = \"runtime/zversion.go\";\n  @NonNls public static final String GO_VERSION_NEW_FILE_PATH = \"runtime/internal/sys/zversion.go\";\n  public static final String BUILTIN_FILE_NAME = \"builtin.go\";\n  public static final String BUILTIN_PACKAGE_NAME = \"builtin\";\n  public static final String BUILTIN_FILE_PATH = BUILTIN_PACKAGE_NAME + \"/\" + BUILTIN_FILE_NAME;\n\n  @NonNls public static final String APP_ENGINE_MARKER_FILE = \"appcfg.py\";\n  @NonNls public static final String APP_ENGINE_GO_ROOT_DIRECTORY_PATH = \"/goroot\";\n  @NonNls public static final String GCLOUD_APP_ENGINE_DIRECTORY_PATH = \"/platform/google_appengine\";\n  @NonNls public static final String GAE_EXECUTABLE_NAME = \"goapp\";\n  @NonNls public static final String GAE_BAT_EXECUTABLE_NAME = \"goapp.bat\";\n  @NonNls public static final String GAE_CMD_EXECUTABLE_NAME = \"goapp.cmd\";\n  @NonNls public static final String DELVE_EXECUTABLE_NAME = \"dlv\";\n\n  @NonNls public static final String GO_EXECUTABLE_NAME = \"go\";\n  public static final String BUILD_FLAG = \"+build\";\n\n  public static final String LINUX_OS = \"linux\";\n  public static final String ANDROID_OS = \"android\";\n\n  // see \"$GOROOT/src/go/build/syslist.go\n  public static final Set<String> KNOWN_OS = ContainerUtil.immutableSet(\"android\", \"darwin\", \"dragonfly\", \"freebsd\", \"linux\", \"nacl\",\n                                                                        \"netbsd\", \"openbsd\", \"plan9\", \"solaris\", \"windows\");\n  public static final Set<String> KNOWN_ARCH = ContainerUtil.immutableSet(\"386\", \"amd64\", \"amd64p32\", \"arm\", \"armbe\", \"arm64\", \"arm64be\", \n                                                                          \"ppc64\", \"ppc64le\", \"mips\", \"mipsle\", \"mips64\", \"mips64le\", \n                                                                          \"mips64p32\", \"mips64p32le\", \"ppc\", \"s390\", \"s390x\", \"sparc\", \n                                                                          \"sparc64\");\n  public static final Set<String> KNOWN_VERSIONS = ContainerUtil.immutableSet(\"go1.1\", \"go1.2\", \"go1.3\", \"go1.4\", \"go1.5\", \"go1.6\", \"go1.7\");\n  public static final Set<String> KNOWN_CGO = ContainerUtil.immutableSet(\"darwin/386\", \"darwin/amd64\", \"dragonfly/386\", \"dragonfly/amd64\",\n                                                                         \"freebsd/386\", \"freebsd/amd64\", \"freebsd/arm\", \"linux/386\",\n                                                                         \"linux/amd64\", \"linux/arm\", \"linux/arm64\", \"android/386\", \n                                                                         \"android/amd64\", \"android/arm\", \"netbsd/386\", \"netbsd/amd64\", \n                                                                         \"netbsd/arm\", \"openbsd/386\", \"openbsd/amd64\", \"windows/386\", \n                                                                         \"windows/amd64\", \"linux/ppc64le\");\n  public static final Set<String> KNOWN_COMPILERS = ContainerUtil.immutableSet(\"gc\", \"gccgo\");\n\n  @NonNls public static final String NIL = \"nil\";\n\n  @NonNls public static final String GO = \"Go\";\n  @NonNls public static final String AMD64 = \"amd64\";\n\n  private GoConstants() {\n\n  }\n}\n"
  },
  {
    "path": "utils/src/com/goide/GoEnvironmentUtil.java",
    "content": "/*\n * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide;\n\nimport com.intellij.openapi.application.ApplicationManager;\nimport com.intellij.openapi.application.PathMacros;\nimport com.intellij.openapi.util.SystemInfo;\nimport com.intellij.openapi.util.io.FileUtil;\nimport com.intellij.util.EnvironmentUtil;\nimport com.intellij.util.PathUtil;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic class GoEnvironmentUtil {\n  private GoEnvironmentUtil() {}\n\n  @NotNull\n  public static String getBinaryFileNameForPath(@NotNull String path) {\n    String resultBinaryName = FileUtil.getNameWithoutExtension(PathUtil.getFileName(path));\n    return SystemInfo.isWindows ? resultBinaryName + \".exe\" : resultBinaryName;\n  }\n\n  @NotNull\n  public static String getGaeExecutableFileName(boolean gcloudInstallation) {\n    if (SystemInfo.isWindows) {\n      return gcloudInstallation ? GoConstants.GAE_CMD_EXECUTABLE_NAME : GoConstants.GAE_BAT_EXECUTABLE_NAME;\n    }\n    return GoConstants.GAE_EXECUTABLE_NAME;\n  }\n\n  @Nullable\n  public static String retrieveGoPathFromEnvironment() {\n    if (ApplicationManager.getApplication().isUnitTestMode()) return null;\n    \n    String path = EnvironmentUtil.getValue(GoConstants.GO_PATH);\n    return path != null ? path : PathMacros.getInstance().getValue(GoConstants.GO_PATH);\n  }\n}\n"
  },
  {
    "path": "utils/src/com/goide/GoLibrariesState.java",
    "content": "/*\n * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.goide;\n\nimport com.intellij.util.containers.ContainerUtil;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.Collection;\n\npublic class GoLibrariesState {\n  @NotNull private Collection<String> myUrls = ContainerUtil.newArrayList();\n\n  @NotNull\n  public Collection<String> getUrls() {\n    return myUrls;\n  }\n\n  public void setUrls(@NotNull Collection<String> urls) {\n    myUrls = urls;\n  }\n}\n"
  }
]