Commit Graph

434 Commits

Author SHA1 Message Date
Roy Qu bfd00957eb - Enhancement: Better support for macros. 2023-11-26 15:44:13 +08:00
Roy Qu aa12dcc4d1 - fix: Crash if #include a non-exist header file in the source. 2023-11-05 21:00:52 +08:00
Roy Qu 43dbbf798a optimize 2023-10-28 09:20:01 +08:00
Roy Qu 6cf04c1ca6 minor refactor 2023-10-27 20:49:39 +08:00
Roy Qu 13d81b1134 reduce memory usage 2023-10-27 20:16:44 +08:00
Roy Qu 9a51678d09 Minor update 2023-10-27 09:49:34 +08:00
Roy Qu 5814043302 - enhancement: when induce type info for return value, try to select the overloaded one that doesn't have an "auto" type. 2023-10-26 08:57:40 +08:00
Roy Qu 94e955b07a - fix: If the integrated gcc compiler is add to path, auto find compilers will find in twice. (Windows) 2023-10-25 18:58:45 +08:00
Roy Qu 3a78819fb8 - fix: C++ compiler atrribute '[[xxx]]' are not correctly handled. 2023-10-25 17:01:42 +08:00
Roy Qu 85ef5986bf Add debug info for macro expansion 2023-10-25 11:49:25 +08:00
Roy Qu b287464b98 - fix: Macros that defined by the compiler are not correctly syntax-colored and tooltiped. 2023-10-25 00:34:29 +08:00
Roy Qu 0bc361e1f9 - enhancement: Better support for expanding macros with complex parameters. 2023-10-25 00:19:05 +08:00
Roy Qu 4eca58b62a - enhancement: Basic support for parsing variadic macros. 2023-10-24 20:35:43 +08:00
Roy Qu e0b9bfb4c8 minor cleanup 2023-10-22 20:04:21 +08:00
Roy Qu c3352ad661 - refactor: for/catch processing
- fix: Link in the project options dialog / precompiled header pages is not clickable.
2023-10-22 18:33:53 +08:00
Roy Qu 30cabe2faa - enhancement: Parse files that contains C++ 20 'concept' keyword. (No code suggesion for concepts now)
- enhancement: Parse files that contains C++ 20 'requires' keyword.
  - fix: Code suggestions in namespace.
  - enhancement: Code suggestions for namespace alias.
  - fix: Correctly handle statements like 'using xxx::operator()'.
2023-10-22 13:19:03 +08:00
Roy Qu 9467645bef - fix: __attribute__ is not correctly handled if it is after 'static'. 2023-10-21 22:19:26 +08:00
Roy Qu eb7c1d0c8f Merge branch '2.26' 2023-10-21 13:38:50 +08:00
Cyano Hao a62acc2eb0
Add Windows XP support (#146)
* improve Qt 5.6 support

* switch registry API to Windows XP compatible Unicode API

* update docs

* add comment for `CONFIG += c++14 c++17` in qmake .pro files

* fix logic for lockFile
2023-10-21 13:38:12 +08:00
Roy Qu 8fe15dab8a - enhancment: Code suggestion for embedded std::vectors. 2023-10-19 19:32:08 +08:00
Roy Qu 526e73d27a Use QRecursiveMutex instead of QMutex in CppParser 2023-10-10 19:59:39 +08:00
Roy Qu 85cd761e36 minor fix 2023-10-01 10:49:59 +08:00
Roy Qu 14ba74e705 - fix: Processing for #if/#elif/#else is not correct. 2023-10-01 10:45:43 +08:00
Roy Qu 98f015f661 fix: linux compatibility(from cyano.CN) 2023-08-17 22:08:31 +08:00
Roy Qu 6b2a800d37 - enhancement: Support SDCC Project. 2023-08-17 19:24:49 +08:00
Roy Qu dd5640d334 - enhancement: False branches are displayed as comments. 2023-08-17 13:24:08 +08:00
Roy Qu dcd53771d3 fix: Can't suggest members of variable defined by unname struct/union. 2023-08-13 22:19:56 +08:00
Roy Qu 37df656c82 add more sdcc keywords 2023-08-13 20:57:09 +08:00
Roy Qu 707358817c - enhancement: Autowrap tool output text. 2023-08-13 15:41:17 +08:00
Roy Qu 738faf0c90 - fix: Crash if close file while auto syntax checking.
- enhancement: support sdcc compiler.
2023-08-13 14:46:53 +08:00
Roy Qu f462d6708d - fix: Crash if close file while auto syntax checking. 2023-08-12 13:51:35 +08:00
Roy Qu 739f382f46 - change: Remove option "clear all symbols when current editor is hidden".
- fix: When opening multiple files, only the active file should be parsed.
2023-08-11 13:49:09 +08:00
Roy Qu 7104089e66 comment out debug info 2023-08-09 22:36:33 +08:00
Roy Qu 0f7b4b8ce5 - fix: Wrong code suggestion while inputing numbers in assembly files.
- fix: Defines in all files are wrongly cleared when reparsing.
2023-08-09 22:35:25 +08:00
Roy Qu f111433ac5 - fix: Can't parse virtual inherit. 2023-08-08 10:40:59 +08:00
Roy Qu 30426ac58f Crash when enum value is a symbol that not valid. 2023-08-07 18:28:30 +08:00
Roy Qu d1214e3d63 fix: Value of noname enum members are not shown in the class browser. 2023-08-07 14:42:42 +08:00
Roy Qu 6a06b5b3d6 - fix: Dummy struct/enum symbols shouldn't be shown in the completion suggestion.
- enhancement: Support optional enum name.
  - enhancement: Support optional enum type.
  - enhancement: Support simple const expression evaluation for enum values.
  - fix: Accessibilty for inherited members are not correct calculated in multiple inheritance.
  - fix: Can't handle full class name when handle inheritance.
2023-08-07 14:23:57 +08:00
Roy Qu d3a8a57cf5 - fix: Goto definition/declaration may choose wrong symbol is multiple files are opened and symbols have the same name. 2023-07-27 15:44:33 +08:00
Roy Qu 8e6a1872db - fix: members of elements of stl maps are not correctly suggested. 2023-07-14 17:44:14 +08:00
Roy Qu 56f03a52d5 - fix: Keyword asm is not correctly parsed. 2023-07-05 09:01:38 +08:00
Roy Qu bd768552c0 - fix: Inherited class/struct members are not correctly shown in the completion suggestions. 2023-07-04 20:10:08 +08:00
Roy Qu 0e1332dd5e fix: "__max" in istream.tcc is wrongly expanded. 2023-07-03 18:21:33 +08:00
Roy Qu b571e5f535 - enhancement: Show code completion suggestion after "typedef" and "const". 2023-07-03 09:36:27 +08:00
Roy Qu 362cf5701c - improve: Correctly expands multi-line macros when parsing;
- improve: Correctly eppands macros when real param string contains '(' or  ')'.
2023-07-01 18:06:39 +08:00
Roy Qu 58b92a6360 - fix: crash when source files contains macro definitions like "#define cfun (cfun + 0)" 2023-07-01 13:41:27 +08:00
Roy Qu 88b592f829 - fix: crash when parsing files containing inline assembly code. 2023-06-30 11:52:01 +08:00
Roy Qu e5e322dea4 - enhancement: correctly highlight multiline raw string literals.
- change: remove "Assembly" color scheme item (it's not used anymore).
2023-06-30 10:53:58 +08:00
Roy Qu 8ad9e22976 - fix: "typedef struct" for arrays is not correctly parsed. 2023-06-30 09:29:20 +08:00
Roy Qu d71cd7e7dc - fix: "typedef struct" that don't have definition of the struct is not correctly parsed. 2023-06-29 21:31:30 +08:00
Roy Qu 4070362cdc - enhancement: improve parsing result for function parameters like 'Node (&node)[10]' 2023-06-21 19:30:02 +08:00
Roy Qu 35b986a358 - enhancement: improve code completion for std iterators defined with "using namespace std" 2023-06-20 21:07:26 +08:00
Roy Qu 3cc00eaf8f improve pointer level calc for [] 2023-06-20 19:26:28 +08:00
Roy Qu 9e7d82fc52 work save 2023-06-20 10:58:14 +08:00
Roy Qu 1928783cbd - enhancement: differenciate -> and . when displaying completion suggestion infos. 2023-06-20 09:57:57 +08:00
Roy Qu dfed4accf6 - enhancement: Tooltip support for '->' operator on std iterators.
- enhancement: Close other editors.
2023-06-13 17:16:09 +08:00
Roy Qu 4746d1b63c - enhancement: Code completion for '->' operator on std iterators. 2023-06-08 17:15:55 +08:00
Roy Qu e2f25d063f - fix: Typedef and using alias is not correctly handled in expression evaluation. 2023-05-31 20:06:52 +08:00
Roy Qu c6fb11d130 work save 2023-05-29 09:34:07 +08:00
Roy Qu e44b2999e1 - enhancement: show completion for return type of lambda expressions. 2023-05-26 08:55:21 +08:00
Roy Qu 3440b08d8d - enhancement: ignore '__extension__' when parsing C/C++ codes. 2023-05-25 18:19:18 +08:00
Roy Qu 3d138e3ac5 - fix: lambda expression is not correctly handled. 2023-05-24 20:32:27 +08:00
Roy Qu d4ccdbcdc2 - fix: lambda expression is not correctly handled. 2023-05-24 19:30:38 +08:00
Roy Qu c304f3f8a0 - fix: lambda expression is not correctly handled. 2023-05-24 17:02:59 +08:00
Roy Qu 19a85db1f9 - fix: '^' is not correctly handled as operator. 2023-05-24 13:42:46 +08:00
Roy Qu a251173a6a comment out debug codes 2023-05-14 15:59:54 +08:00
Roy Qu 7e3ee41546 - fix: foreach-loops are not correctly parsed. 2023-05-14 15:57:07 +08:00
Roy Qu cd17c7cbca - enhancement: Improve code completion suggestion for arrays. 2023-03-26 19:05:38 +08:00
Roy Qu 919ba31c32 - fix: Class constructor & destructor is not correctly handled. 2023-03-24 17:40:59 +08:00
Roy Qu 1470f58206 - fix: Crash when directive line ends with '\' and at the last line. 2023-03-18 10:34:37 +08:00
Roy Qu 626217f856 - fix: Don't show completion info when input parameters for function definitions.
- fix: Don't show function info tips when typing class variable definitions.
  - fix: Compare error in debug mode.
2023-03-16 22:02:32 +08:00
Roy Qu dab6a331b9 optimize parser 2023-03-13 00:13:23 +08:00
Roy Qu 586e6a6185 optimization for cpp parser 2023-03-12 23:45:03 +08:00
Roy Qu f37a9908ba refactor: handle class/struct/union in the parser 2023-03-12 19:17:39 +08:00
Roy Qu de406de236 refactor : member accessibility processing in the parser 2023-03-12 18:24:58 +08:00
Roy Qu f04c7c0221 refactor test for operator 2023-03-12 12:42:44 +08:00
Roy Qu b246e3d145 refactor check for struct/class/union defines in the parser 2023-03-12 10:50:47 +08:00
Roy Qu 16258cc015 use normal mutex instead of recursivemutex 2023-03-12 10:00:32 +08:00
Roy Qu 0b0e941155 - fix: Code completion info for stl::map/std::unordered_map is not correct. 2023-03-11 19:56:40 +08:00
Roy Qu b220df600b - enhancement: Sort header completion infos by suffix-trimmed filename. 2023-03-11 19:30:56 +08:00
Roy Qu d29ec1ee0f refactor: make most expression evaluation funcs const 2023-03-11 17:32:57 +08:00
Roy Qu fdc04c0d4f fix: wrong type for operator overloading for conversion functions. 2023-03-10 20:50:46 +08:00
Roy Qu fec78d0045 - enhancement: Don't show operator overloading functions in the complete suggestions
- enhancement: Correctly hanlde operator overloading functions like "operator ClassA"
2023-03-10 20:13:52 +08:00
Roy Qu 60055107ca fix: '::' is not correctly handled when skip to : in the parser 2023-03-10 16:02:47 +08:00
Roy Qu 5cba7365f5 - enhancement: Improve support for function pointer vars. 2023-03-02 11:28:03 +08:00
Roy Qu a40dee6b4d work save 2023-03-02 10:15:25 +08:00
Roy Qu 56972d168e - fix: Can't correctly parse function pointer var definition. 2023-03-01 22:53:14 +08:00
Roy Qu e7013cff1a - fix: Project files that not in the project folder is not correctly handled in makefile.
- enhancement: Improve support for function pointer typedefs.
2023-03-01 11:29:30 +08:00
Roy Qu 5d9ecea491 - enhancement: Add descriptions for x86 registers in the cpu info dialog. 2023-02-25 21:19:14 +08:00
Roy Qu 2dd835f4ce - fix: Function with reference type return value is not correctly parsed. 2023-02-25 12:23:45 +08:00
Roy Qu a4a7ff158c - fix: Static class members is not correctly recognized as static. 2023-02-25 12:15:54 +08:00
Roy Qu c1f8489bfd Assert fail on parser in DEBUG mode, when multiparser working at the same time 2023-02-21 22:40:29 +08:00
Roy Qu f03c25a672 - fix: Enum value defines is not correctly parsed.
- enhancement: Use differenct source file for each language in project templates
2023-02-21 20:35:41 +08:00
Roy Qu 457e84f86a - Enhancement: Correctly init panel sizes when first run. 2023-02-21 09:47:59 +08:00
Roy Qu 60db5a894b - Enhancement: Support C11 ano 2023-02-20 17:52:42 +08:00
Roy Qu 25d0f5b782 - fix: Can't parse enum values.
- fix: Can't correctly show enum values in the class browser.
  - fix: Can't correctly create project, if template's encoding setting is not valid.
  - enhancement: Add "embed assembly" template.
2023-02-15 16:24:24 +08:00
Roy Qu 1eb7bdf549 fix: editor not parsed when first load
fix: TODO is wrongly parsed when new a file (that exists in the current folder)
2023-02-14 09:03:06 +08:00
Roy Qu 32a29540bd fix: correctly handle "::" in using, using namespace and typedef 2023-02-06 20:32:29 +08:00
Roy Qu 377a2c8ba8 remove debug info 2023-02-06 19:43:09 +08:00
Roy Qu 1b15f3eb1d - fix: Parser can't correctly differentiate function and var initialization. 2023-02-06 19:37:01 +08:00
Roy Qu 6081054f89 fix: Don't expose functions who's parent can't be found in the global scope. 2023-02-06 16:50:24 +08:00
Roy Qu 4fc3900796 - enhancement: Improve parsing for operator overloading. 2023-02-06 14:04:38 +08:00
Roy Qu 7085318197 - enhancement: Auto suggest keyword "operator" when define functions.
- fix: Differentiate class and constructors.
2023-02-05 21:55:23 +08:00
Roy Qu ca5916a4b1 - fix: Can't correctly handle definitions for "operator," 2023-02-05 20:36:10 +08:00
Roy Qu 629a90d521 - enhancement: Simplified chinese translations for encoding names.
- fix: Crash when there are preprocessing directives like '#if 0/0' or '#if 0%0'
2023-01-26 11:07:46 +08:00
Roy Qu bc1b22ad25 - enhancement: Rename symbols won't remove all breakpoints/bookmarks
- enhancement: Batch replace won't remove all breakpoints/bookmarks
  - enhancement: Execute parameters can be used in debug.
2023-01-12 12:07:22 +08:00
Roy Qu abf4a5985f - fix: In column mode, selection that contain lines with different length will cause error. 2023-01-11 11:05:34 +08:00
Roy Qu 9a5f97cc7a - fix: Function parameters that is pointer,reference or array can't be correctly parsed. 2023-01-11 09:51:05 +08:00
Roy Qu 5f75fd97cd - fix: Result of scope calculation not right if a for statement immediately follows another for statement. 2023-01-10 19:08:49 +08:00
Roy Qu 61a5d9f94f minor optimization 2022-12-27 14:34:57 +08:00
Roy Qu a1af733a53 minor optimization 2022-12-27 14:29:49 +08:00
Roy Qu 022f32a95f minor optimization 2022-12-27 13:26:16 +08:00
Roy Qu b1ca0bb600 - enhancement: Import FPS (free problem set) files. 2022-12-11 19:47:43 +08:00
Roy Qu c4a41403bc refactor highlighters 2022-12-10 21:23:49 +08:00
Roy Qu b4e561cf83 improve makefile highlighter
fix: qsortfilterproxymodel not correctly cleared when exiting and project closed.
2022-12-07 09:48:10 +08:00
Roy Qu 9f2ab0479e minor fix 2022-12-03 11:02:33 +08:00
Roy Qu bb2532a2ef - change: Default value of option "Editors share one code analyzer" is ON
- change: Default value of option "Auto clear symbols in hidden editors" is OFF
  - minor fix
2022-11-30 09:54:23 +08:00
Roy Qu ba1e100ab4 - enhancement: support type deduce for std::pair 2022-11-29 18:30:00 +08:00
Roy Qu a6d5da07a3 - enhancement: show compltion suggest for std::pair::first and std::pair second 2022-11-29 16:48:40 +08:00
Roy Qu 407f11aa22 fix: correctly handle For(const auto&) 2022-11-29 15:42:08 +08:00
Roy Qu e845c7474b correctly deduce type for stl container iterators 2022-11-29 12:17:41 +08:00
Roy Qu 0d0332aa7d - fix: can't correctly show completion suggest for type with template parameters
- enhancement: correctly evaluate auto variable of stl container iterator.
2022-11-29 12:06:29 +08:00
Roy Qu 3a1bc97ca5 minor refactor 2022-11-28 11:28:02 +08:00
Roy Qu de23833992 - enhancement: Deduce type info for "auto" in some simple cases.
- fix: crash when no semicolon or left brace after the keyword "namespace"
2022-11-28 08:22:48 +08:00
Roy Qu adb3d79b60 - enhancement: Deduce type info for "auto" in some simple cases. 2022-11-27 13:32:14 +08:00
Roy Qu b3a986f1ca refactor: highlighter, work save 2022-11-23 12:51:23 +08:00
Roy Qu a9c266c39a clean up code 2022-11-16 10:29:20 +08:00
Roy Qu 7ab444fc06 clean up code 2022-11-16 09:38:55 +08:00
Roy Qu ed8b0a4c55 - enhancement: new color scheme Monokai (contributed by 小龙Dev)
- enhancemnet: add "Reserve word for Types" item in color scheme
2022-11-14 11:56:38 +08:00
Roy Qu 6a6dc126a4 - enhancement: improve parse result for STL <random> 2022-11-12 12:14:19 +08:00
Roy Qu a4cb52fb96 - fix: _Pragma is not correctly handled; 2022-11-12 10:45:53 +08:00
Roy Qu b085560743 - fix: Escape suquences like \uxxxx and \Uxxxxxxxx in strings are not correctly highlighted.
- enhancement: Search / replace dialogs redesigned.
  - fix: inline functions are not correctly parsed;
  - fix: &operator= functions are not correctly parsed;
  - fix: Code Formatter's "add indent to continueous lines" option is not correctly saved.
2022-11-11 21:20:57 +08:00
Roy Qu 9072e752a0 - fix: crash when alt+mouse drag selection 2022-11-10 09:16:30 +08:00
Roy Qu 052f4610ee - fix: crash when alt+mouse drag selection 2022-11-10 09:05:34 +08:00
Roy Qu ae7e914788 refactor code 2022-11-10 08:05:04 +08:00
Roy Qu a1c80cc562 - fix: function pointers not correctly handle in code parser;
- fix: var assignment not correctly handled in code parser;
  - fix: function args not correctly handled in code parser;
2022-11-09 22:26:26 +08:00
Roy Qu bcc1b8dc09 - fix: function pointers not correctly handle in code parser;
- fix: var assignment not correctly handled in code parser;
  - fix: function args not correctly handled in code parser;
2022-11-09 22:22:33 +08:00
Roy Qu f24c1e96db remove debug info 2022-11-08 22:12:33 +08:00
Roy Qu 4fad826899 - fix: macro defines parsed before not correctly applied in the succeeding parse. 2022-11-08 22:04:53 +08:00
Roy Qu e0c4ba201d - fix: Crash when editing a function at the end of file without ; or {
- enhancement: Add the "parsing TODOs" option in Options Dialog / Editor / Misc
  - enhancement: Remove todos/bookmarks/breakpoints when deleting file from project
  - enhancement: Rename filenames in todos/bookmarks/breakpoints  when renaming project file
2022-11-07 21:44:12 +08:00
Roy Qu fba7bd953c - fix: Contents in class browser not correctly updated when close the last editor for project.
- fix: When all editors closed, switch browser mode dosen't correct update the class browser;

  - stream line codes for project parser and  close browser
2022-11-07 11:24:23 +08:00
Roy Qu 93751d1b23 - fix: When start parsing and exit app, app may crash
- enhancement: add "Allow parallel build" option in project option dialog's custom compile options page
  - fix: crash when rename project file
  - fix: When remove project file, symbols in it not correctly removed from code parser
  - fix: infos in class browser (structure panel) not correctly updated when add/create/remove/rename project files
2022-11-06 22:51:14 +08:00
Roy Qu 1c3bf9000c - enhancement: base class dropdown list in new class dialog now works 2022-11-05 23:35:15 +08:00
Roy Qu 771d0d1456 basic support for lambda 2022-11-05 18:58:15 +08:00
Roy Qu d94125c262 streamline tokenizer 2022-11-05 16:17:46 +08:00
Roy Qu 8d9740dd57 - improve template parameters checker
- streamline cppparser
2022-11-05 08:42:54 +08:00
Roy Qu ef79640eb0 work save 2022-11-04 23:44:11 +08:00
Roy Qu 585d7678d4 work save 2022-11-04 20:27:35 +08:00
Roy Qu 20917e3a8b work save 2022-11-03 00:49:22 +08:00
Roy Qu baab677fa1 work done: lambda support 2022-11-02 22:48:25 +08:00