Tabnine Logo
PerlConfiguration.getCharset
Code IndexAdd Tabnine to your IDE (free)

How to use
getCharset
method
in
com.github.sonarperl.PerlConfiguration

Best Java code snippets using com.github.sonarperl.PerlConfiguration.getCharset (Showing top 2 results out of 315)

origin: sonar-perl/sonar-perl

@Test
public void getConfiguration_charset() {
  PerlConfigurationModel model = new PerlConfigurationModel();
  model.charsetProperty.setValue("UTF-8");
  assertThat(model.getCharset()).isEqualTo(Charsets.UTF_8);
  assertThat(model.getConfiguration().getCharset()).isEqualTo(Charsets.UTF_8);
  model.charsetProperty.setValue("ISO-8859-1");
  assertThat(model.getCharset()).isEqualTo(Charsets.ISO_8859_1);
  assertThat(model.getConfiguration().getCharset()).isEqualTo(Charsets.ISO_8859_1);
}
origin: sonar-perl/sonar-perl

  public static Lexer create(PerlConfiguration config) {
    return Lexer.builder()
        .withCharset(config.getCharset())
        .withFailIfNoChannelToConsumeOneCharacter(true)
        .withChannel(new NewLineChannel())
        .withChannel(new BlackHoleChannel("\\s"))
        .withChannel(commentRegexp("#[^\\n\\r]*+"))
        .withChannel(new PODChannel())
        .withChannel(commentRegexp("__END__[\\n\\r].*+"))
        .withChannel(commentRegexp("__DATA__[\\n\\r].*+"))
        .withChannel(new StringLiteralsChannel())
        .withChannel(new QuoteLikeChannel())
        .withChannel(new HeredocChannel())
        .withChannel(regexp(PerlTokenType.NUMBER, "[1-9][0-9]*+[.][0-9]++" + EXP))
        .withChannel(regexp(PerlTokenType.NUMBER, "[1-9][0-9]*+[.][0-9]++"))
        .withChannel(regexp(PerlTokenType.NUMBER, "[1-9][0-9]*+" + EXP))
        .withChannel(regexp(PerlTokenType.NUMBER, "[1-9][0-9]*+"))
        .withChannel(regexp(PerlTokenType.NUMBER, "0++"))
        .withChannel(new IdentifierAndKeywordChannel(and("[$%&@]?[a-zA-Z_]", o2n("\\w")), true, PerlKeyword.values()))
        .withChannel(new PunctuatorChannel(PerlPunctuator.values()))
        .withChannel(new UnknownCharacterChannel())
        .build();
  }
}
com.github.sonarperlPerlConfigurationgetCharset

Popular methods of PerlConfiguration

  • <init>

Popular in Java

  • Reactive rest calls using spring rest template
  • setScale (BigDecimal)
  • getResourceAsStream (ClassLoader)
  • scheduleAtFixedRate (Timer)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now