functionList.xml PureBasic



  • 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>



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



  • L_PUREBASIC = 68



  • 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" />



  • @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.



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



  • 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.



  • <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>


Log in to reply