【问题标题】:Read java comments with the M3 library使用 M3 库阅读 java 注释
【发布时间】:2014-04-23 08:11:26
【问题描述】:

我想知道 Rascal 如何像这样读取 Java cmets:

//This intent is used to share the picture between Android applications
Intent shareIntent = new Intent();

或者这个:

/**
 * This method can be called to share the picture between Android Applications
 */
private void shareImage() {
    ...
}

createAstFromFile 方法似乎跳过了这些 cmets。

提前致谢。

【问题讨论】:

    标签: rascal


    【解决方案1】:

    评论不包含在 AST 中,但您可以使用 @documentation 字段从 M3 模型中获取:

    anno rel[loc definition, loc comments] M3@documentation;
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-04-29
      • 2011-10-08
      • 1970-01-01
      • 2016-07-18
      • 1970-01-01
      • 2021-01-29
      相关资源
      最近更新 更多