(p expr.TokenPager)
| 130 | } |
| 131 | |
| 132 | func readComment(p expr.TokenPager) string { |
| 133 | |
| 134 | comment := "" |
| 135 | |
| 136 | for { |
| 137 | // We are going to loop until we find the first Non-Comment Token |
| 138 | switch p.Cur().T { |
| 139 | case lex.TokenComment, lex.TokenCommentML: |
| 140 | comment += p.Cur().V |
| 141 | case lex.TokenCommentStart, lex.TokenCommentHash, lex.TokenCommentEnd, lex.TokenCommentSingleLine, lex.TokenCommentSlashes: |
| 142 | // skip, currently ignore these |
| 143 | default: |
| 144 | // first non-comment token |
| 145 | return comment |
| 146 | } |
| 147 | p.Next() |
| 148 | } |
| 149 | } |
| 150 | |
| 151 | func discardComments(m expr.TokenPager) { |
| 152 |
no test coverage detected