private string ExtractId(LGFileParser.ImportDefinitionContext parseTree) { // content: [xxx](yyy) var content = parseTree.GetText(); var lastOpenBracketIndex = content.LastIndexOf('('); return(content.Substring(lastOpenBracketIndex + 1, content.Length - lastOpenBracketIndex - 2)); }
private string ExtractDescription(LGFileParser.ImportDefinitionContext parseTree) { // content: [xxx](yyy) var content = parseTree.GetText(); var closeSquareBracketIndex = content.IndexOf(']'); return(content.Substring(1, closeSquareBracketIndex - 1)); }