Skip to content

Commit

Permalink
feat: support new method annValue for rule elements (#274)
Browse files Browse the repository at this point in the history
  • Loading branch information
tangcent authored Nov 2, 2020
1 parent f97ed3f commit 116297e
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,20 @@ abstract class ScriptRuleParser : RuleParser {
return annotationHelper!!.findAttrAsString(getResource(), name, attr)
}

/**
* it.ann("annotation_name"):Any?
*/
fun annValue(name: String): Any? {
return annValue(name, "value")
}

/**
* it.ann("annotation_name","attr"):Any?
*/
fun annValue(name: String, attr: String): Any? {
return annotationHelper!!.findAttr(getResource(), name, attr)
}

/**
* it.doc():String
*/
Expand Down

0 comments on commit 116297e

Please sign in to comment.