Squashed 'lib/vscode/' content from commit e5a624b788
git-subtree-dir: lib/vscode git-subtree-split: e5a624b788d92b8d34d1392e4c4d9789406efe8f
This commit is contained in:
3
extensions/cpp/test/colorize-fixtures/test-23630.cpp
Normal file
3
extensions/cpp/test/colorize-fixtures/test-23630.cpp
Normal file
@@ -0,0 +1,3 @@
|
||||
#ifndef _UCRT
|
||||
#define _UCRT
|
||||
#endif
|
||||
3
extensions/cpp/test/colorize-fixtures/test-23850.cpp
Normal file
3
extensions/cpp/test/colorize-fixtures/test-23850.cpp
Normal file
@@ -0,0 +1,3 @@
|
||||
#ifndef _UCRT
|
||||
#define _UCRT
|
||||
#endif
|
||||
13
extensions/cpp/test/colorize-fixtures/test-78769.cpp
Normal file
13
extensions/cpp/test/colorize-fixtures/test-78769.cpp
Normal file
@@ -0,0 +1,13 @@
|
||||
#define DOCTEST_IMPLEMENT_FIXTURE(der, base, func, decorators) \
|
||||
namespace { \
|
||||
struct der : public base \
|
||||
{ \
|
||||
void f(); \
|
||||
}; \
|
||||
static void func() { \
|
||||
der v; \
|
||||
v.f(); \
|
||||
} \
|
||||
DOCTEST_REGISTER_FUNCTION(DOCTEST_EMPTY, func, decorators) \
|
||||
} \
|
||||
inline DOCTEST_NOINLINE void der::f()
|
||||
10
extensions/cpp/test/colorize-fixtures/test-80644.cpp
Normal file
10
extensions/cpp/test/colorize-fixtures/test-80644.cpp
Normal file
@@ -0,0 +1,10 @@
|
||||
struct Foo {
|
||||
Foo();
|
||||
int a;
|
||||
int b;
|
||||
int c;
|
||||
};
|
||||
Foo::Foo()
|
||||
: a(1),
|
||||
// b(2),
|
||||
c(3) {}
|
||||
3
extensions/cpp/test/colorize-fixtures/test-92369.cpp
Normal file
3
extensions/cpp/test/colorize-fixtures/test-92369.cpp
Normal file
@@ -0,0 +1,3 @@
|
||||
std::tuple_element<0, std::pair<pugi::xml_node, std::map<std::basic_string<char>, pugi::xml_node, std::less<std::basic_string<char> >, std::allocator<std::pair<const std::basic_string<char>, pugi::xml_node> > > > >::type dnode
|
||||
|
||||
std::_Rb_tree_iterator<std::pair<const long, std::pair<pugi::xml_node, std::map<std::basic_string<char>, pugi::xml_node, std::less<std::basic_string<char> >, std::allocator<std::pair<const std::basic_string<char>, pugi::xml_node> > > > > > dnode_it = dnodes_.find(uid.position)
|
||||
30
extensions/cpp/test/colorize-fixtures/test.c
Normal file
30
extensions/cpp/test/colorize-fixtures/test.c
Normal file
@@ -0,0 +1,30 @@
|
||||
/* C Program to find roots of a quadratic equation when coefficients are entered by user. */
|
||||
/* Library function sqrt() computes the square root. */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <math.h> /* This is needed to use sqrt() function.*/
|
||||
int main()
|
||||
{
|
||||
float a, b, c, determinant, r1,r2, real, imag;
|
||||
printf("Enter coefficients a, b and c: ");
|
||||
scanf("%f%f%f",&a,&b,&c);
|
||||
determinant=b*b-4*a*c;
|
||||
if (determinant>0)
|
||||
{
|
||||
r1= (-b+sqrt(determinant))/(2*a);
|
||||
r2= (-b-sqrt(determinant))/(2*a);
|
||||
printf("Roots are: %.2f and %.2f",r1 , r2);
|
||||
}
|
||||
else if (determinant==0)
|
||||
{
|
||||
r1 = r2 = -b/(2*a);
|
||||
printf("Roots are: %.2f and %.2f", r1, r2);
|
||||
}
|
||||
else
|
||||
{
|
||||
real= -b/(2*a);
|
||||
imag = sqrt(-determinant)/(2*a);
|
||||
printf("Roots are: %.2f+%.2fi and %.2f-%.2fi", real, imag, real, imag);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
27
extensions/cpp/test/colorize-fixtures/test.cc
Normal file
27
extensions/cpp/test/colorize-fixtures/test.cc
Normal file
@@ -0,0 +1,27 @@
|
||||
#if B4G_DEBUG_CHECK
|
||||
fprintf(stderr,"num_candidate_ret=%d:", num_candidate);
|
||||
for(int i=0;i<num_candidate;++i)
|
||||
fprintf(stderr,"%d,",user_candidate[i]);
|
||||
fprintf(stderr,";");
|
||||
#endif
|
||||
|
||||
void main(O obj) {
|
||||
LOG_INFO("not hilighted as string");
|
||||
LOG_INFO(obj << ", even worse; " << obj.x << " check this out.");
|
||||
// everything from this point on is interpeted as a string literal...
|
||||
O x;
|
||||
std::unique_ptr<O> o(new O);
|
||||
// sadness.
|
||||
|
||||
sprintf(options, "STYLE=Keramik;TITLE=%s;THEME=%s", ...);
|
||||
}
|
||||
|
||||
|
||||
int main2() {
|
||||
printf(";");
|
||||
// the rest of
|
||||
asm("movw $0x38, %ax; ltr %ax");
|
||||
fn("{};");
|
||||
|
||||
// the rest of
|
||||
}
|
||||
33
extensions/cpp/test/colorize-fixtures/test.cpp
Normal file
33
extensions/cpp/test/colorize-fixtures/test.cpp
Normal file
@@ -0,0 +1,33 @@
|
||||
// classes example
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
#define EXTERN_C extern "C"
|
||||
|
||||
class Rectangle {
|
||||
int width, height;
|
||||
public:
|
||||
void set_values (int,int);
|
||||
int area() {return width*height;}
|
||||
};
|
||||
|
||||
void Rectangle::set_values (int x, int y) {
|
||||
width = x;
|
||||
height = y;
|
||||
}
|
||||
|
||||
long double operator "" _w(long double);
|
||||
#define MY_MACRO(a, b)
|
||||
|
||||
int main () {
|
||||
1.2_w; // calls operator "" _w(1.2L)
|
||||
asm("movl %a %b");
|
||||
MY_MACRO(1, 2);
|
||||
Rectangle rect;
|
||||
rect.set_values (3,4);
|
||||
cout << "area: " << rect.area();
|
||||
Task<ANY_OUTPUT_TYPE, ANY_INPUT_TYPE>::links_to;
|
||||
int t = 2;
|
||||
if (t > 0) puts("\n*************************************************");
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user