Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for BasicJavadocLexer (0.1 sec)

  1. build-logic/documentation/src/main/groovy/gradlebuild/docs/dsl/docbook/BasicJavadocLexer.java

    import java.util.HashMap;
    import java.util.Locale;
    import java.util.Map;
    import java.util.regex.Pattern;
    
    /**
     * Converts the main description of a javadoc comment into a stream of tokens.
     */
    class BasicJavadocLexer implements JavadocLexer {
        private static final Pattern HTML_ELEMENT = Pattern.compile("(?s)<\\\\?[^<]+?>");
        private static final Pattern ELEMENT_ATTRIBUTE = Pattern.compile("(?s)\\w+(\\s*=\\s*('.*?')|(\".*?\"))?");
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Mon Aug 19 15:07:24 UTC 2024
    - 7.1K bytes
    - Viewed (0)
  2. build-logic/documentation/src/test/groovy/gradlebuild/docs/dsl/docbook/BasicJavadocLexerTest.groovy

     * limitations under the License.
     */
    package gradlebuild.docs.dsl.docbook
    
    import spock.lang.Specification
    
    class BasicJavadocLexerTest extends Specification {
        final BasicJavadocLexer lexer = new BasicJavadocLexer(new JavadocScanner(""))
        final visitor = Mock(JavadocLexer.TokenVisitor)
    
        def parsesHtmlElements() {
            when:
            lexer.pushText("<p> text </p>")
            lexer.visit(visitor)
    
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Wed Dec 09 08:14:05 UTC 2020
    - 6K bytes
    - Viewed (0)
  3. build-logic/documentation/src/test/groovy/gradlebuild/docs/dsl/docbook/HtmlToXmlJavadocLexerTest.groovy

            "text<h2>header</h2>text"   | "<p>text</p><h2>header</h2><p>text</p>"
        }
    
        def parse(String source) {
            def lexer = new HtmlToXmlJavadocLexer(new BasicJavadocLexer(new JavadocScanner(source)))
            def result = new StringBuilder()
            lexer.visit(new JavadocLexer.TokenVisitor() {
                @Override
                void onStartHtmlElement(String name) {
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Wed Dec 09 08:14:05 UTC 2020
    - 6.5K bytes
    - Viewed (0)
Back to top