Author Topic: Slick-C : Compiler : Code tag sensitive compile error(?)  (Read 1600 times)

PurdueEEGrad

  • Senior Community Member
  • Posts: 115
  • Hero Points: -17
Slick-C : Compiler : Code tag sensitive compile error(?)
« on: October 06, 2014, 06:41:04 pm »
I had a compile error with the Slick-C code - that may be a compiler bug.  I am
not sure - so I posted this for the V19 Beta 6 testing (see attached SE test files).

The error I get is "Property misspelled - or invalid identifier" - on the SE
command line - during load of the module (attached).

I have attached a SE test set - that is to be loaded as follows;

[1]   ccv_globals.sh                      (needs to be in compile path)
[2]   ccv_04_macro_test_set_00_CMD.e
[3]   ccv_04_macro_test_set_03_CMD.e
[4]   ccv_06_toolbar_test_set_03_CMD.e

The code should (hopefully) create a SE grep toolbar - for state artifacts -
in a multi-language, multi-API, multi-technology corporate environment.

I get a compile error for my Slick-C file - ccv_04_macro_test_set_00_CMD.e.

The problem is the variable - p_target_tag_str - in test module ..04...00_CMD.e
- must be changed to pptarget_tag_str to get Slickedit to compile the module.

Its no big thing for me - since the SE code is just my own....

.. but I thought I would post it - just in case its a bug in the SE compiler.

I can change my SE codebase - since this is a nit for me.  But just in case
there is something I am missing - that is also important to the SE dev team - I
though I should post this.

My customer (client) use case is...

Usecase : I have multiple clients that use both pre_fix and post_fix tagging such as;

str p_target_tag_str;   // p_ = parameter : String passed in as a parameter

Where;

   g_ = Global
   l_ = Local
   p_ = Parameter
   m_ = Member
   etc.

Their intent (in the code convention) - is code visibility in grep results such
as;

m_startup_project_configuration_dps_sta_flg  ==    PROJECT_PROFILE_CONFIGURATION_USER_DPS_STA_ENM

You can tell right away - the flag is the member of a class - from the grep
result alone (the above is the grep result of some C++ code).

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1178
  • Hero Points: 114
Re: Slick-C : Compiler : Code tag sensitive compile error(?)
« Reply #1 on: October 06, 2014, 07:22:03 pm »
That's as designed.   From the Language Constructs section of the manual:

All identifiers starting with p_ are reserved to be used as Slick-C property names.

So I think your renaming of the parameter would be the way to go in this case.

PurdueEEGrad

  • Senior Community Member
  • Posts: 115
  • Hero Points: -17
Re: Slick-C : Compiler : Code tag sensitive compile error(?)
« Reply #2 on: October 30, 2014, 04:42:33 pm »
Worked like a charm. Just used a different prefix (x_ instead of p_).