lib/Kephra/App/Editor/SyntaxMode/Perl.pm

filter: Statementstmt 75.0% 6 / 8 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 81.8% 9 / 11 CC 1 SCAR 0.9
CC
1
Cov
75%
BEGIN
1.3
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
« lib/Kephra/App/Editor/SyntaxMode/No.pm ↑ Summary lib/Kephra/App/ReplaceBar.pm »
1 1 ▶use v5.12;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 0 ▶use Wx;
Subroutine BEGIN: called CC=1 SCAR=2.6
4  
5 package Kephra::App::Editor::SyntaxMode::Perl;
6  
7  
8 sub set {
9 my ($self) = @_;
10 $self->StyleClearAll;
11 $self->SetLexer( &Wx::wxSTC_LEX_PERL );
12 $self->SetKeyWords(0, 'NULL
13 __FILE__ __LINE__ __PACKAGE__ __DATA__ __END__ __WARN__ __DIE__
14 AUTOLOAD BEGIN CHECK CORE DESTROY END EQ GE GT INIT LE LT NE UNITCHECK
15 abs accept alarm and atan2 bind binmode bless break
16 caller chdir chmod chomp chop chown chr chroot close closedir cmp connect
17 continue cos crypt
18 dbmclose dbmopen default defined delete die do dump
19 each else elsif endgrent endhostent endnetent endprotoent endpwent endservent
20 eof eq eval exec exists exit exp
21 fcntl fileno flock for foreach fork format formline
22 ge getc getgrent getgrgid getgrnam gethostbyaddr gethostbyname gethostent
23 getlogin getnetbyaddr getnetbyname getnetent getpeername getpgrp getppid
24 getpriority getprotobyname getprotobynumber getprotoent getpwent getpwnam
25 getpwuid getservbyname getservbyport getservent getsockname getsockopt given
26 glob gmtime goto grep gt
27 hex if index int ioctl join keys kill
28 last lc lcfirst le length link listen local localtime lock log lstat lt
29 m map mkdir msgctl msgget msgrcv msgsnd my ne next no not
30 oct open opendir or ord our pack package pipe pop pos print printf prototype push
31 q qq qr quotemeta qu qw qx
32 rand read readdir readline readlink readpipe recv redo ref rename require reset
33 return reverse rewinddir rindex rmdir
34 s say scalar seek seekdir select semctl semget semop send setgrent sethostent
35 setnetent setpgrp setpriority setprotoent setpwent setservent setsockopt shift
36 shmctl shmget shmread shmwrite shutdown sin sleep socket socketpair sort splice
37 split sprintf sqrt srand stat state study sub substr symlink syscall sysopen
38 sysread sysseek system syswrite
39 tell telldir tie tied time times tr truncate
40 uc ucfirst umask undef unless unlink unpack unshift untie until use utime
41 values vec wait waitpid wantarray warn when while write x xor y');
42 # Add new keyword.
43 # $self->StyleSetSpec( &Wx::wxSTC_H_TAG, "fore:#000055" ); # Apply tag style for selected lexer (blue)
44  
45 $self->StyleSetSpec(0,"fore:#aabbbb,back:#ffffff"); # Whitespace
46 $self->StyleSetSpec(1,"fore:#ff0000,back:#ffff00"); # Error
47 $self->StyleSetSpec(&Wx::wxSTC_PL_COMMENTLINE,"fore:#aaaaaa"); # Comment
48 $self->StyleSetSpec(&Wx::wxSTC_PL_POD, "fore:#004000,back:#E0FFE0,$(font.text),eolfilled"); # POD: = at beginning of line
49 $self->StyleSetSpec(&Wx::wxSTC_PL_NUMBER, "fore:#007f7f"); # Number
50 $self->StyleSetSpec(5,"fore:#000077,bold"); # Keywords #
51 $self->StyleSetSpec(6,"fore:#ee7b00,back:#fff8f8"); # Doublequoted string
52 $self->StyleSetSpec(7,"fore:#f36600,back:#fffcff"); # Single quoted string
53 $self->StyleSetSpec(8,"fore:#FF5555,bold"); # Symbols / Punctuation. Currently not used by LexPerl.
54 $self->StyleSetSpec(9,""); # Preprocessor. Currently not used by LexPerl.
55 $self->StyleSetSpec(10,"fore:#000000"); # Operators
56 $self->StyleSetSpec(11,"fore:#3355bb"); # Identifiers (functions, etc.)
57 $self->StyleSetSpec(12,"fore:#228822"); # Scalars: $var
58 $self->StyleSetSpec(13,"fore:#339933"); # Array: @var
59 $self->StyleSetSpec(14,"fore:#44aa44"); # Hash: %var
60 $self->StyleSetSpec(15,"fore:#55bb55"); # Symbol table: *var
61 $self->StyleSetSpec(17,"fore:#000000,back:#A0FFA0"); # Regex: /re/ or m{re}
62 $self->StyleSetSpec(18,"fore:#000000,back:#F0E080"); # Substitution: s/re/ore/
63 $self->StyleSetSpec(19,"fore:#000000,back:#8080A0"); # Long Quote (qq, qr, qw, qx) -- obsolete: replaced by qq, qx, qr, qw
64 $self->StyleSetSpec(20,"fore:#ff7700,back:#f9f9d7"); # Back Ticks
65 $self->StyleSetSpec(21,"fore:#600000,back:#FFF0D8,eolfilled"); # Data Section: __DATA__ or __END__ at beginning of line
66 $self->StyleSetSpec(22,"fore:#000000,back:#DDD0DD"); # Here-doc (delimiter)
67 $self->StyleSetSpec(23,"fore:#7F007F,back:#DDD0DD,eolfilled,notbold"); # Here-doc (single quoted, q)
68 $self->StyleSetSpec(24,"fore:#7F007F,back:#DDD0DD,eolfilled,bold"); # Here-doc (double quoted, qq)
69 $self->StyleSetSpec(25,"fore:#7F007F,back:#DDD0DD,eolfilled,italics"); # Here-doc (back ticks, qx)
70 $self->StyleSetSpec(26,"fore:#7F007F,$(font.monospace),notbold"); # Single quoted string, generic
71 $self->StyleSetSpec(27,"fore:#ee7b00,back:#fff8f8"); # qq = Double quoted string
72 $self->StyleSetSpec(28,"fore:#ff7700,back:#f9f9d7"); # qx = Back ticks
73 $self->StyleSetSpec(29,"fore:#000000,back:#A0FFA0"); # qr = Regex
74 $self->StyleSetSpec(30,"fore:#f36600,back:#fff8f8"); # qw = Array
75 $self->StyleSetSpec(31,"fore:#f36600,back:#fff8f8"); # POD verb
76 $self->StyleSetSpec(&Wx::wxSTC_STYLE_BRACELIGHT, "fore:#0000ff,back:#FFFFFF,bold");# 34
77 $self->StyleSetSpec(&Wx::wxSTC_STYLE_BRACEBAD, "fore:#ff0000,back:#FFFFFF,bold");# 35
78 }
79  
80 1;
81  
82 __END__
« lib/Kephra/App/Editor/SyntaxMode/No.pm ↑ Summary lib/Kephra/App/ReplaceBar.pm »