diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 551ad886..5507967b 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -996,6 +996,12 @@ IDL: - .pro - .dlm +IGOR Pro: + type: programming + lexer: Igor + extensions: + - .ipf + INI: type: data extensions: diff --git a/samples/IGOR Pro/functions.ipf b/samples/IGOR Pro/functions.ipf new file mode 100644 index 00000000..a1c82363 --- /dev/null +++ b/samples/IGOR Pro/functions.ipf @@ -0,0 +1,38 @@ +#pragma rtGlobals=3 + +Function FooBar() + return 0 +End + +Function FooBarSubType() : ButtonControl + return 0 +End + +Function/D FooBarVar() + return 0 +End + +static Function FooBarStatic() + return 0 +End + +threadsafe static Function FooBarStaticThreadsafe() + return 0 +End + +threadsafe Function FooBarThread() + return 0 +End + +Function CallOperationsAndBuiltInFuncs(string var) + + string someDQString = "abcd" + + Make/N=(1,2,3,4) myWave + Redimension/N=(-1,-1,-1,5) myWave + + print strlen(someDQString) + + return 0 +End + diff --git a/samples/IGOR Pro/generic.ipf b/samples/IGOR Pro/generic.ipf new file mode 100644 index 00000000..63f96aeb --- /dev/null +++ b/samples/IGOR Pro/generic.ipf @@ -0,0 +1,21 @@ +#pragma rtGlobals=3 + +StrConstant myConstString="abcd" +// some comment +constant myConst=123 + +Structure struct1 + string str + variable var +EndStructure + +static Structure struct2 + string str + variable var +EndStructure + +#include "someFile" + +#ifdef NOT_DEFINED + // conditional compilation +#endif