* @return A new representation instance.
* @throws YangSyntaxErrorException
* if we fail to extract dependency information.
+ *
+ * @deprecated Use {@link #create(SourceIdentifier, ParserRuleContext)} instead.
*/
+ @Deprecated
public static ASTSchemaSource create(@Nonnull final SourceIdentifier identifier,
@Nonnull final ParserRuleContext tree, final String text) throws YangSyntaxErrorException {
+ return create(identifier, tree);
+ }
+
+ /**
+ * Create a new instance of AST representation for a abstract syntax tree,
+ * performing minimal semantic analysis to acquire dependency information.
+ *
+ * @param identifier
+ * SourceIdentifier of yang schema source.
+ * @param tree
+ * ANTLR abstract syntax tree
+ * @return A new representation instance.
+ * @throws YangSyntaxErrorException
+ * if we fail to extract dependency information.
+ */
+ public static ASTSchemaSource create(@Nonnull final SourceIdentifier identifier,
+ @Nonnull final ParserRuleContext tree) throws YangSyntaxErrorException {
final YangModelDependencyInfo depInfo = YangModelDependencyInfo.fromAST(identifier.getName(), tree);
final SourceIdentifier id = getSourceId(depInfo);