use of org.snakeyaml.engine.v2.scanner.ScannerImpl in project sonar-iac by SonarSource.
the class CloudformationParser method parse.
@Override
public FileTree parse(String source, @Nullable InputFileContext inputFileContext) {
LoadSettings settings = LoadSettings.builder().setParseComments(shouldParseComments(inputFileContext)).build();
StreamReader reader = new StreamReader(settings, source);
ScannerImpl scanner = new ScannerImpl(settings, reader);
Parser parser = new ParserImpl(settings, scanner);
Composer composer = new Composer(settings, parser);
List<Node> nodes = composerNodes(composer);
return CloudformationConverter.convertFile(nodes);
}
Aggregations