~ubuntu-branches/ubuntu/trusty/codeblocks/trusty-proposed

« back to all changes in this revision

Viewing changes to src/sdk/wxscintilla/src/scintilla/src/LexVerilog.cxx

  • Committer: Bazaar Package Importer
  • Author(s): David Paleino
  • Date: 2011-01-22 20:58:57 UTC
  • mfrom: (3.1.3 maverick)
  • Revision ID: james.westby@ubuntu.com-20110122205857-mlwokxogiic0dnu7
Tags: 10.05-1
* Initial Debian release (Closes: #304570)
* Setting myself as Maintainer, original Ubuntu maintainer set as
  Uploader
* Use debian/watch to get the original tarball, instead of an ad-hoc
  script
* Wrap multivalue fields in debian/control
* Update debian/copyright with lots of missing info, and use DEP-5
* Add missing linkage to libX11 (03-fix_libX11_linkage.patch)
* Use dh7 for debian/rules
* Build-Depend on dh-autoreconf, since we need to re-generate autotools
  machinery (libtool version mismatch)
* Migrate from libwxsmithlib0-dev to libwxsmithlib-dev, to ease
  future SONAME bumps.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#include "Scintilla.h"
22
22
#include "SciLexer.h"
23
23
 
 
24
#ifdef SCI_NAMESPACE
 
25
using namespace Scintilla;
 
26
#endif
 
27
 
24
28
static inline bool IsAWordChar(const int ch) {
25
29
        return (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_' || ch == '\'');
26
30
}
93
97
                                sc.ForwardSetState(SCE_V_DEFAULT);
94
98
                        }
95
99
                } else if (sc.state == SCE_V_COMMENTLINE || sc.state == SCE_V_COMMENTLINEBANG) {
96
 
                        if (sc.atLineEnd) {
 
100
                        if (sc.atLineStart) {
97
101
                                sc.SetState(SCE_V_DEFAULT);
98
102
                        }
99
103
                } else if (sc.state == SCE_V_STRING) {
160
164
        //      Generally used methodology in verilog code is
161
165
        //      one module per file, so folding at module definition is useless.
162
166
        // fold_at_brace/parenthese -
163
 
        //      Folding of long port lists can be convenient. 
 
167
        //      Folding of long port lists can be convenient.
164
168
        bool foldAtModule = styler.GetPropertyInt("fold.verilog.flags", 0) != 0;
165
169
        bool foldAtBrace  = 1;
166
170
        bool foldAtParenthese  = 1;
167
 
                                
 
171
 
168
172
        unsigned int endPos = startPos + length;
169
173
        int visibleChars = 0;
170
174
        int lineCurrent = styler.GetLine(startPos);
234
238
                }
235
239
                if (style == SCE_V_WORD && stylePrev != SCE_V_WORD) {
236
240
                        unsigned int j = i;
237
 
                        if (styler.Match(j, "case") || 
238
 
                            styler.Match(j, "casex") || 
239
 
                            styler.Match(j, "casez") || 
240
 
                            styler.Match(j, "function") || 
241
 
                            styler.Match(j, "fork") || 
242
 
                            styler.Match(j, "table") || 
243
 
                            styler.Match(j, "task") || 
244
 
                            styler.Match(j, "specify") || 
245
 
                            styler.Match(j, "primitive") || 
246
 
                            styler.Match(j, "module") && foldAtModule || 
 
241
                        if (styler.Match(j, "case") ||
 
242
                            styler.Match(j, "casex") ||
 
243
                            styler.Match(j, "casez") ||
 
244
                            styler.Match(j, "function") ||
 
245
                            styler.Match(j, "fork") ||
 
246
                            styler.Match(j, "table") ||
 
247
                            styler.Match(j, "task") ||
 
248
                            styler.Match(j, "generate") ||
 
249
                            styler.Match(j, "specify") ||
 
250
                            styler.Match(j, "primitive") ||
 
251
                            (styler.Match(j, "module") && foldAtModule) ||
247
252
                            styler.Match(j, "begin")) {
248
253
                                levelNext++;
249
 
                        } else if (styler.Match(j, "endcase") || 
 
254
                        } else if (styler.Match(j, "endcase") ||
250
255
                                   styler.Match(j, "endfunction") ||
251
256
                                   styler.Match(j, "join") ||
252
257
                                   styler.Match(j, "endtask") ||
 
258
                                   styler.Match(j, "endgenerate") ||
253
259
                                   styler.Match(j, "endtable") ||
254
260
                                   styler.Match(j, "endspecify") ||
255
261
                                   styler.Match(j, "endprimitive") ||
256
 
                                   styler.Match(j, "endmodule") && foldAtModule ||
257
 
                                   styler.Match(j, "end") && !IsAWordChar(styler.SafeGetCharAt(j+3))) {
 
262
                                   (styler.Match(j, "endmodule") && foldAtModule) ||
 
263
                                   (styler.Match(j, "end") && !IsAWordChar(styler.SafeGetCharAt(j+3)))) {
258
264
                                levelNext--;
259
265
                        }
260
266
                }