Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to latest dependencies and new Highlighting #59

Merged
merged 4 commits into from
Mar 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# CodeView (Android)

[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-codeview--android-blue.svg)](https://android-arsenal.com/details/1/4216)
[![Release](https://jitpack.io/v/kbiakov/CodeView-android.svg)](https://jitpack.io/#kbiakov/CodeView-Android)
[![Release](https://jitpack.io/v/kbiakov/CodeView-Android.svg)](https://jitpack.io/#kbiakov/CodeView-Android)
[![Build Status](https://travis-ci.org/kbiakov/CodeView-android.svg?branch=master)](https://travis-ci.org/kbiakov/CodeView-Android)
<a href="http://www.methodscount.com/?lib=com.github.kbiakov%3ACodeView-android%3A1.3.0"><img src="https://img.shields.io/badge/Methods and size-core: 969 | 1396 KB-e91e63.svg"/></a>

Expand Down Expand Up @@ -226,11 +226,11 @@ List of apps on Play Store where this library used. Ping me if you want to be he
Icon | Application
------------ | -------------
<img src="https://goo.gl/ijEiBp" width="48" height="48" /> | [GeekBrains]
<img src="https://goo.gl/4VhHbn" width="48" height="48" /> | [Awesome Android - UI Libraries]
<img src="https://goo.gl/1AGK1b" width="48" height="48" /> | [Codify - Codes On The Go]
<img src="https://goo.gl/jcGMmS" width="48" height="48" /> | [C Programming - 200+ Offline Tutorial and Examples]
<img src="https://goo.gl/4VhHbn" width="48" height="48" /> | [Awesome Android - UI Libraries]
<img src="https://goo.gl/UPsE9F" width="48" height="48" /> | [GitJourney for GitHub]
<img src="https://goo.gl/kNqAc7" width="48" height="48" /> | [Source Code - Lập Trình]
<img src="https://goo.gl/jcGMmS" width="48" height="48" /> | [C Programming - CodeSpot]

## Contribute
1. You can add your theme (see [ColorTheme](https://github.com/Softwee/codeview-android/blob/master/codeview/src/main/java/io/github/kbiakov/codeview/highlight/CodeHighlighter.kt) class). Try to add some classic color themes or create your own if it looks cool. You can find many of them in different open-source text editors.<br>
Expand Down Expand Up @@ -264,8 +264,8 @@ SOFTWARE.
```

[GeekBrains]:https://play.google.com/store/apps/details?id=ru.geekbrains
[Codify - Codes On The Go]:https://play.google.com/store/apps/details?id=com.femindharamshi.spa
[C Programming - 200+ Offline Tutorial and Examples]:https://play.google.com/store/apps/details?id=com.rsd.cprogramming
[Awesome Android - UI Libraries]:https://play.google.com/store/apps/details?id=in.sumeetlubal.aweandroid.aweandroid
[GitJourney for GitHub]:https://play.google.com/store/apps/details?id=com.oklab.githubjourney
[Codify - Codes On The Go]:https://play.google.com/store/apps/details?id=com.femindharamshi.spa
[Source Code - Lập Trình]:https://play.google.com/store/apps/details?id=com.noah.truongpq.codeview
[C Programming - CodeSpot]:https://play.google.com/store/apps/details?id=com.rsd.cprogramming
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlinVersion = '1.3.11'
ext.kotlinVersion = '1.3.21'
ext.minSdk = 15
ext.compileSdk = 28
ext.buildTools = '28.0.3'
ext.supportLibrary = '28.0.0'
ext.androidxLibrary = '1.1.0-alpha02'

repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
classpath 'com.android.tools.build:gradle:3.3.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
}
}
Expand Down
4 changes: 2 additions & 2 deletions codeview/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ android {

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
implementation "com.android.support:appcompat-v7:$supportLibrary"
implementation "com.android.support:recyclerview-v7:$supportLibrary"
implementation "androidx.appcompat:appcompat:$androidxLibrary"
implementation "androidx.recyclerview:recyclerview:$androidxLibrary"
}
4 changes: 2 additions & 2 deletions codeview/src/main/java/io/github/kbiakov/codeview/CodeView.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package io.github.kbiakov.codeview
import android.content.Context
import android.graphics.drawable.Drawable
import android.graphics.drawable.GradientDrawable
import android.support.v7.widget.LinearLayoutManager
import android.support.v7.widget.RecyclerView
import android.util.AttributeSet
import android.view.View
import android.widget.RelativeLayout
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import io.github.kbiakov.codeview.Thread.delayed
import io.github.kbiakov.codeview.adapters.AbstractCodeAdapter
import io.github.kbiakov.codeview.adapters.CodeWithNotesAdapter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ package io.github.kbiakov.codeview.adapters
import android.annotation.SuppressLint
import android.content.Context
import android.graphics.Typeface
import android.support.v7.widget.RecyclerView
import android.util.SparseArray
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.LinearLayout
import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView
import io.github.kbiakov.codeview.*
import io.github.kbiakov.codeview.Thread.asyncUi
import io.github.kbiakov.codeview.adapters.AbstractCodeAdapter.ViewHolderType.Companion.BordersCount
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import android.content.Context;
import android.graphics.Typeface;
import android.util.Log;

import java.util.Map;
import java.util.WeakHashMap;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
package io.github.kbiakov.codeview.highlight.prettify.lang;


import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.regex.Pattern;

import io.github.kbiakov.codeview.highlight.prettify.parser.Prettify;

public class LangEx extends Lang {

public LangEx() {
List<List<Object>> _shortcutStylePatterns = new ArrayList<List<Object>>();
List<List<Object>> _fallthroughStylePatterns = new ArrayList<List<Object>>();

_shortcutStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_PLAIN, Pattern.compile("^[\\t\\n\\r \\xA0]+"), null, "\t\n\r \\xA0"}));
_shortcutStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_COMMENT, Pattern.compile("^#.*"), null, "#"}));
_shortcutStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_LITERAL, Pattern.compile("^'(?:[^'\\\\]|\\\\(?:.|\\n|\\r))*'?"), null, "\\'"}));
_shortcutStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_ATTRIB_NAME, Pattern.compile("^@\\w+"), null, "@"}));
_shortcutStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_PUNCTUATION, Pattern.compile("^[!%&()*+,\\-;<=>?\\[\\\\\\]^{|}]+"), null, "!%&()*+,-;<=>?[\\\\]^{|}"}));
_shortcutStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_LITERAL, Pattern.compile("^(?:0o[0-7](?:[0-7]|_[0-7])*|0x[\\da-fA-F](?:[\\da-fA-F]|_[\\da-fA-F])*|\\d(?:\\d|_\\d)*(?:\\.\\d(?:\\d|_\\d)*)?(?:[eE][+\\-]?\\d(?:\\d|_\\d)*)?)"),
null, "0123456789"}));

_fallthroughStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_ATTRIB_NAME, Pattern.compile("^iex(?:\\(\\d+\\))?> ")}));
_fallthroughStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_PUNCTUATION, Pattern.compile("^::"), null}));
_fallthroughStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_LITERAL, Pattern.compile("^:(?:\\w+[\\!\\?\\@]?|\"(?:[^\"\\\\]|\\\\.)*\"?)")}));
_fallthroughStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_ATTRIB_NAME, Pattern.compile("^(?:__(?:CALLER|ENV|MODULE|DIR)__)")}));
_fallthroughStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_KEYWORD, Pattern.compile("^(?:alias|case|catch|def(?:delegate|exception|impl|macrop?|module|overridable|p?|protocol|struct)|do|else|end|fn|for|if|in|import|quote|raise|require|rescue|super|throw|try|unless|unquote(?:_splicing)?|use|when|with|yield)\\b")}));
_fallthroughStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_LITERAL, Pattern.compile("^(?:true|false|nil)\\b")}));
_fallthroughStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_LITERAL, Pattern.compile("^(?:\\w+[\\!\\?\\@]?|\"(?:[^\"\\\\]|\\\\.)*\"):(?!:)")}));
_fallthroughStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_STRING, Pattern.compile("^\"\"\"\\s*(\\r|\\n)+(?:\"\"?(?!\")|[^\\\\\"]|\\\\(?:.|\\n|\\r))*\"{0,3}")}));
_fallthroughStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_STRING, Pattern.compile("^\"(?:[^\"\\\\]|\\\\(?:.|\\n|\\r))*\"?(?!\")")}));
_fallthroughStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_TYPE, Pattern.compile("^[A-Z]\\w*")}));
_fallthroughStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_COMMENT, Pattern.compile("^_\\w*")}));
_fallthroughStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_PLAIN, Pattern.compile("^[$a-z]\\w*[\\!\\?]?")}));
_fallthroughStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_ATTRIB_VALUE, Pattern.compile("^~[A-Z](?:\\/(?:[^\\/\\r\\n\\\\]|\\\\.)+\\/|\\|(?:[^\\|\\r\\n\\\\]|\\\\.)+\\||\"(?:[^\"\\r\\n\\\\]|\\\\.)+\"|'(?:[^'\\r\\n\\\\]|\\\\.)+')[A-Z]*", Pattern.CASE_INSENSITIVE)}));
_fallthroughStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_ATTRIB_VALUE, Pattern.compile("^~[A-Z](?:\\((?:[^\\)\\r\\n\\\\]|\\\\.)+\\)|\\[(?:[^\\]\\r\\n\\\\]|\\\\.)+\\]|\\{(?:[^\\}\\r\\n\\\\]|\\\\.)+\\}|\\<(?:[^\\>\\r\\n\\\\]|\\\\.)+\\>)[A-Z]*", Pattern.CASE_INSENSITIVE)}));
_fallthroughStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_PUNCTUATION, Pattern.compile("^(?:\\.+|\\/|[:~])")}));


setShortcutStylePatterns(_shortcutStylePatterns);
setFallthroughStylePatterns(_fallthroughStylePatterns);
}

public static List<String> getFileExtensions() {
return Arrays.asList(new String[]{"ex", "exs"});
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package io.github.kbiakov.codeview.highlight.prettify.lang;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.regex.Pattern;

import io.github.kbiakov.codeview.highlight.prettify.parser.Prettify;

public class LangKotlin extends Lang {

public LangKotlin() {
List<List<Object>> _shortcutStylePatterns = new ArrayList<List<Object>>();
List<List<Object>> _fallthroughStylePatterns = new ArrayList<List<Object>>();

_shortcutStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_PLAIN, Pattern.compile("^[\\t\\n\\r \\xA0]+"), null, "\\t\\n\\r \\xA0"}));
_shortcutStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_PUNCTUATION, Pattern.compile("^[.!%&()*+,\\-;<=>?\\[\\\\\\]^{|}:]+"), null, ".!%&()*+,-;<=>?[\\\\]^{|}:"}));

_fallthroughStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_KEYWORD, Pattern.compile("^\\b(package|public|protected|private|open|abstract|constructor|final|override|import|for|while|as|typealias|get|set|((data|enum|annotation|sealed) )?class|this|super|val|var|fun|is|in|throw|return|break|continue|(companion )?object|if|try|else|do|when|init|interface|typeof)\\b")}));
_fallthroughStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_LITERAL, Pattern.compile("^(?:true|false|null)\\b")}));
_fallthroughStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_LITERAL, Pattern.compile("^(0[xX][0-9a-fA-F_]+L?|0[bB][0-1]+L?|[0-9_.]+([eE]-?[0-9]+)?[fFL]?)")}));
_fallthroughStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_TYPE, Pattern.compile("^(\\b[A-Z]+[a-z][a-zA-Z0-9_$@]*|`.*`)"), null}));
_fallthroughStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_COMMENT, Pattern.compile("^\\/\\/.*")}));
_fallthroughStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_COMMENT, Pattern.compile("^\\/\\*[\\s\\S]*?(?:\\*\\/|$)")}));
_fallthroughStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_STRING, Pattern.compile("'.'")}));
_fallthroughStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_STRING, Pattern.compile("^\"([^\"\\\\]|\\\\[\\s\\S])*\"")}));
_fallthroughStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_STRING, Pattern.compile("^\"{3}[\\s\\S]*?[^\\\\]\"{3}")}));
_fallthroughStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_LITERAL, Pattern.compile("^@([a-zA-Z0-9_$@]*|`.*`)")}));
_fallthroughStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_LITERAL, Pattern.compile("^[a-zA-Z0-9_]+@")}));

setShortcutStylePatterns(_shortcutStylePatterns);
setFallthroughStylePatterns(_fallthroughStylePatterns);
}

public static List<String> getFileExtensions() {
return Arrays.asList(new String[]{"kotlin"});
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
package io.github.kbiakov.codeview.highlight.prettify.lang;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.regex.Pattern;

import io.github.kbiakov.codeview.highlight.prettify.parser.Prettify;

public class LangLasso extends Lang {

public LangLasso() {
List<List<Object>> _shortcutStylePatterns = new ArrayList<List<Object>>();
List<List<Object>> _fallthroughStylePatterns = new ArrayList<List<Object>>();

_shortcutStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_PLAIN, Pattern.compile("^[\\t\\n\\r \\xA0]+"), null, "\\t\\n\\r \\xA0"}));
_shortcutStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_STRING, Pattern.compile("^\\'[^\\'\\\\]*(?:\\\\[\\s\\S][^\\'\\\\]*)*(?:\\'|$)"), null, "\'"}));
_shortcutStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_STRING, Pattern.compile("^\\\"[^\\\"\\\\]*(?:\\\\[\\s\\S][^\\\"\\\\]*)*(?:\\\"|$)"), null, "\""}));
_shortcutStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_STRING, Pattern.compile("^\\`[^\\`]*(?:\\`|$)"), null, "`"}));
_shortcutStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_LITERAL, Pattern.compile("^0x[\\da-f]+|\\d+", Pattern.CASE_INSENSITIVE), null, "0123456789"}));
_shortcutStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_ATTRIB_NAME, Pattern.compile("^[#$][a-z_][\\w.]*|#\\d+\\b|#![ \\S]+lasso9\\b", Pattern.CASE_INSENSITIVE), null, "#$"}));

_fallthroughStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_TAG, Pattern.compile("^[\\[\\]]|<\\?(?:lasso(?:script)?|=)|\\?>|(no_square_brackets|noprocess)\\b", Pattern.CASE_INSENSITIVE)}));
_fallthroughStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_COMMENT, Pattern.compile("^\\/\\/[^\\r\\n]*|\\/\\*[\\s\\S]*?\\*\\/")}));
_fallthroughStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_ATTRIB_NAME, Pattern.compile("^-(?!infinity)[a-z_][\\w.]*|\\.\\s*'[a-z_][\\w.]*'|\\.{3}", Pattern.CASE_INSENSITIVE)}));
_fallthroughStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_LITERAL, Pattern.compile("^\\d*\\.\\d+(?:e[-+]?\\d+)?|(infinity|NaN)\\b", Pattern.CASE_INSENSITIVE)}));
_fallthroughStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_ATTRIB_VALUE, Pattern.compile("^::\\s*[a-z_][\\w.]*", Pattern.CASE_INSENSITIVE)}));
_fallthroughStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_LITERAL, Pattern.compile("^(?:true|false|none|minimal|full|all|void|and|or|not|bw|nbw|ew|new|cn|ncn|lt|lte|gt|gte|eq|neq|rx|nrx|ft)\\b", Pattern.CASE_INSENSITIVE)}));
_fallthroughStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_TYPE, Pattern.compile("^(?:array|date|decimal|duration|integer|map|pair|string|tag|xml|null|boolean|bytes|keyword|list|locale|queue|set|stack|staticarray|local|var|variable|global|data|self|inherited|currentcapture|givenblock)\\b|^\\.\\.?", Pattern.CASE_INSENSITIVE)}));
_fallthroughStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_KEYWORD, Pattern.compile("^(?:cache|database_names|database_schemanames|database_tablenames|define_tag|define_type|email_batch|encode_set|html_comment|handle|handle_error|header|if|inline|iterate|ljax_target|link|link_currentaction|link_currentgroup|link_currentrecord|link_detail|link_firstgroup|link_firstrecord|link_lastgroup|link_lastrecord|link_nextgroup|link_nextrecord|link_prevgroup|link_prevrecord|log|loop|namespace_using|output_none|portal|private|protect|records|referer|referrer|repeating|resultset|rows|search_args|search_arguments|select|sort_args|sort_arguments|thread_atomic|value_list|while|abort|case|else|fail_if|fail_ifnot|fail|if_empty|if_false|if_null|if_true|loop_abort|loop_continue|loop_count|params|params_up|return|return_value|run_children|soap_definetag|soap_lastrequest|soap_lastresponse|tag_name|ascending|average|by|define|descending|do|equals|frozen|group|handle_failure|import|in|into|join|let|match|max|min|on|order|parent|protected|provide|public|require|returnhome|skip|split_thread|sum|take|thread|to|trait|type|where|with|yield|yieldhome)\\b", Pattern.CASE_INSENSITIVE)}));
_fallthroughStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_PLAIN, Pattern.compile("^[a-z_][\\w.]*(?:=\\s*(?=\\())?", Pattern.CASE_INSENSITIVE)}));
_fallthroughStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_PUNCTUATION, Pattern.compile("^:=|[-+*\\/%=<>&|!?\\\\]+")}));

setShortcutStylePatterns(_shortcutStylePatterns);
setFallthroughStylePatterns(_fallthroughStylePatterns);
}

public static List<String> getFileExtensions() {
return Arrays.asList(new String[]{"lasso", "ls", "lassoscript"});
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package io.github.kbiakov.codeview.highlight.prettify.lang;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.regex.Pattern;

import io.github.kbiakov.codeview.highlight.prettify.parser.Prettify;

public class LangLogtalk extends Lang {

public LangLogtalk() {
List<List<Object>> _shortcutStylePatterns = new ArrayList<List<Object>>();
List<List<Object>> _fallthroughStylePatterns = new ArrayList<List<Object>>();

_shortcutStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_STRING, Pattern.compile("^\\\"(?:[^\\\"\\\\\\n\\x0C\\r]|\\\\[\\s\\S])*(?:\\\"|$)"), null, "\""}));
_shortcutStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_LITERAL, Pattern.compile("^[a-z][a-zA-Z0-9_]*")}));
_shortcutStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_LITERAL, Pattern.compile("^\\'(?:[^\\'\\\\\\n\\x0C\\r]|\\\\[^&])+\\'?"), null, "\'"}));
_shortcutStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_LITERAL, Pattern.compile("^(?:0'.|0b[0-1]+|0o[0-7]+|0x[\\da-f]+|\\d+(?:\\.\\d+)?(?:e[+\\-]?\\d+)?)", Pattern.CASE_INSENSITIVE), null, "0123456789"}));

_fallthroughStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_COMMENT, Pattern.compile("^%[^\\r\\n]*"), null, "%"}));
_fallthroughStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_COMMENT, Pattern.compile("^\\/\\*[\\s\\S]*?\\*\\/")}));
_fallthroughStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_KEYWORD, Pattern.compile("^\\s*:-\\s(c(a(lls|tegory)|oinductive)|p(ublic|r(ot(ocol|ected)|ivate))|e(l(if|se)|n(coding|sure_loaded)|xport)|i(f|n(clude|itialization|fo))|alias|d(ynamic|iscontiguous)|m(eta_(non_terminal|predicate)|od(e|ule)|ultifile)|reexport|s(et_(logtalk|prolog)_flag|ynchronized)|o(bject|p)|use(s|_module))")}));
_fallthroughStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_KEYWORD, Pattern.compile("^\\s*:-\\s(e(lse|nd(if|_(category|object|protocol)))|built_in|dynamic|synchronized|threaded)")}));
_fallthroughStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_TYPE, Pattern.compile("^[A-Z_][a-zA-Z0-9_]*")}));
_fallthroughStylePatterns.add(Arrays.asList(new Object[]{Prettify.PR_PUNCTUATION, Pattern.compile("^[.,;{}:^<>=\\\\/+*?#!-]")}));

setShortcutStylePatterns(_shortcutStylePatterns);
setFallthroughStylePatterns(_fallthroughStylePatterns);
}

public static List<String> getFileExtensions() {
return Arrays.asList(new String[]{"logtalk", "lgt"});
}
}
Loading