/// <summary> /// Save method will not update the existing file if the content is same. /// This is useful for optimization of external DSL analysis, such as DSL IntelliSense plugin. /// </summary> public void Save(DslSyntax dslSyntax) { string newContent = JsonConvert.SerializeObject(dslSyntax, _jsonSettings); string oldContent = File.Exists(DslSyntaxFilePath) ? File.ReadAllText(DslSyntaxFilePath) : null; if (newContent != oldContent) { File.WriteAllText(DslSyntaxFilePath, newContent); } }
public TokenizerInternals(DslSyntax syntax) { _syntax = syntax; }
public DslSyntaxFileGenerator(DslSyntax dslSyntax, DslSyntaxFile dslSyntaxFile) { _dslSyntax = dslSyntax; _dslSyntaxFile = dslSyntaxFile; }
public DslDocumentationFileGenerator(DslSyntax dslSyntax, ILogProvider logProvider, DslDocumentationFile dslDocumentationFile) { _dslSyntax = dslSyntax; _dslDocumentationFile = dslDocumentationFile; _logger = logProvider.GetLogger(GetType().Name); }