
org.sonar.flex.toolkit.FlexToolkit Maven / Gradle / Ivy
The newest version!
/*
* SonarQube Flex Plugin
* Copyright (C) 2010-2024 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the Sonar Source-Available License Version 1, as published by SonarSource SA.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the Sonar Source-Available License for more details.
*
* You should have received a copy of the Sonar Source-Available License
* along with this program; if not, see https://sonarsource.com/license/ssal/
*/
package org.sonar.flex.toolkit;
import java.nio.charset.Charset;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import org.sonar.colorizer.CDocTokenizer;
import org.sonar.colorizer.CppDocTokenizer;
import org.sonar.colorizer.JavadocTokenizer;
import org.sonar.colorizer.KeywordsTokenizer;
import org.sonar.colorizer.StringTokenizer;
import org.sonar.colorizer.Tokenizer;
import org.sonar.flex.api.FlexKeyword;
import org.sonar.flex.parser.FlexParser;
import org.sonar.sslr.toolkit.Toolkit;
public final class FlexToolkit {
public static final String SPAN_END_TAG = "";
private FlexToolkit() {
}
public static void main(String[] args) {
System.setProperty("com.apple.mrj.application.apple.menu.about.name", "SSDK");
new Toolkit(FlexParser.create(Charset.defaultCharset()), getTokenizers(), "SSLR Flex Toolkit").run();
}
// Visible for testing
static List getTokenizers() {
return Collections.unmodifiableList(Arrays.asList(
new StringTokenizer("", SPAN_END_TAG),
new CDocTokenizer("", SPAN_END_TAG),
new JavadocTokenizer("", SPAN_END_TAG),
new CppDocTokenizer("", SPAN_END_TAG),
new KeywordsTokenizer("", SPAN_END_TAG, FlexKeyword.keywordValues())));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy