• Login
Community
  • Login

functionList.xml PureBasic

Scheduled Pinned Locked Moved General Discussion
8 Posts 2 Posters 2.7k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A
    AZJIO AZJIO
    last edited by Apr 19, 2019, 11:24 PM

    Add parser functions
    https://www.purebasic.fr/english/viewtopic.php?f=17&t=41069&p=535555#p535555

    <parser
    displayName=“PureBasic”
    id =“purebasic_function”
    commentExpr=“(?x)(?m-s:^\h*;.*?$) # !Single line comment”

    <function
    		mainExpr="(?x)(?mi)^\h*(?:Procedure[CDL$]{0,5}?\K(?:\h*\.[abcdfilqsuw])?|Macro)\h+[A-Za-z_]\w*\h*(?=\()"
    >
       <functionName>
    	  <nameExpr expr="[\w\h.$]+"   />
       </functionName>
    </function>
    

    </parser>

    1 Reply Last reply Reply Quote 0
    • A
      AZJIO AZJIO
      last edited by Apr 20, 2019, 2:10 PM

      What is L_PUREBASIC?
      L_PUREBASIC = 40 ?
      L_PUREBASIC = 55 ?
      This is needed for the line: <association id=“autoit3_function” langID=“40” />

      1 Reply Last reply Reply Quote 0
      • M
        MAPJe71
        last edited by Apr 20, 2019, 3:20 PM

        L_PUREBASIC = 68

        1 Reply Last reply Reply Quote 1
        • A
          AZJIO AZJIO
          last edited by Apr 21, 2019, 5:32 PM

          I tested each line separately. Lines with file extension did not give effect.

          <association id= “purebasic_function” userDefinedLangName=“PureBasic” />
          <association id= “purebasic_function” langID=“68” />
          <association id= “purebasic_function” ext=“.pb” />
          <association id= “purebasic_function” ext=“.pbi” />
          <association id= “purebasic_function” ext=“.pbf” />

          M 1 Reply Last reply Apr 21, 2019, 8:39 PM Reply Quote 0
          • M
            MAPJe71 @AZJIO AZJIO
            last edited by MAPJe71 Apr 21, 2019, 8:41 PM Apr 21, 2019, 8:39 PM

            @AZJIO-AZJIO

            Either use

            <association id= "purebasic_function" langID="68" />
            

            or

            <association id= "purebasic_function" userDefinedLangName="PureBasic" />
            <association id= "purebasic_function" ext=".pb" />
            <association id= "purebasic_function" ext=".pbi" />
            <association id= "purebasic_function" ext=".pbf" />
            

            NOT both.

            Furthermore, make sure the value of the userDefinedLangName attribute equals the name of the language as it appears in the Language menu.

            1 Reply Last reply Reply Quote 3
            • M
              MAPJe71
              last edited by Apr 21, 2019, 8:44 PM

              Use the “proper” double quotes i.e. \x22 aka \u0022.

              1 Reply Last reply Reply Quote 0
              • A
                AZJIO AZJIO
                last edited by Apr 21, 2019, 9:04 PM

                Why can’t I use both? Use the one that is marked with a checkmark. If I mark the second option, it will be used again. Otherwise it will work only one.

                1 Reply Last reply Reply Quote 0
                • A
                  AZJIO AZJIO
                  last edited by Apr 24, 2019, 7:18 AM

                  <association id= “purebasic_function” userDefinedLangName=“PureBasic” />
                  <association id= “purebasic_function” langID=“68” />
                  <association id= “purebasic_function” ext=“.pb” />
                  <association id= “purebasic_function” ext=“.pbi” />
                  <association id= “purebasic_function” ext=“.pbf” />

                  ; !i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i

                  <parser
                  displayName=“PureBasic”
                  id =“purebasic_function”
                  commentExpr=“(?x)(?m-s:^\h*;.*?$) # !Single line comment”

                  <classRange
                  	mainExpr    ="(?x)(?mi)^\h*Module\h+\K[A-Za-z_]\w*\s+.+?(?=EndModule)"
                  >
                  	<className>
                  		<nameExpr expr="\w+" />
                  	</className>
                  		<function
                  			mainExpr="(?x)(?mi)^\h*(?:Procedure[CDL$]{0,5}?(?:\h*\.[abcdfilqsuw])?\K|Macro)\h+[A-Za-z_]\w*\h*(?=\()"
                  		>
                  			<functionName>
                  				<funcNameExpr expr="[\w\h.$]+" />
                  			</functionName>
                  		</function>
                  </classRange>
                  <function
                  	mainExpr="(?x)(?mi)^\h*(?:Procedure[CDL$]{0,5}?(?:\h*\.[abcdfilqsuw])?\K|Macro)\h+[A-Za-z_]\w*\h*(?=\()"
                  >
                  	<functionName>
                  		<nameExpr expr="[\w\h.$]+"   />
                  	</functionName>
                  </function>
                  

                  </parser>

                  1 Reply Last reply Reply Quote 0
                  6 out of 8
                  • First post
                    6/8
                    Last post
                  The Community of users of the Notepad++ text editor.
                  Powered by NodeBB | Contributors